From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- parts/fileview/addfilegroupdlg.cpp | 34 +++---- parts/fileview/addfilegroupdlg.h | 10 +- parts/fileview/filegroupsconfigwidget.cpp | 16 ++-- parts/fileview/filegroupsconfigwidget.h | 2 +- parts/fileview/filegroupspart.cpp | 36 ++++---- parts/fileview/filegroupspart.h | 8 +- parts/fileview/filegroupswidget.cpp | 146 +++++++++++++++--------------- parts/fileview/filegroupswidget.h | 14 +-- parts/fileview/fileitemfactory.cpp | 20 ++-- parts/fileview/fileitemfactory.h | 12 +-- parts/fileview/filetreeviewwidgetimpl.cpp | 28 +++--- parts/fileview/filetreeviewwidgetimpl.h | 18 ++-- parts/fileview/filetreewidget.cpp | 94 +++++++++---------- parts/fileview/filetreewidget.h | 34 +++---- parts/fileview/fileviewpart.cpp | 40 ++++---- parts/fileview/fileviewpart.h | 8 +- parts/fileview/partwidget.cpp | 48 +++++----- parts/fileview/partwidget.h | 12 +-- parts/fileview/stdfiletreewidgetimpl.cpp | 8 +- parts/fileview/vcscolorsconfigwidget.cpp | 2 +- parts/fileview/vcscolorsconfigwidget.h | 22 ++--- parts/fileview/vcsfiletreewidgetimpl.cpp | 64 ++++++------- parts/fileview/vcsfiletreewidgetimpl.h | 4 +- 23 files changed, 340 insertions(+), 340 deletions(-) (limited to 'parts/fileview') diff --git a/parts/fileview/addfilegroupdlg.cpp b/parts/fileview/addfilegroupdlg.cpp index ef194da1..b59f2ad2 100644 --- a/parts/fileview/addfilegroupdlg.cpp +++ b/parts/fileview/addfilegroupdlg.cpp @@ -9,9 +9,9 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include #include @@ -20,42 +20,42 @@ #include "addfilegroupdlg.h" -AddFileGroupDialog::AddFileGroupDialog(const QString& old_title, const QString& old_pattern, QWidget *parent, const char *name) - : QDialog(parent, name, true) +AddFileGroupDialog::AddFileGroupDialog(const TQString& old_title, const TQString& old_pattern, TQWidget *parent, const char *name) + : TQDialog(parent, name, true) { - QLabel *title_label = new QLabel(i18n("&Title:"), this); + TQLabel *title_label = new TQLabel(i18n("&Title:"), this); title_edit = new KLineEdit(old_title, this); title_edit->setFocus(); title_label->setBuddy(title_edit); - connect( title_edit, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotTextChanged() ) ); + connect( title_edit, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotTextChanged() ) ); - QLabel *pattern_label = new QLabel(i18n("&Pattern:"), this); + TQLabel *pattern_label = new TQLabel(i18n("&Pattern:"), this); pattern_edit = new KLineEdit(old_pattern, this); pattern_label->setBuddy(pattern_edit); - QFontMetrics fm(pattern_edit->fontMetrics()); + TQFontMetrics fm(pattern_edit->fontMetrics()); pattern_edit->setMinimumWidth(fm.width('X')*35); - connect( pattern_edit, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotTextChanged() ) ); - QVBoxLayout *layout = new QVBoxLayout(this, 10); + connect( pattern_edit, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotTextChanged() ) ); + TQVBoxLayout *layout = new TQVBoxLayout(this, 10); - QGridLayout *grid = new QGridLayout(2, 2); + TQGridLayout *grid = new TQGridLayout(2, 2); layout->addLayout(grid); grid->addWidget(title_label, 0, 0); grid->addWidget(title_edit, 0, 1); grid->addWidget(pattern_label, 1, 0); grid->addWidget(pattern_edit, 1, 1); - QFrame *frame = new QFrame(this); - frame->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame *frame = new TQFrame(this); + frame->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); layout->addWidget(frame, 0); KButtonBox *buttonbox = new KButtonBox(this); buttonbox->addStretch(); m_pOk = buttonbox->addButton(KStdGuiItem::ok()); - QPushButton *cancel = buttonbox->addButton(KStdGuiItem::cancel()); + TQPushButton *cancel = buttonbox->addButton(KStdGuiItem::cancel()); m_pOk->setDefault(true); - connect( m_pOk, SIGNAL(clicked()), this, SLOT(accept()) ); - connect( cancel, SIGNAL(clicked()), this, SLOT(reject()) ); + connect( m_pOk, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()) ); + connect( cancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject()) ); buttonbox->layout(); layout->addWidget(buttonbox, 0); slotTextChanged(); diff --git a/parts/fileview/addfilegroupdlg.h b/parts/fileview/addfilegroupdlg.h index f72a2007..fbc0f6ab 100644 --- a/parts/fileview/addfilegroupdlg.h +++ b/parts/fileview/addfilegroupdlg.h @@ -12,7 +12,7 @@ #ifndef _ADDFILEGROUPDLG_H_ #define _ADDFILEGROUPDLG_H_ -#include +#include #include class QPushButton; @@ -21,19 +21,19 @@ class AddFileGroupDialog : public QDialog Q_OBJECT public: - AddFileGroupDialog( const QString& old_title="", const QString& old_pattern="", QWidget *parent=0, const char *name=0 ); + AddFileGroupDialog( const TQString& old_title="", const TQString& old_pattern="", TQWidget *parent=0, const char *name=0 ); ~AddFileGroupDialog(); - QString title() const + TQString title() const { return title_edit->text(); } - QString pattern() const + TQString pattern() const { return pattern_edit->text(); } private slots: void slotTextChanged(); private: KLineEdit *title_edit; KLineEdit *pattern_edit; - QPushButton *m_pOk; + TQPushButton *m_pOk; }; #endif diff --git a/parts/fileview/filegroupsconfigwidget.cpp b/parts/fileview/filegroupsconfigwidget.cpp index 28a0441b..c1a4f5bc 100644 --- a/parts/fileview/filegroupsconfigwidget.cpp +++ b/parts/fileview/filegroupsconfigwidget.cpp @@ -11,7 +11,7 @@ #include "filegroupsconfigwidget.h" -#include +#include #include #include @@ -21,7 +21,7 @@ FileGroupsConfigWidget::FileGroupsConfigWidget(FileGroupsPart *part, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : FileGroupsConfigWidgetBase(parent, name) { m_part = part; @@ -38,15 +38,15 @@ FileGroupsConfigWidget::~FileGroupsConfigWidget() void FileGroupsConfigWidget::readConfig() { - QDomDocument &dom = *m_part->projectDom(); + TQDomDocument &dom = *m_part->projectDom(); DomUtil::PairList list = DomUtil::readPairListEntry(dom, "/kdevfileview/groups", "group", "name", "pattern"); - QListViewItem *lastItem = 0; + TQListViewItem *lastItem = 0; DomUtil::PairList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { - QListViewItem *newItem = new QListViewItem(listview, (*it).first, (*it).second); + TQListViewItem *newItem = new TQListViewItem(listview, (*it).first, (*it).second); if (lastItem) newItem->moveItem(lastItem); lastItem = newItem; @@ -58,7 +58,7 @@ void FileGroupsConfigWidget::storeConfig() { DomUtil::PairList list; - QListViewItem *item = listview->firstChild(); + TQListViewItem *item = listview->firstChild(); while (item) { list << DomUtil::Pair(item->text(0), item->text(1)); item = item->nextSibling(); @@ -76,7 +76,7 @@ void FileGroupsConfigWidget::addGroup() if (!dlg.exec()) return; - (void) new QListViewItem(listview, dlg.title(), dlg.pattern()); + (void) new TQListViewItem(listview, dlg.title(), dlg.pattern()); } @@ -106,7 +106,7 @@ void FileGroupsConfigWidget::moveUp() return; } - QListViewItem *item = listview->firstChild(); + TQListViewItem *item = listview->firstChild(); while (item->nextSibling() != listview->currentItem()) item = item->nextSibling(); item->moveItem(listview->currentItem()); diff --git a/parts/fileview/filegroupsconfigwidget.h b/parts/fileview/filegroupsconfigwidget.h index b9b5c574..7c2759cb 100644 --- a/parts/fileview/filegroupsconfigwidget.h +++ b/parts/fileview/filegroupsconfigwidget.h @@ -22,7 +22,7 @@ class FileGroupsConfigWidget : public FileGroupsConfigWidgetBase Q_OBJECT public: - FileGroupsConfigWidget( FileGroupsPart *widget, QWidget *parent, const char *name=0 ); + FileGroupsConfigWidget( FileGroupsPart *widget, TQWidget *parent, const char *name=0 ); ~FileGroupsConfigWidget(); public slots: diff --git a/parts/fileview/filegroupspart.cpp b/parts/fileview/filegroupspart.cpp index 1c6a5abf..4451ff2a 100644 --- a/parts/fileview/filegroupspart.cpp +++ b/parts/fileview/filegroupspart.cpp @@ -12,9 +12,9 @@ #include "filegroupspart.h" #include "filegroupspart.moc" -#include -#include -#include +#include +#include +#include #include #include #include @@ -36,7 +36,7 @@ typedef KDevGenericFactory FileGroupsFactory; static const KDevPluginInfo data("kdevfilegroups"); K_EXPORT_COMPONENT_FACTORY( libkdevfilegroups, FileGroupsFactory( data ) ) -FileGroupsPart::FileGroupsPart(QObject *parent, const char *name, const QStringList &) +FileGroupsPart::FileGroupsPart(TQObject *parent, const char *name, const TQStringList &) : KDevPlugin(&data, parent, name ? name : "FileGroupsPart") { deleteRequested = false; @@ -45,26 +45,26 @@ FileGroupsPart::FileGroupsPart(QObject *parent, const char *name, const QStringL m_filegroups = new FileGroupsWidget(this); m_filegroups->setCaption(i18n("File Group View")); m_filegroups->setIcon(SmallIcon( info()->icon() ) ); - QWhatsThis::add(m_filegroups, i18n("File group view

" + TQWhatsThis::add(m_filegroups, i18n("File group view

