summaryrefslogtreecommitdiffstats
path: root/kcontrol/keys
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kcontrol/keys
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/keys')
-rw-r--r--kcontrol/keys/commandShortcuts.cpp72
-rw-r--r--kcontrol/keys/commandShortcuts.h24
-rw-r--r--kcontrol/keys/kaccelaction.h60
-rw-r--r--kcontrol/keys/keyconfig.cpp104
-rw-r--r--kcontrol/keys/keyconfig.h32
-rw-r--r--kcontrol/keys/khotkeys.cpp28
-rw-r--r--kcontrol/keys/khotkeys.h12
-rw-r--r--kcontrol/keys/main.cpp22
-rw-r--r--kcontrol/keys/main.h8
-rw-r--r--kcontrol/keys/modifiers.cpp64
-rw-r--r--kcontrol/keys/modifiers.h14
-rw-r--r--kcontrol/keys/shortcuts.cpp96
-rw-r--r--kcontrol/keys/shortcuts.h26
-rw-r--r--kcontrol/keys/treeview.cpp100
-rw-r--r--kcontrol/keys/treeview.h42
15 files changed, 352 insertions, 352 deletions
diff --git a/kcontrol/keys/commandShortcuts.cpp b/kcontrol/keys/commandShortcuts.cpp
index 446cd24ac..a38f46f29 100644
--- a/kcontrol/keys/commandShortcuts.cpp
+++ b/kcontrol/keys/commandShortcuts.cpp
@@ -21,11 +21,11 @@
#include "commandShortcuts.h"
#include "treeview.h"
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
#include <kactivelabel.h>
#include <kapplication.h>
@@ -36,8 +36,8 @@
#include <klocale.h>
static bool treeFilled = false;
-CommandShortcutsModule::CommandShortcutsModule( QWidget *parent, const char *name )
-: QWidget( parent, name )
+CommandShortcutsModule::CommandShortcutsModule( TQWidget *parent, const char *name )
+: TQWidget( parent, name )
{
treeFilled = false;
initGUI();
@@ -68,7 +68,7 @@ void CommandShortcutsModule::defaults()
m_tree->fill();
}
-QString CommandShortcutsModule::quickHelp() const
+TQString CommandShortcutsModule::quickHelp() const
{
return i18n("<h1>Command Shortcuts</h1> Using key bindings you can configure applications "
"and commands to be triggered when you press a key or a combination of keys.");
@@ -76,62 +76,62 @@ QString CommandShortcutsModule::quickHelp() const
void CommandShortcutsModule::initGUI()
{
- QVBoxLayout* mainLayout = new QVBoxLayout(this, KDialog::marginHint());
+ TQVBoxLayout* mainLayout = new TQVBoxLayout(this, KDialog::marginHint());
mainLayout->addSpacing( KDialog::marginHint() );
KActiveLabel* label = new KActiveLabel(this);
label->setText(i18n("<qt>Below is a list of known commands which you may assign keyboard shortcuts to. "
"To edit, add or remove entries from this list use the "
"<a href=\"launchMenuEditor\">KDE menu editor</a>.</qt>"));
- label->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
- disconnect(label, SIGNAL(linkClicked(const QString &)), label, SLOT(openLink(const QString &)));
- connect(label, SIGNAL(linkClicked(const QString &)), this, SLOT(launchMenuEditor()));
+ label->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum);
+ disconnect(label, TQT_SIGNAL(linkClicked(const TQString &)), label, TQT_SLOT(openLink(const TQString &)));
+ connect(label, TQT_SIGNAL(linkClicked(const TQString &)), this, TQT_SLOT(launchMenuEditor()));
mainLayout->addWidget(label);
m_tree = new AppTreeView(this, "appTreeView");
- m_tree->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
+ m_tree->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding);
mainLayout->setStretchFactor(m_tree, 10);
mainLayout->addWidget(m_tree);
- QWhatsThis::add(m_tree,
+ TQWhatsThis::add(m_tree,
i18n("This is a list of all the desktop applications and commands "
"currently defined on this system. Click to select a command to "
"assign a keyboard shortcut to. Complete management of these "
"entries can be done via the menu editor program."));
- connect(m_tree, SIGNAL(entrySelected(const QString&, const QString &, bool)),
- this, SLOT(commandSelected(const QString&, const QString &, bool)));
- connect(m_tree, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)),
- this, SLOT(commandDoubleClicked(QListViewItem *, const QPoint &, int)));
- m_shortcutBox = new QButtonGroup(i18n("Shortcut for Selected Command"), this);
+ connect(m_tree, TQT_SIGNAL(entrySelected(const TQString&, const TQString &, bool)),
+ this, TQT_SLOT(commandSelected(const TQString&, const TQString &, bool)));
+ connect(m_tree, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)),
+ this, TQT_SLOT(commandDoubleClicked(TQListViewItem *, const TQPoint &, int)));
+ m_shortcutBox = new TQButtonGroup(i18n("Shortcut for Selected Command"), this);
mainLayout->addWidget(m_shortcutBox);
- QHBoxLayout* buttonLayout = new QHBoxLayout(m_shortcutBox, KDialog::marginHint() * 2);
+ TQHBoxLayout* buttonLayout = new TQHBoxLayout(m_shortcutBox, KDialog::marginHint() * 2);
buttonLayout->addSpacing( KDialog::marginHint() );
- m_noneRadio = new QRadioButton(i18n("no key", "&None"), m_shortcutBox);
- QWhatsThis::add(m_noneRadio, i18n("The selected command will not be associated with any key."));
+ m_noneRadio = new TQRadioButton(i18n("no key", "&None"), m_shortcutBox);
+ TQWhatsThis::add(m_noneRadio, i18n("The selected command will not be associated with any key."));
buttonLayout->addWidget(m_noneRadio);
- m_customRadio = new QRadioButton(i18n("C&ustom"), m_shortcutBox);
- QWhatsThis::add(m_customRadio,
+ m_customRadio = new TQRadioButton(i18n("C&ustom"), m_shortcutBox);
+ TQWhatsThis::add(m_customRadio,
i18n("If this option is selected you can create a customized key binding for the"
" selected command using the button to the right.") );
buttonLayout->addWidget(m_customRadio);
m_shortcutButton = new KKeyButton(m_shortcutBox);
- QWhatsThis::add(m_shortcutButton,
+ TQWhatsThis::add(m_shortcutButton,
i18n("Use this button to choose a new shortcut key. Once you click it, "
"you can press the key-combination which you would like to be assigned "
"to the currently selected command."));
buttonLayout->addSpacing(KDialog::spacingHint() * 2);
buttonLayout->addWidget(m_shortcutButton);
- connect(m_shortcutButton, SIGNAL(capturedShortcut(const KShortcut&)),
- this, SLOT(shortcutChanged(const KShortcut&)));
- connect(m_customRadio, SIGNAL(toggled(bool)), m_shortcutButton, SLOT(setEnabled(bool)));
- connect(m_noneRadio, SIGNAL(toggled(bool)), this, SLOT(shortcutRadioToggled(bool)));
+ connect(m_shortcutButton, TQT_SIGNAL(capturedShortcut(const KShortcut&)),
+ this, TQT_SLOT(shortcutChanged(const KShortcut&)));
+ connect(m_customRadio, TQT_SIGNAL(toggled(bool)), m_shortcutButton, TQT_SLOT(setEnabled(bool)));
+ connect(m_noneRadio, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(shortcutRadioToggled(bool)));
buttonLayout->addStretch(1);
}
void CommandShortcutsModule::launchMenuEditor()
{
if ( KApplication::startServiceByDesktopName( "kmenuedit",
- QString::null /*url*/,
+ TQString::null /*url*/,
0 /*error*/,
0 /*dcopservice*/,
0 /*pid*/,
@@ -156,8 +156,8 @@ void CommandShortcutsModule::shortcutRadioToggled(bool remove)
if (remove)
{
- m_shortcutButton->setShortcut(QString::null, false);
- item->setAccel(QString::null);
+ m_shortcutButton->setShortcut(TQString::null, false);
+ item->setAccel(TQString::null);
if (m_changedItems.findRef(item) == -1)
{
m_changedItems.append(item);
@@ -178,7 +178,7 @@ void CommandShortcutsModule::shortcutChanged(const KShortcut& shortcut)
return;
}
- QString accel = shortcut.toString();
+ TQString accel = shortcut.toString();
bool hasAccel = !accel.isEmpty();
m_noneRadio->blockSignals(true);
m_noneRadio->setChecked(!hasAccel);
@@ -194,7 +194,7 @@ void CommandShortcutsModule::shortcutChanged(const KShortcut& shortcut)
emit changed( true );
}
-void CommandShortcutsModule::showing(QWidget* w)
+void CommandShortcutsModule::showing(TQWidget* w)
{
if (w != this || treeFilled)
{
@@ -213,7 +213,7 @@ void CommandShortcutsModule::showing(QWidget* w)
treeFilled = true;
}
-void CommandShortcutsModule::commandSelected(const QString& /* path */, const QString & accel, bool isDirectory)
+void CommandShortcutsModule::commandSelected(const TQString& /* path */, const TQString & accel, bool isDirectory)
{
m_noneRadio->blockSignals(true);
m_shortcutBox->setEnabled(!isDirectory);
@@ -227,7 +227,7 @@ void CommandShortcutsModule::commandSelected(const QString& /* path */, const QS
m_noneRadio->blockSignals(false);
}
-void CommandShortcutsModule::commandDoubleClicked(QListViewItem *item, const QPoint &, int)
+void CommandShortcutsModule::commandDoubleClicked(TQListViewItem *item, const TQPoint &, int)
{
if (!item)
{
diff --git a/kcontrol/keys/commandShortcuts.h b/kcontrol/keys/commandShortcuts.h
index 3bc492f17..504359fed 100644
--- a/kcontrol/keys/commandShortcuts.h
+++ b/kcontrol/keys/commandShortcuts.h
@@ -21,9 +21,9 @@
#ifndef __COMMAND_SHORTCUTS_MODULE_H
#define __COMMAND_SHORTCUTS_MODULE_H
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <kshortcut.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class AppTreeView;
class AppTreeItem;
@@ -32,32 +32,32 @@ class QRadioButton;
class KKeyButton;
class QListViewItem;
-typedef QPtrList<AppTreeItem> treeItemList;
-typedef QPtrListIterator<AppTreeItem> treeItemListIterator;
+typedef TQPtrList<AppTreeItem> treeItemList;
+typedef TQPtrListIterator<AppTreeItem> treeItemListIterator;
class CommandShortcutsModule : public QWidget
{
Q_OBJECT
public:
- CommandShortcutsModule( QWidget *parent = 0, const char *name = 0 );
+ CommandShortcutsModule( TQWidget *parent = 0, const char *name = 0 );
~CommandShortcutsModule();
void load();
void save();
void defaults();
- QString quickHelp() const;
+ TQString quickHelp() const;
signals:
void changed( bool );
public slots:
- void showing(QWidget*);
+ void showing(TQWidget*);
protected slots:
- void commandSelected(const QString&, const QString &, bool);
+ void commandSelected(const TQString&, const TQString &, bool);
void shortcutChanged(const KShortcut& shortcut);
void shortcutRadioToggled(bool remove);
- void commandDoubleClicked(QListViewItem *item, const QPoint &, int);
+ void commandDoubleClicked(TQListViewItem *item, const TQPoint &, int);
void launchMenuEditor();
protected:
@@ -65,9 +65,9 @@ class CommandShortcutsModule : public QWidget
private:
AppTreeView* m_tree;
- QButtonGroup* m_shortcutBox;
- QRadioButton* m_noneRadio;
- QRadioButton* m_customRadio;
+ TQButtonGroup* m_shortcutBox;
+ TQRadioButton* m_noneRadio;
+ TQRadioButton* m_customRadio;
KKeyButton* m_shortcutButton;
treeItemList m_changedItems;
};
diff --git a/kcontrol/keys/kaccelaction.h b/kcontrol/keys/kaccelaction.h
index 2e1f78643..9b00f08d2 100644
--- a/kcontrol/keys/kaccelaction.h
+++ b/kcontrol/keys/kaccelaction.h
@@ -23,10 +23,10 @@
#ifndef _KACCELACTION_H
#define _KACCELACTION_H
-#include <qmap.h>
-#include <qptrvector.h>
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqmap.h>
+#include <tqptrvector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
#include <kshortcut.h>
@@ -71,37 +71,37 @@ class KAccelAction
public:
KAccelAction();
KAccelAction( const KAccelAction& );
- KAccelAction( const QString& sName, const QString& sLabel, const QString& sWhatsThis,
+ KAccelAction( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled );
~KAccelAction();
void clear();
- bool init( const QString& sName, const QString& sLabel, const QString& sWhatsThis,
+ bool init( const TQString& sName, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& cutDef3, const KShortcut& cutDef4,
- const QObject* pObjSlot, const char* psMethodSlot,
+ const TQObject* pObjSlot, const char* psMethodSlot,
bool bConfigurable, bool bEnabled );
KAccelAction& operator=( const KAccelAction& );
- const QString& name() const { return m_sName; }
- const QString& label() const { return m_sLabel; }
- const QString& whatsThis() const { return m_sWhatsThis; }
+ const TQString& name() const { return m_sName; }
+ const TQString& label() const { return m_sLabel; }
+ const TQString& whatsThis() const { return m_sWhatsThis; }
const KShortcut& shortcut() const { return m_cut; }
const KShortcut& shortcutDefault() const;
const KShortcut& shortcutDefault3() const { return m_cutDefault3; }
const KShortcut& shortcutDefault4() const { return m_cutDefault4; }
- const QObject* objSlotPtr() const { return m_pObjSlot; }
+ const TQObject* objSlotPtr() const { return m_pObjSlot; }
const char* methodSlotPtr() const { return m_psMethodSlot; }
bool isConfigurable() const { return m_bConfigurable; }
bool isEnabled() const { return m_bEnabled; }
- void setName( const QString& );
- void setLabel( const QString& );
- void setWhatsThis( const QString& );
+ void setName( const TQString& );
+ void setLabel( const TQString& );
+ void setWhatsThis( const TQString& );
bool setShortcut( const KShortcut& rgCuts );
- void setSlot( const QObject* pObjSlot, const char* psMethodSlot );
+ void setSlot( const TQObject* pObjSlot, const char* psMethodSlot );
void setConfigurable( bool );
void setEnabled( bool );
@@ -113,19 +113,19 @@ class KAccelAction
void clearShortcut();
bool contains( const KKeySequence& );
- QString toString() const;
- QString toStringInternal() const;
+ TQString toString() const;
+ TQString toStringInternal() const;
static bool useFourModifierKeys();
static void useFourModifierKeys( bool );
protected:
- QString m_sName,
+ TQString m_sName,
m_sLabel,
m_sWhatsThis;
KShortcut m_cut;
KShortcut m_cutDefault3, m_cutDefault4;
- const QObject* m_pObjSlot;
+ const TQObject* m_pObjSlot;
const char* m_psMethodSlot;
bool m_bConfigurable,
m_bEnabled;
@@ -156,28 +156,28 @@ class KAccelActions
void clear();
bool init( const KAccelActions& );
- bool init( KConfigBase& config, const QString& sGroup );
+ bool init( KConfigBase& config, const TQString& sGroup );
void updateShortcuts( KAccelActions& );
- int actionIndex( const QString& sAction ) const;
+ int actionIndex( const TQString& sAction ) const;
KAccelAction* actionPtr( uint );
const KAccelAction* actionPtr( uint ) const;
- KAccelAction* actionPtr( const QString& sAction );
- const KAccelAction* actionPtr( const QString& sAction ) const;
+ KAccelAction* actionPtr( const TQString& sAction );
+ const KAccelAction* actionPtr( const TQString& sAction ) const;
KAccelAction* actionPtr( KKeySequence cut );
KAccelAction& operator []( uint );
const KAccelAction& operator []( uint ) const;
- KAccelAction* insert( const QString& sAction, const QString& sLabel, const QString& sWhatsThis,
+ KAccelAction* insert( const TQString& sAction, const TQString& sLabel, const TQString& sWhatsThis,
const KShortcut& rgCutDefaults3, const KShortcut& rgCutDefaults4,
- const QObject* pObjSlot = 0, const char* psMethodSlot = 0,
+ const TQObject* pObjSlot = 0, const char* psMethodSlot = 0,
bool bConfigurable = true, bool bEnabled = true );
- KAccelAction* insert( const QString& sName, const QString& sLabel );
- bool remove( const QString& sAction );
+ KAccelAction* insert( const TQString& sName, const TQString& sLabel );
+ bool remove( const TQString& sAction );
- bool readActions( const QString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
- bool writeActions( const QString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
+ bool readActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0 );
+ bool writeActions( const TQString& sConfigGroup = "Shortcuts", KConfigBase* pConfig = 0,
bool bWriteAll = false, bool bGlobal = false ) const;
void emitKeycodeChanged();
diff --git a/kcontrol/keys/keyconfig.cpp b/kcontrol/keys/keyconfig.cpp
index 89a32cf5e..09726de63 100644
--- a/kcontrol/keys/keyconfig.cpp
+++ b/kcontrol/keys/keyconfig.cpp
@@ -11,12 +11,12 @@
#include <unistd.h>
-#include <qlabel.h>
-#include <qdir.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qcheckbox.h>
-#include <qregexp.h>
+#include <tqlabel.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -35,21 +35,21 @@
//----------------------------------------------------------------------------
-KKeyModule::KKeyModule( QWidget *parent, bool isGlobal, bool bSeriesOnly, bool bSeriesNone, const char *name )
- : QWidget( parent, name )
+KKeyModule::KKeyModule( TQWidget *parent, bool isGlobal, bool bSeriesOnly, bool bSeriesNone, const char *name )
+ : TQWidget( parent, name )
{
init( isGlobal, bSeriesOnly, bSeriesNone );
}
-KKeyModule::KKeyModule( QWidget *parent, bool isGlobal, const char *name )
- : QWidget( parent, name )
+KKeyModule::KKeyModule( TQWidget *parent, bool isGlobal, const char *name )
+ : TQWidget( parent, name )
{
init( isGlobal, false, false );
}
void KKeyModule::init( bool isGlobal, bool _bSeriesOnly, bool bSeriesNone )
{
- QString wtstr;
+ TQString wtstr;
KeyType = isGlobal ? "global" : "standard";
@@ -73,7 +73,7 @@ void KKeyModule::init( bool isGlobal, bool _bSeriesOnly, bool bSeriesNone )
// Sorting Hack: I'll re-write the module once feature-adding begins again.
if( bSeriesOnly || bSeriesNone ) {
for( uint i = 0; i < actions.size(); i++ ) {
- QString sConfigKey = actions[i].m_sName;
+ TQString sConfigKey = actions[i].m_sName;
//kdDebug(125) << "sConfigKey: " << sConfigKey << endl;
int iLastSpace = sConfigKey.findRev( ' ' );
bool bIsNum = false;
@@ -107,30 +107,30 @@ void KKeyModule::init( bool isGlobal, bool _bSeriesOnly, bool bSeriesNone )
//kdDebug(125) << "KKeyModule::init() - Read current key bindings from config." << endl;
//actions.readActions( KeySet );
- sFileList = new QStringList();
- sList = new QListBox( this );
+ sFileList = new TQStringList();
+ sList = new TQListBox( this );
//readSchemeNames();
sList->setCurrentItem( 0 );
- connect( sList, SIGNAL( highlighted( int ) ),
- SLOT( slotPreviewScheme( int ) ) );
+ connect( sList, TQT_SIGNAL( highlighted( int ) ),
+ TQT_SLOT( slotPreviewScheme( int ) ) );
- QLabel *label = new QLabel( sList, i18n("&Key Scheme"), this );
+ TQLabel *label = new TQLabel( sList, i18n("&Key Scheme"), this );
wtstr = i18n("Here you can see a list of the existing key binding schemes with 'Current scheme'"
" referring to the settings you are using right now. Select a scheme to use, remove or"
" change it.");
- QWhatsThis::add( label, wtstr );
- QWhatsThis::add( sList, wtstr );
+ TQWhatsThis::add( label, wtstr );
+ TQWhatsThis::add( sList, wtstr );
- addBt = new QPushButton( i18n("&Save Scheme..."), this );
- connect( addBt, SIGNAL( clicked() ), SLOT( slotAdd() ) );
- QWhatsThis::add(addBt, i18n("Click here to add a new key bindings scheme. You will be prompted for a name."));
+ addBt = new TQPushButton( i18n("&Save Scheme..."), this );
+ connect( addBt, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAdd() ) );
+ TQWhatsThis::add(addBt, i18n("Click here to add a new key bindings scheme. You will be prompted for a name."));
- removeBt = new QPushButton( i18n("&Remove Scheme"), this );
+ removeBt = new TQPushButton( i18n("&Remove Scheme"), this );
removeBt->setEnabled(FALSE);
- connect( removeBt, SIGNAL( clicked() ), SLOT( slotRemove() ) );
- QWhatsThis::add( removeBt, i18n("Click here to remove the selected key bindings scheme. You can not"
+ connect( removeBt, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemove() ) );
+ TQWhatsThis::add( removeBt, i18n("Click here to remove the selected key bindings scheme. You can not"
" remove the standard system wide schemes, 'Current scheme' and 'KDE default'.") );
// Hack to get this setting only displayed once. It belongs in main.cpp instead.
@@ -139,12 +139,12 @@ void KKeyModule::init( bool isGlobal, bool _bSeriesOnly, bool bSeriesNone )
/* Needed to remove because this depended upon non-BC changes in KeyEntry.*/
// If this is the "Global Keys" section of the KDE Control Center:
if( isGlobal && !bSeriesOnly ) {
- preferMetaBt = new QCheckBox( i18n("Prefer 4-modifier defaults"), this );
+ preferMetaBt = new TQCheckBox( i18n("Prefer 4-modifier defaults"), this );
if( !KKeySequence::keyboardHasMetaKey() )
preferMetaBt->setEnabled( false );
preferMetaBt->setChecked( KKeySequence::useFourModifierKeys() );
- connect( preferMetaBt, SIGNAL(clicked()), SLOT(slotPreferMeta()) );
- QWhatsThis::add( preferMetaBt, i18n("If your keyboard has a Meta key, but you would "
+ connect( preferMetaBt, TQT_SIGNAL(clicked()), TQT_SLOT(slotPreferMeta()) );
+ TQWhatsThis::add( preferMetaBt, i18n("If your keyboard has a Meta key, but you would "
"like KDE to prefer the 3-modifier configuration defaults, then this option "
"should be unchecked.") );
} else
@@ -153,11 +153,11 @@ void KKeyModule::init( bool isGlobal, bool _bSeriesOnly, bool bSeriesNone )
KSeparator* line = new KSeparator( KSeparator::HLine, this );
kc = new KeyChooserSpec( actions, this, isGlobal );
- connect( kc, SIGNAL(keyChange()), this, SLOT(slotKeyChange()) );
+ connect( kc, TQT_SIGNAL(keyChange()), this, TQT_SLOT(slotKeyChange()) );
readScheme();
- QGridLayout *topLayout = new QGridLayout( this, 6, 2,
+ TQGridLayout *topLayout = new TQGridLayout( this, 6, 2,
KDialog::marginHint(),
KDialog::spacingHint());
topLayout->addWidget(label, 0, 0);
@@ -179,14 +179,14 @@ KKeyModule::~KKeyModule (){
delete sFileList;
}
-bool KKeyModule::writeSettings( const QString& sGroup, KConfig* pConfig )
+bool KKeyModule::writeSettings( const TQString& sGroup, KConfig* pConfig )
{
kc->commitChanges();
actions.writeActions( sGroup, pConfig, true, false );
return true;
}
-bool KKeyModule::writeSettingsGlobal( const QString& sGroup )
+bool KKeyModule::writeSettingsGlobal( const TQString& sGroup )
{
kc->commitChanges();
actions.writeActions( sGroup, 0, true, true );
@@ -225,15 +225,15 @@ void KKeyModule::defaults()
/*void KKeyModule::slotRemove()
{
- QString kksPath =
+ TQString kksPath =
KGlobal::dirs()->saveLocation("data", "kcmkeys/" + KeyType);
- QDir d( kksPath );
+ TQDir d( kksPath );
if (!d.exists()) // what can we do?
return;
- d.setFilter( QDir::Files );
- d.setSorting( QDir::Name );
+ d.setFilter( TQDir::Files );
+ d.setSorting( TQDir::Name );
d.setNameFilter("*.kksrc");
uint ind = sList->currentItem();
@@ -291,14 +291,14 @@ void KKeyModule::readScheme( int index )
/*void KKeyModule::slotAdd()
{
- QString sName;
+ TQString sName;
if ( sList->currentItem() >= nSysSchemes )
sName = sList->currentText();
SaveScm ss( 0, "save scheme", sName );
bool nameValid;
- QString sFile;
+ TQString sFile;
int exists = -1;
do {
@@ -330,7 +330,7 @@ void KKeyModule::readScheme( int index )
// Make the next letter upper case
- QString s = sFile.mid( ind, 1 );
+ TQString s = sFile.mid( ind, 1 );
s = s.upper();
sFile.replace( ind, 1, s );
@@ -356,13 +356,13 @@ void KKeyModule::readScheme( int index )
} while ( nameValid == FALSE );
- disconnect( sList, SIGNAL( highlighted( int ) ), this,
- SLOT( slotPreviewScheme( int ) ) );
+ disconnect( sList, TQT_SIGNAL( highlighted( int ) ), this,
+ TQT_SLOT( slotPreviewScheme( int ) ) );
- QString kksPath = KGlobal::dirs()->saveLocation("data", "kcmkeys/");
+ TQString kksPath = KGlobal::dirs()->saveLocation("data", "kcmkeys/");
- QDir d( kksPath );
+ TQDir d( kksPath );
if ( !d.exists() )
if ( !d.mkdir( kksPath ) ) {
qWarning("KKeyModule: Could not make directory to store user info.");
@@ -403,8 +403,8 @@ void KKeyModule::readScheme( int index )
slotSave();
- connect( sList, SIGNAL( highlighted( int ) ), this,
- SLOT( slotPreviewScheme( int ) ) );
+ connect( sList, TQT_SIGNAL( highlighted( int ) ), this,
+ TQT_SLOT( slotPreviewScheme( int ) ) );
slotPreviewScheme( sList->currentItem() );
}*/
@@ -426,9 +426,9 @@ void KKeyModule::readScheme( int index )
/*void KKeyModule::readSchemeNames( )
{
- QStringList schemes = KGlobal::dirs()->findAllResources("data", "kcmkeys/" + KeyType + "/*.kksrc");
- //QRegExp r( "-kde[34].kksrc$" );
- QRegExp r( "-kde3.kksrc$" );
+ TQStringList schemes = KGlobal::dirs()->findAllResources("data", "kcmkeys/" + KeyType + "/*.kksrc");
+ //TQRegExp r( "-kde[34].kksrc$" );
+ TQRegExp r( "-kde3.kksrc$" );
sList->clear();
sFileList->clear();
@@ -442,7 +442,7 @@ void KKeyModule::readScheme( int index )
nSysSchemes = 2;
// This for system files
- for ( QStringList::ConstIterator it = schemes.begin(); it != schemes.end(); ++it) {
+ for ( TQStringList::ConstIterator it = schemes.begin(); it != schemes.end(); ++it) {
// KPersonalizer relies on .kksrc files containing all the keyboard shortcut
// schemes for various setups. It also requires the KDE defaults to be in
// a .kksrc file. The KDE defaults shouldn't be listed here.
@@ -452,7 +452,7 @@ void KKeyModule::readScheme( int index )
KSimpleConfig config( *it, true );
// TODO: Put 'Name' in "Settings" group
config.setGroup( KeyScheme );
- QString str = config.readEntry( "Name" );
+ TQString str = config.readEntry( "Name" );
sList->insertItem( str );
sFileList->append( *it );
@@ -473,7 +473,7 @@ void KKeyModule::init()
/*kdDebug(125) << "KKeyModule::init() - Initialize # Modifier Keys Settings\n";
KConfigGroupSaver cgs( KGlobal::config(), "Keyboard" );
- QString fourMods = KGlobal::config()->readEntry( "Use Four Modifier Keys", KAccel::keyboardHasMetaKey() ? "true" : "false" );
+ TQString fourMods = KGlobal::config()->readEntry( "Use Four Modifier Keys", KAccel::keyboardHasMetaKey() ? "true" : "false" );
KAccel::useFourModifierKeys( fourMods == "true" );
bool bUseFourModifierKeys = KAccel::useFourModifierKeys();
KGlobal::config()->writeEntry( "User Four Modifier Keys", bUseFourModifierKeys ? "true" : "false", true, true );
@@ -508,7 +508,7 @@ void KKeyModule::init()
// KeyChooserSpec
//-----------------------------------------------------------------
-KeyChooserSpec::KeyChooserSpec( KAccelActions& actions, QWidget* parent, bool bGlobal )
+KeyChooserSpec::KeyChooserSpec( KAccelActions& actions, TQWidget* parent, bool bGlobal )
: KKeyChooser( actions, parent, bGlobal, false, true ), m_bGlobal( bGlobal )
{
//if( global )
diff --git a/kcontrol/keys/keyconfig.h b/kcontrol/keys/keyconfig.h
index cba853e4d..f38efe8b0 100644
--- a/kcontrol/keys/keyconfig.h
+++ b/kcontrol/keys/keyconfig.h
@@ -8,13 +8,13 @@
#ifndef __KEYCONFIG_H__
#define __KEYCONFIG_H__
-#include <qpushbutton.h>
-#include <qlistbox.h>
+#include <tqpushbutton.h>
+#include <tqlistbox.h>
#include <kaccel.h>
#include <kkeydialog.h>
//#include <kcmodule.h>
-#include <qdict.h>
+#include <tqdict.h>
class QCheckBox;
@@ -28,8 +28,8 @@ public:
//KAccelActions dict;
KeyChooserSpec *kc;
- KKeyModule( QWidget *parent, bool isGlobal, bool bSeriesOnly, bool bSeriesNone, const char *name = 0 );
- KKeyModule( QWidget *parent, bool isGlobal, const char *name = 0 );
+ KKeyModule( TQWidget *parent, bool isGlobal, bool bSeriesOnly, bool bSeriesNone, const char *name = 0 );
+ KKeyModule( TQWidget *parent, bool isGlobal, const char *name = 0 );
~KKeyModule ();
protected:
@@ -41,8 +41,8 @@ public:
virtual void defaults();
static void init();
- bool writeSettings( const QString& sGroup, KConfig* pConfig );
- bool writeSettingsGlobal( const QString& sGroup );
+ bool writeSettings( const TQString& sGroup, KConfig* pConfig );
+ bool writeSettingsGlobal( const TQString& sGroup );
public slots:
//void slotPreviewScheme( int );
@@ -59,19 +59,19 @@ signals:
//void keysChanged( const KAccelActions* map_P );
protected:
- QListBox *sList;
- QStringList *sFileList;
- QPushButton *addBt;
- QPushButton *removeBt;
- QCheckBox *preferMetaBt;
+ TQListBox *sList;
+ TQStringList *sFileList;
+ TQPushButton *addBt;
+ TQPushButton *removeBt;
+ TQCheckBox *preferMetaBt;
int nSysSchemes;
bool bSeriesOnly;
void readScheme( int index=0 );
- QString KeyType;
- QString KeyScheme;
- QString KeySet;
+ TQString KeyType;
+ TQString KeyScheme;
+ TQString KeySet;
};
@@ -79,7 +79,7 @@ class KeyChooserSpec : public KKeyChooser
{
Q_OBJECT
public:
- KeyChooserSpec( KAccelActions& actions, QWidget* parent,
+ KeyChooserSpec( KAccelActions& actions, TQWidget* parent,
bool bGlobal );
//void updateKeys( const KAccelActions* map_P );
protected:
diff --git a/kcontrol/keys/khotkeys.cpp b/kcontrol/keys/khotkeys.cpp
index 869cab71a..636cd972c 100644
--- a/kcontrol/keys/khotkeys.cpp
+++ b/kcontrol/keys/khotkeys.cpp
@@ -25,11 +25,11 @@ extern "C"
{
static void (*khotkeys_init_2)( void );
static void (*khotkeys_cleanup_2)( void );
- static QString (*khotkeys_get_menu_entry_shortcut_2)( const QString& entry_P );
- static QString (*khotkeys_change_menu_entry_shortcut_2)( const QString& entry_P,
- const QString& shortcut_P );
- static bool (*khotkeys_menu_entry_moved_2)( const QString& new_P, const QString& old_P );
- static void (*khotkeys_menu_entry_deleted_2)( const QString& entry_P );
+ static TQString (*khotkeys_get_menu_entry_shortcut_2)( const TQString& entry_P );
+ static TQString (*khotkeys_change_menu_entry_shortcut_2)( const TQString& entry_P,
+ const TQString& shortcut_P );
+ static bool (*khotkeys_menu_entry_moved_2)( const TQString& new_P, const TQString& old_P );
+ static void (*khotkeys_menu_entry_deleted_2)( const TQString& entry_P );
}
static bool khotkeys_present = false;
@@ -44,16 +44,16 @@ bool KHotKeys::init()
khotkeys_init_2 = ( void (*)(void)) ( lib->symbol( "khotkeys_init" ));
khotkeys_cleanup_2 = ( void (*)(void)) ( lib->symbol( "khotkeys_cleanup" ));
khotkeys_get_menu_entry_shortcut_2 =
- ( QString (*)( const QString& ))
+ ( TQString (*)( const TQString& ))
( lib->symbol( "khotkeys_get_menu_entry_shortcut" ));
khotkeys_change_menu_entry_shortcut_2 =
- ( QString (*)( const QString&, const QString& ))
+ ( TQString (*)( const TQString&, const TQString& ))
( lib->symbol( "khotkeys_change_menu_entry_shortcut" ));
khotkeys_menu_entry_moved_2 =
- ( bool (*)( const QString&, const QString& ))
+ ( bool (*)( const TQString&, const TQString& ))
( lib->symbol( "khotkeys_menu_entry_moved" ));
khotkeys_menu_entry_deleted_2 =
- ( void (*)( const QString& ))
+ ( void (*)( const TQString& ))
( lib->symbol( "khotkeys_menu_entry_deleted" ));
if( khotkeys_init_2
&& khotkeys_cleanup_2
@@ -83,7 +83,7 @@ bool KHotKeys::present()
return khotkeys_present;
}
-QString KHotKeys::getMenuEntryShortcut( const QString& entry_P )
+TQString KHotKeys::getMenuEntryShortcut( const TQString& entry_P )
{
if( !khotkeys_inited )
init();
@@ -92,8 +92,8 @@ QString KHotKeys::getMenuEntryShortcut( const QString& entry_P )
return khotkeys_get_menu_entry_shortcut_2( entry_P );
}
-QString KHotKeys::changeMenuEntryShortcut( const QString& entry_P,
- const QString shortcut_P )
+TQString KHotKeys::changeMenuEntryShortcut( const TQString& entry_P,
+ const TQString shortcut_P )
{
if( !khotkeys_inited )
init();
@@ -102,7 +102,7 @@ QString KHotKeys::changeMenuEntryShortcut( const QString& entry_P,
return khotkeys_change_menu_entry_shortcut_2( entry_P, shortcut_P );
}
-bool KHotKeys::menuEntryMoved( const QString& new_P, const QString& old_P )
+bool KHotKeys::menuEntryMoved( const TQString& new_P, const TQString& old_P )
{
if( !khotkeys_inited )
init();
@@ -111,7 +111,7 @@ bool KHotKeys::menuEntryMoved( const QString& new_P, const QString& old_P )
return khotkeys_menu_entry_moved_2( new_P, old_P );
}
-void KHotKeys::menuEntryDeleted( const QString& entry_P )
+void KHotKeys::menuEntryDeleted( const TQString& entry_P )
{
if( !khotkeys_inited )
init();
diff --git a/kcontrol/keys/khotkeys.h b/kcontrol/keys/khotkeys.h
index 90ea17985..9eab62106 100644
--- a/kcontrol/keys/khotkeys.h
+++ b/kcontrol/keys/khotkeys.h
@@ -21,7 +21,7 @@
#ifndef __khotkeys_public_h__
#define __khotkeys_public_h__
-#include <qstring.h>
+#include <tqstring.h>
// see kdebase/khotkeys/kcontrol for info on these
@@ -31,11 +31,11 @@ public:
static bool init();
static void cleanup();
static bool present();
- static QString getMenuEntryShortcut( const QString& entry_P );
- static QString changeMenuEntryShortcut( const QString& entry_P,
- const QString shortcut_P );
- static bool menuEntryMoved( const QString& new_P, const QString& old_P );
- static void menuEntryDeleted( const QString& entry_P );
+ static TQString getMenuEntryShortcut( const TQString& entry_P );
+ static TQString changeMenuEntryShortcut( const TQString& entry_P,
+ const TQString shortcut_P );
+ static bool menuEntryMoved( const TQString& new_P, const TQString& old_P );
+ static void menuEntryDeleted( const TQString& entry_P );
};
#endif
diff --git a/kcontrol/keys/main.cpp b/kcontrol/keys/main.cpp
index c03c26f91..d3b29fffe 100644
--- a/kcontrol/keys/main.cpp
+++ b/kcontrol/keys/main.cpp
@@ -21,7 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <klocale.h>
@@ -48,7 +48,7 @@ o Pre-set scheme <Remove Scheme>
Global Shortcuts
*/
-KeyModule::KeyModule( QWidget *parent, const char *name )
+KeyModule::KeyModule( TQWidget *parent, const char *name )
: KCModule( parent, name )
{
setQuickHelp( i18n("<h1>Keyboard Shortcuts</h1> Using shortcuts you can configure certain actions to be"
@@ -69,22 +69,22 @@ KeyModule::~KeyModule()
void KeyModule::initGUI()
{
- m_pTab = new QTabWidget( this );
- QVBoxLayout *l = new QVBoxLayout(this);
+ m_pTab = new TQTabWidget( this );
+ TQVBoxLayout *l = new TQVBoxLayout(this);
l->addWidget(m_pTab);
m_pShortcuts = new ShortcutsModule( this );
m_pTab->addTab( m_pShortcuts, i18n("Shortcut Schemes") );
- connect( m_pShortcuts, SIGNAL(changed(bool)), SIGNAL(changed(bool)) );
+ connect( m_pShortcuts, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool)) );
m_pCommandShortcuts = new CommandShortcutsModule ( this );
m_pTab->addTab( m_pCommandShortcuts, i18n("Command Shortcuts") );
- connect( m_pCommandShortcuts, SIGNAL(changed(bool)), SIGNAL(changed(bool)) );
- connect( m_pTab, SIGNAL(currentChanged(QWidget*)), m_pCommandShortcuts, SLOT(showing(QWidget*)) );
+ connect( m_pCommandShortcuts, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool)) );
+ connect( m_pTab, TQT_SIGNAL(currentChanged(TQWidget*)), m_pCommandShortcuts, TQT_SLOT(showing(TQWidget*)) );
m_pModifiers = new ModifiersModule( this );
m_pTab->addTab( m_pModifiers, i18n("Modifier Keys") );
- connect( m_pModifiers, SIGNAL(changed(bool)), SIGNAL(changed(bool)) );
+ connect( m_pModifiers, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool)) );
}
void KeyModule::load()
@@ -120,7 +120,7 @@ void KeyModule::defaults()
m_pModifiers->defaults();
}
-void KeyModule::resizeEvent( QResizeEvent * )
+void KeyModule::resizeEvent( TQResizeEvent * )
{
m_pTab->setGeometry( 0, 0, width(), height() );
}
@@ -129,7 +129,7 @@ void KeyModule::resizeEvent( QResizeEvent * )
extern "C"
{
- KDE_EXPORT KCModule *create_keys(QWidget *parent, const char * /*name*/)
+ KDE_EXPORT KCModule *create_keys(TQWidget *parent, const char * /*name*/)
{
// What does this do? Why not insert klipper and kxkb, too? --ellis, 2002/01/15
KGlobal::locale()->insertCatalogue("kwin");
@@ -154,7 +154,7 @@ extern "C"
/*kdDebug(125) << "KKeyModule::init() - Initialize # Modifier Keys Settings\n";
KConfigGroupSaver cgs( KGlobal::config(), "Keyboard" );
- QString fourMods = KGlobal::config()->readEntry( "Use Four Modifier Keys", KAccel::keyboardHasMetaKey() ? "true" : "false" );
+ TQString fourMods = KGlobal::config()->readEntry( "Use Four Modifier Keys", KAccel::keyboardHasMetaKey() ? "true" : "false" );
KAccel::useFourModifierKeys( fourMods == "true" );
bool bUseFourModifierKeys = KAccel::useFourModifierKeys();
KGlobal::config()->writeEntry( "User Four Modifier Keys", bUseFourModifierKeys ? "true" : "false", true, true );
diff --git a/kcontrol/keys/main.h b/kcontrol/keys/main.h
index 5cabba122..f0b18c43d 100644
--- a/kcontrol/keys/main.h
+++ b/kcontrol/keys/main.h
@@ -24,7 +24,7 @@
#ifndef __keys_main_h
#define __keys_main_h
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <kcmodule.h>
class CommandShortcutsModule;
@@ -35,7 +35,7 @@ class KeyModule : public KCModule
{
Q_OBJECT
public:
- KeyModule( QWidget *parent, const char *name );
+ KeyModule( TQWidget *parent, const char *name );
~KeyModule();
void load();
@@ -45,10 +45,10 @@ class KeyModule : public KCModule
protected:
void initGUI();
- void resizeEvent( QResizeEvent* );
+ void resizeEvent( TQResizeEvent* );
private:
- QTabWidget* m_pTab;
+ TQTabWidget* m_pTab;
CommandShortcutsModule* m_pCommandShortcuts;
ShortcutsModule* m_pShortcuts;
ModifiersModule* m_pModifiers;
diff --git a/kcontrol/keys/modifiers.cpp b/kcontrol/keys/modifiers.cpp
index 8391c7938..d17e1619e 100644
--- a/kcontrol/keys/modifiers.cpp
+++ b/kcontrol/keys/modifiers.cpp
@@ -1,10 +1,10 @@
#include "modifiers.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -51,8 +51,8 @@ Extra1 [] [] User definable
//1) labels: Shift | Ctrl | Option | Command
//2) swap Ctrl & Command
-ModifiersModule::ModifiersModule( QWidget *parent, const char *name )
-: QWidget( parent, name )
+ModifiersModule::ModifiersModule( TQWidget *parent, const char *name )
+: TQWidget( parent, name )
{
initGUI();
load( false );
@@ -168,31 +168,31 @@ void ModifiersModule::setupMacModifierKeys()
void ModifiersModule::initGUI()
{
- QGridLayout* pLayoutTop = new QGridLayout( this, 6, 2, KDialog::marginHint() );
+ TQGridLayout* pLayoutTop = new TQGridLayout( this, 6, 2, KDialog::marginHint() );
pLayoutTop->setColStretch( 1, 1 );
- QGroupBox* pGroup = new QGroupBox( 2, Qt::Horizontal, i18n("KDE Modifiers"), this );
+ TQGroupBox* pGroup = new TQGroupBox( 2, Qt::Horizontal, i18n("KDE Modifiers"), this );
pLayoutTop->addWidget( pGroup, 0, 0 );
- QLabel* plbl = new QLabel( i18n("Modifier"), pGroup );
- QFont font = plbl->font();
+ TQLabel* plbl = new TQLabel( i18n("Modifier"), pGroup );
+ TQFont font = plbl->font();
font.setUnderline( true );
- font.setWeight( QFont::Bold );
+ font.setWeight( TQFont::Bold );
plbl->setFont( font );
- plbl = new QLabel( i18n("X11-Mod"), pGroup );
+ plbl = new TQLabel( i18n("X11-Mod"), pGroup );
plbl->setFont( font );
- new QLabel( i18n("QAccel", "Shift"), pGroup );
- new QLabel( "shift", pGroup );
+ new TQLabel( i18n("TQAccel", "Shift"), pGroup );
+ new TQLabel( "shift", pGroup );
- m_plblCtrl = new QLabel( i18n("QAccel", "Ctrl"), pGroup );
- new QLabel( "control", pGroup );
+ m_plblCtrl = new TQLabel( i18n("TQAccel", "Ctrl"), pGroup );
+ new TQLabel( "control", pGroup );
- m_plblAlt = new QLabel( i18n("QAccel", "Alt"), pGroup );
- new QLabel( "mod1", pGroup );
+ m_plblAlt = new TQLabel( i18n("TQAccel", "Alt"), pGroup );
+ new TQLabel( "mod1", pGroup );
- m_plblWin = new QLabel( i18n("Win"), pGroup );
- m_plblWinModX = new QLabel( "", pGroup );
+ m_plblWin = new TQLabel( i18n("Win"), pGroup );
+ m_plblWinModX = new TQLabel( "", pGroup );
/*m_pcbWinX = newModXComboBox( pGroup );
int i;
switch( KKeyNative::modX(KKey::WIN) ) {
@@ -204,14 +204,14 @@ void ModifiersModule::initGUI()
}
m_pcbWinX->setCurrentItem( i );*/
- m_pchkMacKeyboard = new QCheckBox( i18n("Macintosh keyboard"), this );
+ m_pchkMacKeyboard = new TQCheckBox( i18n("Macintosh keyboard"), this );
m_pchkMacKeyboard->setChecked( m_bMacKeyboardOrig );
- connect( m_pchkMacKeyboard, SIGNAL(clicked()), SLOT(slotMacKeyboardClicked()) );
+ connect( m_pchkMacKeyboard, TQT_SIGNAL(clicked()), TQT_SLOT(slotMacKeyboardClicked()) );
pLayoutTop->addWidget( m_pchkMacKeyboard, 1, 0 );
- m_pchkMacSwap = new QCheckBox( i18n("MacOS-style modifier usage"), this );
+ m_pchkMacSwap = new TQCheckBox( i18n("MacOS-style modifier usage"), this );
m_pchkMacSwap->setChecked( m_bMacSwapOrig );
- QWhatsThis::add( m_pchkMacSwap,
+ TQWhatsThis::add( m_pchkMacSwap,
i18n("Checking this box will change your X Modifier Mapping to "
"better reflect the standard MacOS modifier key usage. "
"It allows you to use <i>Command+C</i> for <i>Copy</i>, for instance, "
@@ -219,18 +219,18 @@ void ModifiersModule::initGUI()
"<b>Command</b> will be used for application and console commands, "
"<b>Option</b> as a command modifier and for navigating menus and dialogs, "
"and <b>Control</b> for window manager commands.") );
- connect( m_pchkMacSwap, SIGNAL(clicked()), SLOT(slotMacSwapClicked()) );
+ connect( m_pchkMacSwap, TQT_SIGNAL(clicked()), TQT_SLOT(slotMacSwapClicked()) );
pLayoutTop->addWidget( m_pchkMacSwap, 2, 0 );
//------------------
pLayoutTop->addRowSpacing( 3, KDialog::spacingHint() * 3 );
- pGroup = new QGroupBox( 1, Qt::Horizontal, i18n("X Modifier Mapping"), this );
+ pGroup = new TQGroupBox( 1, Qt::Horizontal, i18n("X Modifier Mapping"), this );
pLayoutTop->addWidget( pGroup, 4, 0 );
m_plstXMods = new KListView( pGroup );
m_plstXMods->setSorting( -1 );
- m_plstXMods->setSelectionMode( QListView::NoSelection );
+ m_plstXMods->setSelectionMode( TQListView::NoSelection );
m_plstXMods->setAllColumnsShowFocus( true );
m_plstXMods->addColumn( i18n("X11-Mod") );
@@ -249,7 +249,7 @@ void ModifiersModule::initGUI()
updateWidgets();
}
-/*KComboBox* ModifiersModule::newModXComboBox( QWidget* parent )
+/*KComboBox* ModifiersModule::newModXComboBox( TQWidget* parent )
{
KComboBox* pcb = new KComboBox( parent );
pcb->insertItem( "" );
@@ -285,8 +285,8 @@ void ModifiersModule::updateWidgets()
}
m_pchkMacSwap->setEnabled( true );
} else {
- m_plblCtrl->setText( i18n("QAccel", "Ctrl") );
- m_plblAlt->setText( i18n("QAccel", "Alt") );
+ m_plblCtrl->setText( i18n("TQAccel", "Ctrl") );
+ m_plblAlt->setText( i18n("TQAccel", "Alt") );
m_plblWin->setText( i18n("Win") );
m_pchkMacSwap->setEnabled( false );
}
@@ -325,7 +325,7 @@ void ModifiersModule::updateWidgets()
default: i = 0;
}
if( i != 0 )
- m_plblWinModX->setText( "mod" + QString::number(i) );
+ m_plblWinModX->setText( "mod" + TQString::number(i) );
else
m_plblWinModX->setText( "<" + i18n("None") + ">" );
}
diff --git a/kcontrol/keys/modifiers.h b/kcontrol/keys/modifiers.h
index 60ce76ae9..406d49862 100644
--- a/kcontrol/keys/modifiers.h
+++ b/kcontrol/keys/modifiers.h
@@ -1,7 +1,7 @@
#ifndef __MODIFIERS_MODULE_H
#define __MODIFIERS_MODULE_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QCheckBox;
class QLabel;
@@ -12,7 +12,7 @@ class ModifiersModule : public QWidget
{
Q_OBJECT
public:
- ModifiersModule( QWidget *parent = 0, const char *name = 0 );
+ ModifiersModule( TQWidget *parent = 0, const char *name = 0 );
void load( bool useDefaults );
void save();
@@ -25,13 +25,13 @@ class ModifiersModule : public QWidget
protected:
bool m_bMacKeyboardOrig, m_bMacSwapOrig;
- QString m_sLabelCtrlOrig, m_sLabelAltOrig, m_sLabelWinOrig;
+ TQString m_sLabelCtrlOrig, m_sLabelAltOrig, m_sLabelWinOrig;
- QLabel* m_plblCtrl, * m_plblAlt, * m_plblWin;
- QLabel* m_plblWinModX;
- QCheckBox* m_pchkMacKeyboard;
+ TQLabel* m_plblCtrl, * m_plblAlt, * m_plblWin;
+ TQLabel* m_plblWinModX;
+ TQCheckBox* m_pchkMacKeyboard;
KListView* m_plstXMods;
- QCheckBox* m_pchkMacSwap;
+ TQCheckBox* m_pchkMacSwap;
void initGUI();
// Places the values in the *Orig variables into their
diff --git a/kcontrol/keys/shortcuts.cpp b/kcontrol/keys/shortcuts.cpp
index 2ceceb46a..9f997b7e5 100644
--- a/kcontrol/keys/shortcuts.cpp
+++ b/kcontrol/keys/shortcuts.cpp
@@ -26,10 +26,10 @@
#include <stdlib.h>
-#include <qdir.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qcheckbox.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqcheckbox.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -42,8 +42,8 @@
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
-ShortcutsModule::ShortcutsModule( QWidget *parent, const char *name )
-: QWidget( parent, name )
+ShortcutsModule::ShortcutsModule( TQWidget *parent, const char *name )
+: TQWidget( parent, name )
{
initGUI();
}
@@ -91,7 +91,7 @@ void ShortcutsModule::defaults()
m_pkcApplication->allDefault();
}
-QString ShortcutsModule::quickHelp() const
+TQString ShortcutsModule::quickHelp() const
{
return i18n("<h1>Key Bindings</h1> Using key bindings you can configure certain actions to be"
" triggered when you press a key or a combination of keys, e.g. Ctrl+C is normally bound to"
@@ -104,7 +104,7 @@ QString ShortcutsModule::quickHelp() const
void ShortcutsModule::initGUI()
{
- QString kde_winkeys_env_dir = KGlobal::dirs()->localkdedir() + "/env/";
+ TQString kde_winkeys_env_dir = KGlobal::dirs()->localkdedir() + "/env/";
kdDebug(125) << "A-----------" << endl;
KAccelActions* keys = &m_actionsGeneral;
@@ -128,57 +128,57 @@ void ShortcutsModule::initGUI()
kdDebug(125) << "E-----------" << endl;
kdDebug(125) << "F-----------" << endl;
- QVBoxLayout* pVLayout = new QVBoxLayout( this, KDialog::marginHint() );
+ TQVBoxLayout* pVLayout = new TQVBoxLayout( this, KDialog::marginHint() );
pVLayout->addSpacing( KDialog::marginHint() );
// (o) [Current ] <Remove> ( ) New <Save>
- QHBoxLayout *pHLayout = new QHBoxLayout( pVLayout, KDialog::spacingHint() );
- QButtonGroup* pGroup = new QButtonGroup( this );
+ TQHBoxLayout *pHLayout = new TQHBoxLayout( pVLayout, KDialog::spacingHint() );
+ TQButtonGroup* pGroup = new TQButtonGroup( this );
pGroup->hide();
- m_prbPre = new QRadioButton( "", this );
- connect( m_prbPre, SIGNAL(clicked()), SLOT(slotSchemeCur()) );
+ m_prbPre = new TQRadioButton( "", this );
+ connect( m_prbPre, TQT_SIGNAL(clicked()), TQT_SLOT(slotSchemeCur()) );
pGroup->insert( m_prbPre );
pHLayout->addWidget( m_prbPre );
m_pcbSchemes = new KComboBox( this );
m_pcbSchemes->setMinimumWidth( 100 );
- m_pcbSchemes->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed );
- connect( m_pcbSchemes, SIGNAL(activated(int)), SLOT(slotSelectScheme(int)) );
+ m_pcbSchemes->setSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed );
+ connect( m_pcbSchemes, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSelectScheme(int)) );
pHLayout->addWidget( m_pcbSchemes );
pHLayout->addSpacing( KDialog::marginHint() );
- m_pbtnRemove = new QPushButton( i18n("&Remove"), this );
+ m_pbtnRemove = new TQPushButton( i18n("&Remove"), this );
m_pbtnRemove->setEnabled( false );
- connect( m_pbtnRemove, SIGNAL(clicked()), SLOT(slotRemoveScheme()) );
- QWhatsThis::add( m_pbtnRemove, i18n("Click here to remove the selected key bindings scheme. You cannot"
+ connect( m_pbtnRemove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveScheme()) );
+ TQWhatsThis::add( m_pbtnRemove, i18n("Click here to remove the selected key bindings scheme. You cannot"
" remove the standard system-wide schemes 'Current scheme' and 'KDE default'.") );
pHLayout->addWidget( m_pbtnRemove );
pHLayout->addSpacing( KDialog::marginHint() * 3 );
- m_prbNew = new QRadioButton( i18n("New scheme"), this );
+ m_prbNew = new TQRadioButton( i18n("New scheme"), this );
m_prbNew->setEnabled( false );
pGroup->insert( m_prbNew );
pHLayout->addWidget( m_prbNew );
- m_pbtnSave = new QPushButton( i18n("&Save..."), this );
+ m_pbtnSave = new TQPushButton( i18n("&Save..."), this );
m_pbtnSave->setEnabled( false );
- QWhatsThis::add( m_pbtnSave, i18n("Click here to add a new key bindings scheme. You will be prompted for a name.") );
- connect( m_pbtnSave, SIGNAL(clicked()), SLOT(slotSaveSchemeAs()) );
+ TQWhatsThis::add( m_pbtnSave, i18n("Click here to add a new key bindings scheme. You will be prompted for a name.") );
+ connect( m_pbtnSave, TQT_SIGNAL(clicked()), TQT_SLOT(slotSaveSchemeAs()) );
pHLayout->addWidget( m_pbtnSave );
pHLayout->addStretch( 1 );
- m_pTab = new QTabWidget( this );
+ m_pTab = new TQTabWidget( this );
m_pTab->setMargin( KDialog::marginHint() );
pVLayout->addWidget( m_pTab );
// See if ~/.kde3/env/win-key.sh exists
- QFile f( kde_winkeys_env_dir + "win-key.sh" );
+ TQFile f( kde_winkeys_env_dir + "win-key.sh" );
if ( f.exists() == false ) {
// No, it does not, so Win is a modifier
m_bUseRmWinKeys = true;
@@ -192,24 +192,24 @@ void ShortcutsModule::initGUI()
m_pkcGeneral = new KKeyChooser( m_pListGeneral, this, KKeyChooser::Global, false );
m_pkcGeneral->resize (m_pkcGeneral->sizeHint() );
if (system("xmodmap 1> /dev/null 2> /dev/null") == 0) {
- m_useRmWinKeys = new QCheckBox( i18n("Use Win key as modifier (uncheck to bind Win key to Menu)"), this );
+ m_useRmWinKeys = new TQCheckBox( i18n("Use Win key as modifier (uncheck to bind Win key to Menu)"), this );
m_useRmWinKeys->resize( m_useRmWinKeys->sizeHint() );
m_useRmWinKeys->setChecked( m_bUseRmWinKeys );
pVLayout->addWidget( m_useRmWinKeys, 1, 0 );
- connect( m_useRmWinKeys, SIGNAL(clicked()), SLOT(slotUseRmWinKeysClicked()) );
+ connect( m_useRmWinKeys, TQT_SIGNAL(clicked()), TQT_SLOT(slotUseRmWinKeysClicked()) );
}
m_pTab->addTab( m_pkcGeneral, i18n("&Global Shortcuts") );
- connect( m_pkcGeneral, SIGNAL(keyChange()), SLOT(slotKeyChange()) );
+ connect( m_pkcGeneral, TQT_SIGNAL(keyChange()), TQT_SLOT(slotKeyChange()) );
m_pListSequence = new KAccelShortcutList( m_actionsSequence, true );
m_pkcSequence = new KKeyChooser( m_pListSequence, this, KKeyChooser::Global, false );
m_pTab->addTab( m_pkcSequence, i18n("Shortcut Se&quences") );
- connect( m_pkcSequence, SIGNAL(keyChange()), SLOT(slotKeyChange()) );
+ connect( m_pkcSequence, TQT_SIGNAL(keyChange()), TQT_SLOT(slotKeyChange()) );
m_pListApplication = new KStdAccel::ShortcutList;
m_pkcApplication = new KKeyChooser( m_pListApplication, this, KKeyChooser::Standard, false );
m_pTab->addTab( m_pkcApplication, i18n("App&lication Shortcuts") );
- connect( m_pkcApplication, SIGNAL(keyChange()), SLOT(slotKeyChange()) );
+ connect( m_pkcApplication, TQT_SIGNAL(keyChange()), TQT_SLOT(slotKeyChange()) );
kdDebug(125) << "G-----------" << endl;
readSchemeNames();
@@ -225,7 +225,7 @@ void ShortcutsModule::createActionsGeneral()
KAccelActions& actions = m_actionsGeneral;
for( uint i = 0; i < actions.count(); i++ ) {
- QString sConfigKey = actions[i].name();
+ TQString sConfigKey = actions[i].name();
//kdDebug(125) << "sConfigKey: " << sConfigKey << endl;
int iLastSpace = sConfigKey.findRev( ' ' );
bool bIsNum = false;
@@ -236,7 +236,7 @@ void ShortcutsModule::createActionsGeneral()
// << " bIsNum: " << bIsNum << endl;
if( bIsNum && !sConfigKey.contains( ':' ) ) {
actions[i].setConfigurable( false );
- actions[i].setName( QString::null );
+ actions[i].setName( TQString::null );
}
}
}
@@ -246,7 +246,7 @@ void ShortcutsModule::createActionsSequence()
KAccelActions& actions = m_actionsSequence;
for( uint i = 0; i < actions.count(); i++ ) {
- QString sConfigKey = actions[i].name();
+ TQString sConfigKey = actions[i].name();
//kdDebug(125) << "sConfigKey: " << sConfigKey << endl;
int iLastSpace = sConfigKey.findRev( ' ' );
bool bIsNum = false;
@@ -257,14 +257,14 @@ void ShortcutsModule::createActionsSequence()
// << " bIsNum: " << bIsNum << endl;
if( !bIsNum && !sConfigKey.contains( ':' ) ) {
actions[i].setConfigurable( false );
- actions[i].setName( QString::null );
+ actions[i].setName( TQString::null );
}
}
}
void ShortcutsModule::readSchemeNames()
{
- QStringList schemes = KGlobal::dirs()->findAllResources("data", "kcmkeys/*.kksrc");
+ TQStringList schemes = KGlobal::dirs()->findAllResources("data", "kcmkeys/*.kksrc");
m_pcbSchemes->clear();
m_rgsSchemeFiles.clear();
@@ -274,7 +274,7 @@ void ShortcutsModule::readSchemeNames()
m_rgsSchemeFiles.append( "cur" );
// This for system files
- for ( QStringList::ConstIterator it = schemes.begin(); it != schemes.end(); ++it) {
+ for ( TQStringList::ConstIterator it = schemes.begin(); it != schemes.end(); ++it) {
// KPersonalizer relies on .kksrc files containing all the keyboard shortcut
// schemes for various setups. It also requires the KDE defaults to be in
// a .kksrc file. The KDE defaults shouldn't be listed here.
@@ -283,14 +283,14 @@ void ShortcutsModule::readSchemeNames()
KSimpleConfig config( *it, true );
config.setGroup( "Settings" );
- QString str = config.readEntry( "Name" );
+ TQString str = config.readEntry( "Name" );
m_pcbSchemes->insertItem( str );
m_rgsSchemeFiles.append( *it );
}
}
-void ShortcutsModule::resizeEvent( QResizeEvent * )
+void ShortcutsModule::resizeEvent( TQResizeEvent * )
{
//m_pTab->setGeometry(0,0,width(),height());
}
@@ -315,7 +315,7 @@ void ShortcutsModule::slotSelectScheme( int )
{
i18n("Your current changes will be lost if you load another scheme before saving this one.");
kdDebug(125) << "ShortcutsModule::slotSelectScheme( " << m_pcbSchemes->currentItem() << " )" << endl;
- QString sFilename = m_rgsSchemeFiles[ m_pcbSchemes->currentItem() ];
+ TQString sFilename = m_rgsSchemeFiles[ m_pcbSchemes->currentItem() ];
if( sFilename == "cur" ) {
// TODO: remove nulls params
@@ -353,7 +353,7 @@ void ShortcutsModule::slotSelectScheme( int )
void ShortcutsModule::slotSaveSchemeAs()
{
- QString sName, sFile;
+ TQString sName, sFile;
bool bNameValid, ok;
int iScheme = -1;
@@ -382,7 +382,7 @@ void ShortcutsModule::slotSaveSchemeAs()
sFile.remove( ind, 1 );
// Make the next letter upper case
- QString s = sFile.mid( ind, 1 );
+ TQString s = sFile.mid( ind, 1 );
s = s.upper();
sFile.replace( ind, 1, s );
}
@@ -404,11 +404,11 @@ void ShortcutsModule::slotSaveSchemeAs()
return;
} while( !bNameValid );
- disconnect( m_pcbSchemes, SIGNAL(activated(int)), this, SLOT(slotSelectScheme(int)) );
+ disconnect( m_pcbSchemes, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSelectScheme(int)) );
- QString kksPath = KGlobal::dirs()->saveLocation( "data", "kcmkeys/" );
+ TQString kksPath = KGlobal::dirs()->saveLocation( "data", "kcmkeys/" );
- QDir dir( kksPath );
+ TQDir dir( kksPath );
if( !dir.exists() && !dir.mkdir( kksPath ) ) {
qWarning("KShortcutsModule: Could not make directory to store user info.");
return;
@@ -434,13 +434,13 @@ void ShortcutsModule::slotSaveSchemeAs()
saveScheme();
- connect( m_pcbSchemes, SIGNAL(activated(int)), SLOT(slotSelectScheme(int)) );
+ connect( m_pcbSchemes, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSelectScheme(int)) );
slotSelectScheme();
}
void ShortcutsModule::saveScheme()
{
- QString sFilename = m_rgsSchemeFiles[ m_pcbSchemes->currentItem() ];
+ TQString sFilename = m_rgsSchemeFiles[ m_pcbSchemes->currentItem() ];
KSimpleConfig config( sFilename );
m_pkcGeneral->commitChanges();
@@ -458,16 +458,16 @@ void ShortcutsModule::slotRemoveScheme()
void ShortcutsModule::slotUseRmWinKeysClicked()
{
- QString kde_winkeys_env_dir = KGlobal::dirs()->localkdedir() + "/env/";
+ TQString kde_winkeys_env_dir = KGlobal::dirs()->localkdedir() + "/env/";
// See if ~/.kde3/env/win-key.sh exists
- QFile f( kde_winkeys_env_dir + "win-key.sh" );
+ TQFile f( kde_winkeys_env_dir + "win-key.sh" );
if ( f.exists() == false ) {
// No, it does not, so Win is currently a modifier
if (m_useRmWinKeys->isChecked() == false) {
// Create the file
if ( f.open( IO_WriteOnly ) ) {
- QTextStream stream( &f );
+ TQTextStream stream( &f );
stream << "xmodmap -e 'keycode 133=Menu'" << "\n";
stream << "xmodmap -e 'keycode 134=Menu'" << "\n";
f.close();
diff --git a/kcontrol/keys/shortcuts.h b/kcontrol/keys/shortcuts.h
index e51d8cb7a..d45034c9d 100644
--- a/kcontrol/keys/shortcuts.h
+++ b/kcontrol/keys/shortcuts.h
@@ -24,11 +24,11 @@
#ifndef __SHORTCUTS_MODULE_H
#define __SHORTCUTS_MODULE_H
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qtabwidget.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqtabwidget.h>
#include "kaccelaction.h"
#include <kcombobox.h>
#include <kkeydialog.h>
@@ -37,13 +37,13 @@ class ShortcutsModule : public QWidget
{
Q_OBJECT
public:
- ShortcutsModule( QWidget *parent = 0, const char *name = 0 );
+ ShortcutsModule( TQWidget *parent = 0, const char *name = 0 );
~ShortcutsModule();
void load();
void save();
void defaults();
- QString quickHelp() const;
+ TQString quickHelp() const;
protected:
void initGUI();
@@ -51,7 +51,7 @@ class ShortcutsModule : public QWidget
void createActionsSequence();
void readSchemeNames();
void saveScheme();
- void resizeEvent(QResizeEvent *e);
+ void resizeEvent(TQResizeEvent *e);
signals:
void changed( bool );
@@ -65,16 +65,16 @@ class ShortcutsModule : public QWidget
void slotUseRmWinKeysClicked();
private:
- QTabWidget* m_pTab;
- QRadioButton *m_prbPre, *m_prbNew;
+ TQTabWidget* m_pTab;
+ TQRadioButton *m_prbPre, *m_prbNew;
KComboBox* m_pcbSchemes;
- QPushButton* m_pbtnSave, * m_pbtnRemove;
+ TQPushButton* m_pbtnSave, * m_pbtnRemove;
int m_nSysSchemes;
- QStringList m_rgsSchemeFiles;
+ TQStringList m_rgsSchemeFiles;
KAccelActions m_actionsGeneral, m_actionsSequence;//, m_actionsApplication;
KShortcutList* m_pListGeneral, * m_pListSequence, * m_pListApplication;
KKeyChooser* m_pkcGeneral, * m_pkcSequence, * m_pkcApplication;
- QCheckBox* m_useRmWinKeys;
+ TQCheckBox* m_useRmWinKeys;
bool m_bUseRmWinKeys;
};
diff --git a/kcontrol/keys/treeview.cpp b/kcontrol/keys/treeview.cpp
index 0c2056766..58de8a1f5 100644
--- a/kcontrol/keys/treeview.cpp
+++ b/kcontrol/keys/treeview.cpp
@@ -20,10 +20,10 @@
#include <unistd.h>
-#include <qdir.h>
-#include <qimage.h>
-#include <qstringlist.h>
-#include <qcursor.h>
+#include <tqdir.h>
+#include <tqimage.h>
+#include <tqstringlist.h>
+#include <tqcursor.h>
#include <kstandarddirs.h>
#include <klocale.h>
@@ -34,25 +34,25 @@
#include "treeview.moc"
#include "khotkeys.h"
-AppTreeItem::AppTreeItem(QListViewItem *parent, const QString& storageId)
+AppTreeItem::AppTreeItem(TQListViewItem *parent, const TQString& storageId)
: KListViewItem(parent), m_init(false), m_storageId(storageId) {}
-AppTreeItem::AppTreeItem(QListViewItem *parent, QListViewItem *after, const QString& storageId)
+AppTreeItem::AppTreeItem(TQListViewItem *parent, TQListViewItem *after, const TQString& storageId)
: KListViewItem(parent, after), m_init(false), m_storageId(storageId) {}
-AppTreeItem::AppTreeItem(QListView *parent, const QString& storageId)
+AppTreeItem::AppTreeItem(TQListView *parent, const TQString& storageId)
: KListViewItem(parent), m_init(false), m_storageId(storageId) {}
-AppTreeItem::AppTreeItem(QListView *parent, QListViewItem *after, const QString& storageId)
+AppTreeItem::AppTreeItem(TQListView *parent, TQListViewItem *after, const TQString& storageId)
: KListViewItem(parent, after), m_init(false), m_storageId(storageId) {}
-void AppTreeItem::setName(const QString &name)
+void AppTreeItem::setName(const TQString &name)
{
m_name = name;
setText(0, m_name);
}
-void AppTreeItem::setAccel(const QString &accel)
+void AppTreeItem::setAccel(const TQString &accel)
{
m_accel = accel;
int temp = accel.find(';');
@@ -64,7 +64,7 @@ void AppTreeItem::setAccel(const QString &accel)
else
{
setText(1, m_accel);
- setText(2, QString::null);
+ setText(2, TQString::null);
}
}
@@ -76,16 +76,16 @@ void AppTreeItem::setOpen(bool o)
AppTreeView *tv = static_cast<AppTreeView *>(listView());
tv->fillBranch(m_directoryPath, this);
}
- QListViewItem::setOpen(o);
+ TQListViewItem::setOpen(o);
}
-static QPixmap appIcon(const QString &iconName)
+static TQPixmap appIcon(const TQString &iconName)
{
- QPixmap normal = SmallIcon( iconName );
+ TQPixmap normal = SmallIcon( iconName );
// make sure they are not larger than 20x20
if (normal.width() > 20 || normal.height() > 20)
{
- QImage tmp = normal.convertToImage();
+ TQImage tmp = normal.convertToImage();
tmp = tmp.smoothScale(20, 20);
normal.convertFromImage(tmp);
}
@@ -93,10 +93,10 @@ static QPixmap appIcon(const QString &iconName)
}
-AppTreeView::AppTreeView( QWidget *parent, const char *name )
+AppTreeView::AppTreeView( TQWidget *parent, const char *name )
: KListView(parent, name)
{
- setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
setAllColumnsShowFocus(true);
setRootIsDecorated(true);
setSorting(-1);
@@ -109,11 +109,11 @@ AppTreeView::AppTreeView( QWidget *parent, const char *name )
addColumn(i18n("Shortcut"));
addColumn(i18n("Alternate"));
- connect(this, SIGNAL(clicked( QListViewItem* )),
- SLOT(itemSelected( QListViewItem* )));
+ connect(this, TQT_SIGNAL(clicked( TQListViewItem* )),
+ TQT_SLOT(itemSelected( TQListViewItem* )));
- connect(this,SIGNAL(selectionChanged ( QListViewItem * )),
- SLOT(itemSelected( QListViewItem* )));
+ connect(this,TQT_SIGNAL(selectionChanged ( TQListViewItem * )),
+ TQT_SLOT(itemSelected( TQListViewItem* )));
}
AppTreeView::~AppTreeView()
@@ -122,16 +122,16 @@ AppTreeView::~AppTreeView()
void AppTreeView::fill()
{
- QApplication::setOverrideCursor(Qt::WaitCursor);
+ TQApplication::setOverrideCursor(Qt::WaitCursor);
clear();
- fillBranch(QString::null, 0);
- QApplication::restoreOverrideCursor();
+ fillBranch(TQString::null, 0);
+ TQApplication::restoreOverrideCursor();
}
-void AppTreeView::fillBranch(const QString& rPath, AppTreeItem *parent)
+void AppTreeView::fillBranch(const TQString& rPath, AppTreeItem *parent)
{
// get rid of leading slash in the relative path
- QString relPath = rPath;
+ TQString relPath = rPath;
if(relPath[0] == '/')
relPath = relPath.mid(1, relPath.length());
@@ -143,7 +143,7 @@ void AppTreeView::fillBranch(const QString& rPath, AppTreeItem *parent)
KServiceGroup::List list = root->entries(true);
- QListViewItem *after = 0;
+ TQListViewItem *after = 0;
for(KServiceGroup::List::ConstIterator it = list.begin();
it != list.end(); ++it)
@@ -153,7 +153,7 @@ void AppTreeView::fillBranch(const QString& rPath, AppTreeItem *parent)
if (e->isType(KST_KServiceGroup))
{
KServiceGroup::Ptr g(static_cast<KServiceGroup *>(e));
- QString groupCaption = g->caption();
+ TQString groupCaption = g->caption();
// Item names may contain ampersands. To avoid them being converted
// to accelerators, replace them with two ampersands.
@@ -161,9 +161,9 @@ void AppTreeView::fillBranch(const QString& rPath, AppTreeItem *parent)
AppTreeItem *item;
if (parent == 0)
- item = new AppTreeItem(this, after, QString::null);
+ item = new AppTreeItem(this, after, TQString::null);
else
- item = new AppTreeItem(parent, after, QString::null);
+ item = new AppTreeItem(parent, after, TQString::null);
item->setName(groupCaption);
item->setPixmap(0, appIcon(g->icon()));
@@ -174,7 +174,7 @@ void AppTreeView::fillBranch(const QString& rPath, AppTreeItem *parent)
else if (e->isType(KST_KService))
{
KService::Ptr s(static_cast<KService *>(e));
- QString serviceCaption = s->name();
+ TQString serviceCaption = s->name();
// Item names may contain ampersands. To avoid them being converted
// to accelerators, replace them with two ampersands.
@@ -195,7 +195,7 @@ void AppTreeView::fillBranch(const QString& rPath, AppTreeItem *parent)
}
}
-void AppTreeView::itemSelected(QListViewItem *item)
+void AppTreeView::itemSelected(TQListViewItem *item)
{
AppTreeItem *_item = static_cast<AppTreeItem*>(item);
@@ -204,29 +204,29 @@ void AppTreeView::itemSelected(QListViewItem *item)
emit entrySelected(_item->storageId(), _item->accel(), _item->isDirectory());
}
-QStringList AppTreeView::fileList(const QString& rPath)
+TQStringList AppTreeView::fileList(const TQString& rPath)
{
- QString relativePath = rPath;
+ TQString relativePath = rPath;
// truncate "/.directory"
int pos = relativePath.findRev("/.directory");
if (pos > 0) relativePath.truncate(pos);
- QStringList filelist;
+ TQStringList filelist;
// loop through all resource dirs and build a file list
- QStringList resdirlist = KGlobal::dirs()->resourceDirs("apps");
- for (QStringList::ConstIterator it = resdirlist.begin(); it != resdirlist.end(); ++it)
+ TQStringList resdirlist = KGlobal::dirs()->resourceDirs("apps");
+ for (TQStringList::ConstIterator it = resdirlist.begin(); it != resdirlist.end(); ++it)
{
- QDir dir((*it) + "/" + relativePath);
+ TQDir dir((*it) + "/" + relativePath);
if(!dir.exists()) continue;
- dir.setFilter(QDir::Files);
+ dir.setFilter(TQDir::Files);
dir.setNameFilter("*.desktop;*.kdelnk");
// build a list of files
- QStringList files = dir.entryList();
- for (QStringList::ConstIterator it = files.begin(); it != files.end(); ++it) {
+ TQStringList files = dir.entryList();
+ for (TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) {
// does not work?!
//if (filelist.contains(*it)) continue;
@@ -243,27 +243,27 @@ QStringList AppTreeView::fileList(const QString& rPath)
return filelist;
}
-QStringList AppTreeView::dirList(const QString& rPath)
+TQStringList AppTreeView::dirList(const TQString& rPath)
{
- QString relativePath = rPath;
+ TQString relativePath = rPath;
// truncate "/.directory"
int pos = relativePath.findRev("/.directory");
if (pos > 0) relativePath.truncate(pos);
- QStringList dirlist;
+ TQStringList dirlist;
// loop through all resource dirs and build a subdir list
- QStringList resdirlist = KGlobal::dirs()->resourceDirs("apps");
- for (QStringList::ConstIterator it = resdirlist.begin(); it != resdirlist.end(); ++it)
+ TQStringList resdirlist = KGlobal::dirs()->resourceDirs("apps");
+ for (TQStringList::ConstIterator it = resdirlist.begin(); it != resdirlist.end(); ++it)
{
- QDir dir((*it) + "/" + relativePath);
+ TQDir dir((*it) + "/" + relativePath);
if(!dir.exists()) continue;
- dir.setFilter(QDir::Dirs);
+ dir.setFilter(TQDir::Dirs);
// build a list of subdirs
- QStringList subdirs = dir.entryList();
- for (QStringList::ConstIterator it = subdirs.begin(); it != subdirs.end(); ++it) {
+ TQStringList subdirs = dir.entryList();
+ for (TQStringList::ConstIterator it = subdirs.begin(); it != subdirs.end(); ++it) {
if ((*it) == "." || (*it) == "..") continue;
// does not work?!
// if (dirlist.contains(*it)) continue;
diff --git a/kcontrol/keys/treeview.h b/kcontrol/keys/treeview.h
index d376bc00d..b07384397 100644
--- a/kcontrol/keys/treeview.h
+++ b/kcontrol/keys/treeview.h
@@ -21,7 +21,7 @@
#ifndef __treeview_h__
#define __treeview_h__
-#include <qstring.h>
+#include <tqstring.h>
#include <klistview.h>
class QPopupMenu;
@@ -32,19 +32,19 @@ class AppTreeItem : public KListViewItem
{
public:
- AppTreeItem(QListViewItem *parent, const QString& storageId);
- AppTreeItem(QListViewItem *parent, QListViewItem *after, const QString& storageId);
- AppTreeItem(QListView *parent, const QString& storageId);
- AppTreeItem(QListView *parent, QListViewItem* after, const QString& storageId);
+ AppTreeItem(TQListViewItem *parent, const TQString& storageId);
+ AppTreeItem(TQListViewItem *parent, TQListViewItem *after, const TQString& storageId);
+ AppTreeItem(TQListView *parent, const TQString& storageId);
+ AppTreeItem(TQListView *parent, TQListViewItem* after, const TQString& storageId);
- QString storageId() const { return m_storageId; }
- void setDirectoryPath(const QString& path) { m_directoryPath = path; }
+ TQString storageId() const { return m_storageId; }
+ void setDirectoryPath(const TQString& path) { m_directoryPath = path; }
- QString name() const { return m_name; }
- void setName(const QString &name);
+ TQString name() const { return m_name; }
+ void setName(const TQString &name);
- QString accel() const { return m_accel; }
- void setAccel(const QString &accel);
+ TQString accel() const { return m_accel; }
+ void setAccel(const TQString &accel);
bool isDirectory() const { return !m_directoryPath.isEmpty(); }
@@ -52,10 +52,10 @@ public:
private:
bool m_init : 1;
- QString m_storageId;
- QString m_name;
- QString m_directoryPath;
- QString m_accel;
+ TQString m_storageId;
+ TQString m_name;
+ TQString m_directoryPath;
+ TQString m_accel;
};
class AppTreeView : public KListView
@@ -63,21 +63,21 @@ class AppTreeView : public KListView
friend class AppTreeItem;
Q_OBJECT
public:
- AppTreeView(QWidget *parent=0, const char *name=0);
+ AppTreeView(TQWidget *parent=0, const char *name=0);
~AppTreeView();
void fill();
signals:
- void entrySelected(const QString&, const QString &, bool);
+ void entrySelected(const TQString&, const TQString &, bool);
protected slots:
- void itemSelected(QListViewItem *);
+ void itemSelected(TQListViewItem *);
protected:
- void fillBranch(const QString& relPath, AppTreeItem* parent);
+ void fillBranch(const TQString& relPath, AppTreeItem* parent);
- QStringList fileList(const QString& relativePath);
- QStringList dirList(const QString& relativePath);
+ TQStringList fileList(const TQString& relativePath);
+ TQStringList dirList(const TQString& relativePath);
};