summaryrefslogtreecommitdiffstats
path: root/parts/fileselector/fileselector_widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parts/fileselector/fileselector_widget.cpp')
-rw-r--r--parts/fileselector/fileselector_widget.cpp294
1 files changed, 147 insertions, 147 deletions
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();