diff options
Diffstat (limited to 'krusader/GUI')
-rw-r--r-- | krusader/GUI/dirhistorybutton.cpp | 18 | ||||
-rw-r--r-- | krusader/GUI/dirhistorybutton.h | 13 | ||||
-rw-r--r-- | krusader/GUI/dirhistoryqueue.cpp | 16 | ||||
-rw-r--r-- | krusader/GUI/dirhistoryqueue.h | 13 | ||||
-rw-r--r-- | krusader/GUI/kcmdline.cpp | 96 | ||||
-rw-r--r-- | krusader/GUI/kcmdline.h | 36 | ||||
-rw-r--r-- | krusader/GUI/kcmdmodebutton.cpp | 10 | ||||
-rw-r--r-- | krusader/GUI/kcmdmodebutton.h | 9 | ||||
-rw-r--r-- | krusader/GUI/kfnkeys.cpp | 86 | ||||
-rw-r--r-- | krusader/GUI/kfnkeys.h | 15 | ||||
-rw-r--r-- | krusader/GUI/krremoteencodingmenu.cpp | 48 | ||||
-rw-r--r-- | krusader/GUI/krremoteencodingmenu.h | 9 | ||||
-rw-r--r-- | krusader/GUI/krusaderstatus.cpp | 10 | ||||
-rw-r--r-- | krusader/GUI/krusaderstatus.h | 15 | ||||
-rw-r--r-- | krusader/GUI/mediabutton.cpp | 210 | ||||
-rw-r--r-- | krusader/GUI/mediabutton.h | 37 | ||||
-rw-r--r-- | krusader/GUI/profilemanager.cpp | 46 | ||||
-rw-r--r-- | krusader/GUI/profilemanager.h | 29 | ||||
-rw-r--r-- | krusader/GUI/syncbrowsebutton.cpp | 4 | ||||
-rw-r--r-- | krusader/GUI/syncbrowsebutton.h | 11 |
20 files changed, 371 insertions, 360 deletions
diff --git a/krusader/GUI/dirhistorybutton.cpp b/krusader/GUI/dirhistorybutton.cpp index 1863782..de3c744 100644 --- a/krusader/GUI/dirhistorybutton.cpp +++ b/krusader/GUI/dirhistorybutton.cpp @@ -19,16 +19,16 @@ #include "dirhistoryqueue.h" #include "../VFS/vfs.h" -#include <qpopupmenu.h> -#include <qdir.h> +#include <tqpopupmenu.h> +#include <tqdir.h> #include <klocale.h> #include <kiconloader.h> #include <kdebug.h> -DirHistoryButton::DirHistoryButton( DirHistoryQueue* hQ, QWidget *parent, const char *name ) : QToolButton( parent, name ) { +DirHistoryButton::DirHistoryButton( DirHistoryQueue* hQ, TQWidget *tqparent, const char *name ) : TQToolButton( tqparent, name ) { KIconLoader * iconLoader = new KIconLoader(); - QPixmap icon = iconLoader->loadIcon( "history", KIcon::Toolbar, 16 ); + TQPixmap icon = iconLoader->loadIcon( "history", KIcon::Toolbar, 16 ); setFixedSize( icon.width() + 4, icon.height() + 4 ); setPixmap( icon ); @@ -36,7 +36,7 @@ DirHistoryButton::DirHistoryButton( DirHistoryQueue* hQ, QWidget *parent, const setPopupDelay( 10 ); // 0.01 seconds press setAcceptDrops( false ); - popupMenu = new QPopupMenu( this ); + popupMenu = new TQPopupMenu( this ); Q_CHECK_PTR( popupMenu ); setPopup( popupMenu ); @@ -44,16 +44,16 @@ DirHistoryButton::DirHistoryButton( DirHistoryQueue* hQ, QWidget *parent, const historyQueue = hQ; - connect( popupMenu, SIGNAL( aboutToShow() ), this, SLOT( slotAboutToShow() ) ); - connect( popupMenu, SIGNAL( activated( int ) ), this, SLOT( slotPopupActivated( int ) ) ); + connect( popupMenu, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotAboutToShow() ) ); + connect( popupMenu, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotPopupActivated( int ) ) ); } DirHistoryButton::~DirHistoryButton() {} void DirHistoryButton::openPopup() { - QPopupMenu * pP = popup(); + TQPopupMenu * pP = popup(); if ( pP ) { - popup() ->exec( mapToGlobal( QPoint( 0, height() ) ) ); + popup() ->exec( mapToGlobal( TQPoint( 0, height() ) ) ); } } /** No descriptions */ diff --git a/krusader/GUI/dirhistorybutton.h b/krusader/GUI/dirhistorybutton.h index 643795a..50bdbf0 100644 --- a/krusader/GUI/dirhistorybutton.h +++ b/krusader/GUI/dirhistorybutton.h @@ -18,27 +18,28 @@ #ifndef DIRHISTORYBUTTON_H #define DIRHISTORYBUTTON_H -#include <qwidget.h> -#include <qtoolbutton.h> +#include <tqwidget.h> +#include <tqtoolbutton.h> #include <kurl.h> -class QPopupMenu; +class TQPopupMenu; class DirHistoryQueue; /** *@author Shie Erlich & Rafi Yanai */ -class DirHistoryButton : public QToolButton { +class DirHistoryButton : public TQToolButton { Q_OBJECT + TQ_OBJECT public: - DirHistoryButton(DirHistoryQueue* hQ, QWidget *parent=0, const char *name=0); + DirHistoryButton(DirHistoryQueue* hQ, TQWidget *tqparent=0, const char *name=0); ~DirHistoryButton(); void openPopup(); private: - QPopupMenu* popupMenu; + TQPopupMenu* popupMenu; DirHistoryQueue* historyQueue; public slots: // Public slots diff --git a/krusader/GUI/dirhistoryqueue.cpp b/krusader/GUI/dirhistoryqueue.cpp index a66d47f..8a6d89e 100644 --- a/krusader/GUI/dirhistoryqueue.cpp +++ b/krusader/GUI/dirhistoryqueue.cpp @@ -23,7 +23,7 @@ DirHistoryQueue::DirHistoryQueue( ListPanel* p ) { panel = p; - connect( panel, SIGNAL( pathChanged( ListPanel* ) ), this, SLOT( slotPathChanged( ListPanel* ) ) ); + connect( panel, TQT_SIGNAL( pathChanged( ListPanel* ) ), this, TQT_SLOT( slotPathChanged( ListPanel* ) ) ); } DirHistoryQueue::~DirHistoryQueue() {} @@ -31,7 +31,7 @@ DirHistoryQueue::~DirHistoryQueue() {} void DirHistoryQueue::slotPathChanged( ListPanel* p ) { KURL url = p->virtualPath(); // already in the queue ? - if( urlQueue.findIndex( url ) >= 0 ){ + if( urlQueue.tqfindIndex( url ) >= 0 ){ // remove it ! urlQueue.remove( url ); } @@ -58,21 +58,21 @@ void DirHistoryQueue::addUrl(const KURL& url){ pathQueue.push_front( path ); } -void DirHistoryQueue::RemovePath( const QString& path ) { - QStringList::iterator it; - it = pathQueue.find( path ); +void DirHistoryQueue::RemovePath( const TQString& path ) { + TQStringList::iterator it; + it = pathQueue.tqfind( path ); if ( it != pathQueue.end() ) { pathQueue.remove( it ); } } -bool DirHistoryQueue::checkPath( const QString& path ) { +bool DirHistoryQueue::checkPath( const TQString& path ) { KURL url( path ); - QString p = url.path(); + TQString p = url.path(); // kdDebug() << "url:" << p << ", file: " << url.fileName() << ", dir: " << url.directory() << endl; if ( url.protocol() == "file" ) { - QDir dir( path ); + TQDir dir( path ); if ( !dir.exists() ) { RemovePath( path ); return false; diff --git a/krusader/GUI/dirhistoryqueue.h b/krusader/GUI/dirhistoryqueue.h index 21665f8..ff8573e 100644 --- a/krusader/GUI/dirhistoryqueue.h +++ b/krusader/GUI/dirhistoryqueue.h @@ -15,10 +15,10 @@ * * ***************************************************************************/ -#ifndef DIRHISTORYQUEUE_H -#define DIRHISTORYQUEUE_H +#ifndef DIRHISTORYTQUEUE_H +#define DIRHISTORYTQUEUE_H -#include <qobject.h> +#include <tqobject.h> #include <kurl.h> class ListPanel; @@ -27,14 +27,15 @@ class ListPanel; *@author Shie Erlich & Rafi Yanai */ -class DirHistoryQueue : public QObject { +class DirHistoryQueue : public TQObject { Q_OBJECT + TQ_OBJECT public: DirHistoryQueue(ListPanel* p); ~DirHistoryQueue(); KURL::List urlQueue; -// bool checkPath(const QString& path); -// void RemovePath(const QString& path); +// bool checkPath(const TQString& path); +// void RemovePath(const TQString& path); public slots: // Public slots /** No descriptions */ diff --git a/krusader/GUI/kcmdline.cpp b/krusader/GUI/kcmdline.cpp index 46e360f..2aeb759 100644 --- a/krusader/GUI/kcmdline.cpp +++ b/krusader/GUI/kcmdline.cpp @@ -32,10 +32,10 @@ #include "kcmdline.h" #include "stdlib.h" #include <unistd.h> -#include <qmessagebox.h> +#include <tqmessagebox.h> #include <kprocess.h> -#include <qiconset.h> -#include <qwhatsthis.h> +#include <tqiconset.h> +#include <tqwhatsthis.h> #include <unistd.h> #include "../krusader.h" #include "../kicons.h" @@ -47,30 +47,30 @@ #include "../krservices.h" #include "../ActionMan/addplaceholderpopup.h" #include "kcmdmodebutton.h" -#include <qdir.h> +#include <tqdir.h> #include <kstandarddirs.h> #include <klocale.h> #include <kglobalsettings.h> -#include <qfontmetrics.h> -#include <qimage.h> -#include <qstringlist.h> -#include <qsizepolicy.h> +#include <tqfontmetrics.h> +#include <tqimage.h> +#include <tqstringlist.h> +#include <tqsizepolicy.h> #include <ktempfile.h> -KCMDLine::KCMDLine( QWidget *parent, const char *name ) : QWidget( parent, name ) { - QGridLayout * layout = new QGridLayout( this, 1, 4 ); - path = new QLabel( this ); - QWhatsThis::add +KCMDLine::KCMDLine( TQWidget *tqparent, const char *name ) : TQWidget( tqparent, name ) { + TQGridLayout * tqlayout = new TQGridLayout( this, 1, 4 ); + path = new TQLabel( this ); + TQWhatsThis::add ( path, i18n( "Name of directory where command will be processed." ) ); - path->setAlignment( Qt::AlignRight ); - path->setFrameStyle( QFrame::Box | QFrame::Sunken ); + path->tqsetAlignment( TQt::AlignRight ); + path->setFrameStyle( TQFrame::Box | TQFrame::Sunken ); path->setLineWidth( 1 ); path->setFont( KGlobalSettings::generalFont() ); - int height = QFontMetrics( KGlobalSettings::generalFont() ).height(); + int height = TQFontMetrics( KGlobalSettings::generalFont() ).height(); height = height + 5*(height > 14) + 6; path->setMaximumHeight( height ); - path->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred)); - layout->addWidget( path, 0, 0 ); + path->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred)); + tqlayout->addWidget( path, 0, 0 ); // and editable command line completion.setMode( KURLCompletion::FileCompletion ); @@ -80,48 +80,48 @@ KCMDLine::KCMDLine( QWidget *parent, const char *name ) : QWidget( parent, name cmdLine->setFont( KGlobalSettings::generalFont() ); cmdLine->setMaximumHeight( height ); cmdLine->setCompletionObject( &completion ); - cmdLine->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed)); + cmdLine->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); // load the history KConfigGroupSaver grpSvr( krConfig, "Private" ); - QStringList list = krConfig->readListEntry( "cmdline history" ); + TQStringList list = krConfig->readListEntry( "cmdline history" ); cmdLine->setHistoryItems( list ); - connect( cmdLine, SIGNAL( returnPressed(const QString &) ), this, SLOT( slotRun() ) ); - connect( cmdLine, SIGNAL( returnPressed(const QString &) ), cmdLine, SLOT( clearEdit() ) ); - connect( cmdLine, SIGNAL( returnToPanel() ), this, SLOT( slotReturnFocus() )); + connect( cmdLine, TQT_SIGNAL( returnPressed(const TQString &) ), this, TQT_SLOT( slotRun() ) ); + connect( cmdLine, TQT_SIGNAL( returnPressed(const TQString &) ), cmdLine, TQT_SLOT( clearEdit() ) ); + connect( cmdLine, TQT_SIGNAL( returnToPanel() ), this, TQT_SLOT( slotReturnFocus() )); - QWhatsThis::add + TQWhatsThis::add ( cmdLine, i18n( "<qt><p>Well, it's actually quite simple: You type your command here and Krusader obeys.</p><p><b>Tip</b>: Move within command line history with <Up> and <Down> arrows.</p></qt>" ) ); - layout->addWidget( cmdLine, 0, 1 ); + tqlayout->addWidget( cmdLine, 0, 1 ); - buttonAddPlaceholder = new QToolButton( this, "ButtonAddPlaceholder" ); + buttonAddPlaceholder = new TQToolButton( this, "ButtonAddPlaceholder" ); buttonAddPlaceholder->setFixedSize(22,20); buttonAddPlaceholder->adjustSize(); buttonAddPlaceholder->setPixmap( SmallIcon( "add" ) ); - connect( buttonAddPlaceholder, SIGNAL( clicked() ), this, SLOT( addPlaceholder() ) ); - QWhatsThis::add( buttonAddPlaceholder, i18n( "Add <b>Placeholders</b> for the selected files in the panel." ) ); + connect( buttonAddPlaceholder, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addPlaceholder() ) ); + TQWhatsThis::add( buttonAddPlaceholder, i18n( "Add <b>Placeholders</b> for the selected files in the panel." ) ); - layout->addWidget( buttonAddPlaceholder, 0, 2 ); + tqlayout->addWidget( buttonAddPlaceholder, 0, 2 ); // a run in terminal button terminal = new KCMDModeButton( this ); - layout->addWidget( terminal, 0, 3 ); + tqlayout->addWidget( terminal, 0, 3 ); - layout->activate(); + tqlayout->activate(); } void KCMDLine::addPlaceholder() { AddPlaceholderPopup popup( this ); - QString exp = popup.getPlaceholder( - buttonAddPlaceholder->mapToGlobal( QPoint( 0, 0) ) + TQString exp = popup.getPlaceholder( + buttonAddPlaceholder->mapToGlobal( TQPoint( 0, 0) ) ); this->addText( exp ); } -void KCMDLine::setCurrent( const QString &p ) { +void KCMDLine::setCurrent( const TQString &p ) { - QString pathName = p; - QFontMetrics fm(path->fontMetrics()); + TQString pathName = p; + TQFontMetrics fm(path->fontMetrics()); int textWidth = fm.width(pathName); int maxWidth = ( cmdLine->width() + path->width() ) * 2 / 5; int letters = p.length() / 2; @@ -143,26 +143,26 @@ void KCMDLine::setCurrent( const QString &p ) { KCMDLine::~KCMDLine() { KConfigGroupSaver grpSvr( krConfig, "Private" ); - QStringList list = cmdLine->historyItems(); + TQStringList list = cmdLine->historyItems(); //krOut << list[0] << endl; krConfig->writeEntry( "cmdline history", list ); krConfig->sync(); } void KCMDLine::slotRun() { - const QString command1(cmdLine->currentText()); + const TQString command1(cmdLine->currentText()); if ( command1.isEmpty() ) return ; - QString panelPath = path->text().left( path->text().length() - 1 ); + TQString panelPath = path->text().left( path->text().length() - 1 ); cmdLine->addToHistory(command1); if ( command1.simplifyWhiteSpace().left( 3 ) == "cd " ) { // cd command effect the active panel - QString dir = command1.right( command1.length() - command1.find( " " ) ).stripWhiteSpace(); + TQString dir = command1.right( command1.length() - command1.tqfind( " " ) ).stripWhiteSpace(); if ( dir == "~" ) - dir = QDir::homeDirPath(); + dir = TQDir::homeDirPath(); else - if ( dir.left( 1 ) != "/" && !dir.contains( ":/" ) ) + if ( dir.left( 1 ) != "/" && !dir.tqcontains( ":/" ) ) dir = panelPath + ( panelPath == "/" ? "" : "/" ) + dir; SLOTS->refresh( dir ); } else { @@ -184,7 +184,7 @@ static const KrActionBase::ExecType execModesMenu[] = { KrActionBase::RunInTE, }; -QString KCMDLine::command() const { +TQString KCMDLine::command() const { return cmdLine->currentText(); } @@ -194,15 +194,15 @@ KrActionBase::ExecType KCMDLine::execType() const { return execModesMenu[i]; } -QString KCMDLine::startpath() const { +TQString KCMDLine::startpath() const { return path->text().left( path->text().length() - 1 ); } -QString KCMDLine::user() const { - return QString(); +TQString KCMDLine::user() const { + return TQString(); } -QString KCMDLine::text() const { +TQString KCMDLine::text() const { return cmdLine->currentText(); } @@ -218,11 +218,11 @@ bool KCMDLine::doSubstitution() const { return true; } -void KCMDLine::setText(QString text) { +void KCMDLine::setText(TQString text) { cmdLine->setCurrentText( text ); } -void KrHistoryCombo::keyPressEvent( QKeyEvent *e ) { +void KrHistoryCombo::keyPressEvent( TQKeyEvent *e ) { switch (e->key()) { case Key_Enter: case Key_Return: diff --git a/krusader/GUI/kcmdline.h b/krusader/GUI/kcmdline.h index 3c13efb..392d6ae 100644 --- a/krusader/GUI/kcmdline.h +++ b/krusader/GUI/kcmdline.h @@ -34,10 +34,10 @@ #define KCMDLINE_H // QT includes -#include <qwidget.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtoolbutton.h> +#include <tqwidget.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtoolbutton.h> // KDE includes #include <klineedit.h> @@ -50,30 +50,32 @@ class KCMDModeButton; class KrHistoryCombo: public KHistoryCombo { Q_OBJECT + TQ_OBJECT public: - KrHistoryCombo(QWidget *parent): KHistoryCombo(parent) {} + KrHistoryCombo(TQWidget *tqparent): KHistoryCombo(tqparent) {} protected: - void keyPressEvent( QKeyEvent *e ); + void keyPressEvent( TQKeyEvent *e ); signals: void returnToPanel(); }; -class KCMDLine : public QWidget, KrActionBase { +class KCMDLine : public TQWidget, KrActionBase { Q_OBJECT + TQ_OBJECT public: - KCMDLine( QWidget *parent = 0, const char *name = 0 ); + KCMDLine( TQWidget *tqparent = 0, const char *name = 0 ); ~KCMDLine(); - void setCurrent( const QString & ); + void setCurrent( const TQString & ); //virtual methods from KrActionBase - void setText(QString text); - QString command() const; + void setText(TQString text); + TQString command() const; ExecType execType() const; - QString startpath() const; - QString user() const; - QString text() const; + TQString startpath() const; + TQString user() const; + TQString text() const; bool acceptURLs() const; bool confirmExecution() const; bool doSubstitution() const; @@ -84,15 +86,15 @@ class KCMDLine : public QWidget, KrActionBase { void slotReturnFocus(); // returns keyboard focus to panel void slotRun(); void addPlaceholder(); - void addText( QString text ) { cmdLine->setCurrentText( cmdLine->currentText() + text ); } + void addText( TQString text ) { cmdLine->setCurrentText( cmdLine->currentText() + text ); } void popup() { cmdLine->popup(); } private: - QLabel *path; + TQLabel *path; KrHistoryCombo *cmdLine; KCMDModeButton *terminal; - QToolButton *buttonAddPlaceholder; + TQToolButton *buttonAddPlaceholder; KShellCompletion completion; }; diff --git a/krusader/GUI/kcmdmodebutton.cpp b/krusader/GUI/kcmdmodebutton.cpp index 46960bc..5e84d1c 100644 --- a/krusader/GUI/kcmdmodebutton.cpp +++ b/krusader/GUI/kcmdmodebutton.cpp @@ -32,11 +32,11 @@ #include <kdebug.h> -KCMDModeButton::KCMDModeButton( QWidget *parent, const char *name ) : QToolButton( parent, name ) { +KCMDModeButton::KCMDModeButton( TQWidget *tqparent, const char *name ) : TQToolButton( tqparent, name ) { setFixedSize( 22, 20 ); /* // from the old terminal-button: setTextLabel( i18n( "If pressed, Krusader executes command line in a terminal." ) ); - QWhatsThis::add( terminal, i18n( + TQWhatsThis::add( terminal, i18n( "The 'run in terminal' button allows Krusader " "to run console (or otherwise non-graphical) " "programs in a terminal of your choice. If it's " @@ -50,7 +50,7 @@ KCMDModeButton::KCMDModeButton( QWidget *parent, const char *name ) : QToolButto { action->insert( *Krusader::execTypeArray[i] ); } - QPopupMenu *pP = action->popupMenu(); + TQPopupMenu *pP = action->popupMenu(); Q_CHECK_PTR( pP ); setPopup( pP ); setPopupDelay( 10 ); @@ -63,9 +63,9 @@ KCMDModeButton::~KCMDModeButton() { /** called when clicked to the button */ void KCMDModeButton::openPopup() { - QPopupMenu * pP = popup(); + TQPopupMenu * pP = popup(); if ( pP ) { - popup() ->exec( mapToGlobal( QPoint( 0, 0 ) ) ); + popup() ->exec( mapToGlobal( TQPoint( 0, 0 ) ) ); } } diff --git a/krusader/GUI/kcmdmodebutton.h b/krusader/GUI/kcmdmodebutton.h index 1da4a79..9c30c2e 100644 --- a/krusader/GUI/kcmdmodebutton.h +++ b/krusader/GUI/kcmdmodebutton.h @@ -23,7 +23,7 @@ #ifndef KCMDMODEBUTTON_H #define KCMDMODEBUTTON_H -#include <qtoolbutton.h> +#include <tqtoolbutton.h> class KActionMenu; @@ -31,14 +31,15 @@ class KActionMenu; * @author Vaclav Juza * * represents a button for switching the command-line execution mode - * It extends QToolButton, set the icon etc., and creates a popup menu + * It extends TQToolButton, set the icon etc., and creates a popup menu * containing the actions to actually switch the mode. */ -class KCMDModeButton : public QToolButton { +class KCMDModeButton : public TQToolButton { Q_OBJECT + TQ_OBJECT public: /** Constructor. Sets up the menu, and the icon */ - KCMDModeButton(QWidget *parent=0, const char *name=0); + KCMDModeButton(TQWidget *tqparent=0, const char *name=0); ~KCMDModeButton(); /** Shows the popup menu. Called when clicked to the button */ diff --git a/krusader/GUI/kfnkeys.cpp b/krusader/GUI/kfnkeys.cpp index be48163..96fa6a3 100644 --- a/krusader/GUI/kfnkeys.cpp +++ b/krusader/GUI/kfnkeys.cpp @@ -28,17 +28,17 @@ * * ***************************************************************************/ -#include <qtooltip.h> +#include <tqtooltip.h> #include <klocale.h> #include <kglobalsettings.h> -#include <qfontmetrics.h> -#include <qwhatsthis.h> +#include <tqfontmetrics.h> +#include <tqwhatsthis.h> #include "kfnkeys.h" #include "../krusader.h" #include "../defaults.h" #include "../krslots.h" -KFnKeys::KFnKeys(QWidget *parent, char *name): QWidget(parent,name) { +KFnKeys::KFnKeys(TQWidget *tqparent, char *name): TQWidget(tqparent,name) { krConfig->setGroup("Look&Feel"); //////////////////////////////// #define SETUP(TARGET) {\ @@ -46,75 +46,75 @@ KFnKeys::KFnKeys(QWidget *parent, char *name): QWidget(parent,name) { } setFont( KGlobalSettings::generalFont() ); - layout=new QGridLayout(this,1,9); // 9 keys - F2=new QPushButton( i18n("F2 Term ") ,this); - QToolTip::add( F2, "<qt>" + i18n( "<p>Open terminal in current directory.</p>" + tqlayout=new TQGridLayout(this,1,9); // 9 keys + F2=new TQPushButton( i18n("F2 Term ") ,this); + TQToolTip::add( F2, "<qt>" + i18n( "<p>Open terminal in current directory.</p>" "<p>The terminal can be defined in Konfigurator, " "default is <b>konsole</b>.</p>" ) + "</qt>" ); - connect(F2,SIGNAL(clicked()), SLOTS, SLOT(terminal())); + connect(F2,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(terminal())); SETUP(F2); - F3=new QPushButton( i18n("F3 View ") ,this); - QToolTip::add( F3, i18n( "Open file in viewer." ) ); - connect(F3,SIGNAL(clicked()), SLOTS, SLOT(view())); + F3=new TQPushButton( i18n("F3 View ") ,this); + TQToolTip::add( F3, i18n( "Open file in viewer." ) ); + connect(F3,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(view())); SETUP(F3); - F4=new QPushButton( i18n("F4 Edit ") ,this); - QToolTip::add( F4, "<qt>" + i18n( "<p>Edit file.</p>" + F4=new TQPushButton( i18n("F4 Edit ") ,this); + TQToolTip::add( F4, "<qt>" + i18n( "<p>Edit file.</p>" "<p>The editor can be defined in Konfigurator, " "default is <b>internal editor</b>.</p>" ) + "</qt>" ); - connect(F4,SIGNAL(clicked()), SLOTS, SLOT(edit())); + connect(F4,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(edit())); SETUP(F4); - F5=new QPushButton( i18n("F5 Copy ") ,this); - QToolTip::add( F5, i18n( "Copy file from one panel to the other." ) ); - connect(F5,SIGNAL(clicked()), SLOTS, SLOT(copyFiles())); + F5=new TQPushButton( i18n("F5 Copy ") ,this); + TQToolTip::add( F5, i18n( "Copy file from one panel to the other." ) ); + connect(F5,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(copyFiles())); SETUP(F5); - F6=new QPushButton( i18n("F6 Move") ,this); - QToolTip::add( F6, i18n( "Move file from one panel to the other." ) ); - connect(F6,SIGNAL(clicked()), SLOTS, SLOT(moveFiles())); + F6=new TQPushButton( i18n("F6 Move") ,this); + TQToolTip::add( F6, i18n( "Move file from one panel to the other." ) ); + connect(F6,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(moveFiles())); SETUP(F6); - F7=new QPushButton( i18n("F7 Mkdir ") ,this); - QToolTip::add( F7, i18n( "Create directory in current panel." ) ); - connect(F7,SIGNAL(clicked()), SLOTS, SLOT(mkdir())); + F7=new TQPushButton( i18n("F7 Mkdir ") ,this); + TQToolTip::add( F7, i18n( "Create directory in current panel." ) ); + connect(F7,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(mkdir())); SETUP(F7); - F8=new QPushButton( i18n("F8 Delete") ,this); - QToolTip::add( F8, i18n( "Delete file, directory, etc." ) ); - connect(F8,SIGNAL(clicked()), SLOTS, SLOT(deleteFiles())); + F8=new TQPushButton( i18n("F8 Delete") ,this); + TQToolTip::add( F8, i18n( "Delete file, directory, etc." ) ); + connect(F8,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(deleteFiles())); SETUP(F8); - F9=new QPushButton( i18n("F9 Rename") ,this); - QToolTip::add( F9, i18n( "Rename file, directory, etc." ) ); - connect(F9,SIGNAL(clicked()), SLOTS, SLOT(rename())); + F9=new TQPushButton( i18n("F9 Rename") ,this); + TQToolTip::add( F9, i18n( "Rename file, directory, etc." ) ); + connect(F9,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(rename())); SETUP(F9); - F10=new QPushButton( i18n("F10 Quit ") ,this); - QToolTip::add( F10, i18n( "Quit Krusader." ) ); - connect(F10,SIGNAL(clicked()),krApp, SLOT(slotClose())); + F10=new TQPushButton( i18n("F10 Quit ") ,this); + TQToolTip::add( F10, i18n( "Quit Krusader." ) ); + connect(F10,TQT_SIGNAL(clicked()),krApp, TQT_SLOT(slotClose())); SETUP(F10); // set a tighter box around the keys - int h = QFontMetrics(F2->font()).height()+2; + int h = TQFontMetrics(F2->font()).height()+2; F2->setMaximumHeight(h); F3->setMaximumHeight(h); F4->setMaximumHeight(h); F5->setMaximumHeight(h); F6->setMaximumHeight(h); F7->setMaximumHeight(h); F8->setMaximumHeight(h); F9->setMaximumHeight(h); F10->setMaximumHeight(h); - layout->addWidget(F2,0,0); - layout->addWidget(F3,0,1); - layout->addWidget(F4,0,2); - layout->addWidget(F5,0,3); - layout->addWidget(F6,0,4); - layout->addWidget(F7,0,5); - layout->addWidget(F8,0,6); - layout->addWidget(F9,0,7); - layout->addWidget(F10,0,8); + tqlayout->addWidget(F2,0,0); + tqlayout->addWidget(F3,0,1); + tqlayout->addWidget(F4,0,2); + tqlayout->addWidget(F5,0,3); + tqlayout->addWidget(F6,0,4); + tqlayout->addWidget(F7,0,5); + tqlayout->addWidget(F8,0,6); + tqlayout->addWidget(F9,0,7); + tqlayout->addWidget(F10,0,8); - layout->activate(); + tqlayout->activate(); } void KFnKeys::updateShortcuts() { diff --git a/krusader/GUI/kfnkeys.h b/krusader/GUI/kfnkeys.h index d25b9d1..955387c 100644 --- a/krusader/GUI/kfnkeys.h +++ b/krusader/GUI/kfnkeys.h @@ -32,23 +32,24 @@ #ifndef KFNKEYS_H #define KFNKEYS_H -#include <qwidget.h> -#include <qlayout.h> -#include <qpushbutton.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqpushbutton.h> // Function Keys widget /////////////////////// -class KFnKeys : public QWidget { +class KFnKeys : public TQWidget { Q_OBJECT + TQ_OBJECT public: // constructor - KFnKeys(QWidget *parent, char *name=0); + KFnKeys(TQWidget *tqparent, char *name=0); void updateShortcuts(); private: - QPushButton *F2 ,*F3,*F4,*F5,*F6,*F7,*F8,*F9,*F10; - QGridLayout *layout; + TQPushButton *F2 ,*F3,*F4,*F5,*F6,*F7,*F8,*F9,*F10; + TQGridLayout *tqlayout; }; #endif diff --git a/krusader/GUI/krremoteencodingmenu.cpp b/krusader/GUI/krremoteencodingmenu.cpp index 4563356..0bd246e 100644 --- a/krusader/GUI/krremoteencodingmenu.cpp +++ b/krusader/GUI/krremoteencodingmenu.cpp @@ -41,12 +41,12 @@ #include "krremoteencodingmenu.h" -#define DATA_KEY QString::fromLatin1("Charset") +#define DATA_KEY TQString::tqfromLatin1("Charset") -KrRemoteEncodingMenu::KrRemoteEncodingMenu(const QString &text, const QString &icon, QObject *parent, const char *name) : - KActionMenu( text, icon, parent, name ), settingsLoaded( false ) +KrRemoteEncodingMenu::KrRemoteEncodingMenu(const TQString &text, const TQString &icon, TQObject *tqparent, const char *name) : + KActionMenu( text, icon, tqparent, name ), settingsLoaded( false ) { - connect(popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotAboutToShow())); + connect(popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotAboutToShow())); } void KrRemoteEncodingMenu::slotAboutToShow() @@ -60,13 +60,13 @@ void KrRemoteEncodingMenu::slotAboutToShow() KURL currentURL = ACTIVE_PANEL->virtualPath(); - QString charset = KIO::SlaveConfig::self()->configData(currentURL.protocol(), currentURL.host(), DATA_KEY); + TQString charset = KIO::SlaveConfig::self()->configData(currentURL.protocol(), currentURL.host(), DATA_KEY); if (!charset.isEmpty()) { int id = 1; - QStringList::Iterator it; + TQStringList::Iterator it; for (it = encodingNames.begin(); it != encodingNames.end(); ++it, ++id) - if ((*it).find(charset) != -1) + if ((*it).tqfind(charset) != -1) break; // kdDebug() << k_funcinfo << "URL=" << currentURL << " charset=" << charset << endl; @@ -88,22 +88,22 @@ void KrRemoteEncodingMenu::loadSettings() KPopupMenu *menu = popupMenu(); menu->clear(); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; int count = 0; for (it = encodingNames.begin(); it != encodingNames.end(); ++it) - menu->insertItem(*it, this, SLOT(slotItemSelected(int)), 0, ++count); + menu->insertItem(*it, this, TQT_SLOT(slotItemSelected(int)), 0, ++count); menu->insertSeparator(); - menu->insertItem(i18n("Reload"), this, SLOT(slotReload()), 0, ++count); - menu->insertItem(i18n("Default"), this, SLOT(slotDefault()), 0, ++count); + menu->insertItem(i18n("Reload"), this, TQT_SLOT(slotReload()), 0, ++count); + menu->insertItem(i18n("Default"), this, TQT_SLOT(slotDefault()), 0, ++count); defaultID = count; } -int KrRemoteEncodingMenu::plug( QWidget *widget, int index ) +int KrRemoteEncodingMenu::plug( TQWidget *widget, int index ) { - if( widget->inherits( "QPopupMenu" ) ) + if( widget->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) ) { - connect( widget, SIGNAL(aboutToShow()), this, SLOT(slotCheckEnabled())); + connect( widget, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotCheckEnabled())); slotCheckEnabled(); } @@ -121,11 +121,11 @@ void KrRemoteEncodingMenu::slotItemSelected(int id) KURL currentURL = ACTIVE_PANEL->virtualPath(); KConfig config(("kio_" + currentURL.protocol() + "rc").latin1()); - QString host = currentURL.host(); + TQString host = currentURL.host(); if (!popupMenu()->isItemChecked(id)) { - QString charset = KGlobal::charsets()->encodingForName( encodingNames[id - 1] ); + TQString charset = KGlobal::charsets()->encodingForName( encodingNames[id - 1] ); config.setGroup(host); config.writeEntry(DATA_KEY, charset); @@ -149,12 +149,12 @@ void KrRemoteEncodingMenu::slotDefault() // settings here since it affects what will be matched. KConfig config(("kio_" + currentURL.protocol() + "rc").latin1()); - QStringList partList = QStringList::split('.', currentURL.host(), false); + TQStringList partList = TQStringList::split('.', currentURL.host(), false); if (!partList.isEmpty()) { partList.remove(partList.begin()); - QStringList domains; + TQStringList domains; // Remove the exact name match... domains << currentURL.host(); @@ -171,7 +171,7 @@ void KrRemoteEncodingMenu::slotDefault() partList.remove(partList.begin()); } - for (QStringList::Iterator it = domains.begin(); it != domains.end(); it++) + for (TQStringList::Iterator it = domains.begin(); it != domains.end(); it++) { // kdDebug() << k_funcinfo << "Domain to remove: " << *it << endl; if (config.hasGroup(*it)) @@ -194,14 +194,14 @@ void KrRemoteEncodingMenu::updateKIOSlaves() if (!client->attach()) kdDebug() << "Can't connect with DCOP server." << endl; - QByteArray data; - QDataStream stream(data, IO_WriteOnly); - stream << QString::null; - client->send("*", "KIO::Scheduler", "reparseSlaveConfiguration(QString)", data); + TQByteArray data; + TQDataStream stream(data, IO_WriteOnly); + stream << TQString(); + client->send("*", "KIO::Scheduler", "reparseSlaveConfiguration(TQString)", data); delete client; // Reload the page with the new charset - QTimer::singleShot( 500, ACTIVE_FUNC, SLOT( refresh() ) ); + TQTimer::singleShot( 500, ACTIVE_FUNC, TQT_SLOT( refresh() ) ); } #include "krremoteencodingmenu.moc" diff --git a/krusader/GUI/krremoteencodingmenu.h b/krusader/GUI/krremoteencodingmenu.h index 9ee4680..8b7f04b 100644 --- a/krusader/GUI/krremoteencodingmenu.h +++ b/krusader/GUI/krremoteencodingmenu.h @@ -32,7 +32,7 @@ #ifndef REMOTEENCODING_MENU_H #define REMOTEENCODING_MENU_H -#include <qstringlist.h> +#include <tqstringlist.h> #include <kurl.h> #include <klibloader.h> #include <kaction.h> @@ -40,10 +40,11 @@ class KrRemoteEncodingMenu: public KActionMenu { Q_OBJECT + TQ_OBJECT public: - KrRemoteEncodingMenu (const QString &text, const QString &icon, QObject *parent=0, const char *name=0); + KrRemoteEncodingMenu (const TQString &text, const TQString &icon, TQObject *tqparent=0, const char *name=0); - virtual int plug( QWidget *widget, int index = -1); + virtual int plug( TQWidget *widget, int index = -1); protected slots: @@ -59,7 +60,7 @@ private: void loadSettings(); void updateKIOSlaves(); - QStringList encodingNames; + TQStringList encodingNames; bool settingsLoaded; int defaultID; }; diff --git a/krusader/GUI/krusaderstatus.cpp b/krusader/GUI/krusaderstatus.cpp index ad11308..51c3340 100644 --- a/krusader/GUI/krusaderstatus.cpp +++ b/krusader/GUI/krusaderstatus.cpp @@ -29,18 +29,18 @@ ***************************************************************************/ // Krusader includes -#include <qfontmetrics.h> +#include <tqfontmetrics.h> #include "krusaderstatus.h" #include "../resources.h" -KrusaderStatus::KrusaderStatus(QWidget *parent, const char *name ): - KStatusBar(parent,name){ +KrusadertqStatus::KrusadertqStatus(TQWidget *tqparent, const char *name ): + KStatusBar(tqparent,name){ insertItem(i18n("Ready."), S_READY_ID); - setMaximumHeight(QFontMetrics(font()).height()+2); + setMaximumHeight(TQFontMetrics(font()).height()+2); } -KrusaderStatus::~KrusaderStatus(){ +KrusadertqStatus::~KrusadertqStatus(){ } #include "krusaderstatus.moc" diff --git a/krusader/GUI/krusaderstatus.h b/krusader/GUI/krusaderstatus.h index 45a4cf5..bbfaa49 100644 --- a/krusader/GUI/krusaderstatus.h +++ b/krusader/GUI/krusaderstatus.h @@ -34,22 +34,23 @@ #define KRUSADERSTATUS_H // QT includes -#include <qlabel.h> -#include <qwidget.h> -#include <qframe.h> +#include <tqlabel.h> +#include <tqwidget.h> +#include <tqframe.h> // KDE includes #include <kstatusbar.h> #include <klocale.h> -class KrusaderStatus : public KStatusBar { +class KrusadertqStatus : public KStatusBar { Q_OBJECT + TQ_OBJECT public: - KrusaderStatus(QWidget *parent=0, const char *name=0); - ~KrusaderStatus(); + KrusadertqStatus(TQWidget *tqparent=0, const char *name=0); + ~KrusadertqStatus(); private: - QLabel *mess; + TQLabel *mess; }; diff --git a/krusader/GUI/mediabutton.cpp b/krusader/GUI/mediabutton.cpp index 65e8fc9..9208290 100644 --- a/krusader/GUI/mediabutton.cpp +++ b/krusader/GUI/mediabutton.cpp @@ -36,9 +36,9 @@ #include "../MountMan/kdiskfreesp.h" #include "../MountMan/kmountman.h" -#include <qpopupmenu.h> -#include <qfile.h> -#include <qfontmetrics.h> +#include <tqpopupmenu.h> +#include <tqfile.h> +#include <tqfontmetrics.h> #include <klocale.h> #include <kiconloader.h> @@ -50,7 +50,7 @@ #include <kprotocolinfo.h> #include <kfileitem.h> #include <kprocess.h> -#include <qcursor.h> +#include <tqcursor.h> #ifdef Q_OS_LINUX // For CD/DVD drive detection @@ -65,16 +65,16 @@ #define CDC_CD_R 0x2000 /* drive is a CD-R */ #define CDC_CD_RW 0x4000 /* drive is a CD-RW */ #define CDC_DVD 0x8000 /* drive is a DVD */ -#include <qfile.h> +#include <tqfile.h> #endif -MediaButton::MediaButton( QWidget *parent, const char *name ) : QToolButton( parent, name ), +MediaButton::MediaButton( TQWidget *tqparent, const char *name ) : TQToolButton( tqparent, name ), popupMenu( 0 ), rightMenu( 0 ), hasMedia( false ), waitingForMount( -1 ), mountCheckerTimer() { KIconLoader * iconLoader = new KIconLoader(); - QPixmap icon = iconLoader->loadIcon( "blockdevice", KIcon::Toolbar, 16 ); + TQPixmap icon = iconLoader->loadIcon( "blockdevice", KIcon::Toolbar, 16 ); setFixedSize( icon.width() + 4, icon.height() + 4 ); setPixmap( icon ); @@ -82,17 +82,17 @@ MediaButton::MediaButton( QWidget *parent, const char *name ) : QToolButton( par setPopupDelay( 1 ); // immediate press setAcceptDrops( false ); - popupMenu = new QPopupMenu( this ); + popupMenu = new TQPopupMenu( this ); popupMenu->installEventFilter( this ); Q_CHECK_PTR( popupMenu ); setPopup( popupMenu ); - connect( popupMenu, SIGNAL( aboutToShow() ), this, SLOT( slotAboutToShow() ) ); - connect( popupMenu, SIGNAL( aboutToHide() ), this, SLOT( slotAboutToHide() ) ); - connect( popupMenu, SIGNAL( activated( int ) ), this, SLOT( slotPopupActivated( int ) ) ); + connect( popupMenu, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotAboutToShow() ) ); + connect( popupMenu, TQT_SIGNAL( aboutToHide() ), this, TQT_SLOT( slotAboutToHide() ) ); + connect( popupMenu, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotPopupActivated( int ) ) ); - connect( &mountCheckerTimer, SIGNAL( timeout() ), this, SLOT( slotTimeout() ) ); + connect( &mountCheckerTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTimeout() ) ); } MediaButton::~MediaButton() { @@ -100,7 +100,7 @@ MediaButton::~MediaButton() { } void MediaButton::slotAboutToShow() { - hasMedia = KProtocolInfo::isKnownProtocol( QString( "media" ) ); + hasMedia = KProtocolInfo::isKnownProtocol( TQString( "media" ) ); krConfig->setGroup( "Advanced" ); if( krConfig->readBoolEntry( "DontUseMediaProt", !hasMedia ) ) hasMedia = false; @@ -130,14 +130,14 @@ void MediaButton::slotAboutToHide() { void MediaButton::createListWithMedia() { KIO::ListJob *job = KIO::listDir( KURL( "media:/" ), false ); - connect( job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), - this, SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) ); - connect( job, SIGNAL( result( KIO::Job* ) ), - this, SLOT( slotListResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), + this, TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( slotListResult( KIO::Job* ) ) ); busy = true; if( !busy ) - qApp->processEvents(); + tqApp->processEvents(); } void MediaButton::slotEntries( KIO::Job *, const KIO::UDSEntryList& entries ) @@ -150,9 +150,9 @@ void MediaButton::slotEntries( KIO::Job *, const KIO::UDSEntryList& entries ) while( it != end ) { KURL url; - QString text; - QString mime; - QString localPath; + TQString text; + TQString mime; + TQString localPath; bool mounted = false; KIO::UDSEntry::ConstIterator it2 = (*it).begin(); @@ -180,20 +180,20 @@ void MediaButton::slotEntries( KIO::Job *, const KIO::UDSEntryList& entries ) if( text != "." && text != ".." ) { int index = popupMenu->count(); - QPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mime ) ->icon( QString::null, true ) ); + TQPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mime ) ->icon( TQString(), true ) ); mediaUrls.append( url ); if( mounted && !localPath.isEmpty() ) { url = KURL::fromPathOrURL( localPath ); - if( !text.contains( url.path() ) ) + if( !text.tqcontains( url.path() ) ) text += " [" + url.path() + "]"; } else if( mounted ) { url = getLocalPath( url, &mountList ); - if( url.isLocalFile() && !text.contains( url.path() ) ) + if( url.isLocalFile() && !text.tqcontains( url.path() ) ) text += " [" + url.path() + "]"; } @@ -219,10 +219,10 @@ KURL MediaButton::getLocalPath( const KURL &url, KMountPoint::List *mountList ) } for (KMountPoint::List::iterator it = mountList->begin(); it != mountList->end(); ++it) { - QString name = (*it)->mountedFrom(); - name = name.mid( name.findRev( "/" ) + 1 ); + TQString name = (*it)->mountedFrom(); + name = name.mid( name.tqfindRev( "/" ) + 1 ); if( name == url.fileName() ) { - QString point = (*it)->mountPoint(); + TQString point = (*it)->mountPoint(); if( !point.isEmpty() ) return KURL::fromPathOrURL( point ); } @@ -244,7 +244,7 @@ void MediaButton::createListWithoutMedia() { the buggy widget resize. These are extra spaces. */ extraSpaces = ""; - QFontMetrics fm( popupMenu->font() ); + TQFontMetrics fm( popupMenu->font() ); int requiredWidth = fm.width( "999.9 GB " ); while( fm.width( extraSpaces ) < requiredWidth ) extraSpaces+=" "; @@ -261,15 +261,15 @@ void MediaButton::createListWithoutMedia() { } } -QString MediaButton::detectType( KMountPoint *mp ) +TQString MediaButton::detectType( KMountPoint *mp ) { - QString typeName = QString::null; + TQString typeName = TQString(); #ifdef Q_OS_LINUX // Guessing device types by mount point is not exactly accurate... // Do something accurate first, and fall back if necessary. bool isCd=false; - QString devname=mp->mountedFrom().section('/', -1); + TQString devname=mp->mountedFrom().section('/', -1); if(devname.startsWith("scd") || devname.startsWith("sr")) { // SCSI CD/DVD drive @@ -280,19 +280,19 @@ QString MediaButton::detectType( KMountPoint *mp ) // IDE device -- we can't tell if this is a // CD/DVD drive or harddisk by just looking at the // filename - QFile m(QString("/proc/ide/") + devname + "/media"); + TQFile m(TQString("/proc/ide/") + devname + "/media"); if(m.open(IO_ReadOnly)) { - QTextStream in(&m); - QString buf=in.readLine(); - if(buf.contains("cdrom")) + TQTextStream in(&m); + TQString buf=in.readLine(); + if(buf.tqcontains("cdrom")) isCd=true; m.close(); } } if(isCd) { - int device=::open((const char *)QFile::encodeName(mp->mountedFrom()), O_RDONLY | O_NONBLOCK ); + int device=::open((const char *)TQFile::encodeName(mp->mountedFrom()), O_RDONLY | O_NONBLOCK ); if(device>=0) { int drv=::ioctl(device, CDROM_GET_CAPABILITY, CDSL_CURRENT); @@ -315,44 +315,44 @@ QString MediaButton::detectType( KMountPoint *mp ) return typeName; #elif defined(__FreeBSD__) - if (-1!=mp->mountedFrom().find("/acd",0,FALSE)) typeName="cdrom"; - else if (-1!=mp->mountedFrom().find("/scd",0,FALSE)) typeName="cdrom"; - else if (-1!=mp->mountedFrom().find("/ad",0,FALSE)) typeName="hdd"; - else if (-1!=mp->mountedFrom().find("/da",0,FALSE)) typeName="hdd"; - else if (-1!=mp->mountedFrom().find("/afd",0,FALSE)) typeName="zip"; + if (-1!=mp->mountedFrom().tqfind("/acd",0,FALSE)) typeName="cdrom"; + else if (-1!=mp->mountedFrom().tqfind("/scd",0,FALSE)) typeName="cdrom"; + else if (-1!=mp->mountedFrom().tqfind("/ad",0,FALSE)) typeName="hdd"; + else if (-1!=mp->mountedFrom().tqfind("/da",0,FALSE)) typeName="hdd"; + else if (-1!=mp->mountedFrom().tqfind("/afd",0,FALSE)) typeName="zip"; else #endif /* Guessing of cdrom and cd recorder devices */ - if (-1!=mp->mountPoint().find("cdrom",0,FALSE)) typeName="cdrom"; - else if (-1!=mp->mountedFrom().find("cdrom",0,FALSE)) typeName="cdrom"; - else if (-1!=mp->mountPoint().find("cdwriter",0,FALSE)) typeName="cdwriter"; - else if (-1!=mp->mountedFrom().find("cdwriter",0,FALSE)) typeName="cdwriter"; - else if (-1!=mp->mountedFrom().find("cdrw",0,FALSE)) typeName="cdwriter"; - else if (-1!=mp->mountPoint().find("cdrw",0,FALSE)) typeName="cdwriter"; - else if (-1!=mp->mountedFrom().find("cdrecorder",0,FALSE)) typeName="cdwriter"; - else if (-1!=mp->mountPoint().find("cdrecorder",0,FALSE)) typeName="cdwriter"; - else if (-1!=mp->mountedFrom().find("dvdrecorder",0,FALSE)) typeName="dvdwriter"; - else if (-1!=mp->mountPoint().find("dvdrecorder",0,FALSE)) typeName="dvdwriter"; - else if (-1!=mp->mountPoint().find("dvdwriter",0,FALSE)) typeName="dvdwriter"; - else if (-1!=mp->mountedFrom().find("dvdwriter",0,FALSE)) typeName="dvdwriter"; - else if (-1!=mp->mountPoint().find("dvd",0,FALSE)) typeName="dvd"; - else if (-1!=mp->mountedFrom().find("dvd",0,FALSE)) typeName="dvd"; - else if (-1!=mp->mountedFrom().find("/dev/scd",0,FALSE)) typeName="cdrom"; - else if (-1!=mp->mountedFrom().find("/dev/sr",0,FALSE)) typeName="cdrom"; + if (-1!=mp->mountPoint().tqfind("cdrom",0,FALSE)) typeName="cdrom"; + else if (-1!=mp->mountedFrom().tqfind("cdrom",0,FALSE)) typeName="cdrom"; + else if (-1!=mp->mountPoint().tqfind("cdwriter",0,FALSE)) typeName="cdwriter"; + else if (-1!=mp->mountedFrom().tqfind("cdwriter",0,FALSE)) typeName="cdwriter"; + else if (-1!=mp->mountedFrom().tqfind("cdrw",0,FALSE)) typeName="cdwriter"; + else if (-1!=mp->mountPoint().tqfind("cdrw",0,FALSE)) typeName="cdwriter"; + else if (-1!=mp->mountedFrom().tqfind("cdrecorder",0,FALSE)) typeName="cdwriter"; + else if (-1!=mp->mountPoint().tqfind("cdrecorder",0,FALSE)) typeName="cdwriter"; + else if (-1!=mp->mountedFrom().tqfind("dvdrecorder",0,FALSE)) typeName="dvdwriter"; + else if (-1!=mp->mountPoint().tqfind("dvdrecorder",0,FALSE)) typeName="dvdwriter"; + else if (-1!=mp->mountPoint().tqfind("dvdwriter",0,FALSE)) typeName="dvdwriter"; + else if (-1!=mp->mountedFrom().tqfind("dvdwriter",0,FALSE)) typeName="dvdwriter"; + else if (-1!=mp->mountPoint().tqfind("dvd",0,FALSE)) typeName="dvd"; + else if (-1!=mp->mountedFrom().tqfind("dvd",0,FALSE)) typeName="dvd"; + else if (-1!=mp->mountedFrom().tqfind("/dev/scd",0,FALSE)) typeName="cdrom"; + else if (-1!=mp->mountedFrom().tqfind("/dev/sr",0,FALSE)) typeName="cdrom"; /* Guessing of floppy types */ - else if (-1!=mp->mountedFrom().find("fd",0,FALSE)) { - if (-1!=mp->mountedFrom().find("360",0,FALSE)) typeName="floppy5"; - if (-1!=mp->mountedFrom().find("1200",0,FALSE)) typeName="floppy5"; + else if (-1!=mp->mountedFrom().tqfind("fd",0,FALSE)) { + if (-1!=mp->mountedFrom().tqfind("360",0,FALSE)) typeName="floppy5"; + if (-1!=mp->mountedFrom().tqfind("1200",0,FALSE)) typeName="floppy5"; else typeName="floppy"; } - else if (-1!=mp->mountPoint().find("floppy",0,FALSE)) typeName="floppy"; + else if (-1!=mp->mountPoint().tqfind("floppy",0,FALSE)) typeName="floppy"; - else if (-1!=mp->mountPoint().find("zip",0,FALSE)) typeName="zip"; - else if (-1!=mp->mountType().find("nfs",0,FALSE)) typeName="nfs"; - else if (-1!=mp->mountType().find("smb",0,FALSE)) typeName="smb"; - else if (-1!=mp->mountedFrom().find("//",0,FALSE)) typeName="smb"; + else if (-1!=mp->mountPoint().tqfind("zip",0,FALSE)) typeName="zip"; + else if (-1!=mp->mountType().tqfind("nfs",0,FALSE)) typeName="nfs"; + else if (-1!=mp->mountType().tqfind("smb",0,FALSE)) typeName="smb"; + else if (-1!=mp->mountedFrom().tqfind("//",0,FALSE)) typeName="smb"; else typeName="hdd"; return typeName; @@ -370,26 +370,26 @@ void MediaButton::slotPopupActivated( int elem ) { emit openUrl( urls[ elem ] ); } -void MediaButton::gettingSpaceData(const QString &mountPoint, unsigned long kBSize, unsigned long, unsigned long ) { +void MediaButton::gettingSpaceData(const TQString &mountPoint, unsigned long kBSize, unsigned long, unsigned long ) { KURL mediaURL = KURL::fromPathOrURL( mountPoint ); KIO::filesize_t size = kBSize; size *= 1024; - QString sizeText = KIO::convertSize( size ); + TQString sizeText = KIO::convertSize( size ); for( unsigned i=0; i != urls.size(); i++ ) { if( mediaURL.equals( urls[ i ], true ) ) { if( kBSize == 0 ) { // if df gives 0, it means the device is quasy umounted - QString mime = mimes[ i ]; + TQString mime = mimes[ i ]; if( mimes[ i ].endsWith( "_mounted" ) ) { quasiMounted[ i ] = true; - mimes[ i ] = mimes[ i ].replace( "_mounted", "_unmounted" ); + mimes[ i ] = mimes[ i ].tqreplace( "_mounted", "_unmounted" ); } - QPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mimes[ i ] ) ->icon( QString::null, true ) ); + TQPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mimes[ i ] ) ->icon( TQString(), true ) ); popupMenu->changeItem( i, pixmap, popupMenu->text( i ) ); } - else if( mimes[ i ].contains( "hdd_" ) ) + else if( mimes[ i ].tqcontains( "hdd_" ) ) popupMenu->changeItem( i, sizeText + " " + popupMenu->text( i ).stripWhiteSpace() ); return; } @@ -397,18 +397,18 @@ void MediaButton::gettingSpaceData(const QString &mountPoint, unsigned long kBSi } void MediaButton::openPopup() { - QPopupMenu * pP = popup(); + TQPopupMenu * pP = popup(); if ( pP ) { - popup() ->exec( mapToGlobal( QPoint( 0, height() ) ) ); + popup() ->exec( mapToGlobal( TQPoint( 0, height() ) ) ); } } void MediaButton::addMountPoint( KMountPoint * mp, bool isMounted ) { - QString mountString = isMounted ? "_mounted" : "_unmounted"; + TQString mountString = isMounted ? "_mounted" : "_unmounted"; if( mp->mountPoint() == "/dev/swap" || mp->mountPoint() == "/dev/pts" || mp->mountPoint().startsWith( "/sys/kernel" ) || - mp->mountPoint().find( "/proc" ) == 0 ) + mp->mountPoint().tqfind( "/proc" ) == 0 ) return; if( mp->mountType() == "swap" || mp->mountType() == "sysfs" || @@ -421,7 +421,7 @@ void MediaButton::addMountPoint( KMountPoint * mp, bool isMounted ) { return; if( mp->mountedFrom() == "none" || mp->mountedFrom() == "tmpfs" || - mp->mountedFrom().find( "shm" ) != -1 ) + mp->mountedFrom().tqfind( "shm" ) != -1 ) return; int overwrite = -1; @@ -433,22 +433,22 @@ void MediaButton::addMountPoint( KMountPoint * mp, bool isMounted ) { break; } - QString name; - QString type = detectType( mp ); + TQString name; + TQString type = detectType( mp ); /* WORKAROUND CODE START */ /* add spaces to avoid widget resize in gettingSpaceData, which is buggy in QT when transparency is set */ - QString extSpc = ( isMounted && type == "hdd" ) ? extraSpaces : ""; + TQString extSpc = ( isMounted && type == "hdd" ) ? extraSpaces : ""; /* WORKAROUND CODE END */ #if KDE_IS_VERSION(3,4,0) - QString mimeBase = "media/"; + TQString mimeBase = "media/"; #else - QString mimeBase = "kdedevice/"; + TQString mimeBase = "kdedevice/"; #endif - QString mime = mimeBase + type + mountString; + TQString mime = mimeBase + type + mountString; if( type == "hdd" ) name = i18n( "Hard Disk" ) ; @@ -479,11 +479,11 @@ void MediaButton::addMountPoint( KMountPoint * mp, bool isMounted ) { if( isMounted ) { KDiskFreeSp *sp = KDiskFreeSp::findUsageInfo( mp->mountPoint() ); - connect( sp, SIGNAL( foundMountPoint( const QString &, unsigned long, unsigned long, unsigned long ) ), - this, SLOT( gettingSpaceData( const QString&, unsigned long, unsigned long, unsigned long ) ) ); + connect( sp, TQT_SIGNAL( foundMountPoint( const TQString &, unsigned long, unsigned long, unsigned long ) ), + this, TQT_SLOT( gettingSpaceData( const TQString&, unsigned long, unsigned long, unsigned long ) ) ); } - QPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mime ) ->icon( QString::null, true ) ); + TQPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mime ) ->icon( TQString(), true ) ); if( overwrite == -1 ) { int index = popupMenu->count(); @@ -499,12 +499,12 @@ void MediaButton::addMountPoint( KMountPoint * mp, bool isMounted ) { } } -bool MediaButton::eventFilter( QObject *o, QEvent *e ) { - if( o == popupMenu ) { - if( e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonRelease ) { - QMouseEvent *m = (QMouseEvent *)e; - if( m->button() == RightButton ) { - if( e->type() == QEvent::MouseButtonPress ) { +bool MediaButton::eventFilter( TQObject *o, TQEvent *e ) { + if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(popupMenu) ) { + if( e->type() == TQEvent::MouseButtonPress || e->type() == TQEvent::MouseButtonRelease ) { + TQMouseEvent *m = TQT_TQMOUSEEVENT(e); + if( m->button() == Qt::RightButton ) { + if( e->type() == TQEvent::MouseButtonPress ) { int id = popupMenu->idAt( m->pos() ); if( id != -1 ) rightClickMenu( id ); @@ -521,11 +521,11 @@ void MediaButton::rightClickMenu( int index ) { if( rightMenu ) rightMenu->close(); - QString mime = mimes[ index ]; - bool ejectable = mime.contains( "dvd_" ) || mime.contains( "dvdwriter_" ) || mime.contains( "cdrom_" ) || mime.contains( "cdwriter_" ); - bool mounted = mime.contains( "_mounted" ); + TQString mime = mimes[ index ]; + bool ejectable = mime.tqcontains( "dvd_" ) || mime.tqcontains( "dvdwriter_" ) || mime.tqcontains( "cdrom_" ) || mime.tqcontains( "cdwriter_" ); + bool mounted = mime.tqcontains( "_mounted" ); - QPopupMenu * myMenu = rightMenu = new QPopupMenu( popupMenu ); + TQPopupMenu * myMenu = rightMenu = new TQPopupMenu( popupMenu ); myMenu->insertItem( i18n( "Open" ), 1 ); myMenu->insertItem( i18n( "Open in a new tab" ), 2 ); myMenu->insertSeparator(); @@ -535,7 +535,7 @@ void MediaButton::rightClickMenu( int index ) { myMenu->insertItem( i18n( "Unmount" ), 4 ); if( ejectable ) myMenu->insertItem( i18n( "Eject" ), 5 ); - int result = myMenu->exec( QCursor::pos() ); + int result = myMenu->exec( TQCursor::pos() ); delete myMenu; if( rightMenu == myMenu ) rightMenu = 0; @@ -621,7 +621,7 @@ void MediaButton::slotTimeout() { for( unsigned index = 0; index < urls.count(); index++ ) { bool mounted = false; - QString text = popupMenu->text( index ); + TQString text = popupMenu->text( index ); if( mediaUrls[ index ].isEmpty() ) { for (KMountPoint::List::iterator it = mountList.begin(); it != mountList.end(); ++it) @@ -635,11 +635,11 @@ void MediaButton::slotTimeout() { urls[ index ] = uri; mounted = true; - if( !text.contains( uri.path() ) ) + if( !text.tqcontains( uri.path() ) ) { if( text.endsWith( "]" ) ) { - int ndx = text.findRev( " [" ); + int ndx = text.tqfindRev( " [" ); if( ndx >0 ) text.truncate( ndx ); } @@ -651,7 +651,7 @@ void MediaButton::slotTimeout() { { if( text.endsWith( "]" ) ) { - int ndx = text.findRev( " [" ); + int ndx = text.tqfindRev( " [" ); if( ndx >0 ) text.truncate( ndx ); } @@ -661,12 +661,12 @@ void MediaButton::slotTimeout() { if( quasiMounted[ index ] ) // mounted but not listed with DF mounted = false; - if( mimes[ index ].contains( "_mounted" ) && !mounted ) - mimes[ index ] = mimes[ index ].replace( "_mounted", "_unmounted" ); - if( mimes[ index ].contains( "_unmounted" ) && mounted ) - mimes[ index ] = mimes[ index ].replace( "_unmounted", "_mounted" ); + if( mimes[ index ].tqcontains( "_mounted" ) && !mounted ) + mimes[ index ] = mimes[ index ].tqreplace( "_mounted", "_unmounted" ); + if( mimes[ index ].tqcontains( "_unmounted" ) && mounted ) + mimes[ index ] = mimes[ index ].tqreplace( "_unmounted", "_mounted" ); - QPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mimes[ index ] ) ->icon( QString::null, true ) ); + TQPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mimes[ index ] ) ->icon( TQString(), true ) ); popupMenu->changeItem( index, pixmap, text ); if( ((int)index == waitingForMount) && mounted ) { diff --git a/krusader/GUI/mediabutton.h b/krusader/GUI/mediabutton.h index 1158a2b..b57ea1b 100644 --- a/krusader/GUI/mediabutton.h +++ b/krusader/GUI/mediabutton.h @@ -31,35 +31,36 @@ #ifndef MEDIABUTTON_H #define MEDIABUTTON_H -#include <qwidget.h> -#include <qtoolbutton.h> +#include <tqwidget.h> +#include <tqtoolbutton.h> #include <kurl.h> #include <kio/jobclasses.h> -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <kmountpoint.h> -#include <qtimer.h> +#include <tqtimer.h> /** *@author Csaba Karai */ -class QPopupMenu; +class TQPopupMenu; class KMountPoint; -class MediaButton : public QToolButton { +class MediaButton : public TQToolButton { Q_OBJECT + TQ_OBJECT public: - MediaButton(QWidget *parent=0, const char *name=0); + MediaButton(TQWidget *tqparent=0, const char *name=0); ~MediaButton(); - QString detectType( KMountPoint *mp ); + TQString detectType( KMountPoint *mp ); public slots: void slotAboutToShow(); void slotAboutToHide(); void slotTimeout(); void slotPopupActivated( int ); - void gettingSpaceData(const QString &mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail); + void gettingSpaceData(const TQString &mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail); void openPopup(); void slotEntries( KIO::Job*, const KIO::UDSEntryList& ); void slotListResult( KIO::Job* ); @@ -68,7 +69,7 @@ signals: void openUrl(const KURL&); protected: - bool eventFilter( QObject *o, QEvent *e ); + bool eventFilter( TQObject *o, TQEvent *e ); private: void createListWithMedia(); @@ -83,8 +84,8 @@ private: void addMountPoint( KMountPoint *mp, bool isMounted ); - QPopupMenu *popupMenu; - QPopupMenu *rightMenu; + TQPopupMenu *popupMenu; + TQPopupMenu *rightMenu; bool hasMedia; bool busy; @@ -93,14 +94,14 @@ private: bool newTabAfterMount; int maxMountWait; - QValueList<KURL> urls; - QValueList<KURL> mediaUrls; - QValueList<QString> mimes; - QValueList<bool> quasiMounted; + TQValueList<KURL> urls; + TQValueList<KURL> mediaUrls; + TQValueList<TQString> mimes; + TQValueList<bool> quasiMounted; - QString extraSpaces; //prevents from increasing the size of the widget + TQString extraSpaces; //prevents from increasing the size of the widget - QTimer mountCheckerTimer; + TQTimer mountCheckerTimer; }; #endif /* MEDIABUTTON_H */ diff --git a/krusader/GUI/profilemanager.cpp b/krusader/GUI/profilemanager.cpp index b886751..e18e6ab 100644 --- a/krusader/GUI/profilemanager.cpp +++ b/krusader/GUI/profilemanager.cpp @@ -32,23 +32,23 @@ #include "profilemanager.h" #include <klocale.h> -#include <qtooltip.h> +#include <tqtooltip.h> #include <kpopupmenu.h> -#include <qcursor.h> +#include <tqcursor.h> #include <kinputdialog.h> #include <kiconloader.h> -ProfileManager::ProfileManager( QString profileType, QWidget * parent, const char * name ) - : QPushButton( parent, name ) +ProfileManager::ProfileManager( TQString profileType, TQWidget * tqparent, const char * name ) + : TQPushButton( tqparent, name ) { setText( "" ); KIconLoader *iconLoader = new KIconLoader(); setPixmap( iconLoader->loadIcon( "kr_profile", KIcon::Toolbar, 16 ) ); - QToolTip::add( this, i18n( "Profiles" ) ); + TQToolTip::add( this, i18n( "Profiles" ) ); this->profileType = profileType; - connect( this, SIGNAL( clicked() ), this, SLOT( profilePopup() ) ); + connect( this, TQT_SIGNAL( clicked() ), this, TQT_SLOT( profilePopup() ) ); krConfig->setGroup("Private"); profileList = krConfig->readListEntry( profileType ); @@ -69,7 +69,7 @@ void ProfileManager::profilePopup() for( unsigned i=0; i != profileList.count() ; i++ ) { krConfig->setGroup( profileType + " - " + profileList[i] ); - QString name = krConfig->readEntry( "Name" ); + TQString name = krConfig->readEntry( "Name" ); popup.insertItem( name, LOAD_ENTRY_ID + i ); removePopup.insertItem( name, REMOVE_ENTRY_ID + i ); overwritePopup.insertItem( name, OVERWRITE_ENTRY_ID + i ); @@ -85,7 +85,7 @@ void ProfileManager::profilePopup() popup.insertItem(i18n("Add new entry"),ADD_NEW_ENTRY_ID); - unsigned result=popup.exec(QCursor::pos()); + unsigned result=popup.exec(TQCursor::pos()); // check out the user's selection if( result == ADD_NEW_ENTRY_ID ) @@ -107,19 +107,19 @@ void ProfileManager::profilePopup() } } -void ProfileManager::newProfile( QString defaultName ) +void ProfileManager::newProfile( TQString defaultName ) { - QString profile = KInputDialog::getText( i18n( "Krusader::ProfileManager" ), i18n( "Enter the profile name:" ), + TQString profile = KInputDialog::getText( i18n( "Krusader::ProfileManager" ), i18n( "Enter the profile name:" ), defaultName, 0, this ); if( !profile.isEmpty() ) { int profileNum = 1; - while( profileList.contains( QString( "%1" ).arg( profileNum ) ) ) + while( profileList.tqcontains( TQString( "%1" ).tqarg( profileNum ) ) ) profileNum++; - QString profileString = QString( "%1" ).arg( profileNum ); - QString profileName = profileType + " - " + profileString; - profileList.append( QString( "%1" ).arg( profileString ) ); + TQString profileString = TQString( "%1" ).tqarg( profileNum ); + TQString profileName = profileType + " - " + profileString; + profileList.append( TQString( "%1" ).tqarg( profileString ) ); krConfig->setGroup("Private"); krConfig->writeEntry( profileType, profileList ); @@ -131,12 +131,12 @@ void ProfileManager::newProfile( QString defaultName ) } } -void ProfileManager::deleteProfile( QString name ) +void ProfileManager::deleteProfile( TQString name ) { for( unsigned i=0; i != profileList.count() ; i++ ) { krConfig->setGroup( profileType + " - " + profileList[ i ] ); - QString currentName = krConfig->readEntry( "Name" ); + TQString currentName = krConfig->readEntry( "Name" ); if( name == currentName ) { @@ -151,12 +151,12 @@ void ProfileManager::deleteProfile( QString name ) } } -void ProfileManager::overwriteProfile( QString name ) +void ProfileManager::overwriteProfile( TQString name ) { for( unsigned i=0; i != profileList.count() ; i++ ) { krConfig->setGroup( profileType + " - " + profileList[ i ] ); - QString currentName = krConfig->readEntry( "Name" ); + TQString currentName = krConfig->readEntry( "Name" ); if( name == currentName ) { @@ -166,12 +166,12 @@ void ProfileManager::overwriteProfile( QString name ) } } -bool ProfileManager::loadProfile( QString name ) +bool ProfileManager::loadProfile( TQString name ) { for( unsigned i=0; i != profileList.count() ; i++ ) { krConfig->setGroup( profileType + " - " + profileList[i] ); - QString currentName = krConfig->readEntry( "Name" ); + TQString currentName = krConfig->readEntry( "Name" ); if( name == currentName ) { @@ -182,10 +182,10 @@ bool ProfileManager::loadProfile( QString name ) return false; } -QStringList ProfileManager::availableProfiles( QString profileType ) { +TQStringList ProfileManager::availableProfiles( TQString profileType ) { krConfig->setGroup("Private"); - QStringList profiles = krConfig->readListEntry( profileType ); - QStringList profileNames; + TQStringList profiles = krConfig->readListEntry( profileType ); + TQStringList profileNames; for( unsigned i=0; i != profiles.count() ; i++ ) { krConfig->setGroup( profileType + " - " + profiles[ i ] ); diff --git a/krusader/GUI/profilemanager.h b/krusader/GUI/profilemanager.h index 7566872..e4d3641 100644 --- a/krusader/GUI/profilemanager.h +++ b/krusader/GUI/profilemanager.h @@ -31,39 +31,40 @@ #ifndef PROFILEMANAGER_H #define PROFILEMANAGER_H -#include <qpushbutton.h> -#include <qstring.h> +#include <tqpushbutton.h> +#include <tqstring.h> -class ProfileManager : public QPushButton +class ProfileManager : public TQPushButton { Q_OBJECT + TQ_OBJECT public: - ProfileManager( QString profileType, QWidget * parent = 0, const char * name = 0 ); + ProfileManager( TQString profileType, TQWidget * tqparent = 0, const char * name = 0 ); /** * @param profileType Type of the profile (sync, search, ...) * @return A list of all available profile-names */ - static QStringList availableProfiles( QString profileType ); + static TQStringList availableProfiles( TQString profileType ); - QStringList getNames(); + TQStringList getNames(); public slots: void profilePopup(); - void newProfile( QString defaultName = QString::null ); - void deleteProfile( QString name ); - void overwriteProfile( QString name ); - bool loadProfile( QString name ); + void newProfile( TQString defaultName = TQString() ); + void deleteProfile( TQString name ); + void overwriteProfile( TQString name ); + bool loadProfile( TQString name ); signals: - void saveToProfile( QString profileName ); - void loadFromProfile( QString profileName ); + void saveToProfile( TQString profileName ); + void loadFromProfile( TQString profileName ); private: - QString profileType; - QStringList profileList; + TQString profileType; + TQStringList profileList; }; #endif /* PROFILEMANAGER_H */ diff --git a/krusader/GUI/syncbrowsebutton.cpp b/krusader/GUI/syncbrowsebutton.cpp index 7f42594..d59f927 100644 --- a/krusader/GUI/syncbrowsebutton.cpp +++ b/krusader/GUI/syncbrowsebutton.cpp @@ -32,7 +32,7 @@ The current version only manages sync-browse and got no mode-switch options. //#include <kdebug.h> -SyncBrowseButton::SyncBrowseButton(QWidget *parent, const char *name) : QToolButton(parent,name) +SyncBrowseButton::SyncBrowseButton(TQWidget *tqparent, const char *name) : TQToolButton(tqparent,name) { KIconLoader *iconLoader = new KIconLoader(); _icon_on = iconLoader->loadIcon( "kr_syncbrowse_on", KIcon::Toolbar, 16 ); @@ -46,7 +46,7 @@ SyncBrowseButton::SyncBrowseButton(QWidget *parent, const char *name) : QToolBut "When active, each directory change is performed in the\n" "active and inactive panel - if possible." ), true ); //set this as toop-tip (somehow whatsthis::add(this, ...) don't work) - connect( this, SIGNAL(toggled(bool)), this, SLOT(slotToggled(bool)) ); + connect( this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled(bool)) ); } SyncBrowseButton::~SyncBrowseButton() { diff --git a/krusader/GUI/syncbrowsebutton.h b/krusader/GUI/syncbrowsebutton.h index 7345151..f22de5d 100644 --- a/krusader/GUI/syncbrowsebutton.h +++ b/krusader/GUI/syncbrowsebutton.h @@ -28,7 +28,7 @@ The current version only manages sync-browse and got no mode-switch options. #ifndef SYNCBROWSEBUTTON_H #define SYNCBROWSEBUTTON_H -#include <qtoolbutton.h> +#include <tqtoolbutton.h> // No synchrone browsing #define SYNCBROWSE_OFF 0 @@ -46,18 +46,19 @@ The current version only manages sync-browse and got no mode-switch options. #define SYNCBROWSE_COPY 2048 */ -class SyncBrowseButton : public QToolButton { +class SyncBrowseButton : public TQToolButton { Q_OBJECT + TQ_OBJECT public: - SyncBrowseButton(QWidget *parent=0, const char *name=0); + SyncBrowseButton(TQWidget *tqparent=0, const char *name=0); ~SyncBrowseButton(); int state(); protected: int _state; - QPixmap _icon_on; - QPixmap _icon_off; + TQPixmap _icon_on; + TQPixmap _icon_off; private slots: void slotToggled(bool on); |