summaryrefslogtreecommitdiffstats
path: root/parts/fileselector
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /parts/fileselector
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/fileselector')
-rw-r--r--parts/fileselector/fileselector_part.cpp28
-rw-r--r--parts/fileselector/fileselector_part.h6
-rw-r--r--parts/fileselector/fileselector_widget.cpp294
-rw-r--r--parts/fileselector/fileselector_widget.h50
-rw-r--r--parts/fileselector/kactionselector.cpp146
-rw-r--r--parts/fileselector/kactionselector.h64
-rw-r--r--parts/fileselector/kbookmarkhandler.cpp22
-rw-r--r--parts/fileselector/kbookmarkhandler.h18
8 files changed, 314 insertions, 314 deletions
diff --git a/parts/fileselector/fileselector_part.cpp b/parts/fileselector/fileselector_part.cpp
index 20a3d27a..4e30fe50 100644
--- a/parts/fileselector/fileselector_part.cpp
+++ b/parts/fileselector/fileselector_part.cpp
@@ -1,10 +1,10 @@
#include "fileselector_part.h"
-#include <qwhatsthis.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qslider.h>
-#include <qvbox.h>
+#include <tqwhatsthis.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqslider.h>
+#include <tqvbox.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -34,27 +34,27 @@ typedef KDevGenericFactory<FileSelectorPart> FileSelectorFactory;
static const KDevPluginInfo data("kdevfileselector");
K_EXPORT_COMPONENT_FACTORY( libkdevfileselector, FileSelectorFactory( data ) )
-FileSelectorPart::FileSelectorPart(QObject *parent, const char *name, const QStringList &)
+FileSelectorPart::FileSelectorPart(TQObject *parent, const char *name, const TQStringList &)
: KDevPlugin(&data, parent, name ? name : "FileSelectorPart")
{
setInstance(FileSelectorFactory::instance());
m_filetree = new KDevFileSelector( this, mainWindow(), partController(), 0, "fileselectorwidget" );
- connect( m_filetree->dirOperator(), SIGNAL(fileSelected(const KFileItem*)),
- this, SLOT(fileSelected(const KFileItem*)));
- connect( core(), SIGNAL(projectOpened()), this, SLOT(slotProjectOpened()) );
+ connect( m_filetree->dirOperator(), TQT_SIGNAL(fileSelected(const KFileItem*)),
+ this, TQT_SLOT(fileSelected(const KFileItem*)));
+ connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(slotProjectOpened()) );
- connect( core(), SIGNAL(configWidget(KDialogBase*)), this, SLOT(slotConfigWidget(KDialogBase*)) );
+ connect( core(), TQT_SIGNAL(configWidget(KDialogBase*)), this, TQT_SLOT(slotConfigWidget(KDialogBase*)) );
m_filetree->setCaption( i18n("File Selector") );
m_filetree->setIcon( SmallIcon( info()->icon() ) );
mainWindow()->embedSelectView( m_filetree, i18n("File Selector"), i18n("File selector") );
- QWhatsThis::add(m_filetree, i18n("<b>File selector</b><p>This file selector lists directory contents and provides some file management functions."));
+ TQWhatsThis::add(m_filetree, i18n("<b>File selector</b><p>This file selector lists directory contents and provides some file management functions."));
m_filetree->readConfig( instance()->config(), "fileselector" );
- m_newFileAction = new KAction(i18n("New File..."), CTRL+ALT+SHIFT+Key_N, this, SLOT(newFile()), this);
+ m_newFileAction = new KAction(i18n("New File..."), CTRL+ALT+SHIFT+Key_N, this, TQT_SLOT(newFile()), this);
}
FileSelectorPart::~FileSelectorPart()
@@ -82,9 +82,9 @@ void FileSelectorPart::slotProjectOpened()
void FileSelectorPart::slotConfigWidget( KDialogBase * dlg )
{
- QVBox* vbox = dlg->addVBoxPage( i18n("File Selector"), i18n("File Selector"), BarIcon( info()->icon(), KIcon::SizeMedium) );
+ TQVBox* vbox = dlg->addVBoxPage( i18n("File Selector"), i18n("File Selector"), BarIcon( info()->icon(), KIcon::SizeMedium) );
KFSConfigPage* page = new KFSConfigPage( vbox, 0, m_filetree );
- connect( dlg, SIGNAL( okClicked( ) ), page, SLOT( apply( ) ) );
+ connect( dlg, TQT_SIGNAL( okClicked( ) ), page, TQT_SLOT( apply( ) ) );
// ### implement reload
}
diff --git a/parts/fileselector/fileselector_part.h b/parts/fileselector/fileselector_part.h
index d12befb2..ae8012ea 100644
--- a/parts/fileselector/fileselector_part.h
+++ b/parts/fileselector/fileselector_part.h
@@ -6,7 +6,7 @@
#include <kdialogbase.h>
#include <kfileitem.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class KDevFileSelector;
class KDialogBase;
@@ -15,7 +15,7 @@ class FileSelectorPart : public KDevPlugin
{
Q_OBJECT
public:
- FileSelectorPart(QObject *parent, const char *name, const QStringList &);
+ FileSelectorPart(TQObject *parent, const char *name, const TQStringList &);
virtual ~FileSelectorPart();
KAction *newFileAction() const { return m_newFileAction; }
@@ -32,7 +32,7 @@ private slots:
void slotConfigWidget( KDialogBase * );
private:
- QGuardedPtr<KDevFileSelector> m_filetree;
+ TQGuardedPtr<KDevFileSelector> m_filetree;
KAction *m_newFileAction;
};
diff --git a/parts/fileselector/fileselector_widget.cpp b/parts/fileselector/fileselector_widget.cpp
index 8996a0d1..804270e1 100644
--- a/parts/fileselector/fileselector_widget.cpp
+++ b/parts/fileselector/fileselector_widget.cpp
@@ -30,23 +30,23 @@
#include <kdevmainwindow.h>
#include <kdevpartcontroller.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qstrlist.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qapplication.h>
-#include <qlistbox.h>
-#include <qscrollbar.h>
-#include <qspinbox.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qregexp.h>
-#include <qdockarea.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqstrlist.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqapplication.h>
+#include <tqlistbox.h>
+#include <tqscrollbar.h>
+#include <tqspinbox.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqregexp.h>
+#include <tqdockarea.h>
+#include <tqtimer.h>
#include <ktexteditor/document.h>
@@ -62,7 +62,7 @@
#include <kaction.h>
#include <kmessagebox.h>
#include <ktoolbarbutton.h>
-#include <qtoolbar.h>
+#include <tqtoolbar.h>
#include <kpopupmenu.h>
#include <kdialog.h>
#include <kio/netaccess.h>
@@ -76,7 +76,7 @@ static void silenceQToolBar(QtMsgType, const char *)
{}
-KDevFileSelectorToolBar::KDevFileSelectorToolBar(QWidget *parent)
+KDevFileSelectorToolBar::KDevFileSelectorToolBar(TQWidget *parent)
: KToolBar( parent, "KDev FileSelector Toolbar", true )
{
setMinimumWidth(10);
@@ -91,8 +91,8 @@ void KDevFileSelectorToolBar::setMovingEnabled( bool)
}
-KDevFileSelectorToolBarParent::KDevFileSelectorToolBarParent(QWidget *parent)
- :QFrame(parent),m_tb(0)
+KDevFileSelectorToolBarParent::KDevFileSelectorToolBarParent(TQWidget *parent)
+ :TQFrame(parent),m_tb(0)
{}
KDevFileSelectorToolBarParent::~KDevFileSelectorToolBarParent()
{}
@@ -101,7 +101,7 @@ void KDevFileSelectorToolBarParent::setToolBar(KDevFileSelectorToolBar *tb)
m_tb=tb;
}
-void KDevFileSelectorToolBarParent::resizeEvent ( QResizeEvent * )
+void KDevFileSelectorToolBarParent::resizeEvent ( TQResizeEvent * )
{
if (m_tb)
{
@@ -115,15 +115,15 @@ void KDevFileSelectorToolBarParent::resizeEvent ( QResizeEvent * )
KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *mainWindow,
KDevPartController *partController,
- QWidget * parent, const char * name )
- : QWidget(parent, name),
+ TQWidget * parent, const char * name )
+ : TQWidget(parent, name),
m_part(part),
mainwin(mainWindow),
partController(partController)
{
mActionCollection = new KActionCollection( this );
- QVBoxLayout* lo = new QVBoxLayout(this);
+ TQVBoxLayout* lo = new TQVBoxLayout(this);
QtMsgHandler oldHandler = qInstallMsgHandler( silenceQToolBar );
@@ -136,7 +136,7 @@ KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *main
qInstallMsgHandler( oldHandler );
cmbPath = new KURLComboBox( KURLComboBox::Directories, true, this, "path combo" );
- cmbPath->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+ cmbPath->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
KURLCompletion* cmpl = new KURLCompletion(KURLCompletion::DirCompletion);
cmbPath->setCompletionObject( cmpl );
lo->addWidget(cmbPath);
@@ -165,65 +165,65 @@ KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *main
bookmarkHandler = new KBookmarkHandler( this, acmBookmarks->popupMenu() );
- QHBox* filterBox = new QHBox(this);
+ TQHBox* filterBox = new TQHBox(this);
- btnFilter = new QToolButton( filterBox );
+ btnFilter = new TQToolButton( filterBox );
btnFilter->setIconSet( SmallIconSet("filter" ) );
btnFilter->setToggleButton( true );
filter = new KHistoryCombo( true, filterBox, "filter");
- filter->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+ filter->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
filterBox->setStretchFactor(filter, 2);
- connect( btnFilter, SIGNAL( clicked() ), this, SLOT( btnFilterClick() ) );
+ connect( btnFilter, TQT_SIGNAL( clicked() ), this, TQT_SLOT( btnFilterClick() ) );
lo->addWidget(filterBox);
- connect( filter, SIGNAL( activated(const QString&) ),
- SLOT( slotFilterChange(const QString&) ) );
+ connect( filter, TQT_SIGNAL( activated(const TQString&) ),
+ TQT_SLOT( slotFilterChange(const TQString&) ) );
- connect( filter, SIGNAL( textChanged(const QString&) ),
- SLOT( slotFilterChange(const QString&) ) );
- connect( filter, SIGNAL( returnPressed(const QString&) ),
- filter, SLOT( addToHistory(const QString&) ) );
+ connect( filter, TQT_SIGNAL( textChanged(const TQString&) ),
+ TQT_SLOT( slotFilterChange(const TQString&) ) );
+ connect( filter, TQT_SIGNAL( returnPressed(const TQString&) ),
+ filter, TQT_SLOT( addToHistory(const TQString&) ) );
// kaction for the dir sync method
acSyncDir = new KAction( i18n("Current Document Directory"), "dirsynch", 0,
- this, SLOT( setActiveDocumentDir() ), mActionCollection, "sync_dir" );
+ this, TQT_SLOT( setActiveDocumentDir() ), mActionCollection, "sync_dir" );
toolbar->setIconText( KToolBar::IconOnly );
toolbar->setIconSize( 16 );
toolbar->setEnableContextMenu( false );
- connect( cmbPath, SIGNAL( urlActivated( const KURL& )),
- this, SLOT( cmbPathActivated( const KURL& ) ));
- connect( cmbPath, SIGNAL( returnPressed( const QString& )),
- this, SLOT( cmbPathReturnPressed( const QString& ) ));
- connect(dir, SIGNAL(urlEntered(const KURL&)),
- this, SLOT(dirUrlEntered(const KURL&)) );
+ connect( cmbPath, TQT_SIGNAL( urlActivated( const KURL& )),
+ this, TQT_SLOT( cmbPathActivated( const KURL& ) ));
+ connect( cmbPath, TQT_SIGNAL( returnPressed( const TQString& )),
+ this, TQT_SLOT( cmbPathReturnPressed( const TQString& ) ));
+ connect(dir, TQT_SIGNAL(urlEntered(const KURL&)),
+ this, TQT_SLOT(dirUrlEntered(const KURL&)) );
- connect(dir, SIGNAL(finishedLoading()),
- this, SLOT(dirFinishedLoading()) );
+ connect(dir, TQT_SIGNAL(finishedLoading()),
+ this, TQT_SLOT(dirFinishedLoading()) );
// enable dir sync button if current doc has a valid URL
- connect ( partController, SIGNAL(activePartChanged(KParts::Part*) ),
- this, SLOT(viewChanged() ) );
+ connect ( partController, TQT_SIGNAL(activePartChanged(KParts::Part*) ),
+ this, TQT_SLOT(viewChanged() ) );
// Connect the bookmark handler
- connect( bookmarkHandler, SIGNAL( openURL( const QString& )),
- this, SLOT( setDir( const QString& ) ) );
+ connect( bookmarkHandler, TQT_SIGNAL( openURL( const TQString& )),
+ this, TQT_SLOT( setDir( const TQString& ) ) );
- waitingUrl = QString::null;
+ waitingUrl = TQString::null;
// whatsthis help
- QWhatsThis::add
+ TQWhatsThis::add
( cmbPath,
i18n("<p>Here you can enter a path for a directory to display."
"<p>To go to a directory previously entered, press the arrow on "
"the right and choose one. <p>The entry has directory "
"completion. Right-click to choose how completion should behave.") );
- QWhatsThis::add
+ TQWhatsThis::add
( filter,
i18n("<p>Here you can enter a name filter to limit which files are displayed."
"<p>To clear the filter, toggle off the filter button to the left."
"<p>To reapply the last filter used, toggle on the filter button." ) );
- QWhatsThis::add
+ TQWhatsThis::add
( btnFilter,
i18n("<p>This button clears the name filter when toggled off, or "
"reapplies the last filter used when toggled on.") );
@@ -237,7 +237,7 @@ KDevFileSelector::~KDevFileSelector()
//BEGIN Public Methods
-void KDevFileSelector::readConfig(KConfig *config, const QString & name)
+void KDevFileSelector::readConfig(KConfig *config, const TQString & name)
{
dir->readConfig(config, name + ":dir");
dir->setView( KFile::Default );
@@ -252,11 +252,11 @@ void KDevFileSelector::readConfig(KConfig *config, const QString & name)
// if we restore history
if ( config->readBoolEntry( "restore location", true ) || kapp->isRestored() )
{
- QString loc( config->readPathEntry( "location" ) );
+ TQString loc( config->readPathEntry( "location" ) );
if ( ! loc.isEmpty() )
{
waitingDir = loc;
- QTimer::singleShot(0, this, SLOT(initialDirChangeHack()));
+ TQTimer::singleShot(0, this, TQT_SLOT(initialDirChangeHack()));
}
}
@@ -265,7 +265,7 @@ void KDevFileSelector::readConfig(KConfig *config, const QString & name)
filter->setMaxCount( config->readNumEntry( "filter history len", 9 ) );
filter->setHistoryItems( config->readListEntry("filter history"), true );
lastFilter = config->readEntry( "last filter" );
- QString flt("");
+ TQString flt("");
if ( config->readBoolEntry( "restore last filter", true ) || kapp->isRestored() )
flt = config->readEntry("current filter");
filter->lineEdit()->setText( flt );
@@ -275,11 +275,11 @@ void KDevFileSelector::readConfig(KConfig *config, const QString & name)
// connect events as needed
/// @todo - solve startup problem: no need to set location for each doc opened!
if ( autoSyncEvents & DocumentChanged )
- connect( partController, SIGNAL( viewChanged() ), this, SLOT( autoSync() ) );
+ connect( partController, TQT_SIGNAL( viewChanged() ), this, TQT_SLOT( autoSync() ) );
if ( autoSyncEvents & DocumentOpened )
- connect( partController, SIGNAL( partAdded(KParts::Part*) ),
- this, SLOT( autoSync(KParts::Part*) ) );
+ connect( partController, TQT_SIGNAL( partAdded(KParts::Part*) ),
+ this, TQT_SLOT( autoSync(KParts::Part*) ) );
}
@@ -291,7 +291,7 @@ void KDevFileSelector::initialDirChangeHack()
void KDevFileSelector::setupToolbar( KConfig *config )
{
toolbar->clear();
- QStringList tbactions = config->readListEntry( "toolbar actions", ',' );
+ TQStringList tbactions = config->readListEntry( "toolbar actions", ',' );
if ( tbactions.isEmpty() )
{
// resonable collection for default toolbar
@@ -300,7 +300,7 @@ void KDevFileSelector::setupToolbar( KConfig *config )
"bookmarks" << "sync_dir";
}
KAction *ac;
- for ( QStringList::Iterator it=tbactions.begin(); it != tbactions.end(); ++it )
+ for ( TQStringList::Iterator it=tbactions.begin(); it != tbactions.end(); ++it )
{
if ( *it == "bookmarks" || *it == "sync_dir" )
ac = mActionCollection->action( (*it).latin1() );
@@ -311,13 +311,13 @@ void KDevFileSelector::setupToolbar( KConfig *config )
}
}
-void KDevFileSelector::writeConfig(KConfig *config, const QString & name)
+void KDevFileSelector::writeConfig(KConfig *config, const TQString & name)
{
dir->writeConfig(config,name + ":dir");
config->setGroup( name );
config->writeEntry( "pathcombo history len", cmbPath->maxItems() );
- QStringList l;
+ TQStringList l;
for (int i = 0; i < cmbPath->count(); i++)
{
l.append( cmbPath->text( i ) );
@@ -341,18 +341,18 @@ void KDevFileSelector::setView(KFile::FileView view)
//BEGIN Public Slots
-void KDevFileSelector::slotFilterChange( const QString & nf )
+void KDevFileSelector::slotFilterChange( const TQString & nf )
{
- QToolTip::remove( btnFilter );
- QString f = nf.stripWhiteSpace();
+ TQToolTip::remove( btnFilter );
+ TQString f = nf.stripWhiteSpace();
bool empty = f.isEmpty() || f == "*";
if ( empty )
{
dir->clearFilter();
- filter->lineEdit()->setText( QString::null );
- QToolTip::add
+ filter->lineEdit()->setText( TQString::null );
+ TQToolTip::add
( btnFilter,
- QString( i18n("Apply last filter (\"%1\")") ).arg( lastFilter ) );
+ TQString( i18n("Apply last filter (\"%1\")") ).arg( lastFilter ) );
}
else
{
@@ -362,7 +362,7 @@ void KDevFileSelector::slotFilterChange( const QString & nf )
f.append( '*' );
dir->setNameFilter( f );
lastFilter = f;
- QToolTip::add
+ TQToolTip::add
( btnFilter, i18n("Clear filter") );
}
btnFilter->setOn( !empty );
@@ -385,9 +385,9 @@ void KDevFileSelector::cmbPathActivated( const KURL& u )
cmbPathReturnPressed( u.url() );
}
-void KDevFileSelector::cmbPathReturnPressed( const QString& u )
+void KDevFileSelector::cmbPathReturnPressed( const TQString& u )
{
- QStringList urls = cmbPath->urls();
+ TQStringList urls = cmbPath->urls();
urls.remove( u );
urls.prepend( u );
cmbPath->setURLs( urls, KURLComboBox::RemoveBottom );
@@ -415,7 +415,7 @@ void KDevFileSelector::btnFilterClick()
{
if ( !btnFilter->isOn() )
{
- slotFilterChange( QString::null );
+ slotFilterChange( TQString::null );
}
else
{
@@ -432,7 +432,7 @@ void KDevFileSelector::autoSync()
if ( isVisible() )
{
setActiveDocumentDir();
- waitingUrl = QString::null;
+ waitingUrl = TQString::null;
}
// else set waiting url
else
@@ -454,13 +454,13 @@ void KDevFileSelector::autoSync( KParts::Part *part )
KURL u ( doc->url() );
if ( u.isEmpty() )
{
- waitingUrl = QString::null;
+ waitingUrl = TQString::null;
return;
}
if ( isVisible() )
{
setDir( u.directory() );
- waitingUrl = QString::null;
+ waitingUrl = TQString::null;
}
else
{
@@ -487,39 +487,39 @@ void KDevFileSelector::viewChanged()
//BEGIN Protected
-void KDevFileSelector::focusInEvent( QFocusEvent * )
+void KDevFileSelector::focusInEvent( TQFocusEvent * )
{
dir->setFocus();
}
-void KDevFileSelector::showEvent( QShowEvent * )
+void KDevFileSelector::showEvent( TQShowEvent * )
{
// sync if we should
if ( autoSyncEvents & GotVisible )
{
kdDebug()<<"syncing fs on show"<<endl;
setActiveDocumentDir();
- waitingUrl = QString::null;
+ waitingUrl = TQString::null;
}
// else, if we have a waiting URL set it
else if ( ! waitingUrl.isEmpty() )
{
setDir( waitingUrl );
- waitingUrl = QString::null;
+ waitingUrl = TQString::null;
}
}
-bool KDevFileSelector::eventFilter( QObject* o, QEvent *e )
+bool KDevFileSelector::eventFilter( TQObject* o, TQEvent *e )
{
/*
This is rather unfortunate, but:
- QComboBox does not support setting the size of the listbox to something
+ TQComboBox does not support setting the size of the listbox to something
resonable. Even using listbox->setVariableWidth() does not yeld a
satisfying result, something is wrong with the handling of the sizehint.
And the popup is rather useless, if the paths are only partly visible.
*/
- QListBox *lb = cmbPath->listBox();
- if ( o == lb && e->type() == QEvent::Show )
+ TQListBox *lb = cmbPath->listBox();
+ if ( o == lb && e->type() == TQEvent::Show )
{
int add
= lb->height() < lb->contentsHeight() ? lb->verticalScrollBar()->width() : 0;
@@ -530,7 +530,7 @@ bool KDevFileSelector::eventFilter( QObject* o, QEvent *e )
/// are changed.
}
/// @todo - same thing for the completion popup?
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
}
//END Protected
@@ -543,20 +543,20 @@ bool KDevFileSelector::eventFilter( QObject* o, QEvent *e )
class ActionLBItem : public QListBoxPixmap
{
public:
- ActionLBItem( QListBox *lb=0,
- const QPixmap &pm = QPixmap(),
- const QString &text=QString::null,
- const QString &str=QString::null ) :
- QListBoxPixmap( lb, pm, text ),
+ ActionLBItem( TQListBox *lb=0,
+ const TQPixmap &pm = TQPixmap(),
+ const TQString &text=TQString::null,
+ const TQString &str=TQString::null ) :
+ TQListBoxPixmap( lb, pm, text ),
_str(str)
{}
;
- QString idstring()
+ TQString idstring()
{
return _str;
};
private:
- QString _str;
+ TQString _str;
};
KURL KDevFileSelector::activeDocumentUrl( )
@@ -575,88 +575,88 @@ KURL KDevFileSelector::activeDocumentUrl( )
////////////////////////////////////////////////////////////////////////////////
// KFSConfigPage implementation
////////////////////////////////////////////////////////////////////////////////
-KFSConfigPage::KFSConfigPage( QWidget *parent, const char *name, KDevFileSelector *kfs )
- : QWidget( parent, name ),
+KFSConfigPage::KFSConfigPage( TQWidget *parent, const char *name, KDevFileSelector *kfs )
+ : TQWidget( parent, name ),
fileSelector( kfs ),
bDirty( false )
{
- QVBoxLayout *lo = new QVBoxLayout( this );
+ TQVBoxLayout *lo = new TQVBoxLayout( this );
int spacing = KDialog::spacingHint();
lo->setSpacing( spacing );
// Toolbar - a lot for a little...
- QGroupBox *gbToolbar = new QGroupBox( 1, Qt::Vertical, i18n("Toolbar"), this );
+ TQGroupBox *gbToolbar = new TQGroupBox( 1, Qt::Vertical, i18n("Toolbar"), this );
acSel = new KActionSelector( gbToolbar );
acSel->setAvailableLabel( i18n("A&vailable actions:") );
acSel->setSelectedLabel( i18n("S&elected actions:") );
lo->addWidget( gbToolbar );
- connect( acSel, SIGNAL( added( QListBoxItem * ) ), this, SLOT( slotChanged() ) );
- connect( acSel, SIGNAL( removed( QListBoxItem * ) ), this, SLOT( slotChanged() ) );
- connect( acSel, SIGNAL( movedUp( QListBoxItem * ) ), this, SLOT( slotChanged() ) );
- connect( acSel, SIGNAL( movedDown( QListBoxItem * ) ), this, SLOT( slotChanged() ) );
+ connect( acSel, TQT_SIGNAL( added( TQListBoxItem * ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( acSel, TQT_SIGNAL( removed( TQListBoxItem * ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( acSel, TQT_SIGNAL( movedUp( TQListBoxItem * ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( acSel, TQT_SIGNAL( movedDown( TQListBoxItem * ) ), this, TQT_SLOT( slotChanged() ) );
// Sync
- QGroupBox *gbSync = new QGroupBox( 1, Qt::Horizontal, i18n("Auto Synchronization"), this );
- cbSyncActive = new QCheckBox( i18n("When a docu&ment becomes active"), gbSync );
- cbSyncOpen = new QCheckBox( i18n("When a document is o&pened"), gbSync );
- cbSyncShow = new QCheckBox( i18n("When the file selector becomes visible"), gbSync );
+ TQGroupBox *gbSync = new TQGroupBox( 1, Qt::Horizontal, i18n("Auto Synchronization"), this );
+ cbSyncActive = new TQCheckBox( i18n("When a docu&ment becomes active"), gbSync );
+ cbSyncOpen = new TQCheckBox( i18n("When a document is o&pened"), gbSync );
+ cbSyncShow = new TQCheckBox( i18n("When the file selector becomes visible"), gbSync );
lo->addWidget( gbSync );
- connect( cbSyncActive, SIGNAL( toggled( bool ) ), this, SLOT( slotChanged() ) );
- connect( cbSyncOpen, SIGNAL( toggled( bool ) ), this, SLOT( slotChanged() ) );
- connect( cbSyncShow, SIGNAL( toggled( bool ) ), this, SLOT( slotChanged() ) );
+ connect( cbSyncActive, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( cbSyncOpen, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( cbSyncShow, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) );
// Histories
- QHBox *hbPathHist = new QHBox ( this );
- QLabel *lbPathHist = new QLabel( i18n("Remember &locations:"), hbPathHist );
- sbPathHistLength = new QSpinBox( hbPathHist );
+ TQHBox *hbPathHist = new TQHBox ( this );
+ TQLabel *lbPathHist = new TQLabel( i18n("Remember &locations:"), hbPathHist );
+ sbPathHistLength = new TQSpinBox( hbPathHist );
lbPathHist->setBuddy( sbPathHistLength );
lo->addWidget( hbPathHist );
- connect( sbPathHistLength, SIGNAL( valueChanged ( int ) ), this, SLOT( slotChanged() ) );
+ connect( sbPathHistLength, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( slotChanged() ) );
- QHBox *hbFilterHist = new QHBox ( this );
- QLabel *lbFilterHist = new QLabel( i18n("Remember &filters:"), hbFilterHist );
- sbFilterHistLength = new QSpinBox( hbFilterHist );
+ TQHBox *hbFilterHist = new TQHBox ( this );
+ TQLabel *lbFilterHist = new TQLabel( i18n("Remember &filters:"), hbFilterHist );
+ sbFilterHistLength = new TQSpinBox( hbFilterHist );
lbFilterHist->setBuddy( sbFilterHistLength );
lo->addWidget( hbFilterHist );
- connect( sbFilterHistLength, SIGNAL( valueChanged ( int ) ), this, SLOT( slotChanged() ) );
+ connect( sbFilterHistLength, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( slotChanged() ) );
// Session
- QGroupBox *gbSession = new QGroupBox( 1, Qt::Horizontal, i18n("Session"), this );
- cbSesLocation = new QCheckBox( i18n("Restore loca&tion"), gbSession );
- cbSesFilter = new QCheckBox( i18n("Restore last f&ilter"), gbSession );
+ TQGroupBox *gbSession = new TQGroupBox( 1, Qt::Horizontal, i18n("Session"), this );
+ cbSesLocation = new TQCheckBox( i18n("Restore loca&tion"), gbSession );
+ cbSesFilter = new TQCheckBox( i18n("Restore last f&ilter"), gbSession );
lo->addWidget( gbSession );
- connect( cbSesLocation, SIGNAL( toggled( bool ) ), this, SLOT( slotChanged() ) );
- connect( cbSesFilter, SIGNAL( toggled( bool ) ), this, SLOT( slotChanged() ) );
+ connect( cbSesLocation, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) );
+ connect( cbSesFilter, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) );
// make it look nice
lo->addStretch( 1 );
// be helpfull
/*
- QWhatsThis::add( lbAvailableActions, i18n(
+ TQWhatsThis::add( lbAvailableActions, i18n(
"<p>Available actions for the toolbar. To add an action, select it here "
"and press the add (<strong>-&gt;</strong>) button" ) );
- QWhatsThis::add( lbUsedActions, i18n(
+ TQWhatsThis::add( lbUsedActions, i18n(
"<p>Actions used in the toolbar. To remove an action, select it and "
"press the remove (<strong>&lt;-</strong>) button."
"<p>To change the order of the actions, use the Up and Down buttons to "
"move the selected action.") );
*/
- QString lhwt( i18n(
+ TQString lhwt( i18n(
"<p>Decides how many locations to keep in the history of the location "
"combo box") );
- QWhatsThis::add
+ TQWhatsThis::add
( lbPathHist, lhwt );
- QWhatsThis::add
+ TQWhatsThis::add
( sbPathHistLength, lhwt );
- QString fhwt( i18n(
+ TQString fhwt( i18n(
"<p>Decides how many filters to keep in the history of the filter "
"combo box") );
- QWhatsThis::add
+ TQWhatsThis::add
( lbFilterHist, fhwt );
- QWhatsThis::add
+ TQWhatsThis::add
( sbFilterHistLength, fhwt );
- QString synwt( i18n(
+ TQString synwt( i18n(
"<p>These options allow you to have the File Selector automatically "
"change location to the directory of the active document on certain "
"events."
@@ -664,14 +664,14 @@ KFSConfigPage::KFSConfigPage( QWidget *parent, const char *name, KDevFileSelecto
"effect until the file selector is visible."
"<p>None of these are enabled by default, but you can always sync the "
"location by pressing the sync button in the toolbar.") );
- QWhatsThis::add
+ TQWhatsThis::add
( gbSync, synwt );
- QWhatsThis::add
+ TQWhatsThis::add
( cbSesLocation, i18n(
"<p>If this option is enabled (default), the location will be restored "
"when you start KDev.<p><strong>Note</strong> that if the session is "
"handled by the KDE session manager, the location is always restored.") );
- QWhatsThis::add
+ TQWhatsThis::add
( cbSesFilter, i18n(
"<p>If this option is enabled (default), the current filter will be "
"restored when you start KDev.<p><strong>Note</strong> that if the "
@@ -689,8 +689,8 @@ void KFSConfigPage::apply()
KConfig *config = fileSelector->m_part->instance()->config();
config->setGroup( "fileselector" );
// toolbar
- QStringList l;
- QListBoxItem *item = acSel->selectedListBox()->firstItem();
+ TQStringList l;
+ TQListBoxItem *item = acSel->selectedListBox()->firstItem();
ActionLBItem *aItem;
while ( item )
{
@@ -713,16 +713,16 @@ void KFSConfigPage::apply()
s |= KDevFileSelector::GotVisible;
fileSelector->autoSyncEvents = s;
// reset connections
- disconnect( fileSelector->partController, 0, fileSelector, SLOT( autoSync() ) );
+ disconnect( fileSelector->partController, 0, fileSelector, TQT_SLOT( autoSync() ) );
disconnect( fileSelector->partController, 0,
- fileSelector, SLOT( autoSync( KParts::Part *) ) );
+ fileSelector, TQT_SLOT( autoSync( KParts::Part *) ) );
if ( s & KDevFileSelector::DocumentChanged )
- connect( fileSelector->partController, SIGNAL( viewChanged() ),
- fileSelector, SLOT( autoSync() ) );
+ connect( fileSelector->partController, TQT_SIGNAL( viewChanged() ),
+ fileSelector, TQT_SLOT( autoSync() ) );
if ( s & KDevFileSelector::DocumentOpened )
connect( fileSelector->partController,
- SIGNAL( partAdded(KParts::Part *) ),
- fileSelector, SLOT( autoSync(KParts::Part *) ) );
+ TQT_SIGNAL( partAdded(KParts::Part *) ),
+ fileSelector, TQT_SLOT( autoSync(KParts::Part *) ) );
// histories
fileSelector->cmbPath->setMaxItems( sbPathHistLength->value() );
@@ -744,23 +744,23 @@ void KFSConfigPage::init()
KConfig *config = fileSelector->m_part->instance()->config();
config->setGroup( "fileselector" );
// toolbar
- QStringList l = config->readListEntry( "toolbar actions", ',' );
+ TQStringList l = config->readListEntry( "toolbar actions", ',' );
if ( l.isEmpty() ) // default toolbar
l << "up" << "back" << "forward" << "home" <<
"short view" << "detailed view" <<
"bookmarks" << "sync_dir";
// actions from diroperator + two of our own
- QStringList allActions;
+ TQStringList allActions;
allActions << "up" << "back" << "forward" << "home" <<
"reload" << "mkdir" << "delete" <<
"short view" << "detailed view" /*<< "view menu" <<
"show hidden" << "properties"*/ <<
"bookmarks" << "sync_dir";
- QRegExp re("&(?=[^&])");
+ TQRegExp re("&(?=[^&])");
KAction *ac;
- QListBox *lb;
- for ( QStringList::Iterator it=allActions.begin(); it != allActions.end(); ++it )
+ TQListBox *lb;
+ for ( TQStringList::Iterator it=allActions.begin(); it != allActions.end(); ++it )
{
lb = l.contains( *it ) ? acSel->selectedListBox() : acSel->availableListBox();
if ( *it == "bookmarks" || *it == "sync_dir" )
@@ -793,7 +793,7 @@ void KFSConfigPage::slotChanged()
//BEGIN KDevDirOperator
-void KDevDirOperator::activatedMenu( const KFileItem *fi, const QPoint & pos )
+void KDevDirOperator::activatedMenu( const KFileItem *fi, const TQPoint & pos )
{
setupMenu();
updateSelectionDependentActions();
diff --git a/parts/fileselector/fileselector_widget.h b/parts/fileselector/fileselector_widget.h
index d39fd25d..4811c398 100644
--- a/parts/fileselector/fileselector_widget.h
+++ b/parts/fileselector/fileselector_widget.h
@@ -22,11 +22,11 @@
#ifndef FILESELECTOR_WIDGET_H
#define FILESELECTOR_WIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kfile.h>
#include <kurl.h>
#include <ktoolbar.h>
-#include <qframe.h>
+#include <tqframe.h>
#include <kdiroperator.h>
class KDevMainWindow;
@@ -61,7 +61,7 @@ class KDevFileSelectorToolBar: public KToolBar
{
Q_OBJECT
public:
- KDevFileSelectorToolBar(QWidget *parent);
+ KDevFileSelectorToolBar(TQWidget *parent);
virtual ~KDevFileSelectorToolBar();
virtual void setMovingEnabled( bool b );
@@ -71,7 +71,7 @@ class KDevFileSelectorToolBarParent: public QFrame
{
Q_OBJECT
public:
- KDevFileSelectorToolBarParent(QWidget *parent);
+ KDevFileSelectorToolBarParent(TQWidget *parent);
~KDevFileSelectorToolBarParent();
void setToolBar(KDevFileSelectorToolBar *tb);
@@ -79,20 +79,20 @@ private:
KDevFileSelectorToolBar *m_tb;
protected:
- virtual void resizeEvent ( QResizeEvent * );
+ virtual void resizeEvent ( TQResizeEvent * );
};
class KDevDirOperator: public KDirOperator
{
Q_OBJECT
public:
- KDevDirOperator(FileSelectorPart *part, const KURL &urlName=KURL(), QWidget *parent=0, const char *name=0)
+ KDevDirOperator(FileSelectorPart *part, const KURL &urlName=KURL(), TQWidget *parent=0, const char *name=0)
:KDirOperator(urlName, parent, name), m_part(part)
{
}
protected slots:
- virtual void activatedMenu (const KFileItem *fi, const QPoint &pos);
+ virtual void activatedMenu (const KFileItem *fi, const TQPoint &pos);
private:
FileSelectorPart *m_part;
@@ -109,24 +109,24 @@ public:
enum AutoSyncEvent { DocumentChanged=1, DocumentOpened=2, GotVisible=4 };
KDevFileSelector( FileSelectorPart *part, KDevMainWindow *mainWindow=0, KDevPartController *partController=0,
- QWidget * parent = 0, const char * name = 0 );
+ TQWidget * parent = 0, const char * name = 0 );
~KDevFileSelector();
- void readConfig( KConfig *, const QString & );
- void writeConfig( KConfig *, const QString & );
+ void readConfig( KConfig *, const TQString & );
+ void writeConfig( KConfig *, const TQString & );
void setupToolbar( KConfig * );
void setView( KFile::FileView );
KDevDirOperator *dirOperator(){ return dir; }
KActionCollection *actionCollection() { return mActionCollection; };
public slots:
- void slotFilterChange(const QString&);
+ void slotFilterChange(const TQString&);
void setDir(KURL);
- void setDir( const QString& url ) { setDir( KURL( url ) ); };
+ void setDir( const TQString& url ) { setDir( KURL( url ) ); };
private slots:
void cmbPathActivated( const KURL& u );
- void cmbPathReturnPressed( const QString& u );
+ void cmbPathReturnPressed( const TQString& u );
void dirUrlEntered( const KURL& u );
void dirFinishedLoading();
void setActiveDocumentDir();
@@ -136,9 +136,9 @@ private slots:
void autoSync( KParts::Part * );
void initialDirChangeHack();
protected:
- void focusInEvent( QFocusEvent * );
- void showEvent( QShowEvent * );
- bool eventFilter( QObject *, QEvent * );
+ void focusInEvent( TQFocusEvent * );
+ void showEvent( TQShowEvent * );
+ bool eventFilter( TQObject *, TQEvent * );
KURL activeDocumentUrl();
private:
@@ -149,16 +149,16 @@ private:
KDevDirOperator * dir;
class KAction *acSyncDir;
KHistoryCombo * filter;
- class QToolButton *btnFilter;
+ class TQToolButton *btnFilter;
FileSelectorPart *m_part;
KDevMainWindow *mainwin;
KDevPartController *partController;
- QString lastFilter;
+ TQString lastFilter;
int autoSyncEvents; // enabled autosync events
- QString waitingUrl; // maybe display when we gets visible
- QString waitingDir;
+ TQString waitingUrl; // maybe display when we gets visible
+ TQString waitingDir;
};
/* @todo anders
@@ -178,7 +178,7 @@ class KFSConfigPage : public QWidget
{
Q_OBJECT
public:
- KFSConfigPage( QWidget* parent=0, const char *name=0, KDevFileSelector *kfs=0);
+ KFSConfigPage( TQWidget* parent=0, const char *name=0, KDevFileSelector *kfs=0);
virtual ~KFSConfigPage() {};
public slots:
@@ -191,11 +191,11 @@ private:
KDevFileSelector *fileSelector;
bool bDirty;
- //class QListBox *lbAvailableActions, *lbUsedActions;
+ //class TQListBox *lbAvailableActions, *lbUsedActions;
KActionSelector *acSel;
- class QSpinBox *sbPathHistLength, *sbFilterHistLength;
- class QCheckBox *cbSyncOpen, *cbSyncActive, *cbSyncShow;
- class QCheckBox *cbSesLocation, *cbSesFilter;
+ class TQSpinBox *sbPathHistLength, *sbFilterHistLength;
+ class TQCheckBox *cbSyncOpen, *cbSyncActive, *cbSyncShow;
+ class TQCheckBox *cbSesLocation, *cbSesFilter;
};
diff --git a/parts/fileselector/kactionselector.cpp b/parts/fileselector/kactionselector.cpp
index eec95a6d..a3c4034d 100644
--- a/parts/fileselector/kactionselector.cpp
+++ b/parts/fileselector/kactionselector.cpp
@@ -23,38 +23,38 @@
#include <kiconloader.h>
#include <kdialog.h> // for spacingHint()
#include <kdebug.h>
-#include <qapplication.h>
+#include <tqapplication.h>
-#include <qlistbox.h>
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qevent.h>
-#include <qwhatsthis.h>
+#include <tqlistbox.h>
+#include <tqtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqevent.h>
+#include <tqwhatsthis.h>
class KActionSelectorPrivate {
public:
- QListBox *availableListBox, *selectedListBox;
- QToolButton *btnAdd, *btnRemove, *btnUp, *btnDown;
- QLabel *lAvailable, *lSelected;
+ TQListBox *availableListBox, *selectedListBox;
+ TQToolButton *btnAdd, *btnRemove, *btnUp, *btnDown;
+ TQLabel *lAvailable, *lSelected;
bool moveOnDoubleClick, keyboardEnabled;
KActionSelector::ButtonIconSize iconSize;
- QString addIcon, removeIcon, upIcon, downIcon;
+ TQString addIcon, removeIcon, upIcon, downIcon;
KActionSelector::InsertionPolicy availableInsertionPolicy, selectedInsertionPolicy;
bool showUpDownButtons;
};
//BEGIN Constructor/destructor
-KActionSelector::KActionSelector( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KActionSelector::KActionSelector( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
d = new KActionSelectorPrivate();
d->moveOnDoubleClick = true;
d->keyboardEnabled = true;
d->iconSize = SmallIcon;
- d->addIcon = QApplication::reverseLayout() ? "back" : "forward";
- d->removeIcon = QApplication::reverseLayout() ? "forward" : "back";
+ d->addIcon = TQApplication::reverseLayout() ? "back" : "forward";
+ d->removeIcon = TQApplication::reverseLayout() ? "forward" : "back";
d->upIcon = "up";
d->downIcon = "down";
d->availableInsertionPolicy = Sorted;
@@ -63,53 +63,53 @@ KActionSelector::KActionSelector( QWidget *parent, const char *name )
//int isz = IconSize( KIcon::Small );
- QHBoxLayout *lo = new QHBoxLayout( this );
+ TQHBoxLayout *lo = new TQHBoxLayout( this );
lo->setSpacing( KDialog::spacingHint() );
- QVBoxLayout *loAv = new QVBoxLayout( lo );
- d->lAvailable = new QLabel( i18n("&Available:"), this );
+ TQVBoxLayout *loAv = new TQVBoxLayout( lo );
+ d->lAvailable = new TQLabel( i18n("&Available:"), this );
loAv->addWidget( d->lAvailable );
- d->availableListBox = new QListBox( this );
+ d->availableListBox = new TQListBox( this );
loAv->addWidget( d->availableListBox );
d->lAvailable->setBuddy( d->availableListBox );
- QVBoxLayout *loHBtns = new QVBoxLayout( lo );
+ TQVBoxLayout *loHBtns = new TQVBoxLayout( lo );
loHBtns->addStretch( 1 );
- d->btnAdd = new QToolButton( this );
+ d->btnAdd = new TQToolButton( this );
loHBtns->addWidget( d->btnAdd );
- d->btnRemove = new QToolButton( this );
+ d->btnRemove = new TQToolButton( this );
loHBtns->addWidget( d->btnRemove );
loHBtns->addStretch( 1 );
- QVBoxLayout *loS = new QVBoxLayout( lo );
- d->lSelected = new QLabel( i18n("&Selected:"), this );
+ TQVBoxLayout *loS = new TQVBoxLayout( lo );
+ d->lSelected = new TQLabel( i18n("&Selected:"), this );
loS->addWidget( d->lSelected );
- d->selectedListBox = new QListBox( this );
+ d->selectedListBox = new TQListBox( this );
loS->addWidget( d->selectedListBox );
d->lSelected->setBuddy( d->selectedListBox );
- QVBoxLayout *loVBtns = new QVBoxLayout( lo );
+ TQVBoxLayout *loVBtns = new TQVBoxLayout( lo );
loVBtns->addStretch( 1 );
- d->btnUp = new QToolButton( this );
+ d->btnUp = new TQToolButton( this );
loVBtns->addWidget( d->btnUp );
- d->btnDown = new QToolButton( this );
+ d->btnDown = new TQToolButton( this );
loVBtns->addWidget( d->btnDown );
loVBtns->addStretch( 1 );
loadIcons();
- connect( d->btnAdd, SIGNAL(clicked()), this, SLOT(buttonAddClicked()) );
- connect( d->btnRemove, SIGNAL(clicked()), this, SLOT(buttonRemoveClicked()) );
- connect( d->btnUp, SIGNAL(clicked()), this, SLOT(buttonUpClicked()) );
- connect( d->btnDown, SIGNAL(clicked()), this, SLOT(buttonDownClicked()) );
- connect( d->availableListBox, SIGNAL(doubleClicked(QListBoxItem*)),
- this, SLOT(itemDoubleClicked(QListBoxItem*)) );
- connect( d->selectedListBox, SIGNAL(doubleClicked(QListBoxItem*)),
- this, SLOT(itemDoubleClicked(QListBoxItem*)) );
- connect( d->availableListBox, SIGNAL(currentChanged(QListBoxItem*)),
- this, SLOT(slotCurrentChanged(QListBoxItem *)) );
- connect( d->selectedListBox, SIGNAL(currentChanged(QListBoxItem*)),
- this, SLOT(slotCurrentChanged(QListBoxItem *)) );
+ connect( d->btnAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonAddClicked()) );
+ connect( d->btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonRemoveClicked()) );
+ connect( d->btnUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonUpClicked()) );
+ connect( d->btnDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonDownClicked()) );
+ connect( d->availableListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)),
+ this, TQT_SLOT(itemDoubleClicked(TQListBoxItem*)) );
+ connect( d->selectedListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)),
+ this, TQT_SLOT(itemDoubleClicked(TQListBoxItem*)) );
+ connect( d->availableListBox, TQT_SIGNAL(currentChanged(TQListBoxItem*)),
+ this, TQT_SLOT(slotCurrentChanged(TQListBoxItem *)) );
+ connect( d->selectedListBox, TQT_SIGNAL(currentChanged(TQListBoxItem*)),
+ this, TQT_SLOT(slotCurrentChanged(TQListBoxItem *)) );
d->availableListBox->installEventFilter( this );
d->selectedListBox->installEventFilter( this );
@@ -124,17 +124,17 @@ KActionSelector::~KActionSelector()
//BEGIN Public Methods
-QListBox *KActionSelector::availableListBox()
+TQListBox *KActionSelector::availableListBox()
{
return d->availableListBox;
}
-QListBox *KActionSelector::selectedListBox()
+TQListBox *KActionSelector::selectedListBox()
{
return d->selectedListBox;
}
-void KActionSelector::setButtonIcon( const QString &icon, MoveButton button )
+void KActionSelector::setButtonIcon( const TQString &icon, MoveButton button )
{
switch ( button )
{
@@ -159,7 +159,7 @@ void KActionSelector::setButtonIcon( const QString &icon, MoveButton button )
}
}
-void KActionSelector::setButtonIconSet( const QIconSet &iconset, MoveButton button )
+void KActionSelector::setButtonIconSet( const TQIconSet &iconset, MoveButton button )
{
switch ( button )
{
@@ -180,7 +180,7 @@ void KActionSelector::setButtonIconSet( const QIconSet &iconset, MoveButton butt
}
}
-void KActionSelector::setButtonTooltip( const QString &tip, MoveButton button )
+void KActionSelector::setButtonTooltip( const TQString &tip, MoveButton button )
{
switch ( button )
{
@@ -201,21 +201,21 @@ void KActionSelector::setButtonTooltip( const QString &tip, MoveButton button )
}
}
-void KActionSelector::setButtonWhatsThis( const QString &text, MoveButton button )
+void KActionSelector::setButtonWhatsThis( const TQString &text, MoveButton button )
{
switch ( button )
{
case ButtonAdd:
- QWhatsThis::add( d->btnAdd, text );
+ TQWhatsThis::add( d->btnAdd, text );
break;
case ButtonRemove:
- QWhatsThis::add( d->btnRemove, text );
+ TQWhatsThis::add( d->btnRemove, text );
break;
case ButtonUp:
- QWhatsThis::add( d->btnUp, text );
+ TQWhatsThis::add( d->btnUp, text );
break;
case ButtonDown:
- QWhatsThis::add( d->btnDown, text );
+ TQWhatsThis::add( d->btnDown, text );
break;
default:
kdDebug()<<"KActionSelector::setButtonWhatsThis: DAINBREAD!"<<endl;
@@ -255,22 +255,22 @@ void KActionSelector::setKeyboardEnabled( bool b )
d->keyboardEnabled = b;
}
-QString KActionSelector::availableLabel() const
+TQString KActionSelector::availableLabel() const
{
return d->lAvailable->text();
}
-void KActionSelector::setAvailableLabel( const QString &text )
+void KActionSelector::setAvailableLabel( const TQString &text )
{
d->lAvailable->setText( text );
}
-QString KActionSelector::selectedLabel() const
+TQString KActionSelector::selectedLabel() const
{
return d->lSelected->text();
}
-void KActionSelector::setSelectedLabel( const QString &text )
+void KActionSelector::setSelectedLabel( const TQString &text )
{
d->lSelected->setText( text );
}
@@ -339,7 +339,7 @@ void KActionSelector::polish()
//END Public Slots
//BEGIN Protected
-void KActionSelector::keyPressEvent( QKeyEvent *e )
+void KActionSelector::keyPressEvent( TQKeyEvent *e )
{
if ( ! d->keyboardEnabled ) return;
if ( (e->state() & Qt::ControlButton) )
@@ -365,13 +365,13 @@ void KActionSelector::keyPressEvent( QKeyEvent *e )
}
}
-bool KActionSelector::eventFilter( QObject *o, QEvent *e )
+bool KActionSelector::eventFilter( TQObject *o, TQEvent *e )
{
- if ( d->keyboardEnabled && e->type() == QEvent::KeyPress )
+ if ( d->keyboardEnabled && e->type() == TQEvent::KeyPress )
{
- if ( (((QKeyEvent*)e)->state() & Qt::ControlButton) )
+ if ( (((TQKeyEvent*)e)->state() & Qt::ControlButton) )
{
- switch ( ((QKeyEvent*)e)->key() )
+ switch ( ((TQKeyEvent*)e)->key() )
{
case Key_Right:
buttonAddClicked();
@@ -386,18 +386,18 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e )
buttonDownClicked();
break;
default:
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
break;
}
return true;
}
- else if ( o->inherits( "QListBox" ) )
+ else if ( o->inherits( "TQListBox" ) )
{
- switch ( ((QKeyEvent*)e)->key() )
+ switch ( ((TQKeyEvent*)e)->key() )
{
case Key_Return:
case Key_Enter:
- QListBox *lb = (QListBox*)o;
+ TQListBox *lb = (TQListBox*)o;
int index = lb->currentItem();
if ( index < 0 ) break;
moveItem( lb->item( index ) );
@@ -405,7 +405,7 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e )
}
}
}
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
}
//END Protected
@@ -415,7 +415,7 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e )
void KActionSelector::buttonAddClicked()
{
// move all selected items from available to selected listbox
- QListBoxItem *item = d->availableListBox->firstItem();
+ TQListBoxItem *item = d->availableListBox->firstItem();
while ( item ) {
if ( item->isSelected() ) {
d->availableListBox->takeItem( item );
@@ -433,7 +433,7 @@ void KActionSelector::buttonAddClicked()
void KActionSelector::buttonRemoveClicked()
{
// move all selected items from selected to available listbox
- QListBoxItem *item = d->selectedListBox->firstItem();
+ TQListBoxItem *item = d->selectedListBox->firstItem();
while ( item ) {
if ( item->isSelected() ) {
d->selectedListBox->takeItem( item );
@@ -452,7 +452,7 @@ void KActionSelector::buttonUpClicked()
{
int c = d->selectedListBox->currentItem();
if ( c < 0 ) return;
- QListBoxItem *item = d->selectedListBox->item( c );
+ TQListBoxItem *item = d->selectedListBox->item( c );
d->selectedListBox->takeItem( item );
d->selectedListBox->insertItem( item, c-1 );
d->selectedListBox->setCurrentItem( item );
@@ -463,14 +463,14 @@ void KActionSelector::buttonDownClicked()
{
int c = d->selectedListBox->currentItem();
if ( c < 0 ) return;
- QListBoxItem *item = d->selectedListBox->item( c );
+ TQListBoxItem *item = d->selectedListBox->item( c );
d->selectedListBox->takeItem( item );
d->selectedListBox->insertItem( item, c+1 );
d->selectedListBox->setCurrentItem( item );
emit movedDown( item );
}
-void KActionSelector::itemDoubleClicked( QListBoxItem *item )
+void KActionSelector::itemDoubleClicked( TQListBoxItem *item )
{
if ( d->moveOnDoubleClick )
moveItem( item );
@@ -488,10 +488,10 @@ void KActionSelector::loadIcons()
d->btnDown->setIconSet( SmallIconSet( d->downIcon, d->iconSize ) );
}
-void KActionSelector::moveItem( QListBoxItem *item )
+void KActionSelector::moveItem( TQListBoxItem *item )
{
- QListBox *lbFrom = item->listBox();
- QListBox *lbTo;
+ TQListBox *lbFrom = item->listBox();
+ TQListBox *lbTo;
if ( lbFrom == d->availableListBox )
lbTo = d->selectedListBox;
else if ( lbFrom == d->selectedListBox )
@@ -515,7 +515,7 @@ void KActionSelector::moveItem( QListBoxItem *item )
emit removed( item );
}
-int KActionSelector::insertionIndex( QListBox *lb, InsertionPolicy policy )
+int KActionSelector::insertionIndex( TQListBox *lb, InsertionPolicy policy )
{
int index;
switch ( policy )
diff --git a/parts/fileselector/kactionselector.h b/parts/fileselector/kactionselector.h
index b8d54e97..74e6575d 100644
--- a/parts/fileselector/kactionselector.h
+++ b/parts/fileselector/kactionselector.h
@@ -19,7 +19,7 @@
#ifndef _KACTION_SELECTOR_H_
#define _KACTION_SELECTOR_H_
-#include <qwidget.h>
+#include <tqwidget.h>
class QListBox;
class QListBoxItem;
@@ -45,13 +45,13 @@ class KActionSelectorPrivate;
see keyboardEnabled.
Note that this may conflist with keyboard selection in the selected list box,
- if you set that to anything else than QListBox::Single (which is the default).
+ if you set that to anything else than TQListBox::Single (which is the default).
To use it, simply construct an instance and then add items to the two listboxes,
available through lbAvailable() and lbSelected(). Whenever you want, you can retrieve
- the selected options using QListBox methods on lbSelected().
+ the selected options using TQListBox methods on lbSelected().
- This way, you can use your own QListBoxItem class, allowing you to easily
+ This way, you can use your own TQListBoxItem class, allowing you to easily
store object data in those.
When an item is moved to a listbox, it is placed below the current item
@@ -73,31 +73,31 @@ class KActionSelectorPrivate;
@author Anders Lund <anders@alweb.dk>
*/
-class KActionSelector : public QWidget {
+class KActionSelector : public TQWidget {
Q_OBJECT
Q_ENUMS( ButtonIconSize InsertionPolicy )
Q_PROPERTY( bool moveOnDoubleClick READ moveOnDoubleClick WRITE setMoveOnDoubleClick )
Q_PROPERTY( bool keyboardEnabled READ keyboardEnabled WRITE setKeyboardEnabled )
- Q_PROPERTY( QString availableLabel READ availableLabel WRITE setAvailableLabel )
- Q_PROPERTY( QString selectedLabel READ selectedLabel WRITE setSelectedLabel )
+ Q_PROPERTY( TQString availableLabel READ availableLabel WRITE setAvailableLabel )
+ Q_PROPERTY( TQString selectedLabel READ selectedLabel WRITE setSelectedLabel )
Q_PROPERTY( ButtonIconSize buttonIconSize READ buttonIconSize WRITE setButtonIconSize )
Q_PROPERTY( InsertionPolicy availableInsertionPolicy READ availableInsertionPolicy WRITE setAvailableInsertionPolicy )
Q_PROPERTY( InsertionPolicy selectedInsertionPolicy READ selectedInsertionPolicy WRITE setSelectedInsertionPolicy )
Q_PROPERTY( bool showUpDownButtons READ showUpDownButtons WRITE setShowUpDownButtons )
public:
- KActionSelector( QWidget *parent=0, const char *name=0 );
+ KActionSelector( TQWidget *parent=0, const char *name=0 );
~KActionSelector();
/**
- @return The QListBox holding the available actions
+ @return The TQListBox holding the available actions
*/
- QListBox *availableListBox();
+ TQListBox *availableListBox();
/**
- @return The QListBox holding the selected actions
+ @return The TQListBox holding the selected actions
*/
- QListBox *selectedListBox();
+ TQListBox *selectedListBox();
/**
This enum indentifies the moving buttons
@@ -190,7 +190,7 @@ public:
/**
@return The text of the label for the available items listbox.
*/
- QString availableLabel() const;
+ TQString availableLabel() const;
/**
Sets the label for the available items listbox to @p text.
@@ -198,12 +198,12 @@ public:
if you have a single ampersand in the text, the following character
will become the accellerator to focus te listbox.
*/
- void setAvailableLabel( const QString & text );
+ void setAvailableLabel( const TQString & text );
/**
@return the label of the selected items listbox.
*/
- QString selectedLabel() const;
+ TQString selectedLabel() const;
/**
Sets the label for the selected items listbox to @p text.
@@ -211,7 +211,7 @@ public:
if you have a single ampersand in the text, the following character
will become the accellerator to focus te listbox.
*/
- void setSelectedLabel( const QString & text );
+ void setSelectedLabel( const TQString & text );
/**
@return the current ButtonIconSize.
@@ -265,25 +265,25 @@ public:
Sets the pixmap of the button @p button to @p icon.
It calls SmallIconSet(pm) to generate the icon set.
*/
- void setButtonIcon( const QString &icon, MoveButton button );
+ void setButtonIcon( const TQString &icon, MoveButton button );
/**
Sets the iconset for button @p button to @p iconset.
You can use this method to et a costum icon set. Either
- created by @ref QIconSet, or use the application instance of
+ created by @ref TQIconSet, or use the application instance of
@ref KIconLoader (recommended).
*/
- void setButtonIconSet( const QIconSet &iconset, MoveButton button );
+ void setButtonIconSet( const TQIconSet &iconset, MoveButton button );
/**
Sets the tooltip for the button @p button to @p tip.
*/
- void setButtonTooltip( const QString &tip, MoveButton button );
+ void setButtonTooltip( const TQString &tip, MoveButton button );
/**
Sets the whatsthis help for button @p button to @p text.
*/
- void setButtonWhatsThis( const QString &text, MoveButton button );
+ void setButtonWhatsThis( const TQString &text, MoveButton button );
/**
Sets the enabled state of all moving buttons to reflect the current
@@ -298,27 +298,27 @@ signals:
/**
Emitted when an item is moved to the "selected" listbox.
*/
- void added( QListBoxItem *item );
+ void added( TQListBoxItem *item );
/**
Emitted when an item is moved out of the "selected" listbox.
*/
- void removed( QListBoxItem *item );
+ void removed( TQListBoxItem *item );
/**
Emitted when an item is moved upwards in the "selected" listbox.
*/
- void movedUp( QListBoxItem *item );
+ void movedUp( TQListBoxItem *item );
/**
Emitted when an item is moved downwards in the "selected" listbox.
*/
- void movedDown( QListBoxItem *item );
+ void movedDown( TQListBoxItem *item );
/**
Emitted when an item is moved to the "selected" listbox.
*/
-// void addedToSelection( QListBoxItem *item );
+// void addedToSelection( TQListBoxItem *item );
public slots:
/**
@@ -331,12 +331,12 @@ protected:
/**
Reimplamented for internal reasons.
*/
- void keyPressEvent( QKeyEvent * );
+ void keyPressEvent( TQKeyEvent * );
/**
Reimplemented for internal reasons.
*/
- bool eventFilter( QObject *, QEvent * );
+ bool eventFilter( TQObject *, TQEvent * );
private slots:
/**
@@ -362,19 +362,19 @@ private slots:
/**
Moves the item @p item to the other listbox if moveOnDoubleClick is enabled.
*/
- void itemDoubleClicked( QListBoxItem *item );
+ void itemDoubleClicked( TQListBoxItem *item );
/**
connected to both list boxes to set the buttons enabled
*/
- void slotCurrentChanged( QListBoxItem * ) { setButtonsEnabled(); };
+ void slotCurrentChanged( TQListBoxItem * ) { setButtonsEnabled(); };
private:
/**
Move item @p item to the other listbox
*/
- void moveItem( QListBoxItem *item );
+ void moveItem( TQListBoxItem *item );
/**
loads the icons for the move buttons.
@@ -388,7 +388,7 @@ private:
Note that if policy is Sorted, this will return -1.
Sort the listbox after inserting the item in that case.
*/
- int insertionIndex( QListBox *lb, InsertionPolicy policy );
+ int insertionIndex( TQListBox *lb, InsertionPolicy policy );
/**
Private data storage
diff --git a/parts/fileselector/kbookmarkhandler.cpp b/parts/fileselector/kbookmarkhandler.cpp
index d4fbc4ee..6467b83f 100644
--- a/parts/fileselector/kbookmarkhandler.cpp
+++ b/parts/fileselector/kbookmarkhandler.cpp
@@ -21,7 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kxmlguiclient.h>
#include <kbookmarkimporter.h>
@@ -36,7 +36,7 @@
KBookmarkHandler::KBookmarkHandler( KDevFileSelector *parent, KPopupMenu* kpopupmenu )
- : QObject( parent, "KBookmarkHandler" ),
+ : TQObject( parent, "KBookmarkHandler" ),
KBookmarkOwner(),
mParent( parent ),
m_menu( kpopupmenu ),
@@ -45,7 +45,7 @@ KBookmarkHandler::KBookmarkHandler( KDevFileSelector *parent, KPopupMenu* kpopup
if (!m_menu)
m_menu = new KPopupMenu( parent, "bookmark menu" );
- QString file = locate( "data", "kdevfileselector/fsbookmarks.xml" );
+ TQString file = locate( "data", "kdevfileselector/fsbookmarks.xml" );
if ( file.isEmpty() )
file = locateLocal( "data", "kdevfileselector/fsbookmarks.xml" );
@@ -61,24 +61,24 @@ KBookmarkHandler::~KBookmarkHandler()
// delete m_bookmarkMenu; ###
}
-QString KBookmarkHandler::currentURL() const
+TQString KBookmarkHandler::currentURL() const
{
return mParent->dirOperator()->url().url();
}
-void KBookmarkHandler::slotNewBookmark( const QString& text,
- const QCString& url,
- const QString& additionalInfo )
+void KBookmarkHandler::slotNewBookmark( const TQString& text,
+ const TQCString& url,
+ const TQString& additionalInfo )
{
Q_UNUSED( text );
*m_importStream << "<bookmark icon=\"" << KMimeType::iconForURL( KURL( url ) );
- *m_importStream << "\" href=\"" << QString::fromUtf8(url) << "\">\n";
- *m_importStream << "<title>" << (additionalInfo.isEmpty() ? QString::fromUtf8(url) : additionalInfo) << "</title>\n</bookmark>\n";
+ *m_importStream << "\" href=\"" << TQString::fromUtf8(url) << "\">\n";
+ *m_importStream << "<title>" << (additionalInfo.isEmpty() ? TQString::fromUtf8(url) : additionalInfo) << "</title>\n</bookmark>\n";
}
-void KBookmarkHandler::slotNewFolder( const QString& text, bool /*open*/,
- const QString& /*additionalInfo*/ )
+void KBookmarkHandler::slotNewFolder( const TQString& text, bool /*open*/,
+ const TQString& /*additionalInfo*/ )
{
*m_importStream << "<folder icon=\"bookmark_folder\">\n<title=\"";
*m_importStream << text << "\">\n";
diff --git a/parts/fileselector/kbookmarkhandler.h b/parts/fileselector/kbookmarkhandler.h
index e0a16c60..9b8f5042 100644
--- a/parts/fileselector/kbookmarkhandler.h
+++ b/parts/fileselector/kbookmarkhandler.h
@@ -28,7 +28,7 @@ class QTextStream;
class KPopupMenu;
class KActionMenu;
-class KBookmarkHandler : public QObject, public KBookmarkOwner
+class KBookmarkHandler : public TQObject, public KBookmarkOwner
{
Q_OBJECT
@@ -37,19 +37,19 @@ public:
~KBookmarkHandler();
// KBookmarkOwner interface:
- virtual void openBookmarkURL( const QString& url ) { emit openURL( url ); }
- virtual QString currentURL() const;
+ virtual void openBookmarkURL( const TQString& url ) { emit openURL( url ); }
+ virtual TQString currentURL() const;
KPopupMenu *menu() const { return m_menu; }
signals:
- void openURL( const QString& url );
+ void openURL( const TQString& url );
private slots:
- void slotNewBookmark( const QString& text, const QCString& url,
- const QString& additionalInfo );
- void slotNewFolder( const QString& text, bool open,
- const QString& additionalInfo );
+ void slotNewBookmark( const TQString& text, const TQCString& url,
+ const TQString& additionalInfo );
+ void slotNewFolder( const TQString& text, bool open,
+ const TQString& additionalInfo );
void newSeparator();
void endFolder();
@@ -61,7 +61,7 @@ private:
KPopupMenu *m_menu;
KBookmarkMenu *m_bookmarkMenu;
- QTextStream *m_importStream;
+ TQTextStream *m_importStream;
//class KBookmarkHandlerPrivate *d;
};