diff options
Diffstat (limited to 'kivio/kiviopart/ui/kivioaddstencilsetpanel.cpp')
-rw-r--r-- | kivio/kiviopart/ui/kivioaddstencilsetpanel.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/kivio/kiviopart/ui/kivioaddstencilsetpanel.cpp b/kivio/kiviopart/ui/kivioaddstencilsetpanel.cpp index da7e6685..acc2e63a 100644 --- a/kivio/kiviopart/ui/kivioaddstencilsetpanel.cpp +++ b/kivio/kiviopart/ui/kivioaddstencilsetpanel.cpp @@ -18,14 +18,14 @@ */ #include "kivioaddstencilsetpanel.h" -#include <qfile.h> -#include <qdir.h> -#include <qstringlist.h> -#include <qiconview.h> -#include <qgroupbox.h> -#include <qpushbutton.h> -#include <qtextbrowser.h> -#include <qsplitter.h> +#include <tqfile.h> +#include <tqdir.h> +#include <tqstringlist.h> +#include <tqiconview.h> +#include <tqgroupbox.h> +#include <tqpushbutton.h> +#include <tqtextbrowser.h> +#include <tqsplitter.h> #include <kstandarddirs.h> #include <kglobal.h> @@ -38,19 +38,19 @@ #include "kivioglobal.h" namespace Kivio { - AddStencilSetPanel::AddStencilSetPanel(QWidget *parent, const char *name) - : KivioStencilSetWidget(parent, name) + AddStencilSetPanel::AddStencilSetPanel(TQWidget *tqparent, const char *name) + : KivioStencilSetWidget(tqparent, name) { int height = m_stencilsetGBox->height() / 2; - QValueList<int> sizes; + TQValueList<int> sizes; sizes << height << height; m_stencilSetSplitter->setSizes(sizes); updateList(); - connect(m_stencilSetLView, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(changeStencilSet(QListViewItem*))); - connect(m_addToDocBtn, SIGNAL(clicked()), this, SLOT(addToDocument())); + connect(m_stencilSetLView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(changeStencilSet(TQListViewItem*))); + connect(m_addToDocBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(addToDocument())); - QListViewItem* tmp = m_stencilSetLView->firstChild(); + TQListViewItem* tmp = m_stencilSetLView->firstChild(); if(tmp) { tmp = tmp->firstChild(); @@ -73,35 +73,35 @@ namespace Kivio { void AddStencilSetPanel::updateList() { KStandardDirs *dirs = KGlobal::dirs(); - QStringList dirList = dirs->findDirs("data", "kivio/stencils"); + TQStringList dirList = dirs->findDirs("data", "kivio/stencils"); dirList.sort(); m_stencilSetLView->clear(); - for(QStringList::Iterator it = dirList.begin(); it != dirList.end(); ++it) + for(TQStringList::Iterator it = dirList.begin(); it != dirList.end(); ++it) { - QString dir = (*it); + TQString dir = (*it); loadCollections(dir); } } - void AddStencilSetPanel::loadCollections(const QString& dir) + void AddStencilSetPanel::loadCollections(const TQString& dir) { - QDir rootDir( dir ); + TQDir rootDir( dir ); - rootDir.setFilter( QDir::Dirs ); - rootDir.setSorting( QDir::Name ); + rootDir.setFilter( TQDir::Dirs ); + rootDir.setSorting( TQDir::Name ); - const QFileInfoList *colList = rootDir.entryInfoList(); - QFileInfoListIterator colIt( *colList ); - QFileInfo *colFInfo; - QString cId; + const TQFileInfoList *colList = rootDir.entryInfoList(); + TQFileInfoListIterator colIt( *colList ); + TQFileInfo *colFInfo; + TQString cId; while((colFInfo = colIt.current())) { if((colFInfo->fileName() != "..") && (colFInfo->fileName() != ".")) { cId = KivioStencilSpawnerSet::readId(colFInfo->absFilePath()); - QListViewItem* li = m_stencilSetLView->firstChild(); + TQListViewItem* li = m_stencilSetLView->firstChild(); while(li) { if(li->text(1) == cId) { @@ -125,16 +125,16 @@ namespace Kivio { } } - void AddStencilSetPanel::loadStencilSet(QListViewItem* li, const QString& dir) + void AddStencilSetPanel::loadStencilSet(TQListViewItem* li, const TQString& dir) { - QDir rootDir( dir ); + TQDir rootDir( dir ); - rootDir.setFilter( QDir::Dirs ); - rootDir.setSorting( QDir::Name ); + rootDir.setFilter( TQDir::Dirs ); + rootDir.setSorting( TQDir::Name ); - const QFileInfoList *setList = rootDir.entryInfoList(); - QFileInfoListIterator setIt( *setList ); - QFileInfo *setFInfo; + const TQFileInfoList *setList = rootDir.entryInfoList(); + TQFileInfoListIterator setIt( *setList ); + TQFileInfo *setFInfo; while( (setFInfo = setIt.current()) ) { @@ -154,24 +154,24 @@ namespace Kivio { } } - QPixmap AddStencilSetPanel::loadIcon(const QString& name, const QString& dir) + TQPixmap AddStencilSetPanel::loadIcon(const TQString& name, const TQString& dir) { - QString fs; + TQString fs; - if( QFile::exists(dir + "/" + name + ".xpm") ) { + if( TQFile::exists(dir + "/" + name + ".xpm") ) { fs = dir + "/" + name + ".xpm"; - } else if( QFile::exists(dir + "/" + name + ".png") ) { + } else if( TQFile::exists(dir + "/" + name + ".png") ) { fs = dir + "/" + name + ".png"; } else { - return QPixmap(); + return TQPixmap(); } - return QPixmap( fs ); + return TQPixmap( fs ); } - void AddStencilSetPanel::changeStencilSet(QListViewItem* li) + void AddStencilSetPanel::changeStencilSet(TQListViewItem* li) { - if(!li || !li->parent()) { + if(!li || !li->tqparent()) { return; } @@ -181,7 +181,7 @@ namespace Kivio { // Load the stencil icons m_currentDir = li->text(1); spawnerSet->loadDir(m_currentDir); - QStringList files = spawnerSet->files(); + TQStringList files = spawnerSet->files(); // Remove the old icons m_stencilIView->clear(); @@ -189,7 +189,7 @@ namespace Kivio { KivioStencil* stencil = 0; int count = 0; - for(QStringList::Iterator it = files.begin(); it != files.end(); ++it) + for(TQStringList::Iterator it = files.begin(); it != files.end(); ++it) { spawner = spawnerSet->loadFile(m_currentDir + "/" + (*it)); @@ -197,7 +197,7 @@ namespace Kivio { stencil = spawner->newStencil(); if(stencil) { - (void) new QIconViewItem(m_stencilIView, spawner->info()->title(), Kivio::generatePixmapFromStencil(32, 32, stencil)); + (void) new TQIconViewItem(m_stencilIView, spawner->info()->title(), Kivio::generatePixmapFromStencil(32, 32, stencil)); delete stencil; count++; } |