summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:24:41 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 13:24:41 -0600
commite3830e4c08b5b58945714e698d5745f15ed60189 (patch)
tree0fd616be7989804dca4201562652ea065bfab910 /src
parentc38f8eb7efad25d59afa3d96fe2f59a2821a82ae (diff)
downloadkpowersave-e3830e4c08b5b58945714e698d5745f15ed60189.tar.gz
kpowersave-e3830e4c08b5b58945714e698d5745f15ed60189.zip
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'src')
-rw-r--r--src/countdowndialog.cpp8
-rw-r--r--src/inactivity.cpp18
-rw-r--r--src/inactivity.h6
-rw-r--r--src/infodialog.cpp2
-rw-r--r--src/kpowersave.cpp16
-rw-r--r--src/kpowersave.h6
-rw-r--r--src/screen.cpp74
-rw-r--r--src/screen.h24
-rw-r--r--src/suspenddialog.cpp8
9 files changed, 81 insertions, 81 deletions
diff --git a/src/countdowndialog.cpp b/src/countdowndialog.cpp
index f8d268d..a4c8158 100644
--- a/src/countdowndialog.cpp
+++ b/src/countdowndialog.cpp
@@ -76,13 +76,13 @@ void countDownDialog::setPixmap( TQString type )
TQPixmap pixmap = 0;
if(type.startsWith("suspend2disk")){
- pixmap = KGlobal::iconLoader()->loadIcon("suspend_to_disk", KIcon::NoGroup, KIcon::SizeLarge);
+ pixmap = TDEGlobal::iconLoader()->loadIcon("suspend_to_disk", KIcon::NoGroup, KIcon::SizeLarge);
} else if (type.startsWith("suspend2ram")) {
- pixmap = KGlobal::iconLoader()->loadIcon("suspend_to_ram", KIcon::NoGroup, KIcon::SizeLarge);
+ pixmap = TDEGlobal::iconLoader()->loadIcon("suspend_to_ram", KIcon::NoGroup, KIcon::SizeLarge);
} else if (type.startsWith("standby")) {
- pixmap = KGlobal::iconLoader()->loadIcon("stand_by", KIcon::NoGroup, KIcon::SizeLarge);
+ pixmap = TDEGlobal::iconLoader()->loadIcon("stand_by", KIcon::NoGroup, KIcon::SizeLarge);
} else {
- pixmap = KGlobal::iconLoader()->loadIcon("kpowersave", KIcon::NoGroup, KIcon::SizeLarge);
+ pixmap = TDEGlobal::iconLoader()->loadIcon("kpowersave", KIcon::NoGroup, KIcon::SizeLarge);
}
iconPixmap->setPixmap( pixmap );
}
diff --git a/src/inactivity.cpp b/src/inactivity.cpp
index 48969a9..28fe520 100644
--- a/src/inactivity.cpp
+++ b/src/inactivity.cpp
@@ -285,15 +285,15 @@ void inactivity::checkBlacklisted(){
proc = NULL;
}
- proc = new KProcess;
+ proc = new TDEProcess;
*proc << "pidof" << blacklist;
- connect( proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),this,
- TQT_SLOT(getPIDs(KProcess *, char *, int)));
- connect( proc, TQT_SIGNAL(processExited(KProcess *)),
- TQT_SLOT(getPIDsExited(KProcess *)));
+ connect( proc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)),this,
+ TQT_SLOT(getPIDs(TDEProcess *, char *, int)));
+ connect( proc, TQT_SIGNAL(processExited(TDEProcess *)),
+ TQT_SLOT(getPIDsExited(TDEProcess *)));
- if (!proc->start(KProcess::NotifyOnExit, KProcess::AllOutput))
+ if (!proc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput))
{
emit displayErrorMsg(i18n("Could not start 'pidof'. "
"Could not autosuspend the machine.\n"
@@ -311,11 +311,11 @@ void inactivity::checkBlacklisted(){
/*!
* \b TQT_SLOT to get the return of the command pidof and parse this to set
* \ref blacklisted_running .
- * \param *proc pointer to the sending KProcess
+ * \param *proc pointer to the sending TDEProcess
* \param *buffer the char pointer to the output of the process to stdout
* \param *length the length of the buffer
*/
-void inactivity::getPIDs(KProcess */*proc*/, char *buffer, int /*length*/) {
+void inactivity::getPIDs(TDEProcess */*proc*/, char *buffer, int /*length*/) {
kdDebugFuncIn(trace);
TQString pids(buffer);
@@ -345,7 +345,7 @@ void inactivity::getPIDs(KProcess */*proc*/, char *buffer, int /*length*/) {
* \b TQT_SLOT which called if the call of pidof is exited
* \param proc the KPocess which called this SLOT
*/
-void inactivity::getPIDsExited(KProcess *proc){
+void inactivity::getPIDsExited(TDEProcess *proc){
kdDebugFuncIn(trace);
pidof_call_returned = true;
diff --git a/src/inactivity.h b/src/inactivity.h
index c86f2f1..206cfea 100644
--- a/src/inactivity.h
+++ b/src/inactivity.h
@@ -85,7 +85,7 @@ signals:
private:
//! pointer to the process to call pidof
- KProcess *proc;
+ TDEProcess *proc;
//! about the call result of pidof
/*!
@@ -163,9 +163,9 @@ private slots:
//! to monitor the values
void recheck();
//! to get the PIDs of blacklisted programs/processes
- void getPIDs(KProcess *, char *, int);
+ void getPIDs(TDEProcess *, char *, int);
//! to get the signal if the command call is exited
- void getPIDsExited(KProcess *);
+ void getPIDsExited(TDEProcess *);
};
#endif
diff --git a/src/infodialog.cpp b/src/infodialog.cpp
index 57b1efa..cdf611f 100644
--- a/src/infodialog.cpp
+++ b/src/infodialog.cpp
@@ -67,7 +67,7 @@ infoDialog::infoDialog( KConfig *config, TQString captionName, TQString message,
buttonOK->setIconSet(SmallIconSet("ok", TQIconSet::Automatic));
TQPixmap pixmap = 0;
- pixmap = KGlobal::iconLoader()->loadIcon("messagebox_warning", KIcon::NoGroup, KIcon::SizeMedium);
+ pixmap = TDEGlobal::iconLoader()->loadIcon("messagebox_warning", KIcon::NoGroup, KIcon::SizeMedium);
iconPixmap->setPixmap( pixmap );
msgText->setText(message);
diff --git a/src/kpowersave.cpp b/src/kpowersave.cpp
index 92cddc5..8f92d54 100644
--- a/src/kpowersave.cpp
+++ b/src/kpowersave.cpp
@@ -67,7 +67,7 @@ kpowersave::kpowersave( bool force_acpi_check, bool trace_func ) : KSystemTray(0
resume_result = 0;
- config = KGlobal::config();
+ config = TDEGlobal::config();
config->setGroup("General");
if(!config->readBoolEntry("AlreadyStarted", false) || force_acpi_check){
config->writeEntry("AlreadyStarted", true);
@@ -510,7 +510,7 @@ void kpowersave::updateTooltip(){
/*!
* \b TQT_SLOT to starts the Yast2-power-management module. This called by the menuentry
* with ID \ref YAST_MODULE_MENU_ID, named "Start YaST2 Power Management Module".
- * It create a new KProcess and execute "/sbin/yast2 power-management" with tdesu.
+ * It create a new TDEProcess and execute "/sbin/yast2 power-management" with tdesu.
*/
void kpowersave::do_config(){
kdDebugFuncIn(trace);
@@ -518,12 +518,12 @@ void kpowersave::do_config(){
#ifdef ENABLE_YAST_ENTRY
delete yast2;
- yast2 = new KProcess;
+ yast2 = new TDEProcess;
*yast2 << "tdesu" << "--nonewdcop" << "/sbin/yast2" << "power-management";
- connect(yast2, TQT_SIGNAL(processExited(KProcess *)),
- TQT_SLOT(slotConfigProcessExited(KProcess *)));
- if(!yast2->start(KProcess::NotifyOnExit))
+ connect(yast2, TQT_SIGNAL(processExited(TDEProcess *)),
+ TQT_SLOT(slotConfigProcessExited(TDEProcess *)));
+ if(!yast2->start(TDEProcess::NotifyOnExit))
{
delete yast2;
yast2 = NULL;
@@ -648,10 +648,10 @@ void kpowersave::observeConfigDlg(){
}
/*!
- * \b TQT_SLOT which called from \ref do_config() if the 'tdesu yast2' KProcess exited.
+ * \b TQT_SLOT which called from \ref do_config() if the 'tdesu yast2' TDEProcess exited.
* This function control the return value and display if needed a errormessage on failure.
*/
-void kpowersave::slotConfigProcessExited(KProcess *proc){
+void kpowersave::slotConfigProcessExited(TDEProcess *proc){
kdDebugFuncIn(trace);
#ifdef ENABLE_YAST_ENTRY
diff --git a/src/kpowersave.h b/src/kpowersave.h
index 7715392..4ff6a3d 100644
--- a/src/kpowersave.h
+++ b/src/kpowersave.h
@@ -88,8 +88,8 @@ private:
autodimm * autoDimm;
// temporary pointer, use them if needed
- //! KProcess to start YaST-module for configuration
- KProcess *yast2;
+ //! TDEProcess to start YaST-module for configuration
+ TDEProcess *yast2;
//! instance of \ref ConfigureDialog
/*! the implemtation and all related functions for the configure dialog*/
ConfigureDialog *configDlg;
@@ -351,7 +351,7 @@ private slots:
//! sets the CPU Freq policy via the HAL daemon
void do_setSpeedPolicy( int );
//! called if there are problems with starting yast module
- void slotConfigProcessExited( KProcess * );
+ void slotConfigProcessExited( TDEProcess * );
//! called to open the kpowersave help
void slotHelp();
//! called to open the kpowersave About dialog
diff --git a/src/screen.cpp b/src/screen.cpp
index 2a7f658..16cca85 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -281,12 +281,12 @@ int screen::checkScreenSaverStatus() {
if (check == 10) {
delete gnomeScreensaverCheck;
- gnomeScreensaverCheck = new KProcess;
+ gnomeScreensaverCheck = new TDEProcess;
*gnomeScreensaverCheck << "gnome-screensaver-command" << "--query";
- connect( gnomeScreensaverCheck , TQT_SIGNAL(processExited(KProcess *)),TQT_SLOT(getGSExited(KProcess *)));
+ connect( gnomeScreensaverCheck , TQT_SIGNAL(processExited(TDEProcess *)),TQT_SLOT(getGSExited(TDEProcess *)));
- if(!gnomeScreensaverCheck->start(KProcess::NotifyOnExit))
+ if(!gnomeScreensaverCheck->start(TDEProcess::NotifyOnExit))
{
delete gnomeScreensaverCheck;
gnomeScreensaverCheck = NULL;
@@ -302,7 +302,7 @@ int screen::checkScreenSaverStatus() {
* \b TQT_SLOT which called if the call of gnomescreensaver-command exited
* \param gnomecheckcommand the KPocess which called this SLOT
*/
-void screen::getGSExited (KProcess *gnomecheckcommand) {
+void screen::getGSExited (TDEProcess *gnomecheckcommand) {
kdDebugFuncIn(trace);
if (gnomecheckcommand->normalExit()){
@@ -449,12 +449,12 @@ bool screen::lockScreen(){
xscreensaver:
delete xscreensaver_lock;
- xscreensaver_lock = new KProcess;
+ xscreensaver_lock = new TDEProcess;
*xscreensaver_lock << "xscreensaver-command" << "-lock";
- connect(xscreensaver_lock, TQT_SIGNAL(processExited(KProcess*)),
- this, TQT_SLOT(cleanProcess(KProcess*)));
+ connect(xscreensaver_lock, TQT_SIGNAL(processExited(TDEProcess*)),
+ this, TQT_SLOT(cleanProcess(TDEProcess*)));
- bool status = xscreensaver_lock->start(KProcess::DontCare);
+ bool status = xscreensaver_lock->start(TDEProcess::DontCare);
if(!status)
{
delete xscreensaver_lock;
@@ -466,12 +466,12 @@ xscreensaver:
else if(SCREENSAVER_STATUS == 20){
delete gnomescreensaver_lock;
- gnomescreensaver_lock = new KProcess;
+ gnomescreensaver_lock = new TDEProcess;
*gnomescreensaver_lock << "gnome-screensaver-command" << "--lock";
- connect(gnomescreensaver_lock, TQT_SIGNAL(processExited(KProcess*)),
- this, TQT_SLOT(cleanProcess(KProcess*)));
- bool status = gnomescreensaver_lock->start(KProcess::DontCare);
+ connect(gnomescreensaver_lock, TQT_SIGNAL(processExited(TDEProcess*)),
+ this, TQT_SLOT(cleanProcess(TDEProcess*)));
+ bool status = gnomescreensaver_lock->start(TDEProcess::DontCare);
if(!status)
{
delete gnomescreensaver_lock;
@@ -485,11 +485,11 @@ xscreensaver:
else if(SCREENSAVER_STATUS == 10 || SCREENSAVER_STATUS == 99){
delete xlock;
- xlock = new KProcess;
+ xlock = new TDEProcess;
*xlock << "xlock"; //<< "-mode" << "blank";
- connect(xlock, TQT_SIGNAL(processExited(KProcess*)),
- this, TQT_SLOT(cleanProcess(KProcess*)));
- bool status = xlock->start(KProcess::DontCare);
+ connect(xlock, TQT_SIGNAL(processExited(TDEProcess*)),
+ this, TQT_SLOT(cleanProcess(TDEProcess*)));
+ bool status = xlock->start(TDEProcess::DontCare);
if(!status)
{
delete xlock;
@@ -519,12 +519,12 @@ bool screen::lockScreen( TQString lock_withMethod ) {
else if (lock_withMethod == "xlock") {
delete xlock;
- xlock = new KProcess;
+ xlock = new TDEProcess;
*xlock << "xlock";
- connect(xlock, TQT_SIGNAL(processExited(KProcess*)),
- this, TQT_SLOT(cleanProcess(KProcess*)));
+ connect(xlock, TQT_SIGNAL(processExited(TDEProcess*)),
+ this, TQT_SLOT(cleanProcess(TDEProcess*)));
- bool status = xlock->start(KProcess::DontCare);
+ bool status = xlock->start(TDEProcess::DontCare);
if(!status)
{
delete xlock;
@@ -534,12 +534,12 @@ bool screen::lockScreen( TQString lock_withMethod ) {
return status;
}
else if (lock_withMethod == "gnomescreensaver") {
- gnomescreensaver_lock = new KProcess;
+ gnomescreensaver_lock = new TDEProcess;
*gnomescreensaver_lock << "gnome-screensaver-command" << "--lock";
- connect(gnomescreensaver_lock, TQT_SIGNAL(processExited(KProcess*)),
- this, TQT_SLOT(cleanProcess(KProcess*)));
+ connect(gnomescreensaver_lock, TQT_SIGNAL(processExited(TDEProcess*)),
+ this, TQT_SLOT(cleanProcess(TDEProcess*)));
- bool status = gnomescreensaver_lock->start(KProcess::DontCare);
+ bool status = gnomescreensaver_lock->start(TDEProcess::DontCare);
if(!status)
{
delete gnomescreensaver_lock;
@@ -569,12 +569,12 @@ bool screen::lockScreen( TQString lock_withMethod ) {
xscreensaver:
delete xscreensaver_lock;
- xscreensaver_lock = new KProcess;
+ xscreensaver_lock = new TDEProcess;
*xscreensaver_lock << "xscreensaver-command" << "-lock";
- connect(xscreensaver_lock, TQT_SIGNAL(processExited(KProcess*)),
- this, TQT_SLOT(cleanProcess(KProcess*)));
+ connect(xscreensaver_lock, TQT_SIGNAL(processExited(TDEProcess*)),
+ this, TQT_SLOT(cleanProcess(TDEProcess*)));
- bool status = xscreensaver_lock->start(KProcess::DontCare);
+ bool status = xscreensaver_lock->start(TDEProcess::DontCare);
if(!status)
{
delete xscreensaver_lock;
@@ -652,12 +652,12 @@ bool screen::resetXScreensaver(){
delete xscreensaver_reset;
- xscreensaver_reset = new KProcess;
+ xscreensaver_reset = new TDEProcess;
*xscreensaver_reset << "xscreensaver-command" << "-restart";
- connect(xscreensaver_reset, TQT_SIGNAL(processExited(KProcess*)),
- this, TQT_SLOT(cleanProcess(KProcess*)));
+ connect(xscreensaver_reset, TQT_SIGNAL(processExited(TDEProcess*)),
+ this, TQT_SLOT(cleanProcess(TDEProcess*)));
- bool status = xscreensaver_reset->start(KProcess::DontCare);
+ bool status = xscreensaver_reset->start(TDEProcess::DontCare);
if(!status)
{
delete xscreensaver_reset;
@@ -677,10 +677,10 @@ bool screen::resetXScreensaver(){
void screen::forceDPMSOff() {
kdDebugFuncIn(trace);
- KProcess *xset = new KProcess;
+ TDEProcess *xset = new TDEProcess;
*xset << "xset" << "dpms" << "force" << "off";
- connect(xset, TQT_SIGNAL(processExited(KProcess*)),
- this, TQT_SLOT(cleanProcess(KProcess*)));
+ connect(xset, TQT_SIGNAL(processExited(TDEProcess*)),
+ this, TQT_SLOT(cleanProcess(TDEProcess*)));
if(!xset->start())
{
delete xset;
@@ -690,9 +690,9 @@ void screen::forceDPMSOff() {
}
/*!
- * function to clean KProcess objects
+ * function to clean TDEProcess objects
*/
-void screen::cleanProcess(KProcess* proc)
+void screen::cleanProcess(TDEProcess* proc)
{
delete proc;
proc = NULL;
diff --git a/src/screen.h b/src/screen.h
index 7dc58b5..6d7fe9b 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -66,16 +66,16 @@ private:
* commandos to the active KScreensaver.
*/
DCOPRef screen_save_dcop_ref;
- //! KProcess to start xlock to lock the screen
- KProcess *xlock;
- //! KProcess to start xscreensaver with lock command
- KProcess *xscreensaver_lock;
- //! KProcess to start xscreensaver with restart command
- KProcess *xscreensaver_reset;
- //! KProcess to start gnome-screen-saver with lock command
- KProcess *gnomescreensaver_lock;
- //! KProcess to check if gnome-screensaver is running
- KProcess *gnomeScreensaverCheck;
+ //! TDEProcess to start xlock to lock the screen
+ TDEProcess *xlock;
+ //! TDEProcess to start xscreensaver with lock command
+ TDEProcess *xscreensaver_lock;
+ //! TDEProcess to start xscreensaver with restart command
+ TDEProcess *xscreensaver_reset;
+ //! TDEProcess to start gnome-screen-saver with lock command
+ TDEProcess *gnomescreensaver_lock;
+ //! TDEProcess to check if gnome-screensaver is running
+ TDEProcess *gnomeScreensaverCheck;
//! contains information about Xscreensaver
/*!
@@ -120,9 +120,9 @@ private slots:
//! to ping and deactivate the Xscreensaver
void xscreensaver_ping();
//! to get the return value of gnomescreensaver-command
- void getGSExited(KProcess *);
+ void getGSExited(TDEProcess *);
- void cleanProcess(KProcess *);
+ void cleanProcess(TDEProcess *);
public slots:
diff --git a/src/suspenddialog.cpp b/src/suspenddialog.cpp
index 8be599b..af6e7b0 100644
--- a/src/suspenddialog.cpp
+++ b/src/suspenddialog.cpp
@@ -59,13 +59,13 @@ void suspendDialog::setPixmap( TQString type )
{
TQPixmap pixmap = 0;
if(type.startsWith("suspend2disk")){// || type.startsWith("NULL")) {
- pixmap = KGlobal::iconLoader()->loadIcon("suspend_to_disk", KIcon::NoGroup, KIcon::SizeLarge);
+ pixmap = TDEGlobal::iconLoader()->loadIcon("suspend_to_disk", KIcon::NoGroup, KIcon::SizeLarge);
} else if (type.startsWith("suspend2ram")) {
- pixmap = KGlobal::iconLoader()->loadIcon("suspend_to_ram", KIcon::NoGroup, KIcon::SizeLarge);
+ pixmap = TDEGlobal::iconLoader()->loadIcon("suspend_to_ram", KIcon::NoGroup, KIcon::SizeLarge);
} else if (type.startsWith("standby")) {
- pixmap = KGlobal::iconLoader()->loadIcon("stand_by", KIcon::NoGroup, KIcon::SizeLarge);
+ pixmap = TDEGlobal::iconLoader()->loadIcon("stand_by", KIcon::NoGroup, KIcon::SizeLarge);
} else {
- pixmap = KGlobal::iconLoader()->loadIcon("kpowersave", KIcon::NoGroup, KIcon::SizeLarge);
+ pixmap = TDEGlobal::iconLoader()->loadIcon("kpowersave", KIcon::NoGroup, KIcon::SizeLarge);
}
setCaption(i18n("Preparing Suspend..."));
iconPixmap->setPixmap( pixmap );