summaryrefslogtreecommitdiffstats
path: root/kcontrol/randr/tderandrtray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/randr/tderandrtray.cpp')
-rw-r--r--kcontrol/randr/tderandrtray.cpp54
1 files changed, 29 insertions, 25 deletions
diff --git a/kcontrol/randr/tderandrtray.cpp b/kcontrol/randr/tderandrtray.cpp
index a443c3781..a5613eb2e 100644
--- a/kcontrol/randr/tderandrtray.cpp
+++ b/kcontrol/randr/tderandrtray.cpp
@@ -16,6 +16,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <tqtimer.h>
#include <tqimage.h>
#include <tqtooltip.h>
@@ -55,15 +59,15 @@ KRandRSystemTray::KRandRSystemTray(TQWidget* parent, const char *name)
, m_help(new KHelpMenu(this, TDEGlobal::instance()->aboutData(), false, actionCollection()))
{
TDEPopupMenu *help = m_help->menu();
- help->connectItem(KHelpMenu::menuHelpContents, this, TQT_SLOT(slotHelpContents()));
+ help->connectItem(KHelpMenu::menuHelpContents, this, TQ_SLOT(slotHelpContents()));
setPixmap(KSystemTray::loadIcon("randr"));
- setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
- connect(this, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(_quit()));
+ setAlignment(TQt::AlignHCenter | TQt::AlignVCenter);
+ connect(this, TQ_SIGNAL(quitSelected()), this, TQ_SLOT(_quit()));
TQToolTip::add(this, i18n("Screen resize & rotate"));
my_parent = parent;
//printf("Reading configuration...\n");
- globalKeys = new TDEGlobalAccel(TQT_TQOBJECT(this));
+ globalKeys = new TDEGlobalAccel(this);
TDEGlobalAccel* keys = globalKeys;
#include "tderandrbindings.cpp"
// the keys need to be read from kdeglobals, not kickerrc
@@ -71,10 +75,10 @@ KRandRSystemTray::KRandRSystemTray(TQWidget* parent, const char *name)
globalKeys->setEnabled(true);
globalKeys->updateConnections();
- connect(kapp, TQT_SIGNAL(settingsChanged(int)), TQT_SLOT(slotSettingsChanged(int)));
+ connect(kapp, TQ_SIGNAL(settingsChanged(int)), TQ_SLOT(slotSettingsChanged(int)));
#if (TQT_VERSION-0 >= 0x030200) // XRANDR support
-// connect(this, TQT_SIGNAL(screenSizeChanged(int, int)), kapp->desktop(), TQT_SLOT( desktopResized()));
+// connect(this, TQ_SIGNAL(screenSizeChanged(int, int)), kapp->desktop(), TQ_SLOT( desktopResized()));
#endif
randr_display = XOpenDisplay(NULL);
@@ -92,14 +96,14 @@ KRandRSystemTray::KRandRSystemTray(TQWidget* parent, const char *name)
applyIccConfiguration(cur_profile, NULL);
}
-#ifdef __TDE_HAVE_TDEHWLIB
+#ifdef WITH_TDEHWLIB
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
- connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
+ connect(hwdevices, TQ_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQ_SLOT(deviceChanged(TDEGenericDevice*)));
#endif
}
/*!
- * \b TQT_SLOT which called if tderandrtray is exited by the user. In this case the user
+ * \b TQ_SLOT which called if tderandrtray 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.
*/
@@ -143,7 +147,7 @@ void KRandRSystemTray::showEvent ( TQShowEvent * )
void KRandRSystemTray::mousePressEvent(TQMouseEvent* e)
{
// Popup the context menu with left-click
- if (e->button() == Qt::LeftButton) {
+ if (e->button() == TQt::LeftButton) {
contextMenuAboutToShow(contextMenu());
contextMenu()->popup(e->globalPos());
e->accept();
@@ -267,7 +271,7 @@ void KRandRSystemTray::contextMenuAboutToShow(TDEPopupMenu* menu)
m_screenPopups.append(subMenu);
populateMenu(subMenu);
lastIndex = menu->insertItem(i18n("Screen %1").arg(s+1), subMenu);
- connect(subMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotScreenActivated()));
+ connect(subMenu, TQ_SIGNAL(activated(int)), TQ_SLOT(slotScreenActivated()));
}
}
@@ -289,7 +293,7 @@ void KRandRSystemTray::contextMenuAboutToShow(TDEPopupMenu* menu)
menu->setItemChecked(lastIndex, true);
}
menu->setItemEnabled(lastIndex, t_config->readBoolEntry("EnableICC", false));
- menu->connectItem(lastIndex, this, TQT_SLOT(slotColorProfileChanged(int)));
+ menu->connectItem(lastIndex, this, TQ_SLOT(slotColorProfileChanged(int)));
}
if (valid) {
@@ -299,10 +303,10 @@ void KRandRSystemTray::contextMenuAboutToShow(TDEPopupMenu* menu)
if (!displayProfiles.isEmpty()) {
menu->insertTitle(SmallIcon("background"), i18n("Display Profiles"));
lastIndex = menu->insertItem(SmallIcon("bookmark"), "<default>");
- menu->connectItem(lastIndex, this, TQT_SLOT(slotDisplayProfileChanged(int)));
+ menu->connectItem(lastIndex, this, TQ_SLOT(slotDisplayProfileChanged(int)));
for (TQStringList::Iterator t(displayProfiles.begin()); t != displayProfiles.end(); ++t) {
lastIndex = menu->insertItem(SmallIcon("bookmark"), *t);
- menu->connectItem(lastIndex, this, TQT_SLOT(slotDisplayProfileChanged(int)));
+ menu->connectItem(lastIndex, this, TQ_SLOT(slotDisplayProfileChanged(int)));
}
}
}
@@ -310,17 +314,17 @@ void KRandRSystemTray::contextMenuAboutToShow(TDEPopupMenu* menu)
menu->insertTitle(SmallIcon("randr"), i18n("Global Configuration"));
TDEAction *actColors = new TDEAction( i18n( "Configure Displays..." ),
- SmallIconSet( "configure" ), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotDisplayConfig() ),
+ SmallIconSet( "configure" ), TDEShortcut(), this, TQ_SLOT( slotDisplayConfig() ),
actionCollection() );
actColors->plug( menu );
// TDEAction *actPrefs = new TDEAction( i18n( "Configure Display..." ),
-// SmallIconSet( "configure" ), TDEShortcut(), this, TQT_SLOT( slotPrefs() ),
+// SmallIconSet( "configure" ), TDEShortcut(), this, TQ_SLOT( slotPrefs() ),
// actionCollection() );
// actPrefs->plug( menu );
TDEAction *actSKeys = new TDEAction( i18n( "Configure Shortcut Keys..." ),
- SmallIconSet( "configure" ), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotSKeys() ),
+ SmallIconSet( "configure" ), TDEShortcut(), this, TQ_SLOT( slotSKeys() ),
actionCollection() );
actSKeys->plug( menu );
@@ -438,7 +442,7 @@ void KRandRSystemTray::populateMenu(TDEPopupMenu* menu)
menu->setItemChecked(lastIndex, true);
menu->setItemParameter(lastIndex, highestIndex);
- menu->connectItem(lastIndex, this, TQT_SLOT(slotResolutionChanged(int)));
+ menu->connectItem(lastIndex, this, TQ_SLOT(slotResolutionChanged(int)));
}
delete [] sizeSort;
sizeSort = 0L;
@@ -456,7 +460,7 @@ void KRandRSystemTray::populateMenu(TDEPopupMenu* menu)
menu->setItemChecked(lastIndex, true);
menu->setItemParameter(lastIndex, 1 << i);
- menu->connectItem(lastIndex, this, TQT_SLOT(slotOrientationChanged(int)));
+ menu->connectItem(lastIndex, this, TQ_SLOT(slotOrientationChanged(int)));
}
}
}
@@ -474,7 +478,7 @@ void KRandRSystemTray::populateMenu(TDEPopupMenu* menu)
menu->setItemChecked(lastIndex, true);
menu->setItemParameter(lastIndex, i);
- menu->connectItem(lastIndex, this, TQT_SLOT(slotRefreshRateChanged(int)));
+ menu->connectItem(lastIndex, this, TQ_SLOT(slotRefreshRateChanged(int)));
}
}
@@ -760,7 +764,7 @@ void KRandRSystemTray::addOutputMenu(TDEPopupMenu* menu)
lastIndex = menu->insertItem(i18n("%1 (Active)").arg(output_name));
menu->setItemChecked(lastIndex, true);
- menu->connectItem(lastIndex, this, TQT_SLOT(slotOutputChanged(int)));
+ menu->connectItem(lastIndex, this, TQ_SLOT(slotOutputChanged(int)));
menu->setItemParameter(lastIndex, i);
connected_displays++;
@@ -782,7 +786,7 @@ void KRandRSystemTray::addOutputMenu(TDEPopupMenu* menu)
lastIndex = menu->insertItem(i18n("%1 (Connected, Inactive)").arg(output_name));
menu->setItemChecked(lastIndex, false);
- menu->connectItem(lastIndex, this, TQT_SLOT(slotOutputChanged(int)));
+ menu->connectItem(lastIndex, this, TQ_SLOT(slotOutputChanged(int)));
menu->setItemParameter(lastIndex, i);
connected_displays++;
@@ -805,7 +809,7 @@ void KRandRSystemTray::addOutputMenu(TDEPopupMenu* menu)
lastIndex = menu->insertItem(i18n("%1 (Disconnected, Inactive)").arg(output_name));
menu->setItemChecked(lastIndex, false);
menu->setItemEnabled(lastIndex, false);
- menu->connectItem(lastIndex, this, TQT_SLOT(slotOutputChanged(int)));
+ menu->connectItem(lastIndex, this, TQ_SLOT(slotOutputChanged(int)));
menu->setItemParameter(lastIndex, i);
}
@@ -813,7 +817,7 @@ void KRandRSystemTray::addOutputMenu(TDEPopupMenu* menu)
if (connected_displays < 2) {
menu->setItemEnabled(lastIndex, false);
}
- menu->connectItem(lastIndex, this, TQT_SLOT(slotCycleDisplays()));
+ menu->connectItem(lastIndex, this, TQ_SLOT(slotCycleDisplays()));
}
}
@@ -888,7 +892,7 @@ void KRandRSystemTray::slotOutputChanged(int parameter)
}
void KRandRSystemTray::deviceChanged (TDEGenericDevice* device) {
-#ifdef __TDE_HAVE_TDEHWLIB
+#ifdef WITH_TDEHWLIB
if (device->type() == TDEGenericDeviceType::Monitor) {
KRandrPassivePopup::message(
i18n("New display output options are available!"),