" "The file group viewer shows all files of the project, " "in groups which can be configured in project settings dialog, File Groups tab.")); mainWindow()->embedSelectView(m_filegroups, i18n("File Groups"), i18n("File groups in the project directory")); _configProxy = new ConfigWidgetProxy( core() ); _configProxy->createProjectConfigPage( i18n("File Groups"), FILEGROUPS_OPTIONS, info()->icon() ); - connect( _configProxy, SIGNAL(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int )), - this, SLOT(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int )) ); + connect( _configProxy, TQT_SIGNAL(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )), + this, TQT_SLOT(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )) ); // File groups - connect( project(), SIGNAL(addedFilesToProject(const QStringList&)), - m_filegroups, SLOT(addFiles(const QStringList&)) ); - connect( project(), SIGNAL(removedFilesFromProject(const QStringList&)), - m_filegroups, SLOT(removeFiles(const QStringList&)) ); -/* connect( project(), SIGNAL(addedFileToProject(const QString&)), - m_filegroups, SLOT(addFile(const QString&)) ); - connect( project(), SIGNAL(removedFileFromProject(const QString&)), - m_filegroups, SLOT(removeFile(const QString&)) );*/ + connect( project(), TQT_SIGNAL(addedFilesToProject(const TQStringList&)), + m_filegroups, TQT_SLOT(addFiles(const TQStringList&)) ); + connect( project(), TQT_SIGNAL(removedFilesFromProject(const TQStringList&)), + m_filegroups, TQT_SLOT(removeFiles(const TQStringList&)) ); +/* connect( project(), TQT_SIGNAL(addedFileToProject(const TQString&)), + m_filegroups, TQT_SLOT(addFile(const TQString&)) ); + connect( project(), TQT_SIGNAL(removedFileFromProject(const TQString&)), + m_filegroups, TQT_SLOT(removeFile(const TQString&)) );*/ m_filegroups->refresh(); } @@ -84,14 +84,14 @@ void FileGroupsPart::refresh() // This method may be called from m_filetree's slot, // so we make sure not to modify the list view during // the execution of the slot - QTimer::singleShot(0, m_filegroups, SLOT(refresh())); + TQTimer::singleShot(0, m_filegroups, TQT_SLOT(refresh())); } -void FileGroupsPart::insertConfigWidget( const KDialogBase * dlg, QWidget * page, unsigned int pagenumber ) +void FileGroupsPart::insertConfigWidget( const KDialogBase * dlg, TQWidget * page, unsigned int pagenumber ) { if ( pagenumber == FILEGROUPS_OPTIONS ) { FileGroupsConfigWidget *w = new FileGroupsConfigWidget(this, page, "file groups config widget"); - connect( dlg, SIGNAL(okClicked()), w, SLOT(accept()) ); + connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) ); } } diff --git a/parts/fileview/filegroupspart.h b/parts/fileview/filegroupspart.h index 8e712b4b..22cb055e 100644 --- a/parts/fileview/filegroupspart.h +++ b/parts/fileview/filegroupspart.h @@ -12,7 +12,7 @@ #ifndef _FILEGROUPSPART_H_ #define _FILEGROUPSPART_H_ -#include +#include //#include #include #include "kdevplugin.h" @@ -25,17 +25,17 @@ class FileGroupsPart : public KDevPlugin Q_OBJECT public: - FileGroupsPart( QObject *parent, const char *name, const QStringList & ); + FileGroupsPart( TQObject *parent, const char *name, const TQStringList & ); ~FileGroupsPart(); public slots: void refresh(); private slots: - void insertConfigWidget( const KDialogBase* dlg, QWidget * page, unsigned int ); + void insertConfigWidget( const KDialogBase* dlg, TQWidget * page, unsigned int ); private: - QGuardedPtr m_filegroups; + TQGuardedPtr m_filegroups; bool deleteRequested; ConfigWidgetProxy * _configProxy; }; diff --git a/parts/fileview/filegroupswidget.cpp b/parts/fileview/filegroupswidget.cpp index 9f32460d..a31cb963 100644 --- a/parts/fileview/filegroupswidget.cpp +++ b/parts/fileview/filegroupswidget.cpp @@ -11,12 +11,12 @@ #include "filegroupswidget.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -49,53 +49,53 @@ class FileComparator { public: virtual ~FileComparator(){ }; - virtual bool matches(const QString& name) const = 0; + virtual bool matches(const TQString& name) const = 0; }; class RegExpComparator : public FileComparator { public: - RegExpComparator(const QString& pattern) : m_exp(pattern, true, true){ + RegExpComparator(const TQString& pattern) : m_exp(pattern, true, true){ } - bool matches(const QString& name) const{ + bool matches(const TQString& name) const{ return m_exp.exactMatch(name); } private: - const QRegExp m_exp; + const TQRegExp m_exp; }; class EndingComparator : public FileComparator { public: - EndingComparator(const QString& pattern) : m_pattern ( pattern){ + EndingComparator(const TQString& pattern) : m_pattern ( pattern){ } - bool matches(const QString& name) const{ + bool matches(const TQString& name) const{ return name.endsWith(m_pattern); } private: - const QString m_pattern; + const TQString m_pattern; }; class FileViewFolderItem : public QListViewItem { public: - FileViewFolderItem(QListView *parent, const QString &name, const QString &pattern); - bool matches(const QString &fileName); + FileViewFolderItem(TQListView *parent, const TQString &name, const TQString &pattern); + bool matches(const TQString &fileName); private: - QPtrList m_patterns; + TQPtrList m_patterns; }; -FileViewFolderItem::FileViewFolderItem(QListView *parent, const QString &name, const QString &pattern) - : QListViewItem(parent, name) +FileViewFolderItem::FileViewFolderItem(TQListView *parent, const TQString &name, const TQString &pattern) + : TQListViewItem(parent, name) { setPixmap(0, SmallIcon("folder")); m_patterns.setAutoDelete(true); - QStringList patternstring = QStringList::split(';', pattern); - QStringList::ConstIterator theend = patternstring.end(); - for (QStringList::ConstIterator ci = patternstring.begin(); ci != theend; ++ci) + TQStringList patternstring = TQStringList::split(';', pattern); + TQStringList::ConstIterator theend = patternstring.end(); + for (TQStringList::ConstIterator ci = patternstring.begin(); ci != theend; ++ci) { - QString pattern = *ci; - QString tail = pattern.right( pattern.length() - 1 ); + TQString pattern = *ci; + TQString tail = pattern.right( pattern.length() - 1 ); if ( (tail).contains('*') || pattern.contains('?') || pattern.contains('[') || pattern.contains(']') ) { @@ -116,13 +116,13 @@ FileViewFolderItem::FileViewFolderItem(QListView *parent, const QString &name, c } -bool FileViewFolderItem::matches(const QString &fileName) +bool FileViewFolderItem::matches(const TQString &fileName) { // Test with the file path, so that "*ClientServer/*.h" patterns work - QString fName = QFileInfo(fileName).filePath(); + TQString fName = TQFileInfo(fileName).filePath(); - QPtrList::ConstIterator theend = m_patterns.end(); - for (QPtrList::ConstIterator ci = m_patterns.begin(); ci != theend; ++ci) + TQPtrList::ConstIterator theend = m_patterns.end(); + for (TQPtrList::ConstIterator ci = m_patterns.begin(); ci != theend; ++ci) if ((*ci)->matches(fName)) return true; @@ -133,20 +133,20 @@ bool FileViewFolderItem::matches(const QString &fileName) class FileGroupsFileItem : public QListViewItem { public: - FileGroupsFileItem(QListViewItem *parent, const QString &fileName); - QString fileName() const + FileGroupsFileItem(TQListViewItem *parent, const TQString &fileName); + TQString fileName() const { return fullname; } private: - QString fullname; + TQString fullname; }; -FileGroupsFileItem::FileGroupsFileItem(QListViewItem *parent, const QString &fileName) - : QListViewItem(parent), fullname(fileName) +FileGroupsFileItem::FileGroupsFileItem(TQListViewItem *parent, const TQString &fileName) + : TQListViewItem(parent), fullname(fileName) { setPixmap(0, SmallIcon("document")); - QFileInfo fi(fileName); + TQFileInfo fi(fileName); setText(0, fi.fileName()); setText(1, "./" + fi.dirPath()); } @@ -164,33 +164,33 @@ FileGroupsWidget::FileGroupsWidget(FileGroupsPart *part) setFocusPolicy(ClickFocus); setRootIsDecorated(true); - setResizeMode(QListView::LastColumn); + setResizeMode(TQListView::LastColumn); setSorting(-1); addColumn(i18n("Name")); setAllColumnsShowFocus( true ); // addColumn(i18n("Location")); - connect( this, SIGNAL(executed(QListViewItem*)), - this, SLOT(slotItemExecuted(QListViewItem*)) ); - connect( this, SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(slotItemExecuted(QListViewItem*)) ); - connect( this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), - this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&)) ); + connect( this, TQT_SIGNAL(executed(TQListViewItem*)), + this, TQT_SLOT(slotItemExecuted(TQListViewItem*)) ); + connect( this, TQT_SIGNAL(returnPressed(TQListViewItem*)), + this, TQT_SLOT(slotItemExecuted(TQListViewItem*)) ); + connect( this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&)) ); m_actionToggleShowNonProjectFiles = new KToggleAction( i18n("Show Non Project Files"), KShortcut(), - this, SLOT(slotToggleShowNonProjectFiles()), this, "actiontoggleshowshownonprojectfiles" ); + this, TQT_SLOT(slotToggleShowNonProjectFiles()), this, "actiontoggleshowshownonprojectfiles" ); m_actionToggleShowNonProjectFiles->setCheckedState(i18n("Hide Non Project Files")); m_actionToggleShowNonProjectFiles->setWhatsThis(i18n("Show non project files

Shows files that do not belong to a project in a file tree.")); m_actionToggleDisplayLocation = new KToggleAction( i18n("Display Location Column"), KShortcut(), - this, SLOT(slotToggleDisplayLocation()), this, "actiontoggleshowlocation" ); + this, TQT_SLOT(slotToggleDisplayLocation()), this, "actiontoggleshowlocation" ); m_actionToggleDisplayLocation->setWhatsThis(i18n("Display the Location Column

Displays a column with the location of the files.")); m_part = part; (void) translations; // supress compiler warning - QDomDocument &dom = *m_part->projectDom(); + TQDomDocument &dom = *m_part->projectDom(); m_actionToggleShowNonProjectFiles->setChecked( !DomUtil::readBoolEntry(dom, "/kdevfileview/groups/hidenonprojectfiles") ); m_actionToggleDisplayLocation->setChecked( !DomUtil::readBoolEntry(dom, "/kdevfileview/groups/hidenonlocation") ); } @@ -198,13 +198,13 @@ FileGroupsWidget::FileGroupsWidget(FileGroupsPart *part) FileGroupsWidget::~FileGroupsWidget() { - QDomDocument &dom = *m_part->projectDom(); + TQDomDocument &dom = *m_part->projectDom(); DomUtil::writeBoolEntry( dom, "/kdevfileview/groups/hidenonprojectfiles", !m_actionToggleShowNonProjectFiles->isChecked() ); DomUtil::writeBoolEntry( dom, "/kdevfileview/groups/hidenonlocation", !m_actionToggleDisplayLocation->isChecked() ); } -void FileGroupsWidget::slotItemExecuted(QListViewItem *item) +void FileGroupsWidget::slotItemExecuted(TQListViewItem *item) { if (!item) return; @@ -222,7 +222,7 @@ void FileGroupsWidget::slotItemExecuted(QListViewItem *item) } -void FileGroupsWidget::slotContextMenu(KListView *, QListViewItem *item, const QPoint &p) +void FileGroupsWidget::slotContextMenu(KListView *, TQListViewItem *item, const TQPoint &p) { KPopupMenu popup(i18n("File Groups"), this); /// @todo Add, remove groups @@ -232,15 +232,15 @@ void FileGroupsWidget::slotContextMenu(KListView *, QListViewItem *item, const Q if (item->parent()) { // Not for group items FileGroupsFileItem *fvfitem = static_cast(item); - QString pathName = m_part->project()->projectDirectory() + QDir::separator() + fvfitem->fileName(); + TQString pathName = m_part->project()->projectDirectory() + TQDir::separator() + fvfitem->fileName(); KURL::List urls; urls.append(pathName); FileContext context(urls); m_part->core()->fillContextMenu(&popup, &context); } else{ - QStringList file_list; - QListViewItem* i = item->firstChild(); + TQStringList file_list; + TQListViewItem* i = item->firstChild(); while(i){ FileGroupsFileItem *fvgitem = static_cast(i); file_list << fvgitem->fileName(); @@ -258,21 +258,21 @@ void FileGroupsWidget::slotContextMenu(KListView *, QListViewItem *item, const Q KDialogBase dlg(KDialogBase::TreeList, i18n("Customize File Groups"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, this, "customization dialog"); - QVBox *vbox = dlg.addVBoxPage(i18n("File Groups")); + TQVBox *vbox = dlg.addVBoxPage(i18n("File Groups")); FileGroupsConfigWidget *w = new FileGroupsConfigWidget(m_part, vbox, "file groups config widget"); - connect(&dlg, SIGNAL(okClicked()), w, SLOT(accept())); + connect(&dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); dlg.exec(); } } -QStringList FileGroupsWidget::allFilesRecursively( QString const & dir ) +TQStringList FileGroupsWidget::allFilesRecursively( TQString const & dir ) { - QStringList filelist; - QString reldir = dir.mid( m_part->project()->projectDirectory().length() +1 ); + TQStringList filelist; + TQString reldir = dir.mid( m_part->project()->projectDirectory().length() +1 ); // recursively fetch all files in subdirectories - QStringList subdirs = QDir( dir ).entryList( QDir::Dirs ); - QValueListIterator it = subdirs.begin(); + TQStringList subdirs = TQDir( dir ).entryList( TQDir::Dirs ); + TQValueListIterator it = subdirs.begin(); while ( it != subdirs.end() ) { if ( *it != "." && *it != ".." ) @@ -283,8 +283,8 @@ QStringList FileGroupsWidget::allFilesRecursively( QString const & dir ) } // append the project relative directory path to all files in the current directory - QStringList dirlist = QDir( dir ).entryList( QDir::Files ); - QValueListIterator itt = dirlist.begin(); + TQStringList dirlist = TQDir( dir ).entryList( TQDir::Files ); + TQValueListIterator itt = dirlist.begin(); while ( itt != dirlist.end() ) { if ( reldir.isEmpty() ) @@ -316,7 +316,7 @@ void FileGroupsWidget::refresh() if (LocationID!=-1) removeColumn(LocationID); } - QDomDocument &dom = *m_part->projectDom(); + TQDomDocument &dom = *m_part->projectDom(); DomUtil::PairList list = DomUtil::readPairListEntry(dom, "/kdevfileview/groups", "group", "name", "pattern"); @@ -330,7 +330,7 @@ void FileGroupsWidget::refresh() lastGroup = newItem; } - QStringList allFiles; + TQStringList allFiles; if (m_actionToggleShowNonProjectFiles->isChecked()) { // get all files in the project directory allFiles = allFilesRecursively( m_part->project()->projectDirectory() ); @@ -339,9 +339,9 @@ void FileGroupsWidget::refresh() // get all project files allFiles = m_part->project()->allFiles(); } - QStringList::ConstIterator fit; + TQStringList::ConstIterator fit; for (fit = allFiles.begin(); fit != allFiles.end(); ++fit) { - QListViewItem *item = firstChild(); + TQListViewItem *item = firstChild(); while (item) { FileViewFolderItem *fvgitem = static_cast(item); if (fvgitem->matches(*fit)) { @@ -352,7 +352,7 @@ void FileGroupsWidget::refresh() } } - QListViewItem *item = firstChild(); + TQListViewItem *item = firstChild(); while (item) { item->sortChildItems(0, true); item = item->nextSibling(); @@ -360,16 +360,16 @@ void FileGroupsWidget::refresh() } -void FileGroupsWidget::addFile(const QString &fileName) +void FileGroupsWidget::addFile(const TQString &fileName) { kdDebug(9017) << "FileView add " << fileName << endl; - QListViewItem *item = firstChild(); + TQListViewItem *item = firstChild(); while (item) { FileViewFolderItem *fvgitem = static_cast(item); if (fvgitem->matches(fileName)) { - QString f = fileName; + TQString f = fileName; if (fileName.contains(m_part->project()->projectDirectory())) f = fileName.mid(m_part->project()->projectDirectory().length()+1); (void) new FileGroupsFileItem(fvgitem, f); @@ -380,9 +380,9 @@ void FileGroupsWidget::addFile(const QString &fileName) } } -void FileGroupsWidget::addFiles ( const QStringList& fileList ) +void FileGroupsWidget::addFiles ( const TQStringList& fileList ) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = fileList.begin(); it != fileList.end(); ++it ) { @@ -391,15 +391,15 @@ void FileGroupsWidget::addFiles ( const QStringList& fileList ) sort(); } -void FileGroupsWidget::removeFile(const QString &fileName) +void FileGroupsWidget::removeFile(const TQString &fileName) { kdDebug(9017) << "FileView remove " << fileName << endl; - QListViewItem *item = firstChild(); + TQListViewItem *item = firstChild(); while (item) { FileViewFolderItem *fvgitem = static_cast(item); - QListViewItem *childItem = fvgitem->firstChild(); + TQListViewItem *childItem = fvgitem->firstChild(); while (childItem) { FileGroupsFileItem *fgfitem = static_cast(childItem); @@ -417,9 +417,9 @@ void FileGroupsWidget::removeFile(const QString &fileName) } } -void FileGroupsWidget::removeFiles ( const QStringList& fileList ) +void FileGroupsWidget::removeFiles ( const TQStringList& fileList ) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = fileList.begin(); it != fileList.end(); ++it ) { diff --git a/parts/fileview/filegroupswidget.h b/parts/fileview/filegroupswidget.h index 7bdbf78b..cd7b2f63 100644 --- a/parts/fileview/filegroupswidget.h +++ b/parts/fileview/filegroupswidget.h @@ -28,21 +28,21 @@ public: public slots: void refresh(); - void addFiles ( const QStringList& fileList ); - void removeFiles ( const QStringList& fileList ); + void addFiles ( const TQStringList& fileList ); + void removeFiles ( const TQStringList& fileList ); private slots: - void slotItemExecuted(QListViewItem *item); - void slotContextMenu(KListView *, QListViewItem *item, const QPoint &p); + void slotItemExecuted(TQListViewItem *item); + void slotContextMenu(KListView *, TQListViewItem *item, const TQPoint &p); void slotToggleShowNonProjectFiles(); void slotToggleDisplayLocation(); protected: - void addFile(const QString &fileName); - void removeFile(const QString &fileName); + void addFile(const TQString &fileName); + void removeFile(const TQString &fileName); private: - QStringList allFilesRecursively( QString const & ); + TQStringList allFilesRecursively( TQString const & ); FileGroupsPart *m_part; class KToggleAction *m_actionToggleShowNonProjectFiles; diff --git a/parts/fileview/fileitemfactory.cpp b/parts/fileview/fileitemfactory.cpp index 614f535c..3ccf5921 100644 --- a/parts/fileview/fileitemfactory.cpp +++ b/parts/fileview/fileitemfactory.cpp @@ -9,7 +9,7 @@ * * ***************************************************************************/ -#include +#include #include #include "filetreewidget.h" @@ -23,7 +23,7 @@ using namespace filetreeview; FileTreeWidget* FileTreeViewItem::listView() const { - return static_cast( QListViewItem::listView() ); + return static_cast( TQListViewItem::listView() ); } /////////////////////////////////////////////////////////////////////////////// @@ -41,7 +41,7 @@ void FileTreeViewItem::hideOrShow() } } -bool FileTreeViewItem::changeActiveDir( const QString& olddir, const QString& newdir, bool foundolddir, bool foundnewdir ) +bool FileTreeViewItem::changeActiveDir( const TQString& olddir, const TQString& newdir, bool foundolddir, bool foundnewdir ) { kdDebug( 9017 ) << "FileTreeViewItem::changeActiveDir(): " + olddir << " new: " << newdir << " for: " << path() << endl; @@ -77,7 +77,7 @@ bool FileTreeViewItem::changeActiveDir( const QString& olddir, const QString& ne /////////////////////////////////////////////////////////////////////////////// -bool FileTreeViewItem::setProjectFile( QString const & path, bool pf ) +bool FileTreeViewItem::setProjectFile( TQString const & path, bool pf ) { if ( this->path() == path && isProjectFile() != pf ) @@ -102,30 +102,30 @@ bool FileTreeViewItem::setProjectFile( QString const & path, bool pf ) /////////////////////////////////////////////////////////////////////////////// -void FileTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg, +void FileTreeViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) { if ( listView()->showNonProjectFiles() && isProjectFile() ) { - QFont font( p->font() ); + TQFont font( p->font() ); font.setBold( true ); p->setFont( font ); } if( isActiveDir() ) { - QFont font( p->font() ); + TQFont font( p->font() ); font.setItalic( true ); p->setFont( font ); } - QListViewItem::paintCell( p, cg, column, width, alignment ); + TQListViewItem::paintCell( p, cg, column, width, alignment ); } /////////////////////////////////////////////////////////////////////////////// -int FileTreeViewItem::compare( QListViewItem *i, int col, bool ascending ) const +int FileTreeViewItem::compare( TQListViewItem *i, int col, bool ascending ) const { KFileTreeViewItem* rhs = dynamic_cast( i ); if (rhs) @@ -137,7 +137,7 @@ int FileTreeViewItem::compare( QListViewItem *i, int col, bool ascending ) const return (ascending) ? -1 : 1; } - return QListViewItem::compare( i, col, ascending ); + return TQListViewItem::compare( i, col, ascending ); } /////////////////////////////////////////////////////////////////////////////// diff --git a/parts/fileview/fileitemfactory.h b/parts/fileview/fileitemfactory.h index f87ae39a..065591d7 100644 --- a/parts/fileview/fileitemfactory.h +++ b/parts/fileview/fileitemfactory.h @@ -41,16 +41,16 @@ namespace filetreeview virtual ~FileTreeViewItem() {} public: - virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment ); + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment ); FileTreeWidget* listView() const; void hideOrShow(); bool isProjectFile() const { return m_isProjectFile; } - bool setProjectFile( QString const &path, bool pf ); + bool setProjectFile( TQString const &path, bool pf ); bool isActiveDir() const { return m_isActiveDir; } - bool changeActiveDir( const QString &, const QString&, bool foundolddir = false, bool foundnewdir = false ); + bool changeActiveDir( const TQString &, const TQString&, bool foundolddir = false, bool foundnewdir = false ); protected: - virtual int compare( QListViewItem *i, int col, bool ascending ) const; + virtual int compare( TQListViewItem *i, int col, bool ascending ) const; private: bool m_isProjectFile; @@ -63,7 +63,7 @@ namespace filetreeview class FileTreeBranchItem : public KFileTreeBranch { protected: - FileTreeBranchItem( KFileTreeView* view, const KURL& url, const QString& name, const QPixmap& pix ) + FileTreeBranchItem( KFileTreeView* view, const KURL& url, const TQString& name, const TQPixmap& pix ) : KFileTreeBranch( view, url, name, pix, false, new FileTreeViewItem( view, new KFileItem( url, "inode/directory", S_IFDIR ), this ) ) { @@ -82,7 +82,7 @@ namespace filetreeview class BranchItemFactory { public: - virtual FileTreeBranchItem *makeBranchItem( KFileTreeView* view, const KURL& url, const QString& name, const QPixmap& pix ) = 0; + virtual FileTreeBranchItem *makeBranchItem( KFileTreeView* view, const KURL& url, const TQString& name, const TQPixmap& pix ) = 0; }; } diff --git a/parts/fileview/filetreeviewwidgetimpl.cpp b/parts/fileview/filetreeviewwidgetimpl.cpp index 9e40a3bb..02b7be86 100644 --- a/parts/fileview/filetreeviewwidgetimpl.cpp +++ b/parts/fileview/filetreeviewwidgetimpl.cpp @@ -9,7 +9,7 @@ * * ***************************************************************************/ -#include +#include #include #include #include @@ -31,19 +31,19 @@ using namespace filetreeview; /////////////////////////////////////////////////////////////////////////////// FileTreeViewWidgetImpl::FileTreeViewWidgetImpl( FileTreeWidget *parent, const char *name ) - : QObject( parent, name ), m_branchItemFactory( 0 ), + : TQObject( parent, name ), m_branchItemFactory( 0 ), m_part( parent->part() ), m_isReloadingTree( false ) { kdDebug(9017) << "FileTreeViewWidgetImpl::FileTreeViewWidgetImpl()" << endl; // Actions m_actionToggleShowNonProjectFiles = new KToggleAction( i18n("Show Non Project Files"), KShortcut(), - this, SLOT(slotToggleShowNonProjectFiles()), this, "actiontoggleshowshownonprojectfiles" ); + this, TQT_SLOT(slotToggleShowNonProjectFiles()), this, "actiontoggleshowshownonprojectfiles" ); m_actionToggleShowNonProjectFiles->setCheckedState(i18n("Hide Non Project Files")); m_actionToggleShowNonProjectFiles->setWhatsThis(i18n("Show non project files

Shows files that do not belong to a project in a file tree.")); // Reload good ol' settings - QDomDocument &dom = *m_part->projectDom(); + TQDomDocument &dom = *m_part->projectDom(); m_actionToggleShowNonProjectFiles->setChecked( !DomUtil::readBoolEntry(dom, "/kdevfileview/tree/hidenonprojectfiles") ); } @@ -55,7 +55,7 @@ FileTreeViewWidgetImpl::~FileTreeViewWidgetImpl() delete m_branchItemFactory; - QDomDocument &dom = *m_part->projectDom(); + TQDomDocument &dom = *m_part->projectDom(); DomUtil::writeBoolEntry( dom, "/kdevfileview/tree/hidenonprojectfiles", !showNonProjectFiles() ); } @@ -68,14 +68,14 @@ FileTreeWidget *FileTreeViewWidgetImpl::fileTree() const /////////////////////////////////////////////////////////////////////////////// -QDomDocument &FileTreeViewWidgetImpl::projectDom() const +TQDomDocument &FileTreeViewWidgetImpl::projectDom() const { return *part()->projectDom(); } /////////////////////////////////////////////////////////////////////////////// -QString FileTreeViewWidgetImpl::projectDirectory() const +TQString FileTreeViewWidgetImpl::projectDirectory() const { return part()->project()->projectDirectory(); } @@ -89,14 +89,14 @@ bool FileTreeViewWidgetImpl::showNonProjectFiles() const /////////////////////////////////////////////////////////////////////////////// -void FileTreeViewWidgetImpl::fillPopupMenu( QPopupMenu *popupMenu, QListViewItem *item ) const +void FileTreeViewWidgetImpl::fillPopupMenu( TQPopupMenu *popupMenu, TQListViewItem *item ) const { // Show the "reload tree" menu-item only if it is requested for the root object // and we don't have a sync-with-repository operation pending (which otherwise will // kill the call-back's from working) if (item == fileTree()->firstChild() && canReloadTree()) { - int id = popupMenu->insertItem( i18n( "Reload Tree"), this, SLOT( slotReloadTree() ) ); + int id = popupMenu->insertItem( i18n( "Reload Tree"), this, TQT_SLOT( slotReloadTree() ) ); popupMenu->setWhatsThis( id, i18n("Reload tree

Reloads the project files tree.") ); } @@ -111,8 +111,8 @@ KURL::List FileTreeViewWidgetImpl::selectedPathUrls() KURL::List urlList; - QValueList list = allSelectedItems( fileTree()->firstChild() ); - QValueList::Iterator it = list.begin(); + TQValueList list = allSelectedItems( fileTree()->firstChild() ); + TQValueList::Iterator it = list.begin(); while( it != list.end() ) { FileTreeViewItem * item = static_cast( *it ); @@ -130,9 +130,9 @@ KURL::List FileTreeViewWidgetImpl::selectedPathUrls() /////////////////////////////////////////////////////////////////////////////// -QValueList FileTreeViewWidgetImpl::allSelectedItems( QListViewItem * item ) const +TQValueList FileTreeViewWidgetImpl::allSelectedItems( TQListViewItem * item ) const { - QValueList list; + TQValueList list; if ( item ) { @@ -141,7 +141,7 @@ QValueList FileTreeViewWidgetImpl::allSelectedItems( QListViewIt list << item; } - QListViewItem * it = item->firstChild(); + TQListViewItem * it = item->firstChild(); while( it ) { list += allSelectedItems( it ); diff --git a/parts/fileview/filetreeviewwidgetimpl.h b/parts/fileview/filetreeviewwidgetimpl.h index fae4b248..52a95fc1 100644 --- a/parts/fileview/filetreeviewwidgetimpl.h +++ b/parts/fileview/filetreeviewwidgetimpl.h @@ -12,10 +12,10 @@ #ifndef FILETREEVIEWWIDGETIMPL_H #define FILETREEVIEWWIDGETIMPL_H -#include -#include +#include +#include #include -#include +#include #include "fileitemfactory.h" @@ -47,8 +47,8 @@ public: KURL::List selectedPathUrls(); // shortcuts FileTreeWidget *fileTree() const; - QDomDocument &projectDom() const; - QHeader *header() const { return fileTree()->header(); } + TQDomDocument &projectDom() const; + TQHeader *header() const { return fileTree()->header(); } void setColumnWidth( int column, int w ) { fileTree()->setColumnWidth( column, w ); } int contentsWidth() const { return fileTree()->contentsWidth(); } void triggerUpdate() { fileTree()->triggerUpdate(); } @@ -68,9 +68,9 @@ public: * Here the popup menu is filled: by standard only the "reload tree" (only if the above function * returns true) and "show project files" options are added * @param popupMenu the menu to fill - * @param item the QListViewItem which this menu has been requested upon + * @param item the TQListViewItem which this menu has been requested upon */ - virtual void fillPopupMenu( QPopupMenu *popupMenu, QListViewItem *item ) const; + virtual void fillPopupMenu( TQPopupMenu *popupMenu, TQListViewItem *item ) const; /** * @return true if non project files are to be shown, false otherwise */ @@ -89,10 +89,10 @@ private slots: protected: void setBranchItemFactory( filetreeview::BranchItemFactory *aFactory ) { m_branchItemFactory = aFactory; } - QString projectDirectory() const; + TQString projectDirectory() const; private: - QValueList allSelectedItems( QListViewItem * item ) const; + TQValueList allSelectedItems( TQListViewItem * item ) const; filetreeview::BranchItemFactory *m_branchItemFactory; FileViewPart *m_part; diff --git a/parts/fileview/filetreewidget.cpp b/parts/fileview/filetreewidget.cpp index e0d7538b..6f049370 100644 --- a/parts/fileview/filetreewidget.cpp +++ b/parts/fileview/filetreewidget.cpp @@ -13,11 +13,11 @@ #include "filetreewidget.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -51,7 +51,7 @@ using namespace filetreeview; // class FileTreeWidget /////////////////////////////////////////////////////////////////////////////// -FileTreeWidget::FileTreeWidget( FileViewPart *part, QWidget *parent, KDevVCSFileInfoProvider *infoProvider ) +FileTreeWidget::FileTreeWidget( FileViewPart *part, TQWidget *parent, KDevVCSFileInfoProvider *infoProvider ) : KFileTreeView( parent, "filetreewidget" ), m_part( part ), m_rootBranch( 0 ) { kdDebug(9017) << "Requested FileTree for: " << projectDirectory() << endl; @@ -63,32 +63,32 @@ FileTreeWidget::FileTreeWidget( FileViewPart *part, QWidget *parent, KDevVCSFile else m_impl = new StdFileTreeWidgetImpl( this ); - //setResizeMode( QListView::LastColumn ); + //setResizeMode( TQListView::LastColumn ); setSorting( 0 ); setAllColumnsShowFocus( true ); - setSelectionMode( QListView::Extended ); // Enable multiple items selection by use of Ctrl/Shift + setSelectionMode( TQListView::Extended ); // Enable multiple items selection by use of Ctrl/Shift setDragEnabled( false ); // Slot connections - connect( this, SIGNAL(executed(QListViewItem*)), this, SLOT(slotItemExecuted(QListViewItem*)) ); - connect( this, SIGNAL(returnPressed(QListViewItem*)), this, SLOT(slotItemExecuted(QListViewItem*)) ); - connect( this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), - this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&)) ); + connect( this, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(slotItemExecuted(TQListViewItem*)) ); + connect( this, TQT_SIGNAL(returnPressed(TQListViewItem*)), this, TQT_SLOT(slotItemExecuted(TQListViewItem*)) ); + connect( this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&)) ); // Intercepts KDevelop core signals and VCS notifications (if available) - connect( m_part->project(), SIGNAL( activeDirectoryChanged( const QString&, const QString& ) ), - this, SLOT( changeActiveDirectory( const QString&, const QString& ) ) ); - connect( m_part->project(), SIGNAL( addedFilesToProject( const QStringList & ) ), - this, SLOT( addProjectFiles( const QStringList & ) ) ); - connect( m_part->project(), SIGNAL( removedFilesFromProject( const QStringList & ) ), - this, SLOT( removeProjectFiles( const QStringList & ) ) ); + connect( m_part->project(), TQT_SIGNAL( activeDirectoryChanged( const TQString&, const TQString& ) ), + this, TQT_SLOT( changeActiveDirectory( const TQString&, const TQString& ) ) ); + connect( m_part->project(), TQT_SIGNAL( addedFilesToProject( const TQStringList & ) ), + this, TQT_SLOT( addProjectFiles( const TQStringList & ) ) ); + connect( m_part->project(), TQT_SIGNAL( removedFilesFromProject( const TQStringList & ) ), + this, TQT_SLOT( removeProjectFiles( const TQStringList & ) ) ); // Safeguard against VCS plug-in unloading at run-time - connect( m_impl, SIGNAL(implementationInvalidated()), this, SLOT(slotImplementationInvalidated()) ); + connect( m_impl, TQT_SIGNAL(implementationInvalidated()), this, TQT_SLOT(slotImplementationInvalidated()) ); // Hide pattern for files - QDomDocument &dom = *m_part->projectDom(); - QString defaultHidePattern = "*.o,*.lo,CVS"; - QString hidePattern = DomUtil::readEntry( dom, "/kdevfileview/tree/hidepatterns", defaultHidePattern ); - m_hidePatterns = QStringList::split( ",", hidePattern ); + TQDomDocument &dom = *m_part->projectDom(); + TQString defaultHidePattern = "*.o,*.lo,CVS"; + TQString hidePattern = DomUtil::readEntry( dom, "/kdevfileview/tree/hidepatterns", defaultHidePattern ); + m_hidePatterns = TQStringList::split( ",", hidePattern ); } /////////////////////////////////////////////////////////////////////////////// @@ -97,7 +97,7 @@ FileTreeWidget::~FileTreeWidget() { kdDebug(9017) << "FileTreeWidget::~FileTreeWidget()" << endl; - QDomDocument &dom = *m_part->projectDom(); + TQDomDocument &dom = *m_part->projectDom(); DomUtil::writeEntry( dom, "/kdevfileview/tree/hidepatterns", hidePatterns() ); // delete m_impl; @@ -105,14 +105,14 @@ FileTreeWidget::~FileTreeWidget() /////////////////////////////////////////////////////////////////////////////// -void FileTreeWidget::openDirectory( const QString& dirName ) +void FileTreeWidget::openDirectory( const TQString& dirName ) { kdDebug(9017) << "FileTreeWidget::openDirectory(): " + dirName << endl; // if we're reloading if (m_rootBranch) { - disconnect( m_rootBranch, SIGNAL(populateFinished(KFileTreeViewItem*)), this, SLOT(finishPopulate(KFileTreeViewItem*)) ); + disconnect( m_rootBranch, TQT_SIGNAL(populateFinished(KFileTreeViewItem*)), this, TQT_SLOT(finishPopulate(KFileTreeViewItem*)) ); removeBranch( m_rootBranch ); m_projectFiles.clear(); } @@ -120,7 +120,7 @@ void FileTreeWidget::openDirectory( const QString& dirName ) addProjectFiles( m_part->project()->allFiles(), true ); KURL url = KURL::fromPathOrURL( dirName ); - const QPixmap& pix = KMimeType::mimeType("inode/directory")->pixmap( KIcon::Small ); + const TQPixmap& pix = KMimeType::mimeType("inode/directory")->pixmap( KIcon::Small ); // this is a bit odd, but the order of these calls seems to be important //FileTreeBranch *b = new FileTreeBranch( this, url, url.prettyURL(), pix ); @@ -128,7 +128,7 @@ void FileTreeWidget::openDirectory( const QString& dirName ) b->setChildRecurse( false ); m_rootBranch = addBranch( b ); m_rootBranch->setOpen( true ); - connect( m_rootBranch, SIGNAL(populateFinished(KFileTreeViewItem*)), this, SLOT(finishPopulate(KFileTreeViewItem*)) ); + connect( m_rootBranch, TQT_SIGNAL(populateFinished(KFileTreeViewItem*)), this, TQT_SLOT(finishPopulate(KFileTreeViewItem*)) ); } /////////////////////////////////////////////////////////////////////////////// @@ -142,11 +142,11 @@ bool FileTreeWidget::shouldBeShown( KFileTreeViewItem* item ) /////////////////////////////////////////////////////////////////////////////// -bool FileTreeWidget::matchesHidePattern(const QString &fileName) +bool FileTreeWidget::matchesHidePattern(const TQString &fileName) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = m_hidePatterns.begin(); it != m_hidePatterns.end(); ++it) { - QRegExp re(*it, true, true); + TQRegExp re(*it, true, true); if (re.search(fileName) == 0 && (uint)re.matchedLength() == fileName.length()) return true; } @@ -184,7 +184,7 @@ void FileTreeWidget::finishPopulate(KFileTreeViewItem* item) /////////////////////////////////////////////////////////////////////////////// -void FileTreeWidget::slotItemExecuted( QListViewItem* item ) +void FileTreeWidget::slotItemExecuted( TQListViewItem* item ) { if (!item) return; @@ -199,7 +199,7 @@ void FileTreeWidget::slotItemExecuted( QListViewItem* item ) /////////////////////////////////////////////////////////////////////////////// -void FileTreeWidget::slotContextMenu( KListView *, QListViewItem* item, const QPoint &p ) +void FileTreeWidget::slotContextMenu( KListView *, TQListViewItem* item, const TQPoint &p ) { kdDebug(9017) << "FileTreeWidget::slotContextMenu(...)" << endl; @@ -219,7 +219,7 @@ void FileTreeWidget::slotContextMenu( KListView *, QListViewItem* item, const QP /////////////////////////////////////////////////////////////////////////////// -QString FileTreeWidget::projectDirectory() +TQString FileTreeWidget::projectDirectory() { return m_part->project()->projectDirectory(); } @@ -231,7 +231,7 @@ QString FileTreeWidget::projectDirectory() * * @param fileName or directory to test for presence. */ -bool FileTreeWidget::isInProject(const QString &fileName) const +bool FileTreeWidget::isInProject(const TQString &fileName) const { return m_projectFiles.contains(fileName); } @@ -250,22 +250,22 @@ bool FileTreeWidget::isInProject(const QString &fileName) const * * @see m_projectFiles */ -void FileTreeWidget::addProjectFiles( QStringList const & fileList, bool constructing ) +void FileTreeWidget::addProjectFiles( TQStringList const & fileList, bool constructing ) { kdDebug(9017) << "files added to project: " << fileList << endl; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = fileList.begin(); it != fileList.end(); ++it ) { if( (*it).isEmpty() ) continue; kdDebug(9017) << "adding file: " << *it << endl; - const QString file = projectDirectory() + "/" + ( *it ); + const TQString file = projectDirectory() + "/" + ( *it ); if ( !m_projectFiles.contains( file ) ) { // We got a new file to add to this project. // Ensure all the parent directories are part of the project set, too. - QStringList paths = QStringList::split( "/", *it); + TQStringList paths = TQStringList::split( "/", *it); paths.pop_back(); while( !paths.isEmpty() ) { @@ -274,7 +274,7 @@ void FileTreeWidget::addProjectFiles( QStringList const & fileList, bool constru // Whenever we find out that a directory is already recorded as part of our project, // we may stop adding, because its parent directories were already added - // in some previous addition. - QString joinedPaths = paths.join("/"); + TQString joinedPaths = paths.join("/"); if( m_projectFiles.contains( joinedPaths ) ) break; m_projectFiles.insert( projectDirectory() + "/" + joinedPaths, true ); @@ -297,14 +297,14 @@ void FileTreeWidget::addProjectFiles( QStringList const & fileList, bool constru /////////////////////////////////////////////////////////////////////////////// -void FileTreeWidget::removeProjectFiles( QStringList const & fileList ) +void FileTreeWidget::removeProjectFiles( TQStringList const & fileList ) { kdDebug(9017) << "files removed from project: " << fileList.count() << endl; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = fileList.begin(); it != fileList.end(); ++it ) { - QString file = m_part->project()->projectDirectory() + "/" + ( *it ); + TQString file = m_part->project()->projectDirectory() + "/" + ( *it ); m_projectFiles.remove( file ); kdDebug(9017) << "file removed: " << file << endl; @@ -316,7 +316,7 @@ void FileTreeWidget::removeProjectFiles( QStringList const & fileList ) } } -void FileTreeWidget::changeActiveDirectory( const QString& olddir, const QString& newdir ) +void FileTreeWidget::changeActiveDirectory( const TQString& olddir, const TQString& newdir ) { FileTreeViewItem* item = static_cast(firstChild()); if( item ) @@ -327,15 +327,15 @@ void FileTreeWidget::changeActiveDirectory( const QString& olddir, const QString /////////////////////////////////////////////////////////////////////////////// -void FileTreeWidget::applyHidePatterns( const QString &hidePatterns ) +void FileTreeWidget::applyHidePatterns( const TQString &hidePatterns ) { - m_hidePatterns = QStringList::split( ",", hidePatterns ); + m_hidePatterns = TQStringList::split( ",", hidePatterns ); hideOrShow(); } /////////////////////////////////////////////////////////////////////////////// -QString FileTreeWidget::hidePatterns() const +TQString FileTreeWidget::hidePatterns() const { return m_hidePatterns.join( "," ); } diff --git a/parts/fileview/filetreewidget.h b/parts/fileview/filetreewidget.h index 53dc77d3..f9608029 100644 --- a/parts/fileview/filetreewidget.h +++ b/parts/fileview/filetreewidget.h @@ -14,7 +14,7 @@ #ifndef _FILETREEWIDGET_H_ #define _FILETREEWIDGET_H_ -#include +#include #include #include @@ -48,20 +48,20 @@ class FileTreeWidget : public KFileTreeView { Q_OBJECT public: - FileTreeWidget( FileViewPart *part, QWidget *parent, KDevVCSFileInfoProvider *infoProvider ); + FileTreeWidget( FileViewPart *part, TQWidget *parent, KDevVCSFileInfoProvider *infoProvider ); virtual ~FileTreeWidget(); - void openDirectory(const QString &dirName); + void openDirectory(const TQString &dirName); bool shouldBeShown( KFileTreeViewItem* item ); - QString projectDirectory(); - bool isInProject(const QString &fileName) const; + TQString projectDirectory(); + bool isInProject(const TQString &fileName) const; FileViewPart *part() const { return m_part; } //KDevVCSFileInfoProvider *vcsFileInfoProvider() const; - void applyHidePatterns( const QString &hidePatterns ); - QString hidePatterns() const; + void applyHidePatterns( const TQString &hidePatterns ); + TQString hidePatterns() const; bool showNonProjectFiles() const; @@ -70,23 +70,23 @@ public slots: private slots: - void slotItemExecuted(QListViewItem *item); - void slotContextMenu(KListView *, QListViewItem *item, const QPoint &p); + void slotItemExecuted(TQListViewItem *item); + void slotContextMenu(KListView *, TQListViewItem *item, const TQPoint &p); - void changeActiveDirectory( const QString&, const QString& ); + void changeActiveDirectory( const TQString&, const TQString& ); void finishPopulate(KFileTreeViewItem* item); - void addProjectFiles( QStringList const & fileList, bool constructing = false ); - void removeProjectFiles( QStringList const & fileList ); + void addProjectFiles( TQStringList const & fileList, bool constructing = false ); + void removeProjectFiles( TQStringList const & fileList ); //! We must guard against unloading the used VCS plug-in when using it: we //! fall back to the implementation (a file view without VCS fields, only filenames) void slotImplementationInvalidated(); private: - bool matchesHidePattern(const QString &fileName); + bool matchesHidePattern(const TQString &fileName); KDevVersionControl *versionControl() const; - QStringList m_hidePatterns; + TQStringList m_hidePatterns; /** * @brief Set of all the files in this project. * @@ -99,13 +99,13 @@ private: * but rather a map with next-to-useless element value, * keyed by names of files. * QT3 does not seem to have a set datatype, - * thus we use the QMap type instead. + * thus we use the TQMap type instead. */ - QMap m_projectFiles; + TQMap m_projectFiles; FileViewPart *m_part; KFileTreeBranch *m_rootBranch; - QGuardedPtr m_impl; + TQGuardedPtr m_impl; }; #endif diff --git a/parts/fileview/fileviewpart.cpp b/parts/fileview/fileviewpart.cpp index d6d6691d..0e3758c9 100644 --- a/parts/fileview/fileviewpart.cpp +++ b/parts/fileview/fileviewpart.cpp @@ -13,12 +13,12 @@ #include "fileviewpart.h" -#include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include #include #include @@ -57,7 +57,7 @@ K_EXPORT_COMPONENT_FACTORY( libkdevfileview, FileViewFactory( data ) ) // class FileTreeWidget /////////////////////////////////////////////////////////////////////////////// -FileViewPart::FileViewPart(QObject *parent, const char *name, const QStringList &) +FileViewPart::FileViewPart(TQObject *parent, const char *name, const TQStringList &) : KDevPlugin(&data, parent, name ? name : "FileViewPart"), m_widget( 0 ) { @@ -66,10 +66,10 @@ FileViewPart::FileViewPart(QObject *parent, const char *name, const QStringList _configProxy = new ConfigWidgetProxy( core() ); _configProxy->createProjectConfigPage( i18n("File Tree"), FILETREE_OPTIONS, info()->icon() ); - connect( _configProxy, SIGNAL(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int )), - this, SLOT(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int )) ); + connect( _configProxy, TQT_SIGNAL(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )), + this, TQT_SLOT(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )) ); - QTimer::singleShot( 1000, this, SLOT(init()) ); + TQTimer::singleShot( 1000, this, TQT_SLOT(init()) ); } /////////////////////////////////////////////////////////////////////////////// @@ -102,15 +102,15 @@ FileViewPart::~FileViewPart() void FileViewPart::loadSettings() { - const QColor added = QColor( "#CCFF99" ), - updated = QColor( "#FFFFCC" ), - modified = QColor( "#CCCCFF" ), - conflict = QColor( "#FF6666" ), - sticky = QColor( "#FFCCCC" ), - needsPatch = QColor( "#FFCCFF" ), - needsCheckout = QColor( "#FFCCFF" ), - unknown = QColor( white ), - defaultColor = QColor( white ); + const TQColor added = TQColor( "#CCFF99" ), + updated = TQColor( "#FFFFCC" ), + modified = TQColor( "#CCCCFF" ), + conflict = TQColor( "#FF6666" ), + sticky = TQColor( "#FFCCCC" ), + needsPatch = TQColor( "#FFCCFF" ), + needsCheckout = TQColor( "#FFCCFF" ), + unknown = TQColor( white ), + defaultColor = TQColor( white ); KConfig *cfg = instance()->config(); @@ -144,12 +144,12 @@ void FileViewPart::storeSettings() cfg->writeEntry( "DefaultColor", vcsColors.defaultColor ); } -void FileViewPart::insertConfigWidget( const KDialogBase* dlg, QWidget * page, unsigned int pagenumber ) +void FileViewPart::insertConfigWidget( const KDialogBase* dlg, TQWidget * page, unsigned int pagenumber ) { if ( pagenumber == FILETREE_OPTIONS ) { VCSColorsConfigWidget *w = new VCSColorsConfigWidget( this, vcsColors, page, "vcscolorsconfigwidget" ); - connect( dlg, SIGNAL(okClicked()), w, SLOT(slotAccept()) ); + connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(slotAccept()) ); } } diff --git a/parts/fileview/fileviewpart.h b/parts/fileview/fileviewpart.h index 9c9a03da..01f84d32 100644 --- a/parts/fileview/fileviewpart.h +++ b/parts/fileview/fileviewpart.h @@ -12,7 +12,7 @@ #ifndef _FILEVIEWPART_H_ #define _FILEVIEWPART_H_ -#include +#include #include #include "kdevplugin.h" #include "vcscolorsconfigwidget.h" @@ -26,7 +26,7 @@ class FileViewPart : public KDevPlugin Q_OBJECT public: - FileViewPart( QObject *parent, const char *name, const QStringList & ); + FileViewPart( TQObject *parent, const char *name, const TQStringList & ); virtual ~FileViewPart(); //! Colors to use for VCS visual feed-back @@ -35,14 +35,14 @@ public: KDevVersionControl *versionControl(); private slots: - void insertConfigWidget( const KDialogBase* dlg, QWidget * page, unsigned int ); + void insertConfigWidget( const KDialogBase* dlg, TQWidget * page, unsigned int ); void init(); private: void loadSettings(); void storeSettings(); - QGuardedPtr m_widget; + TQGuardedPtr m_widget; ConfigWidgetProxy * _configProxy; }; diff --git a/parts/fileview/partwidget.cpp b/parts/fileview/partwidget.cpp index b3f9baf0..db921fb1 100644 --- a/parts/fileview/partwidget.cpp +++ b/parts/fileview/partwidget.cpp @@ -10,11 +10,11 @@ ***************************************************************************/ #include "partwidget.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include @@ -34,8 +34,8 @@ // class PartWidget /////////////////////////////////////////////////////////////////////////////// -PartWidget::PartWidget( FileViewPart *part, QWidget *parent ) - : QVBox( parent, "fileviewpartwidget" ), m_filetree( 0 ), +PartWidget::PartWidget( FileViewPart *part, TQWidget *parent ) + : TQVBox( parent, "fileviewpartwidget" ), m_filetree( 0 ), m_filter( 0 ), m_btnFilter( 0 ), m_part( part ) { Q_ASSERT( part && parent ); @@ -48,29 +48,29 @@ PartWidget::PartWidget( FileViewPart *part, QWidget *parent ) setCaption(i18n("File Tree")); m_filetree->setCaption(i18n("File Tree")); m_filetree->setIcon(SmallIcon("folder")); - QWhatsThis::add(m_filetree, i18n("File tree

" + TQWhatsThis::add(m_filetree, i18n("File tree

" "The file viewer shows all files of the project " "in a tree layout.")); - QHBox* filterBox = new QHBox( this ); - m_btnFilter = new QToolButton( filterBox ); + TQHBox* filterBox = new TQHBox( this ); + m_btnFilter = new TQToolButton( filterBox ); m_btnFilter->setIconSet( SmallIconSet("filter" ) ); m_btnFilter->setToggleButton( true ); m_filter = new KHistoryCombo( true, filterBox, "filter"); - m_filter->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed )); + m_filter->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); filterBox->setStretchFactor(m_filter, 2); - connect( m_btnFilter, SIGNAL( clicked() ), this, SLOT( slotBtnFilterClick() ) ); - connect( m_filter, SIGNAL( activated(const QString&) ), this, SLOT( slotFilterChange(const QString&) ) ); - connect( m_filter, SIGNAL( returnPressed(const QString&) ), - m_filter, SLOT( addToHistory(const QString&) ) ); + connect( m_btnFilter, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBtnFilterClick() ) ); + connect( m_filter, TQT_SIGNAL( activated(const TQString&) ), this, TQT_SLOT( slotFilterChange(const TQString&) ) ); + connect( m_filter, TQT_SIGNAL( returnPressed(const TQString&) ), + m_filter, TQT_SLOT( addToHistory(const TQString&) ) ); - QWhatsThis::add + TQWhatsThis::add ( m_filter, i18n("

Here you can enter a name filter to limit which files are not displayed." "

To clear the filter, toggle off the filter button to the left." "

To reapply the last filter used, toggle on the filter button." ) ); - QWhatsThis::add + TQWhatsThis::add ( m_btnFilter, i18n("

This button clears the name filter when toggled off, or " "reapplies the last filter used when toggled on.") ); @@ -94,19 +94,19 @@ void PartWidget::showProjectFiles() /////////////////////////////////////////////////////////////////////////////// -void PartWidget::slotFilterChange( const QString & nf ) +void PartWidget::slotFilterChange( const TQString & nf ) { - QString f = nf.stripWhiteSpace(); + TQString f = nf.stripWhiteSpace(); bool empty = f.isEmpty() || f == "*"; if ( empty ) { - m_filter->lineEdit()->setText( QString::null ); - QToolTip::add( m_btnFilter, i18n("Apply last filter (\"%1\")").arg( m_lastFilter ) ); + m_filter->lineEdit()->setText( TQString::null ); + TQToolTip::add( m_btnFilter, i18n("Apply last filter (\"%1\")").arg( m_lastFilter ) ); } else { m_lastFilter = f; - QToolTip::add( m_btnFilter, i18n("Clear filter") ); + TQToolTip::add( m_btnFilter, i18n("Clear filter") ); } m_btnFilter->setOn( !empty ); // this will be never true after the m_filter has been used;) @@ -127,7 +127,7 @@ void PartWidget::slotBtnFilterClick() { if ( !m_btnFilter->isOn() ) { - slotFilterChange( QString::null ); + slotFilterChange( TQString::null ); } else { @@ -136,7 +136,7 @@ void PartWidget::slotBtnFilterClick() } } -void PartWidget::focusInEvent( QFocusEvent * ) +void PartWidget::focusInEvent( TQFocusEvent * ) { m_filetree->setFocus(); } diff --git a/parts/fileview/partwidget.h b/parts/fileview/partwidget.h index e9d62665..03090e2b 100644 --- a/parts/fileview/partwidget.h +++ b/parts/fileview/partwidget.h @@ -12,7 +12,7 @@ #ifndef _FILEVIEWPARTWIDGET_H_ #define _FILEVIEWPARTWIDGET_H_ -#include +#include class FileViewPart; @@ -20,26 +20,26 @@ class PartWidget : public QVBox { Q_OBJECT public: - PartWidget( FileViewPart *part, QWidget *parent = 0 ); + PartWidget( FileViewPart *part, TQWidget *parent = 0 ); virtual ~PartWidget(); class FileTreeWidget *m_filetree; // Support for filters class KHistoryCombo *m_filter; - class QToolButton *m_btnFilter; + class TQToolButton *m_btnFilter; void showProjectFiles(); protected: - virtual void focusInEvent( QFocusEvent * ); + virtual void focusInEvent( TQFocusEvent * ); private slots: - void slotFilterChange( const QString & nf ); + void slotFilterChange( const TQString & nf ); void slotBtnFilterClick(); private: FileViewPart *m_part; - QString m_lastFilter; + TQString m_lastFilter; }; #endif diff --git a/parts/fileview/stdfiletreewidgetimpl.cpp b/parts/fileview/stdfiletreewidgetimpl.cpp index b680f2a8..67a8da28 100644 --- a/parts/fileview/stdfiletreewidgetimpl.cpp +++ b/parts/fileview/stdfiletreewidgetimpl.cpp @@ -9,7 +9,7 @@ * * ***************************************************************************/ - #include + #include #include #include "fileitemfactory.h" @@ -36,7 +36,7 @@ public: class StdFileTreeBranchItem : public filetreeview::FileTreeBranchItem { public: - StdFileTreeBranchItem( KFileTreeView* view, const KURL& url, const QString& name, const QPixmap& pix ) + StdFileTreeBranchItem( KFileTreeView* view, const KURL& url, const TQString& name, const TQPixmap& pix ) : FileTreeBranchItem( view, url, name, pix ) {} virtual ~StdFileTreeBranchItem() {} virtual KFileTreeViewItem* createTreeViewItem( KFileTreeViewItem* parent, KFileItem* fileItem ); @@ -64,7 +64,7 @@ KFileTreeViewItem* StdFileTreeBranchItem::createTreeViewItem( KFileTreeViewItem* class StdBranchItemFactory : public filetreeview::BranchItemFactory { public: - virtual filetreeview::FileTreeBranchItem *makeBranchItem( KFileTreeView* view, const KURL& url, const QString& name, const QPixmap& pix ) + virtual filetreeview::FileTreeBranchItem *makeBranchItem( KFileTreeView* view, const KURL& url, const TQString& name, const TQPixmap& pix ) { return new StdFileTreeBranchItem( view, url, name, pix ); } @@ -81,7 +81,7 @@ StdFileTreeWidgetImpl::StdFileTreeWidgetImpl( FileTreeWidget *parent ) setBranchItemFactory( new StdBranchItemFactory ); - parent->addColumn( QString::null ); + parent->addColumn( TQString::null ); header()->hide(); } diff --git a/parts/fileview/vcscolorsconfigwidget.cpp b/parts/fileview/vcscolorsconfigwidget.cpp index 29de36fe..63067c04 100644 --- a/parts/fileview/vcscolorsconfigwidget.cpp +++ b/parts/fileview/vcscolorsconfigwidget.cpp @@ -51,7 +51,7 @@ VCSColors &VCSColors::operator=( const VCSColors &others ) /////////////////////////////////////////////////////////////////////////////// VCSColorsConfigWidget::VCSColorsConfigWidget(FileViewPart *part, const VCSColors &vcsColors, - QWidget* parent, const char* name, WFlags fl) + TQWidget* parent, const char* name, WFlags fl) : VCSColorsConfigWidgetBase( parent, name, fl ), m_part( part ) { setColors( vcsColors ); diff --git a/parts/fileview/vcscolorsconfigwidget.h b/parts/fileview/vcscolorsconfigwidget.h index 60cd4f52..b86038fa 100644 --- a/parts/fileview/vcscolorsconfigwidget.h +++ b/parts/fileview/vcscolorsconfigwidget.h @@ -12,7 +12,7 @@ #ifndef VCSCOLORSCONFIGWIDGET_H #define VCSCOLORSCONFIGWIDGET_H -#include +#include #include "vcscolorsconfigwidgetbase.h" class FileViewPart; @@ -23,15 +23,15 @@ struct VCSColors VCSColors( const VCSColors &others ); VCSColors &operator=( const VCSColors &others ); - QColor modified; - QColor added; - QColor updated; - QColor sticky; - QColor conflict; - QColor needsPatch; - QColor needsCheckout; - QColor unknown; - QColor defaultColor; + TQColor modified; + TQColor added; + TQColor updated; + TQColor sticky; + TQColor conflict; + TQColor needsPatch; + TQColor needsCheckout; + TQColor unknown; + TQColor defaultColor; }; class VCSColorsConfigWidget : public VCSColorsConfigWidgetBase @@ -40,7 +40,7 @@ class VCSColorsConfigWidget : public VCSColorsConfigWidgetBase public: VCSColorsConfigWidget( FileViewPart *part, const VCSColors &vcsColors, - QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); virtual ~VCSColorsConfigWidget(); /*$PUBLIC_FUNCTIONS$*/ diff --git a/parts/fileview/vcsfiletreewidgetimpl.cpp b/parts/fileview/vcsfiletreewidgetimpl.cpp index 1db873ed..131c2b4f 100644 --- a/parts/fileview/vcsfiletreewidgetimpl.cpp +++ b/parts/fileview/vcsfiletreewidgetimpl.cpp @@ -9,9 +9,9 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include #include @@ -46,26 +46,26 @@ public: : FileTreeViewItem( parent, item, branch, pf ), m_statusColor( &FileViewPart::vcsColors.unknown ) {} VCSFileTreeViewItem( KFileTreeView* parent, KFileItem* item, KFileTreeBranch* branch ) : FileTreeViewItem( parent, item, branch ), m_statusColor( &FileViewPart::vcsColors.unknown ) {} - virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment ) + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment ) { // paint cell in a different color depending on VCS state - QColorGroup mycg( cg ); - mycg.setColor( QColorGroup::Base, *m_statusColor ); + TQColorGroup mycg( cg ); + mycg.setColor( TQColorGroup::Base, *m_statusColor ); FileTreeViewItem::paintCell( p, mycg, column, width, alignment ); } void setVCSInfo( const VCSFileInfo &info ); - QString fileName() const { return text( FILENAME_COLUMN ); } - QString workingRev() const { return text( WORKREVISION_COLUMN ); } - QString repositoryRev() const { return text( REPOREVISION_COLUMN ); } - QString status() const { return text( STATUS_COLUMN ); } - void setFileName( const QString &p ) { setText( FILENAME_COLUMN, p ); } - void setWorkingRev( const QString &p ) { setText( WORKREVISION_COLUMN, p ); } - void setRepositoryRev( const QString &p ) { setText( REPOREVISION_COLUMN, p ); } + TQString fileName() const { return text( FILENAME_COLUMN ); } + TQString workingRev() const { return text( WORKREVISION_COLUMN ); } + TQString repositoryRev() const { return text( REPOREVISION_COLUMN ); } + TQString status() const { return text( STATUS_COLUMN ); } + void setFileName( const TQString &p ) { setText( FILENAME_COLUMN, p ); } + void setWorkingRev( const TQString &p ) { setText( WORKREVISION_COLUMN, p ); } + void setRepositoryRev( const TQString &p ) { setText( REPOREVISION_COLUMN, p ); } void setStatus( const VCSFileInfo::FileState status ); private: - QColor *m_statusColor; // cached + TQColor *m_statusColor; // cached }; /////////////////////////////////////////////////////////////////////////////// @@ -126,7 +126,7 @@ void VCSFileTreeViewItem::setStatus( const VCSFileInfo::FileState status ) class VCSFileTreeBranchItem : public filetreeview::FileTreeBranchItem { public: - VCSFileTreeBranchItem( KFileTreeView* view, const KURL& url, const QString& name, const QPixmap& pix, + VCSFileTreeBranchItem( KFileTreeView* view, const KURL& url, const TQString& name, const TQPixmap& pix, KDevVCSFileInfoProvider *vcsInfoProvider ) : FileTreeBranchItem( view, url, name, pix ), m_vcsInfoProvider( vcsInfoProvider ) {} // virtual ~VCSFileTreeBranchItem() {} @@ -150,8 +150,8 @@ KFileTreeViewItem* VCSFileTreeBranchItem::createTreeViewItem( KFileTreeViewItem* VCSFileTreeViewItem *newItem = new VCSFileTreeViewItem( parent, fileItem, this, isDirectory ); -// QString fileName = fileURL.fileName(); -// QString dirName = URLUtil::extractPathNameRelative( lv->projectDirectory(), fileURL.directory() ); +// TQString fileName = fileURL.fileName(); +// TQString dirName = URLUtil::extractPathNameRelative( lv->projectDirectory(), fileURL.directory() ); // const VCSFileInfoMap &vcsFiles = *m_vcsInfoProvider->status( dirName ); // kdDebug(9017) << "Dir has " << vcsFiles.count() << " registered files!" << endl; @@ -170,7 +170,7 @@ class VCSBranchItemFactory : public filetreeview::BranchItemFactory { public: VCSBranchItemFactory( KDevVCSFileInfoProvider *vcsInfoProvider ) : m_vcsInfoProvider( vcsInfoProvider ) {} - virtual filetreeview::FileTreeBranchItem *makeBranchItem( KFileTreeView* view, const KURL& url, const QString& name, const QPixmap& pix ) + virtual filetreeview::FileTreeBranchItem *makeBranchItem( KFileTreeView* view, const KURL& url, const TQString& name, const TQPixmap& pix ) { return new VCSFileTreeBranchItem( view, url, name, pix, m_vcsInfoProvider ); } @@ -198,27 +198,27 @@ VCSFileTreeWidgetImpl::VCSFileTreeWidgetImpl( FileTreeWidget *parent, KDevVCSFil parent->addColumn( "Work" ); parent->addColumn( "Repo" ); - connect( m_vcsInfoProvider, SIGNAL(statusReady(const VCSFileInfoMap&, void *)), - this, SLOT(vcsDirStatusReady(const VCSFileInfoMap&, void*)) ); + connect( m_vcsInfoProvider, TQT_SIGNAL(statusReady(const VCSFileInfoMap&, void *)), + this, TQT_SLOT(vcsDirStatusReady(const VCSFileInfoMap&, void*)) ); // Harakiri itself if the infoProvider object is destroyed since we cannot work anymore :-( - connect( m_vcsInfoProvider, SIGNAL(destroyed()), SIGNAL(implementationInvalidated()) ); + connect( m_vcsInfoProvider, TQT_SIGNAL(destroyed()), TQT_SIGNAL(implementationInvalidated()) ); m_actionToggleShowVCSFields = new KToggleAction( i18n("Show VCS Fields"), KShortcut(), this, "actiontoggleshowvcsfieldstoggleaction" ); m_actionToggleShowVCSFields->setCheckedState(i18n("Hide VCS Fields")); - QString aboutAction = i18n("Show VCS fields

Shows Revision and Timestamp for each file contained in VCS repository."); + TQString aboutAction = i18n("Show VCS fields

Shows Revision and Timestamp for each file contained in VCS repository."); m_actionToggleShowVCSFields->setWhatsThis( aboutAction ); - connect( m_actionToggleShowVCSFields, SIGNAL(toggled(bool)), this, SLOT(slotToggleShowVCSFields(bool)) ); + connect( m_actionToggleShowVCSFields, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggleShowVCSFields(bool)) ); m_actionSyncWithRepository = new KAction( i18n( "Sync with Repository"), KShortcut(), - this, SLOT(slotSyncWithRepository()), this, "actionsyncwithrepository" ); + this, TQT_SLOT(slotSyncWithRepository()), this, "actionsyncwithrepository" ); aboutAction = i18n("Sync with repository

Synchronize file status with remote repository."); m_actionSyncWithRepository->setWhatsThis( aboutAction ); - QDomDocument &dom = projectDom(); + TQDomDocument &dom = projectDom(); m_actionToggleShowVCSFields->setChecked( DomUtil::readBoolEntry(dom, "/kdevfileview/tree/showvcsfields") ); slotToggleShowVCSFields( showVCSFields() ); // show or hide fields depending on read settings - connect( parent, SIGNAL(expanded(QListViewItem*)), this, SLOT(slotDirectoryExpanded(QListViewItem*))); + connect( parent, TQT_SIGNAL(expanded(TQListViewItem*)), this, TQT_SLOT(slotDirectoryExpanded(TQListViewItem*))); } /////////////////////////////////////////////////////////////////////////////// @@ -227,7 +227,7 @@ VCSFileTreeWidgetImpl::~VCSFileTreeWidgetImpl() { kdDebug(9017) << "VCSFileTreeWidgetImpl::~VCSFileTreeWidgetImpl()" << endl; - QDomDocument &dom = projectDom(); + TQDomDocument &dom = projectDom(); DomUtil::writeBoolEntry( dom, "/kdevfileview/tree/showvcsfields", showVCSFields() ); } @@ -240,7 +240,7 @@ bool VCSFileTreeWidgetImpl::canReloadTree() const /////////////////////////////////////////////////////////////////////////////// -void VCSFileTreeWidgetImpl::fillPopupMenu( QPopupMenu *popupMenu, QListViewItem *item ) const +void VCSFileTreeWidgetImpl::fillPopupMenu( TQPopupMenu *popupMenu, TQListViewItem *item ) const { FileTreeViewWidgetImpl::fillPopupMenu( popupMenu, item ); @@ -306,7 +306,7 @@ void VCSFileTreeWidgetImpl::vcsDirStatusReady( const VCSFileInfoMap &modifiedFil item = static_cast( item->firstChild() ); while (item) { - const QString fileName = item->fileName(); + const TQString fileName = item->fileName(); kdDebug(9017) << "Widget item filename is: " << fileName << endl; if (modifiedFiles.contains( fileName )) { @@ -329,7 +329,7 @@ void VCSFileTreeWidgetImpl::slotSyncWithRepository() { kdDebug(9017) << "VCSFileTreeWidgetImpl::slotSyncWithRepository()" << endl; const VCSFileTreeViewItem *myFileItem = static_cast( m_vcsStatusRequestedItem ); - const QString relDirPath = URLUtil::extractPathNameRelative( projectDirectory(), myFileItem->fileItem()->url().path() ); + const TQString relDirPath = URLUtil::extractPathNameRelative( projectDirectory(), myFileItem->fileItem()->url().path() ); kdDebug(9017) << "VCS Info requested for: " << relDirPath << endl; m_vcsInfoProvider->requestStatus( relDirPath, m_vcsStatusRequestedItem ); m_isSyncingWithRepository = true; @@ -337,12 +337,12 @@ void VCSFileTreeWidgetImpl::slotSyncWithRepository() /////////////////////////////////////////////////////////////////////////////// -void VCSFileTreeWidgetImpl::slotDirectoryExpanded( QListViewItem* aItem ) +void VCSFileTreeWidgetImpl::slotDirectoryExpanded( TQListViewItem* aItem ) { VCSFileTreeViewItem *item = static_cast( aItem ); if( !item ) return; - const QString relDirPath = URLUtil::extractPathNameRelative( projectDirectory(), item->fileItem()->url().path() ); + const TQString relDirPath = URLUtil::extractPathNameRelative( projectDirectory(), item->fileItem()->url().path() ); kdDebug(9017) << "ASync VCS Info requested for: " << relDirPath << endl; m_vcsInfoProvider->requestStatus( relDirPath, item, false, false ); diff --git a/parts/fileview/vcsfiletreewidgetimpl.h b/parts/fileview/vcsfiletreewidgetimpl.h index de4dc8c1..7a6761a9 100644 --- a/parts/fileview/vcsfiletreewidgetimpl.h +++ b/parts/fileview/vcsfiletreewidgetimpl.h @@ -37,7 +37,7 @@ public: /* * Add "sync with repository" and "show VCS fields" options to the context menu. */ - virtual void fillPopupMenu( QPopupMenu *popupMenu, QListViewItem *item ) const; + virtual void fillPopupMenu( TQPopupMenu *popupMenu, TQListViewItem *item ) const; private slots: //! show/hide the header and the additional fields (status and versions) @@ -50,7 +50,7 @@ private slots: //! the items which are childs of the @see filetreeview::FileTreeViewItem stored in //! @p callerData. void vcsDirStatusReady( const VCSFileInfoMap &modifiedFiles, void *callerData ); - void slotDirectoryExpanded( QListViewItem* ); + void slotDirectoryExpanded( TQListViewItem* ); private: bool showVCSFields() const; -- cgit v1.2.1