summaryrefslogtreecommitdiffstats
path: root/kbabel/catalogmanager/catmanlistitem.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /kbabel/catalogmanager/catmanlistitem.cpp
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbabel/catalogmanager/catmanlistitem.cpp')
-rw-r--r--kbabel/catalogmanager/catmanlistitem.cpp110
1 files changed, 55 insertions, 55 deletions
diff --git a/kbabel/catalogmanager/catmanlistitem.cpp b/kbabel/catalogmanager/catmanlistitem.cpp
index 5613a0bd..8d1496d4 100644
--- a/kbabel/catalogmanager/catmanlistitem.cpp
+++ b/kbabel/catalogmanager/catmanlistitem.cpp
@@ -22,11 +22,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this program with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -53,15 +53,15 @@
using namespace KBabel;
-CatManListItem::CatManListItem(CatalogManagerView *view, TQListViewItem* parent,TQString fullPath,TQString fullPotPath,TQString package)
- : TQListViewItem(parent)
+CatManListItem::CatManListItem(CatalogManagerView *view, TQListViewItem* tqparent,TQString fullPath,TQString fullPotPath,TQString package)
+ : TQListViewItem(tqparent)
{
_view = view;
init(fullPath,fullPotPath,package);
}
-CatManListItem::CatManListItem(CatalogManagerView *view, TQListView* parent,TQString fullPath,TQString fullPotPath)
- : TQListViewItem(parent)
+CatManListItem::CatManListItem(CatalogManagerView *view, TQListView* tqparent,TQString fullPath,TQString fullPotPath)
+ : TQListViewItem(tqparent)
{
_primary=TQFileInfo(fullPath);
_template=TQFileInfo(fullPotPath);
@@ -102,7 +102,7 @@ void CatManListItem::init(const TQString& fullPath, const TQString& fullPotPath,
_wordList.clear();
_wordListUpdated = false;
- update(parent()->isOpen(),false,true);
+ update(tqparent()->isOpen(),false,true);
if( !isDir() ) setPixmap(COL_MARKER,ICON_NOFLAG);
}
@@ -183,7 +183,7 @@ void CatManListItem::setOpen(bool open)
TQStringList CatManListItem::allChildrenList(bool onlyFiles) const
{
- TQStringList childrenList;
+ TQStringList tqchildrenList;
CatManListItem * myChild = (CatManListItem*)firstChild();
while( myChild )
@@ -192,26 +192,26 @@ TQStringList CatManListItem::allChildrenList(bool onlyFiles) const
if(myChild->isFile())
{
- childrenList.append(name);
+ tqchildrenList.append(name);
}
else if(myChild->isDir())
{
if(!onlyFiles)
- childrenList.append(name);
+ tqchildrenList.append(name);
- childrenList+=myChild->allChildrenList(onlyFiles);
+ tqchildrenList+=myChild->allChildrenList(onlyFiles);
}
myChild = (CatManListItem*)myChild->nextSibling();
}
- return childrenList;
+ return tqchildrenList;
}
TQStringList CatManListItem::allChildrenFileList(bool onlyFiles, bool emptyDirs, bool onlyModified) const
{
- TQStringList childrenList;
+ TQStringList tqchildrenList;
CatManListItem * myChild = (CatManListItem*)firstChild();
while( myChild )
@@ -219,22 +219,22 @@ TQStringList CatManListItem::allChildrenFileList(bool onlyFiles, bool emptyDirs,
if(myChild->isFile() && myChild->hasPo() &&
!(!myChild->isModified() && onlyModified))
{
- childrenList.append(myChild->poFile());
+ tqchildrenList.append(myChild->poFile());
}
else if(myChild->isDir())
{
if(!onlyFiles && (emptyDirs || myChild->_primary.exists() ))
{
- childrenList.append(myChild->poFile());
+ tqchildrenList.append(myChild->poFile());
}
- childrenList+=myChild->allChildrenFileList(onlyFiles,false,onlyModified);
+ tqchildrenList+=myChild->allChildrenFileList(onlyFiles,false,onlyModified);
}
myChild = (CatManListItem*)myChild->nextSibling();
}
- return childrenList;
+ return tqchildrenList;
}
@@ -332,11 +332,11 @@ TQString CatManListItem::key(int col, bool) const
void CatManListItem::update(bool showPoInfo,bool includeChildren
, bool noParents)
{
- if( _view->isStopped() ) return; // if parent view is stopped, we should stop as well
+ if( _view->isStopped() ) return; // if tqparent view is stopped, we should stop as well
bool updateWordList = _view->settings().indexWords;
- // flag, if something has changed and parent has to be updated
+ // flag, if something has changed and tqparent has to be updated
bool updateParent=false;
// update flags for files...
@@ -417,7 +417,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
if(showPoInfo)
{
- _lastUpdated=TQDateTime::currentDateTime();
+ _lastUpdated=TQDateTime::tqcurrentDateTime();
bool neededWork=needsWork();
bool needWork=false;
@@ -435,17 +435,17 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
const CVSHandler* cvsHandler = _view->cvsHandler();
const SVNHandler* svnHandler = _view->svnHandler();
- const CVSHandler::FileStatus cvsFileStatus = cvsHandler->fstatus( poFile() );
- const SVNHandler::FileStatus svnFileStatus = svnHandler->fstatus( poFile() );
+ const CVSHandler::FiletqStatus cvsFiletqStatus = cvsHandler->fstatus( poFile() );
+ const SVNHandler::FiletqStatus svnFiletqStatus = svnHandler->fstatus( poFile() );
- _isModified = cvsHandler->isConsideredModified( cvsFileStatus )
- || svnHandler->isConsideredModified( svnFileStatus );
+ _isModified = cvsHandler->isConsideredModified( cvsFiletqStatus )
+ || svnHandler->isConsideredModified( svnFiletqStatus );
TQString versionControl;
- if ( cvsFileStatus != CVSHandler::NO_REPOSITORY )
- versionControl = cvsHandler->fileStatus( cvsFileStatus );
- else if ( svnFileStatus != SVNHandler::NO_REPOSITORY )
- versionControl = svnHandler->fileStatus( svnFileStatus );
+ if ( cvsFiletqStatus != CVSHandler::NO_REPOSITORY )
+ versionControl = cvsHandler->filetqStatus( cvsFiletqStatus );
+ else if ( svnFiletqStatus != SVNHandler::NO_REPOSITORY )
+ versionControl = svnHandler->filetqStatus( svnFiletqStatus );
else
versionControl = i18n("No version control");
@@ -532,15 +532,15 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
if(showPoInfo)
{
- _lastUpdated=TQDateTime::currentDateTime();
+ _lastUpdated=TQDateTime::tqcurrentDateTime();
// clean previous state information
- setText(COL_FUZZY,TQString::null);
- setText(COL_UNTRANS,TQString::null);
- setText(COL_TOTAL,TQString::null);
- setText(COL_CVS_OR_SVN, TQString::null);
- setText(COL_REVISION, TQString::null);
- setText(COL_TRANSLATOR, TQString::null);
+ setText(COL_FUZZY,TQString());
+ setText(COL_UNTRANS,TQString());
+ setText(COL_TOTAL,TQString());
+ setText(COL_CVS_OR_SVN, TQString());
+ setText(COL_REVISION, TQString());
+ setText(COL_TRANSLATOR, TQString());
setPixmap(COL_NAME,ICON_UPDATING);
@@ -596,7 +596,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
// however, is can be saved template or translation!!! - only translation is handled???
void CatManListItem::updateAfterSave( PoInfo &poInfo )
{
- // flag, if something has changed and parent has to be updated
+ // flag, if something has changed and tqparent has to be updated
bool updateParent=false;
// update flags for files...
@@ -617,7 +617,7 @@ void CatManListItem::updateAfterSave( PoInfo &poInfo )
TQString name=_primary.fileName();
setText(COL_NAME,name.left(name.length()-3));
- _lastUpdated=TQDateTime::currentDateTime();
+ _lastUpdated=TQDateTime::tqcurrentDateTime();
bool neededWork=needsWork();
bool needWork=false;
@@ -625,14 +625,14 @@ void CatManListItem::updateAfterSave( PoInfo &poInfo )
TQPixmap icon;
_hasErrors=false;
- const CVSHandler::FileStatus cvsFileStatus = _view->cvsHandler()->fstatus(poFile());
- const SVNHandler::FileStatus svnFileStatus = _view->svnHandler()->fstatus(poFile());
+ const CVSHandler::FiletqStatus cvsFiletqStatus = _view->cvsHandler()->fstatus(poFile());
+ const SVNHandler::FiletqStatus svnFiletqStatus = _view->svnHandler()->fstatus(poFile());
TQString versionControl;
- if ( cvsFileStatus != CVSHandler::NO_REPOSITORY )
- versionControl = _view->cvsHandler()->fileStatus( cvsFileStatus );
- else if ( svnFileStatus != SVNHandler::NO_REPOSITORY )
- versionControl = _view->svnHandler()->fileStatus( svnFileStatus );
+ if ( cvsFiletqStatus != CVSHandler::NO_REPOSITORY )
+ versionControl = _view->cvsHandler()->filetqStatus( cvsFiletqStatus );
+ else if ( svnFiletqStatus != SVNHandler::NO_REPOSITORY )
+ versionControl = _view->svnHandler()->filetqStatus( svnFiletqStatus );
else
versionControl = i18n("No version control");
@@ -661,7 +661,7 @@ void CatManListItem::updateAfterSave( PoInfo &poInfo )
setPixmap(COL_NAME,icon);
- // if the status changed, update the parent item
+ // if the status changed, update the tqparent item
if(needWork != neededWork)
{
updateParent=true;
@@ -677,11 +677,11 @@ void CatManListItem::updateAfterSave( PoInfo &poInfo )
void CatManListItem::updateParents()
{
- CatManListItem *item = (CatManListItem*)parent();
+ CatManListItem *item = (CatManListItem*)tqparent();
while( item && !_view->isStopped())
{
item->update(false,false);
- item = (CatManListItem*)item->parent();
+ item = (CatManListItem*)item->tqparent();
}
}
@@ -799,12 +799,12 @@ TQString CatManListItem::package(bool rootSlash) const
TQString CatManListItem::packageDir( ) const
{
- return ( _type == Dir ? _package : TQString::null );
+ return ( _type == Dir ? _package : TQString() );
}
TQString CatManListItem::name() const
{
- int index = _package.findRev("/");
+ int index = _package.tqfindRev("/");
return _package.right(_package.length()-index-1);
}
@@ -825,12 +825,12 @@ TQPixmap CatManListItem::paintExclamation(TQPixmap* pixmap)
int width=pixmap->width();
int height=pixmap->height();
- int diameter=QMIN(width,height);
+ int diameter=TQMIN(width,height);
- TQBitmap mask=pixmap->createHeuristicMask();
+ TQBitmap tqmask=pixmap->createHeuristicMask();
- TQPainter mp(&mask);
- mp.setPen(TQPen(Qt::color1,1));
+ TQPainter mp(&tqmask);
+ mp.setPen(TQPen(TQt::color1,1));
mp.drawEllipse(width-diameter,height-diameter,diameter,diameter);
TQPixmap result(width,height);
@@ -840,14 +840,14 @@ TQPixmap CatManListItem::paintExclamation(TQPixmap* pixmap)
p.setPen( TQPen(red,1) );
p.drawEllipse(width-diameter,height-diameter,diameter,diameter);
- result.setMask(mask);
+ result.setMask(tqmask);
return result;
}
TQListViewItem *CatManListItem::previousSibling()
{
- TQListViewItem * i = parent();
+ TQListViewItem * i = tqparent();
if( !i ) return i;
i = i->firstChild();
if( !i ) return i;