summaryrefslogtreecommitdiffstats
path: root/klaptopdaemon/portable.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
commit625904bd3097f9749450428904ca14ff2531824d (patch)
treea45c43d5de71cb720078fa1272a4339815a919be /klaptopdaemon/portable.cpp
parent6335dc55802871b5a43492f217b6edbb420204c4 (diff)
downloadtdeutils-625904bd3097f9749450428904ca14ff2531824d.tar.gz
tdeutils-625904bd3097f9749450428904ca14ff2531824d.zip
rename the following methods:
tqparent parent tqmask mask git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klaptopdaemon/portable.cpp')
-rw-r--r--klaptopdaemon/portable.cpp130
1 files changed, 65 insertions, 65 deletions
diff --git a/klaptopdaemon/portable.cpp b/klaptopdaemon/portable.cpp
index 29c4d22..346a311 100644
--- a/klaptopdaemon/portable.cpp
+++ b/klaptopdaemon/portable.cpp
@@ -602,7 +602,7 @@ laptop_portable::has_software_suspend(int type)
}
void
-laptop_portable::software_suspend_set_tqmask(bool hibernate)
+laptop_portable::software_suspend_set_mask(bool hibernate)
{
software_suspend_is_preferred = hibernate;
}
@@ -677,17 +677,17 @@ has_acpi_power()
return(val);
}
-static unsigned long acpi_sleep_enabled = 0x00; // acpi sleep functions enabled tqmask
+static unsigned long acpi_sleep_enabled = 0x00; // acpi sleep functions enabled mask
static bool
has_acpi_sleep(int state)
{
static int known=0;
- static unsigned long tqmask=0;
+ static unsigned long mask=0;
if (known != last_seed) {
known = last_seed;
- tqmask = 0;
+ mask = 0;
TQFile p("/sys/power/state");
TQFile f("/proc/acpi/sleep");
@@ -701,11 +701,11 @@ has_acpi_sleep(int state)
TQString s = *i;
if (s.compare("standby")==0)
- tqmask |= (1<<1);
+ mask |= (1<<1);
else if (s.compare("mem")==0)
- tqmask |= (1<<3);
+ mask |= (1<<3);
else if (s.compare("disk")==0)
- tqmask |= (1<<4);
+ mask |= (1<<4);
}
p.close();
}
@@ -719,19 +719,19 @@ has_acpi_sleep(int state)
if (s[0] == 'S') {
int c = s[1].digitValue();
if (c >= 0 && c <= 9)
- tqmask |= 1<<c;
+ mask |= 1<<c;
}
}
f.close();
}
}
- return((tqmask&acpi_sleep_enabled&(1<<state)) != 0);
+ return((mask&acpi_sleep_enabled&(1<<state)) != 0);
}
static bool acpi_performance_enabled = 0;
static bool acpi_throttle_enabled = 0;
void
-laptop_portable::acpi_set_tqmask(bool standby, bool suspend, bool hibernate, bool perf, bool throttle)
+laptop_portable::acpi_set_mask(bool standby, bool suspend, bool hibernate, bool perf, bool throttle)
{
acpi_sleep_enabled =
(standby ? (1<<1)|(1<<2) : 0) |
@@ -755,7 +755,7 @@ invoke_acpi_helper(const char *param, const char *param2, const char *param3)
proc.start(KProcess::Block); // helper runs fast and we want to see the result
}
-static unsigned long apm_sleep_enabled = 0x0c; // apm sleep functions enabled tqmask
+static unsigned long apm_sleep_enabled = 0x0c; // apm sleep functions enabled mask
static bool
has_apm_sleep(int state)
{
@@ -763,7 +763,7 @@ has_apm_sleep(int state)
}
void
-laptop_portable::apm_set_tqmask(bool standby, bool suspend)
+laptop_portable::apm_set_mask(bool standby, bool suspend)
{
apm_sleep_enabled =
(standby ? 1<<2 : 0) |
@@ -939,14 +939,14 @@ int laptop_portable::has_hibernation()
// to get any software they lack
//
-KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *tqparent)
+KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent)
{
if (access("/proc/acpi", F_OK) == 0) { // probably has default kernel ACPI installed
- KActiveLabel* explain = new KActiveLabel(i18n("Your computer seems to have a partial ACPI installation. ACPI was probably enabled, but some of the sub-options were not - you need to enable at least 'AC Adaptor' and 'Control Method Battery' and then rebuild your kernel."), tqparent);
+ KActiveLabel* explain = new KActiveLabel(i18n("Your computer seems to have a partial ACPI installation. ACPI was probably enabled, but some of the sub-options were not - you need to enable at least 'AC Adaptor' and 'Control Method Battery' and then rebuild your kernel."), parent);
return(explain);
}
- KActiveLabel* explain = new KActiveLabel(i18n("Your computer doesn't have the Linux APM (Advanced Power Management) or ACPI software installed, or doesn't have the APM kernel drivers installed - check out the <a href=\"http://www.linuxdoc.org/HOWTO/Laptop-HOWTO.html\">Linux Laptop-HOWTO</a> document for information on how to install APM."), tqparent);
+ KActiveLabel* explain = new KActiveLabel(i18n("Your computer doesn't have the Linux APM (Advanced Power Management) or ACPI software installed, or doesn't have the APM kernel drivers installed - check out the <a href=\"http://www.linuxdoc.org/HOWTO/Laptop-HOWTO.html\">Linux Laptop-HOWTO</a> document for information on how to install APM."), parent);
return(explain);
}
@@ -954,23 +954,23 @@ KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *tqparen
//
// explain to the user what they need to do to get suspend/resume to work from user mode
//
-TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *tqparent)
+TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *parent)
{
if (::has_apm()) {
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
TQLabel* note = new KRichTextLabel(i18n("\nIf you make /usr/bin/apm setuid then you will also "
"be able to choose 'suspend' and 'standby' in the above "
"dialog - check out the help button below to find out "
- "how to do this").replace("\n", TQString()), tqparent);
+ "how to do this").replace("\n", TQString()), parent);
return(note);
}
if (::has_acpi()) {
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
- TQLabel* note = new KRichTextLabel(i18n("\nYou may need to enable ACPI suspend/resume in the ACPI panel").replace("\n", TQString()), tqparent);
+ TQLabel* note = new KRichTextLabel(i18n("\nYou may need to enable ACPI suspend/resume in the ACPI panel").replace("\n", TQString()), parent);
return(note);
}
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
- TQLabel* note = new KRichTextLabel(i18n("\nYour system does not support suspend/standby").replace("\n", TQString()), tqparent);
+ TQLabel* note = new KRichTextLabel(i18n("\nYour system does not support suspend/standby").replace("\n", TQString()), parent);
return(note);
}
@@ -1040,20 +1040,20 @@ void get_pcmcia_info()
// pcmcia support - this will be replaced by better - pcmcia support being worked on by
// others
//
-TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *tqparent)
+TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *parent)
{
if (x == 0)
get_pcmcia_info();
if (!present) {
if (x == 1)
- return(new TQLabel(i18n("No PCMCIA controller detected"), tqparent));
- return(new TQLabel(i18n(""), tqparent));
+ return(new TQLabel(i18n("No PCMCIA controller detected"), parent));
+ return(new TQLabel(i18n(""), parent));
} else {
switch (x) {
- case 0: return(new TQLabel(i18n("Card 0:"), tqparent));
- case 1: return(new TQLabel(tmp0, tqparent));
- case 2: return(new TQLabel(i18n("Card 1:"), tqparent));
- default:return(new TQLabel(tmp1, tqparent));
+ case 0: return(new TQLabel(i18n("Card 0:"), parent));
+ case 1: return(new TQLabel(tmp0, parent));
+ case 2: return(new TQLabel(i18n("Card 1:"), parent));
+ default:return(new TQLabel(tmp1, parent));
}
}
}
@@ -2139,7 +2139,7 @@ int laptop_portable::has_hibernation()
// explain to the user what they need to do if has_power_management() returned 0
// to get any software they lack
//
-KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *tqparent)
+KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent)
{
int fd;
KActiveLabel *explain;
@@ -2148,22 +2148,22 @@ KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *tqparen
if (fd == -1) {
switch (errno) {
case ENOENT:
- explain = new KActiveLabel(i18n("There is no /dev/apm file on this system. Please review the FreeBSD handbook on how to create a device node for the APM device driver (man 4 apm)."), tqparent);
+ explain = new KActiveLabel(i18n("There is no /dev/apm file on this system. Please review the FreeBSD handbook on how to create a device node for the APM device driver (man 4 apm)."), parent);
break;
case EACCES:
- explain = new KActiveLabel(i18n("Your system has the proper device node for APM support, however you cannot access it. If you are logged in as root right now, you have a problem, otherwise contact your local sysadmin and ask for read/write access to /dev/apm."), tqparent);
+ explain = new KActiveLabel(i18n("Your system has the proper device node for APM support, however you cannot access it. If you are logged in as root right now, you have a problem, otherwise contact your local sysadmin and ask for read/write access to /dev/apm."), parent);
break;
case ENXIO:
- explain = new KActiveLabel(i18n("Your kernel lacks support for Advanced Power Management."), tqparent);
+ explain = new KActiveLabel(i18n("Your kernel lacks support for Advanced Power Management."), parent);
break;
break;
default:
- explain = new KActiveLabel(i18n("There was a generic error while opening /dev/apm."), tqparent);
+ explain = new KActiveLabel(i18n("There was a generic error while opening /dev/apm."), parent);
break;
}
} else {
close(fd);
- explain = new KActiveLabel(i18n("APM has most likely been disabled."), tqparent);
+ explain = new KActiveLabel(i18n("APM has most likely been disabled."), parent);
}
return(explain);
@@ -2172,9 +2172,9 @@ KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *tqparen
//
// explain to the user what they need to do to get suspend/resume to work from user mode
//
-TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *tqparent)
+TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *parent)
{
- TQLabel* note = new TQLabel(" ", tqparent);
+ TQLabel* note = new TQLabel(" ", parent);
return(note);
}
@@ -2183,11 +2183,11 @@ TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *tqparent)
// pcmcia support - this will be replaced by better - pcmcia support being worked on by
// others
//
-TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *tqparent)
+TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *parent)
{
if (x == 0)
- return(new TQLabel(i18n("No PCMCIA controller detected"), tqparent));
- return(new TQLabel(i18n(""), tqparent));
+ return(new TQLabel(i18n("No PCMCIA controller detected"), parent));
+ return(new TQLabel(i18n(""), parent));
}
//
// puts us into standby mode
@@ -2239,7 +2239,7 @@ void laptop_portable::invoke_hibernation()
//ACPI specific - chances are you don't need to implement this one
//
void
-laptop_portable::acpi_set_tqmask(bool, bool, bool, bool, bool )
+laptop_portable::acpi_set_mask(bool, bool, bool, bool, bool )
{
// INSERT HERE
}
@@ -2258,7 +2258,7 @@ int laptop_portable::has_apm(int type)
}
void
-laptop_portable::apm_set_tqmask(bool , bool )
+laptop_portable::apm_set_mask(bool , bool )
{
}
@@ -2267,7 +2267,7 @@ laptop_portable::apm_set_tqmask(bool , bool )
// adds extra widgets to the battery panel
//
void
-laptop_portable::extra_config(TQWidget * /*tqparent*/, KConfig * /*config*/, TQVBoxLayout * /*tqlayout*/)
+laptop_portable::extra_config(TQWidget * /*parent*/, KConfig * /*config*/, TQVBoxLayout * /*tqlayout*/)
{
// INSERT HERE
}
@@ -2423,7 +2423,7 @@ laptop_portable::has_software_suspend(int /*type*/)
}
void
-laptop_portable::software_suspend_set_tqmask(bool /*hibernate*/)
+laptop_portable::software_suspend_set_mask(bool /*hibernate*/)
{
// software_suspend_is_preferred = hibernate;
}
@@ -2544,7 +2544,7 @@ int laptop_portable::has_hibernation()
// explain to the user what they need to do if has_power_management() returned 0
// to get any software they lack
//
-KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *tqparent)
+KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent)
{
int fd;
KActiveLabel *explain;
@@ -2553,22 +2553,22 @@ KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *tqparen
if (fd == -1) {
switch (errno) {
case ENOENT:
- explain = new KActiveLabel(i18n("There is no /dev/apm file on this system. Please review the NetBSD documentation on how to create a device node for the APM device driver (man 4 apm)."), tqparent);
+ explain = new KActiveLabel(i18n("There is no /dev/apm file on this system. Please review the NetBSD documentation on how to create a device node for the APM device driver (man 4 apm)."), parent);
break;
case EACCES:
- explain = new KActiveLabel(i18n("Your system has the proper device node for APM support, however you cannot access it. If you have APM compiled into the kernel this should not happen."), tqparent);
+ explain = new KActiveLabel(i18n("Your system has the proper device node for APM support, however you cannot access it. If you have APM compiled into the kernel this should not happen."), parent);
break;
case ENXIO:
- explain = new KActiveLabel(i18n("Your kernel lacks support for Advanced Power Management."), tqparent);
+ explain = new KActiveLabel(i18n("Your kernel lacks support for Advanced Power Management."), parent);
break;
break;
default:
- explain = new KActiveLabel(i18n("There was a generic error while opening /dev/apm."), tqparent);
+ explain = new KActiveLabel(i18n("There was a generic error while opening /dev/apm."), parent);
break;
}
} else {
close(fd);
- explain = new KActiveLabel(i18n("APM has most likely been disabled."), tqparent);
+ explain = new KActiveLabel(i18n("APM has most likely been disabled."), parent);
}
return(explain);
@@ -2577,10 +2577,10 @@ KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *tqparen
//
// explain to the user what they need to do to get suspend/resume to work from user mode
//
-TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *tqparent)
+TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *parent)
{
// INSERT HERE
- TQLabel* note = new TQLabel(" ", tqparent);
+ TQLabel* note = new TQLabel(" ", parent);
return(note);
}
@@ -2588,12 +2588,12 @@ TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *tqparent)
// pcmcia support - this will be replaced by better - pcmcia support being worked on by
// others
//
-TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *tqparent)
+TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *parent)
{
// INSERT HERE
if (x == 0)
- return(new TQLabel(i18n("No PCMCIA controller detected"), tqparent));
- return(new TQLabel(i18n(""), tqparent));
+ return(new TQLabel(i18n("No PCMCIA controller detected"), parent));
+ return(new TQLabel(i18n(""), parent));
}
//
@@ -2636,7 +2636,7 @@ void laptop_portable::invoke_hibernation()
//ACPI specific - chances are you don't need to implement this one
//
void
-laptop_portable::acpi_set_tqmask(bool, bool, bool, bool, bool )
+laptop_portable::acpi_set_mask(bool, bool, bool, bool, bool )
{
// INSERT HERE
}
@@ -2655,7 +2655,7 @@ int laptop_portable::has_apm(int type)
}
void
-laptop_portable::apm_set_tqmask(bool , bool )
+laptop_portable::apm_set_mask(bool , bool )
{
}
@@ -2861,9 +2861,9 @@ int laptop_portable::has_hibernation()
// explain to the user what they need to do if has_power_management() returned 0
// to get any software they lack
//
-KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *tqparent)
+KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent)
{
- KActiveLabel* explain = new KActiveLabel(i18n("Your computer or operating system is not supported by the current version of the\nKDE laptop control panels. If you want help porting these panels to work with it\nplease contact paul@taniwha.com."), tqparent);
+ KActiveLabel* explain = new KActiveLabel(i18n("Your computer or operating system is not supported by the current version of the\nKDE laptop control panels. If you want help porting these panels to work with it\nplease contact paul@taniwha.com."), parent);
// INSERT HERE
return(explain);
}
@@ -2871,9 +2871,9 @@ KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *tqparen
//
// explain to the user what they need to do to get suspend/resume to work from user mode
//
-TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *tqparent)
+TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *parent)
{
- TQLabel* note = new TQLabel(" ", tqparent);
+ TQLabel* note = new TQLabel(" ", parent);
// INSERT HERE
return(note);
}
@@ -2883,12 +2883,12 @@ TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *tqparent)
// pcmcia support - this will be replaced by better - pcmcia support being worked on by
// others
//
-TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *tqparent)
+TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *parent)
{
// INSERT HERE
if (x == 0)
- return(new TQLabel(i18n("No PCMCIA controller detected"), tqparent));
- return(new TQLabel(i18n(""), tqparent));
+ return(new TQLabel(i18n("No PCMCIA controller detected"), parent));
+ return(new TQLabel(i18n(""), parent));
}
//
// puts us into standby mode
@@ -2917,7 +2917,7 @@ void laptop_portable::invoke_hibernation()
//ACPI specific - chances are you don't need to implement this one
//
void
-laptop_portable::acpi_set_tqmask(bool, bool, bool, bool, bool )
+laptop_portable::acpi_set_mask(bool, bool, bool, bool, bool )
{
// INSERT HERE
}
@@ -2929,7 +2929,7 @@ int laptop_portable::has_acpi(int)
}
void
-laptop_portable::apm_set_tqmask(bool, bool)
+laptop_portable::apm_set_mask(bool, bool)
{
// INSERT HERE
}
@@ -2945,7 +2945,7 @@ int laptop_portable::has_apm(int)
// adds extra widgets to the battery panel
//
void
-laptop_portable::extra_config(TQWidget *tqparent, KConfig *config, TQVBoxLayout *tqlayout)
+laptop_portable::extra_config(TQWidget *parent, KConfig *config, TQVBoxLayout *tqlayout)
{
// INSERT HERE
}
@@ -3080,7 +3080,7 @@ laptop_portable::has_software_suspend(int type)
}
void
-laptop_portable::software_suspend_set_tqmask(bool hibernate)
+laptop_portable::software_suspend_set_mask(bool hibernate)
{
// software_suspend_is_preferred = hibernate;
}