diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
commit | c663b6440964f6ac48027143ac9e63298991f9d0 (patch) | |
tree | 6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kwin/kcmkwin/kwinrules | |
parent | a061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff) | |
download | tdebase-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 'kwin/kcmkwin/kwinrules')
-rw-r--r-- | kwin/kcmkwin/kwinrules/detectwidget.cpp | 28 | ||||
-rw-r--r-- | kwin/kcmkwin/kwinrules/detectwidget.h | 28 | ||||
-rw-r--r-- | kwin/kcmkwin/kwinrules/kcm.cpp | 12 | ||||
-rw-r--r-- | kwin/kcmkwin/kwinrules/kcm.h | 4 | ||||
-rw-r--r-- | kwin/kcmkwin/kwinrules/main.cpp | 34 | ||||
-rw-r--r-- | kwin/kcmkwin/kwinrules/ruleslist.cpp | 56 | ||||
-rw-r--r-- | kwin/kcmkwin/kwinrules/ruleslist.h | 8 | ||||
-rw-r--r-- | kwin/kcmkwin/kwinrules/ruleswidget.cpp | 90 | ||||
-rw-r--r-- | kwin/kcmkwin/kwinrules/ruleswidget.h | 14 |
9 files changed, 137 insertions, 137 deletions
diff --git a/kwin/kcmkwin/kwinrules/detectwidget.cpp b/kwin/kcmkwin/kwinrules/detectwidget.cpp index 1a8fa5af5..1a497c8bc 100644 --- a/kwin/kcmkwin/kwinrules/detectwidget.cpp +++ b/kwin/kcmkwin/kwinrules/detectwidget.cpp @@ -22,9 +22,9 @@ #include <klocale.h> #include <kdebug.h> #include <kwin.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qcheckbox.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> #include <X11/Xlib.h> #include <X11/Xatom.h> @@ -34,12 +34,12 @@ namespace KWinInternal { -DetectWidget::DetectWidget( QWidget* parent, const char* name ) +DetectWidget::DetectWidget( TQWidget* parent, const char* name ) : DetectWidgetBase( parent, name ) { } -DetectDialog::DetectDialog( QWidget* parent, const char* name ) +DetectDialog::DetectDialog( TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, "", Ok | Cancel ) , grabber( NULL ) { @@ -109,10 +109,10 @@ void DetectDialog::executeDialog() widget->title_label->setText( title ); widget->extrarole_label->setText( extrarole ); widget->machine_label->setText( machine ); - emit detectionDone( exec() == QDialog::Accepted ); + emit detectionDone( exec() == TQDialog::Accepted ); } -QCString DetectDialog::selectedClass() const +TQCString DetectDialog::selectedClass() const { if( widget->use_class->isChecked() || widget->use_role->isChecked()) return wmclass_class; @@ -124,14 +124,14 @@ bool DetectDialog::selectedWholeClass() const return widget->use_whole_class->isChecked(); } -QCString DetectDialog::selectedRole() const +TQCString DetectDialog::selectedRole() const { if( widget->use_role->isChecked()) return role; return ""; } -QString DetectDialog::selectedTitle() const +TQString DetectDialog::selectedTitle() const { return title; } @@ -151,7 +151,7 @@ NET::WindowType DetectDialog::selectedType() const return type; } -QCString DetectDialog::selectedMachine() const +TQCString DetectDialog::selectedMachine() const { return machine; } @@ -161,22 +161,22 @@ void DetectDialog::selectWindow() // use a dialog, so that all user input is blocked // use WX11BypassWM and moving away so that it's not actually visible // grab only mouse, so that keyboard can be used e.g. for switching windows - grabber = new QDialog( NULL, NULL, true, WX11BypassWM ); + grabber = new TQDialog( NULL, NULL, true, WX11BypassWM ); grabber->move( -1000, -1000 ); grabber->show(); grabber->grabMouse( crossCursor ); grabber->installEventFilter( this ); } -bool DetectDialog::eventFilter( QObject* o, QEvent* e ) +bool DetectDialog::eventFilter( TQObject* o, TQEvent* e ) { if( o != grabber ) return false; - if( e->type() != QEvent::MouseButtonRelease ) + if( e->type() != TQEvent::MouseButtonRelease ) return false; delete grabber; grabber = NULL; - if( static_cast< QMouseEvent* >( e )->button() != LeftButton ) + if( static_cast< TQMouseEvent* >( e )->button() != LeftButton ) { emit detectionDone( false ); return true; diff --git a/kwin/kcmkwin/kwinrules/detectwidget.h b/kwin/kcmkwin/kwinrules/detectwidget.h index 593f4e056..9a2cca3d2 100644 --- a/kwin/kcmkwin/kwinrules/detectwidget.h +++ b/kwin/kcmkwin/kwinrules/detectwidget.h @@ -35,7 +35,7 @@ class DetectWidget { Q_OBJECT public: - DetectWidget( QWidget* parent = NULL, const char* name = NULL ); + DetectWidget( TQWidget* parent = NULL, const char* name = NULL ); }; class DetectDialog @@ -43,35 +43,35 @@ class DetectDialog { Q_OBJECT public: - DetectDialog( QWidget* parent = NULL, const char* name = NULL ); + DetectDialog( TQWidget* parent = NULL, const char* name = NULL ); void detect( WId window ); - QCString selectedClass() const; + TQCString selectedClass() const; bool selectedWholeClass() const; - QCString selectedRole() const; + TQCString selectedRole() const; bool selectedWholeApp() const; NET::WindowType selectedType() const; - QString selectedTitle() const; + TQString selectedTitle() const; Rules::StringMatch titleMatch() const; - QCString selectedMachine() const; + TQCString selectedMachine() const; const KWin::WindowInfo& windowInfo() const; signals: void detectionDone( bool ); protected: - virtual bool eventFilter( QObject* o, QEvent* e ); + virtual bool eventFilter( TQObject* o, TQEvent* e ); private: void selectWindow(); void readWindow( WId window ); void executeDialog(); WId findWindow(); - QCString wmclass_class; - QCString wmclass_name; - QCString role; + TQCString wmclass_class; + TQCString wmclass_name; + TQCString role; NET::WindowType type; - QString title; - QCString extrarole; - QCString machine; + TQString title; + TQCString extrarole; + TQCString machine; DetectWidget* widget; - QDialog* grabber; + TQDialog* grabber; KWin::WindowInfo info; }; diff --git a/kwin/kcmkwin/kwinrules/kcm.cpp b/kwin/kcmkwin/kwinrules/kcm.cpp index b40cfa8b2..19b714311 100644 --- a/kwin/kcmkwin/kwinrules/kcm.cpp +++ b/kwin/kcmkwin/kwinrules/kcm.cpp @@ -19,7 +19,7 @@ #include "kcm.h" #include <kglobal.h> -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include <kapplication.h> #include <dcopclient.h> @@ -28,7 +28,7 @@ #include "ruleslist.h" extern "C" - KDE_EXPORT KCModule *create_kwinrules( QWidget *parent, const char *name ) + KDE_EXPORT KCModule *create_kwinrules( TQWidget *parent, const char *name ) { //CT there's need for decision: kwm or kwin? KGlobal::locale()->insertCatalogue( "kcmkwinrules" ); @@ -38,14 +38,14 @@ extern "C" namespace KWinInternal { -KCMRules::KCMRules( QWidget *parent, const char *name ) +KCMRules::KCMRules( TQWidget *parent, const char *name ) : KCModule( parent, name ) , config( "kwinrulesrc" ) { - QVBoxLayout *layout = new QVBoxLayout( this ); + TQVBoxLayout *layout = new TQVBoxLayout( this ); widget = new KCMRulesList( this ); layout->addWidget( widget ); - connect( widget, SIGNAL( changed( bool )), SLOT( moduleChanged( bool ))); + connect( widget, TQT_SIGNAL( changed( bool )), TQT_SLOT( moduleChanged( bool ))); KAboutData *about = new KAboutData(I18N_NOOP( "kcmkwinrules" ), I18N_NOOP( "Window-Specific Settings Configuration Module" ), 0, 0, KAboutData::License_GPL, I18N_NOOP( "(c) 2004 KWin and KControl Authors" )); @@ -76,7 +76,7 @@ void KCMRules::defaults() widget->defaults(); } -QString KCMRules::quickHelp() const +TQString KCMRules::quickHelp() const { return i18n("<h1>Window-specific Settings</h1> Here you can customize window settings specifically only" " for some windows." diff --git a/kwin/kcmkwin/kwinrules/kcm.h b/kwin/kcmkwin/kwinrules/kcm.h index 47fba75d2..9fb307458 100644 --- a/kwin/kcmkwin/kwinrules/kcm.h +++ b/kwin/kcmkwin/kwinrules/kcm.h @@ -36,11 +36,11 @@ class KCMRules { Q_OBJECT public: - KCMRules( QWidget *parent, const char *name ); + KCMRules( TQWidget *parent, const char *name ); virtual void load(); virtual void save(); virtual void defaults(); - virtual QString quickHelp() const; + virtual TQString quickHelp() const; protected slots: void moduleChanged( bool state ); private: diff --git a/kwin/kcmkwin/kwinrules/main.cpp b/kwin/kcmkwin/kwinrules/main.cpp index 9657e3649..b58c96239 100644 --- a/kwin/kcmkwin/kwinrules/main.cpp +++ b/kwin/kcmkwin/kwinrules/main.cpp @@ -32,7 +32,7 @@ namespace KWinInternal { -static void loadRules( QValueList< Rules* >& rules ) +static void loadRules( TQValueList< Rules* >& rules ) { KConfig cfg( "kwinrulesrc", true ); cfg.setGroup( "General" ); @@ -41,52 +41,52 @@ static void loadRules( QValueList< Rules* >& rules ) i <= count; ++i ) { - cfg.setGroup( QString::number( i )); + cfg.setGroup( TQString::number( i )); Rules* rule = new Rules( cfg ); rules.append( rule ); } } -static void saveRules( const QValueList< Rules* >& rules ) +static void saveRules( const TQValueList< Rules* >& rules ) { KConfig cfg( "kwinrulesrc" ); - QStringList groups = cfg.groupList(); - for( QStringList::ConstIterator it = groups.begin(); + TQStringList groups = cfg.groupList(); + for( TQStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it ) cfg.deleteGroup( *it ); cfg.setGroup( "General" ); cfg.writeEntry( "count", rules.count()); int i = 1; - for( QValueList< Rules* >::ConstIterator it = rules.begin(); + for( TQValueList< Rules* >::ConstIterator it = rules.begin(); it != rules.end(); ++it ) { - cfg.setGroup( QString::number( i )); + cfg.setGroup( TQString::number( i )); (*it)->write( cfg ); ++i; } } -static Rules* findRule( const QValueList< Rules* >& rules, Window wid, bool whole_app ) +static Rules* findRule( const TQValueList< Rules* >& rules, Window wid, bool whole_app ) { KWin::WindowInfo info = KWin::windowInfo( wid, NET::WMName | NET::WMWindowType, NET::WM2WindowClass | NET::WM2WindowRole | NET::WM2ClientMachine ); if( !info.valid()) // shouldn't really happen return NULL; - QCString wmclass_class = info.windowClassClass().lower(); - QCString wmclass_name = info.windowClassName().lower(); - QCString role = info.windowRole().lower(); + TQCString wmclass_class = info.windowClassClass().lower(); + TQCString wmclass_name = info.windowClassName().lower(); + TQCString role = info.windowRole().lower(); NET::WindowType type = info.windowType( NET::NormalMask | NET::DesktopMask | NET::DockMask | NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask ); - QString title = info.name(); -// QCString extrarole = ""; // TODO - QCString machine = info.clientMachine().lower(); + TQString title = info.name(); +// TQCString extrarole = ""; // TODO + TQCString machine = info.clientMachine().lower(); Rules* best_match = NULL; int match_quality = 0; - for( QValueList< Rules* >::ConstIterator it = rules.begin(); + for( TQValueList< Rules* >::ConstIterator it = rules.begin(); it != rules.end(); ++it ) { @@ -233,7 +233,7 @@ static Rules* findRule( const QValueList< Rules* >& rules, Window wid, bool whol static int edit( Window wid, bool whole_app ) { - QValueList< Rules* > rules; + TQValueList< Rules* > rules; loadRules( rules ); Rules* orig_rule = findRule( rules, wid, whole_app ); RulesDialog dlg; @@ -248,7 +248,7 @@ static int edit( Window wid, bool whole_app ) } else if( edited_rule != orig_rule ) { - QValueList< Rules* >::Iterator pos = rules.find( orig_rule ); + TQValueList< Rules* >::Iterator pos = rules.find( orig_rule ); if( pos != rules.end()) *pos = edited_rule; else diff --git a/kwin/kcmkwin/kwinrules/ruleslist.cpp b/kwin/kcmkwin/kwinrules/ruleslist.cpp index f4704089f..e525e472f 100644 --- a/kwin/kcmkwin/kwinrules/ruleslist.cpp +++ b/kwin/kcmkwin/kwinrules/ruleslist.cpp @@ -29,39 +29,39 @@ namespace KWinInternal { -KCMRulesList::KCMRulesList( QWidget* parent, const char* name ) +KCMRulesList::KCMRulesList( TQWidget* parent, const char* name ) : KCMRulesListBase( parent, name ) { - // connect both current/selected, so that current==selected (stupid QListBox :( ) - connect( rules_listbox, SIGNAL( currentChanged( QListBoxItem* )), - SLOT( activeChanged( QListBoxItem*))); - connect( rules_listbox, SIGNAL( selectionChanged( QListBoxItem* )), - SLOT( activeChanged( QListBoxItem*))); - connect( new_button, SIGNAL( clicked()), - SLOT( newClicked())); - connect( modify_button, SIGNAL( clicked()), - SLOT( modifyClicked())); - connect( delete_button, SIGNAL( clicked()), - SLOT( deleteClicked())); - connect( moveup_button, SIGNAL( clicked()), - SLOT( moveupClicked())); - connect( movedown_button, SIGNAL( clicked()), - SLOT( movedownClicked())); - connect( rules_listbox, SIGNAL( doubleClicked ( QListBoxItem * ) ), - SLOT( modifyClicked())); + // connect both current/selected, so that current==selected (stupid TQListBox :( ) + connect( rules_listbox, TQT_SIGNAL( currentChanged( TQListBoxItem* )), + TQT_SLOT( activeChanged( TQListBoxItem*))); + connect( rules_listbox, TQT_SIGNAL( selectionChanged( TQListBoxItem* )), + TQT_SLOT( activeChanged( TQListBoxItem*))); + connect( new_button, TQT_SIGNAL( clicked()), + TQT_SLOT( newClicked())); + connect( modify_button, TQT_SIGNAL( clicked()), + TQT_SLOT( modifyClicked())); + connect( delete_button, TQT_SIGNAL( clicked()), + TQT_SLOT( deleteClicked())); + connect( moveup_button, TQT_SIGNAL( clicked()), + TQT_SLOT( moveupClicked())); + connect( movedown_button, TQT_SIGNAL( clicked()), + TQT_SLOT( movedownClicked())); + connect( rules_listbox, TQT_SIGNAL( doubleClicked ( TQListBoxItem * ) ), + TQT_SLOT( modifyClicked())); load(); } KCMRulesList::~KCMRulesList() { - for( QValueVector< Rules* >::Iterator it = rules.begin(); + for( TQValueVector< Rules* >::Iterator it = rules.begin(); it != rules.end(); ++it ) delete *it; rules.clear(); } -void KCMRulesList::activeChanged( QListBoxItem* item ) +void KCMRulesList::activeChanged( TQListBoxItem* item ) { if( item != NULL ) rules_listbox->setSelected( item, true ); // make current==selected @@ -114,7 +114,7 @@ void KCMRulesList::moveupClicked() assert( pos != -1 ); if( pos > 0 ) { - QString txt = rules_listbox->text( pos ); + TQString txt = rules_listbox->text( pos ); rules_listbox->removeItem( pos ); rules_listbox->insertItem( txt, pos - 1 ); rules_listbox->setSelected( pos - 1, true ); @@ -131,7 +131,7 @@ void KCMRulesList::movedownClicked() assert( pos != -1 ); if( pos < int( rules_listbox->count()) - 1 ) { - QString txt = rules_listbox->text( pos ); + TQString txt = rules_listbox->text( pos ); rules_listbox->removeItem( pos ); rules_listbox->insertItem( txt, pos + 1 ); rules_listbox->setSelected( pos + 1, true ); @@ -145,7 +145,7 @@ void KCMRulesList::movedownClicked() void KCMRulesList::load() { rules_listbox->clear(); - for( QValueVector< Rules* >::Iterator it = rules.begin(); + for( TQValueVector< Rules* >::Iterator it = rules.begin(); it != rules.end(); ++it ) delete *it; @@ -158,7 +158,7 @@ void KCMRulesList::load() i <= count; ++i ) { - cfg.setGroup( QString::number( i )); + cfg.setGroup( TQString::number( i )); Rules* rule = new Rules( cfg ); rules.append( rule ); rules_listbox->insertItem( rule->description ); @@ -172,19 +172,19 @@ void KCMRulesList::load() void KCMRulesList::save() { KConfig cfg( "kwinrulesrc" ); - QStringList groups = cfg.groupList(); - for( QStringList::ConstIterator it = groups.begin(); + TQStringList groups = cfg.groupList(); + for( TQStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it ) cfg.deleteGroup( *it ); cfg.setGroup( "General" ); cfg.writeEntry( "count", rules.count()); int i = 1; - for( QValueVector< Rules* >::ConstIterator it = rules.begin(); + for( TQValueVector< Rules* >::ConstIterator it = rules.begin(); it != rules.end(); ++it ) { - cfg.setGroup( QString::number( i )); + cfg.setGroup( TQString::number( i )); (*it)->write( cfg ); ++i; } diff --git a/kwin/kcmkwin/kwinrules/ruleslist.h b/kwin/kcmkwin/kwinrules/ruleslist.h index b192d2f4e..9dacde63e 100644 --- a/kwin/kcmkwin/kwinrules/ruleslist.h +++ b/kwin/kcmkwin/kwinrules/ruleslist.h @@ -22,7 +22,7 @@ #include "ruleslistbase.h" -#include <qvaluevector.h> +#include <tqvaluevector.h> #include "../../rules.h" @@ -36,7 +36,7 @@ class KCMRulesList { Q_OBJECT public: - KCMRulesList( QWidget* parent = NULL, const char* name = NULL ); + KCMRulesList( TQWidget* parent = NULL, const char* name = NULL ); virtual ~KCMRulesList(); void load(); void save(); @@ -49,9 +49,9 @@ class KCMRulesList void deleteClicked(); void moveupClicked(); void movedownClicked(); - void activeChanged( QListBoxItem* ); + void activeChanged( TQListBoxItem* ); private: - QValueVector< Rules* > rules; + TQValueVector< Rules* > rules; }; } // namespace diff --git a/kwin/kcmkwin/kwinrules/ruleswidget.cpp b/kwin/kcmkwin/kwinrules/ruleswidget.cpp index 7a8afe292..2525644d9 100644 --- a/kwin/kcmkwin/kwinrules/ruleswidget.cpp +++ b/kwin/kcmkwin/kwinrules/ruleswidget.cpp @@ -21,17 +21,17 @@ #include <klineedit.h> #include <krestrictedline.h> #include <kcombobox.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <kpushbutton.h> -#include <qlabel.h> +#include <tqlabel.h> #include <kwinmodule.h> #include <klocale.h> -#include <qregexp.h> -#include <qwhatsthis.h> +#include <tqregexp.h> +#include <tqwhatsthis.h> #include <assert.h> #include <kmessagebox.h> -#include <qtabwidget.h> -#include <qtimer.h> +#include <tqtabwidget.h> +#include <tqtimer.h> #include "../../rules.h" @@ -41,19 +41,19 @@ namespace KWinInternal { #define SETUP( var, type ) \ - connect( enable_##var, SIGNAL( toggled( bool )), rule_##var, SLOT( setEnabled( bool ))); \ - connect( enable_##var, SIGNAL( toggled( bool )), this, SLOT( updateEnable##var())); \ - connect( rule_##var, SIGNAL( activated( int )), this, SLOT( updateEnable##var())); \ - QWhatsThis::add( enable_##var, enableDesc ); \ - QWhatsThis::add( rule_##var, type##RuleDesc ); + connect( enable_##var, TQT_SIGNAL( toggled( bool )), rule_##var, TQT_SLOT( setEnabled( bool ))); \ + connect( enable_##var, TQT_SIGNAL( toggled( bool )), this, TQT_SLOT( updateEnable##var())); \ + connect( rule_##var, TQT_SIGNAL( activated( int )), this, TQT_SLOT( updateEnable##var())); \ + TQWhatsThis::add( enable_##var, enableDesc ); \ + TQWhatsThis::add( rule_##var, type##RuleDesc ); -RulesWidget::RulesWidget( QWidget* parent, const char* name ) +RulesWidget::RulesWidget( TQWidget* parent, const char* name ) : RulesWidgetBase( parent, name ) , detect_dlg( NULL ) { - QString enableDesc = + TQString enableDesc = i18n( "Enable this checkbox to alter this window property for the specified window(s)." ); - QString setRuleDesc = + TQString setRuleDesc = i18n( "Specify how the window property should be affected:<ul>" "<li><em>Do Not Affect:</em> The window property will not be affected and therefore" " the default handling for it will be used. Specifying this will block more generic" @@ -68,7 +68,7 @@ RulesWidget::RulesWidget( QWidget* parent, const char* name ) "<li><em>Force temporarily:</em> The window property will be forced to the given value" " until it is hidden (this action will be deleted after the window is hidden).</li>" "</ul>" ); - QString forceRuleDesc = + TQString forceRuleDesc = i18n( "Specify how the window property should be affected:<ul>" "<li><em>Do Not Affect:</em> The window property will not be affected and therefore" " the default handling for it will be used. Specifying this will block more generic" @@ -113,7 +113,7 @@ RulesWidget::RulesWidget( QWidget* parent, const char* name ) for( i = 1; i <= module.numberOfDesktops(); ++i ) - desktop->insertItem( QString::number( i ).rightJustify( 2 ) + ":" + module.desktopName( i )); + desktop->insertItem( TQString::number( i ).rightJustify( 2 ) + ":" + module.desktopName( i )); desktop->insertItem( i18n( "All Desktops" )); } @@ -202,45 +202,45 @@ static const Rules::ForceRule combo_to_force_rule[] = ( Rules::ForceRule )Rules::ForceTemporarily }; -static QString positionToStr( const QPoint& p ) +static TQString positionToStr( const TQPoint& p ) { if( p == invalidPoint ) - return QString::null; - return QString::number( p.x()) + "," + QString::number( p.y()); + return TQString::null; + return TQString::number( p.x()) + "," + TQString::number( p.y()); } -static QPoint strToPosition( const QString& str ) +static TQPoint strToPosition( const TQString& str ) { // two numbers, with + or -, separated by any of , x X : - QRegExp reg( "\\s*([+-]?[0-9]*)\\s*[,xX:]\\s*([+-]?[0-9]*)\\s*" ); + TQRegExp reg( "\\s*([+-]?[0-9]*)\\s*[,xX:]\\s*([+-]?[0-9]*)\\s*" ); if( !reg.exactMatch( str )) return invalidPoint; - return QPoint( reg.cap( 1 ).toInt(), reg.cap( 2 ).toInt()); + return TQPoint( reg.cap( 1 ).toInt(), reg.cap( 2 ).toInt()); } -static QString sizeToStr( const QSize& s ) +static TQString sizeToStr( const TQSize& s ) { if( !s.isValid()) - return QString::null; - return QString::number( s.width()) + "," + QString::number( s.height()); + return TQString::null; + return TQString::number( s.width()) + "," + TQString::number( s.height()); } -static QSize strToSize( const QString& str ) +static TQSize strToSize( const TQString& str ) { // two numbers, with + or -, separated by any of , x X : - QRegExp reg( "\\s*([+-]?[0-9]*)\\s*[,xX:]\\s*([+-]?[0-9]*)\\s*" ); + TQRegExp reg( "\\s*([+-]?[0-9]*)\\s*[,xX:]\\s*([+-]?[0-9]*)\\s*" ); if( !reg.exactMatch( str )) - return QSize(); - return QSize( reg.cap( 1 ).toInt(), reg.cap( 2 ).toInt()); + return TQSize(); + return TQSize( reg.cap( 1 ).toInt(), reg.cap( 2 ).toInt()); } //used for opacity settings -static QString intToStr( const int& s ) +static TQString intToStr( const int& s ) { if( s < 1 || s > 100 ) - return QString::null; - return QString::number(s); + return TQString::null; + return TQString::number(s); } -static int strToInt( const QString& str ) +static int strToInt( const TQString& str ) { int tmp = str.toInt(); if( tmp < 1 || tmp > 100 ) @@ -550,7 +550,7 @@ void RulesWidget::detectClicked() { assert( detect_dlg == NULL ); detect_dlg = new DetectDialog; - connect( detect_dlg, SIGNAL( detectionDone( bool )), this, SLOT( detected( bool ))); + connect( detect_dlg, TQT_SIGNAL( detectionDone( bool )), this, TQT_SLOT( detected( bool ))); detect_dlg->detect( 0 ); } @@ -682,11 +682,11 @@ void RulesWidget::shortcutEditClicked() { EditShortcutDialog dlg( topLevelWidget()); dlg.setShortcut( shortcut->text()); - if( dlg.exec() == QDialog::Accepted ) + if( dlg.exec() == TQDialog::Accepted ) shortcut->setText( dlg.shortcut()); } -RulesDialog::RulesDialog( QWidget* parent, const char* name ) +RulesDialog::RulesDialog( TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "Edit Window-Specific Settings" ), Ok | Cancel ) { widget = new RulesWidget( this ); @@ -702,14 +702,14 @@ Rules* RulesDialog::edit( Rules* r, WId window, bool show_hints ) if( window != 0 ) widget->prepareWindowSpecific( window ); if( show_hints ) - QTimer::singleShot( 0, this, SLOT( displayHints())); + TQTimer::singleShot( 0, this, TQT_SLOT( displayHints())); exec(); return rules; } void RulesDialog::displayHints() { - QString str = "<qt><p>"; + TQString str = "<qt><p>"; str += i18n( "This configuration dialog allows altering settings only for the selected window" " or application. Find the setting you want to affect, enable the setting using the checkbox," " select in what way the setting should be affected and to which value." ); @@ -717,7 +717,7 @@ void RulesDialog::displayHints() str += "</p><p>" + i18n( "Consult the documentation for more details." ); #endif str += "</p></qt>"; - KMessageBox::information( this, str, QString::null, "displayhints" ); + KMessageBox::information( this, str, TQString::null, "displayhints" ); } void RulesDialog::accept() @@ -728,7 +728,7 @@ void RulesDialog::accept() KDialogBase::accept(); } -EditShortcut::EditShortcut( QWidget* parent, const char* name ) +EditShortcut::EditShortcut( TQWidget* parent, const char* name ) : EditShortcutBase( parent, name ) { } @@ -736,7 +736,7 @@ EditShortcut::EditShortcut( QWidget* parent, const char* name ) void EditShortcut::editShortcut() { ShortcutDialog dlg( KShortcut( shortcut->text()), topLevelWidget()); - if( dlg.exec() == QDialog::Accepted ) + if( dlg.exec() == TQDialog::Accepted ) shortcut->setText( dlg.shortcut().toString()); } @@ -745,24 +745,24 @@ void EditShortcut::clearShortcut() shortcut->setText( "" ); } -EditShortcutDialog::EditShortcutDialog( QWidget* parent, const char* name ) +EditShortcutDialog::EditShortcutDialog( TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "Edit Shortcut" ), Ok | Cancel ) { widget = new EditShortcut( this ); setMainWidget( widget ); } -void EditShortcutDialog::setShortcut( const QString& cut ) +void EditShortcutDialog::setShortcut( const TQString& cut ) { widget->shortcut->setText( cut ); } -QString EditShortcutDialog::shortcut() const +TQString EditShortcutDialog::shortcut() const { return widget->shortcut->text(); } -ShortcutDialog::ShortcutDialog( const KShortcut& cut, QWidget* parent, const char* name ) +ShortcutDialog::ShortcutDialog( const KShortcut& cut, TQWidget* parent, const char* name ) : KShortcutDialog( cut, false /*TODO???*/, parent, name ) { } diff --git a/kwin/kcmkwin/kwinrules/ruleswidget.h b/kwin/kcmkwin/kwinrules/ruleswidget.h index 94af87ef4..b47ad88ab 100644 --- a/kwin/kcmkwin/kwinrules/ruleswidget.h +++ b/kwin/kcmkwin/kwinrules/ruleswidget.h @@ -38,7 +38,7 @@ class RulesWidget { Q_OBJECT public: - RulesWidget( QWidget* parent = NULL, const char* name = NULL ); + RulesWidget( TQWidget* parent = NULL, const char* name = NULL ); void setRules( Rules* r ); Rules* rules() const; bool finalCheck(); @@ -99,7 +99,7 @@ class RulesDialog { Q_OBJECT public: - RulesDialog( QWidget* parent = NULL, const char* name = NULL ); + RulesDialog( TQWidget* parent = NULL, const char* name = NULL ); Rules* edit( Rules* r, WId window, bool show_hints ); protected: virtual void accept(); @@ -115,7 +115,7 @@ class EditShortcut { Q_OBJECT public: - EditShortcut( QWidget* parent = NULL, const char* name = NULL ); + EditShortcut( TQWidget* parent = NULL, const char* name = NULL ); protected: void editShortcut(); void clearShortcut(); @@ -126,9 +126,9 @@ class EditShortcutDialog { Q_OBJECT public: - EditShortcutDialog( QWidget* parent = NULL, const char* name = NULL ); - void setShortcut( const QString& cut ); - QString shortcut() const; + EditShortcutDialog( TQWidget* parent = NULL, const char* name = NULL ); + void setShortcut( const TQString& cut ); + TQString shortcut() const; private: EditShortcut* widget; }; @@ -139,7 +139,7 @@ class ShortcutDialog { Q_OBJECT public: - ShortcutDialog( const KShortcut& cut, QWidget* parent = NULL, const char* name = NULL ); + ShortcutDialog( const KShortcut& cut, TQWidget* parent = NULL, const char* name = NULL ); virtual void accept(); }; |