diff options
Diffstat (limited to 'parts/filelist')
-rw-r--r-- | parts/filelist/fileinfo.h | 6 | ||||
-rw-r--r-- | parts/filelist/filelist_item.cpp | 24 | ||||
-rw-r--r-- | parts/filelist/filelist_item.h | 14 | ||||
-rw-r--r-- | parts/filelist/filelist_widget.cpp | 70 | ||||
-rw-r--r-- | parts/filelist/filelist_widget.h | 20 | ||||
-rw-r--r-- | parts/filelist/projectviewconfig.cpp | 4 | ||||
-rw-r--r-- | parts/filelist/projectviewconfig.h | 2 | ||||
-rw-r--r-- | parts/filelist/projectviewpart.cpp | 126 | ||||
-rw-r--r-- | parts/filelist/projectviewpart.h | 42 | ||||
-rw-r--r-- | parts/filelist/projectviewprojectconfig.cpp | 2 | ||||
-rw-r--r-- | parts/filelist/projectviewprojectconfig.h | 2 | ||||
-rw-r--r-- | parts/filelist/toolbarguibuilder.cpp | 10 | ||||
-rw-r--r-- | parts/filelist/toolbarguibuilder.h | 8 |
13 files changed, 165 insertions, 165 deletions
diff --git a/parts/filelist/fileinfo.h b/parts/filelist/fileinfo.h index 845e68e4..8c0e06d5 100644 --- a/parts/filelist/fileinfo.h +++ b/parts/filelist/fileinfo.h @@ -23,7 +23,7 @@ struct FileInfo { FileInfo() {url = KURL(); line = -1; col = -1; encoding = "";}; - FileInfo(const KURL & _url, int _line = -1, int _col = -1, QString _encoding = "") + FileInfo(const KURL & _url, int _line = -1, int _col = -1, TQString _encoding = "") {url = _url; line = _line; col = _col; encoding = _encoding;}; bool operator==(const FileInfo & f) const {return (f.url == url) /*&& (f.line == line) && (f.col ==col)*/;}; @@ -31,7 +31,7 @@ struct FileInfo KURL url; int line; int col; - QString encoding; + TQString encoding; }; -typedef QValueList<FileInfo> FileInfoList; +typedef TQValueList<FileInfo> FileInfoList; diff --git a/parts/filelist/filelist_item.cpp b/parts/filelist/filelist_item.cpp index d528cc2c..07817479 100644 --- a/parts/filelist/filelist_item.cpp +++ b/parts/filelist/filelist_item.cpp @@ -10,8 +10,8 @@ ***************************************************************************/ #include <kiconloader.h> -#include <qfontmetrics.h> -#include <qfileinfo.h> +#include <tqfontmetrics.h> +#include <tqfileinfo.h> #include "filelist_item.h" @@ -20,8 +20,8 @@ FileListItem * FileListItem::s_activeItem = 0; -FileListItem::FileListItem( QListView * parent, KURL const & url, DocumentState state ) - : QListViewItem( parent, url.fileName() ), +FileListItem::FileListItem( TQListView * parent, KURL const & url, DocumentState state ) + : TQListViewItem( parent, url.fileName() ), _url( url ) { @@ -64,19 +64,19 @@ void FileListItem::setState( DocumentState state ) void FileListItem::setHeight( int ) { - QListViewItem::setHeight( KIcon::SizeSmall > listView()->fontMetrics().height() ? KIcon::SizeSmall : listView()->fontMetrics().height() ); + TQListViewItem::setHeight( KIcon::SizeSmall > listView()->fontMetrics().height() ? KIcon::SizeSmall : listView()->fontMetrics().height() ); } -void FileListItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ) +void FileListItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) { - QColorGroup mcg = cg; + TQColorGroup mcg = cg; if ( isActive() ) { - mcg.setColor( QColorGroup::Base, Qt::yellow ); + mcg.setColor( TQColorGroup::Base, Qt::yellow ); } - QListViewItem::paintCell( p, mcg, column, width, align ); + TQListViewItem::paintCell( p, mcg, column, width, align ); } bool FileListItem::isActive( ) @@ -90,10 +90,10 @@ void FileListItem::setActive( FileListItem * item ) s_activeItem = item; } -int FileListItem::compare( QListViewItem * i, int col, bool ascending ) const +int FileListItem::compare( TQListViewItem * i, int col, bool ascending ) const { - QFileInfo info1( key( col, ascending ) ); //this - QFileInfo info2( i->key( col, ascending ) ); //that + TQFileInfo info1( key( col, ascending ) ); //this + TQFileInfo info2( i->key( col, ascending ) ); //that int fileComp = info1.fileName().compare( info2.fileName() ); if ( fileComp != 0 ) return fileComp; diff --git a/parts/filelist/filelist_item.h b/parts/filelist/filelist_item.h index 2b4019b8..7f9f7965 100644 --- a/parts/filelist/filelist_item.h +++ b/parts/filelist/filelist_item.h @@ -13,8 +13,8 @@ #define __FILELIST_ITEM_H__ -#include <qlistview.h> -#include <qpixmap.h> +#include <tqlistview.h> +#include <tqpixmap.h> #include <kurl.h> @@ -23,7 +23,7 @@ class FileListItem : public QListViewItem { public: - FileListItem( QListView * parent, KURL const & url, DocumentState = Clean ); + FileListItem( TQListView * parent, KURL const & url, DocumentState = Clean ); KURL url(); @@ -33,14 +33,14 @@ public: bool isActive(); static void setActive( FileListItem * item ); - virtual int compare( QListViewItem * i, int col, bool ascending ) const; + virtual int compare( TQListViewItem * i, int col, bool ascending ) const; private: - virtual void setHeight( int ); // override of QListViewItem::setHeight() - virtual void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ); // override of QListViewItem::paintCell() + virtual void setHeight( int ); // override of TQListViewItem::setHeight() + virtual void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ); // override of TQListViewItem::paintCell() KURL _url; DocumentState _state; - QPixmap _icon; + TQPixmap _icon; static FileListItem * s_activeItem; diff --git a/parts/filelist/filelist_widget.cpp b/parts/filelist/filelist_widget.cpp index 2ef03968..6f494f93 100644 --- a/parts/filelist/filelist_widget.cpp +++ b/parts/filelist/filelist_widget.cpp @@ -11,8 +11,8 @@ * * ***************************************************************************/ -#include <qheader.h> -#include <qpixmap.h> +#include <tqheader.h> +#include <tqpixmap.h> #include <kparts/part.h> #include <klibloader.h> @@ -34,37 +34,37 @@ * @param part * @return */ -FileListWidget::FileListWidget(ProjectviewPart *part, QWidget *parent) - : KListView(parent), QToolTip( viewport() ), _part( part ) +FileListWidget::FileListWidget(ProjectviewPart *part, TQWidget *parent) + : KListView(parent), TQToolTip( viewport() ), _part( part ) { addColumn( "" ); header()->hide(); setRootIsDecorated( false ); - setResizeMode( QListView::LastColumn ); + setResizeMode( TQListView::LastColumn ); setAllColumnsShowFocus( true ); - setSelectionMode( QListView::Extended ); + setSelectionMode( TQListView::Extended ); -// connect( _part->partController(), SIGNAL( partAdded(KParts::Part*) ), this, SLOT(partAdded(KParts::Part*)) ); -// connect( _part->partController(), SIGNAL( partRemoved(KParts::Part*) ), this, SLOT(partRemoved()) ); - connect( _part->partController(), SIGNAL( partAdded(KParts::Part*) ), this, SLOT(startRefreshTimer()) ); - connect( _part->partController(), SIGNAL( partRemoved(KParts::Part*) ), this, SLOT(startRefreshTimer()) ); - connect( _part->partController(), SIGNAL( activePartChanged(KParts::Part*) ), this, SLOT( activePartChanged(KParts::Part* )) ); +// connect( _part->partController(), TQT_SIGNAL( partAdded(KParts::Part*) ), this, TQT_SLOT(partAdded(KParts::Part*)) ); +// connect( _part->partController(), TQT_SIGNAL( partRemoved(KParts::Part*) ), this, TQT_SLOT(partRemoved()) ); + connect( _part->partController(), TQT_SIGNAL( partAdded(KParts::Part*) ), this, TQT_SLOT(startRefreshTimer()) ); + connect( _part->partController(), TQT_SIGNAL( partRemoved(KParts::Part*) ), this, TQT_SLOT(startRefreshTimer()) ); + connect( _part->partController(), TQT_SIGNAL( activePartChanged(KParts::Part*) ), this, TQT_SLOT( activePartChanged(KParts::Part* )) ); - connect( this, SIGNAL( executed( QListViewItem * ) ), this, SLOT( itemClicked( QListViewItem * ) ) ); - connect( this, SIGNAL( returnPressed( QListViewItem * ) ), this, SLOT( itemClicked( QListViewItem * ) ) ); + connect( this, TQT_SIGNAL( executed( TQListViewItem * ) ), this, TQT_SLOT( itemClicked( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), this, TQT_SLOT( itemClicked( TQListViewItem * ) ) ); - connect( this, SIGNAL( contextMenuRequested ( QListViewItem *, const QPoint & , int ) ), - this, SLOT( popupMenu(QListViewItem *, const QPoint & , int ) ) ); + connect( this, TQT_SIGNAL( contextMenuRequested ( TQListViewItem *, const TQPoint & , int ) ), + this, TQT_SLOT( popupMenu(TQListViewItem *, const TQPoint & , int ) ) ); - connect( _part->partController(), SIGNAL(documentChangedState(const KURL &, DocumentState)), - this, SLOT(documentChangedState(const KURL&, DocumentState )) ); + connect( _part->partController(), TQT_SIGNAL(documentChangedState(const KURL &, DocumentState)), + this, TQT_SLOT(documentChangedState(const KURL&, DocumentState )) ); - connect( _part->partController(), SIGNAL(partURLChanged(KParts::ReadOnlyPart * )), this, SLOT(refreshFileList()) ); + connect( _part->partController(), TQT_SIGNAL(partURLChanged(KParts::ReadOnlyPart * )), this, TQT_SLOT(refreshFileList()) ); setItemMargin(10); - connect( &m_refreshTimer, SIGNAL(timeout()), this, SLOT(refreshFileList()) ); + connect( &m_refreshTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(refreshFileList()) ); startRefreshTimer(); } @@ -78,17 +78,17 @@ void FileListWidget::startRefreshTimer( ) m_refreshTimer.start( 100, true ); } -void FileListWidget::maybeTip( QPoint const & p ) +void FileListWidget::maybeTip( TQPoint const & p ) { FileListItem * item = static_cast<FileListItem*>( itemAt( p ) ); - QRect r = itemRect( item ); + TQRect r = itemRect( item ); if ( item && r.isValid() ) { - const QPixmap * pixmap = item->pixmap(0); + const TQPixmap * pixmap = item->pixmap(0); if ( pixmap && ( p.x() <= pixmap->width() ) ) { - QString message; + TQString message; switch( item->state() ) { case Modified: @@ -129,13 +129,13 @@ FileListItem * FileListWidget::itemForURL( KURL const & url ) void FileListWidget::refreshFileList( ) { - QStringList selections = storeSelections(); + TQStringList selections = storeSelections(); int scrollbarPos = verticalScrollBar()->value(); KListView::clear(); KURL::List list = _part->partController()->openURLs(); - QValueListIterator<KURL> it = list.begin(); + TQValueListIterator<KURL> it = list.begin(); while ( it != list.end() ) { FileListItem * item = new FileListItem( this, *it ); @@ -184,7 +184,7 @@ void FileListWidget::partRemoved() } */ -void FileListWidget::itemClicked( QListViewItem * item ) +void FileListWidget::itemClicked( TQListViewItem * item ) { if ( !item ) return; @@ -220,15 +220,15 @@ void FileListWidget::documentChangedState( const KURL & url, DocumentState state } } -void FileListWidget::popupMenu( QListViewItem * item, const QPoint & p, int ) +void FileListWidget::popupMenu( TQListViewItem * item, const TQPoint & p, int ) { if ( item ) { KPopupMenu popup; popup.insertTitle( i18n("File List") ); - popup.insertItem( i18n("Close Selected"), this, SLOT(closeSelectedFiles()) ); - popup.insertItem( i18n("Save Selected"), this, SLOT(saveSelectedFiles()) ); - popup.insertItem( i18n("Reload Selected"), this, SLOT(reloadSelectedFiles()) ); + popup.insertItem( i18n("Close Selected"), this, TQT_SLOT(closeSelectedFiles()) ); + popup.insertItem( i18n("Save Selected"), this, TQT_SLOT(saveSelectedFiles()) ); + popup.insertItem( i18n("Reload Selected"), this, TQT_SLOT(reloadSelectedFiles()) ); FileContext context( getSelectedURLs() ); _part->core()->fillContextMenu( &popup, &context ); @@ -267,10 +267,10 @@ void FileListWidget::reloadSelectedFiles( ) _part->partController()->revertFiles( getSelectedURLs() ); } -QStringList FileListWidget::storeSelections() +TQStringList FileListWidget::storeSelections() { - QStringList list; - QListViewItem * item = firstChild(); + TQStringList list; + TQListViewItem * item = firstChild(); while ( item ) { if ( item->isSelected() ) @@ -282,9 +282,9 @@ QStringList FileListWidget::storeSelections() return list; } -void FileListWidget::restoreSelections(const QStringList & list) +void FileListWidget::restoreSelections(const TQStringList & list) { - QListViewItem * item = firstChild(); + TQListViewItem * item = firstChild(); while ( item ) { if ( list.contains( item->text(0) ) ) diff --git a/parts/filelist/filelist_widget.h b/parts/filelist/filelist_widget.h index 5895103b..d30aa6f6 100644 --- a/parts/filelist/filelist_widget.h +++ b/parts/filelist/filelist_widget.h @@ -19,9 +19,9 @@ #include <kurl.h> #include <kdevpartcontroller.h> // for DocumentState -#include <qstring.h> -#include <qtooltip.h> -#include <qtimer.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqtimer.h> #include "projectviewpart.h" @@ -36,32 +36,32 @@ class FileListWidget : public KListView, public QToolTip public: - FileListWidget(ProjectviewPart *part, QWidget *parent=0); + FileListWidget(ProjectviewPart *part, TQWidget *parent=0); ~FileListWidget(); protected: - void maybeTip( QPoint const & ); + void maybeTip( TQPoint const & ); private slots: // void partAdded(KParts::Part*); // void partRemoved(); void activePartChanged(KParts::Part*); - void itemClicked( QListViewItem * ); - void popupMenu( QListViewItem * , const QPoint & , int ); + void itemClicked( TQListViewItem * ); + void popupMenu( TQListViewItem * , const TQPoint & , int ); void closeSelectedFiles(); void saveSelectedFiles(); void reloadSelectedFiles(); void documentChangedState( const KURL &, DocumentState ); void refreshFileList(); void startRefreshTimer(); - QStringList storeSelections(); - void restoreSelections( const QStringList & list ); + TQStringList storeSelections(); + void restoreSelections( const TQStringList & list ); private: KURL::List getSelectedURLs(); FileListItem * itemForURL( KURL const & url ); - QTimer m_refreshTimer; + TQTimer m_refreshTimer; ProjectviewPart * _part; }; diff --git a/parts/filelist/projectviewconfig.cpp b/parts/filelist/projectviewconfig.cpp index 2c1ca9b8..0f138e1a 100644 --- a/parts/filelist/projectviewconfig.cpp +++ b/parts/filelist/projectviewconfig.cpp @@ -19,13 +19,13 @@ ***************************************************************************/ #include "projectviewconfig.h" -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <kconfig.h> #include <kapplication.h> -ProjectviewConfig::ProjectviewConfig(QWidget *parent, const char *name) +ProjectviewConfig::ProjectviewConfig(TQWidget *parent, const char *name) : ProjectviewConfigBase(parent, name) { KConfig * config = kapp->config(); diff --git a/parts/filelist/projectviewconfig.h b/parts/filelist/projectviewconfig.h index 447e645b..44195ab0 100644 --- a/parts/filelist/projectviewconfig.h +++ b/parts/filelist/projectviewconfig.h @@ -28,7 +28,7 @@ class ProjectviewConfig: public ProjectviewConfigBase { Q_OBJECT public: - ProjectviewConfig(QWidget *parent = 0, const char *name = 0); + ProjectviewConfig(TQWidget *parent = 0, const char *name = 0); public slots: void accept(); diff --git a/parts/filelist/projectviewpart.cpp b/parts/filelist/projectviewpart.cpp index 9313e7ef..91b46b53 100644 --- a/parts/filelist/projectviewpart.cpp +++ b/parts/filelist/projectviewpart.cpp @@ -24,17 +24,17 @@ #include "filelist_widget.h" #include "toolbarguibuilder.h" -#include <qtimer.h> -#include <qpopupmenu.h> -#include <qwhatsthis.h> -#include <qvaluelist.h> -#include <qmap.h> -#include <qdir.h> -#include <qdom.h> -#include <qvbox.h> -#include <qhbox.h> -#include <qpoint.h> -#include <qlayout.h> +#include <tqtimer.h> +#include <tqpopupmenu.h> +#include <tqwhatsthis.h> +#include <tqvaluelist.h> +#include <tqmap.h> +#include <tqdir.h> +#include <tqdom.h> +#include <tqvbox.h> +#include <tqhbox.h> +#include <tqpoint.h> +#include <tqlayout.h> #include <kmainwindow.h> #include <kinputdialog.h> @@ -68,7 +68,7 @@ K_EXPORT_COMPONENT_FACTORY(libkdevfilelist, projectviewFactory(data)) #define GLOBALDOC_OPTIONS 1 #define PROJECTDOC_OPTIONS 2 -ProjectviewPart::ProjectviewPart(QObject *parent, const char *name, const QStringList &/*args*/) +ProjectviewPart::ProjectviewPart(TQObject *parent, const char *name, const TQStringList &/*args*/) : KDevPlugin(&data, parent, name ? name : "FileListPart") { setInstance(projectviewFactory::instance()); @@ -79,26 +79,26 @@ ProjectviewPart::ProjectviewPart(QObject *parent, const char *name, const QStrin m_configProxy->createGlobalConfigPage(i18n("File List"), GLOBALDOC_OPTIONS, info()->icon()); m_configProxy->createProjectConfigPage(i18n("File List"), PROJECTDOC_OPTIONS, info()->icon()); - connect(m_configProxy, SIGNAL(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int)), - this, SLOT(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int))); + connect(m_configProxy, TQT_SIGNAL(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int)), + this, TQT_SLOT(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int))); - connect(core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), - this, SLOT(contextMenu(QPopupMenu *, const Context *))); + connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), + this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); - connect(core(), SIGNAL(projectOpened()), this, SLOT(projectOpened())); - connect(core(), SIGNAL(projectClosed()), this, SLOT(projectClosed())); + connect(core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened())); + connect(core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed())); KConfig * config = kapp->config(); config->setGroup("File List Plugin"); if (config->readBoolEntry("ToolbarInToolview", true)) { - m_toolbarWidget = new QVBox(0, "toolbarContainer"); + m_toolbarWidget = new TQVBox(0, "toolbarContainer"); m_toolbarWidget->setHidden(true); m_guibuilder = new ToolbarGUIBuilder(m_toolbarWidget, mainWindow()->main()); setClientBuilder(m_guibuilder); } m_restored = false; - QTimer::singleShot(0, this, SLOT(init())); + TQTimer::singleShot(0, this, TQT_SLOT(init())); } ProjectviewPart::~ProjectviewPart() @@ -111,7 +111,7 @@ ProjectviewPart::~ProjectviewPart() } } -void ProjectviewPart::restorePartialProjectSession(const QDomElement * el) +void ProjectviewPart::restorePartialProjectSession(const TQDomElement * el) { m_projectViews.clear(); // remove the global views m_restored = true; @@ -120,7 +120,7 @@ void ProjectviewPart::restorePartialProjectSession(const QDomElement * el) return; } // get the base of the project - QString urlStr = project()->projectDirectory(); + TQString urlStr = project()->projectDirectory(); if (KURL::isRelativeURL(urlStr)) { m_projectBase.setProtocol("file"); @@ -132,28 +132,28 @@ void ProjectviewPart::restorePartialProjectSession(const QDomElement * el) m_projectBase.adjustPath(+1); // just in case // read all the views - QDomNodeList domList = el->elementsByTagName("projectview"); + TQDomNodeList domList = el->elementsByTagName("projectview"); uint len = domList.length(); for (uint i = 0; i < len; ++i) { - const QDomElement viewEl = domList.item(i).toElement(); + const TQDomElement viewEl = domList.item(i).toElement(); if (viewEl.isNull()) { continue; } FileInfoList urlList; - QDomNodeList fileList = viewEl.elementsByTagName("file"); + TQDomNodeList fileList = viewEl.elementsByTagName("file"); uint len2 = fileList.length(); for (uint i2 = 0; i2 < len2; ++i2) { - const QDomElement fileEl = fileList.item(i2).toElement(); + const TQDomElement fileEl = fileList.item(i2).toElement(); if (!fileEl.isNull()) { bool ok; int line = -1; - QString attr = fileEl.attribute("line"); + TQString attr = fileEl.attribute("line"); if (! attr.isNull()) { line = attr.toInt(&ok); @@ -168,13 +168,13 @@ void ProjectviewPart::restorePartialProjectSession(const QDomElement * el) if (!ok) col = -1; } - QString encoding = ""; + TQString encoding = ""; attr = fileEl.attribute("encoding"); if (! attr.isNull()) { encoding = attr; } - QString urlStr = fileEl.attribute("url"); + TQString urlStr = fileEl.attribute("url"); if (KURL::isRelativeURL(urlStr)) { KURL url = m_projectBase; @@ -201,13 +201,13 @@ void ProjectviewPart::restorePartialProjectSession(const QDomElement * el) } } -void ProjectviewPart::savePartialProjectSession(QDomElement * el) +void ProjectviewPart::savePartialProjectSession(TQDomElement * el) { if (!el || m_projectViews.empty()) { return; } - QDomDocument domDoc = el->ownerDocument(); + TQDomDocument domDoc = el->ownerDocument(); if (domDoc.isNull()) { return; @@ -217,12 +217,12 @@ void ProjectviewPart::savePartialProjectSession(QDomElement * el) for (it = m_projectViews.constBegin(); it != m_projectViews.constEnd(); ++it) { // we create the view even if there is no file inside, might be wanted by the user - QDomElement viewEl = domDoc.createElement("projectview"); + TQDomElement viewEl = domDoc.createElement("projectview"); viewEl.setAttribute("name", it.key()); el->appendChild(viewEl); for (FileInfoList::ConstIterator it2 = it.data().constBegin(); it2 != it.data().constEnd(); ++it2) { - QDomElement urlEl = domDoc.createElement("file"); + TQDomElement urlEl = domDoc.createElement("file"); if (m_projectBase.isParentOf((*it2).url)) urlEl.setAttribute("url", KURL::relativeURL(m_projectBase, (*it2).url)); @@ -235,7 +235,7 @@ void ProjectviewPart::savePartialProjectSession(QDomElement * el) } } // write the default view - QDomElement defaultEl = domDoc.createElement("defaultview"); + TQDomElement defaultEl = domDoc.createElement("defaultview"); defaultEl.setAttribute("name", m_defaultProjectView); el->appendChild(defaultEl); } @@ -246,24 +246,24 @@ void ProjectviewPart::init() // delayed initialization stuff goes here // create the toolview - m_widget = new QWidget(0, "filelist widget"); + m_widget = new TQWidget(0, "filelist widget"); m_widget->setIcon( SmallIcon(info()->icon()) ); m_widget->setCaption(i18n("File List")); - QBoxLayout * l = new QVBoxLayout(m_widget); + TQBoxLayout * l = new TQVBoxLayout(m_widget); // create the toolbar if needed if (m_guibuilder) { - m_toolbarWidget->reparent(m_widget, QPoint(0, 0), true); + m_toolbarWidget->reparent(m_widget, TQPoint(0, 0), true); l->addWidget(m_toolbarWidget); - QWhatsThis::add(m_toolbarWidget, i18n("<b>View Session Toolbar</b><p>This allows to create and work with view sessions. A view session is a set of open documents.</p>")); + TQWhatsThis::add(m_toolbarWidget, i18n("<b>View Session Toolbar</b><p>This allows to create and work with view sessions. A view session is a set of open documents.</p>")); } // create the listview - QWidget * fileListWidget = new FileListWidget(this, m_widget); + TQWidget * fileListWidget = new FileListWidget(this, m_widget); fileListWidget->setCaption(i18n("File List")); - QWhatsThis::add(fileListWidget, i18n("<b>File List</b><p>This is the list of opened files.</p>")); + TQWhatsThis::add(fileListWidget, i18n("<b>File List</b><p>This is the list of opened files.</p>")); l->addWidget(fileListWidget); m_widget->setFocusProxy(fileListWidget); @@ -277,28 +277,28 @@ void ProjectviewPart::setupActions() { m_openPrjViewAction = new KSelectAction(i18n("Open Session..."), 0, actionCollection(), "viewsession_open"); - connect(m_openPrjViewAction, SIGNAL(activated(const QString &)), this, SLOT(slotOpenProjectView(const QString &))); + connect(m_openPrjViewAction, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotOpenProjectView(const TQString &))); m_openPrjViewAction->setToolTip(i18n("Open Session")); - m_savePrjViewAction = new KAction(i18n("Save Session"), "filesave", 0, this, SLOT(slotSaveProjectView()), actionCollection(), "viewsession_save"); + m_savePrjViewAction = new KAction(i18n("Save Session"), "filesave", 0, this, TQT_SLOT(slotSaveProjectView()), actionCollection(), "viewsession_save"); - m_newPrjViewAction = new KAction(i18n("New Session..."), "filenew", 0, this, SLOT(slotSaveAsProjectView()), actionCollection(), "viewsession_new"); + m_newPrjViewAction = new KAction(i18n("New Session..."), "filenew", 0, this, TQT_SLOT(slotSaveAsProjectView()), actionCollection(), "viewsession_new"); m_deletePrjViewAction = new KSelectAction(i18n("Delete Session"), "editdelete", 0, actionCollection(), "viewsession_delete"); - connect(m_deletePrjViewAction, SIGNAL(activated(const QString &)), this, SLOT(slotDeleteProjectView(const QString &))); + connect(m_deletePrjViewAction, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotDeleteProjectView(const TQString &))); m_deletePrjViewAction->setToolTip(i18n("Delete Session")); - m_deleteCurrentPrjViewAction = new KAction(i18n("Delete Session"), "editdelete", 0, this, SLOT(slotDeleteProjectViewCurent()), actionCollection(), "viewsession_deletecurrent"); + m_deleteCurrentPrjViewAction = new KAction(i18n("Delete Session"), "editdelete", 0, this, TQT_SLOT(slotDeleteProjectViewCurent()), actionCollection(), "viewsession_deletecurrent"); m_deleteCurrentPrjViewAction->setToolTip(i18n("Delete Session")); adjustViewActions(); } -void ProjectviewPart::insertConfigWidget(const KDialogBase *dlg, QWidget *page, unsigned int pageNo) +void ProjectviewPart::insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo) { // create configuraton dialogs here switch (pageNo) @@ -306,19 +306,19 @@ void ProjectviewPart::insertConfigWidget(const KDialogBase *dlg, QWidget *page, case PROJECTDOC_OPTIONS: { ProjectviewProjectConfig *w = new ProjectviewProjectConfig(this, page, "project config"); - connect(dlg, SIGNAL(okClicked()), w, SLOT(accept())); + connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); break; } case GLOBALDOC_OPTIONS: { ProjectviewConfig *w = new ProjectviewConfig(page, "global config"); - connect(dlg, SIGNAL(okClicked()), w, SLOT(accept())); + connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); break; } } } -void ProjectviewPart::contextMenu(QPopupMenu */*popup*/, const Context */*context*/) +void ProjectviewPart::contextMenu(TQPopupMenu */*popup*/, const Context */*context*/) { // put actions into the context menu here // if (context->hasType(Context::EditorContext)) @@ -332,7 +332,7 @@ void ProjectviewPart::contextMenu(QPopupMenu */*popup*/, const Context */*contex // // or create menu items on the fly // // int id = -1; // // id = popup->insertItem(i18n("Do Something Here"), -// // this, SLOT(doSomething())); +// // this, TQT_SLOT(doSomething())); // // popup->setWhatsThis(id, i18n("<b>Do something here</b><p>Describe here what does this action do." // } // else if (context->hasType(Context::FileContext)) @@ -380,7 +380,7 @@ void ProjectviewPart::projectClosed() readConfig(); // read the global project views } -void ProjectviewPart::slotOpenProjectView(const QString &view) +void ProjectviewPart::slotOpenProjectView(const TQString &view) { KConfig * config = kapp->config(); config->setGroup("File List Plugin"); @@ -435,7 +435,7 @@ void ProjectviewPart::slotSaveProjectView() void ProjectviewPart::adjustViewActions() { - QStringList viewList = getViewList(); + TQStringList viewList = getViewList(); m_openPrjViewAction->clear(); m_openPrjViewAction->setItems(viewList); @@ -462,7 +462,7 @@ void ProjectviewPart::slotDeleteProjectViewCurent() slotDeleteProjectView(m_currentProjectView); } -void ProjectviewPart::slotDeleteProjectView(const QString& view) +void ProjectviewPart::slotDeleteProjectView(const TQString& view) { m_projectViews.remove(view); @@ -484,14 +484,14 @@ void ProjectviewPart::slotSaveAsProjectView(bool askForName) if (askForName) { bool ok; - QString newProjectView = KInputDialog::getText(i18n("Save View Session As"), i18n("Enter the name of the session:"), "", &ok, mainWindow()->main()); + TQString newProjectView = KInputDialog::getText(i18n("Save View Session As"), i18n("Enter the name of the session:"), "", &ok, mainWindow()->main()); if (!ok) { return; } newProjectView = newProjectView.remove("="); // we use this string in config files and = would confuse it if (m_projectViews.contains(newProjectView) > 0 && - KMessageBox::warningContinueCancel(mainWindow()->main(), i18n("<qt>A view session named <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>").arg(newProjectView), QString::null, i18n("Overwrite")) != KMessageBox::Continue) + KMessageBox::warningContinueCancel(mainWindow()->main(), i18n("<qt>A view session named <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>").arg(newProjectView), TQString::null, i18n("Overwrite")) != KMessageBox::Continue) { return; } @@ -509,10 +509,10 @@ void ProjectviewPart::slotSaveAsProjectView(bool askForName) KTextEditor::ViewCursorInterface* cursorIf = dynamic_cast<KTextEditor::ViewCursorInterface*>(ro_part->widget()); if (cursorIf) { - QString encoding; + TQString encoding; if ( KTextEditor::EncodingInterface * ei = dynamic_cast<KTextEditor::EncodingInterface*>( ro_part ) ) { - QString temp = ei->encoding(); + TQString temp = ei->encoding(); if ( !temp.isNull() ) { encoding = temp; @@ -544,7 +544,7 @@ void ProjectviewPart::writeConfig() for (it = m_projectViews.constBegin(); it != m_projectViews.constEnd(); ++it) { // we create the view even if there is no file inside, might be wanted by the user - QStringList urls; + TQStringList urls; for (FileInfoList::ConstIterator it2 = it.data().constBegin(); it2 != it.data().constEnd(); ++it2) { if ((*it2).encoding.isEmpty()) @@ -560,18 +560,18 @@ void ProjectviewPart::writeConfig() void ProjectviewPart::readConfig() { KConfig * config = kapp->config(); - QMap<QString, QString> entries = config->entryMap("ProjectViews"); + TQMap<TQString, TQString> entries = config->entryMap("ProjectViews"); m_projectViews.clear(); - QMap<QString, QString>::ConstIterator it; + TQMap<TQString, TQString>::ConstIterator it; for (it = entries.constBegin(); it != entries.constEnd(); ++it) { FileInfoList urlList; - QStringList urls = QStringList::split(",", it.data()); - for (QStringList::Iterator it2 = urls.begin(); it2 != urls.end(); ++it2 ) + TQStringList urls = TQStringList::split(",", it.data()); + for (TQStringList::Iterator it2 = urls.begin(); it2 != urls.end(); ++it2 ) { // search the encoding. The entry can be like: fileURL;encoding - QStringList file = QStringList::split(";", *it2); + TQStringList file = TQStringList::split(";", *it2); if (file.count() == 1) urlList.append(FileInfo(KURL::fromPathOrURL(*it2))); else diff --git a/parts/filelist/projectviewpart.h b/parts/filelist/projectviewpart.h index dd928f8b..741c4534 100644 --- a/parts/filelist/projectviewpart.h +++ b/parts/filelist/projectviewpart.h @@ -23,9 +23,9 @@ #include "fileinfo.h" -#include <qvaluelist.h> -#include <qmap.h> -#include <qguardedptr.h> +#include <tqvaluelist.h> +#include <tqmap.h> +#include <tqguardedptr.h> #include <kdevplugin.h> #include <kurl.h> @@ -58,40 +58,40 @@ class ProjectviewPart: public KDevPlugin Q_OBJECT public: - typedef QMap<QString, FileInfoList> ViewMap; -// typedef QMap<KURL, FileInfo> FileInfoMap; + typedef TQMap<TQString, FileInfoList> ViewMap; +// typedef TQMap<KURL, FileInfo> FileInfoMap; - ProjectviewPart(QObject *parent, const char *name, const QStringList &args); + ProjectviewPart(TQObject *parent, const char *name, const TQStringList &args); ~ProjectviewPart(); // reimplemented from KDevPlugin - void restorePartialProjectSession(const QDomElement * el); - void savePartialProjectSession(QDomElement * el); + void restorePartialProjectSession(const TQDomElement * el); + void savePartialProjectSession(TQDomElement * el); /** * * @return the current defaut view */ - inline QString getDefaultView() const {return m_defaultProjectView;}; + inline TQString getDefaultView() const {return m_defaultProjectView;}; /** * * @param view new default view */ - inline void setDefaultView(const QString& view) {m_defaultProjectView = view;}; + inline void setDefaultView(const TQString& view) {m_defaultProjectView = view;}; /** * get all current views - * @return QStringList of defined views + * @return TQStringList of defined views */ - inline QStringList getViewList() const {return m_projectViews.keys();}; + inline TQStringList getViewList() const {return m_projectViews.keys();}; private slots: void init(); - void insertConfigWidget(const KDialogBase *dlg, QWidget *page, unsigned int pageNo); - void contextMenu(QPopupMenu *popup, const Context *context); + void insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo); + void contextMenu(TQPopupMenu *popup, const Context *context); void projectOpened(); void projectClosed(); @@ -99,7 +99,7 @@ private slots: * * @param view name of the project view */ - void slotDeleteProjectView(const QString &view); + void slotDeleteProjectView(const TQString &view); /** * Deletes the current project view @@ -121,7 +121,7 @@ private slots: * * @param view name of the project view */ - void slotOpenProjectView(const QString &view); + void slotOpenProjectView(const TQString &view); private: /** @@ -152,15 +152,15 @@ private: KSelectAction *m_openPrjViewAction; KSelectAction *m_deletePrjViewAction; - QString m_currentProjectView; - QString m_defaultProjectView; // load this after project loaded + TQString m_currentProjectView; + TQString m_defaultProjectView; // load this after project loaded KURL m_projectBase; // project base folder ConfigWidgetProxy *m_configProxy; - QGuardedPtr<QWidget> m_widget; - QGuardedPtr<ToolbarGUIBuilder> m_guibuilder; - QWidget * m_toolbarWidget; + TQGuardedPtr<TQWidget> m_widget; + TQGuardedPtr<ToolbarGUIBuilder> m_guibuilder; + TQWidget * m_toolbarWidget; bool m_restored; }; diff --git a/parts/filelist/projectviewprojectconfig.cpp b/parts/filelist/projectviewprojectconfig.cpp index 5bcd2427..b411dbbd 100644 --- a/parts/filelist/projectviewprojectconfig.cpp +++ b/parts/filelist/projectviewprojectconfig.cpp @@ -24,7 +24,7 @@ #include "projectviewpart.h" -ProjectviewProjectConfig::ProjectviewProjectConfig(ProjectviewPart *part, QWidget *parent, const char *name) +ProjectviewProjectConfig::ProjectviewProjectConfig(ProjectviewPart *part, TQWidget *parent, const char *name) : ProjectviewProjectConfigBase(parent, name), m_part(part) { kComboDefault->clear(); diff --git a/parts/filelist/projectviewprojectconfig.h b/parts/filelist/projectviewprojectconfig.h index 848f4673..0c36db2f 100644 --- a/parts/filelist/projectviewprojectconfig.h +++ b/parts/filelist/projectviewprojectconfig.h @@ -29,7 +29,7 @@ class ProjectviewProjectConfig: public ProjectviewProjectConfigBase { Q_OBJECT public: - ProjectviewProjectConfig(ProjectviewPart *part, QWidget *parent = 0, const char *name = 0); + ProjectviewProjectConfig(ProjectviewPart *part, TQWidget *parent = 0, const char *name = 0); public slots: void accept(); diff --git a/parts/filelist/toolbarguibuilder.cpp b/parts/filelist/toolbarguibuilder.cpp index c48e7496..b4e1a993 100644 --- a/parts/filelist/toolbarguibuilder.cpp +++ b/parts/filelist/toolbarguibuilder.cpp @@ -22,7 +22,7 @@ #include <ktoolbar.h> -ToolbarGUIBuilder::ToolbarGUIBuilder(QWidget *parent, QWidget *widget) +ToolbarGUIBuilder::ToolbarGUIBuilder(TQWidget *parent, TQWidget *widget) : KXMLGUIBuilder(widget), KToolBar(parent, "ToolbarGUIbuilder"), m_parent(parent) { // setHidden(true); @@ -34,11 +34,11 @@ ToolbarGUIBuilder::~ToolbarGUIBuilder() { } -QWidget * ToolbarGUIBuilder::createContainer(QWidget *parent, int index, const QDomElement &element, int &id) +TQWidget * ToolbarGUIBuilder::createContainer(TQWidget *parent, int index, const TQDomElement &element, int &id) { if (element.tagName().lower() == "toolbar") { - reparent(m_parent, QPoint(0, 0), true); + reparent(m_parent, TQPoint(0, 0), true); return this; } else { @@ -46,12 +46,12 @@ QWidget * ToolbarGUIBuilder::createContainer(QWidget *parent, int index, const Q } } -void ToolbarGUIBuilder::removeContainer(QWidget *container, QWidget *parent, QDomElement &element, int id) +void ToolbarGUIBuilder::removeContainer(TQWidget *container, TQWidget *parent, TQDomElement &element, int id) { if (container == this) { // i need to reparent to prevent a crash - reparent(0, QPoint(0, 0)); + reparent(0, TQPoint(0, 0)); } else KXMLGUIBuilder::removeContainer(container, parent, element, id); diff --git a/parts/filelist/toolbarguibuilder.h b/parts/filelist/toolbarguibuilder.h index 183389dc..ec02c371 100644 --- a/parts/filelist/toolbarguibuilder.h +++ b/parts/filelist/toolbarguibuilder.h @@ -34,23 +34,23 @@ class ToolbarGUIBuilder : public KXMLGUIBuilder, public KToolBar { public: - ToolbarGUIBuilder(QWidget *parent, QWidget *widget); + ToolbarGUIBuilder(TQWidget *parent, TQWidget *widget); virtual ~ToolbarGUIBuilder(); /** * Called when a new XML gui client is added to the gui factory. */ - virtual QWidget *createContainer(QWidget *parent, int index, const QDomElement &element, int &id); + virtual TQWidget *createContainer(TQWidget *parent, int index, const TQDomElement &element, int &id); /** * Called when a XML gui client is removed the gui factory. * Reimplemented from KXMLGUIBuilder in order to remove our custom toolbar. */ - virtual void removeContainer(QWidget *container, QWidget *parent, QDomElement &element, int id); + virtual void removeContainer(TQWidget *container, TQWidget *parent, TQDomElement &element, int id); private: - QWidget * m_parent; + TQWidget * m_parent; }; |