summaryrefslogtreecommitdiffstats
path: root/kcontrol/randr
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/randr
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/randr')
-rw-r--r--kcontrol/randr/configdialog.cpp22
-rw-r--r--kcontrol/randr/configdialog.h26
-rw-r--r--kcontrol/randr/krandrbindings.cpp6
-rw-r--r--kcontrol/randr/krandrmodule.cpp88
-rw-r--r--kcontrol/randr/krandrmodule.h8
-rw-r--r--kcontrol/randr/krandrpassivepopup.cpp20
-rw-r--r--kcontrol/randr/krandrpassivepopup.h20
-rw-r--r--kcontrol/randr/krandrtray.cpp68
-rw-r--r--kcontrol/randr/krandrtray.h12
9 files changed, 135 insertions, 135 deletions
diff --git a/kcontrol/randr/configdialog.cpp b/kcontrol/randr/configdialog.cpp
index 681610c66..e97cf4836 100644
--- a/kcontrol/randr/configdialog.cpp
+++ b/kcontrol/randr/configdialog.cpp
@@ -17,13 +17,13 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qvbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqvbuttongroup.h>
#include <assert.h>
#include <kiconloader.h>
@@ -42,9 +42,9 @@ ConfigDialog::ConfigDialog(KGlobalAccel *accel,
Ok, 0L, "config dialog" )
{
if ( isApplet )
- setHelp( QString::null, "krandrtray" );
+ setHelp( TQString::null, "krandrtray" );
- QFrame *w = 0L; // the parent for the widgets
+ TQFrame *w = 0L; // the parent for the widgets
w = addVBoxPage( i18n("Global &Shortcuts") );
keysWidget = new KKeyChooser( accel, w );
@@ -60,8 +60,8 @@ void ConfigDialog::show()
{
if ( !isVisible() ) {
KWinModule module(0, KWinModule::INFO_DESKTOP);
- QSize s1 = sizeHint();
- QSize s2 = module.workArea().size();
+ TQSize s1 = sizeHint();
+ TQSize s2 = module.workArea().size();
int w = s1.width();
int h = s1.height();
diff --git a/kcontrol/randr/configdialog.h b/kcontrol/randr/configdialog.h
index c307a8aaa..dab9a7bb8 100644
--- a/kcontrol/randr/configdialog.h
+++ b/kcontrol/randr/configdialog.h
@@ -20,12 +20,12 @@
#ifndef CONFIGDIALOG_H
#define CONFIGDIALOG_H
-#include <qcheckbox.h>
-#include <qevent.h>
-#include <qgroupbox.h>
-#include <qheader.h>
-#include <qradiobutton.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqevent.h>
+#include <tqgroupbox.h>
+#include <tqheader.h>
+#include <tqradiobutton.h>
+#include <tqvbox.h>
#include <kdialogbase.h>
#include <keditlistbox.h>
@@ -59,30 +59,30 @@ private:
class ListView : public KListView
{
public:
- ListView( ConfigDialog* configWidget, QWidget *parent, const char *name )
+ ListView( ConfigDialog* configWidget, TQWidget *parent, const char *name )
: KListView( parent, name ), _configWidget( configWidget ),
_regExpEditor(0L) {}
- // QListView has a weird idea of a sizeHint...
- virtual QSize sizeHint () const {
+ // TQListView has a weird idea of a sizeHint...
+ virtual TQSize sizeHint () const {
int w = minimumSizeHint().width();
int h = header()->height();
h += viewport()->sizeHint().height();
h += horizontalScrollBar()->height();
- QListViewItem *item = firstChild();
+ TQListViewItem *item = firstChild();
while ( item ) {
h += item->totalHeight();
item = item->nextSibling();
}
- return QSize( w, h );
+ return TQSize( w, h );
}
protected:
- virtual void rename( QListViewItem* item, int c );
+ virtual void rename( TQListViewItem* item, int c );
private:
ConfigDialog* _configWidget;
- QDialog* _regExpEditor;
+ TQDialog* _regExpEditor;
};
#endif // CONFIGDIALOG_H
diff --git a/kcontrol/randr/krandrbindings.cpp b/kcontrol/randr/krandrbindings.cpp
index bb694a9bd..4857651a1 100644
--- a/kcontrol/randr/krandrbindings.cpp
+++ b/kcontrol/randr/krandrbindings.cpp
@@ -19,16 +19,16 @@
*/
#ifndef NOSLOTS
# define DEF( name, key3, key4, fnSlot ) \
- keys->insert( name, i18n(name), QString::null, key3, key4, this, SLOT(fnSlot) )
+ keys->insert( name, i18n(name), TQString::null, key3, key4, this, TQT_SLOT(fnSlot) )
#else
# define DEF( name, key3, key4, fnSlot ) \
- keys->insert( name, i18n(name), QString::null, key3, key4 )
+ keys->insert( name, i18n(name), TQString::null, key3, key4 )
#endif
#define WIN KKey::QtWIN
keys->insert( "Program:krandrtray", i18n("Display Control") );
- DEF( I18N_NOOP("Switch Displays"), KShortcut::KShortcut(QString("XF86Display")), KShortcut::KShortcut(QString("XF86Display")), slotCycleDisplays() );
+ DEF( I18N_NOOP("Switch Displays"), KShortcut::KShortcut(TQString("XF86Display")), KShortcut::KShortcut(TQString("XF86Display")), slotCycleDisplays() );
#undef DEF
#undef WIN
diff --git a/kcontrol/randr/krandrmodule.cpp b/kcontrol/randr/krandrmodule.cpp
index d1d7ec73f..087585d3f 100644
--- a/kcontrol/randr/krandrmodule.cpp
+++ b/kcontrol/randr/krandrmodule.cpp
@@ -16,16 +16,16 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qdesktopwidget.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qvbox.h>
-#include <qvbuttongroup.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqdesktopwidget.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqvbox.h>
+#include <tqvbuttongroup.h>
+#include <tqwhatsthis.h>
#include <kcmodule.h>
#include <kcombobox.h>
@@ -42,7 +42,7 @@
#include <X11/extensions/Xrandr.h>
// DLL Interface for kcontrol
-typedef KGenericFactory<KRandRModule, QWidget > KSSFactory;
+typedef KGenericFactory<KRandRModule, TQWidget > KSSFactory;
K_EXPORT_COMPONENT_FACTORY (kcm_randr, KSSFactory("krandr") )
extern "C"
@@ -73,22 +73,22 @@ void KRandRModule::performApplyOnStartup()
}
}
-KRandRModule::KRandRModule(QWidget *parent, const char *name, const QStringList&)
+KRandRModule::KRandRModule(TQWidget *parent, const char *name, const TQStringList&)
: KCModule(parent, name)
, m_changed(false)
{
if (!isValid()) {
- QVBoxLayout *topLayout = new QVBoxLayout(this);
- topLayout->addWidget(new QLabel(i18n("<qt>Your X server does not support resizing and rotating the display. Please update to version 4.3 or greater. You need the X Resize And Rotate extension (RANDR) version 1.1 or greater to use this feature.</qt>"), this));
+ TQVBoxLayout *topLayout = new TQVBoxLayout(this);
+ topLayout->addWidget(new TQLabel(i18n("<qt>Your X server does not support resizing and rotating the display. Please update to version 4.3 or greater. You need the X Resize And Rotate extension (RANDR) version 1.1 or greater to use this feature.</qt>"), this));
kdWarning() << "Error: " << errorCode() << endl;
return;
}
- QVBoxLayout* topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint());
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
- QHBox* screenBox = new QHBox(this);
+ TQHBox* screenBox = new TQHBox(this);
topLayout->addWidget(screenBox);
- QLabel *screenLabel = new QLabel(i18n("Settings for screen:"), screenBox);
+ TQLabel *screenLabel = new TQLabel(i18n("Settings for screen:"), screenBox);
m_screenSelector = new KComboBox(screenBox);
for (int s = 0; s < numScreens(); s++) {
@@ -97,45 +97,45 @@ KRandRModule::KRandRModule(QWidget *parent, const char *name, const QStringList&
m_screenSelector->setCurrentItem(currentScreenIndex());
screenLabel->setBuddy( m_screenSelector );
- QWhatsThis::add(m_screenSelector, i18n("The screen whose settings you would like to change can be selected using this drop-down list."));
+ TQWhatsThis::add(m_screenSelector, i18n("The screen whose settings you would like to change can be selected using this drop-down list."));
- connect(m_screenSelector, SIGNAL(activated(int)), SLOT(slotScreenChanged(int)));
+ connect(m_screenSelector, TQT_SIGNAL(activated(int)), TQT_SLOT(slotScreenChanged(int)));
if (numScreens() <= 1)
m_screenSelector->setEnabled(false);
- QHBox* sizeBox = new QHBox(this);
+ TQHBox* sizeBox = new TQHBox(this);
topLayout->addWidget(sizeBox);
- QLabel *sizeLabel = new QLabel(i18n("Screen size:"), sizeBox);
+ TQLabel *sizeLabel = new TQLabel(i18n("Screen size:"), sizeBox);
m_sizeCombo = new KComboBox(sizeBox);
- QWhatsThis::add(m_sizeCombo, i18n("The size, otherwise known as the resolution, of your screen can be selected from this drop-down list."));
- connect(m_sizeCombo, SIGNAL(activated(int)), SLOT(slotSizeChanged(int)));
+ TQWhatsThis::add(m_sizeCombo, i18n("The size, otherwise known as the resolution, of your screen can be selected from this drop-down list."));
+ connect(m_sizeCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSizeChanged(int)));
sizeLabel->setBuddy( m_sizeCombo );
- QHBox* refreshBox = new QHBox(this);
+ TQHBox* refreshBox = new TQHBox(this);
topLayout->addWidget(refreshBox);
- QLabel *rateLabel = new QLabel(i18n("Refresh rate:"), refreshBox);
+ TQLabel *rateLabel = new TQLabel(i18n("Refresh rate:"), refreshBox);
m_refreshRates = new KComboBox(refreshBox);
- QWhatsThis::add(m_refreshRates, i18n("The refresh rate of your screen can be selected from this drop-down list."));
- connect(m_refreshRates, SIGNAL(activated(int)), SLOT(slotRefreshChanged(int)));
+ TQWhatsThis::add(m_refreshRates, i18n("The refresh rate of your screen can be selected from this drop-down list."));
+ connect(m_refreshRates, TQT_SIGNAL(activated(int)), TQT_SLOT(slotRefreshChanged(int)));
rateLabel->setBuddy( m_refreshRates );
- m_rotationGroup = new QButtonGroup(2, Qt::Horizontal, i18n("Orientation (degrees counterclockwise)"), this);
+ m_rotationGroup = new TQButtonGroup(2, Qt::Horizontal, i18n("Orientation (degrees counterclockwise)"), this);
topLayout->addWidget(m_rotationGroup);
m_rotationGroup->setRadioButtonExclusive(true);
- QWhatsThis::add(m_rotationGroup, i18n("The options in this section allow you to change the rotation of your screen."));
+ TQWhatsThis::add(m_rotationGroup, i18n("The options in this section allow you to change the rotation of your screen."));
- m_applyOnStartup = new QCheckBox(i18n("Apply settings on KDE startup"), this);
+ m_applyOnStartup = new TQCheckBox(i18n("Apply settings on KDE startup"), this);
topLayout->addWidget(m_applyOnStartup);
- QWhatsThis::add(m_applyOnStartup, i18n("If this option is enabled the size and orientation settings will be used when KDE starts."));
- connect(m_applyOnStartup, SIGNAL(clicked()), SLOT(setChanged()));
+ TQWhatsThis::add(m_applyOnStartup, i18n("If this option is enabled the size and orientation settings will be used when KDE starts."));
+ connect(m_applyOnStartup, TQT_SIGNAL(clicked()), TQT_SLOT(setChanged()));
- QHBox* syncBox = new QHBox(this);
- syncBox->layout()->addItem(new QSpacerItem(20, 1, QSizePolicy::Maximum));
- m_syncTrayApp = new QCheckBox(i18n("Allow tray application to change startup settings"), syncBox);
+ TQHBox* syncBox = new TQHBox(this);
+ syncBox->layout()->addItem(new TQSpacerItem(20, 1, TQSizePolicy::Maximum));
+ m_syncTrayApp = new TQCheckBox(i18n("Allow tray application to change startup settings"), syncBox);
topLayout->addWidget(syncBox);
- QWhatsThis::add(m_syncTrayApp, i18n("If this option is enabled, options set by the system tray applet will be saved and loaded when KDE starts instead of being temporary."));
- connect(m_syncTrayApp, SIGNAL(clicked()), SLOT(setChanged()));
+ TQWhatsThis::add(m_syncTrayApp, i18n("If this option is enabled, options set by the system tray applet will be saved and loaded when KDE starts instead of being temporary."));
+ connect(m_syncTrayApp, TQT_SIGNAL(clicked()), TQT_SLOT(setChanged()));
topLayout->addStretch(1);
@@ -143,7 +143,7 @@ KRandRModule::KRandRModule(QWidget *parent, const char *name, const QStringList&
load();
m_syncTrayApp->setEnabled(m_applyOnStartup->isChecked());
- slotScreenChanged(QApplication::desktop()->primaryScreen());
+ slotScreenChanged(TQApplication::desktop()->primaryScreen());
setButtons(KCModule::Apply);
}
@@ -152,13 +152,13 @@ void KRandRModule::addRotationButton(int thisRotation, bool checkbox)
{
Q_ASSERT(m_rotationGroup);
if (!checkbox) {
- QRadioButton* thisButton = new QRadioButton(RandRScreen::rotationName(thisRotation), m_rotationGroup);
+ TQRadioButton* thisButton = new TQRadioButton(RandRScreen::rotationName(thisRotation), m_rotationGroup);
thisButton->setEnabled(thisRotation & currentScreen()->rotations());
- connect(thisButton, SIGNAL(clicked()), SLOT(slotRotationChanged()));
+ connect(thisButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotRotationChanged()));
} else {
- QCheckBox* thisButton = new QCheckBox(RandRScreen::rotationName(thisRotation), m_rotationGroup);
+ TQCheckBox* thisButton = new TQCheckBox(RandRScreen::rotationName(thisRotation), m_rotationGroup);
thisButton->setEnabled(thisRotation & currentScreen()->rotations());
- connect(thisButton, SIGNAL(clicked()), SLOT(slotRotationChanged()));
+ connect(thisButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotRotationChanged()));
}
}
@@ -243,11 +243,11 @@ void KRandRModule::populateRefreshRates()
{
m_refreshRates->clear();
- QStringList rr = currentScreen()->refreshRates(currentScreen()->proposedSize());
+ TQStringList rr = currentScreen()->refreshRates(currentScreen()->proposedSize());
m_refreshRates->setEnabled(rr.count());
- for (QStringList::Iterator it = rr.begin(); it != rr.end(); ++it)
+ for (TQStringList::Iterator it = rr.begin(); it != rr.end(); ++it)
m_refreshRates->insertItem(*it);
}
diff --git a/kcontrol/randr/krandrmodule.h b/kcontrol/randr/krandrmodule.h
index b542299e8..a8a00a464 100644
--- a/kcontrol/randr/krandrmodule.h
+++ b/kcontrol/randr/krandrmodule.h
@@ -30,7 +30,7 @@ class KRandRModule : public KCModule, public KRandrSimpleAPI
Q_OBJECT
public:
- KRandRModule(QWidget *parent, const char *name, const QStringList& _args);
+ KRandRModule(TQWidget *parent, const char *name, const TQStringList& _args);
virtual void load();
virtual void load(bool useDefaults);
@@ -55,10 +55,10 @@ protected:
KComboBox* m_screenSelector;
KComboBox* m_sizeCombo;
- QButtonGroup* m_rotationGroup;
+ TQButtonGroup* m_rotationGroup;
KComboBox* m_refreshRates;
- QCheckBox* m_applyOnStartup;
- QCheckBox* m_syncTrayApp;
+ TQCheckBox* m_applyOnStartup;
+ TQCheckBox* m_syncTrayApp;
bool m_oldApply;
bool m_oldSyncTrayApp;
diff --git a/kcontrol/randr/krandrpassivepopup.cpp b/kcontrol/randr/krandrpassivepopup.cpp
index 858014014..5cf6fa6b2 100644
--- a/kcontrol/randr/krandrpassivepopup.cpp
+++ b/kcontrol/randr/krandrpassivepopup.cpp
@@ -25,14 +25,14 @@
// widgets moves (needed because after a resolution switch Kicker will
// reposition itself, causing normal KPassivePopup to stay at weird places)
-KRandrPassivePopup::KRandrPassivePopup( QWidget *parent, const char *name, WFlags f )
+KRandrPassivePopup::KRandrPassivePopup( TQWidget *parent, const char *name, WFlags f )
: KPassivePopup( parent, name, f )
{
- connect( &update_timer, SIGNAL( timeout()), SLOT( slotPositionSelf()));
+ connect( &update_timer, TQT_SIGNAL( timeout()), TQT_SLOT( slotPositionSelf()));
}
-KRandrPassivePopup* KRandrPassivePopup::message( const QString &caption, const QString &text,
- const QPixmap &icon, QWidget *parent, const char *name, int timeout )
+KRandrPassivePopup* KRandrPassivePopup::message( const TQString &caption, const TQString &text,
+ const TQPixmap &icon, TQWidget *parent, const char *name, int timeout )
{
KRandrPassivePopup *pop = new KRandrPassivePopup( parent, name );
pop->setAutoDelete( true );
@@ -43,7 +43,7 @@ KRandrPassivePopup* KRandrPassivePopup::message( const QString &caption, const Q
return pop;
}
-void KRandrPassivePopup::startWatchingWidget( QWidget* widget_P )
+void KRandrPassivePopup::startWatchingWidget( TQWidget* widget_P )
{
static Atom wm_state = XInternAtom( qt_xdisplay() , "WM_STATE", False );
Window win = widget_P->winId();
@@ -60,7 +60,7 @@ void KRandrPassivePopup::startWatchingWidget( QWidget* widget_P )
break;
win = parent;
- QWidget* widget = QWidget::find( win );
+ TQWidget* widget = TQWidget::find( win );
if( widget != NULL )
{
widget->installEventFilter( this );
@@ -91,11 +91,11 @@ void KRandrPassivePopup::startWatchingWidget( QWidget* widget_P )
kapp->installX11EventFilter( this );
}
-bool KRandrPassivePopup::eventFilter( QObject* o, QEvent* e )
+bool KRandrPassivePopup::eventFilter( TQObject* o, TQEvent* e )
{
- if( e->type() == QEvent::Move && o->isWidgetType()
- && watched_widgets.contains( static_cast< QWidget* >( o )))
- QTimer::singleShot( 0, this, SLOT( slotPositionSelf()));
+ if( e->type() == TQEvent::Move && o->isWidgetType()
+ && watched_widgets.contains( static_cast< TQWidget* >( o )))
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotPositionSelf()));
return false;
}
diff --git a/kcontrol/randr/krandrpassivepopup.h b/kcontrol/randr/krandrpassivepopup.h
index 6e86c336c..3b1d4b4f6 100644
--- a/kcontrol/randr/krandrpassivepopup.h
+++ b/kcontrol/randr/krandrpassivepopup.h
@@ -20,8 +20,8 @@
#define __RANDRPASSIVEPOPUP_H__
#include <kpassivepopup.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
#include <X11/Xlib.h>
class KRandrPassivePopup
@@ -29,19 +29,19 @@ class KRandrPassivePopup
{
Q_OBJECT
public:
- static KRandrPassivePopup *message( const QString &caption, const QString &text,
- const QPixmap &icon, QWidget *parent, const char *name=0, int timeout = -1 );
+ static KRandrPassivePopup *message( const TQString &caption, const TQString &text,
+ const TQPixmap &icon, TQWidget *parent, const char *name=0, int timeout = -1 );
protected:
- virtual bool eventFilter( QObject* o, QEvent* e );
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
virtual bool x11Event( XEvent* e );
private slots:
void slotPositionSelf();
private:
- KRandrPassivePopup( QWidget *parent=0, const char *name=0, WFlags f=0 );
- void startWatchingWidget( QWidget* w );
- QValueList< QWidget* > watched_widgets;
- QValueList< Window > watched_windows;
- QTimer update_timer;
+ KRandrPassivePopup( TQWidget *parent=0, const char *name=0, WFlags f=0 );
+ void startWatchingWidget( TQWidget* w );
+ TQValueList< TQWidget* > watched_widgets;
+ TQValueList< Window > watched_windows;
+ TQTimer update_timer;
};
#endif
diff --git a/kcontrol/randr/krandrtray.cpp b/kcontrol/randr/krandrtray.cpp
index bee4a5e10..4424e4036 100644
--- a/kcontrol/randr/krandrtray.cpp
+++ b/kcontrol/randr/krandrtray.cpp
@@ -16,8 +16,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kaction.h>
#include <kapplication.h>
@@ -46,15 +46,15 @@
#define OUTPUT_ON (1 << 3)
#define OUTPUT_ALL (0xf)
-KRandRSystemTray::KRandRSystemTray(QWidget* parent, const char *name)
+KRandRSystemTray::KRandRSystemTray(TQWidget* parent, const char *name)
: KSystemTray(parent, name)
, m_popupUp(false)
, m_help(new KHelpMenu(this, KGlobal::instance()->aboutData(), false, actionCollection()))
{
setPixmap(KSystemTray::loadSizedIcon("randr", width()));
setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
- connect(this, SIGNAL(quitSelected()), this, SLOT(_quit()));
- QToolTip::add(this, i18n("Screen resize & rotate"));
+ connect(this, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(_quit()));
+ TQToolTip::add(this, i18n("Screen resize & rotate"));
my_parent = parent;
//printf("Reading configuration...\n\r");
@@ -66,10 +66,10 @@ KRandRSystemTray::KRandRSystemTray(QWidget* parent, const char *name)
globalKeys->setEnabled(true);
globalKeys->updateConnections();
- connect(kapp, SIGNAL(settingsChanged(int)), SLOT(slotSettingsChanged(int)));
+ connect(kapp, TQT_SIGNAL(settingsChanged(int)), TQT_SLOT(slotSettingsChanged(int)));
#if (QT_VERSION-0 >= 0x030200) // XRANDR support
-// connect(this, SIGNAL(screenSizeChanged(int, int)), kapp->desktop(), SLOT( desktopResized()));
+// connect(this, TQT_SIGNAL(screenSizeChanged(int, int)), kapp->desktop(), TQT_SLOT( desktopResized()));
#endif
randr_display = XOpenDisplay(NULL);
@@ -81,7 +81,7 @@ KRandRSystemTray::KRandRSystemTray(QWidget* parent, const char *name)
t_config = new KSimpleConfig("kiccconfigrc");
- QString cur_profile;
+ TQString cur_profile;
cur_profile = getCurrentProfile();
if (cur_profile != "") {
applyIccConfiguration(cur_profile, NULL);
@@ -89,14 +89,14 @@ KRandRSystemTray::KRandRSystemTray(QWidget* parent, const char *name)
}
/*!
- * \b SLOT which called if krandrtray is exited by the user. In this case the user
+ * \b TQT_SLOT which called if krandrtray is exited by the user. In this case the user
* is asked through a yes/no box if "KRandRTray should start automatically on log in" and the
* result is written to the KDE configfile.
*/
void KRandRSystemTray::_quit (){
r_config = new KSimpleConfig("krandrtrayrc");
- QString tmp1 = i18n ("Start KRandRTray automatically when you log in?");
+ TQString tmp1 = i18n ("Start KRandRTray automatically when you log in?");
int tmp2 = KMessageBox::questionYesNo ( 0, tmp1, i18n("Question"), i18n("Start Automatically"), i18n("Do Not Start"));
r_config->setGroup("General");
r_config->writeEntry ("Autostart", tmp2 == KMessageBox::Yes);
@@ -105,12 +105,12 @@ void KRandRSystemTray::_quit (){
exit(0);
}
-void KRandRSystemTray::resizeEvent ( QResizeEvent * )
+void KRandRSystemTray::resizeEvent ( TQResizeEvent * )
{
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
- QPixmap origpixmap;
- QPixmap scaledpixmap;
- QImage newIcon;
+ TQPixmap origpixmap;
+ TQPixmap scaledpixmap;
+ TQImage newIcon;
origpixmap = KSystemTray::loadSizedIcon( "randr", width() );
newIcon = origpixmap;
newIcon = newIcon.smoothScale(width(), height());
@@ -118,7 +118,7 @@ void KRandRSystemTray::resizeEvent ( QResizeEvent * )
setPixmap(scaledpixmap);
}
-void KRandRSystemTray::mousePressEvent(QMouseEvent* e)
+void KRandRSystemTray::mousePressEvent(TQMouseEvent* e)
{
// Popup the context menu with left-click
if (e->button() == LeftButton) {
@@ -203,11 +203,11 @@ void KRandRSystemTray::contextMenuAboutToShow(KPopupMenu* menu)
/*lastIndex = menu->insertItem(i18n("Screen %1").arg(s+1));
menu->setItemEnabled(lastIndex, false);*/
} else {
- KPopupMenu* subMenu = new KPopupMenu(menu, QString("screen%1").arg(s+1).latin1());
+ KPopupMenu* subMenu = new KPopupMenu(menu, TQString("screen%1").arg(s+1).latin1());
m_screenPopups.append(subMenu);
populateMenu(subMenu);
lastIndex = menu->insertItem(i18n("Screen %1").arg(s+1), subMenu);
- connect(subMenu, SIGNAL(activated(int)), SLOT(slotScreenActivated()));
+ connect(subMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotScreenActivated()));
}
}
@@ -218,34 +218,34 @@ void KRandRSystemTray::contextMenuAboutToShow(KPopupMenu* menu)
addOutputMenu(menu);
// Find any user ICC profiles
- QStringList cfgProfiles;
+ TQStringList cfgProfiles;
cfgProfiles = t_config->groupList();
if (cfgProfiles.isEmpty() == false) {
menu->insertTitle(SmallIcon("kcoloredit"), i18n("Color Profile"));
}
- for (QStringList::Iterator t(cfgProfiles.begin()); t != cfgProfiles.end(); ++t) {
+ for (TQStringList::Iterator t(cfgProfiles.begin()); t != cfgProfiles.end(); ++t) {
lastIndex = menu->insertItem(*t);
if (t_config->readEntry("CurrentProfile") == (*t)) {
menu->setItemChecked(lastIndex, true);
}
menu->setItemEnabled(lastIndex, t_config->readBoolEntry("EnableICC", false));
- menu->connectItem(lastIndex, this, SLOT(slotColorProfileChanged(int)));
+ menu->connectItem(lastIndex, this, TQT_SLOT(slotColorProfileChanged(int)));
}
menu->insertTitle(SmallIcon("randr"), i18n("Global Configuation"));
KAction *actColors = new KAction( i18n( "Configure Color Profiles..." ),
- SmallIconSet( "configure" ), KShortcut(), this, SLOT( slotColorConfig() ),
+ SmallIconSet( "configure" ), KShortcut(), this, TQT_SLOT( slotColorConfig() ),
actionCollection() );
actColors->plug( menu );
// KAction *actPrefs = new KAction( i18n( "Configure Display..." ),
-// SmallIconSet( "configure" ), KShortcut(), this, SLOT( slotPrefs() ),
+// SmallIconSet( "configure" ), KShortcut(), this, TQT_SLOT( slotPrefs() ),
// actionCollection() );
// actPrefs->plug( menu );
KAction *actSKeys = new KAction( i18n( "Configure Shortcut Keys..." ),
- SmallIconSet( "configure" ), KShortcut(), this, SLOT( slotSKeys() ),
+ SmallIconSet( "configure" ), KShortcut(), this, TQT_SLOT( slotSKeys() ),
actionCollection() );
actSKeys->plug( menu );
@@ -286,7 +286,7 @@ void KRandRSystemTray::configChanged()
first = false;
- QString cur_profile;
+ TQString cur_profile;
cur_profile = getCurrentProfile();
if (cur_profile != "") {
applyIccConfiguration(cur_profile, NULL);
@@ -363,7 +363,7 @@ void KRandRSystemTray::populateMenu(KPopupMenu* menu)
menu->setItemChecked(lastIndex, true);
menu->setItemParameter(lastIndex, highestIndex);
- menu->connectItem(lastIndex, this, SLOT(slotResolutionChanged(int)));
+ menu->connectItem(lastIndex, this, TQT_SLOT(slotResolutionChanged(int)));
}
delete [] sizeSort;
sizeSort = 0L;
@@ -381,25 +381,25 @@ void KRandRSystemTray::populateMenu(KPopupMenu* menu)
menu->setItemChecked(lastIndex, true);
menu->setItemParameter(lastIndex, 1 << i);
- menu->connectItem(lastIndex, this, SLOT(slotOrientationChanged(int)));
+ menu->connectItem(lastIndex, this, TQT_SLOT(slotOrientationChanged(int)));
}
}
}
- QStringList rr = currentScreen()->refreshRates(currentScreen()->proposedSize());
+ TQStringList rr = currentScreen()->refreshRates(currentScreen()->proposedSize());
if (rr.count())
menu->insertTitle(SmallIcon("clock"), i18n("Refresh Rate"));
int i = 0;
- for (QStringList::Iterator it = rr.begin(); it != rr.end(); ++it, i++) {
+ for (TQStringList::Iterator it = rr.begin(); it != rr.end(); ++it, i++) {
lastIndex = menu->insertItem(*it);
if (currentScreen()->proposedRefreshRate() == i)
menu->setItemChecked(lastIndex, true);
menu->setItemParameter(lastIndex, i);
- menu->connectItem(lastIndex, this, SLOT(slotRefreshRateChanged(int)));
+ menu->connectItem(lastIndex, this, TQT_SLOT(slotRefreshRateChanged(int)));
}
}
@@ -488,7 +488,7 @@ void KRandRSystemTray::slotSKeys()
{
ConfigDialog *dlg = new ConfigDialog(globalKeys, true);
- if ( dlg->exec() == QDialog::Accepted ) {
+ if ( dlg->exec() == TQDialog::Accepted ) {
dlg->commitShortcuts();
globalKeys->writeSettings(0, true);
globalKeys->updateConnections();
@@ -709,7 +709,7 @@ void KRandRSystemTray::addOutputMenu(KPopupMenu* menu)
lastIndex = menu->insertItem(i18n("%1 (Active)").arg(output_name));
menu->setItemChecked(lastIndex, true);
- menu->connectItem(lastIndex, this, SLOT(slotOutputChanged(int)));
+ menu->connectItem(lastIndex, this, TQT_SLOT(slotOutputChanged(int)));
menu->setItemParameter(lastIndex, i);
connected_displays++;
@@ -732,7 +732,7 @@ void KRandRSystemTray::addOutputMenu(KPopupMenu* menu)
lastIndex = menu->insertItem(i18n("%1 (Connected, Inactive)").arg(output_name));
menu->setItemChecked(lastIndex, false);
- menu->connectItem(lastIndex, this, SLOT(slotOutputChanged(int)));
+ menu->connectItem(lastIndex, this, TQT_SLOT(slotOutputChanged(int)));
menu->setItemParameter(lastIndex, i);
connected_displays++;
@@ -756,7 +756,7 @@ void KRandRSystemTray::addOutputMenu(KPopupMenu* menu)
lastIndex = menu->insertItem(i18n("%1 (Disconnected, Inactive)").arg(output_name));
menu->setItemChecked(lastIndex, false);
menu->setItemEnabled(lastIndex, false);
- menu->connectItem(lastIndex, this, SLOT(slotOutputChanged(int)));
+ menu->connectItem(lastIndex, this, TQT_SLOT(slotOutputChanged(int)));
menu->setItemParameter(lastIndex, i);
}
@@ -764,7 +764,7 @@ void KRandRSystemTray::addOutputMenu(KPopupMenu* menu)
if (connected_displays < 2) {
menu->setItemEnabled(lastIndex, false);
}
- menu->connectItem(lastIndex, this, SLOT(slotCycleDisplays()));
+ menu->connectItem(lastIndex, this, TQT_SLOT(slotCycleDisplays()));
}
}
diff --git a/kcontrol/randr/krandrtray.h b/kcontrol/randr/krandrtray.h
index 640a38697..f0d8d7367 100644
--- a/kcontrol/randr/krandrtray.h
+++ b/kcontrol/randr/krandrtray.h
@@ -19,7 +19,7 @@
#ifndef KRANDRTRAY_H
#define KRANDRTRAY_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <ksystemtray.h>
#include <kglobalaccel.h>
@@ -34,7 +34,7 @@ class KRandRSystemTray : public KSystemTray, public KRandrSimpleAPI
Q_OBJECT
public:
- KRandRSystemTray(QWidget* parent = 0, const char *name = 0);
+ KRandRSystemTray(TQWidget* parent = 0, const char *name = 0);
KGlobalAccel *globalKeys;
virtual void contextMenuAboutToShow(KPopupMenu* menu);
@@ -58,8 +58,8 @@ protected slots:
void slotColorProfileChanged(int parameter);
protected:
- void mousePressEvent( QMouseEvent *e );
- void resizeEvent ( QResizeEvent * );
+ void mousePressEvent( TQMouseEvent *e );
+ void resizeEvent ( TQResizeEvent * );
private:
void populateMenu(KPopupMenu* menu);
@@ -70,11 +70,11 @@ private:
bool m_popupUp;
KHelpMenu* m_help;
- QPtrList<KPopupMenu> m_screenPopups;
+ TQPtrList<KPopupMenu> m_screenPopups;
Display *randr_display;
ScreenInfo *randr_screen_info;
- QWidget* my_parent;
+ TQWidget* my_parent;
int last_known_x;
int last_known_y;