Added KDE3 version of kpowersave

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpowersave@1092957 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
pull/1/head
tpearson 15 years ago
commit be4fc77c29

@ -0,0 +1,2 @@
Danny Kukawka <dkukawka@suse.de>, <danny.kukawka@web.de>
Thomas Renninger <trenn@suse.de>

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,276 @@
# Doxyfile 1.4.1-KDevelop
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = kpowersave.kdevelop
PROJECT_NUMBER = "0.7.x - SVN-trunk"
OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = NO
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = YES
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = YES
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = YES
INHERIT_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 5
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = YES
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = YES
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = NO
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = YES
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = doc/doxy \
src
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.idl \
*.odl \
*.cs \
*.php \
*.php3 \
*.inc \
*.C \
*.H \
*.tlh \
*.diff \
*.patch \
*.xpm \
*.dox
RECURSIVE = YES
EXCLUDE = ./src/kpowersave_dummy.cpp \
./src/screen.moc.cpp \
./src/kpowersave.la.cpp \
./src/kpowersave_skel.cpp \
./src/info_Dialog.cpp \
./src/suspend_Dialog.cpp \
./src/configure_Dialog.cpp \
./src/blacklistedit_Dialog.cpp \
./src/detailed_Dialog.cpp \
./src/blacklistedit_Dialog.h \
./src/detailed_Dialog.h \
./src/suspend_Dialog.h \
./src/info_Dialog.h \
./src/configure_Dialog.h \
./src/kdeinit_kpowersave.cpp
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = *.moc.cpp \
*_dummy.* \
*.la.cpp \
*_la.all_cpp.cpp
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = YES
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = ./doc/html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET = ./doc/doxy/styleSheet.css
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = YES
LATEX_OUTPUT = ./doc/latex/
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = YES
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO

@ -0,0 +1,236 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that the
`configure' script does not know about. Run `./configure --help' for
details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out automatically,
but needs to determine by the type of machine the package will run on.
Usually, assuming the package is built to be run on the _same_
architectures, `configure' can figure that out, but if it prints a
message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share, you
can create a site shell script called `config.site' that gives default
values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). Here is a another example:
/bin/bash ./configure CONFIG_SHELL=/bin/bash
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
configuration-related scripts to be executed by `/bin/bash'.
`configure' Invocation
======================
`configure' recognizes the following options to control how it operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

@ -0,0 +1,22 @@
SUBDIRS = $(TOPSUBDIRS)
$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
$(top_srcdir)/subdirs:
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
@cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
package-messages:
cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common package-messages
$(MAKE) -C po merge
EXTRA_DIST = admin COPYING configure.in.in
dist-hook:
cd $(top_distdir) && perl admin/am_edit -padmin
cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs

455
NEWS

@ -0,0 +1,455 @@
New: KPowersave 0.7.3
=================================================
Note: The last release is now 4 months ago, so the NEWS are longer than
normal. For all changes read the Changelog.
Major changes since the last version/release:
- added new dialog to show logfiles if a suspend/resume fail and allow
the user to save the log (need to get enabled per distro)
- added support to handle brightness key events if the machine not already
handle this in the hardware directly
- added new feature named autodimm to reduce the brightness of the display
if the user is inactive and dimm up if the user get active again
- new dialog shown up 30 seconds before autosuspend call the suspend to
warn the user and allow chancel the suspend
- added code to work with new PolicyKit/ConsoleKit/HAL combi to check if
the user is privileged (for HAL >= 0.5.10 and related PolicyKit versions)
- added code to check if the current desktop session is avtive and handle
if the session get inactive (via ConsoleKit)
- added code to release/aquire org.freedesktop.Policy.Power if the session
get inactive/active to allow powersaved or other active KPowersave
instances to handle powermanagement
- prepared KPowersave to work also with HAL >= 0.5.10 (handle renamed
policy names in HAL)
- use now kdebug functions instead of own macros, added --dbg-trace option
to allow trace function entry and leave points.
Minor changes:
- added wodim to autosuspend blacklist
- changed logic for resume if a timeout happen
- change default timeout to fake keyevent for locked screen to 2.5 sec
- don't fake key event after locked screen and lidopen if config variable
timeToFakeKeyAfterLock < 0
- added new config variable (callSetPowerSaveOnAC in [General] section)
to disable call SetPowerSave() on HAL.
- fix code to guess if a 6-hour-timeout occours while suspend/resume or
if there was really a error
- removed Portuguese version of the help, since only one paragraph was
translated
- fixed configure script to detect if we should use HAL to get information
about policies instead of PolicyKit
- force update detailed dialog on AC events to get always e.g. the
correct scheme info in the dialog
- reworked code for mouse wheel events to reuse code for brightness keys
- several HAL/D-Bus/PolicyKit/ConsoleKit related fixes/updates
- cleanup code, fixed compiler warnings, added new functions to removed
doubled code
Bugfixes:
- fixed problems with usage of enum cpufreq_type: don't assign integer
values to a enum (lead to segfault since enum is a 8bit char object)
- fixed wrong unit for power consumption (removed 'h' from unit)
- only suspend on button events if we resumed to avoid double suspends
- several fixes to make signals from HAL/DBus idependent from the QT
eventloop due to problems with the QT3 DBus bindings
- several patches from Mandriva (lmontel@mandriva.com) to fix problems
with translations, format messages, speedup build and memory leaks
- fixed detection if brightness is really supported by the system
- call setPowerSave() always depending on AC state if a scheme get set.
- use float for internal calculation of battery values
- When use DBUS_TYPE_BOOLEAN use as variable type dbus_bool_t to avoid
possible trouble on big endian machines
Fixed bugs (from bugzilla.novell.com if no other comment):
- #182609: autosuspend warn dialog, feature request
- #229234: kpowersave does not fall back to userspace governor
- #256372: make HAL events independent from QT eventloop
- #257326: ignore battery warnings if on AC
- #266243: check info.capability and not info.category for laptop_panel
- #274705: feature request autodimm
- #282640: fixed brightness up/down handling
- #284622: fixed segfault
- #293707: de.po: missing space between text and ellipsis (...)
- #298332: crash, fixed typo
- #299577: disable Yast module on >= openSUSE 10.3
- #301692: fix switch schemes on AC events, fixed detection session
state, fixed possible segfault on ix86
- #302493: don't use kdFatal() befor exit(), it would look like a crash
- #303963: fix segfault if XDG_SESSION_COOKIE is not set
- #307431: prevent AC notifications if session state get changed
- #309491: fixed code to free KProcess object if gnome-screensaver runs
- Debian #413638: if config dialog is minimized and the user try to
start config dialog via applet reactivate the dialog.
- Debian #413811: fails to notify if suspend-to-ram fails
- (K)Ubuntu #94396: stop autosuspend before suspend
Tranlation updates:
- german: Danny Kukawka
- arabic: Youssef Chahibi
- slovenian: Jure Repinc
- several other from forgesvn1.novell.com/svn/suse-i18n/trunk/lcn
New: KPowersave 0.7.2 (development tree/unstable)
=================================================
This version is a major step to the next KPowersave stable version.
At first: you don't need to change the KPowersave config file manually
any longer - this version provide now all options for powermanagement
in KPowersave via the updated and extended configure dialog.
You can find all changes since the last release in this file or in the
Changelog. Please test KPowersave and feel free to report bugs to the
powersave-devel mailinglist or for SUSE products via the Novell bugzilla.
Because of the changes in the GUI the most translations are not
up-to-date. Feel free to checkout the source, update your translations
file and send it to us.
Major changes since the last version:
- extended configure dialog to provide this functionality:
* schemes settings:
- add new and delete existing (no default) schemes
- define a CPU Frequency policy for each scheme
* general settings:
- define battery warning levels and actions if a level reached
as e.g. Suspend to disk, Shutdown or change the brightness
- configure actions for button events (Power/Lid/Suspend/Sleep)
- define the default AC and battery schemes
- show the power consumtion of the battery in the detailed info dialog
- umount external media before suspend (need a patch of the KDE media
manager) to avoid data loss and remount on resume
- reset the CPU Freq settings on resume to avoid different settings for
the CPU governor on multicore machines
- call now SetCPUFreqConsiderNice(), SetCPUFreqPerformance() on dynamic
CPU Freq policy (as poweruser setting only changeable via config file),
and also SetPowerSave() with true on battery and false otherwise.
- support also conservative governor as DYNAMIC fallback
- fixed brightness handling in the configure dialog if not activated
- removed accelerator tags from i18n() strings. KDE handle this by itself.
Improved config GUI to be better accessible via keyboard.
- code and code documentation cleanups and updates
Fixed bugs (from bugzilla.novell.com if no other comment):
- #245081: KPowersave does not set (ondemand) governor on startup
- #244052: Close lid of a laptop and suspend to ram cause 100% CPU
- #229960: CPUFREQ_DYNAMIC_PERFORMANCE seems to be ignored during
boot and scheme change
- #230686: KPowersave need to be restarted to apply DPMS settings
- #230965: puzzling battery state info
- #231709: kpowersave-0.7.1-12: comparison with string literal
- #231184: KPowersave crashes due to uninitalized LibHalContext
- #229234: KPowersave does not fall back to userspace governor
- #215262: Suspend to disk with attached usb storage not working
- #223164: After suspend, second core has performance governor set
- #223517: Powersave: CPU scheme "dynamic" reduces speed if only
nice -19 processes run
- #223637: kpowersave crashes in first login
- #225212: KPowersave crash on ThinkPad X60s
- #221715: Functionality for configuring lid close event etc.
missing in KPowersave
- #223922: System not shuting down on pressing power button
Tranlation updates:
- german: Danny Kukawka
- danish: Stefan Skotte
- turkish: S.Çağlar Onur
- chinese: Zhengpeng Hou
KPowersave 0.7.1 (development tree/unstable)
=================================================
I'm glad to announce the first new offical release from the KPowersave
development version 0.7.1. This is the first version of KPowersave without
dependency to the powersave daemon. From now KPowersave use directly the
HAL daemon to get Hardware information and set e.g. brightness or trigger
Suspend.
Also if KPowersave depend no longer on powersave, I would recommend to use
the new/current powersave version furthermore. You can use the powersave
daemon if there is no client as e.g. KPowersave to handle system power-
management. If KPowersave (there is also a patch for g-p-m available) start
up the daemon stop automatically to handle powermanagement policy and
the KPowersave applet force (if allowed) the user specific policy.
You can find all changes since the last stable release in this file or in
the Changelog. Please test KPowersave and feel free to report bugs to
the powersave-devel mailinglist or for SUSE products via the Novell bugzilla.
Major changes since the last version:
- Initial port from powersave to HAL/D-Bus/PolicyKit:
- replaced most features from the last stable version base on powersave
with new code. (Only missing atm eyecandy stuff as suspend progress dialog)
- replaced code to get hardware information from powersave with get info
from the HAL daemon
- changed resume from suspend/standby detection and handling of the event
- KPowersave claim now org.freedesktop.Policy.Power interface from D-Bus
to stop powersave from handle powermanagement policy and to prevent
handle other clients to start powermanagement.
- Extended existing schemes to be complete handled in KPowersave instead
of the powersave daemon. Added new (scheme) settings for:
* battery warning levels
* actions for battery warning levels and for lidclose events (as e.g.
SHUTDOWN, SUSPEND2DISK, SUSPEND2RAM, CPUFREQ_POWERSAVE, CPUFREQ_DYNAMIC,
or BRIGHTNESS)
* AC and Battery default schemes
* CPU Frequency Policies per scheme
--> NOTE: you can change this settings currently only via the config file
and not via the GUI configure dialog. This is the next step, we
concentrated on get KPowersave running for this release.
- Fixed KDE screensaver and DPMS handling to reduce/avoid interfer with the
KDE user settings. There is a KDE patch available to check if KPowersave
handle DPMS settings already and call the KPowersave config dialog.
KPowersave 0.6.2 (stable update)
================================
Changes/fixes since last stable release:
- KPowersave depends now on powersave >= 0.12.18
- fixed bugs:
- sf.net #1483392/ SUSE #177792: set changes for autosuspend state via DCOP
back to the applet menu, added DCOP functions to set the current scheme,
the current CPUFreq policy and to open/close the detailed dialog
- sf.net #1483392/ SUSE #177788,180000: added workaround to fix two bugs in
the DPMS- and Screensaver extension of X, related to autosuspend and detect
user inactivity (DPMS timeouts are abstracted from current idle time, but
shouldn't / DPMS timeouts are currently additive but shouldn*'t). This fix
problems with autosuspend if the timeout is longer than the DPMS timeouts.
- SUSE #168619: changed errorhandling if HAL, DBUS or the powersave daemon
is not running or if the user has not the needed rights to access the
powersave daemon via DBUS. Added new errormessages and translations.
- SUSE #182515: Changed configure dialog to respect rules for DPMS timeouts
- SUSE #176782: patch from Timo Hönig <thoenig@suse.de> to allow (if
supported and enabled in the scheme) change brighness via mousewheel over
the applet icon.
- SUSE (SLED) #183745: fixed detection of SUSE Linux/SLES/SLED and added
configure option to force SLES/SLED as distro with --enable-suse-sles.
Fixed bugzilla link for SLED/SLES
- SUSE #184076: fixed wrong command to start dbus daemon in errormessage.
- added additional check before autosuspend if this was disabled via applet
- added new configure check to detect Ubuntu/Kubuntu
- changed link to Ubuntu bugzilla to launchpad.net and use now the same link
for applet menu entry "Report a bug ..." if compiled for Ubuntu/Kubuntu
- updated default blacklist for autosuspend with gmplayer,kaffeine,xine,mencoder
- updated translation: cs,de,es,fi,fr,hu,it,km,pl,pt_BR,zh_CN,zh_TW
- updated (cs) and fixed translation of eventsrc for KNotify
- fixed and updated code documentation
KPowersave 0.6.1 (stable update)
================================
Changes/fixes since last stable release:
- fixed SUSE bug #167296: fixed tooltip and removed unneeded checks for battery
related infos. Should fix display wrong remaining time on charging with APM
- fixed SUSE bug #165462: removed utf8 tag from eventsrc which results in
"unknown source ..." message in knotify dialog
- fixed SUSE bug #168838; event for resumeFromSuspendToDisk displayed twice in
knotify dialog (typo and translation issue in eventsrc)
- fixed detailed dialog for multiprocessor/-core machines without CPUFreq or
throttling support and offline CPUs/Cores
- updated translations (fi,km,pl,ru) including desktop files and eventsrc (ru,
from Anton Farygin <rider@altlinux.com>)
- added configure check for dbus-1-qt3-devel headers
- updated README (ALT Linux bugzilla link)
KPowersave 0.6.0 (stable)
================================
I'm glad to announce the new official stable release of KPowersave (v0.6.0).
You can find all changes since the last stable release in this file or in
the Changelog.
Thanks to all persons which helped to develop KPowersave with patches,
testing new unstable versions and report bugs back to us. A special thanks
to:
Holger Macht, Stefan Seyfried, Michael Biebl, Daniel Gollub
and last but not least SUSE/Novell.
Danny Kukawka
Changes since last release:
- changed powersave dependency to current stable version >= 0.12.7
- reduced the size of the package by optimize the size of included png files.
The size off all png files is now reduced by ~709KByte.
- added german version of the handbook
- fixed processor bar in detailed dialog to set correct for the first call.
- fixed tooltip for machines which always report charging also if 100%
charged and on AC
- fix from Michael Biebl for notify about autosuspend after resume and a
remove no longer needed check from configure
- added support for lock screen via gnome-screensaver (only under GNOME)
- added fake keyevent (shift) after resume if machine was locked before
suspend to show the login dialog automatically
- fixed detailed dialog for machines without CPUFreq and more than one CPU/
Core or with throttling support (see SUSE bug #164683).
- added patch from Daniel Gollub to be able to fake CPU infos for develop
- fixed errorhandling for YaST power management module (SUSE specific)
- changed link for report bug opened via the applet menu if this is a
SUSE package. Open now the related opensuse.org wiki page.
- fixed bug report address in the about dialog (to powersave-users ML)
- translation updates
- changed timeout for recheck powersave on startup from 10 secs to 20 to
avoid annoying messages on slow machines or autologin
- updated README with install/compile and help/bugreport information
- updated code docu (added planed features/enhancements for 0.7/0.8 tree)
- updated spec files for packaging
KPowersave 0.5.11 (rc5)
================================
Changes since last release:
- added function to check if the machine is a laptop and to allow hide
laptop specific widgets/code e.g. on workstations
- hide 'Lock screen on lid close' checkbox in config dialog on non-Laptop
- changed brightness settings to be sure that we use the lowest 'usable'
min level of brightness and to avoid off the display on e.g. pmu
- allow root user always all kind of suspend/standby
- little fix to prepare for QT4 (s/TRUE/true/)
- translation, handbook and code documenatation updates and fixes
- code cleanups, SVN file attributes fixed
KPowersave 0.5.10 (rc4)
================================
Changes since last release:
- KPowersave depends now on: powersave >= 0.12.2
- fixed lidclose handling: added call xset to off the backlight of LCD
displays and reset DPMS settings on lidopen
- fixed read throttling state for multiprocessor machines (patch from
Daniel Gollub <dgollub@suse.de>)
- fixed display processor infos on multiprocessor/-core machines dislay now
values for each CPU/core also on non CPUfreq and non-throttling machines
- fix to display battery infos only if at least min. 1 batteryslot available
- translation updates (po files and handbook) from SUSE/Novell translation
team and Dawid Wróbel <cromo@klej.net>
- added and updated screenshots for handbook
- added missing icon on non-SUSE distributions
- autotools releated fixes: better detection of Mandriva, use now pkgconfig
from powersave for checks and linking, read name/location of dbus system
socket from pkgconfig.
KPowersave 0.5.9 (rc3)
================================
Changes since last release:
- fixed battery and processor information for APM and machines without
CPU freq or throttling support
- fixed battery state in the detailed dialog if no battery is available
- translation and handbook updates and fixes
KPowersave 0.5.8 (rc2)
================================
Changes since last release:
- removed sound settings from configure dialog and added KNotify support
and more events, KNotify config dialog is available via applet menu and
in the configure dialog (Michael Biebl/Danny Kukawka)
- added dcop function to open configure dialog
- fixed path to powersaved in code and translations to be more portable
(Michael Biebl)
- fixed cpu info in the info dialog to display also for machines which
only support throttling (Daniel Gollub/Danny Kukawka)
- fixed battery part in the info dialog to have same sized progressbars
- fixed strings in the code, fixed sting in tooltip if charging
- fixed problems with pidof on Fedora: pidof should be in PATH of user.
- removed no longer needed parts from handbook
- updated translations related to the changes
- cleanups (code and files)
KPowersave 0.5.7 (rc1)
================================
Changes since last release:
- added brightness support and battery state info to the detailed dialog
- updated translations: bg,cs,es,fr,it,ja,pt,nb,pt_BR,zh_CN,zh_TW
- added new language: km
- added new help file (currently without pics): Finnish
- fixed bugs:
- fixed again display CPU Freq Policy on machines without cpufreq support
- autotools related fixes (Michael Biebl <biebl@teco.edu>)
KPowersave 0.5.6 (unstable)
================================
Changes since last release:
- added new summary battery progress bar if more than one battery bay is
available in the system
- updated translation files (nb,nl,pl,pt,zh_CN) thanks to Dawei Pang
(zh_CN) and Dawid Wróbel (pl)
- added new helpfiles for Czech and Portuguese (not complete translated),
removed some pics to reduce package size
- fixed bugs:
- wrong path to pidof prevented autosuspend (fixed path to /bin )
- fixed autotools releated issues
- included header for Slackware 10.2
- fixed excessive CPU usage of detailed dialog
- fixed problems if CPU Freq Policy not supported
KPowersave 0.5.5 (unstable)
================================
Changes since last release:
- reworked the detailed dialog to a new design
- fixed problems with offline CPUs
- fixed battery handling
- updated pot/po files and completed german translation
- added new help menu to the applet, added new about dialog and a link
to the sourceforge bugzilla for easy report bugs
- added new icon for the 'Advanced Powersave' scheme
- several cleanups and little fixes
KPowersave 0.5.4 (unstable)
================================
Changes since last release:
- added new detailed information dialog to the left button on the applet
which provide currently following information:
- battery info for multiple batteries
- CPU Frequency info also for multiprozessor machines
- current scheme, current CPU Frequency policy, AC status, powersave
status
- updated code dokumentation and enhancement/implementation doc
KPowersave 0.5.3 (unstable)
================================
Changes since last release:
- implemented scheme specific brightness settings in KPowersave
and in the configure dialog and added capability for brightness to disable
set brightness in powersave if KPowersave is running.
- added warning dialog is 'Advanced Powersave' scheme is selected to avoid
problems with this EXPERIMENTAL feature
- updated: translation (nl), code documentation
- fixed compiler warning, patch by Daniel Gollub <dgollub@suse.de>
KPowersave 0.5.2 (unstable)
================================
Changes since last release (KPowersave 0.5.0):
- updated to new powersave (>= v0.11.2)
- added new dialog/error message if powersave is not running, from now
'Don't show again' checkbox is available to disable the message
- added popup if HAL is not running (special if also powersave is not available)
and kpowersave get no information about battery/AC status
- changed settings of sounds filedialog to be more portable
- removed old and not needed qt1/qt2 includes
- changed handling with not available connection to powersave on
startup of KDE (special for autologin)
- updated help files and added new Norsk and Hungarian help files, added
language specific screenshots
- fixed dialogs to be respect KDE user interface style guide, fixed
icon handling and desktop file (thanks to Stephan Binner <stbinner@suse.de>)
- added admin dir and updated README for compile on non-SUSE distributions
- updated translation files
- updated code documentation
- code and file cleanups
- several little bugfixes
- switched from CVS to SVN

@ -0,0 +1,99 @@
****************************************************************************
* DEPENDENCIES *
****************************************************************************
You need the following packages (the package names maybe differ for each
distribution) to compile KPowersave:
- dbus (dbus-devel, dbus-qt3-devel) >= 0.6.x recommended: >= 0.9.x
- hal (hal-devel) recommended: >= 0.5.9.1
- kdelibs3-devel recommended: >= 3.4.3/3.5.x
- pkgconfig
- xorg-x11-devel (for detect inactivity and set DPMS)
and maybe also these packages:
- doxygen (for code documentation)
- docbook, kde3sdk (handbook)
other (may) needed packages for run all KPowersave features:
- PolicyKit, recommended >= 0.2
- ConsoleKit
****************************************************************************
* INSTALLATION *
****************************************************************************
* For SUSE users how to generate configure:
. /etc/opt/kde3/common_options
update_admin
* For other distributions try this to generate configure:
make -f admin/Makefile.common cvs
* Execute the following commands to compile, make and install kpowersave:
./configure --prefix=/opt/kde3 [--enable-debug=full]
make
make install
For the rest (or more general information) read the INSTALL file.
****************************************************************************
* HELP/SUPPORT *
****************************************************************************
Project Websites:
===================
KPowersave@freshmeat.net:
* http://freshmeat.net/projects/kpowersave
KPowersave@kde-apps.org:
* http://www.kde-apps.org/content/show.php?content=29295
(K)Powersave@sourceforge.net:
* http://sourceforge.net/projects/powersave
(K)Powersave@forge.novell.com:
* http://developer.novell.com/wiki/index.php/Powersave
Mailinglists:
===============
powersave-users with enduser support:
* http://forge.novell.com/mailman/listinfo/powersave-users
powersave-devel for developer and port to distributions:
* http://forge.novell.com/mailman/listinfo/powersave-devel
Forums:
=========
* http://sourceforge.net/forum/?group_id=124576
Bugreports:
=============
Please report distribution or packaging related bugs to the bugreport
system of your distribution e.g.:
* SUSE Linux: http://en.opensuse.org/Report_a_Bug
* SLES/SLED: https://bugzilla.novell.com/
* Debian: http://www.debian.org/Bugs/
* K/Ubuntu: https://launchpad.net/distros/ubuntu/+bugs
* RedHat: https://bugzilla.redhat.com/
* Mandriva: http://qa.mandriva.com/
* ALT Linux: http://bugzilla.altlinux.org/
* Pardus: http://bugs.pardus.org.tr/
For general Bugs use:
* http://sourceforge.net/tracker/?group_id=124576&atid=700009
* powersave-users mailinglist

48
TODO

@ -0,0 +1,48 @@
Currently we porting KPowersave to use HAL instead of the powersave daemon.
********************************************************************************
For more information read this:
http://dkukawka.blogspot.com/2006/10/kpowersave-development-for-next-stable.html
or in general about the current state of development:
http://dkukawka.blogspot.com/
or the powersave-devel mailinglist archive:
http://forge.novell.com/pipermail/powersave-devel/
or at gmane.org:
http://news.gmane.org/gmane.linux.power-management.powersave
********************************************************************************
Currently TODOs: (except as TODO marked issues in the code)
IMPORTANT:
* related to new PolicyKit/ConsoleKit/HAL combination and 'Session'-handling:
- fix scheme handling (don't set scheme if inactive, force correct scheme if
active session again)
- the running KPowersave instance can may not react as configured on empty/
low battery if the session is inactive. May only a shutdown via KDE is
possible.
Think about this possible solutions:
- fall back to shutdown via KDE on lowest battery level
- drop org.freedesktop.Policy.Power interface and let powersaved to the
job
NORMAL:
* fix suspend workflow, including:
- handle errors (50 % done)
* add code to react if KPowersave could not claim the
org.freedesktop.Policy.Power interface from D-Bus
* update doxygen files, remove/update tasks etc.
* testing and bugfixing (always!)
* check if there is room of improvment for:
- reduce calls and set/force settings (partly done)

@ -0,0 +1,173 @@
#MIN_CONFIG(3.2.0)
AM_INIT_AUTOMAKE(kpowersave, 0.7.3, danny.kukawka@web.de)
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN
AC_ARG_ENABLE(debug-msg, [ --enable-debug-msg build with debug messages],enable_debug_msg=$enableval,enable_debug_msg=auto)
AC_ARG_ENABLE(yast-entry, [ --enable-yast-entry build with a YaST entry in the applet menu],enable_yast_entry=$enableval,enable_yast_entry=auto)
AC_ARG_ENABLE(fake-cpu, [ --enable-fake-cpu use fake cpu environment],enable_fake_cpu=$enableval,enable_fake_cpu=auto)
AC_ARG_ENABLE(suse-sles, [ --enable-suse-sles set SLES/SLED as distribution],enable_suse_sles=$enableval,enable_suse_sles=auto)
YAST_ENTRY="no"
PKG_PROG_PKG_CONFIG
if test x$enable_suse_sles = xyes; then
AC_DEFINE([DISTRO_IS_SUSE],1,[define if the distro is SUSE])
AC_DEFINE([DISTRO_IS_SLES_SLED],1,[define if the distro is a SUSE Linux Enterprise product])
YAST_ENTRY="yes"
echo "detected distribution: SUSE Linux / a SUSE Linux Enterprise product"
elif test -f /etc/SuSE-release ; then
AC_DEFINE([DISTRO_IS_SUSE],1,[define if the distro is SUSE])
echo -n "detected distribution: SUSE Linux "
YAST_ENTRY="yes"
if test -x /usr/bin/lsb_release ; then
/usr/bin/lsb_release -d -s > lsb_id.tmp
if test -f lsb_id.tmp; then
read LSB_ID < lsb_id.tmp
case "$LSB_ID" in
*SUSE*Linux*Enterprise*)
AC_DEFINE([DISTRO_IS_SLES_SLED],1,[define if the distro is a SUSE Linux Enterprise product])
echo "/ a SUSE Linux Enterprise product"
;;
*)
/usr/bin/lsb_release -r -s > lsb_release.tmp
if test -f lsb_release.tmp; then
read LSB_RELEASE < lsb_release.tmp
case "$LSB_RELEASE" in
*10)
;;
*10.1)
;;
*10.2)
;;
*)
YAST_ENTRY="no"
;;
esac
rm -f lsb_release.tmp;
fi
echo ""
;;
esac
rm -f lsb_id.tmp;
else
echo ""
fi
fi
elif test -f /etc/altlinux-release ; then
AC_DEFINE([DISTRO_IS_ALTLINUX],1,[define if the distro is AltLinux])
echo "detected distribution: ALT Linux"
elif test -f /etc/fedora-release ; then
AC_DEFINE([DISTRO_IS_FEDORA],1,[define if the distro is RedHat/Fedora])
echo "detected distribution: RedHat/Fedora"
elif test -f /etc/mandrake-release -o -f /etc/mandriva-release -o -f /etc/mandrakelinux-release; then
AC_DEFINE([DISTRO_IS_MANDRAKE],1,[define if the distro is Mandrake])
echo "detected distribution: Mandrake/Mandriva"
elif test -f /etc/pardus-release ; then
AC_DEFINE([DISTRO_IS_PARDUS],1,[define if the distro is Pardus])
echo "detected distribution: Pardus"
elif test -f /etc/redhat-release ; then
AC_DEFINE([DISTRO_IS_REDHAT],1,[define if the distro is RedHat])
echo "detected distribution: RedHat"
elif test -f /etc/gentoo-release ; then
AC_DEFINE([DISTRO_IS_GENTOO],1,[define if the distro is Gentoo])
echo "detected distribution: Gentoo"
elif test -f /etc/slackware-version ; then
AC_DEFINE([DISTRO_IS_SLACKWARE],1,[define if the distro is Slackware])
echo "detected distribution: Slackware"
elif test -f /etc/debian_version ; then
if test -x /bin/lsb_release ; then
/bin/lsb_release -id -s > lsb_id.tmp
if test -f lsb_id.tmp; then
read LSB_ID < lsb_id.tmp
case "$LSB_ID" in
Ubuntu*)
AC_DEFINE([DISTRO_IS_UBUNTU],1,[define if the distro is Ubuntu/Kubuntu])
echo "detected distribution: Ubuntu/Kubuntu"
;;
*)
# couldn't detect special derivat, set to Debian
AC_DEFINE([DISTRO_IS_DEBIAN],1,[define if the distro is Debian])
echo "detected distribution: Debian"
;;
esac
rm -f lsb_id.tmp;
else
# paranoid Fallback
AC_DEFINE([DISTRO_IS_DEBIAN],1,[define if the distro is Debian])
echo "detected distribution: Debian"
fi
else
# Fallback if /bin/lsb_release is not available
AC_DEFINE([DISTRO_IS_DEBIAN],1,[define if the distro is Debian])
echo "detected distribution: Debian"
fi
else
AC_DEFINE([DISTRO_IS_UNKNOW],1,[define if the distro is unknown])
echo "detected distribution: unknown"
fi
if test x$enable_debug_msg = xyes; then
AC_DEFINE([ENABLE_DEBUG_MSG_MODE],1,[Support a verbose mode with debug messages])
echo "enabled debug messages: yes"
else
echo "enabled debug messages: no"
fi
if test x$enable_yast_entry = xyes; then
AC_DEFINE([ENABLE_YAST_ENTRY],1,[Add YaST entry in the applet menu])
echo "enabled YaST menu entry: yes"
else
echo "enabled YaST menu entry: $YAST_ENTRY"
if test x$YAST_ENTRY = xyes; then
AC_DEFINE([ENABLE_YAST_ENTRY],1,[Add YaST entry in the applet menu])
fi
fi
if test x$enable_fake_cpu = xyes; then
AC_DEFINE([FAKE_CPU],1,[Fake /sys and /proc - for developing])
echo "enabled faked sysfs - proc environment: yes"
else
echo "enabled faked sysfs - proc environment: no"
fi
pkg_modules="dbus-1 >= 0.6, hal >= 0.5.6"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
# get dbus system bus socket
DBUS_SYSTEM_BUS_SOCKET="`pkg-config --variable=system_bus_default_address dbus-1`"
if test -z "$DBUS_SYSTEM_BUS_SOCKET"; then
# use default
DBUS_SYSTEM_BUS_SOCKET="unix:path=/var/run/dbus/system_bus_socket"
fi
AC_DEFINE_UNQUOTED(DBUS_SYSTEM_BUS_SOCKET, ["$DBUS_SYSTEM_BUS_SOCKET"],
[dbus system bus socket path])
#check for PolicyKit version
LIBHAL_POLICYCHECK=no
AC_CHECK_LIB([hal], [libhal_device_is_caller_privileged], [LIBHAL_POLICYCHECK=yes], [LIBHAL_POLICYCHECK=no])
if test "x$LIBHAL_POLICYCHECK" = "xyes"; then
AC_DEFINE([USE_LIBHAL_POLICYCHECK],1,[Set if should use libhal to check policy.])
fi
#check for HAL version >= 0.5.10
if $PKG_CONFIG --atleast-version 0.5.10 hal; then
AC_DEFINE([HAVE_HAL_0_5_10],1,[Set if we use HAL >= 0.5.10])
fi
# check for dbus qt bindings --> copied from KNetworkmanager
safe_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $PACKAGE_CFLAGS $all_includes"
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CHECK_HEADER([dbus/connection.h],,[AC_MSG_ERROR([You need D-BUS/Qt3 bindings])])
AC_CHECK_HEADER([dbus/message.h],,[AC_MSG_ERROR([You need D-BUS/Qt3 bindings])])
CPPFLAGS=$safe_CPPFLAGS
AC_LANG_RESTORE
# call needed substitutions
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)
AC_SUBST(XGETTEXT)

@ -0,0 +1,6 @@
# the SUBDIRS is filled automatically by am_edit. If files are
# in this directory they are installed into the english dir
KDE_LANG = en
KDE_DOCS = AUTO
SUBDIRS = $(AUTODIRS)

@ -0,0 +1,2 @@
KDE_DOCS = kpowersave
KDE_LANG = cs

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,533 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC
"-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN"
"dtd/kdex.dtd"
[
<!ENTITY app "<application>KPowersave</application>">
<!ENTITY apprelease " ">
<!-- chapters in separate docbook files -->
<!-- book related entities -->
<!ENTITY kappname "KPowersave">
<!ENTITY % addindex "INCLUDE">
<!ENTITY % Czech "INCLUDE" > <!-- change language only here -->
]>
<!--
NOTE:
Entries which require special treatment are marked with comments starting with '###'. They should be visited on a regular basis.
-->
<book lang="&language;">
<bookinfo>
<title>Nápověda &app;</title>
<date>2006-03-06</date>
<releaseinfo>&apprelease;</releaseinfo>
<authorgroup>
<author>
<firstname>Danny</firstname>
<surname>Kukawka</surname>
<affiliation>
<address><email>Danny.Kukawka@web.de</email></address>
</affiliation>
</author>
<author>
<firstname>Thomas</firstname>
<surname>Renninger</surname>
<affiliation>
<address><email>trenn@suse.de</email></address>
</affiliation>
</author>
</authorgroup>
<copyright>
<year>2005</year>
<holder>Scott Rhoades</holder>
</copyright>
<!--ROLES_OF_TRANSLATORS-->
<!--<legalnotice>&FDLNotice;</legalnotice>-->
<abstract>
<para>&app; je nástroj pro nastavení správy napájení a šetření energií.</para>
</abstract>
<keywordset>
<keyword>KDE</keyword>
<keyword>KPowersave</keyword>
<keyword>energie</keyword>
<keyword>baterie</keyword>
<keyword>šetření</keyword>
</keywordset>
</bookinfo>
<!-- ====================================================================== -->
<chapter id="introduction">
<chapterinfo>
<keywordset>
<keyword>KPowersave</keyword>
</keywordset>
</chapterinfo>
<title>Úvod</title>
<mediaobject>
<imageobject>
<imagedata fileref="hi48-app-kpowersave.png" format="PNG"/>
</imageobject>
</mediaobject>
<para>KPowersave, KDE uživatelské rozhraní pro powersave, používejte k
řízení správy napájení a sledování stavu baterie vašeho notebooku. Například
můžete nastavit, aby se obrazovka vašeho počítače po určité době nečinnosti
vypnula, čímž prodloužíte běh na baterie.
</para>
<sect1 id="starting">
<title>Spouštění KPowersave</title>
<para>Chcete-li spustit KPowersave, zadejte na příkazové řádce příkaz
<command>kpowersave &amp;</command> nebo zvolte <menuchoice>
<guimenu>Systém</guimenu>
<guimenu>Applety</guimenu>
<guimenu>KPowersave</guimenu>
</menuchoice> z hlavní nabídky GNOME nebo KDE.
KPowersave se otevře v systémové části panelu.</para>
<para>Chcete-li nastavit, zda se má KPowersave spouštět při vašem
přihlášení automaticky, klikněte na <guimenu>Obecná nastavení</guimenu>
a aktivujte či deaktivujte volbu <guimenu>KPowersave se po přihlášení
automaticky spouští</guimenu>. Také nastavte, zda chcete aby se vás
KPowersave ptal na automatické spouštění, pokud ho ručně ukončíte.
</para>
</sect1>
<sect1 id="understandingicon">
<title>Význam ikony KPowersave</title>
<para>
Ikona KPowersave vypadá jako elektrická zástrčka vedle indikátoru stavu
baterie. Ikona informuje o aktuálním stavu baterie a o tom, zda je počítač
právě napájen z baterie nebo ze sítě. Je-li baterie téměř vybitá, pozadí
ikony bliká - oranžově jako upozornění a červeně při nízkém či kritickém
stavu. Pokud nad ikonou chvíli zastavíte ukazatel myši, objeví se
informace o aktuálním typu napájení, stavu nabití baterie a, pokud počítač
běží na baterie, doby do vybití baterií.
</para>
</sect1>
</chapter>
<chapter id="applet">
<title>Nabídka apletu</title>
<sect1 id="selectschemes">
<title>Přepnutí aktivního schématu</title>
<para>
Chcete-li přepnout aktivní schéma, klikněte pravým tlačítkem myši na ikonu
apletu a zvolte <guimenu>Nastavit aktivní schéma</guimenu> a jméno
požadovaného schématu. Pokud schéma takto změníte, týká se změna všech
komponent vašeho počítače. Správa napájení ovlivňuje změny frekvence
procesoru (pokud to váš hardware podporuje), pevný disk, chlazení atd.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="cs_applet_schemes.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>Nabídka KPowersave s položkami pro přepínání schémat</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="yast">
<title>Spouštění YaST modulu pro správu napájeni</title>
<para>
Modul správy napájení programu YaST2 poskytuje řadu možností nastavení pro
šetření energií. Chcete-li modul spustit, klikněte pravým tlačítkem myši
na ikonu KPowersave a zvolte <guimenu>Spustit modul správy napájení programu
YaST2</guimenu>. Podrobné instrukce pro každé nastavení jsou dostupné
přímo v YaSTu.
<mediaobject>
<imageobject>
<imagedata fileref="cs_applet_yast.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>Nabídka KPowersave s položkou pro spuštění YaSTu</phrase>
</textobject>
</mediaobject>
</para>
<note>
<para>
Spuštění YaST modulu pro správu napájeni vyžaduje heslo uživatele root.
</para>
</note>
</sect1>
<sect1 id="suspend">
<title>Uspání systému</title>
<para>
Systém můžete kdykoliv uspat kliknutím pravým tlačítkem myši na ikonu
KPowersave a volbou <guimenu>Uspání na disk</guimenu>,
<guimenu>Uspání do RAM</guimenu> nebo <guimenu>Pohotovostní
režim</guimenu> (pokud je pohotovostní režim počítačem podporován).
</para>
<itemizedlist>
<listitem>
<para>
Uspání na disk uloží před uspáním všechna otevřená data na disk. Jsou
tak ochráněna pro případ odpojení napájení nebo vybití baterie.
</para>
</listitem>
<listitem>
<para>
Uspání do RAM uloží data do paměti RAM, což urychluje pozdější
probuzení počítače.
</para>
</listitem>
<listitem>
<para>
Pohotovostní režim vypne monitor, ale systém jinak ponechá napájený
a data zůstanou v RAM.
</para>
</listitem>
</itemizedlist>
<para>
Dostupné volby závisí na metodách aktivovaných administrátorem v YaSTu
a podporovaných vaším hardware. Vhodnou volbu byste měli volit podle
pravděpodobnosti úplné ztráty napájení počítače.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="cs_applet_suspend.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>Nabídka KPowersave s položkami pro uspání a pohotovostní režim</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="deactivateautossuspend">
<title>Vypnutí automatického uspání</title>
<para>
Pokud je pro právě používané schéma zapnuto automatické uspávání, objeví
se v nabídce KPowersave položka <guimenu>Zakázat akce při
neaktivitě</guimenu>. Její volbou zakážete jakékoliv akce, které se mají
při neaktivitě vykonat, čímž se vypne automatické uspání.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="cs_applet_autosuspend.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>Nabídka KPowersave s volbou "Zakázat akce při neaktivitě"</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="setCPUFreq">
<title>Nastavení politiky frekvence procesoru</title>
<para>
Množství energie spotřebovávané procesorem lze ovládat změnou politiky
frekvence procesoru. Učiníte tak kliknutím pravým tlačítkem myši na ikonu
KPowersave, volbou <guimenu>Nastavit politiku frekvence CPU</guimenu> a
výběrem jedné z dostupných možností:
</para>
<itemizedlist>
<listitem>
<para>
Výkon: stále udržuje vysokou frekvenci procesoru pro maximální výkon.
</para>
</listitem>
<listitem>
<para>
Dynamické: snižuje frekvenci procesoru, pokud není počítač zatížen,
a zvyšuje ji, pokud je potřeba více výkonu.
</para>
</listitem>
<listitem>
<para>
Powersave: udržuje sníženou frekvenci procesoru kvůli
šetření energií.
</para>
</listitem>
</itemizedlist>
<para>
Nastavení politiky frekvence procesoru je v nabídce dostupné, pouze pokud
ho počítač podporuje. Pokud položka v nabídce není, váš počítač nastavení
politiky neumožňuje.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="cs_applet_cpufreq.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>Nabídka KPowersave s podnabídkou nastavení politiky
frekvence procesoru</phrase>
</textobject>
</mediaobject>
</sect1>
</chapter>
<chapter id="conf_powerscheme">
<title>Nastavení schémat správy napájení</title>
<sect1 id="understand_scheme">
<title>Schémata správy napájení</title>
<para>
Schéma obsahuje základní konfiguraci správy napájení používanou při běhu
KPowersave. Množství dostupných schémat závisí na konfiguraci powersave.
Schémata můžete přidávat nebo mazat pomocí modulu správy napájení nástroje
YaST. Mezi běžně používaná schémata patří:
</para>
<itemizedlist>
<listitem>
<para>Výkon: optimalizováno pro maximální výkon během delší práce</para>
</listitem>
<listitem>
<para>Tichý: optimalizováno pro tichý běh počítače</para>
</listitem>
<listitem>
<para>Prezentace: optimalizováno pro hladký průběh prezentací</para>
</listitem>
<listitem>
<para>Powersave: optimalizováno pro šetření energií baterie</para>
</listitem>
</itemizedlist>
<para>Schémata můžete měnit na kartě <guimenu>Nastavení schémat</guimenu>.
Po provedení patřičných úprav klikněte na <guimenu>OK</guimenu>.</para>
<mediaobject>
<imageobject>
<imagedata fileref="cs_configdialog_schemes.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>Dialog KPowersave pro nastavení schémat</phrase>
</textobject>
</mediaobject>
<para>
Schéma určuje:
</para>
<itemizedlist>
<listitem>
<para>
Zda je povolen běh šetřiče obrazovky, není-li počítač používán
</para>
</listitem>
<listitem>
<para>
Kolik času uplyne před uspáním obrazovky, jejím vypnutím
nebo přechodem do pohotovostního režimu
</para>
</listitem>
<listitem>
<para>
Zda je počítač po určité době nečinnosti automaticky uspán
</para>
</listitem>
<listitem>
<para>
Zda počítač při událostech spojených s napájením přehrává zvuky
</para>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="procedure">
<title>Postup nastavení schématu</title>
<para>
Všechny tyto volby šetří energií zákazem běhu energeticky náročných
procesů. Schéma nastavíte následujícím způsobem:
</para>
<sect2 id="procedure_ss">
<title>Šetřič obrazovky</title>
<procedure>
<step>
<para>
Klikněte pravým tlačítkem myši na ikonu KPowersave
v systémové části panelu.
</para>
</step>
<step>
<para>
Zvolte <guimenu>Nastavit KPowersave</guimenu>.
</para>
</step>
<step>
<para>
Pokud není aktivní karta <guimenu>Nastavení schémat</guimenu>,
klikněte na ni.
</para>
</step>
<step>
<para>
Můžete zapnout volbu <guimenu>Povolit zvláštní nastavení šetřiče
obrazovky</guimenu>.
</para>
<substeps>
<step>
<para>
Pokud nechcete, aby šetřič obrazovky spotřebovával energii během doby,
kdy počítač není používán, aktivujte <guimenu>Zakázat šetřič
obrazovky</guimenu>.
</para>
</step>
<step>
<para>
Pokud chcete místo grafického šetřiče pouze smazat obrazovku, aktivujte
<guimenu>Pouze smazat obrazovku</guimenu>. Tato volba není dostupná,
je-li šetřič zakázán.
</para>
</step>
</substeps>
</step>
</procedure>
<mediaobject>
<imageobject>
<imagedata fileref="cs_configdialog_schemes_screen.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>Dialog KPowersave pro nastavení šetřiče obrazovky</phrase>
</textobject>
</mediaobject>
</sect2>
<sect2 id="procedure_spms">
<title>Správa napájení obrazovky</title>
<procedure>
<step>
<para>Chcete-li spravovat spotřebu energie obrazovkou, zaškrtněte
<guimenu>Povolit zvláštní správu napájení obrazovky</guimenu>.</para>
<para>Zvláštní správu napájení obrazovky (DPMS) lze rovněž zakázat
zaškrtnutím <guimenu>Zakázat správu napájení obrazovky</guimenu>.
Tato volba přepisuje nastavení grafického prostředí.</para>
<substeps>
<step><para>Zvolte dobu, která musí uplynout před přechodem obrazovky do
pohotovostního režimu. V pohotovostním režimu je obrazovka prázdná, ale
stále je elektricky napájena. Dosáhne se tak mírné úspory elektrické
energie.</para></step>
<step><para>Zvolte dobu, která musí uplynout před uspáním obrazovky.
Uspaná obrazovka je vypnuta, ale je stále napájena určitým množstvím
energie pro udržení aktuálních informací a nastavení.</para></step>
<step><para>Zvolte dobu, která musí uplynout před úplným přerušením
napájení obrazovky.</para></step>
</substeps></step>
</procedure>
<mediaobject>
<imageobject>
<imagedata fileref="en_configdialog_schemes.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>Dialog KPowersave pro nastavení šetřiče/DPMS obrazovky</phrase>
</textobject>
</mediaobject>
</sect2>
<sect2 id="procedure_autosuspend">
<title>Nastavení automatického uspání</title>
<procedure>
<step><para>Pokud chcete, aby KPowersave automaticky uspal počítač,
není-li aktuální uživatel grafického prostředí po určitou dobu aktivní,
klikněte na <guimenu>Automatické uspání</guimenu> a proveďte potřebná
nastavení.</para>
<para>Pokud například chcete, aby se po 30 minutách nečinnosti počítač
uspal na disk, proveďte příslušná nastavení. Po půlhodině nečinnosti se
všechny soubory a data uloží na disk a počítač se uspí.</para>
</step>
</procedure>
<mediaobject>
<imageobject>
<imagedata fileref="cs_configdialog_schemes_autosuspend.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>Dialog KPowersave pro nastavení automatického uspání</phrase>
</textobject>
</mediaobject>
</sect2>
</sect1>
</chapter>
<chapter id="generalsettings">
<title>Obecná nastavení</title>
<sect1 id="lockscreen">
<title>Uzamčení obrazovky</title>
<para>
Kvůli zvýšení bezpečnosti můžete nastavit uzamykání obrazovky před
přechodem do spánku, pohotovostního režimu nebo před uzavřením víka
notebooku. Obrazovku lze uzamknout pomocí šetřiče obrazovky nebo pomocí
xlock.
</para>
<para>
Pro nastavení uzamykání obrazovky klikněte na kartu
<guimenu>Obecná nastavení</guimenu>.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="en_configdialog_general.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>Dialog KPowersave pro obecná nastavení.</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="autosuspendblacklist">
<title>Vytvoření černé listiny automatického uspání</title>
<para>
KPowersave obsahuje černou listinu automatického uspání. Pokud běží
některá z aplikací na tomto seznamu, je automatické uspání zakázáno.
Například byste si asi nepřáli, aby váš notebook usnul během přehrávání
DVD, jen proto, že jste dlouho nestiskli žádnou klávesu. Listinu můžete
upravit na kartě <guimenu>Obecná nastavení</guimenu> kliknutím na
<guimenu>Upravit obecnou černou listinu</guimenu>. V otevřeném dialogu
přidejte nebo odeberte požadované aplikace.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="en_configdialog_general.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>Dialog KPowersave pro nastavení
černé listiny automatického uspání</phrase>
</textobject>
</mediaobject>
<para>
Můžete také vytvořit černou listinu specifickou pro určité schéma.
Při vytváření takové listiny můžete importovat obecnou černou listinu
nebo vytvořit listinu zcela novou. Černá listina schématu má přednost před
obecnou černou listinou, pokud je dané téma aktivní.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="cs_configdialog_blacklist.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>Dialog KPowersave pro úpravy
černé listiny automatického uspání</phrase>
</textobject>
</mediaobject>
</sect1>
</chapter>
</book>
<!-- Keep this comment at the end of the file
Local variables:
mode: xml
coding: utf-8
sgml-indent-step: 1
End:
-->

@ -0,0 +1,2 @@
KDE_DOCS = kpowersave
KDE_LANG = de

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,610 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC
"-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN"
"dtd/kdex.dtd"
[
<!ENTITY app "<application>KPowersave</application>">
<!ENTITY apprelease " ">
<!-- chapters in separate docbook files -->
<!-- book related entities -->
<!ENTITY kappname "KPowersave">
<!ENTITY % addindex "INCLUDE">
<!ENTITY % German "INCLUDE" > <!-- change language only here -->
]>
<!--
NOTE:
Entries which require special treatment are marked with comments starting with '###'. They should be visited on a regular basis.
-->
<book lang="&language;">
<bookinfo>
<title>&app; Hilfe</title>
<date>2006-04-04</date>
<releaseinfo>&apprelease;</releaseinfo>
<authorgroup>
<author>
<firstname>Danny</firstname>
<surname>Kukawka</surname>
<affiliation>
<address><email>Danny.Kukawka@web.de</email></address>
</affiliation>
</author>
<author>
<firstname>Thomas</firstname>
<surname>Renninger</surname>
<affiliation>
<address><email>trenn@suse.de</email></address>
</affiliation>
</author>
</authorgroup>
<copyright>
<year>2006</year>
<holder>Danny Kukawka</holder>
</copyright>
<!--ROLES_OF_TRANSLATORS-->
<!--<legalnotice>&FDLNotice;</legalnotice>-->
<abstract>
<para>&app; ist ein Program um Energieverbrauchs- und Energiesparoptionen einzustellen.</para>
</abstract>
<keywordset>
<keyword>KDE</keyword>
<keyword>KPowersave</keyword>
<keyword>Energie</keyword>
<keyword>Batterie</keyword>
<keyword>sparen</keyword>
<keyword>ACPI</keyword>
<keyword>Suspend</keyword>
</keywordset>
</bookinfo>
<!-- ====================================================================== -->
<chapter id="introduction">
<chapterinfo>
<keywordset>
<keyword>KPowersave</keyword>
</keywordset>
</chapterinfo>
<title>Einführung</title>
<mediaobject>
<imageobject>
<imagedata fileref="hi48-app-kpowersave.png" format="PNG"/>
</imageobject>
</mediaobject>
<para>
Verwenden Sie KPowersave, das KDE Front-End für powersave, um das Energiemangement
zu verwalten und den Batteriestand Ihres Gerätes anzuzeigen. Sie können
beispielsweise konfigurieren, das der Bildschirm Ihres Laptops abgeschaltet
wird, wenn Sie Ihre Laptop eine bestimmte Zeit nicht benutzen um die
Batterielaufzeit zu verlängern.
</para>
<sect1 id="starting">
<title>KPowersave starten</title>
<para>Um KPowersave zu starten, öffnen Sie eine Shell und geben das Kommando
<command>kpowersave &amp;</command> ein oder wählen <menuchoice><guimenu>
System</guimenu><guimenu>Desktop Applet</guimenu>
<guimenu>KPowersave</guimenu></menuchoice> aus dem KDE oder GNOME Menü aus.
KPowersave wird dann in der Kontrollleiste bzw. im System Tray geöffnet.
</para>
<para>Um einzustellen ob KPowersave beim Anmelden an den Desktop automatisch
gestartet wird klicken Sie im KPowersave Konfigurations Dialog auf
<guimenu>Allgemeine Einstellungen</guimenu> und wählen/abwählen dort die
Ankreuzfeld <guimenu>KPowersave automatisch beim Anmelden starten</guimenu>.
Sie können dort auch einstellen, ob Sie beim Beenden gefragt werden ob
KPowersave das nächste mal automatisch gestartet werden soll.
</para>
</sect1>
<sect1 id="understandingicon">
<title>Das KPowersave Icon/Symbol verstehen</title>
<para>
Das KPowersave Icon sieht aus wie ein Netzstecker neben einer Batterie
Füllstandsanzeige. Das Symbol zeigt den aktuellen Batteriefüllstand an und
ob der Computer sich am Stromnetz oder auf Batterie befindet.
Wenn der Batteriestand niedrig ist beginnt der Hintergrund des Icons zu
blinken - mit organgen Hintergrund für Warnung und rot für Niedrig und
Kritischen Ladezustand. Wenn Sie mit dem Mauszeiger über das Sysmbol fahren,
erscheint ein Tooltip mit Informationen über den Status des AC Adapters,
den Stand der Batterie und wenn der Computer sich nicht am Netzstrom befindet
die verbleibende geschätzte Zeit mit der aktuellen Batterieladung. Wenn die
Batterie geladen wird, finden Sie im Tooltip zudem Informationen wie lange
vorraussichtlich der Ladevorgang bis zum vollständig geladenen Akku andauern
wird.
</para>
</sect1>
</chapter>
<chapter id="applet">
<title>Das Applet Menü</title>
<sect1 id="selectschemes">
<title>Das aktive Schema wechseln</title>
<para>
Um das aktive Schema zu setzen, klicken Sie mit der rechten Maustaste auf
das KPowersave Symbol in der Kontrollleiste und wählen
<guimenu>Setze aktives Schema</guimenu>. Dort wählen Sie dann das gewünschte
Schema aus. Wenn Sie das aktive Schema wechseln werden die Konfigurationen der
verschiedenen Systemkomponenten verändert. Ein Energieschema beinhaltet
Einstellungen für CPU Freqenzverhalten (wenn dies von Ihrem Gerät unterstützt
wird), Throttling, Festplatten, Lüftereinstellungen und beispielsweise
Bildschirmschoner- und Monitoreinstellungen.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="de_applet_schemes.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave Applet mit dem Menü zum Schema wechseln.</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="yast">
<title>Das YaST Power-Management-Modul starten</title>
<para>
Das YaST Power-Management-Modul (zur Zeit nur für SUSE verfügbar) bietet
verschiedene Einstellungsmöglichkeiten um Energie zu sparen. Mit diesem
Modul können Sie Einstellungen ändern, auf die Sie als Bentzer über KPowersave
keinen Einfluss haben. Um das Modul zu starten klicken Sie mit der rechten
Maustaste auf das KPowersave Symbol und wählen <guimenu> YaST2
Power-Management-Modul starten ...</guimenu>
Detailierte Anweisungen für die verschiedenen Einstellungsmöglichkeiten finden
Sie in YaST.
<mediaobject>
<imageobject>
<imagedata fileref="de_applet_yast.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave Applet Menü mit dem YaST Eintrag.</phrase>
</textobject>
</mediaobject>
</para>
<note>
<para>
Zum Starten des YaST Power-Management-Modules benötigen Sie das root Passwort.
</para>
</note>
</sect1>
<sect1 id="suspend">
<title>Suspendieren des Systems</title>
<para>
Sie können das System jederzeit mit Rechtsklick auf das KPowersave
Symbol und das Auswählen von <guimenu>Suspend to Disk</guimenu>,
<guimenu>Suspend to RAM</guimenu>, oder <guimenu>Stand-by</guimenu>
(wenn dies von Ihrem Gerät unterstützt wird) suspendieren bzw. in
den Stand-by Zustand versetzen.
</para>
<itemizedlist>
<listitem>
<para>
Suspend to Disk sichert alle offenen Daten und Prozesse auf die Festplatte
bevor der Computer suspendiert wird. Dadurch werden Ihre Daten geschützt,
wenn Sie den Netzstecker enfernen und die Batterie leer bzw. entfernt wird.
</para>
</listitem>
<listitem>
<para>
Suspend to RAM sichert die Daten in den Hauptspeicher. Dadurch wird das
Aufwecken des Computers schneller als bei Suspend to Disk.
</para>
</listitem>
<listitem>
<para>
Das Verhalten von Stand-by hängt von Ihrem Gerät ab. Üblicherweise wird
der Monitor/ das Display des Gerätes abgeschalten. Die restlichen Geräte
bleiben dabei aktiviert und alle Daten verbleiben im Hauptspeicher (RAM).
</para>
</listitem>
</itemizedlist>
<para>
Die verfügbaren Methoden hängen von den aktivierten Einstellungen in YaST
ab, die der Administrator des Systems vorgenommen hat und von Ihrer
Hardware ab (bsplw. Stand-by). Ihre Wahl der Methode sollte dabei auf dem
aktuellen Batteriestand abgestimmt sein.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="de_applet_suspend.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave Applet mit dem Meüeinträgen für Suspend/Stand-by</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="deactivateautossuspend">
<title>Autosuspend deaktivieren</title>
<para>
Wenn Autosuspend - das automatische Suspendieren, wenn der Benutzer eine
definierte Zeit inaktiv war - für das aktuelle Schema aktiviert ist, erscheint
im KPowersave Applet Menü der Eintrag
<guimenu>Aktionen bei Inaktivität deaktivieren</guimenu>. Wenn Sie diesen
Menüeintrag auswählen, werden alle konfigurierten Aktionen, wie bsplw.
Suspend to Disk, bei Inaktivität des Benutzers verhindert. Dies bedeutet
das Autosuspend abgeschalten wird.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="de_applet_autosuspend.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave Applet Menü mit dem Eintrag "Aktionen bei Inaktivität deaktivieren"</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="setCPUFreq">
<title>CPU Frequenzverhalten einstellen</title>
<para>
Um den Energieverbrauch der CPU zu steuern kann - wenn dies die CPU
Ihres Gerätes unterstützt - das CPU Frequenzverhalten verändert werden. Dazu
öffnen Sie mit einem Rechtsklick auf das KPowersave Symbol das Menü und
wählen den Menüpunkt <guimenu>Setze CPU-Frequenzverhalten</guimenu> und wählen
eine der angebotenen Optionen.
</para>
<itemizedlist>
<listitem>
<para>
Leistung: Setzt die CPU dauerhaft auf die maximale CPU Frequenz
</para>
</listitem>
<listitem>
<para>
Dynamisch: Reduziert die CPU Frequenz wenn das System im Leerlauf ist und
erhöht die CPU Frequenz dynamisch wenn mehr Leistung benötigt wird.
</para>
</listitem>
<listitem>
<para>
Energiesparen: Setzt die CPU dauerhaft auf die niedrigste verfügbare Frequenz.
</para>
</listitem>
</itemizedlist>
<para>
Die Optionen für das CPU-Frequenzverhalten ist im Menü nur verfügbar,
wenn dies von Ihrem Computer unterstützt wird. Wenn diese Optionen nicht
im Menü zu finden sind, wird das Ändern der CPU Frequenz von Ihrem Gerät
nicht unterstützt.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="de_applet_cpufreq.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave Menü mit dem Untermenü'CPU-Frequenzverhalten'</phrase>
</textobject>
</mediaobject>
</sect1>
</chapter>
<chapter id="conf_powerscheme">
<title>Ein Energieverwaltungs Schema konfigurieren</title>
<sect1 id="understand_scheme">
<title>KPowersave Schema verstehen</title>
<para>
Ein Schema beinhaltet die grundlegenenden Energieverwaltungseinstellungen
die von KPowersave auf Ihrem Computer benutzt werden. Die Anzahl der
verfügbaren Schema hängt von Ihrer Powersave Konfiguration ab. Um zusätzliche
Schema hinzuzufügen oder bestehenden Schemes zu löschen - können Sie
das YaST Power-Management-Modul oder den Editor ihrer Wahl benutzen.
Einige der allgemein vorhandenen Schema:
</para>
<itemizedlist>
<listitem>
<para>Leistung: Optimiert auf maximale Leistung</para>
</listitem>
<listitem>
<para>Akustik: Optimiert um den Computer so leise wie möglich laufen zu lassen.</para>
</listitem>
<listitem>
<para>
Präsentation: Für die beste Performance während Präsentationen optimiert. Dies
beinhaltet bsplw. das der Bildschirmschoner und DPMS abgeschalten werden.
</para>
</listitem>
<listitem>
<para>Enegiesparen: Optimiert um die Laufzeit auf Batterie zu verlängern.</para>
</listitem>
</itemizedlist>
<para>Um ein Schem zum konfigurieren auszuwäheln, öffnen Sie den
<guimenu>Schema Einstellungen</guimenu> Reiter, klicken auf das
gewünschte Schema, ändern es nach Ihren Wünschen und klicken auf
<guimenu>OK</guimenu>.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="de_configdialog_schemes.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave Konfigurations Dialog (Schema wählen).</phrase>
</textobject>
</mediaobject>
<para>
Ein Schema verwaltet/kontrolliert:
</para>
<itemizedlist>
<listitem>
<para>
Wann der Bildschirmschoner aktiviert wird, wenn der Computer nicht in
Benutzung ist.
</para>
</listitem>
<listitem>
<para>
Wieviel Zeit vergeht bis der Bildschirm über DPMS Ausgesetzt, in Bereitschaft
versetzt oder Abgeschaltet wird.
</para>
</listitem>
<listitem>
<para>
Wann und ob der Computer automatisch in einen Suspend oder Stand-by versetzt
wird, wenn er eine vorgegebene Zeit nicht benutzt wurde.
</para>
</listitem>
<listitem>
<para>
Ob KPowersave Benachrichtigungen senden soll.
</para>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="procedure">
<title>Schritte um ein Schema zu konfigurieren</title>
<para>
Alle diese Optionen haben das Ziel den Energieverbrauch zu senken, indem
unter anderem versucht wird, Prozesse die viel Energie verbrachen
abzuschalten. Um ein Schema zu konfigurieren tuen Sie das Folgende:
</para>
<sect2 id="procedure_ss">
<title>Bildschirmschoner</title>
<procedure>
<step><para>
Machen Sie einen Rechtsklick auf das KPowersave Applet Symbol in
der Kontrollleiste.
</para></step>
<step><para>
Wählen Sie <guimenu>KPowersave konfigurieren ...</guimenu>.
</para></step>
<step><para>
Wenn der <guimenu>Schema Einstellungen</guimenu> Reiter nicht bereits
ausgewählt ist, klicken Sie auf <guimenu>Schema Einstellungen</guimenu>.
</para></step>
<step><para>
Optional klicken Sie auf <guimenu>Aktiviere spezielle Bildschirmschoner
Einstellungen</guimenu>.
</para>
<substeps>
<step><para>
Wenn Sie den Bildschirmschoner generell deaktivieren wollen um
Energie zu sparen, dann klicken Sie auf <guimenu>Bildschirmschoner
deaktivieren</guimenu>.
</para></step>
<step><para>
Wenn Sie statt einen speziellen Bildschirmschoner zu verwenden nur auf
einen schwarzen Bildschirm schalten wollen dann klicken Sie auf
<guimenu>Nur auf leeren Bildschirm schalten</guimenu>. Damit kann
verhindert werden das beispielsweise CPU belastenden 3D-Bildschirmschoner
gestartet werden. Diese Option ist nicht verfügbar, wenn der
Bildschirmschoner abgeschaltet wurde.
</para></step>
</substeps></step>
</procedure>
</sect2>
<sect2 id="procedure_spms">
<title>Bildschirmenergieverwaltung (DPMS)</title>
<procedure>
<step><para>Um den Energieverbrauch des Bildschirms zu handhaben, klicken Sie
auf <guimenu>Aktiviere spezielle DPMS-Einstellungen</guimenu>.</para>
<para>Die Energieverwaltund des Monitors/LCD (Display Power Management Settings
(DPMS)) können über <guimenu>Deaktiviere Energiesparfunktion des Bildschirms
</guimenu> deaktiviert werden. Diese Einstellung überschreibt die Dektop
Einstellungen wie sie beispielsweise über das KDE Kontrollzentrum vorgenommen
werden können.</para>
<substeps>
<step><para>
Wählen Sie die Zeit, die vergehen soll bis der Bildschirm Ausgesetzt wird.
In diesem Modus wird der Bildschirm auf leer geschaltet, verbraucht aber
weiterhin Energie. Dies stellt die kleinste Stuffe der Energiesparoptionen
für den Bildschirm dar. Nutzen Sie dazu die Einstellungsoptionen unter
<guimenu>Aussetzen nach:</guimenu>.
</para></step>
<step><para>
Wählen Sie die Zeit, die vergehen soll bevor der Bildschirm in Bereitschaft
versetzt werden soll. Im Bereitschaftsmodus wird der Bildschirm abgeschaltet
aber es wird noch Energie verbraucht um die aktuellen Bilddaten vorzuhalten.
Nutzen Sie dazu die Einstellungsoptionen unter
<guimenu>Auf Bereitschaft gehen nach:</guimenu>.
</para></step>
<step><para>
Wählen Sie die gewünschte Zeit, die vergehen soll bis der Bildschirm
vollständig abgeschaltet wird. Dies stellt die maximale Energiesparoption für
Ihren Bildschirm dar. Nutzen Sie dazu die Einstellungsoptionen unter
<guimenu>Ausschalten nach:</guimenu>.
</para></step>
</substeps></step>
</procedure>
<mediaobject>
<imageobject>
<imagedata fileref="de_configdialog_schemes_screen.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave Konfigurationsdialog für Bildschirmschoner und DPMS Einstellungen.</phrase>
</textobject>
</mediaobject>
</sect2>
<sect2 id="procedure_autosuspend">
<title>Autosuspend Einstellungen</title>
<procedure>
<step><para> Klicken Sie auf <guimenu>Autosuspend</guimenu>, wenn Sie
wollen das KPowersave Ihr System automatisch suspendiert, wenn der aktuelle
Desktopbenutzer für eine bestimmte Zeit inaktiv war und benutzen Sie
den folgenden Dialog um die speziellen Einstellungen zu konfigurieren.
Diese Option ist in der Regel nicht vorausgewählt und muss von Ihnen
erst aktiviert und konfiguriert werden.</para>
<para> Wenn Sie beispielsweise wollen, das Ihr System nach 30 Minuten
in den Suspend to Disk versetzt wird, dann wählen Sie die betreffenden
Optionen. Hat der Benutzer 30 Minuten lang keine Eingaben vongenommen -
also die Maus bewegt oder Eingaben über die Tastatur vorgenommen, so wird
automatisch der Computer suspendiert und alle Daten auf die Festplatte
gespeichtert.</para>
</step>
</procedure>
<mediaobject>
<imageobject>
<imagedata fileref="de_configdialog_schemes_autosuspend.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave Konfigurationsdialog für die Autosuspend Einstellungen.</phrase>
</textobject>
</mediaobject>
</sect2>
<sect2 id="procedure_notification">
<title>Benachrichtigungen aktivieren</title>
<procedure>
<step><para>KPowersave blendet verschiedene Benachrichtigungen bei definierten
Ereignissen auf den Desktop. Dies können Nachrichten in Pop-Up Dialogen oder aber auch
das abspielen von Sounddateien sein. Um alle Nachrichten für ein Schema zu deaktivieren
oder aber auch wieder zu aktivieren klicken Sie auf <guimenu>Verschiedenens</guimenu>.
Dort anderen Sie den Status von <guimenu>Benachrichtigungen abschalten</guimenu>
nach Ihren Wünschen.</para>
<para>Sie können verschiedenen definierten Benachrichtigungen über
das KPowersave Applet Menü konfigurieren indem Sie auf
<guimenu>Benachrichtigungen konfigurieren ...</guimenu> klicken. Dort können Sie
beispielsweise festlegen in welcher Form die Nachricht auf dem Desktop angezeigt wird,
ob und welche Sounddatei abgespielt wird und ob beim Eintreffen der Nachricht ein
beliebiger Befehl ausgeführt werden soll.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="de_notification_settings.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave Konfigurationdialog für die Benachrichtigungen.</phrase>
</textobject>
</mediaobject>
</step>
</procedure>
</sect2>
</sect1>
</chapter>
<chapter id="generalsettings">
<title>Allgemeine Einstellungen</title>
<sect1 id="lockscreen">
<title>Bildschirm sperren</title>
<para>
Zur besseren Sicherheit Ihrer Daten, kann KPowersave für Sie den
Bildschirm sperren bevor der Computer supendiert wird oder wenn Sie
den Deckel des Bildschirms schließen. Sie können wählen, ob der
Bildschirm mit der automatisch verfügbaren Methode, mit einem
speziellen Bildschirmschoner (dieser muss aktiv sein) oder mit xlock
gesperrt werden soll. Die angebotenen Optionen können sich dabei von
Desktopumgebung zu Desktopumgebung unterscheiden.
</para>
<para>
Um die gewünschten Einstellungen vorzunehmen klicken Sie auf den Reiter
<guimenu>Allgemeine Einstellungen</guimenu> und wählen dann die entsprechenden
Optionen.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="de_configdialog_general.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave Konfigurationsdialog für Allgemeinen Einstellungen.</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="autosuspendblacklist">
<title>Eine Blacklist für Autosuspend erstellen</title>
<para>
KPowersave bietet eine Blacklist für Autosuspend. Diese Liste verhindert
das automatische suspendieren bei Inaktivität des Benutzers. Ist eines der
in der Liste enhaltenen Programme aktiv, so wird kein Autosuspend
ausgelöst. Sie wollen beispielsweise sicherlich nicht, das während
Sie sich eine DVD anschauen oder eine CD/DVD brennen, das der Computer
nach 10 Minuten suspendiert wird, nur weil Sie in dieser Zeit nicht die
Maus bewegt oder ein Taste gedrückt haben. Um die Blacklist zu bearbeiten
klicken Sie auf den <guimenu>Allgemeine Einstellungen</guimenu> Reiter und
dann auf <guimenu>Allgemeine Blacklist bearbeiten</guimenu>.
Benutzen Sie den <guimenu>Autosuspend Blacklist Editieren</guimenu> Dialog
um ein Programm zur Blacklist zufügen oder zu entfernen.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="de_configdialog_general.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave Konfiguratinsdialog für die Autosuspend Blacklist</phrase>
</textobject>
</mediaobject>
<para>
Sie können auch für jedes Schema eine eigene Blacklist erstellen, die dann
die Allgemeine Liste für dieses Schema überschreibt. Wenn Sie für ein
Schema eine Blacklist erstellen, haben Sie die Möglichkeit die allgeimeine
Liste zu importieren oder mit einer leeren Liste zu beginnen.
use.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="de_configdialog_blacklist.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave Dialog zum bearbeiten einer Blacklist</phrase>
</textobject>
</mediaobject>
</sect1>
</chapter>
</book>
<!-- Keep this comment at the end of the file
Local variables:
mode: xml
coding: utf-8
sgml-indent-step: 1
End:
-->

@ -0,0 +1,25 @@
The directory contains:
- style sheets
- header and footerfiles
- central project informations
for the Doxygen Documentation of KPowersave.
---------------------------------
Filelist:
changelog.dox
enhance.dox
fixed_bugs.dox
main.dox
powersave_msgs.dox
process.dox
footer.html
header.html
styleSheet.css
and this README
--------------------------------

@ -0,0 +1,708 @@
/*!
* \page changelog Changelog
* \section changelist_sec All changes in the package since init
*
* Wed Feb 14 18:26:34 CET 2007 - dkukawka@suse.de
* - released new version 0.7.2:
* - changes (for more see NEWS/Changelog file in the source):
* - extended configure dialog to provide this functionality
* - schemes settings (add new and delete existing (no default) schemes, define a CPU Frequency
* policy for each scheme)
* - general settings (define battery warning levels and actions if a level reached as e.g.
* Suspend to disk/Shutdown or change the display brightness, configure actions for button
events (Power/Lid/Suspend/Sleep buttons), define the default AC and battery schemes)
* - show the power consumtion of the battery in the detailed info dialog
* - umount external media before suspend (need a patch of the KDE media manager) to avoid data
* loss and remount on resume
* - reset the CPU Freq settings on resume to avoid different settings for the CPU governor on
* multicore machines
* - call now SetCPUFreqConsiderNice(), SetCPUFreqPerformance() on dynamic CPU Freq policy (as
* poweruser setting only changeable via config file), and also SetPowerSave() with true on
* battery and false otherwise.
* - support also conservative governor as DYNAMIC fallback
* - fixed brightness handling in the configure dialog if not activated
* - removed accelerator tags from i18n() strings. KDE handle this by itself. Improved config
* GUI to be better accessible via keyboard.
* - code and code documentation cleanups and updates
* - fixed bugs (from bugzilla.novell.com if no other comment):
* - #245081: KPowersave does not set (ondemand) governor on startup
* - #244052: Close lid of a laptop and suspend to ram cause 100% CPU usage
* - #229960: CPUFREQ_DYNAMIC_PERFORMANCE seems to be ignored during boot and scheme change
* - #230686: KPowersave need to be restarted to apply changed DPMS settings
* - #230965: puzzling battery state info
* - #231709: kpowersave-0.7.1-12: comparison with string literal
* - #231184: KPowersave crashes due to uninitalized LibHalContext
* - #229234: KPowersave does not fall back to userspace governor
* - #215262: Suspend to disk with attached usb storage not working
* - #223164: After suspend, second core has performance governor set
* - #223517: Powersave: CPU scheme "dynamic" reduces speed if only nice -19 processes run
* - #223637: kpowersave crashes in first login
* - #225212: KPowersave crash on ThinkPad X60s
* - #221715: Functionality for configuring lid close event etc. missing in KPowersave
* - #223922: System not shuting down on pressing power button
* - updated translations:
* - german: Danny Kukawka
* - danish: Stefan Skotte
* - turkish: S.Çağlar Onur
* - chinese: Zhengpeng Hou
*
* Mon Nov 20 19:17:11 CET 2006 - dkukawka@suse.de
* - released new version 0.7.1:
* - closed bugs: #220271, #220222, #220212, #220553, #167919
* - KPowersave should now basicly provide the same major functions as last stable version of
* KPowersave. For more read NEWS and Changelog.
*
* Mon Nov 6 21:03:53 CET 2006 - dkukawka@suse.de
* - release new version 0.7.0:
* - changes:
* - depends no longer on powersave, use now only DBUS/HAL
* - known issues/bugs:
* - scheme switching does not work (also not on AC events)
* - currently no reaction if battery reach a warning state or is emptry !!!
* - complete brightness support untested
* - lock screen (on lidclose/suspend) untested
*
* Sun Jun 11 17:00:30 CEST 2006 - dkukawka@suse.de
* - released offical update version 0.6.2 with following changes:
* - KPowersave depends now on powersave >= 0.12.18
* - fixed bugs:
* - sf.net #1483392/ SUSE #177792: set changes for autosuspend state via DCOP back to the applet menu,
* added DCOP functions to set the current scheme, the current CPUFreq policy and to open/close the
* detailed dialog.
* - sf.net #1483392/ SUSE #177788,180000: added workaround to fix two bugs in the DPMS- and Screensaver
* extension of X, related to autosuspend and detect user inactivity, which prevent autosuspend within
* the timeout escpecially if the autosuspend timeout is longer than a DPMS timout.
* Problems: DPMS timeouts are abstracted from current idle time, but shouldn't and DPMS timeouts are
* currently additive, but the spec say they should all start together at zero.
* - SUSE #168619: changed errorhandling if HAL, DBUS or the powersave daemon is not running or if the
* user has not the needed rights to access the powersave daemon via DBUS. Added new errormessages
* and translations.
* - SUSE #182515: Changed configure dialog to respect rules for DPMS timeouts (a timeout must be larger
* than the prior state)
* - SUSE #176782: patch from Timo Hoenig <thoenig@suse.de> to allow (if hardware supported and enabled in
* the scheme) change brighness via mousewheel over the applet icon.
* - SUSE (SLED) #183745: fixed detection of SUSE Linux/SLES/SLED and added configure option to force
* SLES/SLED as distro with --enable-suse-sles. Fixed bugzilla link for SLED/SLES.
* - SUSE #184076: fixed wrong command to start dbus daemon in errormessage.
* - added additional check before autosuspend if this was disabled via applet to avoid autosuspend if it
* was temporary disabled by the user
* - added new configure check to detect Ubuntu/Kubuntu
* - changed link to Ubuntu bugzilla to launchpad.net and use now the same link for applet menu entry
* "Report a bug ..." if compiled for Ubuntu/Kubuntu
* - updated default blacklist for autosuspend with gmplayer, kaffeine, xine, mencoder
* - updated translation: cs, de, es, fi, fr, hu, it, km, pl, pt_BR, zh_CN, zh_TW
* - updated (cs) and fixed translation of eventsrc for KNotify
* - fixed and updated code documentation
*
* Mon Apr 24 17:50:44 CEST 2006 - dkukawka@suse.de
* - released official update version 0.6.1 with following changes:
* - fixed bug #168838; event for resumeFromSuspendToDisk displayed twice in knotify dialog (typo and
* translation issue in eventsrc)
* - updated russian translations including desktop files and eventsrc from Anton Farygin <rider@altlinux.com>
*
* Tue Apr 18 15:27:12 CEST 2006 - dkukawka@suse.de
* - released SUSE update version 0.6.1 with following changes:
* - fixed SUSE bug #167296: fixed tooltip and removed unneeded checks for battery related infos. Should fix
* display wrong remaining time on charging with APM
* - fixed SUSE bug #165462: removed utf8 tag from eventsrc which results in "unknown source ..." message in
* knotify dialog
* - fixed detailed dialog for multiprocessor/-core machines without CPUFreq or throttling support and offline
* CPUs/Cores
* - updated transaltions (fi,km,pl)
* - added configure check for dbus-1-qt3-devel headers
*
* Sun Apr 9 20:23:26 CEST 2006 - dkukawka@suse.de
* - rereleased official stable version 0.6 with this changes:
* - fixed bug #164683 (fixed detailed dialog for machines without CPUFreq support and more than one CPU/Core
* and/or throttling)
* - reduced unneeded calls of getCPUNum()
* - added fix from Daniel Gollub to be able to fake CPU info from /proc and /sys for development and QA tests
* - fixed compiler warnings
*
* Tue Apr 4 21:12:37 CEST 2006 - dkukawka@suse.de
* - released official stable version 0.6 with this changes:
* - added german version of the handbook
* - added support for lock screen via gnome-screensaver (only under GNOME)
* - added fake keyevent (shift) after resume if machine was locked before suspend, to show the login dialog
* automatically
* - fixed errorhandling for YaST power management module
* - fixed bug report address in the about dialog (to powersave-users@forge.novell.com)
* - changed timeout for recheck powersave on startup from 10 secs to 20 to avoid annoying messages on
* slow machines or autologin
* - changed address to report bugs if distro is SUSE, which is used via the applet menu, to opensuse.org
* wiki page.
*
* Tue Mar 28 16:44:03 CEST 2006 - dkukawka@suse.de
* - fixed UTF-8 in desktop files
*
* Mon Mar 27 23:19:38 CEST 2006 - dkukawka@suse.de
* - updated to new stable release 0.6.0:
* - changed powersave dependency to stable version >= 0.12.7
* - reduced the size of the package by optimize the size of included png files. The size off all png files
* is now reduced by ~709KByte.
* - fixed processor bar in detailed dialog to set correct for the first call.
* - fixed tooltip for machines which always report charging also if 100% charged and on AC
* - fix notify about autosuspend after resume and a remove no longer needed check from configure
* - translation updates
* - updated README with install/compile and help/bugreport information
* - updated code docu (added planed features/enhancements for 0.7/0.8 tree)
* - updated spec files for packaging
*
* Mon Mar 13 19:45:41 CET 2006 - dkukawka@suse.de
* - updated to new release 0.5.11-rc5:
* - added function to check if the machine is a laptop to allow hide laptop specific widget items if the
* machine is a workstation (in this case: 'Lock screen on Lidclose'-checkbox)
* - changed brightness settings to allow only to change to min defined brightness level. This should avoid
* off the display on schemeswitch e.g. on new pmu brightness interface
* - reworked some parts of the code, cleanup
* - added patch from Holger Macht to allow root always s2ram
* - translation updates
* - replaced TRUE, which is deprecated with QT4, with true
* - code documentation adds, updates and fixes
* - fixed file attributes for several files from SVN
*
* Mon Mar 6 21:46:37 CET 2006 - dkukawka@suse.de
* - updated to new release 0.5.10-rc4:
* - KPowersave depends now on: powersave >= 0.12.2
* - fixed lidclose handling: added call xset to off the backlight of LCD displays and reset DPMS
* settings on lidopen
* - fixed read throttling state for multiprocessor machines (patch from Daniel Gollub <dgollub@suse.de>)
* - fixed display processor infos on multiprocessor/-core machines dislay now values for each
* CPU/core also on non CPUfreq and non-throttling machines
* - fix to display battery infos only if at least min. one battery slot is available
* - translation updates (po files and handbook) from SUSE/Novell translation team and
* Dawid Wróbel <cromo@klej.net>
* - added and updated screenshots for handbook
* - added possible missing icon on non-SUSE distributions
* - autotools releated fixes: better detection of Mandriva, use now pkgconfig from powersave
* for checks and linking, read name/location of dbus system socket from pkgconfig.
* - added rpm-spec file for Mandriva 2006.1
* - pics cleanups (removed no longer files)
*
* Tue Feb 28 11:26:32 CET 2006 - dkukawka@suse.de
* - removed patch from schwab@suse.de on ix86 and x86_64. Note: this patch is not correct/complete and
* unsupported
*
* Mon Feb 27 23:12:59 CET 2006 - dkukawka@suse.de
* - updated to new release 0.5.9-rc3:
* - fixed APM battery and processor info support in the information dialog and the applet tooltip
* (need a fix in powersave)
* - fixed battery state in the info dialog if no battery is available (need a fix in powersave)
* - translation and handbook fixes/updates
*
* Mon Feb 20 21:47:12 CET 2006 - dkukawka@suse.de
* - fixed problem with pidof on Fedora Core 4. Removed path to pidof from call because pidof should be
* in PATH of user env.
*
* Mon Feb 20 18:14:47 CET 2006 - dkukawka@suse.de
* - updated to new release 0.5.8-rc2:
* - removed sound settings from configure dialog and added KNotify support and more events,
* KNotify config dialog is available via applet menu and in the configure dialog
* - added dcop function to open configure dialog
* - fixed path to powersaved in code and translations to be more portable (Michael Biebl)
* - fixed cpu info in the info dialog to display also for machines which only support
* throttling (Daniel Gollub/Danny Kukawka)
* - fixed battery part in the info dialog to have same sized progressbars
* - fixed strings in the code, fixed sting in tooltip if charging (see #146492)
* - removed no longer needed parts from handbook
* - updated translations related to the changes
* - cleanups (code and files)
*
* Mon Feb 13 18:42:45 CET 2006 - dkukawka@suse.de
* - updated to new release 0.5.7-rc1:
* - fixed bugs:
* - fixed again problems write text if CPU Freq Policy not supported
* - autotools releated fixes (Michael Biebl)
* - added brightness support and battery state info to detailed dialog overview
* - updated translations: bg,cs,es,fr,it,ja,pt,nb,pt_BR,zh_CN,zh_TW
* - added translation: km
* - added new handbook: Finnish
*
* Mon Feb 6 18:54:20 CET 2006 - dkukawka@suse.de
* - updated to new release 0.5.6:
* - fixed bugs:
* - detailed dialog:
* - removed connect setProcessor() to signals from powersave because of excessive CPU usage
* - fixed problems write text if CPU Freq Policy not supported
* - cleanups (removed unneeded enum defines and replaced with defines from powersave)
* - fixed autosuspend (replace path to pidof and added error msg if call of pidof fails to be more portable)
* - fixed auto-tools related issues
* - added ifdef'd header for Slackware 10.2
* - added summary battery progress bar if more than one batterybay is available
* - updated translation files (nb,nl,pl,pt,zh_CN) thanks to Dawei Pang (zh_CN) and Dawid Wróbel (pl)
* - added new helpfiles for Czech and Portuguese (not complete translated), removed some pics to reduce
* package size
*
* Mon Jan 30 12:44:43 CET 2006 - dkukawka@suse.de
* - updated to new release 0.5.5:
* - complete reworked detailed dialog, plus:
* - fixed problems with offline CPUs (Daniel Gollub)
* - changed interval for refresh CPU infos to powersave default
* - fixed battery handling
* - added new help menu to the applet with a about dialog and a link to report bugs back to developers
* - Updated language files, finished german translation
* - added new icon for 'Advanced Powersave' scheme
* - fixed scheme related autosuspend page in configure dialog to prevent unneeded resize of the dialog
* - added new dir with spec/build files (currently for SUSE and FC)
* - some cleanups
*
* Sun Jan 29 16:32:22 CET 2006 - aj@suse.de
* - Require dbus-1-qt3-devel for build.
*
* Wed Jan 25 21:44:25 CET 2006 - mls@suse.de
* - converted neededforbuild to BuildRequires
*
* Mon Jan 23 18:11:12 CET 2006 - dkukawka@suse.de
* - updated to new release 0.5.4:
* - added new information dialog to left mouse button with:
* - CPU, Batttery, AC status info (by Daniel Gollub)
* - additional powersave related infos (Danny Kukawka)
* - removed currently CPU Freqency from the applet tooltip (maybe add later CPU releated infos)
*
* Wed Jan 18 21:09:47 CET 2006 - dkukawka@suse.de
* - readded help files to spec file
*
* Tue Jan 17 16:12:21 CET 2006 - dkukawka@suse.de
* - release 0.5.3-3 for sf.net:
* - added capability for brightness to tell powersave daemon that KPowersave do this, patch
* from <hmacht@suse.de>
* - changed scheme 'Aggressive' to 'Advanced' Powersave
* - added default config/settings for 'Advanced Powersave' scheme
*
* Tue Jan 17 00:51:07 CET 2006 - dkukawka@suse.de
* - updated to new release 0.5.3:
* - added set scheme specific brigthness settings to kpowersave and the configuration dialog
* - added patch to fix compiler warning from Daniel Gollub <dgollub@suse.de>
* - updated translation (nl) and code documentation
* - replaced usage of QString::null with QString()
* - added warning if 'Aggressive Powersave' scheme is selected
* - updated version strings
*
* Tue Jan 10 16:40:11 CET 2006 - dkukawka@suse.de
* - updated to new release 0.5.2:
* - updated to new powersave (>= v0.11.2)
* - fixed bug #121965: added new dialog/error message if powersaveis not running, with
* 'Don't show again' checkbox
* - changed handling with not available connection to powersave on startup of KDE (special for autologin)
* - added popup if HAL is not running (and also powersave not available) and kpowersave get no
* battery/AC information
* - changed settings of sounds filedialog to be more portable
* - removed old and not needed qt1/qt2 includes
* - updated help files and added new Norsk and Hungarian help files, added language specific screenshots
* - updated translation files and code documentation
* - code and file cleanups
*
* Wed Dec 21 00:34:53 CET 2005 - ro@suse.de
* - fix build with current powersave
*
* Mon Dec 19 12:00:40 CET 2005 - dmueller@suse.de
* - use dbus-1-qt3
*
* Thu Oct 13 14:59:23 CEST 2005 - dkukawka@suse.de
* - updated to current CVS version:
* - added admin dir to src for easier port to other distributions
* - added ru and fi translation files
* - updated doc, help, readme and changelogs
* - removed unneeded variables for icon names
* - fixes from KDE fixuifiles script
* - several fixes to respect KDE user interface style guide
* - several typo fixes in i18n stings and related fixes in translation files
* - added powersave-libs and powersave-devel to needforbuild and powersave-libs to Requirements
*
* Mon Sep 12 10:34:47 CEST 2005 - dkukawka@suse.de
* - fixed bug #116079: added function to parse for translation in the suspend progress dialog
* - fixed bug #116353: wrong translation in hu.po
* - fixed bug #116438: added missing Polish translation file
* - fixed bug #116439: added updated translations [sv,tr,uk,sk,ru]
* - fixed bug #116440: added missing space [de,fr,it,pt_BR]
* - updated code documentation
*
* Fri Sep 9 14:12:51 CEST 2005 - dkukawka@suse.de
* - fixed and merged german translation
* - fixed ui file for configure dialog: removed direct keyboard accelerators from strings,
* which break all translation files
*
* Fri Sep 9 10:43:28 CEST 2005 - dkukawka@suse.de
* - fixed bug #116079: fixed translation of suspend progress dialog
* - fixed bug #115903: hide scheme menu if not connected to daemon
* - fixed bug #115914: prevent overlay of widgets in the blacklist edit dialog and fix resizeing
* - fixed bug #115584: added new signal to differ between service terminated from powersave
* and dbus. Display error message now only for signa dbus.terminate
* - fixed applet menu: added a new seperator above help menu entry
* - fixed/updated code documentation
* - added new configure option --enable-yast-entry to remove need for build dependency on
* suse-release
* - removed no longer needed need for build dependency on resmgr
*
* Tue Sep 6 22:23:48 CEST 2005 - dkukawka@suse.de
* - fixed bug #78953: added option --force-acpi-check to dektop file and added a new file
* for autostart
* - fixed command line options and information
* - changed version from 0.5.0-RC1 to 0.5.0
*
* Mon Sep 5 22:06:56 CEST 2005 - dkukawka@suse.de
* - fixed makefile fro build
* - changed Requires to new powersave version
*
* Mon Sep 5 15:55:27 CEST 2005 - dkukawka@suse.de
* - fixed bug #95250: added help entry to the applet menu and a help button to the configure dialog
* - removed bo longer needed include
* - updated tranlations
* - tweaked debug messages and removed some debug messages
* - several cleanups
*
* Sat Sep 3 10:49:31 CEST 2005 - aj@suse.de
* - Fix to build with changed powersave interface.
*
* Thu Sep 1 10:54:59 CEST 2005 - dkukawka@suse.de
* - merged DBUS_INTEGRATION branch back to cvs-head and use now for this package
* - fixed and updated code documentation
* - fixed bug #95250, now KPowersave have a online help
* - removed several debug messages
* - fixed redefinition of DBUS_API_SUBJECT_TO_CHANGE
*
* Mon Aug 29 17:36:24 CEST 2005 - dkukawka@suse.de
* - fixed bug #106177: use now scaling_cur_freq
* - fixed activaton of widgets in configure dialog
* - added and changed english helpfile (from srhoades@novell.com)
* - fixes to prevent crash of kpowersave if connection to D-BUS lost
* - fixed bug #113559 for autosuspend after a resume
* - fixed store changes of time for autosuspend in the configure dialog
* - changed configure: detection of distributions and changed to pkg-config to find the
* includes and libs for dbus
* - translation updates
*
* Mon Aug 22 18:55:11 CEST 2005 - dkukawka@suse.de
*
* - fixed bug #105555
* - updated translations
*
* Mon Aug 15 13:27:56 CEST 2005 - dkukawka@suse.de
* - fixed bug #104382 and some memory leaks
* - fixed bugs #104603, #104445 and #104338
* - merged 64bit fix to CVS
* - updated translations: cs, hu, nb, pa, de
* - added new translations: pt
*
* Thu Aug 11 22:06:31 CEST 2005 - seife@suse.de
* - ported to the new DBUS interface, removed old socket code
* - removed dependency on obsolete powersave_daemonlib
*
* Sun Aug 7 10:50:39 CEST 2005 - seife@suse.de
* - fix 64bit build
*
* Sun Aug 7 07:59:53 CEST 2005 - aj@suse.de
* - Add hal libraries to neededforbuild.
*
* Fri Aug 5 13:12:52 CEST 2005 - dkukawa@suse.de
* - ported KPowersave to new powersave dbus structure (hmacht and dkukawka)
* - updated version to 0.4.100, final will be 0.5.0
*
* Wed Jul 20 09:15:10 CEST 2005 - dkukawka@suse.de
* - added dbus and dbus-devel to neededforbuild
* - enhanced the configure dialog to preselect the current scheme within the list of schemes
* - added fix to blacklistedit dialog to display the name of the current scheme or to display
* "General Blacklist" in the dialog.
* - corrected typo of i18n-strings and merged en_US.po changes to the source code
* - updated de.po
* - fixed bug #95279, now the suspend/progress dialog is Qt::WDestructiveClose and kpowersave connect
* to the destroyed() signal of the dialog
* - changed workflow for schemes to enable/disable autosuspend. (added new checkbox and new config key)
* - added misc-icon to configure dialog (scheme part)
* - some documentation updates and code cleanups
*
* Tue Jul 5 11:40:36 CEST 2005 - dkukawka@suse.de
* - added ppc to buildarch
*
* Fri Jun 24 17:34:19 CEST 2005 - dkukawka@suse.de
* - implemented new feature:
* - configurable sound for battery warning states, ac events and autosuspend
* - fixed bug within parsing messages for progress dialog.
* - updated (code-)documentation
* - updated README for compile kpowersave on other distributions
*
* Thu May 26 21:45:58 CEST 2005 - dkukawka@suse.de
* - added new menu entry to disable autosuspend trough applet-menu if autosuspend activated on the current
* scheme, if not the menu-item is not visible
* - fixed bug with initalise import of global blacklist to scheme blacklist. Now the imported blacklist is
* maked as changed.
* - cleaned up and changed size policy related values in the configure dialog
*
* Wed May 25 10:30:12 CEST 2005 - dkukawka@suse.de
* - added suse-release to neededforbuild to detect the correct distribution in autobuild system
*
* Tue May 24 14:40:37 CEST 2005 - dkukawka@suse.de
* - added scheme specific autosuspend blacklist
* - changed and improved config dialog:
* - added autosuspend blacklist edit dialog and button to general settings
* - added enable scheme specific autosuspend blacklist and edit dialog
* - redesigned scheme settings page
* - added icons to schemes in scheme settings page
* - added fix/workaround for bug #85611
* - changed params of autosuspend->start() to QStringList
*
* Fri May 13 03:34:47 CEST 2005 - dkukawka@suse.de
* - implemented blacklist for autosuspend (if a program in the blacklist is detected as running autosuspend
* is stopped)
* - added dcop interface function to stop/start autosuspend
* - updated documentation
*
* Tue May 10 21:38:36 CEST 2005 - dkukawka@suse.de
* - implemented autosuspend (detect userinactivity from X-Server)
*
* Tue May 10 10:36:08 CEST 2005 - dkukawka@suse.de
* - fixed bug #82880
*
* Sun May 8 22:04:13 CEST 2005 - dkukawka@suse.de
* - additional fix for bug #81681
*
* Fri May 6 19:23:47 CEST 2005 - dkukawka@suse.de
* - fixed bug #81681:
* - added a new suspend dialog which is now toplevel
* - added icons to dialog for the related suspend/standby
* - updated documentation
*
* Wed Apr 13 14:18:18 CEST 2005 - dkukawka@suse.de
* - fixed for gcc 4.0 (tested with i386 and ia64)
*
* Mon Mar 21 14:02:59 CET 2005 - dkukawka@suse.de
* - added updated translation file
* - fixed string in en_US
*
* Fri Mar 18 12:31:03 CET 2005 - dkukawka@suse.de
* - fixed bug #73810, now we restart XScreensaver to be shure that the user default settings are set
* - fixed bug #73805 (closed file descriptor leak)
* - updated Changelog and code doc
*
* Thu Mar 17 17:33:06 CET 2005 - dkukawka@suse.de
* - implemented progressbar for powersave suspend
* - removed 'Disable Screensaver' from menu (and also all related functions and variables) because
* this is not needed anymore since the user can change scheme related screensaver settings
* - updated documentation
*
* Wed Mar 16 17:35:17 CET 2005 - dkukawka@suse.de
* - fixed bug #72939, now on quit reset KDE settings
* - fixed setSchemesettings(), now we check for KDE befor reset to KDE settings
* - updated documentation, Changelogs and version strings
*
* Tue Mar 15 19:13:45 CET 2005 - dkukawka@suse.de
* - added new [zh_CN, zh_TW] and updated translation files
* - fixed blocker bug #72846
* - fixed bug within the activation of widgets in the configure dialog
* - fixed text on labels in configure dialog
* - fixed bug in load KDE settings from configfile, to prevent wrong settings if user changed KDE
* settings in KDE Control Center while KPowersave is running
*
* Mon Mar 14 17:13:31 CET 2005 - dkukawka@suse.de
* - updated icon for kmenu (now 16x16 and 32x32 the same)
* - added new [en_US, pa, uk] and updated translation files
* - fixed lable width in configure dialog
* - fixed bug, now kcmdisplayrc is loaded for KDE DPMS settings
*
* Fri Mar 11 11:55:10 CET 2005 - dkukawka@suse.de
* - undo change in QPowersaveClientSocket::connect() depends on undo in last powersave fixes
*
* Thu Mar 10 18:40:37 CET 2005 - dkukawka@suse.de
* - fixed bugs #71955 and #71875 (kpowersave related part and needed adaptations to changed powersave)
* - removed unneeded functions and declarations
* - added errormessages to do_setSpeedPolicy() and lockscreen_on_lidcloseEvent()
*
* Wed Mar 9 18:57:34 CET 2005 - dkukawka@suse.de
* - Fixed bug #71192, changed sequence of enable/disable the widget/items for DPMS settings.
* - added new functions to dcop interface: allowed_sleepingStates()
* and list_schemes()
*
* Mon Mar 7 17:47:33 CET 2005 - dkukawka@suse.de
* - fixed bug #71016
* - added dcop interfaces for lock screen, suspend/standby and to get information about current scheme and CPUFreqPolicy
* - fixed bug: now the configure entry in kpowersave isn't displayed if the powersavedaemon is not running
* - fixed message strings
* - updated documentation
*
* Fri Mar 4 20:33:03 CET 2005 - dkukawka@suse.de
* - Added enterEvent( QEvent * ) eventhandler to reduce polling. Now the tooltip updated only if this event is
* triggered for the kpowersace systray/kicker icon.
*
* Fri Mar 4 14:16:05 CET 2005 - dkukawka@suse.de
* - implemented 'AutostartNeverAsk' to quell the dialog on exit
* - added and implemented configure entry for 'lock screen method'. Now the user can configure which method
* (KScreensaver, XScreensaver, Xlock, or autoselected) used for lock on suspend/standby and lid closed
* - full implementation of powersave client notification, we now need only poll active for information if powersave died
* - different cleanups
* - updated code documentation and additional doc files
*
* Sun Feb 27 23:16:23 CET 2005 - dkukawka@suse.de
* - removed unneeded config values from kpowersaverc
* - implemented all functions to read the general, scheme and KDE settings from the kpowersave/KDE configuration file(s)
* - added functions for 'lock screen' and 'blank only screen'
* - integrated screensaver and lock settings to kpowersave.cpp
*
* Fri Feb 25 14:00:46 CET 2005 - dkukawka@suse.de
* - fixed configure dialog for better look with bigger fonts
* - fix/workaround for the kpowersave related part of bug #66502 on Workstations
* - fixed dialog bug, now the user can open only one configure dialog at the same time
* - changed displayed application name from kpowersave to KPowersave
* - added function to load the general settings in the dialog
* - added 'user-inactivity-actions' to dialog, configfiles and menu. This is atm only 'dummy' and not visible for the user.
* - added autostart options to dialog and a new option to prevent the dialog on exit kpowersave
* - updated the default config file
* - updated strings for translation
*
* Tue Feb 22 10:45:45 CET 2005 - dkukawka@suse.de
* - updated configure dialog
* - changed configure dialog, renamed widgets, integrated schemes and general config section
* - changed call of the configure dialog, now kpowersave not blocked while dialog is open
* - added different slots and logic to disable/enable widgets
* - added load and store the configuration
* - added configoptions and funtions to make 'lock screen' configureable by user
* - added default configfile
* - updated documentation
*
* Mon Feb 21 21:48:09 CET 2005 - trenn@suse.de
* - enable notification popup through daemon
*
* Tue Feb 15 00:34:42 CET 2005 - dkukawka@suse.de
* - update to 0.3.10: added configure dialog to make user specific configuration possible
*
* Sat Jan 22 01:23:15 CET 2005 - ro@suse.de
* - added resmgr to neededforbuild
*
* Mon Jan 17 14:09:08 CET 2005 - dkukawka@suse.de
* - remove some xscreensaver related (unneeded) code in screen.cpp
* - remove some unused variables and function declaration in pdaemon.cpp
* - added full code documentation for doxygen and changed the settings in the Doxyfile
* - fixed bug #49844 user selected 'disable screensaver' prefered if the AC adapter is plugged out
* - fixed bug #49845 now XScreensaver also detected under KDE
* - fixed bug #49632 in po-files (correct a wrong path in translation files)
*
* Tue Dec 21 11:59:15 CET 2004 - dkukawka@suse.de
* - added new cs-translation. File was empty (since SUSE 9.2final) in the cvs-tree (unknown why) Bug #49445
*
* Wed Dec 15 12:45:09 CET 2004 - dkukawka@suse.de
* - added new icons to the applet for stand-by, suspend* and the different schemes
* - modified kpowersave desktop icon
* - changed some code in kpowersave, fixed some little bugs (not reported), removed some unneeded or unreachable code
*
* Mon Dec 13 12:06:08 CET 2004 - dkukawka@suse.de
* - implemented new icons/iconfunctions for better user interaction if the battery is in the different states
* WARNING, LOW, CRITICAL. Now the icon background flashes every second orange [WARNING,LOW] or red [CRITICAL]
* - changed Icons (removed some white pixel)
*
* Sat Dec 11 17:15:19 CET 2004 - dkukawka@suse.de
* - fixed Bug #48202
*
* Tue Oct 12 20:14:54 CEST 2004 - dkukawka@suse.de
* - fix Bugzilla #47113 (hopefully), remove some debug messages, change version
* - fix problem from Bugzilla #46685, now kpowersave check really if scheme is successfully set by powersaved
*
* Mon Oct 4 12:58:04 CEST 2004 - dkukawka@suse.de
* - fixed bug in screensaver menuentry, now only checked on start if screensaver and dpms off or if screensaver off
* and no dpms support by machine -> see: Bugzilla #46728
*
* Sat Oct 2 20:12:40 CEST 2004 - dkukawka@suse.de
* - fixed bug (Bugzilla #46685): now the real scheme names (not i18n
* version) are sent to powersaved
*
* Fri Oct 1 15:42:43 CEST 2004 - dkukawka@suse.de
* - added new an revised translationfiles
* - make a workaround to reduce systemload if powersaved not present and kpowersave need to get systeminformations from /proc/
*
* Wed Sep 29 15:54:35 CEST 2004 - dkukawka@suse.de
* - correct redrawPixmap so that now kpowersave correctly func under GNOME
* - added new translations (jp, sk), added revised translations (bg,cs,es,nb)
*
* Mon Sep 27 23:01:39 CEST 2004 - dkukawka@suse.de
* - added 2 lines in update() were falsely removed by last changes
*
* Mon Sep 27 21:10:45 CEST 2004 - trenn@suse.de
* - correct charging state, when requesting daemon
* - initialise has_DPMS
* - xscreensaver enable/disable support
* - update translations
*
* Wed Sep 22 12:59:10 CEST 2004 - dkukawka@suse.de
* - added screensaver options (disable screensaver and DPMS) to menu
* - do not poll for scheme changes -> only update on right mouse click
*
* Mon Sep 20 19:55:37 CEST 2004 - trenn@suse.de
* - changes from l.lunak@suse.cz to faster start kpowersave through kdeinit
*
* Tue Aug 31 14:11:02 CEST 2004 - trenn@suse.de
* - disk<->ram typo which prevented suspend2ram to be enabled correctly
*
* Mon Aug 23 17:35:54 CEST 2004 - trenn@suse.de
* - renamed suspend/standby to suspend2disk and suspend2ram
* - introduced new sleep state standby
*
* Tue Jun 29 17:55:37 CEST 2004 - trenn@suse.de
* - switch schemes, enable/disable screensaver and dpms proper update functions
*
* Mon May 17 21:22:14 CEST 2004 - trenn@suse.de
* - color of remaining capacity always green when on ac power
* - (Version 0.2.2)
*
* Fri May 14 16:22:03 CEST 2004 - trenn@suse.de
* - modified message: system group is not mentioned in popup any more (#40473)
* - introduced sub-version nr. (Version 0.2.1)
*
* Thu May 6 17:27:46 CEST 2004 - trenn@suse.de
* - added battery charge information to Tooltip fixed fd leak
*
* Thu Apr 29 17:48:40 CEST 2004 - trenn@suse.de
* - added cpufreq speed to Tooltip
* - corrected color when on low level and recharged (was red, should be green)
* - merged diffs after 9.1
*
* Wed Apr 7 15:48:15 CEST 2004 - trenn@suse.de
* - changed Autostart to AutoStart (#38075)
*
* Mon Apr 5 17:12:34 CEST 2004 - seife@suse.de
* - increase AC adapter polling interval to 2.5 seconds
*
* Sat Apr 3 16:39:51 CEST 2004 - coolo@suse.de
* - do not rely on daemon but read AC infos right away
* - cleanly fixing double start
* - disabling suspend/standby menu entries if not available
*
* Fri Apr 2 16:02:49 CEST 2004 - trenn@suse.de
* - avoid double start of kpowersave added italian and russian translation
*
* Wed Mar 31 17:51:14 CEST 2004 - trenn@suse.de
* - delay window that daemon is not running (possible restart of daemon)
* no battery capacity on workstations
*
* Mon Mar 29 18:09:14 CEST 2004 - trenn@suse.de
* - rcpowersave to rcpowersaved
* - open notification window when on low battery and when requesting info from daemon
* - fixed 0:02 mins remaining bug
* - ask user to restart on next login when exiting
*
* Mon Mar 15 17:32:03 CET 2004 - trenn@suse.de
* - added several languages
*
* Thu Mar 11 17:22:09 CET 2004 - trenn@suse.de
* - a lot of little fixes for usability
* - corrections of translators and some translations
*
* Thu Mar 11 17:22:09 CET 2004 - adrian@suse.de
* - fix linking (no non-mt qt needed anymore)
* - fix multiple packaging of files
*
* Tue Mar 9 18:07:00 CET 2004 - ro@suse.de
* - do not use non-mt
*
* Wed Mar 3 17:01:24 CET 2004 - ro@suse.de
* - call correct yast2 module
*
* Wed Feb 25 12:20:07 CET 2004 - trenn@suse.de
* - use bz2 instead of gz archive
*
* Mon Feb 23 18:14:33 CET 2004 - trenn@suse.de
* - corrected .spec -> file inconsistence
*
* Mon Feb 23 17:59:51 CET 2004 - trenn@suse.de
* - cleaned up
*
* Mon Feb 16 14:56:57 CET 2004 - trenn@suse.de
* - initial build
*/

@ -0,0 +1,94 @@
/*!
* \page enhance Enhancements
* \section enhance_sec All planed or to be discussed enhancements/ enhancement requests.
*
* \subsection enhance_device_powermanagemnt Runtime device powermanagement
* \b [Priority: \b M] (for v0.8) \n \n
* Add device/runtime powermanagement to KPowersave and make it scheme specifi configurable via
* the configure dialog. At least allow this for 'Advanced Powersave' scheme. \n \n
* The powersave interface for this feature already exist, now we should allow the user to
* change it. \n \n \n
*
* \subsection enhance_CPUhotplugging CPU Hotplugging
* \b [Priority: \b M] (for v0.8) \n \n
* Add CPU hotplugging to KPowersave. Allow enable/disable CPUs/Cores on multiprocessor/multicore
* machines. We need scheme specific configuration. (translations and needed strings are already
* added to KPowersave) \n \n \n
*
* \subsection enhance_configure_display Display battery and CPU informations in the configure dialog
* \b [Priority: \b I] (for v0.8) \n \n
* It would be really usefull to display all known information about the current state of the machine
* and powersave/KPowersave in a new page in the configure dialog. This enclose CPU, Battery and
* current scheme.\n \n \n
*
* \subsection enh_ControlCenter_plugin Plugin for the KDE Control Center
* \b [Priority: \b D] \n \n
* It would be really usefull and easier/plainer for the user to add the configuredialog also to the
* KDE Control Center. By this we can remove the klaptop-plugin under SUSE from the Control Center by
* default. So the user would be no longer confused through the klaptop plugin, which is obsolete under
* SUSE. \n \n
* We maybe also can move some/all of the powersave YaST-dialog to the dialog. We can use 'Administrator
* Mode' to protect this settings. This would be usefull for other distributions. \n \n \n
*
* \subsection enh_tooltip Tooltip
* \li \b CPU \b Tooltip \b like \b kicker \b mouseover \b effects \n \n
* \b [Priority: \b I] \n \n
* I like the nice mouseover effects on Kicker. Unforunately there is currently no QWidget for this.
* If we would implement this we need to adapt the wifget from amarok/src/tracktooltip.cpp.
*
* \li \b Battery \b estimated \b empty \b at \b xx:yy \b in \b Tooltip \n \n
* \b [Priority: \b I] \n \n
* It would be nice to be to know when (estimated) the battery is empty and not only to know remaining hours.
*
* \li \b Optional \b full \b information \b Tooltip \n \n
* \b [Priority: \b I] \n \n
* We need a optional "amarok-like" Tooltip to display more of the already existing and collected information
* like current scheme, battery state, battery fill state, cpu freq ... and a icon/picture representing the
* current battery state. There should be a option in the configure dialog to switch beetween the normal and
* the enhanced tooltip.
*
* \li \b CPU \b Temperature \b in \b Tooltip \n \n
* \b [Priority: \b D] \n \n
* It would be nice to be able to add the current CPU temperature to the tool tip. We maybe could get this
* information from powersave or we need to poll a configured path in /proc/acpi/* . The user should be
* able to configure if he would like use this new or the normal tooltip. The best would be to read
* the settings by default from the kicker settings and add also an own kpowersave option.
*
* \subsection enh_osd On Screen Display
* \b [Priority: \b F] \n \n
* It would be usefull to have configureable OSD to display permanent or event-based information for
* the user on the display. Possible displayed events:
* \li daemon.scheme.change
* \li acadapter.offline, acadapter.online
* \li battery.normal (full charged ), battery.warning, battery.low, battery.critical
* \li battery.info (displayed as permanent only)
* \li temperature.hot, temperature.critical
* \li processor.performance, processor.powersave, processor.dynamic
* \li cpu freq (displayed as permanent only ) \n \n
*
*
* \n \n
* \section design All to discuss and research design enhancements
*
*
* \n \n \n \n
* \subsection LEGEND LEGEND
* \b Priority:
* \li \b M (Mandatory): \n \n
* The stable release shipment will be dependant on this component being included
* within the release.\n \n
* \li \b I (Important): \n \n
* Adds significant features. Important features are stretch targets for this
* release. Important features will become mandatory in the next release cycle.\n \n
* \li \b D (Desirable): \n \n
* Adds considerable value. Desirable features are targets of opportunity for
* this release. Desirable features may or may not become mandatory features
* over time.\n \n
* \li \b F (Future): \n \n
* This requirement has been deferred to a future release. It is listed for
* informational purposes so that product development may make informed
* architectural choices.\n \n
* \li \b R (Rejected): \n \n
* This requirement was suggested, but rejected as not in harmony with the value
* proposition or positioning of the project. It will never be fulfilled.\n \n
*/

@ -0,0 +1,215 @@
/*!
* \page fixed_bugs Fixed Bugs
*
* You will find the newest bugs at the top of this list. If there is no comment, the bugnumbers are
* from the SUSE/Novell bugzilla (https://bugzilla.novell.com) \n
*
* Note: This list only contain reported and fixed bugs. The list is maybe not up-to-date.
*
* \section fixed_bugs_sec_0_7_x All fixed bugs for the 0.7.x tree
*
* \li Bug \b #245081 - KPowersave does not set (ondemand) governor on startup \n
* \li Bug \b #244052 - Close lid of a laptop and suspend to ram cause KPowersave 100% CPU \n \n
* Needed to uncouple Action calls (as e.g. suspend on lidclose) which include blocking dialogs
* from the related events. This is needed because otherwise the D-Bus QT3 bindings run amok
* if the dialog block the filterfunction, since signals in QT are not really independent
* (they are more function calls). Used QTimer:SingleShot() for this since they go into the
* QT event loop and don't follow the workflow of the rest of the program. \n \n
* \li Bug \b #229960 - CPUFREQ_DYNAMIC_PERFORMANCE seems to be ignored during boot and scheme change \n
* \li Bug \b #230686 - KPowersave need to be restarted to set changed DPMS settings \n
* \li Bug \b #230965 - puzzling battery state info \n
* \li Bug \b #231709 - kpowersave-0.7.1-12: comparison with string literal \n
* \li Bug \b #231184 - KPowersave crashes due to uninitalized LibHalContext \n
* \li Bug \b #229234 - KPowersave does not fall back to userspace governor \n
* \li Bug \b #215262 - Suspend to disk with attached usb storage not working \n \n
* Depending on a KDE feature KPowersave umount all external media before suspend and display
* an error message if the umount fail. This need a special patch for the KDE mediamanager.\n \n
* \li Bug \b #223164 - After suspend, second core has performance governor set \n
* \li Bug \b #223517 - Powersave: CPU scheme "dynamic" reduces speed if only nice -19 processes run \n
* \li Bug \b #223637 - kpowersave crashes in first login \n
* \li Bug \b #225212 - KPowersave crash on ThinkPad X60s \n
* \li Bug \b #221715 - Functionality for configuring lid close event etc. to trigger suspend not in YaST
* any more, but kpowersave doesn't have them either \n \n
* Needed changes in KPowersave to adapt the new powermanagement structur and allow the user
* to configure options we had former in the powersave daemon. This include also changes in
* the configure dialog to provide a way to change settings as user. \n \n
* \li Bug \b #223922 - System not shuting down on pressing power button \n \n
* Changes due to new powermanagement infrastructure. (see also #221715) \n \n
* \li Bug \b #220289 - kpowersave 0.7.0 gives battery level notifications while charging \n
* \li Bug \b #220271 - CPU Frequency Policy setting not possible with kpowersave \n \n
* Changes due to new powermanagement infrastructure. \n \n
* \li Bug \b #220222 - Restarting D-Bus makes KPowersave unusable \n
* \li Bug \b #220212 - KPowersave: Changing brightness does not work reliably \n
* \li Bug \b #220553 - suspend2disk doesn't lock the screen in KDE \n
* \li Bug \b #167919 - DPMS energy settings are ignored / lost in new kde session \n \n
* Added DCOP interface to allow KDE to check if KPowersave set special DPMS settings. \n \n
*
* \section fixed_bugs_sec_0_6_x All fixed bugs for the 0.6.x tree
*
* \li Bug \b #198237 - message: DBUS daemon not running appears (part 1/2) \n \n
* For easier bugreporting and assign of warning messages about powersave/HAL/DBUS state added
* string "KPowersave" to window caption. \n \n
* \li Bug \b #184076 - KPowersave: display wrong command to start dbus daemon in errormessages \n \n
* If the dbus daemon is not running KPowersave popup a errormessage. This message contains the
* command to restart/start dbus. This is the wrong command on SUSE/Debian/Ubuntu and other. \n \n
* \li Bug \b #183745 - KPowersave: open on SLES/SLED the wrong bugzilla site \n \n
* If the user clock on "Report a bug ..." in the kpowersave help menu on SLES/SLED, the wrong bugzilla
* website is used. Instead of opensuse.org we should open bugzilla.novell.com. \n \n
* \b Fix-comment: Added new configure option (--enable-suse-sles) to force SLES/SLED as detected
* distribution and changed detection if SUSE Linux to detect SLES/SLED. Changed
* the bugzilla site for the SUSE Enterprise products. (NOTE: the bug isn't public) \n \n
* \li Bug \b #176782 - KPowersave: Changing display brightness is to long winded \n \n
* If you like to change the display brightness with KPowersave (temporary), you have to perform five
* clicks, going through all the menus and the configuration dialog settings until reaching the
* brightness settings [...]. \n \n
* \b Fix-comment: Added slightly adopted patch from Timo Hoenig <thoenig@suse.de> to allow change
* brightness if supported by hardware and enabled in the scheme via mouse wheel. \n \n
* \li Bug \b #182515 - KPowersave: configure dialog allow set invalid dpms settings\n \n
* The KPowersave config dialog allow to not valid DPMS setting, wich result in not set DPMS timeouts.
* KPowersave does not follow the rules for the X-Server from www.xfree86.org/current/DPMSLib.pdf. \n \n
* \li Bug \b #168619 - Access to devices from remote session. \n \n
* If you start a remote desktop session, e.g. via VNC, KPowersave display "Powersave is not running ..."
* message also if the powersave daemon is running, but the remote user has not the rights to
* access the DBUS interface of powersave. \n \n
* \b Fix-comment: Reworked detection if DBUS, HAL and powersave is not running and if the user has the
* needed rights. Added new error messages and translations. \n \n
* \li Bug \b #177792 - KPowersave: changes via dcop are not set to applet menu, some dcop functions missing \n \n
* If autosuspend is disabled via the DCOP interface, the change is not set back to the
* applet menu (enable applet entry). There is already a dcop function to get current scheme and
* CPUFreq policy, but there is no function to change them.\n \n
* \b Fix-comment: fixed disableAutosuspend(), added missing functions. This bug partly effect
* sf.net bug #1483392. \n \n
* \li Bug \b #177788 - KPowersave: autosuspend does not suspend after set time if dpms is on
* (also: (partial) sf.net bug #1483392) \n \n
* If the timeout for autosuspend is longer than a timeout for a dpms state (standb/suspend/off)
* KPowersave suspend first if the user was as long as timout for current dpms state plus timout
* for autosuspend was idle. If dpms state changed befor reached autosuspend timout all start
* again from zero. The problem is: idleTime from XScreenSaver extension does not give (as descriped
* in the code comment in the header) the complete user idle time but minus the timeout for the current
* dpms state. \n \n
* \b Fix-comment: Added a function to workaround this. This was also effected by \b bug \b #180000 (dpms
* timeouts are additive, but they shouldn't) \n \n
* \li Bug \b #168838 - KPowersave: event for resumeFromSuspendToDisk displayed twice in knotify dialog \n \n
* Fixed typo for resumeFromSuspendToRAM and corrected translations. \n \n
* \li Bug \b #167296 - KPowersave: always show the last known remaining time in tooltip on APM if charge \n \n
* Remove no longer needed (useless) checks from pdaemon. With this the time is set to -1 if charging and
* if the powersave daemon reports UNKNOW for remaining time. \n \n
* \li Bug \b #165462 - kpowersave: knotify messages have a strange source \n \n
* Fixed bad UTF in eventsrc from translation. \n \n
*
*
* \section fixed_bugs_sec_old All fixed bugs since kpowersave-0.3.9-1 release until v0.6.0
*
* \li Bug \b #134683 - KPowersave: Disables CPUs show as "Processor 2: 100% 734017 MHz" \n \n
* Fixed update processor info on machines with more than one CPU/Core and/or no CPUFreq support.
* Check now every two seconds for updates/changes in /sys and /proc. \n \n
* \li Bug \b #121965 - KPowersave should not complain about missing powersaved \n \n
Added new errormessage with checkbox to disable the message. \n \n
* \li Bug \b #116440 - KPowersave: missing space in minute field in several languages [de,fr,it,pt_BR] \n
* \li Bug \b #116439 - KPowersave: not update translation files [sv, tr, uk, sk, ru] \n
* \li Bug \b #116438 - KPowersave: missing Polish translation file \n
* \li Bug \b #116353 - KPowersave: ooopps, my desktop comp is "Charging" [KDE; Hungarian]. \n
* \li Bug \b #116079 - KPowersave: missing translation in the suspend progress dialog \n \n
* If machine suspend KPowersave display a suspend progress dialog. The messages in the dialog are
* not translated, also if there are translations in the po files. \n
* Fix: The related messages come from powersave scripts and only start with the translated strings
* from the po files. Added function to parse and replace them against translated messages. \n \n
* \li Bug \b #116079 - KPowersave: missing translation in the suspend progress dialog \n
* \li Bug \b #115903 - KPowersave: menu entry "set active scheme" visible if powersave is stopped \n
* \li Bug \b #115914 - KPowersave: problems with edit blacklist dialog with bigger fonts \n \n
* The dialog for edit blacklist is not correct resized for bigger fonts. There are also some overlays
* of some widgets in the dialog. \n \n
* \li Bug \b #115584 - KPowersave displays warning twice when powersave shuts down \n
* \li Bug \b #78953 - KPowersave: does not start at all (beta1, NLD9)\n \n
* Added new option --force-acpi-check to dektop file and added a new file for autostart, to force
* start and recheck for acpi on a machine where acpi ckeck failed at the first time. \n \n
* \li Bug \b #95250 - KPowersave has no online help. \n
* \li Bug \b #106177 - KPowersave: Show again the cpuinfo_cur_freq in tooltip. \n \n
* KPowersave currently does not display the cpu freqency in the tooltip. \n \n
* \li Bug \b #113559 - KPowersave: only one autosuspend. \n \n
* KPowersave make only one autosuspend. After resume you must restart KPowersave for the next autosuspend. \n \n
* \li Bug \b #105555 - KPowersave: Patch against ugly disabled icons. \n \n
* Attached patch is against ugly (=all grey) icons on disabled buttons within KPowerSave dialogs. \n \n
* \li Bug \b #104382 - SIGSEGV in KPowersave. \n \n
* When starting YaST Powermanagement module from the context menu of KPowersave's tray, the application exits
* with a SEGV. (fixed also some file descriptor leaks) \n \n
* \li Bug \b #104603 - kpowersave says "Battery is chargin" - even if I run on battery. \n
* \li Bug \b #104445 - kpowersave: Suspend only possible if power is connected. \n \n
* As long as power is connected, could suspend via kpowersave but as soon as plug oput the cable, the menu
* entries are greyed out. \n \n
* \li Bug \b #95279 - kpowersave progress bar popup does not handle "close" event. \n \n
* If the progressbar popup does not get closed by a "101%"-event, it does never
* close. If you close it via the window manager, kpowersave never opens a popup again.
* Fix: Now the suspend/progress dialog is Qt::WDestructiveClose and KPowersave connect to the
* destroyed() signal of the dialog \n \n
* \li Bug \b #82880 - KDE: KMessageBox::error not on top since KDE 3.4 \n \n
* All KPowersave error messages are not on the top, and popup in the background. \n \n
* \li Bug \b #81681 - kpowersave: progress shown below active window \n \n
* If you suspend with powersave (e.g. powersave -U or Fn-keys) the suspend dialog is not on top level. \n \n
* \li Bug \b #73805 - KPowersave files descriptor leak \n \n
* Bug in kpowersave: If kpowersave can't access /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed the
* open filedescriptor is never closed. \n \n
* And: The update_info_cpufreq_speed_changed isn't set in all cases of the function. So could it happen that
* kpowersave display wrong CPU Freq. \n \n
* \li Bug \b #73810 - KPowersave ignore screensaver/dpms settings under gnome/xscreensaver \n \n
* If you use GNOME and have a scheme setting where 'Enable specific screensaver settings' or 'Enable specific
* display power management' is not enabled and you change from a scheme where it is, the settings are ignored
* and not set back to user default. Same Problem on exit (selected by the user): kpowersave don't set
* back to usersettings. \n \n
* \li Bug \b #72939 - kpowersave should set the KDE screensaver and dpms settings back if quit \n \n
* At the moment KPowersave don't set the KDE screensaver and dpms settings back on exit if changed trough
* the scheme settings. This should be fixed. I think its enough to reset the settings in _quit() and not in
* the destructor, because them need only to reset if the user exit kpowersave and not if the user logoff from
* KDE. \n \n
* \b Comment: Problem also: kpowersave try to set KDE settings if scheme changed also if KDE isn't runnig
* (e.g. GNOME). \n \n
* \li Bug \b #72846 - passive-popups are not sufficient for kpowersave \n \n
* Almost everything that is signalled through kpowersave popups now is important, so passive popups that
* disappear after a short time are nut sufficient for this task. \n \n
* \b FIX-Comment: Now the user can choose between KPassivPopup and KMessageBox be change configure variable
* in kpowersaverc by hand. Default is KBessageBox. \n \n
* \li Bug \b #71955 - not set the schemesettings if user changed them via configure dialog \n \n
* If the user change the scheme or/and general settings of kpowersave trough the configure dialog kpowersave
* set this settings first if there is a scheme change. \n \n
* \li Bug \b #71192 - wrong enabled items in configure dialog if DPMS diabled \n \n
* If you disable in the kpowersave configure dialog DPMS, all work correct and the textlabel and spinboxes
* for the DPMS settings get disabled. But if you change a scheme or restart the configure dialog them are
* enabled also if DPMS is diabled. \n \n
* \li Bug \b #71016 - kpowersave never update the menu if powersaved not running on start \n \n
* If you start kpowersave (v0.3.10-6) without a running powersaved the user get no warning message. If you
* start powersaved later kpowersave don't register that and never update the menu. \n \n
* \li Bug \b #66662 - kde screensaver disable problem \n \n
* Kpowersave overwrite the settings of the KDE Controlcenter. If the user select there 'disable screensaver'
* kpowersave ignore this settings on start or if a scheme is changed depending on the global settings of
* powersave. The screensaver settings should be configurable by the user and should not depending on 'root'
* settings. \n \n
* For more informations about the solution take a look at the \ref changelog . \n \n
* \li Bugs \b #66502 and \b #66652 - kpowersave icon shows empty batteries on non-laptop \n \n
* " ... The tools panel in kde contains a kpowersave icon. For my workstation, which is
* definitly to heavy to be a laptop, it shows empty batteries, next to a mains
* connector. The connector is fine, but the batteries symbol should not be there. ..." \n \n
* \b Comment: Also a problem with the tooltip. The problem: powersave have the right status of AC-Adapter
* within powersave (tested on commandline) but send a wrong value to the clients/over the libary. \n \n
*
* From now we use bugnumbers from the Novell Bugzilla, since the SuSE Bugzilla is moved and merged to the
* Novell Bugzilla.
*
* \li Bugzilla \b #49845 - xscreensaver under KDE ignored [from screen.cpp] \n \n
* If we use Xscreensaver under KDE we don't get any information about this.
* The Problem is the function \ref screen::checkScreenSaverStatus() . We don't check
* for the XScreensaver, because we jump out of the KScreensaver-block. \n \n
* \li Bugzilla \b #49844 - 'disable screensaver' - 'overwritten' by scheme if AC removed [from kpowersave.cpp] \n \n
* Interaction between mplayer and kpowersave if AC removed during the enterprise.
* This is the same problem, if 'disable screensaver' in the menu is activated and AC removed
* or powersave change the scheme to 'powersave'. It's better to ignore the 'AC off' for the
* screensaver if user set 'disable screensaver'. \n \n
* \li Bugzilla \b #49632 - wrong path in message if powersaved not running [from kpowersave.cpp] \n \n
* There is an error in the message, which pop-up if powersave is stopped: \n
* "The powersave daemon is not running. Starting it will improve performance: /usr/sbin/rcpowersave
* start". \n This is the wrong path. It must mean: /usr/sbin/rcpowersaved . Must be fix in the code and
* the translation-files. \n \n
* \li Bugzilla \b #49445 - kpowersave: empty cs-translation-file \n \n
* The czech translation don't work (no translation, kpowersave only with english text) because of empty
* cs.po-file in the source. The file is empty in the cvs-tree since SUSE 9.2 final, the reason is unknown. \n \n
*
*/

@ -0,0 +1,4 @@
<hr size="1"><address style="align: right;"><small>
Erzeugt am $datetime für $projectname von&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> $doxygenversion</small></address>
</body>
</html>

@ -0,0 +1,5 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>$title</title>
<link href="$relpath$doxygen.css" rel="stylesheet" type="text/css">
</head><body>

@ -0,0 +1,75 @@
/*!
\mainpage KPowersave - a KDE Kickerapplet/fontend for Powermanagement
\section intro_sec Introduction
KPowersave provides battery monitoring and suspend/standby triggers.
It is based on HAL and D-Bus and therefore supports APM, ACPI and PMU.
Together with the powersave package (to provide powermanagement if KPowersave
is not running) and the YaST Powermanagement module it is the preferred package
that should be used for battery monitoring and control of power management
related tasks.
KPowersave is currently, as we know, available/running for/on these distributions:
\li SUSE Linux: defaultly on distribution
- openSUSE 10.2: from the available releases and via sourceforge
- SUSE 10.1/SLED10: from the available releases and updates (for KPowersave 0.6.x)
- SUSE 10.0: from
<a href="http://sourceforge.net/project/showfiles.php?group_id=124576&package_id=162439">sourceforge.net</a>
- SUSE 9.3 and 9.2: last available version 0.4.5 from:
<a href="http://sourceforge.net/project/showfiles.php?group_id=124576&package_id=141008">sourceforge.net</a>
\li Debian: available in unstable and testing tree via 'apt-get install kpowersave'
\li Ubuntu/Kubuntu:
- for Dapper Drake from universe repository
- for 'Breezy Badger' from
<a href="http://www.teco.edu/~biebl/ubuntu">http://www.teco.edu/~biebl/ubuntu</a> (Thanks to Michael Biebl)
\li Fedora Core 4 and 5: from
<a href="http://sourceforge.net/project/showfiles.php?group_id=124576&package_id=162439">sourceforge.net</a>
\li Mandriva 2006.1: from
<a href="http://sourceforge.net/project/showfiles.php?group_id=124576&package_id=162439">sourceforge.net</a>
\li ALT Linux: KPowersave v0.4.5 defaultly on distribution
\li Pardus: KPowersave default on the distribution
\li Gentoo, Slackware and other: <a href="http://www.kde-apps.org/content/show.php?content=29295">www.kde-apps.org</a>
\section using_sec Using kpowersave
This Applet work under <a href="http://www.kde.org">KDE</a> (and also <a href="http://www.gnome.org">GNOME</a>).
To use kpowersave, you need the following programms/packages:
- linux kernel 2.6.x (<a href="http://www.kernel.org">Homepage</a>)
- HAL (Hardware Abstraction Layer) >= 0.5.8.1 (<a href="http://www.freedesktop.org/Software/hal">Homepage</a>)
- D-Bus >= >= 0.6.x (recommended >= 0.9.x) (<a href="http://www.freedesktop.org/Software/dbus">Homepage</a>)
Dependig on some features you maybe need also:
- PolicyKit (<a href="http://gitweb.freedesktop.org/?p=PolicyKit.git;a=summary">git repository</a>)
You can maybe find more information in the README file in the base dir of the project.
\section contact_sec Contact
You can contact us via the project website(s), Mailinglists and for bugs also via several bugzilla
systems:
\subsection contact_web_sec Websites
\li <a href="http://freshmeat.net/projects/kpowersave">KPowersave@freshmeat.net</a>
\li <a href="http://www.kde-apps.org/content/show.php?content=29295">KPowersave@kde-apps.org</a>
\li <a href="http://sourceforge.net/projects/powersave">Powersave@sourceforge.net</a>
\li <a href="http://developer.novell.com/wiki/index.php/Powersave">Powersave@forge.novell.com</a>
\subsection contact_ML_sec Mailing Lists
\li <a href="http://forge.novell.com/mailman/listinfo/powersave-users">powersave-users@forge.novell.com</a>
\li <a href="http://forge.novell.com/mailman/listinfo/powersave-devel">powersave-devel@forge.novell.com</a>
\subsection contact_Bugzilla_sec Report Bugs
Websites:
\li <a href="http://en.opensuse.org/Report_a_Bug">SUSE Linux / openSUSE</a>
\li <a href="https://bugzilla.novell.com/">SLED/SLES</a>
\li <a href="http://www.debian.org/Bugs/">Debian</a>
\li <a href="https://launchpad.net/distros/ubuntu/+bugs">(K)Ubuntu</a>
\li <a href="http://sourceforge.net/tracker/?group_id=124576&atid=700009">Mandriva</a>
\li <a href="http://sourceforge.net/tracker/?group_id=124576&atid=700009">RedHat/Fedora</a>
\li <a href="http://bugzilla.altlinux.org/">ALT Linux</a>
\li <a href="http://bugs.pardus.org.tr/">Pardus</a>
You can also report Bugs to the powersave-users mailing list:
\li <a href="http://forge.novell.com/mailman/listinfo/powersave-users">powersave-users@forge.novell.com</a>
*/

@ -0,0 +1,51 @@
/*!
* \page process In process
* \section process_sec All features/enhancements in the current development.
*
* \subsection process_dim_onInactive Dimm the display if the user is inactive
* \b [Priority: \b I] \n \n
* A new nice feature would be if we could dimm the display if the user is inactive. This
* should save batterypower and would be a eyecandy feature. The implementation would base on
* the existing brightness and autosuspend code.
*
* \b Status: [\b 15%]
* \li added strings for this feature to the code, translated strings
* \li splitted the current autosuspend code to a new class inactivity for reuse
*
* \b Todo:
* \li add widgets and releated code to write/read in settings and config dialog
* \li integrate in KPowersave use case
* \li testing
* \n \n \n
*
* \subsection process_gnome_screensaver Runtime device powermanagement
* \b [Priority: \b D] (for v0.7 tree) \n \n
* Since gnomescreen-saver is default under GNOME on our products and no longer XScreenSaver, KPowersave
* should support this in a running GNOME session. Do this for a better GNOME default support.
*
* \b Status: [\b 40%]
* \li added detecttion of gnomescreen-saver in \class screen
* \li added gnome-screensaver to configure dialog in GNOME sessions
* \li added support lock screen with gnome screensaver via gnome-screensaver-command
*
* \b Todo:
* \li evaluate if KPowersave should support more settings in gnome-screensaver
* \li add support for enable/disable screensaver (via DBUS interface?)
* \li add support for set time values
* \n \n \n
*
* \subsection process_help Online-Help / user guide
* \b [Priority: \b I] \n \n
* Since the funtionality of KPowersave is grown, we need a user guide and a help-feature for better
* help for the users. \n \n
*
* \b Status: [\b 75%]
* \li Added english version of online help
* \li reformated and added screenshots
* \li added help button to kpowersave and the configure dialog
*
* \b To \b do:
* \li translate to other languages (min. german version)
* \n \n \n
*
*/

@ -0,0 +1,271 @@
BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
font-family: Geneva, Arial, Helvetica, sans-serif;
}
H1 {
text-align: center;
}
CAPTION { font-weight: bold }
DIV.qindex {
width: 100%;
background-color: #eeeeff;
border: 1px solid #b0b0b0;
text-align: center;
margin: 2px;
padding: 2px;
line-height: 140%;
}
DIV.nav {
width: 100%;
background-color: #eeeeff;
border: 1px solid #b0b0b0;
text-align: center;
margin: 2px;
padding: 2px;
line-height: 140%;
}
A.qindex {
text-decoration: none;
font-weight: bold;
color: #1A419D;
}
A.qindex:visited {
text-decoration: none;
font-weight: bold;
color: #1A419D
}
A.qindex:hover {
text-decoration: none;
background-color: #ddddff;
}
A.qindexHL {
text-decoration: none;
font-weight: bold;
background-color: #6666cc;
color: #ffffff;
border: 1px double #9295C2;
}
A.qindexHL:hover {
text-decoration: none;
background-color: #6666cc;
color: #ffffff;
}
A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
A.el { text-decoration: none; font-weight: bold }
A.elRef { font-weight: bold }
A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}
A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
A.codeRef:link { font-weight: normal; color: #0000FF}
A.codeRef:visited { font-weight: normal; color: #0000FF}
A:hover { text-decoration: none; background-color: #f2f2ff }
DL.el { margin-left: -1cm }
.fragment {
font-family: monospace
}
PRE.fragment {
border: 1px solid #CCCCCC;
background-color: #f5f5f5;
margin-top: 4px;
margin-bottom: 4px;
margin-left: 2px;
margin-right: 8px;
padding-left: 6px;
padding-right: 6px;
padding-top: 4px;
padding-bottom: 4px;
}
DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
TD.md { background-color: #F4F4FB; font-weight: bold; }
TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
DIV.groupHeader {
margin-left: 16px;
margin-top: 12px;
margin-bottom: 6px;
font-weight: bold;
}
DIV.groupText { margin-left: 16px; font-style: italic; font-size: 14px }
BODY {
background: white;
color: black;
margin-right: 20px;
margin-left: 20px;
}
TD.indexkey {
background-color: #eeeeff;
font-weight: bold;
padding-right : 10px;
padding-top : 2px;
padding-left : 10px;
padding-bottom : 2px;
margin-left : 0px;
margin-right : 0px;
margin-top : 2px;
margin-bottom : 2px;
border: 1px solid #CCCCCC;
}
TD.indexvalue {
background-color: #eeeeff;
font-style: italic;
padding-right : 10px;
padding-top : 2px;
padding-left : 10px;
padding-bottom : 2px;
margin-left : 0px;
margin-right : 0px;
margin-top : 2px;
margin-bottom : 2px;
border: 1px solid #CCCCCC;
}
TR.memlist {
background-color: #f0f0f0;
}
P.formulaDsp { text-align: center; }
IMG.formulaDsp { }
IMG.formulaInl { vertical-align: middle; }
SPAN.keyword { color: #008000 }
SPAN.keywordtype { color: #604020 }
SPAN.keywordflow { color: #e08000 }
SPAN.comment { color: #800000 }
SPAN.preprocessor { color: #806020 }
SPAN.stringliteral { color: #002080 }
SPAN.charliteral { color: #008080 }
.mdTable {
border: 1px solid #868686;
background-color: #F4F4FB;
}
.mdRow {
padding: 8px 10px;
}
.mdescLeft {
padding: 0px 8px 4px 8px;
font-size: 12px;
font-style: italic;
background-color: #FAFAFA;
border-top: 1px none #E0E0E0;
border-right: 1px none #E0E0E0;
border-bottom: 1px none #E0E0E0;
border-left: 1px none #E0E0E0;
margin: 0px;
}
.mdescRight {
padding: 0px 8px 4px 8px;
font-size: 12px;
font-style: italic;
background-color: #FAFAFA;
border-top: 1px none #E0E0E0;
border-right: 1px none #E0E0E0;
border-bottom: 1px none #E0E0E0;
border-left: 1px none #E0E0E0;
margin: 0px;
}
.memItemLeft {
padding: 1px 0px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 12px;
}
.memItemRight {
padding: 1px 8px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 13px;
}
.memTemplItemLeft {
padding: 1px 0px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 12px;
}
.memTemplItemRight {
padding: 1px 8px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
background-color: #FAFAFA;
font-size: 13px;
}
.memTemplParams {
padding: 1px 0px 0px 8px;
margin: 4px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #E0E0E0;
border-right-color: #E0E0E0;
border-bottom-color: #E0E0E0;
border-left-color: #E0E0E0;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
color: #606060;
background-color: #FAFAFA;
font-size: 12px;
}
.search { color: #003399;
font-weight: bold;
}
FORM.search {
margin-bottom: 0px;
margin-top: 0px;
}
INPUT.search { font-size: 75%;
color: #000080;
font-weight: normal;
background-color: #eeeeff;
}
TD.tiny { font-size: 75%;
}
a {
color: #252E78;
}
a:visited {
color: #3D2185;
}

@ -0,0 +1,2 @@
KDE_DOCS = kpowersave
KDE_LANG = en

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,530 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC
"-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN"
"dtd/kdex.dtd"
[
<!ENTITY app "<application>KPowersave</application>">
<!ENTITY apprelease " ">
<!-- chapters in separate docbook files -->
<!-- book related entities -->
<!ENTITY kappname "KPowersave">
<!ENTITY % addindex "INCLUDE">
<!ENTITY % English "INCLUDE" > <!-- change language only here -->
]>
<!--
NOTE:
Entries which require special treatment are marked with comments starting with '###'. They should be visited on a regular basis.
-->
<book lang="&language;">
<bookinfo>
<title>&app; Help</title>
<date>2006-03-06</date>
<releaseinfo>&apprelease;</releaseinfo>
<authorgroup>
<author>
<firstname>Danny</firstname>
<surname>Kukawka</surname>
<affiliation>
<address><email>Danny.Kukawka@web.de</email></address>
</affiliation>
</author>
<author>
<firstname>Thomas</firstname>
<surname>Renninger</surname>
<affiliation>
<address><email>trenn@suse.de</email></address>
</affiliation>
</author>
</authorgroup>
<copyright>
<year>2005</year>
<holder>Scott Rhoades</holder>
</copyright>
<!--ROLES_OF_TRANSLATORS-->
<!--<legalnotice>&FDLNotice;</legalnotice>-->
<abstract>
<para>&app; is a utility used to set power consumption and conservation
options.</para>
</abstract>
<keywordset>
<keyword>KDE</keyword>
<keyword>KPowersave</keyword>
<keyword>power</keyword>
<keyword>battery</keyword>
<keyword>conservation</keyword>
</keywordset>
</bookinfo>
<!-- ====================================================================== -->
<chapter id="introduction">
<chapterinfo>
<keywordset>
<keyword>KPowersave</keyword>
</keywordset>
</chapterinfo>
<title>Introduction</title>
<mediaobject>
<imageobject>
<imagedata fileref="hi48-app-kpowersave.png" format="PNG"/>
</imageobject>
</mediaobject>
<para>Use KPowersave, the KDE front-end to powersave, to control power
management and monitor your laptop battery strength. For example, you can
configure the screen on your laptop to turn off if the computer is not used
for a specified amount of time, extending battery life.
</para>
<sect1 id="starting">
<title>Starting KPowersave</title>
<para>To start KPowersave, open a shell and enter <command>kpowersave
&amp;</command> or select
<menuchoice><guimenu>System</guimenu><guimenu>Desktop Applet</guimenu>
<guimenu>KPowersave</guimenu></menuchoice> from the GNOME or KDE
menu. KPowersave opens in the system
tray.
</para>
<para>To configure whether KPowersave starts automatically when you log in,
click <guimenu>General Settings</guimenu> then check or uncheck
<guimenu>KPowersave starts automatically on login</guimenu>. Also specify
whether you want KPowersave to ask you about starting automatically if you
exit the application.
</para>
</sect1>
<sect1 id="understandingicon">
<title>Understanding the KPowersave Icon</title>
<para>
The KPowersave icon looks like a power plug next to a battery strength
indicator. The icon shows the current battery strength and whether the
computer is powered by the battery or the power supply. When the battery
power is low, the background of the icon flashes, orange for Warning
and red for Low or Critical. If you leave the mouse cursor over the icon, a
message shows whether the computer is plugged in or using the battery, the
current charge level of the battery, and, if the computer is running on
battery power, the approximate amount of time left before the battery power
runs out.
</para>
</sect1>
</chapter>
<chapter id="applet">
<title>The systemtray applet menu</title>
<sect1 id="selectschemes">
<title>Switch active scheme</title>
<para>
To set the active scheme, right-click the KPowersave icon and select
<guimenu>Set Active Scheme</guimenu> then select the scheme to use. If you
change the active power management scheme with <guimenu>Set Active
Scheme</guimenu>, all components of your system are part of the power
saving effort. A power management scheme includes settings for CPU
frequency scaling (if supported by your computer), throttling, hard disk
control, and system cooling.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="en_applet_schemes.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave menu with entries to switch schemes</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="yast">
<title>Starting the YaST Power Management Module</title>
<para>
The YaST Power Management module (currently only available on SUSE) provides
several settings designed to help conserve power. To start the module,
right-click the KPowersave icon and click
<guimenu>Start YaST2 Power Management Module</guimenu>.
Detailed instructions for each setting are available in YaST.
<mediaobject>
<imageobject>
<imagedata fileref="en_applet_yast.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave menu with entry to start YaST</phrase>
</textobject>
</mediaobject>
</para>
<note>
<para>
Starting the YaST Power Management Module requires the root password.
</para>
</note>
</sect1>
<sect1 id="suspend">
<title>Suspending the System</title>
<para>
You can suspend the system at any time by right-clicking the
KPowersave icon and selecting <guimenu>Suspend to Disk</guimenu>,
<guimenu>Suspend to RAM</guimenu>, or
<guimenu>Standby</guimenu> (if standby is supported by the
computer).
</para>
<itemizedlist>
<listitem>
<para>
Suspend to Disk saves all open data to disk before the computer is suspended.
This protects your data if power is cut off or the battery dies.
</para>
</listitem>
<listitem>
<para>
Suspend to RAM saves the data to RAM, making data retrieval faster when
the computer is brought out of suspend mode.
</para>
</listitem>
<listitem>
<para>
Standby deactivates the monitor while maintaining power to the system so
that any open data remains in RAM.
</para>
</listitem>
</itemizedlist>
<para>
The selections that are available depend on which methods have been activated
in YaST by the administrator and whether standby is supported by your
computer. The choice you make should depend on the likelihood of the
computer losing power.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="en_applet_suspend.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave menu with entries for suspend/standby</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="deactivateautossuspend">
<title>Deactivating Autosuspend</title>
<para>
If autosuspend is activated for the scheme currently used,
<guimenu>Disable Actions on Inactivity</guimenu> appears in the KPowersave
menu. If you select this option, any actions that are configured to take
place when the computer is inactive do not happen, effectively deactivating
autosuspend.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="en_applet_autosuspend.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave menu with option "Disable Actions on Inactivity"</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="setCPUFreq">
<title>Setting the CPU Frequency Policy</title>
<para>
To control the amount of power used by the CPU by changing the CPU
frequency policy, right-click the KPowersave icon, click <guimenu>Set CPU
Frequency Policy</guimenu>, and choose one of the available options:
</para>
<itemizedlist>
<listitem>
<para>
Performance: Permanently keeps a high CPU frequency for maximum CPU performance.
</para>
</listitem>
<listitem>
<para>
Dynamic: Reduces the CPU frequency when the system is idle and adjusts it
dynamically if more CPU power is needed.
</para>
</listitem>
<listitem>
<para>
Powersave: Maintains a low CPU frequency to save power.
</para>
</listitem>
</itemizedlist>
<para>
The CPU frequency policy is only available in the menu if it is
supported by your computer. If this option does not appear, it is not
supported by your system.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="en_applet_cpufreq.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave menu with submenu 'CPU Frequency Policy'</phrase>
</textobject>
</mediaobject>
</sect1>
</chapter>
<chapter id="conf_powerscheme">
<title>Configuring a Power Management Scheme</title>
<sect1 id="understand_scheme">
<title>Understanding a Power Management Scheme</title>
<para>
A scheme contains the basic power management configuration that is
used when you use KPowersave with your computer. The number of available
schemes depends on your Powersave configuration. Add or delete schemes with
the YaST Power Management Module. Some common schemes include
the following:
</para>
<itemizedlist>
<listitem>
<para>Performance: Optimized for maximum performance during longer sessions</para>
</listitem>
<listitem>
<para>Acoustic: Optimized to let the machine run as quietly as possible</para>
</listitem>
<listitem>
<para>Presentation: Optimized for best performance when giving presentations</para>
</listitem>
<listitem>
<para>Powersave: Optimized to conserve battery power</para>
</listitem>
</itemizedlist>
<para>To choose a scheme, open the <guimenu>Scheme Settings</guimenu> tab,
click the scheme to use, modify it as desired, then click
<guimenu>OK</guimenu>.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="en_configdialog_schemes.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave configure dialog (select schemes).</phrase>
</textobject>
</mediaobject>
<para>
A scheme controls:
</para>
<itemizedlist>
<listitem>
<para>
Whether the screen saver is permitted to run when the computer is not in use
</para>
</listitem>
<listitem>
<para>
How much time is allowed to pass before the screen goes into standby or suspend
mode or is powered off
</para>
</listitem>
<listitem>
<para>
Whether the computer automatically goes into Suspend mode after a specified
amount of time
</para>
</listitem>
<listitem>
<para>
Whether KPowersave should emit notifications
</para>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="procedure">
<title>Procedure to setup a scheme</title>
<para>
All of these options conserve power by not allowing power-consuming
processes to run. To configure scheme settings, do the following:
</para>
<sect2 id="procedure_ss">
<title>Screen Saver</title>
<procedure>
<step><para>Right-click the KPowersave icon in the sytem tray.</para></step>
<step><para>Select <guimenu>Configure KPowersave</guimenu>.</para></step>
<step><para>If the <guimenu>Scheme Settings</guimenu> tab is not already
selected, click <guimenu>Scheme Settings</guimenu>.</para></step>
<step><para>Optionally, click <guimenu>Enable Specific Screensaver
Settings</guimenu>.</para>
<substeps>
<step><para>If you do not want the screen saver to consume power when the
system is not in use, click <guimenu>Disable Screen
Saver</guimenu>.</para></step>
<step><para>To blank the screen instead of running a specific screen
saver, click <guimenu>Only Blank the Screen</guimenu>. This option is
not available if the
screen saver is disabled.</para></step>
</substeps></step>
</procedure>
</sect2>
<sect2 id="procedure_spms">
<title>Display Power Management</title>
<procedure>
<step><para>To manage the power consumed by the screen, click
<guimenu>Enable Specific Display Power Management</guimenu>.</para>
<para>Specific display power management (DPMS) can also
be disabled by checking <guimenu>Disable Display Power
Management</guimenu>. This setting overwrites the desktop
configuration.</para>
<substeps>
<step><para>Select the amount of time that should pass before the screen
goes into standby mode. In standby mode, the screen is blanked, but
continues to receive power. This provides a low level of power
conservation.</para></step>
<step><para>Specify the amount of time before the screen is suspended. In
suspend mode, the screen is turned off but enough power is used to
store the current screen information.</para></step>
<step><para>Specify the amount of time that should pass before all power
to the screen is turned off.</para></step>
</substeps></step>
</procedure>
<mediaobject>
<imageobject>
<imagedata fileref="en_configdialog_schemes_screen.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave configure dialog for screen saver and DPMS settings.</phrase>
</textobject>
</mediaobject>
</sect2>
<sect2 id="procedure_autosuspend">
<title>Setup Autosuspend</title>
<procedure>
<step><para> Click <guimenu>Autosuspend</guimenu> if you want
KPowersave to suspend the system automatically if the current desktop
user is inactive for a specified amount of time then use the dialog to
configure specific autosuspend settings.</para>
<para>For example, if you want the system to suspend to disk after 30
minutes, select the settings to do so. After 30 minutes, all open files
are saved to disk and the computer is suspended.</para>
</step>
</procedure>
<mediaobject>
<imageobject>
<imagedata fileref="en_configdialog_schemes_autosuspend.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave configure dialog for Autosuspend settings.</phrase>
</textobject>
</mediaobject>
</sect2>
<sect2 id="procedure_notification">
<title>Setup Sound</title>
<procedure>
<step><para>To disable/reenable Notifications for the scheme click
<guimenu>Miscellaneous</guimenu>. Change the <guimenu>Disable Notifications</guimenu>
checkbox ti prevent emit Notifications. You can configure the notifications via
the applet menu by select <guimenu>Configure Notifications...</guimenu>.
</para></step>
</procedure>
</sect2>
</sect1>
</chapter>
<chapter id="generalsettings">
<title>General Settings</title>
<sect1 id="lockscreen">
<title>Locking the Screen</title>
<para>
For improved security, you can lock the screen before the computer
goes into suspend or standby mode or when you close the laptop lid. Lock
the screen with a screensaver or with xlock.
</para>
<para>
To lock the screen, click the <guimenu>General Settings</guimenu> tab
then select the settings to use.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="en_configdialog_general.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave configure dialog for general settings.</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="autosuspendblacklist">
<title>Creating an Autosuspend Blacklist</title>
<para>
KPowersave provides an autosuspend blacklist. The blacklist prevents
the system from being suspended if one of the listed applications is
running. For example, you probably do not want your laptop to go into
suspend mode while you are watching a DVD, just because you have not
pressed a key for ten minutes. To edit the blacklist, click the
<guimenu>General Settings</guimenu> tab then click <guimenu>Edit General
Blacklist</guimenu>. Use the <guimenu>Autosuspend Blacklist Edit</guimenu>
dialog to add or remove applications from your blacklist.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="en_configdialog_general.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave configure dialog for Autosuspend Blacklist</phrase>
</textobject>
</mediaobject>
<para>
You can also use this setting to create and edit blacklists for each
scheme. When creating a scheme blacklist, you can import the general
blacklist or create a specific blacklist for that scheme. A scheme-specific
blacklist overrides the general blacklist when that scheme is in
use.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="en_configdialog_blacklist.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave dialog to edit Blacklist</phrase>
</textobject>
</mediaobject>
</sect1>
</chapter>
</book>
<!-- Keep this comment at the end of the file
Local variables:
mode: xml
coding: utf-8
sgml-indent-step: 1
End:
-->

@ -0,0 +1,2 @@
KDE_DOCS = kpowersave
KDE_LANG = fi

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,524 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC
"-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN"
"dtd/kdex.dtd"
[
<!ENTITY app "<application>KPowersave</application>">
<!ENTITY apprelease " ">
<!-- chapters in separate docbook files -->
<!-- book related entities -->
<!ENTITY kappname "KPowersave">
<!ENTITY % addindex "INCLUDE">
<!ENTITY % Finnish "INCLUDE" > <!-- change language only here -->
]>
<!--
NOTE:
Entries which require special treatment are marked with comments starting with '###'. They should be visited on a regular basis.
-->
<book lang="&language;">
<bookinfo>
<title>&app; Ohje</title>
<date>2006-03-06</date>
<releaseinfo>&apprelease;</releaseinfo>
<authorgroup>
<author>
<firstname>Danny</firstname>
<surname>Kukawka</surname>
<affiliation>
<address><email>Danny.Kukawka@web.de</email></address>
</affiliation>
</author>
<author>
<firstname>Thomas</firstname>
<surname>Renninger</surname>
<affiliation>
<address><email>trenn@suse.de</email></address>
</affiliation>
</author>
</authorgroup>
<copyright>
<year>2005</year>
<holder>Scott Rhoades</holder>
</copyright>
<!--ROLES_OF_TRANSLATORS-->
<!--<legalnotice>&FDLNotice;</legalnotice>-->
<abstract>
<para>&app; on työkalu jota käytetään asettamaan virrankulutus ja -säästö valintoja.
</para>
</abstract>
<keywordset>
<keyword>KDE</keyword>
<keyword>K-virransäästö</keyword>
<keyword>virta</keyword>
<keyword>akku</keyword>
<keyword>säästö</keyword>
</keywordset>
</bookinfo>
<!-- ====================================================================== -->
<chapter id="introduction">
<chapterinfo>
<keywordset>
<keyword>K-virransäästö</keyword>
</keywordset>
</chapterinfo>
<title>Esittely</title>
<mediaobject>
<imageobject>
<imagedata fileref="hi48-app-kpowersave.png" format="PNG"/>
</imageobject>
</mediaobject>
<para>Käytä K-virransäästöä, KDE:n virranhallinta käyttöliittymää, ohjataksesi
virranhallintaa ja seurataksesi kannettavan akunvaraustilaa. Voit esimerkiksi
määrittää kannettavan näytön sammutuksen jos tietokonetta ei ole käytetty
määritettynä aikana, parantaaksesi akun kestoa.
</para>
<sect1 id="starting">
<title>K-virransäästön käynnistäminen</title>
<para>Käynnistääksesi K-virransäästön, avaa komentotulkki ja anna komento <command>kpowersave
&amp;</command> tai valitse
<menuchoice><guimenu>Järjestelmä</guimenu><guimenu>Työpöytäsovelma</guimenu>
<guimenu>KPowersave</guimenu></menuchoice> GNOMEn tai KDE:n
valikosta. K-virransäästö avautuu järjestelmätarjottimelle.
</para>
<para>Määrittääksesi käynnistyykö K-virransäästö automaattisesti kirjautumisen yhteydessä,
napsauta <guimenu>Yleiset asetukset</guimenu> ja valitse tai jätä valitsematta
<guimenu>K-virransäästö käynnistyy automaattisesti sisäänkirjautuessa</guimenu>. Määritä myös
haluatko että K-virransäästö kysyy automaatista käynnistystä kun sammutat
sovelluksen.
</para>
</sect1>
<sect1 id="understandingicon">
<title>K-virransäästön kuvakkeen merkitykset</title>
<para>
K-virransäästön kuvake näyttää virtapistokkeelta akunvaraustilan ilmaisimen vieressä.
Kuvake näyttää akunvarauksen tämän hetkisen tilan ja toimiiko tietokone
akulla vai onko kytkettynä virtaliittännässä. Kun akun varaus on matala,
kuvakkeen tausta välkkyy, oranssina varoitukseksi ja punaisena matalan
tai kriittisen merkiksi. Jos jätät hiiren osoittimen kuvakkeen päälle,
viesti näyttää onko tietokone kytketty verkkovirtaan vai käytetäänkö akkua,
tämän hetkisen akunvarauksen ja jos tietokone käyttää akkua,
odotettavissa olevan käyttöajan ennen akunvarauksen loppumista.
</para>
</sect1>
</chapter>
<chapter id="applet">
<title>Järjestelmätarjottimen sovelman valikko</title>
<sect1 id="selectschemes">
<title>Vaihda käytössä olevaa mallia</title>
<para>
Asettaaksesi käytössä olevan mallin, napsauta oikealla hiiren nappilla K-virransäästön kuvaketta ja valitse
<guimenu>Aseta käytössä oleva malli</guimenu> valitse sitten malli jota haluat käyttää. Jos
muutat käytössä olevaa virranhallinta mallia <guimenu>Aseta käytössä olevaa
virransäästö mallia</guimenu>, kaikki järjestelmäsi osat ottavat osaa virran
säästö toimiin. Virranhallinta malli sisältää asetukset prosessorin
nopeudensäädölle (jos tietokone tätä tukee), throttling, kiintolevyjen
hallinnalla, ja järjestelmän jäähdytykselle.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="fi_applet_schemes.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>Mallin vaihtaminen K-virransäästön valikosta</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="yast">
<title>YaST Virranhallintamoduulin käynnistäminen</title>
<para>
YaST Virranhallintamoduuli tarjoaa useita asetuksia jotka ovat suunniteltu auttamaan virran
säästössä. Käynnistääksesi moduulin, napsauta hiiren oikeaa näppäintä K-virransäästö kuvakkeen päällä
ja napsauta <guimenu>Käynnistä YaST2 Virranhallintamoduuli</guimenu>. Yksityiskohtaiset
ohjeet jokaiselle asetukselle ovat saatavissa YaST:issa.
<mediaobject>
<imageobject>
<imagedata fileref="fi_applet_yast.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>YaST:in käynnistäminen K-virransäästön valikosta</phrase>
</textobject>
</mediaobject>
</para>
<note>
<para>
YaST Virranhallintamoduulin käynnistäminen vaatii pääkäyttäjän salasanan.
</para>
</note>
</sect1>
<sect1 id="suspend">
<title>Järjestelmän asettaminen lepotilaan</title>
<para>
Voit keskeyttää järjestelmän koska tahansa napsauttamalla hiiren oikeaa näppäintä
K-virransäästön kuvakkeen päällä ja valitsemalla <guimenu>Lepotila levylle</guimenu>,
<guimenu>Lepotila keskusmuistiin</guimenu>, tai
<guimenu>Valmiustila</guimenu> (jos tietokone tukee
valmiustilaa).
</para>
<itemizedlist>
<listitem>
<para>
"Lepotila levylle" tallentaa kaiken avoimen tiedon levylle ennen tietokoneen pysäyttämistä.
Tämä suojaa tietojasi jos virta katkeaa tai akku loppuu.
</para>
</listitem>
<listitem>
<para>
"Lepotila keskusmuistiin" tallentaa tiedot RAM-muistiin, tehden tiedonpalauttamisesta nopeampaa kun
tietokone palautetaan lepotilasta.
</para>
</listitem>
<listitem>
<para>
Valmiustila poistaa näytön käytöstä pitäen virran järjestelmässä niin
että kaikki avoimet tiedot pysyvät RAM-muistissa.
</para>
</listitem>
</itemizedlist>
<para>
Käytettävissä olevat valinnat riippuvat tavoista jotka jäjestelmävalvoja
on ottanut käyttöön YaST:issa ja onko valmiustila tietokoneesi tukema.
Valinnan tulisi riippua tietokoneen virran katkeamisen todennäköisyydestä.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="fi_applet_suspend.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>K-virransäästö valikko valinnat lepotilalle/valmiustilalle</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="deactivateautossuspend">
<title>Automaattisen lepotilan poistaminen</title>
<para>
Jos automaattinen lepotila on käytössä tämän hetkisessä mallissa,
<guimenu>Ota pois toimettomuuden tapahtumat</guimenu> ilmestyy K-virransäästön
valikkoon. Jos valitset tämän valinnan, jokainen toiminto joka on määritetty
tapahtumaan kun tietokone on toimettomana ei toteudu, tämä poistaa käytöstä myös
automaattisen lepotilan.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="fi_applet_autosuspend.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>K-virransäästön valikko "Ota pois toimettomuuden tapahtumat" toiminnon kanssa</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="setCPUFreq">
<title>CPU-taajuuskäytännön asettaminen</title>
<para>
Hallinnoi prosessorin käyttämää virran määrää muuttamalla prosessorin(CPU)
taajuuskäytäntöä, napsauta hiiren oikealla napilla K-virranhallinnan kuvaketta, napsauta <guimenu>Aseta CPU
-taajuuskäytäntöä</guimenu>, ja valitse yksi saatavilla olevista valinnoista:
</para>
<itemizedlist>
<listitem>
<para>
Suorituskyky: Pitää prosessorin taajuuden pysyvästi korkeana prosessorin suurimman suorituskyvyn saavuttamiseksi.
</para>
</listitem>
<listitem>
<para>
Dynaaminen: Vähentää prosessorin taajuutta kun järjestelmä on tyhjäkäytössä ja säätää sitä
dynaamisesti kun lisää prosessoritehoa tarvitaan.
</para>
</listitem>
<listitem>
<para>
Virransäästö: Pitää prosessorin taajuuden matalana säästääkseen virtaa.
</para>
</listitem>
</itemizedlist>
<para>
CPU-taajuuskäytäntö on käytettävissä valikosta vain jos
tietokoneesi tukee sitä. Jos valintaa ei ole,
järjestelmäsi ei tue toimintoa.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="fi_applet_cpufreq.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>K-virransäästön valikko 'Aseta CPU-taajuuskäytäntöä' alivalikon kanssa</phrase>
</textobject>
</mediaobject>
</sect1>
</chapter>
<chapter id="conf_powerscheme">
<title>Virranhallintamallin määrittäminen</title>
<sect1 id="understand_scheme">
<title>Virranhallintamallin ymmärtäminen</title>
<para>
Malli sisältää virranhallinnan perusmääritykset jotka ovat
käytössä kun käytät tietokoneessasi K-virransäästöä. Saatavilla olevien
mallien lukumäärä riippuu virransäästö määrityksestäsi. Lisää tai poista malleja
YaST Virranhallinta moduulissa. Osa yleisistä malleista sisältävät
seuraavat:
</para>
<itemizedlist>
<listitem>
<para>Suorituskyky: Optimoitu täydelle suorituskyvylle pitempiaikaisia istuntoja varten</para>
</listitem>
<listitem>
<para>Hiljainen: Optimoitu tietokoneen käyttämiseksi mahdollisimman hiljaisena</para>
</listitem>
<listitem>
<para>Esitys: Optimoitu antamaan paras suorituskyky esityksiä pidettäessä</para>
</listitem>
<listitem>
<para>Virransäästö: Optimoitu säästämään akunvarausta</para>
</listitem>
</itemizedlist>
<para>Valitaksesi mallin, avaa <guimenu>Malliasetukset</guimenu> välilehti,
napsauta käytettävää mallia, ja muokkaa sitä haluamaksesi, napsauta sitten
<guimenu>OK</guimenu>.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="fi_configdialog_schemes.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>K-virransäästön määritysikkuna (valitse malleja).</phrase>
</textobject>
</mediaobject>
<para>
Malli hallitsee:
</para>
<itemizedlist>
<listitem>
<para>
Onko näytönsäästäjän käyttö sallittu kun tietokone ei ole käytössä
</para>
</listitem>
<listitem>
<para>
Kuinka kauan aikaa saa kulua ennen kuin näyttö menee valmiustilaan tai lepotilaan
tai sammutetaan
</para>
</listitem>
<listitem>
<para>
Tulisiko tietokoneen mennä automaattisesti lepotilaan tietyn ajan jälkeen
</para>
</listitem>
<listitem>
<para>
Toistaako tietokone virranhallintaan liittyviä äänimerkkejä
</para>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="procedure">
<title>Mallin asettamistoiminto</title>
<para>
Kaikki nämä valinnat säästävät virtaa estämällä virtaa vievien
toimintojen suorittamisen. Määrittääksesi mallin asetukset, tee seuraavasti:
</para>
<sect2 id="procedure_ss">
<title>Näytönsäästäjä</title>
<procedure>
<step><para>Napsauta hiiren oikealla napilla K-virransäästön kuvaketta järjestelmätarjottimella.</para></step>
<step><para>Valitse <guimenu>Määritä K-virransäästö</guimenu>.</para></step>
<step><para>Jos <guimenu>Malliasetukset</guimenu> välilehti ei ole jo
valittuna, napsauta <guimenu>Malliasetukset</guimenu>.</para></step>
<step><para>Valinnaisesti, napsauta <guimenu>Ota käyttöön valitut näytönsäästäjän
asetukset</guimenu>.</para>
<substeps>
<step><para>Jos et halua näytönsäästäjän kuluttavan virtaa kun
järjestelmä ei ole käytössä, napsauta <guimenu>Ota näytönsäästäjä
pois käytöstä</guimenu>.</para></step>
<step><para>Tyhjentääksesi näytön määritetyn näytönsäästäjän suorittamisen sijasta,
napsauta <guimenu>Vain ruudun tyhjennys</guimenu>. Tämä valinta
ei ole saatavilla jos
näytönsäästäjä ei ole käytössä.</para></step>
</substeps></step>
</procedure>
</sect2>
<sect2 id="procedure_spms">
<title>Näytön virranhallinta</title>
<procedure>
<step><para>Hallitaksesi näytön virrankulutusta, napsauta
<guimenu>Ota käyttöön valittu virranhallinta</guimenu>.</para>
<para>Määritetty näytön virranhallinta (DPMS) voidaan myös
poistaa käytöstä valitsemalla <guimenu>Ota pois näytön
virranhallinta</guimenu>. Tämä asetus ohittaa työpöytä
määrityksen.</para>
<substeps>
<step><para>Valitse kuinka paljon aikaa tulisi kulua ennen kuin näyttö
menee valmiustilaan. Valmiustilassa, näyttö on tyhjä, mutta
jatkaa virran saamista. Tämä tarjoaa pienen virran
säästön.</para></step>
<step><para>Määritä kuinka kauan kestää ennen kuin näyttö menee lepotilaan.
Lepotilassa, näyttö sammutetaan, mutta virtaa käytetään
säilyttämään nykyisen näytön tila.</para></step>
<step><para>Määritä kuinka kauan kestää ennen kuin kaikki virta
näytöltä katkaistaan.</para></step>
</substeps></step>
</procedure>
<mediaobject>
<imageobject>
<imagedata fileref="fi_configdialog_schemes_screen.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>K-virransäästön määritysikkuna näytönsäästäjän asetuksille.</phrase>
</textobject>
</mediaobject>
</sect2>
<sect2 id="procedure_autosuspend">
<title>Automaattisen lepotilan asetus</title>
<procedure>
<step><para> Napsauta <guimenu>Automaattinen lepotila</guimenu> jos haluat
K-virransäästön asettavan järjestelmän lepotilaan automaattisesti jos nykyisen työpöydän
käyttäjä on toimettomana määritetyn ajan. Käytä sitten valintaikkunaa
määrittämään automaattisen lepotilan asetukset.</para>
<para>Esimerkiksi, jos haluat järjestelmän lepotilaan levylle 30 minuutin jälkeen,
valitse asetuksista että näin tehdään. Kun 30 minuuttia on kulunut, kaikki avoimet tiedostot
tallennetaan levylle ja tietokone asetetaan lepotilaan.</para>
</step>
</procedure>
<mediaobject>
<imageobject>
<imagedata fileref="fi_configdialog_schemes_autosuspend.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>K-virransäästön määritysikkuna automaattisen lepotilan asetuksille.</phrase>
</textobject>
</mediaobject>
</sect2>
<sect2 id="procedure_notification">
<title>Aseta ääni</title>
<procedure>
<step><para>Määrittääksesi virransäästön äänivalinnoille, napsauta
<guimenu>Sekalaiset</guimenu>. Valitse äänityypit jotka poistetaan
estäen niitä toistumasta ja kuluttamasta akkua.
</para></step>
</procedure>
</sect2>
</sect1>
</chapter>
<chapter id="generalsettings">
<title>Yleiset asetukset</title>
<sect1 id="lockscreen">
<title>Näytön lukitseminen</title>
<para>
Parantaaksesi tietoturvaa, voit lukita näytön ennen kuin tietokone
menee lepotilaan tai valmiustilaan tai kun laitat kannettavan kannen kiinni. Lukitse
näyttö näytönsäästäjän tai xkellon kanssa.
</para>
<para>
Lukitaksesi näytön, napsauta <guimenu>Yleiset asetukset</guimenu> välilehteä
ja valitse sitten käyttöön haluamasi asetukset.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="fi_configdialog_general.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>K-virransäästön määritysikkuna yleisille asetuksille.</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="autosuspendblacklist">
<title>Kieltoluettelon luominen automaattiselle lepotilalle</title>
<para>
K-virransäästö tarjoaa kieltoluettelon automaattiselle lepotilalle. Kieltoluettelo estää
järjestelmää menemästä lepotilaan jos jokin luetelluista sovelluksista
on käytössä. Esimerkiksi, et ehkä tahdo että kannettavasi menee
lepotilaan kun katselet DVD:tä, vain koska et painanut
näppäintä kymmeneen minuuttiin. Muokataksesi kieltoluetteloa, napsauta
<guimenu>Yleiset asetukset</guimenu> välilehteä ja sitten <guimenu>Muokkaa yleistä
kieltoluetteloa</guimenu>. Käytä <guimenu>Automaattisen lepotilan kieltoluettelon muokkaus</guimenu>
-ikkunaa lisäämään tai poistamaan sovelluksia kieltoluettelosta.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="fi_configdialog_general.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>K-virransäästön määritysikkuna automaattisen lepotilan kieltoluettelolle</phrase>
</textobject>
</mediaobject>
<para>
Voit myös käyttää tätä asetusta luomaan ja muokkaamaan kieltoluetteloa jokaiselle
mallille. Luotaessa mallin kieltoluetteloa, voit tuoda yleisen
kieltoluettelon tai luoda mallikohtaisen kieltoluettelon. Mallikohtainen
kieltoluettelo ohittaa yleisen kieltoluettelon kun tämä malli on
käytössä.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="fi_configdialog_blacklist.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>K-virransäästön muokkausikkuna kieltoluetteloille</phrase>
</textobject>
</mediaobject>
</sect1>
</chapter>
</book>
<!-- Keep this comment at the end of the file
Local variables:
mode: xml
coding: utf-8
sgml-indent-step: 1
End:
-->

@ -0,0 +1,2 @@
KDE_DOCS = kpowersave
KDE_LANG = hu

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,550 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC
"-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN"
"dtd/kdex.dtd"
[
<!ENTITY app "<application>KPowersave</application>">
<!ENTITY apprelease " ">
<!-- chapters in separate docbook files -->
<!-- book related entities -->
<!ENTITY kappname "KPowersave">
<!ENTITY % addindex "INCLUDE">
<!ENTITY % Hungarian "INCLUDE" > <!-- change language only here -->
]>
<!--
NOTE:
Entries which require special treatment are marked with comments starting with '###'. They should be visited on a regular basis.
-->
<book lang="&language;">
<bookinfo>
<title>&app; Help</title>
<date>2006-03-06</date>
<releaseinfo>&apprelease;</releaseinfo>
<authorgroup>
<author>
<firstname>Danny</firstname>
<surname>Kukawka</surname>
<affiliation>
<address><email>Danny.Kukawka@web.de</email></address>
</affiliation>
</author>
<author>
<firstname>Thomas</firstname>
<surname>Renninger</surname>
<affiliation>
<address><email>trenn@suse.de</email></address>
</affiliation>
</author>
</authorgroup>
<copyright>
<year>2005</year>
<holder>Scott Rhoades</holder>
</copyright>
<!--ROLES_OF_TRANSLATORS-->
<!--<legalnotice>&FDLNotice;</legalnotice>-->
<abstract>
<para>A &app; segédprogram az áramfogyasztás és az energiatakarékosság
beállítására szolgál.
</para>
</abstract>
<keywordset>
<keyword>KDE</keyword>
<keyword>KPowersave</keyword>
<keyword>áramellátás</keyword>
<keyword>akkumulátor</keyword>
<keyword>energiatakarékosság</keyword>
</keywordset>
</bookinfo>
<!-- ====================================================================== -->
<chapter id="introduction">
<chapterinfo>
<keywordset>
<keyword>KPowersave</keyword>
</keywordset>
</chapterinfo>
<title>Bevezetés</title>
<mediaobject>
<imageobject>
<imagedata fileref="hi48-app-kpowersave.png" format="PNG"/>
</imageobject>
</mediaobject>
<para>A KPowersave nevű program a KDE része, grafikus felület az
energiagazdálkodásra és a noteszgép-akkumulátor erősségének mérésére
szolgáló powersave segédprogramhoz. Használatával beállítható például,
hogy a noteszgép képernyője kikapcsoljon meghatározott tétlenség
után, így megnövelhető az akkumulátor hasznos üzemideje.
</para>
<sect1 id="starting">
<title>A KPowersave elindítása</title>
<para>A KPowersave elindításához nyisson meg egy parancsértelmezőt
és írja be, hogy:
<command>kpowersave &amp;</command> vagy válassza ki a GNOME vagy KDE
menüjéből a <menuchoice><guimenu>Rendszer</guimenu><guimenu>Asztal
kisalkalmazás</guimenu> <guimenu>KPowersave</guimenu></menuchoice>
menüpontot. A KPowersave a rendszertálcán nyílik meg.
</para>
<para>Beállítható az is, hogy a KPowersave automatikusan elinduljon,
amikor bejelentkezik: kattintson az <guimenu>Általános
beállítások</guimenu> menüpontra, majd jelölje meg <guimenu>A KPowersave
automatikusan elindul bejelentkezéskor</guimenu> lehetőséget. Ezenfelül
azt is megadhatja, hogy a KPowersave rákérdezzen-e az automatikus
indításra az alkalmazásból kilépéskor.
</para>
</sect1>
<sect1 id="understandingicon">
<title>A KPowersave ikon működése</title>
<para>
A KPowersave ikon az akkumulátor erősségét jelző ábra melletti
villásdugóra hasonlít. Az ikon jelzik az akkumulátor aktuális
töltöttségét, valamint azt, hogy a számítógép éppen akkumulátorról vagy az
elektromos hálózatról üzemel. Ha az akkumulátor töltöttsége lecsökken,
akkor az ikon háttere villogni kezd, narancssárgán a figyelmeztetéshez,
és vörösen az Alacsony vagy Kritikus állapotban. Ha az egérkurzort az ikon
felett hagyja, akkor az üzenet jelzi, hogy a számítógép a hálózatra
csatlakozik vagy akkumulátort használ, kiírja az akkumulátor pillanatnyi
töltöttségét, s végül, ha a számítógép akkumulátorról működik, akkor
azt, hogy körülbelül mennyi idő van még hátra, mielőtt az
akkumulátor teljesen lemerül.
</para>
</sect1>
</chapter>
<chapter id="applet">
<title>A tálcán futó kisalkalmazás menüje</title>
<sect1 id="selectschemes">
<title>Aktív séma váltása</title>
<para>
Az aktív séma beállításához kattintson a jobb egérgombbal a KPowersave
ikonra, majd válassza az előugró menü <guimenu>Aktív séma
beállítása</guimenu> menüpontját, majd válassza ki a kívánt sémát.
Ha megváltoztatja az aktív energiagazdálkodási sémát az <guimenu>Aktív séma
beállítása</guimenu> menüponttal, akko ra rendszer összes komponense az új
energiagazdálkodási módra áll át. Az energiagazdálkodási sémák
tartalmaznak beállításokat a CPU frekvenciájának átállításával
kapcsolatban (ha támogatja a gép), az elfojtással, a merevlemez
vezérlésével és a rendszer hűtésével kapcsolatban.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="hu_applet_schemes.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>A KPowersave menüje a sémák váltására szolgáló bejegyzésekkel</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="yast">
<title>A YaST energiagazdálkodási moduljának elindítása</title>
<para>
A YaST energiagazdálkodási modulja számos beállítást kínál az
energia takarékosabb felhasználásához. A modul indításához kattintson a
jobb egérgombbal a KPowersave ikoknra, majd válassza az előugró menü
<guimenu>YaST2 energiagazdálkodási modul indítása</guimenu> pontját. A
YaST részletesen magyarázatot tartalmaz az egyes beállításokra vonatkozóan.
<mediaobject>
<imageobject>
<imagedata fileref="hu_applet_yast.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>A KPowersave menüje a YaST indítására szolgáló bejegyzéssel</phrase>
</textobject>
</mediaobject>
</para>
<note>
<para>
A YaST energiagazdálkodási modul elindításához szükség van a root-jelszóra.
</para>
</note>
</sect1>
<sect1 id="suspend">
<title>A rendszer felfüggesztése</title>
<para>
A rendszer bármikor felfüggeszthető, ha jobb gombbal a KPowersave
ikonra kattint, és kiválasztja a <guimenu>Felfüggesztés lemezre</guimenu>,
<guimenu>Felfüggesztés memóriába</guimenu> vagy
<guimenu>Készenlét</guimenu> lehetőséget (amennyiben a számítógép
támogatja a készenléti állapotot).
</para>
<itemizedlist>
<listitem>
<para>
A Felfüggesztés lemezre minden adatot elment lemezre a számítógép
felfüggesztése előtt.
Ez véd az adatok elvesztése ellen, még akkor is, ha az akkumulátor
teljesen lemerülne.
</para>
</listitem>
<listitem>
<para>
A Felfüggesztés memóriába funkció az adatokat a memóriába menti,
így az adatok sokkal gyorsabban visszaolvashatók, amikor a számítógépet
visszakapcsolja felfüggesztett módból.
</para>
</listitem>
<listitem>
<para>
A Készenlét funkció kikapcsolja a monitort, de a
rendszert áram alatt tartja, vagyis minden megnyitott adat
továbbra is a memóriában található.
</para>
</listitem>
</itemizedlist>
<para>
A rendelkezésre álló választási lehetőségek attól függenek,
hogy a rendszergazda melyeket aktiválta a YaST-ban, illetve hogy melyeket
támogatja egyáltalán maga a számítógép.
Azt, hogy melyik lehetőséget választja, célszerű attól függővé tenni,
hogy mennyire valószínű az adatvesztés.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="hu_applet_suspend.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>A KPowersave menüje a felfüggesztésre/készenlétre kapcsolásra szolgáló bejegyzésekkel</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="deactivateautossuspend">
<title>Az automatikus felfüggesztés kikapcsolása</title>
<para>
Ha az aktuálisan használt sémában be van kapcsolva az automatikus
felfüggesztés, akkor a KPowersave menüben megjelenik a <guimenu>Tétlenség
esetén a műveletek kikapcsolása</guimenu> menüpont. Ha kiválasztja ezt a
lehetőséget, akkor mindazok a műveletek, amelyek be vannak állítva, hogy
megtörténjenek a számítógép inaktív állapotba kapcsolásakor, nem történnek
meg, vagyis az automatikus felfüggesztés lényegében nem történik meg.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="hu_applet_autosuspend.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>A KPowersave menüje a "Tétlenség esetén a műveletek kikapcsolása" menüponttal</phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="setCPUFreq">
<title>A CPU frekvencia irányelv beállítása</title>
<para>
A CPU által használt energia a CPU frekvencia irányelv módosításával
szabályozható: kattintson a jobb egérgombbal a KPowersave ikonra, majd
válassza az előugró menü <guimenu>CPU frekvencia irányelv
beállítása</guimenu> pontját, majd válassza az alábbi lehetőségek egyikét:
</para>
<itemizedlist>
<listitem>
<para>
Teljesítmény: Tartósan magasan tartja a CPU frekvenciáját
a maximális CPU-teljesítmény érdekében.
</para>
</listitem>
<listitem>
<para>
Dinamkus: Csökkenti a CPU frekvenciáját, ha a rendszer tétlen, és
dinamikusan növeli, ha nagyobb CPU-teljesítményre van szükség.
</para>
</listitem>
<listitem>
<para>
Energiatakarékosság: Alacsonyan tartja a Maintains a CPU
frekvenciáját a energiatakarékosság érdekében.
</para>
</listitem>
</itemizedlist>
<para>
A CPU frekvencia irányelv csak akkor elérhető, ha a frekvencia
állítását támogatja a számítógép. Ha nem jelenik meg a menüpont, akko r a
rendszer nem támogatja a funkciót.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="hu_applet_cpufreq.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>A KPowersave menü a "CPU frekvencia irányelv" almenüvel</phrase>
</textobject>
</mediaobject>
</sect1>
</chapter>
<chapter id="conf_powerscheme">
<title>Energiagazdálkodási séma beállítása</title>
<sect1 id="understand_scheme">
<title>Néhány szó az energiagazdálkodási sémákról</title>
<para>
Egy séma az energiagazdálkodással kapcsolatos legfontosabb
beállításokat tartalmazza, amelyek akkor kerülnek beállításra, ha a
KPowersave-et használja a számítógépen. A rendelkezésre álló sémák száma
a Powersave beállításaitól függenek. A sémák a YaST energiagazdálkodási
moduljával hozhatók létre és törölhetők. Néhány a leggyakoribb sémák
közül:
</para>
<itemizedlist>
<listitem>
<para>Teljesítmény: maximális teljesítmény hosszabb időtartamon át is
</para>
</listitem>
<listitem>
<para>Zajszint: A gépe lehető legcsendesebb használatára optimalizált
</para>
</listitem>
<listitem>
<para>Bemutató: A legjobb teljesítmény a bemutatók során </para>
</listitem>
<listitem>
<para>Energiatakarékosság: A lehető leghosszabb akkumulátoros üzemidő
</para>
</listitem>
</itemizedlist>
<para>Egy séma kiválasztásához kattintson a
<guimenu>Sémabeállítások</guimenu> lapra, kattintson a használni kívánt
sémára, majd kattintson az <guimenu>OK</guimenu> gombra.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="hu_configdialog_schemes.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>A KPowersave konfigurációs párbeszédablaka (sémák kiválasztása). </phrase>
</textobject>
</mediaobject>
<para>
A sémák az alábbiakat vezérlik:
</para>
<itemizedlist>
<listitem>
<para>
Fusson-e a képernyővédő, ha a számítógép nincs használatban
</para>
</listitem>
<listitem>
<para>
Mennyi idő után álljon át a képernyő készenléti vagy
felfüggesztett állapotba, vagy kapcsoljon ki
</para>
</listitem>
<listitem>
<para>
A számítógép automatikusan átálljon-e felfüggesztett módba egy
megadott idő után
</para>
</listitem>
<listitem>
<para>
A számítógép lejátsszon-e az energiagazdálkodással kapcsolatos hangokat
</para>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="procedure">
<title>Egy séma beállításának lépései</title>
<para>
A fenti lehetőségek mindegyik takarékoskodik az energiával, hiszen nem
engedi a sok energiát fogyasztó folyamatokat futni. A sémák beállítása:
</para>
<sect2 id="procedure_ss">
<title>Képernyővédő</title>
<procedure>
<step><para>Kattintson a jobb egérgombbal a tálcán a KPowersave ikonra. </para></step>
<step><para>Válassza ki a <guimenu>KPowersave beállítása</guimenu> lehetőséget.</para></step>
<step><para>Ha a <guimenu>Sémabeállítások</guimenu> lap még nincs
kiválasztva, akkor kattintson a <guimenu>Sémabeállítások</guimenu> lapra.
</para></step>
<step><para>Ha akarja, kattintson az <guimenu>Egyedi képernyővédő-beállítások bekapcsolása</guimenu> lehetőségre. </para>
<substeps>
<step><para>Ha nem akarja, hogy a képernyővédő áramot fogyasszon,
amikor a rendszer nincs használatban, kattintson a <guimenu>Képernyővédő
kikapcsolása</guimenu> lehetőségre.</para></step>
<step><para>Ha csak el akarja sötétíteni a képernyőt egy adott
képernyővédő használata helyett, kattintson a <guimenu>Csak a képernyő
elsötétítése</guimenu> lehetőségre. Ez a beállítás nem érhető el, ha a
képernyővédő le van tiltva.
</para></step>
</substeps></step>
</procedure>
</sect2>
<sect2 id="procedure_spms">
<title>Képernyő energiagazdálkodása</title>
<procedure>
<step><para>Ha kezelni kívánja a képernyő által fogyasztott áram
mértékét, kattintson a <guimenu>Képernyő egyedi tápellátás-vezérlésének
bekapcsolása</guimenu> lehetőségre.</para>
<para>Az egyedi képernyő-energiagazdálkodás letiltható a
<guimenu>Képernyő tápellátás-vezérlésének kikapcsolása</guimenu>
lehetőségre kattintva. Ez a beállítás felülbírálja az asztali
beállításokat.
</para>
<substeps>
<step><para>Adja meg az időt, amelynek eltelte után a képernyő
átáll készenléti módba. Készenléti állapotban a képernyő üres, de
továbbra is kap áramot. Éppen ezért ez csak kismértékű
energiatakarékosságot jelent. </para></step>
<step><para>Adja meg, hogy mennyi idő után legyen a képernyő
felfüggesztve. Felfüggesztett módban a képernyő ki van kapcsolva, de
elegendő áramot kap a gép ahhoz, hogy megjegyezze a képernyőn éppen
látható adatokat. </para></step>
<step><para>Adja meg az időt, amelynek eltelte után a képernyő
teljesen lekapcsolásra kerül. </para></step>
</substeps></step>
</procedure>
<mediaobject>
<imageobject>
<imagedata fileref="hu_configdialog_schemes_screen.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>A KPowersave konfigurációs párbeszédablaka a képernyővédő beállításaival. </phrase>
</textobject>
</mediaobject>
</sect2>
<sect2 id="procedure_autosuspend">
<title>Az automatikus felfüggesztés beállítása</title>
<procedure>
<step><para> Kattintson az <guimenu>Automatikus
felfüggesztés</guimenu> gombra, ha azt kívánja, hogy a KPowersave
automatikusan felfüggessze a rendszert, ha az aktuális asztali
felhasználó adott ideig tétlen. Ezután a párbeszédablakban adja meg az
automatikus felfüggesztés kívánt beállításait.</para>
<para>Ha például 30 perc után kívánja lemezre kívánja felfüggeszteni a
rendszert, akkor adja meg az erre vonatkozó beállításokat.
30 perc után az összes nyitott fájl lemezre mentődik és a számítógép
felfüggesztésre kerül.
</para>
</step>
</procedure>
<mediaobject>
<imageobject>
<imagedata fileref="hu_configdialog_schemes_autosuspend.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>A KPowersave konfigurációs párbeszédablaka az automatikus felfüggesztés beállításaival. </phrase>
</textobject>
</mediaobject>
</sect2>
</sect1>
</chapter>
<chapter id="generalsettings">
<title>Általános beállítások</title>
<sect1 id="lockscreen">
<title>A képernyő lezárása</title>
<para>
A nagyobb biztonság érdekében lezárható a képernyő, mielőtt a gép
készenléti vagy felfüggesztett módba kapcsolna, vagy ha lecsukja a
noteszgép fedelét. A képernyő lezárható egy képernyővédővel, vagy az xlock
segédprogrammal.
</para>
<para>
A képernyő lezárásához kattintson az <guimenu>Általános
beállítások</guimenu> lapra, majd válassza ki a használni kívánt
beállításokat.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="hu_configdialog_general.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>A KPowersave konfigurációs párbeszédablaka az általános beállításokkal. </phrase>
</textobject>
</mediaobject>
</sect1>
<sect1 id="autosuspendblacklist">
<title>Automatikus felfüggesztési feketelista létrehozása</title>
<para>
A KPowersave lehetővé teszi egy automatikus felfüggesztési feketelista
használatát. A feketelista használatával megakadályozható a rendszer
felfüggesztése, ha a felsorolt alkalmazások valamelyike fut. Például
filmnézés közben valószínűleg nem akarja felfüggeszteni a gépet csak
azért, mert már 10 perce nem nyomott meg egyetlen billentyűt sem.
A feketelista módosításáshoz kattintson az <guimenu>Általános
beállítások</guimenu> lapra, majd kattintson az <guimenu>Általános
feketelista módosítása</guimenu> gombra. Az <guimenu>Automatikus
felfüggesztési feketelista módosítása</guimenu> párbeszédablakban vehet
fel alkalmazásokat a feketelistára, illetve törölheti őket onnan.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="hu_configdialog_general.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>A KPowersave konfigurációs párbeszédablaka az automatikus felfüggesztési feketelistával</phrase>
</textobject>
</mediaobject>
<para>
Szintén ezzel a beállítással lehet készíteni külön feketelistákat az
egyes sémákhoz. Egy adott séma feketelistájának elkészítésekor
importálhatja az általános feketelistát, vagy létrehozhat egy teljesen
egyedi feketelistát az adott sémához. A sémaspecifikus feketelisták
felülbírálják az általános feketelista beállításait.
</para>
<mediaobject>
<imageobject>
<imagedata fileref="hu_configdialog_blacklist.png" format="PNG" align="center"/>
</imageobject>
<textobject>
<phrase>KPowersave párbeszédablak a feketelisták módosításához </phrase>
</textobject>
</mediaobject>
</sect1>
</chapter>
</book>
<!-- Keep this comment at the end of the file
Local variables:
mode: xml
coding: utf-8
sgml-indent-step: 1
End:
-->

@ -0,0 +1,2 @@
KDE_DOCS = kpowersave
KDE_LANG = nb

Binary file not shown.

@ -0,0 +1,205 @@
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY app "<application>KPowersave</application>">
<!ENTITY apprelease " ">
<!-- chapters in separate docbook files --><!-- book related entities --><!ENTITY kappname "KPowersave">
<!ENTITY % addindex "INCLUDE">
<!ENTITY % Norwegian "INCLUDE">
<!-- change language only here -->]>
<!--
NOTE:
Entries which require special treatment are marked with comments starting with '###'. They should be visited on a regular basis.
-->
<book lang="&language;">
<bookinfo><title><application moreinfo="none">&kappname;</application>-hjelp</title><date>2006-03-06</date> <releaseinfo> </releaseinfo><authorgroup><author> <firstname>Danny</firstname> <surname>Kukawka</surname> <affiliation><address format="linespecific"><email>Danny.Kukawka@web.de</email></address></affiliation></author><author> <firstname>Thomas</firstname> <surname>Renninger</surname> <affiliation><address format="linespecific"><email>trenn@suse.de</email></address></affiliation></author></authorgroup><copyright> <year>2005</year> <holder>Scott Rhoades</holder></copyright><!--ROLES_OF_TRANSLATORS--><!--<legalnotice>&FDLNotice;</legalnotice>--><abstract><para>Med <application moreinfo="none">&kappname;</application> kan du velge innstillinger for strømforbruk og strømsparing.</para></abstract><keywordset> <keyword>KDE</keyword> <keyword>&kappname;</keyword> <keyword>strøm</keyword> <keyword>batteri</keyword> <keyword>strømsparing</keyword> </keywordset></bookinfo>
<!-- ====================================================================== -->
<chapter id="introduction">
<chapterinfo>
<keywordset> <keyword>&kappname;</keyword> </keywordset>
</chapterinfo>
<title>Innledning</title>
<mediaobject>
<imageobject>
<imagedata fileref="hi48-app-kpowersave.png" format="PNG"/>
</imageobject>
</mediaobject>
<para>Bruk &kappname;, det grafiske strømstyringsgrensesnittet i KDE, for å administrere strømstyringsfunksjonene og overvåke batteriet på din bærbare datamaskin. For å spare batteristrøm kan du for eksempel velge at skjermen skal slås av etter et bestemt tidsrom dersom du ikke bruker den bærbare maskinen. </para>
<sect1 id="starting">
<title>Starte &kappname;</title>
<para>For å starte &kappname; kan du skrive <command moreinfo="none">kpowersave &amp;</command> i en terminal eller velge <menuchoice moreinfo="none"><guimenu moreinfo="none">System</guimenu><guimenu moreinfo="none">Panelprogrammer</guimenu> <guimenu moreinfo="none">&kappname;</guimenu></menuchoice> i GNOME- eller KDE-menyen. &kappname;-ikonet blir lagt til i systemkurven. </para>
<para>Du kan velge at &kappname; skal starte automatisk når du logger inn, ved å klikke på <guimenu moreinfo="none">Generelle innstillinger</guimenu> og krysse av for <guimenu moreinfo="none">'&kappname; starter automatisk når du logger inn'</guimenu>. Du kan også velge om du vil bli spurt om &kappname; skal starte automatisk når du avslutter programmet. </para>
</sect1>
<sect1 id="understandingicon">
<title>&kappname;-ikonet</title>
<para> &kappname;-ikonet ser ut som en strømkontakt ved siden av en indikator for batteristatus. Ikonet viser gjeldende batteristatus og om datamaskinen bruker batteristrøm eller er koblet til strømnettet. Når det er lite strøm på batteriet, blinker ikonbakgrunnen oransje, eller rødt når det er svært lite eller nesten ingen strøm igjen. Hvis du plasserer musepekeren over ikonet, kommer det opp en melding som viser om datamaskinen er koblet til strømnettet eller bruker batteriet. Dersom maskinen bruker batteristrøm, vises også gjeldende batteristatus samt hvor lang tid det er igjen før batteriet er helt tomt. </para>
</sect1>
</chapter>
<chapter id="applet">
<title>Panelprogrammets meny</title>
<sect1 id="selectschemes">
<title>Definere aktiv strategi</title>
<para> Velg strømstyringsstrategi ved å høyreklikke på &kappname;-ikonet. Velg <guimenu moreinfo="none">Definer aktiv strategi</guimenu> i menyen og deretter ønsket strategi. Hvis du bytter strømstyringsstrategi under <guimenu moreinfo="none">Velg aktiv strategi</guimenu>, vil alle komponentene i systemet bruke innstillingene i denne strategien. En strømstyringsstrategi omfatter innstillinger for CPU-frekvensskalering (hvis datamaskinen støtter dette), bremsing, harddiskstyring og kjøling. </para>
<mediaobject><imageobject><imagedata align="center" fileref="nb_applet_schemes.png" format="PNG"/></imageobject><textobject> <phrase>&kappname;-meny med ulike strømsparingsstrategier</phrase> </textobject> </mediaobject>
</sect1>
<sect1 id="yast">
<title>Starte strømstyringsmodulen i YaST</title>
<para> Strømstyringsmodulen i YaST har ulike innstillinger for strømsparing. Høyreklikk på &kappname;-ikonet og deretter på <guimenu moreinfo="none">Start strømstyringsmodulen i YaST2</guimenu> for å åpne modulen. Du finner detaljerte anvisninger om hver enkelt innstilling i YaST. <mediaobject><imageobject><imagedata align="center" fileref="nb_applet_yast.png" format="PNG"/></imageobject><textobject> <phrase>&kappname;-meny med valg for å starte YaST</phrase> </textobject> </mediaobject></para>
<note>
<para> Du blir bedt om rotpassordet for å åpne strømsparingsmodulen i YaST. </para>
</note>
</sect1>
<sect1 id="suspend">
<title>Dvalefunksjoner</title>
<para> Høyreklikk på &kappname;-ikonet og velg <guimenu moreinfo="none">Diskdvale</guimenu>, <guimenu moreinfo="none">RAM-dvale</guimenu> eller <guimenu moreinfo="none">Ventemodus</guimenu> (hvis datamaskinen støtter ventemodus). </para>
<itemizedlist>
<listitem>
<para> Med diskdvale lagres alle åpne data på harddisken før dvalefunksjonen aktiveres. Dette beskytter dataene ved strømbrudd eller hvis batteriet blir tomt. </para>
</listitem>
<listitem>
<para> Med RAM-dvale lagres dataene på den fysiske minnebrikken, noe som gjøre det raskere å hente frem dataene igjen når dvalefunksjonen deaktiveres. </para>
</listitem>
<listitem>
<para> Med ventemodus blir skjermen slått av, men systemet tilføres fremdeles strøm, slik at alle åpne data beholdes i det fysiske minnet. </para>
</listitem>
</itemizedlist>
<para> Tilgjengelige valg avhenger av hvilke metoder som er aktivert i YaST av administratoren, og om datamaskinen støtter ventemodus. Du bør velge metode i henhold til sannsynligheten for at det vil bli lite strøm på maskinen. </para>
<mediaobject><imageobject><imagedata align="center" fileref="nb_applet_suspend.png" format="PNG"/></imageobject><textobject> <phrase>&kappname;-meny med valg for dvale/ventemodus</phrase> </textobject> </mediaobject>
</sect1>
<sect1 id="deactivateautossuspend">
<title>Deaktivere automatisk dvale</title>
<para> Hvis automatisk dvale er aktivert for gjeldende strategi, vil <guimenu moreinfo="none">Deaktiver handlinger ved inaktivitet</guimenu> vises i &kappname;-menyen. Med dette alternativet vil eventuelle handlinger som er valgt når datamaskinen er inaktiv, ikke bli utført. I praksis betyr dette at automatisk dvale deaktiveres. </para>
<mediaobject><imageobject><imagedata align="center" fileref="nb_applet_autosuspend.png" format="PNG"/></imageobject><textobject> <phrase>&kappname;-meny med valget Deaktiver handlinger ved inaktivitet"</phrase> </textobject> </mediaobject>
</sect1>
<sect1 id="setCPUFreq">
<title>Velge innstilling for CPU-frekvens</title>
<para> Du kan velge hvor mye strøm som skal brukes av prosessoren ved å endre innstillingen for CPU-frekvens. Høyreklikk på &kappname;-ikonet, og velg <guimenu moreinfo="none">Definer retningslinjer for CPU-frekvens</guimenu>. Velg deretter ett av de tilgjengelige alternativene: </para>
<itemizedlist>
<listitem>
<para> Ytelse: CPU-frekvensen er alltid høy for å gi maksimal prosessorytelse. </para>
</listitem>
<listitem>
<para> Dynamisk: CPU-frekvensen reduseres når systemet ikke er i bruk, og tilpasses dynamisk dersom mer prosessorkraft er nødvendig. </para>
</listitem>
<listitem>
<para> Strømsparing: Lav CPU-frekvens for å spare strøm. </para>
</listitem>
</itemizedlist>
<para> Innstillingen for CPU-frekvens er bare tilgjengelig i menyen dersom datamaskinen støtter dette. Hvis valget ikke vises, støttes ikke denne funksjonen av systemet. </para>
<mediaobject><imageobject><imagedata align="center" fileref="nb_applet_cpufreq.png" format="PNG"/></imageobject><textobject> <phrase>&kappname;-meny med undermenyen 'Definer retningslinjer for CPU-frekvens'</phrase> </textobject> </mediaobject>
</sect1>
</chapter>
<chapter id="conf_powerscheme">
<title>Konfigurere en strømstyringsstrategi</title>
<sect1 id="understand_scheme">
<title>Definisjon av en strømstyringsstrategi</title>
<para> En strategi inneholder den grunnleggende strømstyringskonfigurasjonen som benyttes når du bruker &kappname; på datamaskinen. Antall tilgjengelige strategier avhenger av strømstyringskonfigurasjonen. Strategier kan legges til eller slettes i strømstyringsmodulen i YaST. Vanlige strategier: </para>
<itemizedlist>
<listitem>
<para> Ytelse: Optimalisert for maksimal ytelse under lange økter</para>
</listitem>
<listitem>
<para>Støy: Optimalisert for at maskinen skal være så stillegående som mulig</para>
</listitem>
<listitem>
<para>Presentasjon: Optimalisert for best mulig ytelse ved presentasjoner</para>
</listitem>
<listitem>
<para>Strømsparing: Optimalisert for å spare batteristrøm</para>
</listitem>
</itemizedlist>
<para>Velg en strategi under fanen <guimenu moreinfo="none">Strategi-inntillinger</guimenu>, klikk på strategien du vil bruke og rediger den etter behov. Bekreft med <guimenu moreinfo="none">OK</guimenu>. </para>
<mediaobject><imageobject><imagedata align="center" fileref="nb_configdialog_schemes.png" format="PNG"/></imageobject><textobject> <phrase>Konfigurasjonsdialog for &kappname; (velg strategier).</phrase> </textobject> </mediaobject>
<para> Strategien bestemmer: </para>
<itemizedlist>
<listitem>
<para> Om skjermspareren skal kunne kjøre når datamaskinen ikke er i bruk </para>
</listitem>
<listitem>
<para> Hvor lang tid det skal gå før ventemodus eller dvale blir aktivert eller til skjermen blir slått av </para>
</listitem>
<listitem>
<para> Om dvalefunksjonen skal aktiveres automatisk etter et spesifisert tidsrom </para>
</listitem>
<listitem>
<para> Om strømrelaterte hendelser skal varsles med lydsignaler </para>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="procedure">
<title>Konfigurere en strategi</title>
<para> Alle disse valgene sparer strøm ved å hindre at prosesser som bruker strøm kjøres. En strategi konfigureres på følgende måte: </para>
<sect2 id="procedure_ss">
<title>Skjermsparer</title>
<procedure>
<step performance="required">
<para>Høyreklikk på &kappname;-ikonet i systemkurven.</para>
</step>
<step performance="required">
<para>Velg <guimenu moreinfo="none">Konfigurer &kappname;</guimenu>.</para>
</step>
<step performance="required">
<para>Hvis fanen <guimenu moreinfo="none">Strategi-inntillinger</guimenu> ikke allerede er valgt, klikk på <guimenu moreinfo="none">Strategi-inntillinger</guimenu>.</para>
</step>
<step performance="required">
<para>Klikk eventuelt på <guimenu moreinfo="none">Aktiver spesifikke skjermsparerinnstillinger</guimenu>.</para>
<substeps performance="required">
<step performance="required">
<para>Hvis du ikke vil at skjermspareren skal bruke strøm når systemet ikke er i bruk, klikk på <guimenu moreinfo="none">Deaktiver skjermsparer</guimenu>.</para>
</step>
<step performance="required">
<para>Hvis du ønsker en tom skjerm i stedet for en spesiell skjermsparer, klikk på <guimenu moreinfo="none">Bare slå av skjermen</guimenu>. Dette valget er ikke tilgjengelig hvis skjermspareren er deaktivert.</para>
</step>
</substeps>
</step>
</procedure>
</sect2>
<sect2 id="procedure_spms">
<title>Strømstyring for skjerm</title>
<procedure>
<step performance="required">
<para>Klikk på <guimenu moreinfo="none">Aktiver spesifikk strømstyring for skjerm</guimenu> for å tilpasse skjermens strømforbruk.</para>
<para>Spesifikk strømstyring for skjerm (DPMS) kan deaktiveres ved å krysse av for <guimenu moreinfo="none">Deaktiver spesifikk strømsparing for skjerm</guimenu>. Denne innstillingen overstyrer den generelle skrivebordskonfigurasjonen.</para>
<substeps performance="required">
<step performance="required">
<para>Velg hvor lang tid det skal gå før ventemodus aktiveres. I ventemodus tømmes skjermen, men forsynes fremdeles med strøm. Dette sparer litt strøm.</para>
</step>
<step performance="required">
<para>Angi hvor lang tid det skal gå før dvalefunksjonen skal aktiveres. I dvalemodus blir skjermen slått av, men den tilføres nok strøm til å lagre gjeldende skjerminformasjon.</para>
</step>
<step performance="required">
<para>Angi hvor lang tid det skal gå før strømforsyningen til skjermen skal slås helt av.</para>
</step>
</substeps>
</step>
</procedure>
<mediaobject><imageobject><imagedata align="center" fileref="nb_configdialog_schemes_screen.png" format="PNG"/></imageobject><textobject> <phrase>Konfigurasjonsdialog for &kappname; med skjermsparerinnstillinger.</phrase> </textobject> </mediaobject>
</sect2>
<sect2 id="procedure_autosuspend">
<title>Konfigurere automatisk dvale</title>
<procedure>
<step performance="required">
<para>Klikk på <guimenu moreinfo="none">Automatisk dvale</guimenu> hvis du vil at &kappname; skal aktivere dvalefunksjonen automatisk dersom gjeldende bruker er inaktiv i et spesifisert tidsrom. Velg deretter spesielle innstillinger for automatisk dvale i dialogen.</para>
<para>Du kan for eksempel velge at systemet skal aktivere diskdvale etter 30 minutter. Etter 30 minutter lagres alle åpne filer på harddisken, og dvalefunksjonen aktiveres.</para>
</step>
</procedure>
<mediaobject><imageobject><imagedata align="center" fileref="nb_configdialog_schemes_autosuspend.png" format="PNG"/></imageobject><textobject> <phrase>Konfigurasjonsdialog for &kappname; med innstillinger for automatisk dvale.</phrase> </textobject> </mediaobject>
</sect2>
</sect1>
</chapter>
<chapter id="generalsettings">
<title>Generelle innstillinger</title>
<sect1 id="lockscreen">
<title>Låse skjermen</title>
<para> For å forbedre sikkerheten kan du låse skjermen før dvale- eller ventemodus aktiveres, eller når du lukker lokket på en bærbar datamaskin. Skjermen kan låses med en skjermsparer eller med xlock. </para>
<para> Klikk på <guimenu moreinfo="none">Generelle innstillinger</guimenu>-fanen og velg innstillingene du vil bruke for å låse skjermen. </para>
<mediaobject><imageobject><imagedata align="center" fileref="nb_configdialog_general.png" format="PNG"/></imageobject><textobject> <phrase>Konfigurasjonsdialog for &kappname; med generelle innstillinger.</phrase> </textobject> </mediaobject>
</sect1>
<sect1 id="autosuspendblacklist">
<title>Opprette en unntaksliste for automatisk dvale</title>
<para> &kappname; har en unntaksliste for automatisk dvale. Unntakslisten hindrer at dvalefunksjonen aktiveres dersom en av programmene på listen kjører. Du ønsker sannsynligvis ikke at dvalefunksjonen skal aktiveres på din bærbare datamaskin når du ser en DVD-film bare fordi du ikke har trykket på noen tast de siste ti minuttene. Klikk på <guimenu moreinfo="none">Generelle innstillinger</guimenu>-fanen og deretter på <guimenu moreinfo="none">Rediger generell unntaksliste</guimenu> for å redigere listen. Bruk dialogen <guimenu moreinfo="none">Rediger unntaksliste for automatisk dvale</guimenu> for å legge til eller fjerne programmer på unntakslisten. </para>
<mediaobject><imageobject><imagedata align="center" fileref="nb_configdialog_general.png" format="PNG"/></imageobject><textobject> <phrase>Konfigurasjonsdialog for &kappname; med innstillinger for unntaksliste for automatisk dvale.</phrase> </textobject> </mediaobject>
<para> Du kan også bruke denne innstillingen for å opprette og redigere unntakslister for hver enkelt strategi. Når du oppretter en unntaksliste for en strategi, kan du importere den generelle unntakslisten eller opprette en ny unntaksliste for den aktuelle strategien. En strategispesifikk unntaksliste overstyrer den generelle unntakslisten når den aktuelle strategien benyttes. </para>
<mediaobject><imageobject><imagedata align="center" fileref="nb_configdialog_blacklist.png" format="PNG"/></imageobject><textobject> <phrase>&kappname;-dialog for redigering av unntaksliste</phrase> </textobject> </mediaobject>
</sect1>
</chapter>
</book>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,8 @@
all:
meinproc --stylesheet /opt/kde3/share/apps/ksgmltools2/customization/kde-web.xsl ../en/index.docbook
./replace
rm *.bak
cp ../en/*.png .
clean:
rm *.png *.html

@ -0,0 +1,2 @@
von='..\/common\/kde_logo.png' nach='kde_logo.png'; filetype='*.html'; OLDIFS=$IFS; IFS='
' ; files=`find . -name "$filetype"`; for f in $files;do cp $f $f.bak; g="$f.mettytmp"; echo "Searching in $f ..."; cat "$f" | sed "s/$von/$nach/" > "$g" && mv "$g" "$f"; rm -f *.mettytmp; done; IFS=$OLDIFS;

@ -0,0 +1,245 @@
<?xml version = '1.0'?>
<kdevelop>
<general>
<author>Danny Kukawka</author>
<email>dkukawka@suse.de, danny.kukawka@web.de</email>
<version>0.7.x - TRUNK</version>
<projectmanagement>KDevKDEAutoProject</projectmanagement>
<primarylanguage>C++</primarylanguage>
<keywords>
<keyword>C++</keyword>
<keyword>Code</keyword>
<keyword>Qt</keyword>
<keyword>KDE</keyword>
</keywords>
<projectdirectory>.</projectdirectory>
<absoluteprojectpath>false</absoluteprojectpath>
<description></description>
<ignoreparts>
<part>kdevabbrev</part>
<part>kdevvalgrind</part>
<part>kdevsnippet</part>
<part>kdevscripting</part>
<part>kdevctags2</part>
</ignoreparts>
<secondaryLanguages/>
<versioncontrol/>
<projectname>kpowersave</projectname>
<defaultencoding></defaultencoding>
</general>
<kdevautoproject>
<general>
<activetarget>src/kpowersave.la</activetarget>
<useconfiguration>default</useconfiguration>
</general>
<run>
<mainprogram>src/kpowersave</mainprogram>
<directoryradio>executable</directoryradio>
<customdirectory>/</customdirectory>
<programargs/>
<terminal>false</terminal>
<autocompile>true</autocompile>
<envvars/>
<globaldebugarguments/>
<globalcwd>.</globalcwd>
<useglobalprogram>false</useglobalprogram>
<autoinstall>false</autoinstall>
<autokdesu>false</autokdesu>
</run>
<configurations>
<optimized>
<builddir>optimized</builddir>
<ccompiler>kdevgccoptions</ccompiler>
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevg77options</f77compiler>
<cxxflags>-O2 -g0</cxxflags>
</optimized>
<debug>
<configargs>--enable-debug=full --prefix=/opt/kde3</configargs>
<builddir>debug</builddir>
<ccompiler>kdevgccoptions</ccompiler>
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevg77options</f77compiler>
<cxxflags>-O0 -g3</cxxflags>
<topsourcedir/>
<cppflags/>
<ldflags/>
<ccompilerbinary/>
<cxxcompilerbinary/>
<f77compilerbinary/>
<cflags/>
<f77flags/>
</debug>
<default>
<configargs>--prefix=/opt/kde3</configargs>
<builddir/>
<topsourcedir/>
<cppflags/>
<ldflags/>
<ccompiler>kdevgccoptions</ccompiler>
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevg77options</f77compiler>
<ccompilerbinary/>
<cxxcompilerbinary/>
<f77compilerbinary/>
<cflags/>
<cxxflags/>
<f77flags/>
<envvars/>
</default>
</configurations>
<make>
<envvars>
<envvar value="1" name="WANT_AUTOCONF_2_5" />
<envvar value="1" name="WANT_AUTOMAKE_1_6" />
</envvars>
<abortonerror>true</abortonerror>
<numberofjobs>1</numberofjobs>
<dontact>false</dontact>
<makebin></makebin>
<prio>0</prio>
<runmultiplejobs>false</runmultiplejobs>
</make>
</kdevautoproject>
<kdevfileview>
<groups>
<group pattern="*.cpp;*.cxx;*.h" name="Sources" />
<group pattern="*.ui" name="User Interface" />
<group pattern="*.png" name="Icons" />
<group pattern="*.po;*.ts" name="Translations" />
<group pattern="*" name="Others" />
<hidenonprojectfiles>false</hidenonprojectfiles>
<hidenonlocation>false</hidenonlocation>
</groups>
<tree>
<hidepatterns>*.o,*.lo,CVS,*~</hidepatterns>
<hidenonprojectfiles>false</hidenonprojectfiles>
<showvcsfields>false</showvcsfields>
</tree>
</kdevfileview>
<kdevdoctreeview>
<ignoretocs>
<toc>gtk</toc>
<toc>gnustep</toc>
<toc>python</toc>
<toc>php</toc>
<toc>perl</toc>
</ignoretocs>
<projectdoc>
<userdocDir>html/</userdocDir>
<apidocDir>html/</apidocDir>
</projectdoc>
<ignoreqt_xml/>
<ignoredoxygen/>
<ignorekdocs/>
<ignoredevhelp/>
</kdevdoctreeview>
<kdevdebugger>
<general>
<dbgshell>libtool</dbgshell>
<programargs/>
<gdbpath>/usr/bin/</gdbpath>
<configGdbScript></configGdbScript>
<runShellScript></runShellScript>
<runGdbScript></runGdbScript>
<breakonloadinglibs>true</breakonloadinglibs>
<separatetty>true</separatetty>
<floatingtoolbar>true</floatingtoolbar>
</general>
<display>
<staticmembers>true</staticmembers>
<demanglenames>true</demanglenames>
<outputradix>10</outputradix>
</display>
</kdevdebugger>
<kdevfilecreate>
<filetypes/>
<useglobaltypes>
<type ext="ui" />
<type ext="cpp" />
<type ext="h" />
</useglobaltypes>
</kdevfilecreate>
<kdevcppsupport>
<references>
<pcs>Qt</pcs>
<pcs>KDElibs</pcs>
</references>
<codecompletion>
<includeGlobalFunctions>true</includeGlobalFunctions>
<includeTypes>true</includeTypes>
<includeEnums>true</includeEnums>
<includeTypedefs>true</includeTypedefs>
<automaticCodeCompletion>true</automaticCodeCompletion>
<automaticArgumentsHint>true</automaticArgumentsHint>
<automaticHeaderCompletion>true</automaticHeaderCompletion>
<codeCompletionDelay>250</codeCompletionDelay>
<argumentsHintDelay>400</argumentsHintDelay>
<headerCompletionDelay>250</headerCompletionDelay>
<showOnlyAccessibleItems>false</showOnlyAccessibleItems>
<completionBoxItemOrder>0</completionBoxItemOrder>
<howEvaluationContextMenu>true</howEvaluationContextMenu>
<showCommentWithArgumentHint>true</showCommentWithArgumentHint>
<statusBarTypeEvaluation>false</statusBarTypeEvaluation>
<namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
<processPrimaryTypes>true</processPrimaryTypes>
<processFunctionArguments>false</processFunctionArguments>
<preProcessAllHeaders>false</preProcessAllHeaders>
<parseMissingHeaders>false</parseMissingHeaders>
<resolveIncludePaths>true</resolveIncludePaths>
<alwaysParseInBackground>true</alwaysParseInBackground>
<usePermanentCaching>true</usePermanentCaching>
<alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
<includePaths>.;</includePaths>
<parseMissingHeadersExperimental>false</parseMissingHeadersExperimental>
<resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
</codecompletion>
<creategettersetter>
<prefixGet></prefixGet>
<prefixSet>set</prefixSet>
<prefixVariable>m_,_</prefixVariable>
<parameterName>theValue</parameterName>
<inlineGet>true</inlineGet>
<inlineSet>true</inlineSet>
</creategettersetter>
<qt>
<used>true</used>
<version>3</version>
<root>/usr/lib/qt3</root>
<includestyle>3</includestyle>
<designerintegration>ExternalDesigner</designerintegration>
<qmake>/usr/lib/qt3/bin/qmake</qmake>
<designer>/usr/lib/qt3/bin/designer</designer>
<designerpluginpaths/>
</qt>
<splitheadersource>
<enabled>false</enabled>
<synchronize>true</synchronize>
<orientation>Vertical</orientation>
</splitheadersource>
</kdevcppsupport>
<cppsupportpart>
<filetemplates>
<interfacesuffix>.h</interfacesuffix>
<implementationsuffix>.cpp</implementationsuffix>
</filetemplates>
</cppsupportpart>
<kdevcvsservice>
<recursivewhenupdate>true</recursivewhenupdate>
<prunedirswhenupdate>true</prunedirswhenupdate>
<createdirswhenupdate>true</createdirswhenupdate>
<recursivewhencommitremove>true</recursivewhencommitremove>
<revertoptions>-C</revertoptions>
</kdevcvsservice>
<kdevdocumentation>
<projectdoc>
<docsystem/>
<docurl/>
<usermanualurl/>
</projectdoc>
</kdevdocumentation>
<ctagspart>
<customArguments/>
<customTagfilePath/>
</ctagspart>
</kdevelop>

@ -0,0 +1,72 @@
#
# spec file for package kpowersave (Version 0.6.2)
#
# Copyright (c) hmacht@suse,de, danny.kukawka@web.de
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# norootforbuild
Name: kpowersave
License: GPL
Group: System/GUI/KDE
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: KDE Frontend to powersave Package, Battery Monitor and General Power Management Support
Version: 0.6.2
Release: 1
ExclusiveArch: %ix86 x86_64 ia64 ppc
Requires: powersave >= 0.12.18 powersave-libs >= 0.12.18 /sbin/pidof /usr/X11R6/bin/xset
Source: %{name}-%{version}.tar.bz2
%description
The package provides battery monitoring and suspend/standby triggers.
It is based on the powersave package and therefore supports APM and
ACPI. Together with the powersave package and the YaST Powermanagement
module it is the preferred package that should be used for battery
monitoring and control of power management related tasks. See powersave
package for additional features such as CPU frequency scaling(SpeedStep
and PowerNow) and more.
Authors:
--------
Thomas Renninger (trenn@suse.de, mail@renninger.de)
Danny Kukawka (dkukawka@suse.de, danny.kukawka@web.de)
%prep
%setup -n %{name}-%{version} -q
%build
make -f admin/Makefile.common cvs
./configure --prefix=/usr
make
%install
make DESTDIR=$RPM_BUILD_ROOT install
%post
%postun
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc README AUTHORS ChangeLog COPYING INSTALL
/usr/bin/kpowersave
/usr/share/config/kpowersaverc
/usr/share/autostart/kpowersave-autostart.desktop
/usr/share/apps/kpowersave
/usr/share/icons/??color
/usr/share/applications/kde/kpowersave.desktop
/usr/share/doc/HTML/*/kpowersave
/usr/lib*/kde3/kpowersave.*
/usr/lib*/libkdeinit_kpowersave.*
/usr/share/locale/*
%changelog -n kpowersave

@ -0,0 +1,74 @@
#
# spec file for package kpowersave (Version 0.6.2)
#
# Copyright (c) hmacht@suse.de, danny.kukawka@web.de
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org
#
# norootforbuild
Name: kpowersave
License: GPL
Group: System/GUI/KDE
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: KDE Frontend to powersave Package, Battery Monitor and General Power Management Support
Version: 0.6.2
Release: 1
ExclusiveArch: %ix86 x86_64 ia64 ppc
Requires: powersave >= 0.12.18 powersave-libs >= 0.12.18 /sbin/pidof /usr/bin/xset
Source: %{name}-%{version}.tar.bz2
%description
The package provides battery monitoring and suspend/standby triggers.
It is based on the powersave package and therefore supports APM and
ACPI. Together with the powersave package and the YaST Powermanagement
module it is the preferred package that should be used for battery
monitoring and control of power management related tasks. See powersave
package for additional features such as CPU frequency scaling(SpeedStep
and PowerNow) and more.
Authors:
--------
Thomas Renninger (trenn@suse.de, mail@renninger.de)
Danny Kukawka (dkukawka@suse.de, danny.kukawka@web.de)
%prep
%setup -n %{name}-%{version} -q
%build
make -f admin/Makefile.common cvs
./configure --prefix=/usr
make
%install
make DESTDIR=$RPM_BUILD_ROOT install
%post
%postun
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc README AUTHORS ChangeLog COPYING INSTALL
/usr/bin/kpowersave
/usr/share/config/kpowersaverc
/usr/share/autostart/kpowersave-autostart.desktop
/usr/share/apps/kpowersave
/usr/share/icons/??color
/usr/share/applications/kde/kpowersave.desktop
/usr/share/doc/HTML/*/kpowersave
/usr/lib*/kde3/kpowersave.*
/usr/lib*/libkdeinit_kpowersave.*
/usr/share/locale/*
%changelog -n kpowersave

@ -0,0 +1,100 @@
#
# spec file for package kpowersave (Version 0.7.2)
#
# Copyright (c) hmacht@suse.de, danny.kukawka@web.de
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org
#
# norootforbuild
Name: kpowersave
License: GPL
Group: System/GUI/KDE
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: KDE Frontend for Power Management, Battery Monitoring and Suspend
Version: 0.7.2
Release: 2.FC6%{?dist}
ExclusiveArch: %ix86 x86_64 ia64 ppc
Requires: hal >= 0.5.8.1 dbus-qt /sbin/pidof /usr/bin/xset
Source: %{name}-%{version}.tar.bz2
BuildRequires: kdelibs-devel
BuildRequires: gettext
BuildRequires: dbus-qt-devel
BuildRequires: automake
BuildRequires: libXext-devel libXScrnSaver-devel libXtst-devel
BuildRequires: hal-devel desktop-file-utils
%description
KPowersave provides battery monitoring, CPU frequency control and suspend/standby
triggers and more power management features for KDE. It uses HAL (formerly the
powersave daemon) and supports APM and ACPI for several architectures.
Authors:
--------
Danny Kukawka (dkukawka@suse.de, danny.kukawka@web.de)
Thomas Renninger (trenn@suse.de, mail@renninger.de)
%prep
%setup -n %{name}-%{version} -q
make -f admin/Makefile.common cvs
%build
unset QTDIR || : ; . /etc/profile.d/qt.sh
%configure \
--disable-rpath \
--enable-new-ldflags \
--disable-debug --disable-warnings \
--disable-dependency-tracking
make %{?_smp_mflags}
%install
make DESTDIR=$RPM_BUILD_ROOT install
desktop-file-install \
--dir $RPM_BUILD_ROOT%{_datadir}/applications/kde \
--vendor="" \
$RPM_BUILD_ROOT%{_datadir}/applications/kde/kpowersave.desktop
## File lists
# locale's
%find_lang %{name} || touch %{name}.lang
# HTML
HTML_DIR=$(kde-config --expandvars --install html)
if [ -d $RPM_BUILD_ROOT$HTML_DIR ]; then
for lang_dir in $RPM_BUILD_ROOT$HTML_DIR/* ; do
lang=$(basename $lang_dir)
echo "%lang($lang) %doc $HTML_DIR/$lang/*" >> %{name}.lang
done
fi
%post
touch --no-create %{_datadir}/icons/hicolor || :
%postun
touch --no-create %{_datadir}/icons/hicolor || :
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc README AUTHORS ChangeLog COPYING INSTALL
%{_bindir}/kpowersave
%{_libdir}/kde3/kpowersave.*
%{_libdir}/libkdeinit_kpowersave.*
%{_datadir}/applications/kde/*kpowersave.desktop
%{_datadir}/apps/kpowersave/
%{_datadir}/autostart/kpowersave-autostart.desktop
%{_datadir}/config/kpowersaverc
%{_datadir}/icons/hicolor/*/*/*
%changelog -n kpowersave

@ -0,0 +1,82 @@
#
# spec file for package kpowersave (Version 0.6.2)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org
#
# norootforbuild
# neededforbuild dbus-1 dbus-1-devel dbus-1-qt3 hal hal-devel kde3-devel-packages kdelibs3 lsb pkgconfig powersave powersave-devel powersave-libs suse-release
Name: kpowersave
BuildRequires: dbus-1-qt3-devel hal-devel kdelibs3-devel powersave-devel lsb suse-release
License: GPL
Group: System/GUI/KDE
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: KDE Front-End to powersave Package, Battery Monitor, and General Power Management Support
Version: 0.6.2
Release: 1
ExclusiveArch: %ix86 x86_64 ia64 ppc
Requires: powersave >= 0.12.18 powersave-libs >= 0.12.18 yast2-power-management /sbin/pidof /usr/X11R6/bin/xset
Source: %{name}-%{version}.tar.bz2
%description
The package provides battery monitoring and suspend and standby
triggers. It is based on the powersave package and therefore supports
APM and ACPI. Together with the powersave package and the YaST power
management module, it is the preferred package that should be used for
battery monitoring and control of power management related tasks. See
the powersave package for additional features, such as CPU frequency
scaling (SpeedStep and PowerNow).
Authors:
--------
Thomas Renninger (trenn@suse.de, mail@renninger.de)
Danny Kukawka (dkukawka@suse.de, danny.kukawka@web.de)
%prep
%setup -n %{name}-%{version} -q
. /etc/opt/kde3/common_options
update_admin
%build
. /etc/opt/kde3/common_options
./configure --enable-yast-entry
make
%install
. /etc/opt/kde3/common_options
make DESTDIR=$RPM_BUILD_ROOT $INSTALL_TARGET
%suse_update_desktop_file %name Utility TrayIcon
%find_lang %name
%post
%{run_ldconfig}
%postun
%{run_ldconfig}
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %name.lang
%defattr(-,root,root)
%doc README AUTHORS ChangeLog COPYING INSTALL NEWS
/opt/kde3/share/doc/*
/opt/kde3/bin/*
/opt/kde3/share/config/kpowersaverc
/opt/kde3/share/autostart/kpowersave-autostart.desktop
/opt/kde3/share/apps/kpowersave
/opt/kde3/share/icons/??color
/opt/kde3/share/applications/kde/kpowersave.desktop
/opt/kde3/lib*/kde3/kpowersave.*
/opt/kde3/lib*/libkdeinit_kpowersave.*
%changelog -n kpowersave

@ -0,0 +1,81 @@
#
# spec file for package kpowersave (Version 0.6.2)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: kpowersave
BuildRequires: dbus-1-qt3-devel hal-devel kdelibs3-devel powersave-devel lsb suse-release
License: GPL
Group: System/GUI/KDE
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: KDE Front-End to powersave Package, Battery Monitor, and General Power Management Support
Version: 0.6.2
Release: 1
ExclusiveArch: %ix86 x86_64 ia64 ppc
Requires: powersave >= 0.12.18 powersave-libs >= 0.12.18 yast2-power-management /sbin/pidof /usr/X11R6/bin/xset
Source: %{name}-%{version}.tar.bz2
%description
The package provides battery monitoring and suspend and standby
triggers. It is based on the powersave package and therefore supports
APM and ACPI. Together with the powersave package and the YaST power
management module, it is the preferred package that should be used for
battery monitoring and control of power management related tasks. See
the powersave package for additional features, such as CPU frequency
scaling (SpeedStep and PowerNow).
Authors:
--------
Thomas Renninger (trenn@suse.de, mail@renninger.de)
Danny Kukawka (dkukawka@suse.de, danny.kukawka@web.de)
%prep
%setup -n %{name}-%{version} -q
. /etc/opt/kde3/common_options
update_admin
%build
. /etc/opt/kde3/common_options
./configure --enable-yast-entry
make
%install
. /etc/opt/kde3/common_options
make DESTDIR=$RPM_BUILD_ROOT $INSTALL_TARGET
%suse_update_desktop_file %name Utility TrayIcon
%find_lang %name
%post
%{run_ldconfig}
%postun
%{run_ldconfig}
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %name.lang
%defattr(-,root,root)
%doc README AUTHORS ChangeLog COPYING INSTALL NEWS
/opt/kde3/share/doc/*
/opt/kde3/bin/*
/opt/kde3/share/config/kpowersaverc
/opt/kde3/share/autostart/kpowersave-autostart.desktop
/opt/kde3/share/apps/kpowersave
/opt/kde3/share/icons/??color
/opt/kde3/share/applications/kde/kpowersave.desktop
/opt/kde3/lib*/kde3/kpowersave.*
/opt/kde3/lib*/libkdeinit_kpowersave.*
%changelog -n kpowersave

@ -0,0 +1,78 @@
#
# spec file for package kpowersave (Version 0.3.9)
#
# Copyright (c) 2004 SUSE LINUX AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# norootforbuild
# neededforbuild kde3-devel-packages kdelibs3 powersave
BuildRequires: aaa_base acl attr bash bind-utils bison bzip2 coreutils cpio cpp cracklib cvs cyrus-sasl db devs diffutils e2fsprogs file filesystem fillup findutils flex gawk gdbm-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv less libacl libattr libgcc libnscd libselinux libstdc++ libxcrypt libzio m4 make man mktemp module-init-tools ncurses ncurses-devel net-tools netcfg openldap2-client openssl pam pam-modules patch permissions popt procinfo procps psmisc pwdutils rcs readline sed strace syslogd sysvinit tar tcpd texinfo timezone unzip util-linux vim zlib zlib-devel arts arts-devel autoconf automake binutils expat fam fam-devel fontconfig fontconfig-devel freeglut freeglut-devel freetype2 freetype2-devel gcc gcc-c++ gdbm gettext glib2 glib2-devel gnome-filesystem jack jack-devel kdelibs3 kdelibs3-devel kdelibs3-doc libart_lgpl libart_lgpl-devel libidn libidn-devel libjpeg libjpeg-devel liblcms liblcms-devel libmng libmng-devel libpng libpng-devel libstdc++-devel libtiff libtiff-devel libtool libxml2 libxml2-devel libxslt libxslt-devel openssl-devel pcre pcre-devel perl powersave qt3 qt3-devel rpm update-desktop-files xorg-x11-Mesa xorg-x11-Mesa-devel xorg-x11-devel xorg-x11-libs
Name: kpowersave
License: LGPL
Group: System/GUI/KDE
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: KDE Frontend to powersave Package, Battery Monitor and General Power Management Support
Version: 0.3.8
Release: 2
Requires: powersave >= 0.8.14 yast2-power-management
Source: %{name}-%{version}.tar.bz2
%description
The package provides battery monitoring and suspend/standby triggers.
It is based on the powersave package and therefore supports APM and
ACPI. Together with the powersave package and the YaST Powermanagement
module it is the preferred package that should be used for battery
monitoring and control of power management related tasks. See powersave
package for additional features such as CPU frequency scaling(SpeedStep
and PowerNow) and more.
Authors:
--------
Thomas Renninger (trenn@suse.de, mail@renninger.de)
Danny Kukawka (dkukawka@suse.de, danny.kukawka@web.de)
%prep
%setup -n %{name}-%{version} -q
. /etc/opt/kde3/common_options
update_admin
%build
. /etc/opt/kde3/common_options
./configure $configkde
make
%install
. /etc/opt/kde3/common_options
make DESTDIR=$RPM_BUILD_ROOT $INSTALL_TARGET
%suse_update_desktop_file %name Utility TrayIcon
%find_lang %name
%post
%{run_ldconfig}
%postun
%{run_ldconfig}
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %name.lang
%defattr(-,root,root)
/opt/kde3/bin/*
/opt/kde3/share/autostart/kpowersave.desktop
/opt/kde3/share/apps/kpowersave
/opt/kde3/share/icons/??color
/opt/kde3/share/applications/kde/kpowersave.desktop
/opt/kde3/lib*/kde3/kpowersave.*
/opt/kde3/lib*/libkdeinit_kpowersave.*
%changelog -n kpowersave

@ -0,0 +1,82 @@
#
# spec file for package kpowersave (Version 0.4.6)
#
# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
# norootforbuild
# neededforbuild kde3-devel-packages kdelibs3 powersave resmgr suse-release
BuildRequires: aaa_base acl attr bash bind-utils bison bzip2 coreutils cpio cpp cracklib cvs cyrus-sasl db devs diffutils e2fsprogs file filesystem fillup findutils flex gawk gdbm-devel gettext-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv klogd less libacl libattr libcom_err libgcc libnscd libselinux libstdc++ libxcrypt libzio m4 make man mktemp module-init-tools ncurses ncurses-devel net-tools netcfg openldap2-client openssl pam pam-modules patch permissions popt procinfo procps psmisc pwdutils rcs readline sed strace sysvinit tar tcpd texinfo timezone unzip util-linux vim zlib zlib-devel arts arts-devel autoconf automake binutils expat fam fam-devel fontconfig fontconfig-devel freeglut freeglut-devel freetype2 freetype2-devel gcc gcc-c++ gdbm gettext glib2 glib2-devel gnome-filesystem jack jack-devel kdelibs3 kdelibs3-devel kdelibs3-doc libart_lgpl libart_lgpl-devel libgcrypt libgcrypt-devel libgpg-error libgpg-error-devel libidn libidn-devel libjpeg libjpeg-devel liblcms liblcms-devel libmng libmng-devel libpng libpng-devel libstdc++-devel libtiff libtiff-devel libtool libxml2 libxml2-devel libxslt libxslt-devel openssl-devel pcre pcre-devel perl powersave python qt3 qt3-devel resmgr rpm suse-release unsermake update-desktop-files xorg-x11-Mesa xorg-x11-Mesa-devel xorg-x11-devel xorg-x11-libs
Name: kpowersave
License: LGPL
Group: System/GUI/KDE
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: KDE Frontend to powersave Package, Battery Monitor and General Power Management Support
Version: 0.4.6
Release: 1
ExclusiveArch: %ix86 x86_64 ia64 ppc
Requires: powersave >= 0.9.25 yast2-power-management /sbin/pidof
Source: %{name}-%{version}.tar.bz2
%description
The package provides battery monitoring and suspend/standby triggers.
It is based on the powersave package and therefore supports APM and
ACPI. Together with the powersave package and the YaST Powermanagement
module it is the preferred package that should be used for battery
monitoring and control of power management related tasks. See powersave
package for additional features such as CPU frequency scaling(SpeedStep
and PowerNow) and more.
Authors:
--------
Thomas Renninger (trenn@suse.de, mail@renninger.de)
Danny Kukawka (dkukawka@suse.de, danny.kukawka@web.de)
%prep
%setup -n %{name}-%{version} -q
. /etc/opt/kde3/common_options
update_admin
%build
. /etc/opt/kde3/common_options
./configure
make
%install
. /etc/opt/kde3/common_options
make DESTDIR=$RPM_BUILD_ROOT $INSTALL_TARGET
rm $RPM_BUILD_ROOT/opt/kde3/share/doc/ -r
%suse_update_desktop_file %name Utility TrayIcon
%find_lang %name
%post
%{run_ldconfig}
%postun
%{run_ldconfig}
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %name.lang
%defattr(-,root,root)
%doc README AUTHORS ChangeLog COPYING INSTALL
/opt/kde3/bin/*
/opt/kde3/share/config/kpowersaverc
/opt/kde3/share/autostart/kpowersave.desktop
/opt/kde3/share/apps/kpowersave
/opt/kde3/share/icons/??color
/opt/kde3/share/applications/kde/kpowersave.desktop
/opt/kde3/lib*/kde3/kpowersave.*
/opt/kde3/lib*/libkdeinit_kpowersave.*
%changelog -n kpowersave

@ -0,0 +1,74 @@
#
# spec file for package kpowersave (Version 0.6.2)
#
# Copyright (c) hmacht@suse.de, danny.kukawka@web.de
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org
#
# norootforbuild
Name: kpowersave
License: GPL
Group: System/GUI/KDE
BuildRequires: powersave-libs powersave-devel libhal1 libhal1-devel libdbus-qt-1_0-devel libdbus-qt-1_0 libkdecore4-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: KDE Frontend to powersave Package, Battery Monitor and General Power Management Support
Version: 0.6.2
Release: %mkrel 1
ExclusiveArch: %ix86 x86_64 ia64 ppc
Requires: powersave >= 0.12.18 powersave-libs >= 0.12.18 /sbin/pidof /usr/X11R6/bin/xset
Source: %{name}-%{version}.tar.bz2
%description
The package provides battery monitoring and suspend/standby triggers.
It is based on the powersave package and therefore supports APM and
ACPI. Together with the powersave package and the YaST Powermanagement
module it is the preferred package that should be used for battery
monitoring and control of power management related tasks. See powersave
package for additional features such as CPU frequency scaling(SpeedStep
and PowerNow) and more.
Authors:
--------
Thomas Renninger (trenn@suse.de, mail@renninger.de)
Danny Kukawka (dkukawka@suse.de, danny.kukawka@web.de)
%prep
%setup -n %{name}-%{version} -q
%build
make -f admin/Makefile.common cvs
./configure --prefix=/usr
make
%install
make DESTDIR=$RPM_BUILD_ROOT install
%post
%postun
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc README AUTHORS ChangeLog COPYING INSTALL
/usr/bin/kpowersave
/usr/share/config/kpowersaverc
/usr/share/autostart/kpowersave-autostart.desktop
/usr/share/apps/kpowersave
/usr/share/icons/??color
/usr/share/applications/kde/kpowersave.desktop
/usr/share/doc/HTML/*/kpowersave
/usr/lib*/kde3/kpowersave.*
/usr/lib*/libkdeinit_kpowersave.*
/usr/share/locale/*
%changelog -n kpowersave

@ -0,0 +1,98 @@
%define name kpowersave
%define version 0.7.2
%define release %mkrel 1
Summary: KDE power management applet
Name: %{name}
Version: %{version}
Release: %{release}
Source0: http://prdownloads.sourceforge.net/powersave/%{name}-%{version}.tar.bz2
License: GPL
Group: Graphical desktop/KDE
Url: http://powersave.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires: hal-devel, libdbus-qt-1-devel, kdelibs-devel
%ifarch x86_64
BuildRequires: lib64qt3-devel, lib64qt3-static-devel lib64gamin-1_0-devel lib64art_lgpl2-devel lib64kdecore4-devel
%else
BuildRequires: libqt3-devel libqt3-static-devel libgamin-1_0-devel libart_lgpl2-devel libkdecore4-devel
%endif
BuildRequires: autoconf2.5 automake1.8
%if %mdkversion > 200600
BuildRequires: libxscrnsaver-devel libxtst-devel
%endif
Requires: hal >= 0.5.8.1 /sbin/pidof /usr/bin/xset
%ifarch x86_64
Requires: lib64dbus-qt-1_1
%else
Requires: libdbus-qt-1_1
%endif
%description
KPowersave provides battery monitoring, CPU frequency control and suspend/standby
triggers and more power management features for KDE. It uses HAL (formerly the
powersave daemon) and supports APM and ACPI for several architectures.
Authors:
--------
Danny Kukawka (dkukawka@suse.de, danny.kukawka@web.de)
Thomas Renninger (trenn@suse.de, mail@renninger.de)
#--------------------------------------------------------------------
%prep
%setup -q -n %{name}-%{version}
%build
%make -f admin/Makefile.common cvs
%configure --disable-rpath
%make
%install
rm -rf %{buildroot}
%makeinstall_std
%find_lang %{name}
mkdir -p $RPM_BUILD_ROOT%{_menudir}
kdedesktop2mdkmenu.pl %{name} "System/Monitoring" $RPM_BUILD_ROOT%{_datadir}/applications/kde/kpowersave.desktop $RPM_BUILD_ROOT%{_menudir}/%{name}
install -D -m 644 %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{name}.png %{buildroot}%{_iconsdir}/%{name}.png
install -D -m 644 %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{name}.png %{buildroot}%{_liconsdir}/%{name}.png
install -D -m 644 %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{name}.png %{buildroot}%{_miconsdir}/%{name}.png
%post
%{update_menus}
%if %mdkversion > 200600
%update_icon_cache hicolor
%endif
%postun
%{clean_menus}
%if %mdkversion > 200600
%clean_icon_cache hicolor
%endif
%clean
rm -rf %{buildroot}
%files -f %{name}.lang
%defattr(-,root,root)
%doc README AUTHORS ChangeLog COPYING INSTALL
%{_bindir}/%{name}
%{_datadir}/config/kpowersaverc
%{_datadir}/autostart/kpowersave-autostart.desktop
%{_datadir}/apps/%{name}
%{_iconsdir}/hicolor/*/apps/*.png
%{_datadir}/icons/*.png
%{_datadir}/applications/kde/kpowersave.desktop
%doc %{_docdir}/HTML/*/kpowersave
%{_libdir}/kde3/*
%{_libdir}/*.so
%{_libdir}/*.la
%{_miconsdir}/%{name}.png
%{_iconsdir}/%{name}.png
%{_liconsdir}/%{name}.png
%{_menudir}/%{name}
%changelog

@ -0,0 +1,88 @@
#
# spec file for package kpowersave (Version 0.7.1)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: kpowersave
%if 0%{?sles_version} > 0
# needed to detect in configure if this is a Enterprise product and set the correct bugzilla website
BuildRequires: dbus-1-qt3-devel hal-devel kdelibs3-devel lsb sles-release
%else
BuildRequires: dbus-1-qt3-devel hal-devel kdelibs3-devel lsb openSUSE-release
%endif
License: GNU General Public License (GPL)
Group: System/GUI/KDE
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: KDE Front-End to powersave Package, Battery Monitor, and General Power Management Support
Version: 0.7.1
Release: 5
ExclusiveArch: %ix86 x86_64 ia64 ppc
Requires: yast2-power-management /sbin/pidof xorg-x11
Source: %{name}-%{version}.tar.bz2
%description
The package provides battery monitoring and suspend and standby
triggers. It is based on the powersave package and therefore supports
APM and ACPI. Together with the powersave package and the YaST power
management module, it is the preferred package that should be used for
battery monitoring and control of power management related tasks. See
the powersave package for additional features, such as CPU frequency
scaling (SpeedStep and PowerNow).
Authors:
--------
Thomas Renninger (trenn@suse.de, mail@renninger.de)
Danny Kukawka (dkukawka@suse.de, danny.kukawka@web.de)
%prep
%setup -n %{name}-%{version} -q
. /etc/opt/kde3/common_options
update_admin
%build
. /etc/opt/kde3/common_options
%if 0%{?sles_version} > 0
./configure --enable-yast-entry --enable-suse-sles
%else
./configure --enable-yast-entry
%endif
make %{?jobs:-j %jobs}
%install
. /etc/opt/kde3/common_options
make DESTDIR=$RPM_BUILD_ROOT $INSTALL_TARGET
%suse_update_desktop_file %name Utility TrayIcon
%find_lang %name
%post
%{run_ldconfig}
%postun
%{run_ldconfig}
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %name.lang
%defattr(-,root,root)
%doc README AUTHORS ChangeLog COPYING INSTALL NEWS
/opt/kde3/share/doc/*
/opt/kde3/bin/*
/opt/kde3/share/config/kpowersaverc
/opt/kde3/share/autostart/kpowersave-autostart.desktop
/opt/kde3/share/apps/kpowersave
/opt/kde3/share/icons/??color
/opt/kde3/share/applications/kde/kpowersave.desktop
/opt/kde3/lib*/kde3/kpowersave.*
/opt/kde3/lib*/libkdeinit_kpowersave.*
%changelog -n kpowersave

@ -0,0 +1,101 @@
#
# spec file for package kpowersave (Version 0.7.2_SVN20070830)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: kpowersave
URL: http://sourceforge.net/projects/powersave/
%if 0%{?sles_version} > 0
# needed to detect in configure if this is a Enterprise product and set the correct bugzilla website
BuildRequires: dbus-1-qt3-devel hal-devel kdelibs3-devel lsb sles-release
%else
BuildRequires: dbus-1-qt3-devel hal-devel kdelibs3-devel lsb openSUSE-release
%endif
License: GPL v2 only
Group: System/GUI/KDE
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: KDE Frontend for Battery Monitoring, Suspend, CPU Freq and General Power Management Support
Version: 0.7.3
Release: 1
ExclusiveArch: %ix86 x86_64 ia64 ppc ppc64
Requires: /sbin/pidof xorg-x11
Source: %{name}-%{version}.tar.bz2
%if %suse_version > 1020
Requires: %{name}-lang = %{version}
%endif
%description
KPowersave provides battery monitoring, CPU frequency control and
suspend/standby triggers, and more power management features for KDE.
It uses HAL (formerly the powersave daemon) and supports APM and ACPI
for several architectures. Together with the powersave package and the
YaST power management module, it is the preferred package that should
be used for battery monitoring and control of power management related
tasks.
Authors:
--------
Thomas Renninger (trenn@suse.de, mail@renninger.de)
Danny Kukawka (dkukawka@suse.de, danny.kukawka@web.de)
%if %suse_version > 1020
%lang_package
%endif
%prep
%setup -n %{name}-%{version} -q
. /etc/opt/kde3/common_options
update_admin
%build
. /etc/opt/kde3/common_options
%if 0%{?sles_version} > 0
./configure --enable-yast-entry --enable-suse-sles
%else
./configure
%endif
make %{?jobs:-j %jobs}
%install
. /etc/opt/kde3/common_options
make DESTDIR=$RPM_BUILD_ROOT $INSTALL_TARGET
%suse_update_desktop_file %name Utility TrayIcon
%find_lang %name
%post
%{run_ldconfig}
%postun
%{run_ldconfig}
%clean
rm -rf $RPM_BUILD_ROOT
%if %suse_version > 1020
%files lang -f %name.lang
%files
%else
%files -f %name.lang
%endif
%defattr(-,root,root)
%doc README AUTHORS ChangeLog COPYING INSTALL NEWS
/opt/kde3/bin/*
/opt/kde3/share/config/kpowersaverc
/opt/kde3/share/autostart/kpowersave-autostart.desktop
/opt/kde3/share/apps/kpowersave
/opt/kde3/share/icons/??color
/opt/kde3/share/applications/kde/kpowersave.desktop
/opt/kde3/lib*/kde3/kpowersave.*
/opt/kde3/lib*/libkdeinit_kpowersave.*
%changelog

@ -0,0 +1,18 @@
POFILES = AUTO
EXTRA_DIST = kpowersave.pot
messages_stat:
for f in *.po; do echo -n $f :; msgfmt --stat $f ; done
messages_merge:
for f in *.po; do echo -n $f :; msgmerge -U $f kpowersave.pot; done
messages_diff:
for f in *.po; \
do \
msgmerge $f kpowersave.pot > $f.tmp; \
echo -n "diff $f to $f.diff"; \
msgcomm --force-po -o $f.diff --less-than 2 $f $f.tmp; \
rm $f.tmp; \
done

1516
po/ar.po

File diff suppressed because it is too large Load Diff

1601
po/bg.po

File diff suppressed because it is too large Load Diff

1478
po/cs.po

File diff suppressed because it is too large Load Diff

1477
po/da.po

File diff suppressed because it is too large Load Diff

1622
po/de.po

File diff suppressed because it is too large Load Diff

1678
po/el.po

File diff suppressed because it is too large Load Diff

1644
po/es.po

File diff suppressed because it is too large Load Diff

1487
po/fi.po

File diff suppressed because it is too large Load Diff

1642
po/fr.po

File diff suppressed because it is too large Load Diff

1445
po/hi.po

File diff suppressed because it is too large Load Diff

1506
po/hu.po

File diff suppressed because it is too large Load Diff

1647
po/it.po

File diff suppressed because it is too large Load Diff

1618
po/ja.po

File diff suppressed because it is too large Load Diff

1449
po/km.po

File diff suppressed because it is too large Load Diff

1537
po/lt.po

File diff suppressed because it is too large Load Diff

1477
po/nb.po

File diff suppressed because it is too large Load Diff

1503
po/nl.po

File diff suppressed because it is too large Load Diff

1456
po/pa.po

File diff suppressed because it is too large Load Diff

1614
po/pl.po

File diff suppressed because it is too large Load Diff

1491
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1626
po/ru.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1485
po/sv.po

File diff suppressed because it is too large Load Diff

1571
po/tr.po

File diff suppressed because it is too large Load Diff

1477
po/uk.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,103 @@
# set the include path for X, qt and KDE
INCLUDES = \
-DPACKAGE_KDE_SOUND_DIR=\""$(prefix)/share/sounds/"\" \
$(all_includes) \
@PACKAGE_CFLAGS@
# these are the headers for your project
noinst_HEADERS = \
autodimm.h \
autosuspend.h \
blacklisteditdialog.h \
configuredialog.h \
countdowndialog.h \
dbusHAL.h \
detaileddialog.h \
hardware.h \
hardware_battery.h \
hardware_batteryCollection.h \
hardware_cpu.h \
inactivity.h \
infodialog.h \
kpowersave.h \
logviewer.h \
privileges.h \
screen.h \
settings.h \
suspenddialog.h
# let automoc handle all of the meta source files (moc)
METASOURCES = AUTO
KDE_ICON = kpowersave
#########################################################################
# APPLICATION SECTION
#########################################################################
# this is the program that gets installed. it's name is used for all
# of the other Makefile.am variables
bin_PROGRAMS =
lib_LTLIBRARIES =
kdeinit_LTLIBRARIES = kpowersave.la
# the application source, library search path, and link libraries
kpowersave_la_SOURCES = \
dummy.cpp \
autodimm.cpp \
autosuspend.cpp \
blacklistedit_Dialog.ui \
blacklisteditdialog.cpp \
configure_Dialog.ui \
configuredialog.cpp \
countdown_Dialog.ui \
countdowndialog.cpp \
dbusHAL.cpp \
detailed_Dialog.ui \
detaileddialog.cpp \
hardware.cpp \
hardware_battery.cpp \
hardware_batteryCollection.cpp \
hardware_cpu.cpp \
inactivity.cpp \
info_Dialog.ui \
infodialog.cpp \
kpowersave.cpp \
kpowersave.skel \
log_viewer.ui \
logviewer.cpp \
main.cpp \
screen.cpp \
settings.cpp \
suspenddialog.cpp \
suspend_Dialog.ui
kpowersave_la_LDFLAGS = $(KDE_RPATH) $(all_libraries) -module -avoid-version
kpowersave_la_LIBADD = $(LIB_KIO) @PACKAGE_LIBS@ -ldbus-qt-1 -lXss -lXext -lXtst
# this is where the desktop file will go
xdg_apps_DATA = kpowersave.desktop
# and for autostart
autostartdir = $(prefix)/share/autostart
autostart_DATA = kpowersave-autostart.desktop
# this is where the shell's XML-GUI resource file goes
shellrcdir = $(kde_datadir)/kpowersave
shellrc_DATA = eventsrc
# shellrc_DATA = kpowersaveui.rc
# pics subdir
SUBDIRS = pics
messages:
$(EXTRACTRC) *ui eventsrc >> rc.cpp
$(XGETTEXT) `find . -name \*.h -o -name \*.H -o -name \*.cpp -o -name \*.C` -o $(podir)/kpowersave.pot
rm -f rc.cpp
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(kde_confdir)
$(INSTALL_DATA) $(top_srcdir)/src/config/kpowersaverc_default $(DESTDIR)$(kde_confdir)/kpowersaverc

@ -0,0 +1,91 @@
/***************************************************************************
* Copyright (C) 2007 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*! \file autodimm.cpp
* \brief In this file can be found the autodimm class related code.
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \version 0.0.1
* \date 2007
*/
#include "autodimm.h"
/*! The default constructor of the class autodimm */
autodimm::autodimm() : inactivity() {
kdDebugFuncIn(trace);
lastIdleTime = 0;
checkActivity = new QTimer( this );
connect( checkActivity, SIGNAL(timeout()), this, SLOT(pollActivity()));
kdDebugFuncOut(trace);
}
/*! The default destructor of the class autodimm */
autodimm::~autodimm() {
kdDebugFuncIn(trace);
}
/*!
* Public function to start to check (poll) if the user get active again.
*/
void autodimm::startCheckForActivity() {
kdDebugFuncIn(trace);
lastIdleTime = 0;
// stop the timer if running
if (checkActivity->isActive())
checkActivity->stop();
checkActivity->start(RECHECK_INTERVALL, false);
kdDebugFuncOut(trace);
}
/*!
* \b SLOT to call check if the user is active again.
*/
void autodimm::pollActivity() {
kdDebugFuncIn(trace);
unsigned long idletime = 0;
idletime = getXInactivity();
if (idletime < lastIdleTime) {
kdDebug() << "Looks as if the user is active again (lastIdleTime:" << lastIdleTime
<< " , current idletime: " << idletime << ")" << endl;
// The user is/was active ...
if (idletime <= 1000)
kdDebug() << "Looks as if the user was active within the last second" << endl;
// stop the timer ... no need to let run ... start again if needed
if (checkActivity->isActive()) checkActivity->stop();
// emit the signal that the user is active again.
emit UserIsActiveAgain();
} else {
lastIdleTime = idletime;
}
kdDebugFuncOut(trace);
}
#include "autodimm.moc"

@ -0,0 +1,79 @@
/***************************************************************************
* Copyright (C) 2007 by Danny Kukawka *
* <dkukawka@suse.de>, >danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file autodimm.h
* \brief Headerfile for autodimm.cpp and the class \ref autodimm.
*/
/*!
* \class autodimm
* \brief class for 'dimm the display on user inactivity' related funtionality
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \version 0.0.1
* \date 2007
*/
#ifndef AUTODIMM_H
#define AUTODIMM_H
// from project
#include "inactivity.h"
class autodimm : public inactivity
{
Q_OBJECT
public:
//! default constructor
autodimm();
//! default destructor
~autodimm();
//! to start check if the user is active again
void startCheckForActivity();
signals:
//! signal emited if the user is active again
void UserIsActiveAgain();
private:
//! idle time from the last check
unsigned long lastIdleTime;
//! QTimer intervall for the Timer to recheck for user activity
/*!
* The time intervall to recheck for the activity of the user.
* The timeslice is currently 1 sec.
*/
static const int RECHECK_INTERVALL = 1000;
//! QTimer for check activity
/*!
* This timer is used to check if the user get active again.
* The timerinterval is defined trough \ref RECHECK_INTERVALL .
*/
QTimer *checkActivity;
private slots:
//! to poll X to get info if the user is active again
void pollActivity();
};
#endif

@ -0,0 +1,39 @@
/***************************************************************************
* Copyright (C) 2004 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*! \file autosuspend.cpp
* \brief In this file can be found the autosuspend related code.
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2005
*/
#include "autosuspend.h"
/*! The default constructor of the class autosuspend */
autosuspend::autosuspend() : inactivity () {
kdDebugFuncIn(trace);
}
/*! The default destructor of the class autosuspend */
autosuspend::~autosuspend() {
kdDebugFuncIn(trace);
}
#include "autosuspend.moc"

@ -0,0 +1,48 @@
/***************************************************************************
* Copyright (C) 2004 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef AUTOSUSPEND_H
#define AUTOSUSPEND_H
// from project
#include "inactivity.h"
/*!
* \file autosuspend.h
* \brief Headerfile for autosuspend.cpp and the class \ref autosuspend.
*/
/*!
* \class autosuspend
* \brief class for autosuspend related funtionality
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2005
*/
class autosuspend : public inactivity
{
Q_OBJECT
public:
//! default constructor
autosuspend();
//! default destructor
~autosuspend();
};
#endif

@ -0,0 +1,275 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>blacklistedit_Dialog</class>
<widget class="QDialog">
<property name="name">
<cstring>blacklistedit_Dialog</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>490</width>
<height>246</height>
</rect>
</property>
<property name="caption">
<string>Autosuspend Blacklist Edit</string>
</property>
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="1" column="0">
<property name="name">
<cstring>layout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>buttonOk</cstring>
</property>
<property name="text">
<string>OK</string>
</property>
<property name="accel">
<string></string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" row="0" column="3">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Cancel</string>
</property>
<property name="accel">
<string></string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
<spacer row="0" column="0">
<property name="name">
<cstring>Horizontal Spacing2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>305</width>
<height>20</height>
</size>
</property>
</spacer>
</grid>
</widget>
<widget class="QButtonGroup" row="0" column="0">
<property name="name">
<cstring>bG_scheme</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string></string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLineEdit" row="0" column="0">
<property name="name">
<cstring>lE_blacklist</cstring>
</property>
</widget>
<widget class="QPushButton" row="0" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>pB_add</cstring>
</property>
<property name="text">
<string>Add</string>
</property>
</widget>
<widget class="QPushButton" row="1" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>pB_remove</cstring>
</property>
<property name="text">
<string>Remove</string>
</property>
<property name="accel">
<string></string>
</property>
</widget>
<widget class="QListBox" row="0" column="3" rowspan="3" colspan="1">
<property name="name">
<cstring>lB_blacklist</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>150</height>
</size>
</property>
</widget>
<spacer row="1" column="0">
<property name="name">
<cstring>spacer22</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Preferred</enum>
</property>
<property name="sizeHint">
<size>
<width>31</width>
<height>20</height>
</size>
</property>
</spacer>
<spacer row="2" column="2">
<property name="name">
<cstring>spacer23</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Preferred</enum>
</property>
<property name="sizeHint">
<size>
<width>21</width>
<height>140</height>
</size>
</property>
</spacer>
<widget class="QLabel" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>tLabel_info</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>3</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>220</width>
<height>110</height>
</size>
</property>
<property name="text">
<string></string>
</property>
<property name="alignment">
<set>AlignBottom</set>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
<connections>
<connection>
<sender>buttonOk</sender>
<signal>released()</signal>
<receiver>blacklistedit_Dialog</receiver>
<slot>buttonOk_released()</slot>
</connection>
<connection>
<sender>buttonCancel</sender>
<signal>released()</signal>
<receiver>blacklistedit_Dialog</receiver>
<slot>buttonCancel_released()</slot>
</connection>
<connection>
<sender>pB_remove</sender>
<signal>released()</signal>
<receiver>blacklistedit_Dialog</receiver>
<slot>pB_remove_released()</slot>
</connection>
<connection>
<sender>pB_add</sender>
<signal>released()</signal>
<receiver>blacklistedit_Dialog</receiver>
<slot>pB_add_released()</slot>
</connection>
<connection>
<sender>lE_blacklist</sender>
<signal>textChanged(const QString&amp;)</signal>
<receiver>blacklistedit_Dialog</receiver>
<slot>lE_blacklist_textChanged()</slot>
</connection>
<connection>
<sender>lB_blacklist</sender>
<signal>currentChanged(QListBoxItem*)</signal>
<receiver>blacklistedit_Dialog</receiver>
<slot>lB_blacklist_currentChanged()</slot>
</connection>
</connections>
<tabstops>
<tabstop>buttonOk</tabstop>
<tabstop>buttonCancel</tabstop>
<tabstop>lE_blacklist</tabstop>
<tabstop>pB_add</tabstop>
<tabstop>pB_remove</tabstop>
<tabstop>lB_blacklist</tabstop>
</tabstops>
<slots>
<slot>buttonOk_released()</slot>
<slot>buttonCancel_released()</slot>
<slot>buttonApply_released()</slot>
<slot>pB_remove_released()</slot>
<slot>pB_add_released()</slot>
<slot>lB_blacklist_selected( QListBoxItem * )</slot>
<slot>lE_blacklist_textChanged()</slot>
<slot>lB_blacklist_selected()</slot>
<slot>lB_blacklist_currentChanged(QListBoxItem*)</slot>
<slot>lB_blacklist_currentChanged()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -0,0 +1,172 @@
/***************************************************************************
* Copyright (C) 2005 by Danny Kukawka *
* danny.kukawka@web.de, dkukawka@suse.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file blacklisteditdialog.cpp
* \brief In this file can be found the "blacklist edit dialog" related code.
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2005
*/
// own header
#include "blacklisteditdialog.h"
// KDE headers:
#include <klocale.h>
#include <kiconloader.h>
// QT headers:
#include <qbuttongroup.h>
#include <qdialog.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qlistbox.h>
#include <qpushbutton.h>
#include <qstring.h>
#include <qstringlist.h>
#include <qtooltip.h>
/*! This is the default constructor of class blacklistEditDialog . */
blacklistEditDialog::blacklistEditDialog( QStringList blacklisted, QString captionName,
bool initImport, QWidget *parent, const char *name)
:blacklistedit_Dialog(parent, name, false, WDestructiveClose )
{
blacklist = blacklisted;
changed = initImport;
pB_add->setEnabled(false);
pB_remove->setEnabled(false);
lB_blacklist->insertStringList(blacklist);
lB_blacklist->sort();
if (captionName.startsWith(i18n("General Blacklist")))
this->bG_scheme->setTitle(captionName);
else
this->bG_scheme->setTitle( i18n("Scheme: ") + captionName);
this->setIcon(SmallIcon("configure", QIconSet::Automatic));
buttonCancel->setIconSet(SmallIconSet("cancel", QIconSet::Automatic));
buttonOk->setIconSet(SmallIconSet("ok", QIconSet::Automatic));
pB_add->setIconSet(SmallIconSet("forward", QIconSet::Automatic));
pB_remove->setIconSet(SmallIconSet("back", QIconSet::Automatic));
}
/*! This is the default destructor of class blacklistEditDialog . */
blacklistEditDialog::~blacklistEditDialog()
{
// no need to delete child widgets, Qt does it all for us
}
/*!
* SLOT: called if the 'ok' button clicked. This SLOT emit
* \ref config_finished() and close the dialog.
*/
void blacklistEditDialog::buttonOk_released() {
if(changed == true) {
changed = false;
emit config_finished( blacklist );
}
close();
}
/*!
* SLOT: called if the 'cancel' button clicked. This SLOT close
* the dialog.
*/
void blacklistEditDialog::buttonCancel_released(){
changed = false;
close();
}
/*!
* SLOT: called if the 'remove' button clicked. The SLOT try to remove
* the selected item from the QListBox and the QStringList \ref blacklist .
*/
void blacklistEditDialog::pB_remove_released(){
if(blacklist.remove(lB_blacklist->selectedItem()->text()) > 0) {
lB_blacklist->removeItem(lB_blacklist->currentItem());
lB_blacklist->sort();
changed = true;
pB_remove->setEnabled(false);
tLabel_info->setText(i18n("Selected entry removed."));
}
else {
tLabel_info->setText(i18n("Could not remove the selected entry."));
}
}
/*!
* SLOT: called if the 'add' button clicked. The SLOT try to add the string from
* the QLineEdit lE_blacklist to the QListBox and the QStringList \ref blacklist .
*/
void blacklistEditDialog::pB_add_released(){
QString text = lE_blacklist->text();
// remove the whitespaces and check if text is empty
if(text.stripWhiteSpace() != "") {
// check if the entry is already present
if(!lB_blacklist->findItem(text, Qt::ExactMatch)) {
lB_blacklist->insertItem(text);
lB_blacklist->sort();
blacklist.append(text);
blacklist.sort();
tLabel_info->setText(i18n("Inserted new entry."));
changed = true;
}
else {
tLabel_info->setText(i18n("Entry exists already. Did not insert new entry."));
}
}
else tLabel_info->setText(i18n("Empty entry was not inserted."));
// set the widgets back to default
lE_blacklist->setText("");
pB_remove->setEnabled(false);
pB_add->setEnabled(false);
}
/*!
* SLOT: called if a item in the QListBox lB_blacklist is selected.
* Here we enable the remove button pB_remove .
*/
void blacklistEditDialog::lB_blacklist_currentChanged(){
// enable the remove button
pB_remove->setEnabled(true);
}
/*!
* SLOT: called if the input-line in the dialog is modified. Here we enable
* the add button pB_add .
*/
void blacklistEditDialog::lE_blacklist_textChanged(){
// enable the add button
pB_add->setEnabled(true);
}
#include "blacklisteditdialog.moc"

@ -0,0 +1,94 @@
/***************************************************************************
* Copyright (C) 2005 by Danny Kukawka *
* danny.kukawka@web.de, dkukawka@suse.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file blacklisteditdialog.h
* \brief Headerfile for blacklisteditdialog.cpp and the class \ref
* blacklistEditDialog .
*/
/*!
* \class blacklistEditDialog
* \brief class for dialog to edit the blacklist related funtionality
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2005
*/
#ifndef BLACKLISTEDITDIALOG_H
#define BLACKLISTEDITDIALOG_H
#include "blacklistedit_Dialog.h"
class blacklistEditDialog: public blacklistedit_Dialog {
Q_OBJECT
public:
//! default constructor
blacklistEditDialog(QStringList blacklisted, QString captionName, bool initImport = false,
QWidget *parent = 0, const char *name = 0);
//! default destructor
~blacklistEditDialog();
private:
//! QStringList with the blacklisted processes
/*!
* This QStringList contains the given blacklisted processes
* for edit. If the dialog changed, we change also this list.
*/
QStringList blacklist;
//! to tell if the blacklist was changed
/*!
* This boolean value tells if the current blacklist was changed.
* \li true: if the blacklist changed
* \li false: if the blacklist isn't changed
*/
bool changed;
private slots:
//! called if the 'ok' button clicked
void buttonOk_released();
//! called if the 'cancel' button clicked
void buttonCancel_released();
//! called if the 'remove' button clicked
void pB_remove_released();
//! called if the 'add' button clicked
void pB_add_released();
//! called if a item of the listbox selected
void lB_blacklist_currentChanged();
//! called if something input in the QLineEdit
void lE_blacklist_textChanged();
signals:
//! signal emited if the configuration finished
/*!
* This signal is emited if the configuration is finished
* and the blacklist was modified-
* \return QStringList (the modified blacklist)
*/
void config_finished( QStringList );
};
#endif

@ -0,0 +1,151 @@
[General]
lockOnSuspend=true
lockOnLidClose=true
ActionOnLidClose=
ActionOnLidCloseValue=
ActionOnPowerButton=SHUTDOWN
ActionOnPowerButtonValue=
ActionOnSleepButton=SUSPEND2RAM
ActionOnS2DiskButton=SUSPEND2DISK
buttonsAllowedActions=SHUTDOWN,LOGOUT_DIALOG,SUSPEND2DISK,SUSPEND2RAM
AutoSuspendCountdown=true
AutoSuspendCountdownTimeOut=30
Autostart=true
AutostartNeverAsk=false
unmountExternalOnSuspend=false
callSetPowerSaveOnAC=true
lockMethod=automatic
timeToFakeKeyAfterLock=2500
forceDpmsOffOnLidClose=true
psMsgAsPassivePopup=false
autoInactiveBlacklist=mplayer,gmplayer,kaffeine,xine,mencoder,cdrecord,cdrecord-dvd,cdrdao,growisofs,kdetv,xawtv,realplay.bin,wodim
autoDimmBlacklist=mplayer,gmplayer,kaffeine,xine,kdetv,xawtv,realplay.bin
schemes=Performance,Powersave,Presentation,Acoustic
ac_scheme=Performance
battery_scheme=Powersave
batteryWarning=12
batteryWarningAction=
batteryWarningActionValue=
batteryLow=7
batteryLowAction=BRIGHTNESS
batteryLowActionValue=1
batteryCritical=2
batteryCriticalAction=SHUTDOWN
batteryCriticalActionValue=
batteryAllowedActions=SHUTDOWN,SUSPEND2DISK,SUSPEND2RAM,CPUFREQ_POWERSAVE,CPUFREQ_PERFORMANCE,CPUFREQ_DYNAMIC,BRIGHTNESS
[default-scheme]
specSsSettings=false
disableSs=false
blankSs=false
specPMSettings=false
standbyAfter=5
suspendAfter=10
powerOffAfter=15
disableDPMS=false
autoSuspend=false
autoInactiveAction=_NONE_
autoInactiveActionAfter=0
autoInactiveSchemeBlacklistEnabled=false
autoInactiveSchemeBlacklist=
autoDimm=false
autoDimmAfter=0
autoDimmTo=50
autoDimmSchemeBlacklistEnabled=false
autoDimmSchemeBlacklist=
enableBrightness=true
brightnessPercent=100
cpuFreqPolicy=DYNAMIC
cpuFreqPolicyPerformance=51
[Performance]
specSsSettings=false
specPMSettings=true
standbyAfter=10
suspendAfter=20
powerOffAfter=30
disableDPMS=false
autoSuspend=false
autoInactiveAction=_NONE_
autoInactiveActionAfter=0
autoInactiveSchemeBlacklistEnabled=false
autoInactiveSchemeBlacklist=
autoDimm=false
autoDimmAfter=0
autoDimmTo=50
autoDimmSchemeBlacklistEnabled=false
autoDimmSchemeBlacklist=
enableBrightness=true
brightnessPercent=100
cpuFreqPolicy=DYNAMIC
cpuFreqDynamicPerformance=75
[Powersave]
specSsSettings=true
disableSs=false
blankSs=true
specPMSettings=true
standbyAfter=2
suspendAfter=3
powerOffAfter=5
disableDPMS=false
autoSuspend=false
autoInactiveAction=_NONE_
autoInactiveActionAfter=0
autoInactiveSchemeBlacklistEnabled=false
autoInactiveSchemeBlacklist=
autoDimm=true
autoDimmAfter=5
autoDimmTo=15
autoDimmSchemeBlacklistEnabled=No
autoDimmSchemeBlacklist=
enableBrightness=true
brightnessPercent=50
cpuFreqPolicy=DYNAMIC
cpuFreqDynamicPerformance=25
[Presentation]
specSsSettings=true
disableSs=true
specPMSettings=true
standbyAfter=10
suspendAfter=20
powerOffAfter=30
disableDPMS=true
autoSuspend=false
autoInactiveAction=_NONE_
autoInactiveActionAfter=0
autoInactiveSchemeBlacklistEnabled=false
autoInactiveSchemeBlacklist=
autoDimm=false
autoDimmAfter=0
autoDimmTo=100
autoDimmSchemeBlacklistEnabled=false
autoDimmSchemeBlacklist=
enableBrightness=true
brightnessPercent=100
cpuFreqPolicy=DYNAMIC
cpuFreqDynamicPerformance=60
[Acoustic]
specSsSettings=true
disableSs=false
specPMSettings=true
standbyAfter=5
suspendAfter=7
powerOffAfter=10
disableDPMS=false
autoSuspend=false
autoInactiveAction=_NONE_
autoInactiveActionAfter=0
autoInactiveSchemeBlacklistEnabled=false
autoInactiveSchemeBlacklist=
autoDimm=false
autoDimmAfter=0
autoDimmTo=50
autoDimmSchemeBlacklistEnabled=false
autoDimmSchemeBlacklist=
enableBrightness=true
brightnessPercent=100
cpuFreqPolicy=DYNAMIC
cpuFreqDynamicPerformance=50

@ -0,0 +1,9 @@
#MIN_CONFIG(3.0.0)
AM_INIT_AUTOMAKE(kpowersave, 0.1)
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN
AC_PATH_QT
AC_PATH_QT_MOC_UIC

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,225 @@
/***************************************************************************
* Copyright (C) 2005 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef CONFIGUREDIALOG_H
#define CONFIGUREDIALOG_H
/*!
* \file configuredialog.h
* \brief Headerfile for configureDialog.cpp and the class \ref ConfigureDialog.
*/
/*!
* \class ConfigureDialog
* \brief class for all config dialog related funtionality
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2005
*/
// own header
#include "blacklisteditdialog.h"
#include "settings.h"
#include "hardware.h"
// header of the UI
#include "configure_Dialog.h"
class ConfigureDialog: public configure_Dialog {
Q_OBJECT
public:
//! default constructor
ConfigureDialog( KConfig *_config, HardwareInfo *_hwinfo, Settings *_settings,
QWidget *parent = 0, const char *name = 0);
//! default destructor
~ConfigureDialog();
private:
//! pointer to instance of the blacklist edit dialog for Autosuspend
blacklistEditDialog* blacklistEDlgAS;
//! pointer to instance of the blacklist edit dialog for Autodimm
blacklistEditDialog* blacklistEDlgAD;
//! the pointer to the config of kpowersave, get from constructor
KConfig *kconfig;
//! pointer to the KPowersave settings, get from constructor
Settings *settings;
//! pointer to hardware information and actions
HardwareInfo *hwinfo;
//! struct with allowed suspend states
SuspendStates suspend;
//! QStringList with the blacklisted processes
QStringList blacklist;
//! QStringList with all available supported actions
QStringList actions;
//! QStringList with the name of the schemes in the config
QStringList schemes;
//! true if the current desktop session is a GNOME session, else if not
bool gnome_session;
//! true if a value within the Tab 'General Settings' is changed, else if not
bool general_changed;
//! true if all is initialised, false if not
bool initalised;
//! true if a value within the Tab 'Scheme Settings' is changed, else if not
bool scheme_changed;
//! true if the warning message was displayed , else if not!
bool displayed_WARN_autosuspend;
//! true if the brightness was changed
bool brightness_changed;
//! represent the ID of the current selected scheme related to the schemeList
int currentScheme;
//! the max numbers of levels supported by the machine
int brightnessLevels;
//! the brightness as the configdialog was started
int brightness_last;
//! to store the changed 'General' setttings
void saveGeneralSettings();
//! to store the (changed) settings of the current scheme
void saveSchemeSettings();
//! set all needed widgets in the dialog for a given ID of a scheme
void setConfigToDialog( int );
//! set the values from the section general in configfile to dialog
void setGeneralSettings();
//! set all needed icons
void setIcons();
//! set all needed tooltips
void setTooltips();
//! set the gB_inactivity visible/invisible
void setInactivityBox();
//! set the schemelist to the listbox
void setSchemeList();
//! get the list of schemes and fill \ref schemes
void getSchemeList();
//! set the current scheme
void selectScheme (QString _scheme);
//! to get the real Name of the Scheme
QString getSchemeRealName( QString );
//! map a action string from options to a description
QString mapActionToDescription( QString action );
//! map a (translated) description of a action back to the name config key
QString mapDescriptionToAction( QString description );
//! fill a QComboBox with actions (translated text) and select a value
void fillActionComboBox(QComboBox *_cb, QStringList _actions, QString _select);
signals:
//! signal to open the Help
void openHelp();
//! signal to open the KNotify dialog
void openKNotify();
private slots:
//! alled if the user click on 'Apply' Button
void buttonApply_clicked();
//! called if the user click on 'Chancel' Button
void buttonCancel_clicked();
//! called if the user click on 'OK' Button
void buttonOk_clicked();
//! called if the user click on 'Help' Button
void buttonHelp_clicked();
//! called if the 'Enable scheme specific blacklist' checkbox toggled
void cB_Blacklist_toggled( bool );
//! called if the 'Disable screensaver' checkbox toggled
void cB_disable_Ss_toggled( bool );
//! called if the 'disablePM' checkbox toggled
void cB_disablePM_toggled( bool );
//! called if the 'SpecificPM' checkbox toggled
void cB_SpecificPM_toggled( bool );
//! called if the 'specificSettings' checkbox toggled
void cB_specificSettings_toggled( bool );
//! called if the checkbox cB_autoSuspend toggled
void cB_autoSuspend_toggled( bool );
//! called if the current comboB_autoInactivity item is changed
void cB_autoInactivity_activated( int );
//! called if the checkbox cB_autoDimm toggled
void cB_autoDimm_toggled( bool );
//! called if the 'Enable scheme specific blacklist' checkbox toggled
void cB_BlacklistDimm_toggled( bool );
//! called if the value of sB_autoDimmTime get changed
void sB_autoDimmTime_valueChanged( int );
//! called if a value in section 'general' changed
void general_valueChanged();
//! called if the current 'schemes' ListBoxItem changed
void listBox_schemes_currentChanged();
//! called if a checkbox in section 'scheme' changed
void scheme_valueChanged();
//! called if the pB_editBlacklist clicked
void pB_editBlacklistSuspend_clicked();
//! to store the changed and from BlacklistEditDlg recieved suspend blacklist to scheme
void saveSchemeSuspendBlacklist( QStringList );
//! called if the pB_editBlacklistDimm clicked
void pB_editBlacklistDimm_clicked();
//! to store the changed and from BlacklistEditDlg recieved dimm blacklist to scheme
void saveSchemeDimmBlacklist( QStringList );
//! called if the checkbox cB_Brightness toggled
void cB_Brightness_toggled ( bool );
//! called if the slider for brightness changed
void brightnessSlider_sliderMoved( int );
//! called if pB_resetBrightness clicked
void pB_resetBrightness_clicked();
//! called if pB_configNotify released
void pB_configNotify_released();
//! called if the button for a new scheme get clicked
void pB_newScheme_clicked();
//! called if the button for delete a scheme get clicked
void pB_deleteScheme_clicked();
//! called if the value of the standby DPMS spinBox changed
void sB_standby_valueChanged();
//! called if the value of the suspend DPMS spinBox changed
void sB_suspend_valueChanged();
//! called if the value of the powerOff DPMS spinBox changed
void sB_powerOff_valueChanged();
//! called if the warning QSpinBoxes for battery level is changed
void sB_batWarning_valueChanged();
//! called if the low QSpinBoxes for battery level is changed
void sB_batLow_valueChanged();
//! called if the critical QSpinBoxes for battery level is changed
void sB_batCritical_valueChanged();
//! called if the QComboBox for the battery warning level action changed
void cB_batWarning_activated();
//! called if the QComboBox for the battery low level action changed
void cB_batLow_activated();
//! called if the QComboBox for the battery critical level action changed
void cB_batCritical_activated();
};
#endif

@ -0,0 +1,204 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>countdown_Dialog</class>
<widget class="QDialog">
<property name="name">
<cstring>countdown_Dialog</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>344</width>
<height>127</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="caption">
<string></string>
</property>
<property name="sizeGripEnabled">
<bool>false</bool>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer row="2" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>spacer3</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>142</width>
<height>21</height>
</size>
</property>
</spacer>
<widget class="QPushButton" row="2" column="4">
<property name="name">
<cstring>pB_cancel</cstring>
</property>
<property name="text">
<string>&amp;Cancel</string>
</property>
<property name="accel">
<string>Alt+C</string>
</property>
</widget>
<spacer row="1" column="0">
<property name="name">
<cstring>spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Maximum</enum>
</property>
<property name="sizeHint">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</spacer>
<spacer row="2" column="5" rowspan="1" colspan="2">
<property name="name">
<cstring>spacer4</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>144</width>
<height>21</height>
</size>
</property>
</spacer>
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>iconPixmap</cstring>
</property>
<property name="minimumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="pixmap">
<pixmap>image0</pixmap>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
<spacer row="0" column="2">
<property name="name">
<cstring>spacer5</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>5</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLabel" row="0" column="3" rowspan="1" colspan="4">
<property name="name">
<cstring>textLabel</cstring>
</property>
<property name="text">
<string></string>
</property>
<property name="textFormat">
<enum>AutoText</enum>
</property>
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
<spacer row="1" column="6">
<property name="name">
<cstring>spacer2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Maximum</enum>
</property>
<property name="sizeHint">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="KProgress" row="1" column="1" rowspan="1" colspan="5">
<property name="name">
<cstring>progressBar</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>20</height>
</size>
</property>
</widget>
</grid>
</widget>
<images>
<image name="image0">
<data format="XPM.GZ" length="2304">789c8593c9721a311086ef3cc5947573a5dacc303043a57230b6f1beef4ee530128bc1069bcd5b2aef9e5f52b702d855410cf0a9b7bf5b626d35ba39398c56d74a936931ed99c8dc17e368b5351b0cde7ffefaf1bbb4922411de59354a56be9556681c994895ddcbf12c70eeb8c19cb27d12d8d955c7711efc47cc6ca7a970ece2559739e77c3781bdff85b0f7a71d66c3fecf81bdff8be7b8ccfe75cb71b96c98ef3cc7a27f37b08fbf1266ff3eb3e879779c076e0ab3ff03b3e88985d95eb69cd42b329f4761b6f798a57ed572250efcc12cf56acc92ffd2732af932c775b03f9f4238f1f637cb699c72bc3281bdbe7bcbd5a456653e715c04ce99eb5c6f10d8db9f84b9de3a738bede7c2deae7cbd228bd99e58ae2562a7d47316b37f8bb9caac1c17b9c46f0973fc2db3e8df6716fd1b96b34a883f6516ff0ab3f4776839d745c1f98f2cd7d3c07b81eb8ebbcc6dd64b9e75c2fe078e8d663b5d5b2e52dde67a9bc21cdff36c12d63f0cecfd5bc29c6f9bb9c6f74f0973bc0eecedafc21c7fc65c707c4798ef4fdbb191fa4a0b73fc31b3d433817d3e89977a0533e73f9d06ce3d93a282d4fcb73ccbfbbedf85a5977861f9fa4bb93496a116b53fd798cbdfe1dc5dbaa71ef5e9811e69005aa839af1f11437aa2671ad1982678a634a317c4bc7ea95fc3fbcd79cee81d153e5063e2f80d96aff4af5303b9fbb4419bd0afd1c11635113d428d3658f46fb3ee1df8efd21ee77aa57d3aa043c48fa1f1888e17f41b3a419e199d22dad019f6cee9822e5169cbf5f3f4497f0fbb57748daeb79d36eb7543b788b8c3aff2d27c0ce637418c71bfd7e16975af439546e7638ad14d27e4b7937cc0ee87d36dbdc7e8654c899b5b0f99faf6f4e6f2b7713a53ecb6a802dd13e4f64f0a3d764655d273fa35340fb03b41779b5443fe017237dcca506744f9bff9b8b32d30cf3a229a98e0266ad83b94baf3b027b6a3e8d3fd39c644ed79f695822a5bf34015dc47e6e2b717ee8f565a19d7a93de30f74d9740a6d8d866a7dca8fa5dad0fd8c8899bf71aa8333cfe0ddc5ccf457f71f73eae22c7b98f73b6632806ef4a1eedd348ba5fbc97da81e3e87f018867d7916ef7f31f75feab86f1df6cd57faffbf56fe7c2ffd0519fbee77</data>
</image>
</images>
<connections>
<connection>
<sender>pB_cancel</sender>
<signal>pressed()</signal>
<receiver>countdown_Dialog</receiver>
<slot>pB_cancel_pressed()</slot>
</connection>
</connections>
<slots>
<slot>pB_cancel_pressed()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -0,0 +1,177 @@
/***************************************************************************
* Copyright (C) 2007 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*! \file countdowndialog.cpp
* \brief In this file can be found the countdown dialog related code.
* \author Danny Kukawka, <dkukawka@suse.de, danny.kukawka@web.de>
* \date 2007
*/
// own header
#include "countdowndialog.h"
#include "kpowersave_debug.h"
// KDE headers:
#include <klocale.h>
#include <kiconloader.h>
#include <kprogress.h>
// QT headers:
#include <qdialog.h>
#include <qlabel.h>
#include <qprogressbar.h>
#include <qpushbutton.h>
#include <qstring.h>
#include <qtimer.h>
/*! This is the default constructor of class countDownDialog . */
countDownDialog::countDownDialog( int timeout, QWidget *parent, const char *name)
:countdown_Dialog(parent, name, false, Qt::WStyle_StaysOnTop | Qt::WDestructiveClose )
{
kdDebugFuncIn(trace);
chancel = false;
remaining = timeout;
timeOut = timeout;
PROGRESS = new QTimer(this);
connect(PROGRESS, SIGNAL(timeout()), this, SLOT(updateProgress()));
this->setCaption(i18n("KPowersave"));
kdDebugFuncOut(trace);
}
/*! This is the default destructor of class countDownDialog . */
countDownDialog::~countDownDialog() {
kdDebugFuncIn(trace);
// no need to delete child widgets, Qt does it all for us
emit dialogClosed(chancel);
kdDebugFuncOut(trace);
}
/*!
* This used to set Icon/pixmap for the dialog.
* \param type QString with the type of the current suspend
* to set the pixmap in the dialog
*/
void countDownDialog::setPixmap( QString type )
{
QPixmap pixmap = 0;
if(type.startsWith("suspend2disk")){
pixmap = KGlobal::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);
} else if (type.startsWith("standby")) {
pixmap = KGlobal::iconLoader()->loadIcon("stand_by", KIcon::NoGroup, KIcon::SizeLarge);
} else {
pixmap = KGlobal::iconLoader()->loadIcon("kpowersave", KIcon::NoGroup, KIcon::SizeLarge);
}
iconPixmap->setPixmap( pixmap );
}
/*!
* To set the message to the dialog, which should be shown to the user.
* \param text QString with the message.
*/
void countDownDialog::setMessageText(QString text) {
kdDebugFuncIn(trace);
if (!text.isEmpty()) {
textLabel->setText(text);
}
kdDebugFuncOut(trace);
}
/*!
* To show the dialog and start the countdown.
* \return boolean with the result of the operation
* \retval true if the dialog could get displayed
* \retval false if there is any problem
*/
bool countDownDialog::showDialog() {
kdDebugFuncIn(trace);
bool _retval = false;
if (!textLabel->text().isEmpty() && timeOut > 0) {
// init the progressbar
progressBar->setFormat(i18n("%1 seconds").arg(remaining));
progressBar->setPercentageVisible(true);
progressBar->setProgress(100);
progressBar->setEnabled(true);
this->adjustSize();
this->show();
PROGRESS->start(1000, true);
}
kdDebugFuncOut(trace);
return _retval;
}
/*!
* \b SLOT to get the event if the 'Cancel' button was pressed.
*/
void countDownDialog::pB_cancel_pressed() {
kdDebugFuncIn(trace);
if (PROGRESS->isActive())
PROGRESS->stop();
chancel = true;
close();
kdDebugFuncOut(trace);
}
/*!
* \b SLOT to handle the change of the progressbar.
*/
void countDownDialog::updateProgress() {
kdDebugFuncIn(trace);
if (remaining == 0 ) {
if (PROGRESS->isActive())
PROGRESS->stop();
chancel = false;
close();
} else if ( remaining > 0) {
int setTo = (int)((100.0/(float)timeOut)*(float)remaining);
// set the progressBar
progressBar->setFormat(i18n("%1 seconds").arg(remaining));
progressBar->setPercentageVisible(true);
progressBar->setProgress(setTo);
progressBar->setEnabled(true);
// increase counter
remaining--;
// start needed timer
PROGRESS->start(1000, true);
}
kdDebugFuncOut(trace);
}
#include "countdowndialog.moc"

@ -0,0 +1,83 @@
/***************************************************************************
* Copyright (C) 2007 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file countdowndialog.h
* \brief Headerfile for countdowndialog.cpp and the class \ref countDownDialog.
*/
/*!
* \class countDownDialog
* \brief class for countdown dialog related funtionality
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2007
*/
#ifndef COUNTDOWNDIALOG_H
#define COUNTDOWNDIALOG_H
#include "countdown_Dialog.h"
class countDownDialog: public countdown_Dialog {
Q_OBJECT
public:
//! default constructor
countDownDialog(int timeout, QWidget *parent = 0, const char *name = 0);
//! default destructor
~countDownDialog();
//! set needed icons
void setPixmap( QString );
//! to set the message text for the user
void setMessageText(QString text);
//! to show up the dialog
bool showDialog();
private:
//! Timer for the timeout
/*!
* This timer is used to change the progressbar and to close the dialog if
* the \ref timeOut is over.
*/
QTimer *PROGRESS;
//! time the dialog should be displayed
int timeOut;
//! remaining time to show the dialog
int remaining;
//! to store the info if the countdown was chanceled
bool chancel;
private slots:
//! to update the progressbar
void updateProgress();
//! to catch the event if the 'Chancel' button get pressed
void pB_cancel_pressed();
signals:
//! emited if the dialog get closed
void dialogClosed( bool result);
};
#endif

File diff suppressed because it is too large Load Diff

@ -0,0 +1,214 @@
/**************************************************************************
* Copyright (C) 2006-2007 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file dbusHAL.h
* \brief Headerfile for dbusHAL.cpp and the class \ref dbusHAL.
*/
/*!
* \class dbusHAL
* \brief class for connection to HAL via D-Bus
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2006-2007
*/
#ifndef _DBUSHAL_H_
#define _DBUSHAL_H_
#ifndef DBUS_API_SUBJECT_TO_CHANGE
#define DBUS_API_SUBJECT_TO_CHANGE
#endif
// Global Header
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
// QT - Header
#include <qstring.h>
// D-Bus Header
#include <dbus/dbus.h> // needed for dbus_bool_t
#include <dbus/message.h>
#include <dbus/connection.h>
// HAL Library
#include <hal/libhal.h>
// kpowersave - Header
#include "kpowersave_debug.h"
#define HAL_SERVICE "org.freedesktop.Hal"
#define HAL_PM_IFACE "org.freedesktop.Hal.Device.SystemPowerManagement"
#define HAL_LPANEL_IFACE "org.freedesktop.Hal.Device.LaptopPanel"
#define HAL_CPUFREQ_IFACE "org.freedesktop.Hal.Device.CPUFreq"
#define HAL_COMPUTER_UDI "/org/freedesktop/Hal/devices/computer"
#define CK_SERVICE "org.freedesktop.ConsoleKit"
#define CK_MANAGER_IFACE "org.freedesktop.ConsoleKit.Manager"
#define CK_MANAGER_OBJECT "/org/freedesktop/ConsoleKit/Manager"
#define CK_SESSION_IFACE "org.freedesktop.ConsoleKit.Session"
enum msg_type {
ACPI_EVENT,
DBUS_EVENT,
HAL_DEVICE,
HAL_PROPERTY_CHANGED,
HAL_CONDITION,
CONSOLEKIT_SESSION_ACTIVE,
POLICY_POWER_OWNER_CHANGED
};
class dbusHAL : public QObject{
Q_OBJECT
private:
//! QT connection to D-Bus
DBusQt::Connection* m_dBusQtConnection;
//! real connection to D-Bus
DBusConnection *dbus_connection;
//! HAL context
LibHalContext *hal_ctx;
//! to store information if KPowersave is connected to D-Bus
/*!
* This boolean represent information about the state of the connection to D-Bus
* \li true: if connected
* \li false: if disconnected
*/
bool dbus_is_connected;
//! to store information if KPowersave is connected to HAL
/*!
* This boolean represent information about the state of the connection to HAL
* \li true: if connected
* \li false: if disconnected
*/
bool hal_is_connected;
//! if we could claim the org.freedesktop.Policy.Power interface
/*!
* This boolean represent information if KPowersave could claim the
* org.freedesktop.Policy.Power interface from the D-Bus
* \li true: if aquired
* \li false: if not
*/
bool aquiredPolicyPower;
/* D-Bus helper functions */
//! to initialise the connection to D-Bus
bool initDBUS();
//! to call a methode on a dbus interface with reply
bool dbusMethodCall( QString interface, QString path, QString object, QString method,
DBusBusType dbus_type, void *retvalue, int retval_type,
int first_arg_type, va_list var_args);
//! function to be called back by DBusPendingCall::dbus_pending_call_set_notify()
static void callBackSuspend (DBusPendingCall* pcall, void* /*data*/);
/* HAL helper functions */
//! to initialise the connection to HAL
bool initHAL();
//! to free the HAL context
void freeHAL();
public:
//! default constructor
dbusHAL();
//! default destructor
~dbusHAL();
//! to reconnect to D-Bus and HAL
bool reconnect();
//! to reconnect only HAL
bool reconnectHAL();
//! to close the connection to D-Bus and HAL
bool close();
//! to aquire the org.freedesktop.Policy.Power interface
bool aquirePolicyPowerIface();
//! to release the org.freedesktop.Policy.Power interface
bool releasePolicyPowerIface();
//! to check if the org.freedesktop.Policy.Power interface has an owner
bool isPolicyPowerIfaceOwned();
// --- helper to get private members of the class --- //
//! to get information if KPowersave is connected to D-Bus
bool isConnectedToDBUS();
//! to get information if KPowersave is connected to HAL
bool isConnectedToHAL();
//! to get info about claim org.freedesktop.Policy.Power interface
bool aquiredPolicyPowerInterface();
//! return the current HAL context
LibHalContext *get_HAL_context();
//! return the current DBus connection
DBusConnection *get_DBUS_connection();
/* HAL device information stuff */
//! Query a integer device property from HAL
bool halGetPropertyInt(QString udi, QString property, int *returnval);
//! Query a bolean device property from HAL
bool halGetPropertyBool(QString udi, QString property, bool *returnval);
//! Query a string device property from HAL
bool halGetPropertyString(QString udi, QString property, QString *returnval);
//! Query a string list device property from HAL
bool halGetPropertyStringList (QString udi, QString property, QStringList *devices);
//! Query a capability for a HAL device
bool halQueryCapability(QString udi, QString capability, bool *returnval);
/* functions to find devices and check stuff */
//! check if a property exist on a device
bool halDevicePropertyExist(QString udi, QString property);
//! to find a device by capability
bool halFindDeviceByCapability (QString capability, QStringList *devices);
//! to find a device by a string property
bool halFindDeviceByString (QString property, QString keyval, QStringList *devices);
/* D-Bus helper functions */
/* functions to call methodes */
//! to call a methode on a dbus system bus method without reply
bool dbusSystemMethodCall( QString interface, QString path, QString object, QString method,
int first_arg_type, ... );
//! to call a methode on a dbus system bus method with reply
bool dbusSystemMethodCall( QString interface, QString path, QString object, QString method,
void *retvalue, int retval_type, int first_arg_type, ... );
//! to call a suspend method on HAL
bool dbusMethodCallSuspend ( const char *suspend );
/* PolicyKit call helper */
//! check if the user has a requested privilege
int isUserPrivileged( QString privilege, QString udi, QString ressource = "", QString user = QString());
//! wrapper to emit a signal with a event from HAL
void emitMsgReceived( msg_type type, QString message, QString string );
signals:
//! signal with message to forward from D-Bus to HAL
void msgReceived_withStringString( msg_type, QString, QString );
//! signal if we resumed!
void backFromSuspend( int result );
};
//! filter function to filter out needed information from D-Bus messages
DBusHandlerResult filterFunction (DBusConnection *connection, DBusMessage *message, void *data);
#endif

@ -0,0 +1,642 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>detailed_Dialog</class>
<widget class="QDialog">
<property name="name">
<cstring>detailed_Dialog</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>287</width>
<height>381</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>3</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="caption">
<string>kpowersave</string>
</property>
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QGroupBox" row="0" column="0">
<property name="name">
<cstring>GeneralGroup</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>3</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>General Information</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QSplitter" row="0" column="1">
<property name="name">
<cstring>splitter7</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout17</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="0" column="1">
<property name="name">
<cstring>InfoLabelValue</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>3</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<bold>1</bold>
</font>
</property>
<property name="text">
<string></string>
</property>
<property name="alignment">
<set>AlignTop|AlignRight</set>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>InfoLabel</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>3</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
<property name="alignment">
<set>AlignTop</set>
</property>
</widget>
</grid>
</widget>
<spacer>
<property name="name">
<cstring>spacer13</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>10</width>
<height>50</height>
</size>
</property>
</spacer>
</widget>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout18</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>InfoPictogram</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer14</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</vbox>
</widget>
</grid>
</widget>
<widget class="QGroupBox" row="1" column="0">
<property name="name">
<cstring>BatteryGroup</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>3</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Battery Status</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer row="0" column="2">
<property name="name">
<cstring>spacer2_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>16</width>
<height>118</height>
</size>
</property>
</spacer>
<widget class="QLayoutWidget" row="0" column="1">
<property name="name">
<cstring>layout15</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="3" column="0">
<property name="name">
<cstring>layout14</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>LabelAC</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>AC Adapter</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer9_3</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>5</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="KLed">
<property name="name">
<cstring>LedAC</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer9</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>5</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLabel">
<property name="name">
<cstring>LabelACStatus</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>plugged in</string>
</property>
<property name="alignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
</hbox>
</widget>
<widget class="QLayoutWidget" row="2" column="0">
<property name="name">
<cstring>powerConsLayout</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>tl_powerConsDesc</cstring>
</property>
<property name="text">
<string>Power Consumtion: </string>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>tl_powerConsValue</cstring>
</property>
<property name="text">
<string></string>
</property>
<property name="alignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
</hbox>
</widget>
<widget class="QFrame" row="0" column="0">
<property name="name">
<cstring>BatteryFrame</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>3</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>NoFrame</enum>
</property>
<property name="frameShadow">
<enum>Raised</enum>
</property>
</widget>
<spacer row="1" column="0">
<property name="name">
<cstring>spacer3</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</grid>
</widget>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout12</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer row="1" column="0">
<property name="name">
<cstring>spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>90</height>
</size>
</property>
</spacer>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>BatteryPictogram</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
<widget class="QGroupBox" row="2" column="0">
<property name="name">
<cstring>ProcessorGroup</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>3</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Processor Status</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout12_2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer row="1" column="0">
<property name="name">
<cstring>spacer5_2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>90</height>
</size>
</property>
</spacer>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>ProcessorPictogram</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</grid>
</widget>
<widget class="QSplitter" row="0" column="1">
<property name="name">
<cstring>splitter6</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout16</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QFrame" row="0" column="0">
<property name="name">
<cstring>ProcessorFrame</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>3</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>NoFrame</enum>
</property>
<property name="frameShadow">
<enum>Raised</enum>
</property>
</widget>
</grid>
</widget>
<spacer>
<property name="name">
<cstring>spacer2_2_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</widget>
</grid>
</widget>
<widget class="QLayoutWidget" row="3" column="0">
<property name="name">
<cstring>layout19</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer row="0" column="0">
<property name="name">
<cstring>spacer2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>230</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QPushButton" row="0" column="1">
<property name="name">
<cstring>OkButton</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>OK</string>
</property>
<property name="accel">
<string></string>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -0,0 +1,497 @@
/***************************************************************************
* Copyright (C) 2006 by Daniel Gollub *
* <dgollub@suse.de> *
* 2006-2007 Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file detaileddialog.cpp
* \brief In this file can be found the detailed dialog related code.
* \author Daniel Gollub <dgollub@suse.de>
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2006-2007
*/
// KDE headers:
#include <kled.h>
#include <kiconloader.h>
#include <klocale.h>
// QT headers:
#include <qpushbutton.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qtimer.h>
#include <qgroupbox.h>
// own headers
#include "detaileddialog.h"
/*!
* This is the default constructor of the class detaileddialog.
*/
detaileddialog::detaileddialog( HardwareInfo *_hwinfo, QPixmap *_pixmap, Settings *_set,
QWidget* parent, const char* name )
: detailed_Dialog( parent, name, false, WDestructiveClose ) {
kdDebugFuncIn(trace);
hwinfo = _hwinfo;
config = _set;
pixmap = _pixmap;
primaryBatteries = hwinfo->getPrimaryBatteries();
cpuInfo = new CPUInfo();
int batteries = primaryBatteries->getNumBatteries();
numOfCPUs = cpuInfo->getCPUNum();
this->setCaption(i18n("KPowersave Information Dialog"));
// use this as compromise with current translation process
// TODO: remove them in the next translation round
GeneralGroup->setTitle(i18n("Miscellaneous"));
ProcessorGroup->setTitle(i18n("CPUs"));
ProcessorGridLayout = new QGridLayout(ProcessorFrame, numOfCPUs, 2, 0, 5, "ProcessorGridLayout");
if (batteries > 0) {
if (batteries > 1) batteries++;
BatteryGroup->setTitle(i18n("Battery state:").remove(":"));
BatteryGridLayout = new QGridLayout(BatteryFrame, batteries, 2, 0, 5, "BatteryGridLayout");
for (int i = 0; i < batteries; i++) {
QLabel *Label = new QLabel(BatteryFrame, "BatteryLabel");
if ((primaryBatteries->getNumBatteries() > 1) && (i == 0))
Label->setText( i18n( "Total:" ));
else if ((primaryBatteries->getNumBatteries() > 1) && (i > 0))
Label->setText( i18n( "Battery %1" ).arg(i));
else
Label->setText( i18n( "Battery %1" ).arg(i + 1));
BatteryGridLayout->addWidget( Label, i , 0);
KProgress *PBar = new KProgress(BatteryFrame, "BatteryPBar");
PBar->setTextEnabled(true);
BatteryPBar.append( PBar );
BatteryGridLayout->addWidget( PBar, i , 1);
}
BatteryFrame->adjustSize();
tl_powerConsDesc->hide();
tl_powerConsValue->hide();
connect(hwinfo, SIGNAL(generalDataChanged()), this, SLOT(setBattery()));
connect(primaryBatteries, SIGNAL(batteryChanged()), this, SLOT(setBattery()));
connect(primaryBatteries, SIGNAL(batteryChargingStateChanged(int)), this,
SLOT(setPowerConsumption()));
connect(primaryBatteries, SIGNAL(batteryRateChanged()), this,
SLOT(setPowerConsumption()));
setBattery();
setPowerConsumption();
} else {
BatteryGroup->hide();
}
cpuInfo->checkCPUSpeed();
ProcessorPictogram->setPixmap(SmallIcon("processor", 22));
for (int i = 0; i < numOfCPUs; i++) {
QLabel *Label = new QLabel(ProcessorFrame, "ProcessorLabel");
Label->setText( i18n( "Processor %1" ).arg(i + 1));
ProcessorGridLayout->addWidget( Label, i , 0);
KProgress *CPUPBar = new KProgress(ProcessorFrame, "ProcessorPBar");
CPUPBar->setTextEnabled(true);
ProcessorPBar.append( CPUPBar );
ProcessorGridLayout->addWidget( CPUPBar, i , 1);
}
ProcessorFrame->adjustSize();
connect(OkButton, SIGNAL(clicked()), this, SLOT(closeDetailedDlg()));
connect(hwinfo, SIGNAL(ACStatus(bool)), this, SLOT(setAC()));
// TODO: replace event
//connect(pd, SIGNAL(schemeDataChanged()), this, SLOT(setInfos()));
connect(hwinfo, SIGNAL(generalDataChanged()), this, SLOT(setInfos()));
if (hwinfo->supportCPUFreq() || cpuInfo->cpuFreqHW) {
// Check if cpufreq is available
cpuInfo->getCPUMaxSpeed();
setProcessor();
connect(hwinfo, SIGNAL(currentCPUFreqPolicyChanged()), this, SLOT(setInfos()));
} else {
// .. if not, use cpu throttling
if (!cpuInfo->getCPUThrottlingState() || numOfCPUs <= 1) {
connect(hwinfo, SIGNAL(generalDataChanged()), this, SLOT(setProcessorThrottling()));
}
setProcessorThrottling();
}
setAC();
setInfos();
kdDebugFuncOut(trace);
}
/*! This is the default destructor of class detaileddialog. */
detaileddialog::~detaileddialog() {
kdDebugFuncIn(trace);
// no need to delete child widgets, Qt does it all for us
}
/*!
* \b SLOT called if the dialog is closed by the user.
* We do some cleanups here.
*/
void detaileddialog::closeDetailedDlg() {
kdDebugFuncIn(trace);
this->close();
delete(this);
}
/*!
* \b SLOT to set up the battery progress widgets.
*/
void detaileddialog::setBattery() {
kdDebugFuncIn(trace);
QString minutes;
int batteries = 0;
// refresh battery collection
primaryBatteries = hwinfo->getPrimaryBatteries();
QPtrList<Battery> allBatteries = hwinfo->getAllBatteries();
batteries = primaryBatteries->getNumBatteries();
if (batteries > 1) batteries++;
for (int i=0; i < batteries ; i++) {
int _r_min = 0;
int _r_per = 0;
int _c_state = UNKNOWN_STATE;
bool _present = false;
BatteryPBar[i]->setTextEnabled(true);
BatteryPBar[i]->reset();
if ( (primaryBatteries->getNumBatteries() > 1) && (i == 0) ) {
// first progressbar with overall infos
_r_min = primaryBatteries->getRemainingMinutes();
_r_per = primaryBatteries->getRemainingPercent();
_c_state = primaryBatteries->getChargingState();
if (primaryBatteries->getNumPresentBatteries() > 0)
_present = true;
}
else {
// find the related primary battery
int _current = 0;
Battery *bat;
for (bat = allBatteries.first(); bat; bat = allBatteries.next() ) {
if (bat->getType() == primaryBatteries->getBatteryType()) {
_current++;
if (!bat->isPresent()) {
_present = false;
}
else {
_r_min = bat->getRemainingMinutes();
_r_per = bat->getPercentage();
_c_state = bat->getChargingState();
_present = true;
}
if (_current == i) {
break;
}
}
}
}
if (!_present) {
BatteryPBar[i]->setFormat(i18n("not present"));
BatteryPBar[i]->setProgress(0);
BatteryPBar[i]->setEnabled(false);
} else {
int hours = _r_min / 60;
minutes.setNum(_r_min % 60);
minutes = minutes.rightJustify(2, '0');
// CHARG_STATE_CHARG_DISCHARG --> display only the percentage
if (_c_state == UNKNOWN_STATE || _r_min < 0 ) {
BatteryPBar[i]->setFormat("%p%");
} else if (_c_state == CHARGING && hwinfo->hasAPM() ) {
// this should fix apm, where we have no time info if charging
BatteryPBar[i]->setFormat("%p% " + i18n("charged"));
} else if (_c_state == CHARGING) {
QString temp = i18n("%1:%2 h until charged").arg(hours).arg(minutes);
BatteryPBar[i]->setFormat(temp);
} else if (_c_state == DISCHARGING) {
QString temp = i18n("%1:%2 h remaining").arg(hours).arg(minutes);
BatteryPBar[i]->setFormat(temp);
} else {
//fallback
BatteryPBar[i]->setFormat(i18n("unknown"));
}
if (_r_per < 0)
BatteryPBar[i]->setProgress(0);
else
BatteryPBar[i]->setProgress(_r_per);
BatteryPBar[i]->setEnabled(true);
}
}
BatteryPictogram->setPixmap(*pixmap);
kdDebugFuncOut(trace);
}
/*!
* \b SLOT to set up the Processor/CPU progress bar widgets.
*/
void detaileddialog::setPowerConsumption() {
kdDebugFuncIn(trace);
// refresh battery collection
primaryBatteries = hwinfo->getPrimaryBatteries();
int rate = primaryBatteries->getCurrentRate();
if (rate > 0 && !primaryBatteries->getChargeLevelUnit().isEmpty()) {
QString _val;
_val.setNum(rate);
_val += " " + primaryBatteries->getChargeLevelUnit().remove('h');
tl_powerConsValue->setText(_val);
if (!tl_powerConsDesc->isShown()) {
tl_powerConsDesc->show();
tl_powerConsValue->show();
}
} else {
if (tl_powerConsDesc->isShown()) {
tl_powerConsDesc->hide();
tl_powerConsValue->hide();
}
}
kdDebugFuncOut(trace);
}
/*!
* \b SLOT to set up the Processor/CPU progress bar widgets.
*/
void detaileddialog::setProcessor() {
kdDebugFuncIn(trace);
cpuInfo->checkCPUSpeed();
for (int i=0; i < numOfCPUs; i++) {
kdDebug() << "ID: " << i << "(" << cpuInfo->cpufreq_speed.count()
<< ") cur_freq: " << cpuInfo->cpufreq_speed[i] << " max_freq: "
<< cpuInfo->cpufreq_max_speed[i] << endl;
//ProcessorPBar[i]->setTextEnabled(true);
if (cpuInfo->cpufreq_speed[i] > 0) {
// CPU/Core is back from offline
if(ProcessorPBar[i]->progress() == 0)
cpuInfo->getCPUMaxSpeed();
if(ProcessorPBar[i]->progress() != cpuInfo->cpufreq_speed[i]) {
// get max cpu freq and set it to the max of the progressbar
int maxfreq = cpuInfo->cpufreq_max_speed[i];
ProcessorPBar[i]->setTotalSteps(maxfreq);
// display 1400 MHz instead of 1400%
ProcessorPBar[i]->setFormat(i18n("%v MHz"));
ProcessorPBar[i]->setProgress(cpuInfo->cpufreq_speed[i]);
ProcessorPBar[i]->setEnabled(true);
}
} else {
ProcessorPBar[i]->setFormat(i18n("deactivated"));
ProcessorPBar[i]->setProgress(0);
ProcessorPBar[i]->setEnabled(false);
}
}
QTimer::singleShot(333, this, SLOT(setProcessor()));
kdDebugFuncOut(trace);
}
/*!
* \b SLOT to set up the Processor/CPU bar widgets for cpu throttling machines.
*/
void detaileddialog::setProcessorThrottling() {
kdDebugFuncOut(trace);
bool throttling = cpuInfo->getCPUThrottlingState();
cpuInfo->checkCPUSpeedThrottling();
for (int i=0; i < numOfCPUs; i++) {
if (throttling)
kdDebug() << "Throttling CPU : " << i << " - freq: " << cpuInfo->cpufreq_speed[i]
<< " - throttling state: " << cpuInfo->cpu_throttling[i] << "%" << endl;
else
kdDebug() << "CPU - freq: " << cpuInfo->cpufreq_speed[i] << endl;
if (throttling && cpuInfo->cpufreq_speed[i] > 0 && cpuInfo->cpu_throttling[i] >= 0) {
// get max cpu freq and set it to the max of the progressbar
ProcessorPBar[i]->setTotalSteps(100);
QString ProgressString = QString("%1% (%2 MHz)").arg(100 - cpuInfo->cpu_throttling[i]).arg(cpuInfo->cpufreq_speed[i]);
ProcessorPBar[i]->setFormat(i18n(ProgressString));
ProcessorPBar[i]->setProgress(100 - cpuInfo->cpu_throttling[i]);
ProcessorPBar[i]->setEnabled(true);
} else if (cpuInfo->cpufreq_speed[i] < 0) {
ProcessorPBar[i]->setFormat(i18n("deactivated"));
ProcessorPBar[i]->setProgress(0);
ProcessorPBar[i]->setEnabled(false);
} else {
ProcessorPBar[i]->setTotalSteps(cpuInfo->cpufreq_speed[i]);
ProcessorPBar[i]->setFormat(i18n("%v MHz"));
ProcessorPBar[i]->setProgress(cpuInfo->cpufreq_speed[i]);
ProcessorPBar[i]->setEnabled(true);
}
}
if (throttling || numOfCPUs > 1) {
// currently there are no events we can use to get actual data
// so we recheck data ever 2 secs to register changes in the
// throttling state and if a CPU/core online state change
QTimer::singleShot(2000, this, SLOT(setProcessorThrottling()));
}
kdDebugFuncOut(trace);
}
/*!
* \b SLOT to set up the AC status within the Led widget.
*/
void detaileddialog::setAC() {
kdDebugFuncIn(trace);
if (hwinfo->getAcAdapter()) {
LabelACStatus->setText( i18n("plugged in") );
LedAC->on();
} else {
LedAC->off();
LabelACStatus->setText( i18n("unplugged") );
}
setInfos();
kdDebugFuncOut(trace);
}
/*!
* \b SLOT to set all additional informtation as e.g. CPUFrequency policy
* or current scheme
*/
void detaileddialog::setInfos() {
kdDebugFuncOut(trace);
QString display;
QString displayValue;
if(!config->currentScheme.isEmpty())
display += i18n("Current Scheme: ") + "\n";
displayValue += i18n(config->currentScheme) + "\n";
if(config->currentScheme == config->ac_scheme)
InfoPictogram->setPixmap(SmallIcon("scheme_power", 22));
else if(config->currentScheme == config->battery_scheme)
InfoPictogram->setPixmap(SmallIcon("scheme_powersave", 22));
else if(config->currentScheme == "Acoustic")
InfoPictogram->setPixmap(SmallIcon("scheme_acoustic", 22));
else if(config->currentScheme == "Presentation")
InfoPictogram->setPixmap(SmallIcon("scheme_presentation", 22));
else if(config->currentScheme == "AdvancedPowersave")
InfoPictogram->setPixmap(SmallIcon("scheme_advanced_powersave", 22));
else
InfoPictogram->setPixmap(SmallIcon("kpowersave", 22));
if(hwinfo->isOnline()) {
if (hwinfo->supportCPUFreq()) {
display += i18n("Current CPU Frequency Policy:") + "\n";
switch (hwinfo->getCurrentCPUFreqPolicy()){
case PERFORMANCE:
displayValue += i18n("Performance") + "\n";
break;
case DYNAMIC:
displayValue += i18n("Dynamic") + "\n";
break;
case POWERSAVE:
displayValue += i18n("Powersave") + "\n";
break;
default:
displayValue += i18n("unknown") + "\n";
break;
}
}
// refresh battery collection
primaryBatteries = hwinfo->getPrimaryBatteries();
int batteries = primaryBatteries->getNumBatteries();
QPtrList<Battery> allBatteries = hwinfo->getAllBatteries();
if (batteries > 0 && primaryBatteries->getNumPresentBatteries() > 0) {
display += i18n("Battery state:") + "\n";
switch (primaryBatteries->getBatteryState()){
case BAT_CRIT:
displayValue += i18n("Critical") + "\n";
break;
case BAT_LOW:
displayValue += i18n("Low") + "\n";
break;
case BAT_WARN:
displayValue += i18n("Warning") + "\n";
break;
case BAT_NORM:
displayValue += i18n("ok") + "\n";
break;
default:
displayValue += i18n("unknown") + "\n";
break;
}
}
if(hwinfo->supportBrightness()) {
display += i18n("Set brightness supported:") + "\n";
displayValue += i18n("yes") + "\n";
} else {
display += i18n("Set brightness supported:") + "\n";
displayValue += i18n("no") + "\n";
}
display += i18n("HAL Daemon:");
displayValue += i18n("running");
}
else {
display += i18n("HAL Daemon:");
displayValue += i18n("not running");
}
if(!display.isEmpty())
InfoLabel->setText(display);
InfoLabelValue->setText(displayValue);
kdDebugFuncOut(trace);
}
#include "detaileddialog.moc"

@ -0,0 +1,113 @@
/***************************************************************************
* Copyright (C) 2006 by Daniel Gollub *
* <dgollub@suse.de> *
* Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef DETAILEDDIALOG_H
#define DETAILEDDIALOG_H
// own headers:
#include "detailed_Dialog.h"
// KDE headers:
#include <kprogress.h>
// other QT headers:
#include <qpixmap.h>
// own headers:
#include "hardware.h"
#include "hardware_cpu.h"
#include "settings.h"
#include "hardware_batteryCollection.h"
/*!
* \file detaileddialog.h
* \brief Headerfile for detaileddialog.cpp and the class \ref detaileddialog.
*/
/*!
* \class detaileddialog
* \brief The class for the detailed information dialog
* \author Daniel Gollub, <dgollub@suse.de>
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2006
*/
class detaileddialog: public detailed_Dialog {
Q_OBJECT
public:
//! default constructor
detaileddialog(HardwareInfo *_hwinfo, QPixmap *_pixmap, Settings *_set, QWidget *parent = 0, const char *name = 0);
//! default destructor
~detaileddialog();
private slots:
//! to close the dialog
void closeDetailedDlg();
//! to setup the battery progress widgets
void setBattery();
//! to setup the current power consumtion widgets
void setPowerConsumption();
//! to setup the CPU progress widgets
void setProcessor();
//! to setup the Throttling CPU progress widgets
void setProcessorThrottling();
//! to set the state AC KLed
void setAC();
//! to set all other information
void setInfos();
private:
//! pointer to class HardwareInfo to get cpu/battey/AC information
HardwareInfo *hwinfo;
//! pointer to class CPUInfo to get CPU information
CPUInfo *cpuInfo;
//! pointer to hardware information about the primary batteries.
BatteryCollection *primaryBatteries;
//! pointer to class settinfs to get the current settings
Settings *config;
//! pointer to the kpowersave class
QPixmap *pixmap;
//! the numbers of CPUs in the system
int numOfCPUs;
//! list of progressbars for battery information
/*!
* This QValueList with type KProgress contains the list
* of battery progress widgets. Each element represent
* one battery or batteryslot
*/
QValueList<KProgress *> BatteryPBar;
//! list of progressbars for CPU information
/*!
* This QValueList with type KProgress contains the list
* of CPU progress widgets. Each element represent one CPU.
*/
QValueList<KProgress *> ProcessorPBar;
//! QGridLayout for Battery progress widgets
QGridLayout* BatteryGridLayout;
//! QGridLayout for Processor progress widgets
QGridLayout* ProcessorGridLayout;
};
#endif

@ -0,0 +1,127 @@
/***************************************************************************
* Copyright (C) 2007 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*! \file dummy.cpp
* \brief This file contains unused strings for translation
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \version 0.0.1
* \date 2007
*/
#include <qstring.h>
#include <klocale.h>
class dummy {
dummy() {
QString dummy;
// from configuredialog.cpp:
dummy = i18n("If the current desktop user is inactive, dim the display to:");
dummy = i18n("Enable dim display on inactivity");
dummy = i18n("Blacklist");
dummy = i18n("Here you can add programs which should, if running, prevent the dimming "
"of the display.");
dummy = i18n("Would you like to import a predefined blacklist?");
dummy = i18n("Disable CPUs/Cores");
dummy = i18n("Max. running CPUs:");
dummy = i18n("Max. running CPUs/Cores:");
dummy = i18n("Min. running CPUs:");
dummy = i18n("Min. running CPUs/Cores:");
dummy = i18n("Enable to switch off CPUs/cores");
dummy = i18n("You have a multiprocessor/multicore machine.");
dummy = i18n("You can disable CPUs/cores to reduce power consumption and save battery power.");
dummy = i18n("Device");
dummy = i18n("Devices");
dummy = i18n("Device class");
dummy = i18n("activate");
dummy = i18n("Activate");
dummy = i18n("deactivate");
dummy = i18n("Deactivate");
dummy = i18n("activated");
dummy = i18n("deactivated");
dummy = i18n("do nothing");
dummy = i18n("Deactivate following devices:");
dummy = i18n("Activate following devices");
dummy = i18n("Reactivate following devices");
dummy = i18n("Deactivate following device classes:");
dummy = i18n("Activate following devices classes");
dummy = i18n("Reactivate following device classes");
dummy = i18n("If the scheme switched all devices are again activated.");
dummy = i18n("This is a experimental feature.");
dummy = i18n("If you have problems with this feature, please report them.");
dummy = i18n("Select one of the available devices and click on ");
dummy = i18n("Select one of the available device classes and click on ");
dummy = i18n("Select one or more of the available devices and click on ");
dummy = i18n("Select one or more of the available device classes and click on ");
dummy = i18n("Please note: If you e.g. deactivate a network device you may lose your "
"internet connection.");
dummy = i18n("<b>Note:</b> If you select this option, the computer will suspend or standby "
"if the current user is inactive for the defined time. <br><br> This feature "
"can also produce problems with some programs, such as video players or "
"cd burner. These programs can be blacklisted by checking <b>Enable "
"scheme-specific blacklist</b> and click <b>Edit Blacklist...</b>. If this "
"does not help, report the problem or deactivate autosuspend.<br><br> "
"Really use this option?");
dummy = i18n("Try to use only one CPU/Core.");
dummy = i18n("Reduce power consumption by try to use only one CPU/Core instead of spreading "
"the work over all/multiple CPUs.");
// for settings.cpp:
dummy = i18n("Could not load the global configuration.");
dummy = i18n("Could not load the requested scheme configuration.");
dummy = i18n("Configure the current scheme.");
dummy = i18n("Try loading the default configuration.");
dummy = i18n("Maybe the global configuration file is empty or missing.");
// for kpowersave.cpp:
dummy = i18n("Cannot connect to D-Bus. The D-Bus daemon may not be running.");
dummy = i18n("Scheme switched to %1. \n Deactivate following devices: %2").arg("").arg("");
dummy = i18n("Scheme switched to %1. \n Activate following devices: %2").arg("").arg("");
dummy = i18n("Report ...");
dummy = i18n("Suspend to RAM is not supported on your machine.");
dummy = i18n("Additionally, please mail the output of %1 to %2 . Thanks!").arg("").arg("");
dummy = i18n("Power consumption");
// for screen.cpp
dummy = i18n("KScreensaver not found.");
dummy = i18n("Try locking with XScreensaver or xlock.");
dummy = i18n("XScreensaver not found.");
dummy = i18n("Try locking the screen with xlock.");
dummy = i18n("XScreensaver and xlock not found. It is not possible to lock the screen. "
"Check your installation.");
// for detaileddialog.cpp:
dummy = i18n("D-Bus daemon:");
dummy = i18n("ConsoleKit daemon:");
dummy = i18n("Autosuspend activated:");
dummy = i18n("Autodimm activated:");
dummy = i18n("enabled");
dummy = i18n("Session active:");
// for countdowndialog.cpp
dummy = i18n("The display get dimmed down to %1% in: ").arg(30);
// other ConsoleKit related stuff
dummy = i18n("Could not call %1. The current desktop session is not active.").arg("");
dummy = i18n("Could not set %1. The current desktop session is not active.").arg("");
dummy = i18n("Stopped %1. The current desktop session is now inactive.").arg("");
dummy = i18n("Restarted %1. The current desktop session is now active again.").arg("");
}
};

@ -0,0 +1,364 @@
[!Global!]
IconName=kpowersave
Comment=KPowersave
Comment[cs]=KPowersave
Comment[de]=KPowersave
Comment[es]=KPowersave
Comment[fr]=KPowersave
Comment[it]=KPowersave
Comment[ja]=KPowersave
Comment[pl]=KPowersave
Comment[pt]=KPowersave
Comment[pt_BR]=KPowersave
Comment[ru]=KPowersave
Comment[zh_CN]=KPowersave
Comment[zh_TW]=KPowersave
[plug_event]
Name=PlugEvent
Comment=AC adapter plugged in
Comment[cs]=Připojen do sítě
Comment[de]=Netzstecker angeschlossen
Comment[es]=Adaptador de CA conectado
Comment[fr]=Adaptateur CA branché
Comment[it]=Adattatore CA collegato
Comment[ja]=ACアダプタプラグ接続
Comment[pl]=Zasilacz sieciowy podłączony
Comment[pt]=Foi ligado o Adaptador CA
Comment[pt_BR]=Adaptador de CA conectado
Comment[ru]=Питание подключено
Comment[zh_CN]=AC 适配器已插入
Comment[zh_TW]=已插入 AC 介面卡
default_sound=KDE_Dialog_Appear.ogg
default_presentation=17
[unplug_event]
Name=UnplugEvent
Comment=AC adpater unplugged
Comment[cs]=Odpojen ze sítě
Comment[de]=Netzstecker entfernt
Comment[es]=Adaptador de CA desconectado
Comment[fr]=Adaptateur CA non branché
Comment[it]=Adattatore CA scollegato
Comment[ja]=ACアダプタプラグ非接続
Comment[pl]=Zasilacz sieciowy odłączony
Comment[pt]=O Adaptador CA foi desligado
Comment[pt_BR]=Adaptador de CA desconectado
Comment[ru]=Питание отключено
Comment[zh_CN]=AC 适配器已拔出
Comment[zh_TW]=未插入 AC 介面卡
default_sound=KDE_Dialog_Disappear.ogg
default_presentation=17
[battery_warning_event]
Name=BatteryWarningEvent
Comment=Battery charge dropped to level WARNING
Comment[cs]=Stav baterie dosáhl úrovně POPLACH
Comment[de]=Batteriestand erreicht Level WARNUNG
Comment[es]=El nivel de carga de la batería es ADVERTENCIA
Comment[fr]=Le niveau de charge de la batterie est tombé au niveau AVERTISSEMENT
Comment[it]=La carica della batteria è sul livello AVVERTENZA
Comment[ja]=充電量が警告レベルまで下がりました
Comment[pl]=Naładowanie baterii spadło do poziomu OSTRZEŻENIE
Comment[pt]=Estado da bateria baixou para o nível de AVISO
Comment[pt_BR]=A carga da bateria caiu para o nível AVISO
Comment[ru]=Уровень заряда батареи сменился на ПРЕДУПРЕЖДЕНИ
Comment[zh_CN]=电池电量降至"警告"级别
Comment[zh_TW]=電池充電量已降至「警告」層級
default_sound=KDE_Event_1.ogg
default_presentation=17
[battery_low_event]
Name=BatteryLowEvent
Comment=Battery charge dropped to level LOW
Comment[cs]=Stav baterie dosáhl NÍZKĚ úrovně
Comment[de]=Batteriestand erreicht Level NIEDRIG
Comment[es]=El nivel de carga de la batería es BAJO
Comment[fr]=Le niveau de charge de la batterie est tombé au niveau FAIBLE
Comment[it]=La carica della batteria è sul livello BASSA
Comment[ja]=充電量が低レベルまで下がりました
Comment[pl]=Naładowanie baterii spadło do poziomu NISKI
Comment[pt]=Estado da bateria baixou para o nível de BAIXO
Comment[pt_BR]=A carga da bateria caiu para o nível BAIXO
Comment[ru]=Состояние батареи изменилось к НИЗКОМУ
Comment[zh_CN]=电池电量降至"低电量"级别
Comment[zh_TW]=電池充電量已降至「低」層級
default_sound=KDE_Event_1.ogg
default_presentation=17
[battery_critical_event]
Name=BatteryCriticalEvent
Comment=Battery charge dropped to level CRITICAL
Comment[cs]=Stav baterie dosáhl KRITICKÉ úrovně
Comment[de]=Batteriestand erreicht Level KRITISCH
Comment[es]=El nivel de carga de la batería es CRÍTICO
Comment[fr]=Le niveau de charge de la batterie est tombé au niveau CRITIQUE
Comment[it]=La carica della batteria è sul livello CRITICA
Comment[ja]=充電量が致命的レベルまで下がりました
Comment[pl]=Naładowanie baterii spadło do poziomu OSTRZEŻENIE
Comment[pt]=Estado da bateria baixou para o nível CRÍTICO
Comment[pt_BR]=A carga da bateria caiu para o nível CRÍTICO
Comment[ru]=Состояние батареи изменилось к КРИТИЧЕСКОМУ
Comment[zh_CN]=电池电量降至"电量严重不足"级别
Comment[zh_TW]=電池充電量已降至「危急」層級
default_sound=KDE_Event_1.ogg
default_presentation=17
[autosuspend_event]
Name=AutosupendEvent
Comment=Autosuspend is going to be executed
Comment[cs]=Vykonává se automatické uspání
Comment[de]=Autosuspend wird ausgeführt
Comment[es]=Se ejecutará la suspensión automática
Comment[fr]=La mise en veille automatique va être exécutée
Comment[it]=Attivazione in corso della sospensione automatica
Comment[ja]=自動サスペンドが実行されます。
Comment[pl]=Zostanie wykonane automatyczne uśpienie
Comment[pt]=Será executada a sustensão automática
Comment[pt_BR]=A suspensão automática será executada
Comment[ru]=Запускается автозасыпание
Comment[zh_CN]=将执行自动暂停
Comment[zh_TW]=即將執行自動暫停
default_sound=KDE_Event_2.ogg
default_presentation=17
[autodimm_down_event]
Name=AutodimmDownEvent
Comment=Autodimm dimm the display down
default_presentation=0
[autodimm_up_event]
Name=AutodimmUpEvent
Comment=Autodimm dimm the display up
default_presentation=0
[scheme_Performance]
Name=SchemeSwitchToPerformanceEvent
Comment=Switched to scheme Performance
Comment[cs]=Powersave přepnut do schématu Výkon
Comment[de]=Zu Schema Leistung gewechselt.
Comment[es]=Powersave ha pasado al esquema de rendimiento
Comment[fr]=La fonction d'économie d'énergie a été basculée sur le profil Performance
Comment[it]=Powersave attivato nello schema Prestazioni
Comment[ja]=省電力がスキーム「パフォーマンス」に切り替わりました
Comment[pl]=Schemat oszczędzania przełączono na Wydajność
Comment[pt]=Powersave alterou para o esquema de Desempenho
Comment[pt_BR]=O Powersave mudou para o esquema Desempenhodefault_presentation=0
Comment[ru]=Управление питанием переключено на схему Производительность
Comment[zh_CN]=Powersave 切换为"执行"方案
Comment[zh_TW]=Powersave 已切換至「效能」規劃
default_presentation=0
[scheme_Powersave]
Name=SchemeSwitchToPowersaveEvent
Comment=Switched to scheme Powersave
Comment[cs]=Powersave přepnut do schématu Úspora energie
Comment[de]=Zu Schema Energiesparen gewechselt
Comment[es]=Powersave ha pasado al esquema de ahorro de energía
Comment[fr]=La fonction d'économie d'énergie a été basculée sur le profil Économie d'énergie
Comment[it]=Powersave attivato nello schema Risparmio energetico
Comment[ja]=省電力がスキーム「省電力」に切り替わりました
Comment[pl]=Schemat oszczędzania przełączono na Oszczędzanie
Comment[pt]=Powersave alterou para o esquema de Economia
Comment[pt_BR]=O Powersave mudou para o esquema Powersave
Comment[ru]=Управление питанием переключено на схему Энергосбережение
Comment[zh_CN]=Powersave 切换为"省电"方案
Comment[zh_TW]=Powersave 已切換至 Powersave 規劃
default_presentation=0
[scheme_Acoustic]
Name=SchemeSwitchToAcousticEvent
Comment=Switched to scheme Acoustic
Comment[cs]=Powersave přepnut do schématu Tichý
Comment[de]=Zu Schema Akustik gewechselt
Comment[es]=Powersave ha pasado al esquema acústico
Comment[fr]=La fonction d'économie d'énergie a été basculée sur le profil Acoustique
Comment[it]=Powersave attivato nello schema Acustica
Comment[ja]=省電力がスキーム「アコースティック」に切り替わりました
Comment[pl]=Schemat oszczędzania przełączono na Hałas
Comment[pt]=Powersave alterou para o esquema Silencioso
Comment[pt_BR]=O Powersave mudou para o esquema Acústica
Comment[ru]=Управление питанием переключилено на схему Шумоподавление
Comment[zh_CN]=Powersave 切换为"声音"方案
Comment[zh_TW]=Powersave 已切換至「音效」規劃
default_presentation=0
[scheme_Presentation]
Name=SchemeSwitchToPresentationEvent
Comment=Switched to scheme Presentation
Comment[cs]=Powersave přepnut do schématu Prezentace
Comment[de]=Zu Schema Präsentation gewechselt
Comment[es]=Powersave ha pasado al esquema de presentación
Comment[fr]=La fonction d'économie d'énergie a été basculée sur le profil Présentation
Comment[it]=Powersave attivato nello schema Presentazione
Comment[ja]=省電力がスキーム「プレゼンテーション」に切り替わりました:
Comment[pl]=Schemat oszczędzania przełączono na Prezentacja
Comment[pt]=Powersave alterou para o esquema de Apresentação
Comment[pt_BR]=O Powersave mudou para o esquema Apresentação
Comment[ru]=Управление питанием переключено на схему Презентация
Comment[zh_CN]=Powersave 切换为"演示"方案
Comment[zh_TW]=Powersave 已切換至「簡報」規劃
default_presentation=0
[scheme_Unknown]
Name=SchemeSwitchToUnknownEvent
Comment=Switched to unknown/user defined scheme
Comment[cs]=Powersave přepnut do neznámého/uživatelem definovaného schématu
Comment[de]=Zu unbekanntem/benutzerdefiniertem Schema gewechselt
Comment[es]=Powersave ha pasado a un esquema desconocido o definido por el usuario
Comment[fr]=La fonction d'économie d'énergie a été basculée sur un profil inconnu/défini par un utilisateur
Comment[it]=Powersave attivato nello schema sconosciuto/definito dall'utente
Comment[ja]=省電力が不明/ユーザ定義スキームに切り替わりました:
Comment[pl]=Schemat oszczędzania przełączono na schemat nieznany lub użytkownika
Comment[pt]=Powersave alterou para um esquema desconhecido ou definido pelo utilizador
Comment[pt_BR]=O Powersave mudou para um esquema desconhecido/definido pelo usuário
Comment[ru]=Управление питанием переключилось на определяемую пользователем схему
Comment[zh_CN]=Powersave 切换为未知/用户定义的方案。
Comment[zh_TW]=Powersave 已切換至未知的/使用者定義的規劃
default_presentation=0
[suspend2disk_event]
Name=SuspendToDiskEvent
Comment=Suspend to Disk is started
Comment[cs]=Uspávání na disk
Comment[de]='Suspend to Disk' wurde gestartet
Comment[es]=Se ha iniciado la suspensión en disco
Comment[fr]=La mise en veille sur disque a été lancée
Comment[it]=Sospendi su disco avviata
Comment[ja]=サスペンド(ディスク)を開始しました
Comment[pl]=Rozpoczęto Usypianie na Dysk
Comment[pt]=Iniciou-se a Suspensão para o Disco
Comment[pt_BR]=Suspender para Disco foi iniciado
Comment[ru]=Запуск Уснуть на диск
Comment[zh_CN]=启动暂挂到磁盘
Comment[zh_TW]=已啟動「暫停寫入到磁碟」
default_presentation=0
[suspend2ram_event]
Name=SuspendToRamEvent
Comment=Suspend to RAM is started
Comment[cs]=Uspávání do RAM
Comment[de]='Suspend to RAM' wurde gestartet
Comment[es]=Se ha iniciado la suspensión en RAM
Comment[fr]=La mise en veille sur RAM a été lancée
Comment[it]=Sospensione su RAM avviata
Comment[ja]=サスペンド(RAM)を開始しました
Comment[pl]=Rozpoczęto Usypianie do pamięci RAM
Comment[pt]=Iniciou-se a Suspensão para a Memória
Comment[pt_BR]=Suspender para RAM foi iniciado
Comment[ru]=Запуск Уснуть в память
Comment[zh_CN]=启动暂挂到 RAM
Comment[zh_TW]=已啟動「暫停寫入到 RAM」
default_presentation=0
[standby_event]
Name=StandbyEvent
Comment=Standby is started
Comment[cs]=Přepínání do pohotovosti
Comment[de]=Stand-by wurde gestartet
Comment[es]=Se ha iniciado el modo de stand-by
Comment[fr]=La mise en attente a été lancée
Comment[it]=Standby avviato
Comment[ja]=スタンバイを開始しました
Comment[pl]=Przechodzenie w Stan Uśpienia
Comment[pt]=Iniciou-se o StandBy
Comment[pt_BR]=O Standby foi iniciado
Comment[ru]=Запуск ждущего режима
Comment[zh_CN]=启动待机
Comment[zh_TW]=已啟動「待機」
default_presentation=0
[resume_from_suspend2disk_event]
Name=ResumeFromSuspendToDiskEvent
Comment=Resumed from Suspend to Disk
Comment[cs]=Probouzení z uspání na disk
Comment[de]=Wiederaufnahme nach 'Suspend to Disk'
Comment[es]=Reanudación desde suspensión en disco
Comment[fr]=Reprise après la mise en veille sur disque
Comment[it]=Ripristinato da Sospendi su disco
Comment[ja]=サスペンド(ディスク)から再開しました
Comment[pl]=Wznowiono po Uśpieniu na Dysk
Comment[pt]=O Sistema acordou da Suspensão para Disco
Comment[pt_BR]=Continuação a partir da Suspensão para Disco
Comment[ru]=Возврат из режима 'Уснуть на диск'
Comment[zh_CN]=已从暂挂到磁盘恢复
Comment[zh_TW]=從「暫停寫入到磁碟」繼續
default_presentation=0
[resume_from_suspend2ram_event]
Name=ResumeFromSuspendToRamEvent
Comment=Resumed from Suspend to RAM
Comment[cs]=Probouzení z uspání do RAM
Comment[de]=Wiederaufnahme nach 'Suspend to RAM'
Comment[es]=Reanudación desde suspensión en RAM
Comment[fr]=Reprise après la mise en veille sur RAM
Comment[it]=Ripristinato da Sospendi su RAM
Comment[ja]=サスペンド(RAM)から再開しました
Comment[pl]=Wznowiono po Uśpieniu do pamięci RAM
Comment[pt]=O Sistema acordou da Suspensão para Memória
Comment[pt_BR]=Continuação a partir da Suspensão para a Memória
Comment[ru]=Возврат из режима 'уснуть в память'
Comment[zh_CN]=从“暂挂到 RAM”继续执行
Comment[zh_TW]=從「暫停寫入到 RAM」繼續執行
default_presentation=0
[resume_from_standby_event]
Name=ResumeFromStandbyEvent
Comment=Resumed from Standby
Comment[cs]=Probouzení z pohotovosti
Comment[de]=Wiederaufnahme nach Stand-by
Comment[es]=Reanudación desde stand-by
Comment[fr]=Reprise après la mise en attente
Comment[it]=Ripristinato da Standby
Comment[ja]=スタンバイから再開しました
Comment[pl]=Wznowiono ze Stanu Uśpienia
Comment[pt]=O Sistema acordou do StandBy
Comment[pt_BR]=Continuação a partir do Standby
Comment[ru]=Возврат из ждущего режима
Comment[zh_CN]=已从待机恢复
Comment[zh_TW]=從「待機」繼續
default_presentation=0
[lid_closed_event]
Name=LidCloseEvent
Comment=The lid was closed
Comment[cs]=Víko zavřeno
Comment[de]=Der Laptop wurde geschlossen
Comment[es]=Tapa cerrada
Comment[fr]=L'écran était fermé
Comment[it]=Lo schermo è stato chiuso
Comment[ja]=Lidがクローズしました
Comment[pl]=Pokrywa została zamknięta
Comment[pt]=A tampa foi fechada
Comment[pt_BR]=A tampa foi fechada
Comment[ru]=Дисплей ноутбука закрыт
Comment[zh_CN]=此盖已关闭
Comment[zh_TW]=蓋子已關閉
default_presentation=0
[lid_opened_event]
Name=LidOpenedEvent
Comment=The lid was opened
Comment[cs]=Víko otevřeno
Comment[de]=Der Laptop wurde geöffnet
Comment[es]=Tapa abierta
Comment[fr]=L'écran était ouvert
Comment[it]=Lo schermo è stato aperto
Comment[ja]=Lidがオープンしました
Comment[pl]=Pokrywa została otwarta
Comment[pt]=A tampa foi aberta
Comment[pt_BR]=A tampa foi aberta
Comment[ru]=Дисплей ноутбука открыт
Comment[zh_CN]=此盖已打开
Comment[zh_TW]=蓋子已開啟
default_presentation=0
[brightness_up_event]
Name=BrightnessUpEvent
Comment=The brightness up key was pressed
default_presentation=0
[brightness_down_event]
Name=BrightnessDownEvent
Comment=The brightness down key was pressed
default_presentation=0

File diff suppressed because it is too large Load Diff

@ -0,0 +1,502 @@
/**************************************************************************
* Copyright (C) 2006-2007 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file hardware.h
* \brief Headerfile for hardwareinfo.cpp. This file collect/hold all
* Hardware information as e.g. battery and ac state.
*/
/*!
* \class HardwareInfo
* \brief class for hardware information related funtionality
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2006-2007
*/
#ifndef _HARDWARE_H_
#define _HARDWARE_H_
// Global Header
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
// QT - Header
#include <qstring.h>
#include <qobject.h>
#include <qvaluelist.h>
#include <qptrlist.h>
#include <qdict.h>
// HAL Library
#include <hal/libhal.h>
#include "dbusHAL.h"
#include "hardware_battery.h"
#include "hardware_batteryCollection.h"
enum suspend_type {
SUSPEND2DISK,
SUSPEND2RAM,
STANDBY
};
enum cpufreq_type {
UNKNOWN_CPUFREQ = -1,
PERFORMANCE,
DYNAMIC,
POWERSAVE
};
enum device_type {
BATTERY,
AC_ADAPTER,
BUTTON_SLEEP,
BUTTON_POWER,
LID,
LAPTOP_PANEL,
UNKNOWN_DEVICE
};
enum ERROR_MSG {
DBUS_NO_RIGHTS,
DBUS_NOT_RUNNING,
DBUS_RUNNING
};
//! hold information if suspend/standby/pm actions are supported and allowed
/*!
* This dictionary contains information about the available pm capabilities and
* the related interfaces in HAL.
*/
typedef struct SuspendStates {
//! true if the machine support suspend2ram and the interface is available
bool suspend2ram;
//! true if the machine support suspend2ram, but no interface available
bool suspend2ram_can;
//! true if the machine support suspend2ram and PolicyKit allow to call the interface
int suspend2ram_allowed;
//! true if the machine support suspend2disk and the interface is available
bool suspend2disk;
//! true if the machine support suspend2disk, but no interface available
bool suspend2disk_can;
//! true if the machine support suspend2disk and PolicyKit allow to call the interface
int suspend2disk_allowed;
//! true if the machine support standby and the interface is available
bool standby;
//! true if the machine support standby, but no interface available
bool standby_can;
//! true if the machine support standby and PolicyKit allow to call the interface
int standby_allowed;
SuspendStates () {
suspend2ram = false;
suspend2ram_can = false;
suspend2ram_allowed = -1;
suspend2disk = false;
suspend2disk_can = false;
suspend2disk_allowed = -1;
standby = false;
standby_can = false;
standby_allowed = -1;
}
} SuspendStates;
class HardwareInfo : public QObject{
Q_OBJECT
private:
//! pointer to the dbusHAL connection class
dbusHAL *dbus_HAL;
//! hold udis of special hardware execpt batteries represented by a QString pairs (name,udi)
/*!
* This directory handle udis for known fixed devices as e.g ac adapter. This devices are
* currently available:
* \li acadapter
* \li lidclose
* \li laptop_panel
*/
QDict<QString> udis;
//! hold the UDIs of all hardware we handle atm
/*!
* This QStringList contains the list of UDIs we handle at the moment in this
* class. This should be used to handle device events from HAL for devices we
* want to monitor
*/
QStringList allUDIs;
//! hold information if suspend/standby/pm actions are supported and allowed
/*!
* This dictionary contains information about the available pm capabilities and
* the related interfaces in HAL.
*/
SuspendStates suspend_states;
QTime calledSuspend;
//! hold the list of pointers to all relevant batteries
QPtrList<Battery> BatteryList;
//! hold the information about all primary batteries
BatteryCollection *primaryBatteries;
//! hold the name of the CPU Freq governor from the last check
QString cpuFreqGovernor;
//! hold the ConsoleKit name/path of the actual session
QString consoleKitSession;
//! enum with the currently active CPU Freq policy
/*! This enum contains the enum with the currently set CPU Freq Policy. */
cpufreq_type currentCPUFreqPolicy;
//! the state of the ac adapter
/*!
* This boolean represent information about the AC adapter state.
* \li true: if AC adapter is present
* \li false: it AC adapter is not present
*/
bool acadapter;
//! the state of the lidclose button
/*!
* This boolean represent information about the Lid button state.
* \li true: if lid is closed
* \li false: else
*/
bool lidclose;
//! if the machine support APM
/*!
* This boolean represent information if the machine support APM or not.
* \li true: if APM supported
* \li false: else
*/
bool has_APM;
//! if the machine support ACPI
/*!
* This boolean represent information if the machine support ACPI or not.
* \li true: if ACPI supported
* \li false: else
*/
bool has_ACPI;
//! if the machine support PMU (ppc power management)
/*!
* This boolean represent information if the machine support PMU or not.
* \li true: if PMU supported
* \li false: else
*/
bool has_PMU;
//! if the machine support change CPU Freq via HAL interface
/*!
* This boolean represent information if the machine support change the
* CPU freqency via HAL.
* \li true: if supported
* \li false: else
*/
bool cpuFreq;
//! if the machine support change *SchedPowerSavings methodes via HAL interface
/*!
* This boolean represent information if the machine support change the
* SchedPowerSavings methodes via HAL.
* \li true: if supported
* \li false: else
*/
bool schedPowerSavings;
//! if the machine support change brightness
/*!
* This boolean represent information if the machine support brightness changes.
* \li true: if supported
* \li false: else
*/
bool brightness;
//! if brightness get controled via keyevents in hardware
/*!
* This boolean represent information if the machine handle brightness button
* and keyevents in hardware. If so KPowersave should ignore key events.
* \li true: if handled in hardware
* \li false: else
*/
bool brightness_in_hardware;
//! if the machine is a laptop
/*!
* This boolean represent information if the machine is a laptop.
* \li true: if the machine is a laptop
* \li false: else
*/
bool laptop;
//! if the current desktop session is active
/*!
* This boolean represent information if the current desktop session in
* Which KPowersave runs is marked in ConsoleKit as active or not.
* \li true: if active
* \li false: else
*/
bool sessionIsActive;
//! if the current user can use the CPU Freq interface
/*!
* This integer tell if the current user is allowed to change the
* CPU Frequency policy via the HAL interface
* \li 1: if allowed
* \li 0: if not allowed
* \li -1: if unknown (e.g. there is no policy/PolicyKit)
*/
int cpuFreqAllowed;
//! if the current user can use the brightness interface
/*!
* This integer tell if the current user is allowed to change the
* brightness via the HAL interface
* \li 1: if allowed
* \li 0: if not allowed
* \li -1: if unknown (e.g. there is no policy/PolicyKit)
*/
int brightnessAllowed;
//! Integer with the number of current brightness
/*! This contains the current brighness level. */
int currentBrightnessLevel;
//! Integer with the number of availabl brightness level
/*! This contains the number of available brightness levels for internal usage. */
int availableBrightnessLevels;
//! interger with the current warning level
int primaryBatteriesWarnLevel;
//! interger with the current low level
int primaryBatteriesLowLevel;
//! interger with the current critical level
int primaryBatteriesCriticalLevel;
// --> functions
//! check if the machine support ACPI/APM/PMU or not
void checkPowermanagement();
//! check the possible suspend/standby states
void checkSuspend();
//! check if the machine support change CPU Freq via HAL
void checkCPUFreq();
//! check the current brightness level
void checkCurrentBrightness();
//! check if the machine is a laptop
void checkIsLaptop();
//! initalise all hardware information
bool intialiseHWInfo();
//! reinit all hardware information
bool reinitHardwareInfos();
//! to check the current ConsoleKit session
bool checkConsoleKitSession();
//! to check if we should handle a device
bool checkIfHandleDevice ( QString _udi, int *type );
//! to set the CPUFreq governor
bool setCPUFreqGovernor( const char *governor );
//! to get the state of SchedPowerSave setting of kernel/HAL
bool getSchedPowerSavings();
//! to set the state of SchedPowerSave setting of kernel/HAL
bool setSchedPowerSavings( bool enable );
//! find and update a battery information
void updateBatteryValues (QString udi, QString property);
private slots:
//! to fetch events from D-Bus and handle them
void processMessage (msg_type type, QString message, QString value);
//! to update \ref primaryBatteries
void updatePrimaryBatteries ();
//! to set \ref update_info_primBattery_changed
void setPrimaryBatteriesChanges ();
//! check the state of the lidclose button
void checkLidcloseState();
//! check the state of the AC adapter
void checkACAdapterState();
//! check if brightness change is possible
void checkBrightness();
//! SLOT to handle the reconnect to D-Bus
void reconnectDBUS();
//! SLOT to forward signal about changed battery warning state
void emitBatteryWARNState (int type, int state);
//! SLOT to handle resume and forward a signal for resume
void handleResumeSignal (int result);
//! to emit signal for power button
void emitPowerButtonPressed();
//! to emit signal for sleep button
void emitSleepButtonPressed();
//! to emit signal for s2disk button
void emitS2diskButtonPressed();
//! to emit signal for session state
void emitSessionActiveState();
//! to handle signal for brightness Up buttons/keys
void brightnessUpPressed();
//! to handle signal for brightness Down buttons/keys
void brightnessDownPressed();
signals:
//! signal for larger data changes
void generalDataChanged();
//! emited if the CPU Freq Policy changed
void currentCPUFreqPolicyChanged();
//! signal the AC adapter
void ACStatus( bool );
//! signal for the lidclose button
void lidcloseStatus ( bool );
//! signal for pressed the power button
void powerButtonPressed ();
//! signal for pressed sleep (suspend2ram) button
void sleepButtonPressed ();
//! signal for pressed the suspend2disk (hibernate) button
void s2diskButtonPressed ();
// battery related signals
//! signal if the primary battery collection changed
void primaryBatteryChanged();
//! signal to inform about reaching a warning state
void batteryWARNState(int type, int state);
// Error signals
//! signal if the HAL daemon terminate and restart
void halRunning( bool );
//! signal if the D-Bus daemon terminate and restart
void dbusRunning( int );
//! signal if the IsActive state of
void desktopSessionIsActive (bool);
//! signal if we are back from resume
void resumed ( int success );
public:
// update related info --> need to be reset if the data was read
//! tells if the CPUFreq Policy changed
/*!
* This boolean represent information about CPUFreq Policy changes.
* \li true: if something changed
* \li false: if nothing changed (or this is reset to false if the message was consumed)
*/
bool update_info_cpufreq_policy_changed;
//! tells if the AC status changed
/*!
* This boolean represent information about AC status changes.
* \li true: if something changed
* \li false: if nothing changed (or this is reset to false if the message was consumed)
*/
bool update_info_ac_changed;
//! tells if the primary battery collection changed some values
/*!
* This boolean represent information about primary battery changes.
* \li true: if something changed
* \li false: if nothing changed (or this is reset to false if the message was consumed)
*/
bool update_info_primBattery_changed;
//! boolean which tell us if the D-Bus daemon was terminated
/*!
* This boolean contains information if the D-Bus daemon terminated and
* we recieved "dbus.terminate"
* \li true: If D-Bus terminated
* \li false: If D-Bus not terminated
*/
bool dbus_terminated;
//! boolean which tell us if the HAL daemon was terminated
/*!
* This boolean contains information if the HAL daemon terminated and
* we recieved "hal.terminate"
* \li true: If HAL terminated
* \li false: If HAL not terminated
*/
bool hal_terminated;
// --> functions
//! default constructor
HardwareInfo();
//! default destructor
~HardwareInfo();
// to get private members
//! get info about support of suspend/standby
SuspendStates getSuspendSupport() const;
//! get a pointer to the primary batteries
BatteryCollection* getPrimaryBatteries() const;
//! get all batteries
QPtrList<Battery> getAllBatteries() const;
//! check the currently set CPU Frequency Policy
cpufreq_type checkCurrentCPUFreqPolicy();
//! get max brightness level
int getMaxBrightnessLevel() const;
//! get current brightness level
int getCurrentBrightnessLevel() const;
//! get currently CPU Frequency Policy
int getCurrentCPUFreqPolicy() const;
//! if the user is allowed to change CPU Freq PolicyKit
int isCpuFreqAllowed ();
//! if org.freedesktop.Policy.Power has a owner
bool isPolicyPowerIfaceOwned();
//! get state of the AC adapter
bool getAcAdapter() const;
//! get the state of the lid button
bool getLidclose() const;
//! check if the machine is a latop
bool isLaptop() const;
//! check if there is a connection to D-Bus _and_ HAL
bool isOnline() const;
//! check if the machine support ACPI
bool hasACPI() const;
//! check if the machine support APM
bool hasAPM() const;
//! check if the machine support PMU
bool hasPMU() const;
//! check if the machine support change the CPU frequency
bool supportCPUFreq() const;
//! check if the machine support brightness changes
bool supportBrightness() const;
//! check if the current session is active
bool currentSessionIsActive() const;
// --> functions to call a HAL interface and trigger an action
//! execute/trigger a suspend via the HAL interface
bool suspend ( suspend_type suspend );
//! set the brightness via HAL interface
bool setBrightness ( int level, int percent = -1);
//! to set the brightness down
bool setBrightnessDown(int percentageStep = -1);
//! to set the brightness up
bool setBrightnessUp(int percentageStep = -1);
//! set the CPU frequency policy/speed
bool setCPUFreq ( cpufreq_type cpufreq, int limit = 51 );
//! call SetPowerSave method on HAL.
bool setPowerSave( bool on );
//! function to set warning states for the primary battery collection
void setPrimaryBatteriesWarningLevel (int _warn = -1, int _low = -1, int _crit = -1 );
};
#endif

File diff suppressed because it is too large Load Diff

@ -0,0 +1,341 @@
/**************************************************************************
* Copyright (C) 2006-2007 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file hardware_battery.h
* \brief Headerfile for hardware_battery.cpp and the class \ref Battery.
*/
/*!
* \class Battery
* \brief class for Battery related funtionality
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2006-2007
*/
#ifndef _BATTERY_H_
#define _BATTERY_H_
// Global Header
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
// QT - Header
#include <qstring.h>
#include <qstringlist.h>
#include <qobject.h>
#include "dbusHAL.h"
class Battery : public QObject {
Q_OBJECT
private:
//! Internal reference to dbusHAL for communication with HAL daemon
dbusHAL* dbus_HAL;
//! HAL udi of the battery to represent
/*!
* This QString holds the HAL udi adress of the battery.
* \li empty: all primary batteries are represented
* \li e.g. "/org/freedesktop/Hal/devices/acpi_BAT0": first acpi battery
*/
QString udi;
//! Technologyname of the battery
/*!
* Tells the type of technologyname the battery is working with.
* \li e.g. "LION"
*/
QString technology;
//! Current charging state of this battery as reported by HAL
/*!
* This QString tells the current capacity_state HAL is reporting.
* \li as of current HAL spec: "ok", "critical"
*/
QString capacity_state;
//! Unit of charge_level_unit and charge_level_lastfull.
/*! This QString tells the physical unit the values of charge_level_unit. */
QString charge_level_unit;
//! Serialnumber of the the battery
/*! Identifies the currently installed battery uniquely. */
QString serial;
//! Boolean which tells if the battery is initalized first time
/*!
* When the battery (represented by the object) is intialised the first time
* (via recheck() or init()) this value is true.
* \li true: if battery object is now intialised
* \li false: if not
*/
bool initialized;
//! Boolean which tells if the battery is present/connected
/*!
* When the battery (represented by the object) is available this is true.
* \li true: battery is available
* \li false: battery is disconnected/not available
*/
bool present;
//! Roletype of battery
/*!
* This int/enum tells what role this battery is used as.
* \li BAT_PRIMARY: Std. battery for normal system operation
* \li BAT_MOUSE: powersupply for wireless mouse
* \li BAT_KEYBOARD: powersupply in wireless keyboards
* \li BAT_KEY_MOUSE: powersupply in combined keyboard+mouse gadgets
* \li BAT_UPS: Battery in UPS systems (step in on outage of mains)
* \li BAT_CAMERA: battery is contained in a connected digital camera
* \li UNKNOWN: Batterytype/role isn't known
*/
int type;
//! Current general state this battery is in
/*!
* This int/enum tells what rough state the battery is currently in.
* \li BAT_NORM: batterylevel is ok
* \li BAT_WARN: battery is soon getting low
* \li BAT_LOW: batterylevel is already low
* \li BAT_CRIT: batterylevel has become really critical
* \li BAT_NONE: battery state not available
* \li BAT_HAL_ERROR: battery state couldn't be retrieved because of a HAL error
*/
int state;
//! Current charging state of this battery
/*!
* This int/enum tells if the battery is charged or discharged.
* \li CHARGING: battery gets charged
* \li DISCHARGING: battery get discharged
* \li UNKNOWN_STATE: battery is neither charged nor discharged
*/
int charging_state;
//! Current level the battery is charged to
/*!
* This int tells (in physical units of Battery::charge_level_unit)
* at what charging level the battery is currently at
* \li a value >= 0
*/
int charge_level_current;
//! Charging level of battery it could hold when fully charged
/*!
* This int tells (in physical units of Battery::charge_level_unit) the
* maximum charginglevel of the battery on its last fullcharge.
* \li a value >=0
*/
int charge_level_lastfull;
//! Current charge level of battery in percentage
/*!
* This int tells the current charge level of the battery in percent.
* \li a value between 0 and 100
*/
int charge_level_percentage;
//! The maximum capacity by design of the battery.
/*!
* This int tells (in physical units of Battery::charge_level_unit)
* the maximum capacity this battery was designed for by its vendor.
* \li a value > 0
*/
int design_capacity;
//! Current charging/discharging rate
/*!
* This int tells (in physical units of Battery::charge_level_unit per
* second) the currently reported charging/discharging rate.
* \li a value >= 0
*/
int present_rate;
//! Expected minutes unitl fully discharged/charged
/*!
* This int tells the current estimate until the battery is fully
* discharged/charged (with current discharging/charging-rate and last
* full capacity).
* \li a value >= 0
*/
int remaining_minutes;
//! charge_level in percent that will put battery into warning state
int warn_level;
//! charge_level in percent that will put battery into low state
int low_level;
//! charge_level in percent that will put battery into critical state
int crit_level;
// private functions
//! function to set initial values for a battery
void initDefault();
//! to check battery.present
bool checkBatteryPresent();
//! to check battery.type
bool checkBatteryType();
//! to check battery.technology
bool checkBatteryTechnology();
//! to check battery.charge_level.capacity_state
bool checkCapacityState();
//! to check battery.charge_level.current
bool checkChargeLevelCurrent();
//! to check battery.charge_level.last_full
bool checkChargeLevelLastfull();
//! to check battery.charge_level.rate
bool checkChargeLevelRate();
//! to check battery.charge_level.unit
bool checkChargeLevelUnit();
//! to check battery.charge_level.design
bool checkChargeLevelDesign();
//! to check battery.charge_level.percentage
bool checkRemainingPercentage();
//! to check battery.remaining_time
bool checkRemainingTime();
//! to check battery.rechargeable.is_*
bool checkChargingState();
signals:
//! emitted if the remaining percentage changed
void changedBatteryPercentage();
//! emitted if the remaining time changed
void changedBatteryTime();
//! emitted if the the present state changed
void changedBatteryPresent();
//! emitted if the charging state changed
void changedBatteryChargingState();
//! emitted if the battery state changed
void changedBatteryState();
//! emitted if the Battery warning state changed
void changedBatteryWarnState (int state);
//! emitted if any Battery state changed
void changedBattery();
public:
//! default constructor
Battery( dbusHAL* _dbus_HAL, QString _udi );
//! default constructor
Battery( dbusHAL* _dbus_HAL );
//! this constructor forces the use of init with dbuHAL pointer set!
Battery();
//! default destructor
~Battery();
//! initialize this battery object with values from HAL
void init( dbusHAL* _dbus_HAL = NULL );
//! recheck all properties of the battery
void recheck();
//! rechecks only minimalistic set properties
void minRecheck();
//! update a property on HAL event
bool updateProperty(QString _udi, QString _property);
//ro-Interface to internal data
//! reports the HAL udi of this battery
QString getUdi() const;
//! reports HAL capacity_state value
QString getCapacityState() const;
//! reports the physical unit of values like DesignCapacity, PresentRate and Lastfull
QString getChargelevelUnit() const;
//! gives the name of this battery technology
QString getTechnology() const;
//! get availability of this battery
bool isPresent();
//! reports the battery type
int getType() const;
//! tells the current batterystate as enum BAT_STATE_
int getState() const;
//! estimates the remaining minutes until fully charged/discharged
int getRemainingMinutes() const;
//! current charging/discharging rate
int getPresentRate() const;
//! maximum capacity of this battery by design
int getDesignCapacity() const;
//! current charging state as enum BAT_CHARG_STATE
int getChargingState() const;
//! reports current chargelevel in percentage
int getPercentage() const;
//! reports last full capacity of this battery when fully charged
int getLastfull() const;
//! reports current chargelevel in units reported by getChargelevelUnit()
int getCurrentLevel() const;
//! reports the chargelevel in percent when battery goes to state warning
int getWarnLevel() const;
//! reports the chargelevel in percent when battery goes to state low
int getLowLevel() const;
//! reports the chargelevel in percent when battery goes to state critical
int getCritLevel() const;
//writeable access to internals
//! Resets the current HAL udi used by the one given
/*!
* The given QString will be (checked and) used as new HAL udi for the battery.
* But don't forget to do a recheck of the battery afterwards.
* \li returns TRUE: if reset was successfull
* \li returns FALSE: if reset couldn't be applied
*/
bool resetUdi(QString);
//! sets the chargelevel in percent when battery should go into state warning
void setWarnLevel(int _warn_level);
//! sets the chargelevel in percent when battery should go into state low
void setLowLevel(int _low_level);
//! sets the chargelevel in percent when battery should go into state critical
void setCritLevel(int _crit_level);
//some convenience methods
//! check if the battery is currently charged
bool isCharging();
//! check if the battery gets currently discharged
bool isDischarging();
//! check it this is a primary battery
bool isPrimary() const;
//! check if the battery state is ok/normal
bool isOk();
//! check if the battery is in warning level/state
bool isWarning();
//! check if the battery is in a low chargingstate
bool isLow();
//! check if the battery level is critical
bool isCritical();
};
enum BAT_TYPE {
BAT_PRIMARY,
BAT_MOUSE,
BAT_KEYBOARD,
BAT_KEY_MOUSE,
BAT_UPS,
BAT_CAMERA,
BAT_UNKNOWN
};
enum BAT_CHARG_STATE {
CHARGING,
DISCHARGING,
UNKNOWN_STATE
};
enum BAT_STATE {
BAT_NONE,
BAT_WARN,
BAT_LOW,
BAT_CRIT,
BAT_NORM,
BAT_HAL_ERROR
};
#endif

@ -0,0 +1,340 @@
/**************************************************************************
* Copyright (C) 2006-2007 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file hardware_batteryCollection.cpp
* \brief In this file can be found the Battery Collection related code.
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2006-2007
*/
// own headers
#include "hardware_batteryCollection.h"
/*! The default constructor of the class BatteryCollection. */
BatteryCollection::BatteryCollection( int _type ) {
kdDebugFuncIn(trace);
initDefault();
type = _type;
kdDebugFuncOut(trace);
}
/*! The default destructor of the class BatteryCollection. */
BatteryCollection::~BatteryCollection( ) {
kdDebugFuncIn(trace);
}
//! init a battery with default values
void BatteryCollection::initDefault() {
kdDebugFuncIn(trace);
udis.clear();
present_rate_unit = "mWh";
charging_state = UNKNOWN_STATE;
state = BAT_NORM;
remaining_percent = -1;
remaining_minutes = -1;
present_rate = 0;
warn_level = 12;
low_level = 7;
crit_level = 2;
kdDebugFuncOut(trace);
}
/*!
* This function refresh the information of the collection from the given
* batterylist.
* \param BatteryList QPtrList with battery objects
* \param force_level_recheck boolean with info if the the check for the current
* battery warning level should get forced
*/
bool BatteryCollection::refreshInfo(QPtrList<Battery> BatteryList, bool force_level_recheck) {
kdDebugFuncIn(trace);
int _charging_state = UNKNOWN_STATE;
int _percent = 0;
int _minutes = 0;
int _present_batteries = 0;
int _present_rate = 0;
// for now: clean list before run update process!
udis.clear();
if (!BatteryList.isEmpty()) {
Battery *bat;
for (bat = BatteryList.first(); bat; bat = BatteryList.next() ) {
if (type == bat->getType()) {
udis.append(bat->getUdi());
if (bat->isPresent()) {
// count present batteries
_present_batteries++;
// handle charging state
if (bat->getChargingState() != _charging_state) {
if (_charging_state == UNKNOWN_STATE) {
_charging_state = bat->getChargingState();
} else if ( bat->getChargingState() == UNKNOWN_STATE) {
kdWarning() << "found battery with unknown state,"
<< " do nothing" << endl;
} else {
if (_charging_state != bat->getChargingState()) {
// This should only happen if one is in
// state CHARGING and the other in DISCHARGING
kdWarning() << "Unexpected chargingstates" << endl;
_charging_state = UNKNOWN_STATE;
}
}
}
// handle remaining percentage
if (bat->getPercentage() >= 0) {
_percent = (_percent + bat->getPercentage()) / _present_batteries;
}
if (bat->getRemainingMinutes() >= 0) {
_minutes += bat->getRemainingMinutes();
}
if (bat->getPresentRate() >= 0) {
_present_rate += bat->getPresentRate();
}
if (!bat->getChargelevelUnit().isEmpty()) {
present_rate_unit = bat->getChargelevelUnit();
}
}
}
}
bool _changed = false;
if (_charging_state != charging_state) {
charging_state = _charging_state;
_changed = true;
emit batteryChargingStateChanged (charging_state);
}
if (_percent != remaining_percent || force_level_recheck) {
remaining_percent = _percent;
if (_present_batteries < 1) {
/* there are no batteries present, we don't need to emit
a event, there is nothing ... */
state = BAT_NONE;
}else if (remaining_percent <= crit_level) {
if (state != BAT_CRIT) {
state = BAT_CRIT;
emit batteryWarnState( type, BAT_CRIT );
}
} else if (remaining_percent <= low_level) {
if (state != BAT_LOW) {
state = BAT_LOW;
emit batteryWarnState( type, BAT_LOW );
}
} else if (remaining_percent <= warn_level) {
if (state != BAT_WARN) {
state = BAT_WARN;
emit batteryWarnState( type, BAT_WARN );
}
} else if (state != BAT_NONE) {
if (state != BAT_NORM) {
state = BAT_NORM;
emit batteryWarnState( type, BAT_NORM );
}
} else {
state = BAT_NONE;
}
_changed = true;
emit batteryPercentageChanged (remaining_percent );
}
if (_minutes != remaining_minutes) {
remaining_minutes = _minutes;
_changed = true;
emit batteryMinutesChanged( remaining_minutes );
}
if (_present_batteries != present_batteries) {
present_batteries = _present_batteries;
_changed = true;
emit batteryPresentChanged ( present_batteries );
}
if (_present_rate != present_rate ) {
present_rate = _present_rate;
// don't set to changed, this avoid useless calls
emit batteryRateChanged ();
}
if (_changed)
emit batteryChanged();
kdDebugFuncOut(trace);
return true;
} else {
kdError() << "Could not refresh battery information, BatteryList was empty" << endl;
initDefault();
kdDebugFuncOut(trace);
return false;
}
}
//! check if the given udi is already handled by this collection
bool BatteryCollection::isBatteryHandled( QString udi ) {
return udis.contains( udi );
}
// ---> write private members SECTION : START <----
//! get the unit for charge level stuff
QString BatteryCollection::getChargeLevelUnit() const {
return present_rate_unit;
}
//! get the current reported battery rate
int BatteryCollection::getCurrentRate() const {
return present_rate;
}
//! get the cumulative remaining time
int BatteryCollection::getRemainingMinutes() const {
return remaining_minutes;
}
//! get the cumulative remaining percentage of the battery capacity
int BatteryCollection::getRemainingPercent() const {
return remaining_percent;
}
//! get the current Charging state of the machine
int BatteryCollection::getChargingState() const {
return charging_state;
}
//! get the current battery state for this collection
int BatteryCollection::getBatteryState() const {
return state;
}
//! get the number of available batteries
int BatteryCollection::getNumBatteries() const {
return udis.count();
}
//! get the number of present batteries, represent \ref present_batteries
int BatteryCollection::getNumPresentBatteries() const {
return present_batteries;
}
//! get the battery Type from enum \ref BAT_TYPE
int BatteryCollection::getBatteryType() const {
return type;
}
//! sets the chargelevel in percent when battery should go into state warning
/*!
* \return boolean with result of the operation
* \retval true if successful
* \retval false else, if a error occurs
*/
bool BatteryCollection::setWarnLevel(int _warn_level) {
kdDebugFuncIn(trace);
if (_warn_level < low_level) {
kdError() << "Refuse: " << _warn_level
<< " as it is smaller than the LowLevel: " << low_level << endl;
kdDebugFuncOut(trace);
return false;
} else {
warn_level = _warn_level;
kdDebugFuncOut(trace);
return true;
}
}
//! sets the chargelevel in percent when battery should go into state low
/*!
* \return boolean with result of the operation
* \retval true if successful
* \retval false else, if a error occurs
*/
bool BatteryCollection::setLowLevel(int _low_level) {
kdDebugFuncIn(trace);
if (_low_level < crit_level || _low_level > warn_level) {
kdError() << "Refuses: " << _low_level
<< " as it is not between WarnLevel: " << warn_level
<< " and CritLevel: " << crit_level << endl;
kdDebugFuncOut(trace);
return false;
} else {
low_level = _low_level;
kdDebugFuncOut(trace);
return true;
}
}
//! sets the chargelevel in percent when battery should go into state critical
/*!
* \return boolean with result of the operation
* \retval true if successful
* \retval false else, if a error occurs
*/
bool BatteryCollection::setCritLevel(int _crit_level) {
kdDebugFuncIn(trace);
if (_crit_level > low_level) {
kdError() << "Refuses " << _crit_level
<< " as it is bigger than LowLevel: " << low_level << endl;
kdDebugFuncOut(trace);
return false;
} else {
crit_level = _crit_level;
kdDebugFuncOut(trace);
return true;
}
}
// ---> write private members SECTION : END <----
// ---> get private members SECTION : START <----
//! reports the chargelevel in percent when battery goes to state warning
int BatteryCollection::getWarnLevel() const {
return warn_level;
}
//! reports the chargelevel in percent when battery goes to state low
int BatteryCollection::getLowLevel() const {
return low_level;
}
//! reports the chargelevel in percent when battery goes to state critical
int BatteryCollection::getCritLevel() const {
return crit_level;
}
// ---> get private members SECTION : END <----
#include "hardware_batteryCollection.moc"

@ -0,0 +1,204 @@
/**************************************************************************
* Copyright (C) 2006-2007 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file hardware_batteryCollection.h
* \brief Headerfile for hardware_batteryCollection.cpp and the class \ref BatteryCollection.
*/
/*!
* \class BatteryCollection
* \brief class to collect batteryinformation for a special type of battries
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2006-2007
*/
#ifndef _BATTERYCOLLECTION_H_
#define _BATTERYCOLLECTION_H_
// Global Header
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
// QT - Header
#include <qstring.h>
#include <qstringlist.h>
#include <qobject.h>
// own Header
#include "hardware_battery.h"
class BatteryCollection : public QObject {
Q_OBJECT
private:
//! contains the udis of the batteries of this collection
QStringList udis;
//! contains the rate unit
QString present_rate_unit;
//! Roletype of battery
/*!
* This int/enum tells what role this battery is used as.
* \li BAT_PRIMARY: Std. battery for normal system operation
* \li BAT_MOUSE: powersupply for wireless mouse
* \li BAT_KEYBOARD: powersupply in wireless keyboards
* \li BAT_KEY_MOUSE: powersupply in combined keyboard+mouse gadgets
* \li BAT_UPS: Battery in UPS systems (step in on outage of mains)
* \li BAT_CAMERA: battery is contained in a connected digital camera
* \li UNKNOWN: Batterytype/role isn't known
*/
int type;
//! Current charging state of the active battery of this collection
/*!
* This int/enum tells if the battery is charged or discharged.
* \li CHARGING: battery gets charged
* \li DISCHARGING: battery get discharged
* \li UNKNOWN_STATE: battery is neither charged nor discharged
*/
int charging_state;
//! Current general state this battery is in
/*!
* This int/enum tells what rough state the battery is currently in.
* \li BAT_NORM: batterylevel is ok
* \li BAT_WARN: battery is soon getting low
* \li BAT_LOW: batterylevel is already low
* \li BAT_CRIT: batterylevel has become really critical
* \li BAT_NONE: battery state not available
* \li BAT_HAL_ERROR: battery state couldn't be retrieved because of a HAL error
*/
int state;
//! Current charge level of battery in percentage
/*!
* This int tells the current charge level of the battery in percent.
* \li a value between 0 and 100
*/
int remaining_percent;
//! Expected minutes unitl fully discharged/charged
/*!
* This int tells the current estimate until the battery is fully
* discharged/charged (with current discharging/charging-rate and last
* full capacity).
* \li a value >= 0
*/
int remaining_minutes;
//! number of present batteries
/*!
* This int tells how many batteries of this type are really present.
* This mean only batteries and not battery slots/bays.
* \li a value >= 0
*/
int present_batteries;
//! number of present batteries
/*!
* This int tells the current rate of the batteries
* \li a value >= 0
*/
int present_rate;
//! charge_level in percent that will put battery into warning state
int warn_level;
//! charge_level in percent that will put battery into low state
int low_level;
//! charge_level in percent that will put battery into critical state
int crit_level;
//! init the battery collection with a default value
void initDefault();
signals:
//! emitted if we switch to a warning state
/*!
* The first int tell the battery type and the second which warning state we reached:
* \li BAT_NORM: batterylevel is ok ... only emitted if we return form BAT_WARN
* \li BAT_WARN: battery is soon getting low
* \li BAT_LOW: batterylevel is already low
* \li BAT_CRIT: batterylevel has become really critical
*/
void batteryWarnState (int type, int state);
//! emitted if the charging state changed
void batteryChargingStateChanged (int changing_state);
//! emitted if the remainig percentage changed
void batteryPercentageChanged (int percent);
//! emitted if the remainig minutes changed
void batteryMinutesChanged (int minutes );
//! emitted if the number of present batteries changed
void batteryPresentChanged (int num );
//! emitted if the present rate changed
void batteryRateChanged ();
//! emitted if any Battery state changed
void batteryChanged();
public:
//! default constructor
BatteryCollection( int type );
//! default destructor
~BatteryCollection();
// functions
//! refresh the information of the collection from the given batterylist
bool refreshInfo(QPtrList<Battery> BatteryList, bool force_level_recheck = false);
//! check if this collection already handle a special battery/udi
bool isBatteryHandled(QString udi);
// get internals
//! get the unit for charge level stuff
QString getChargeLevelUnit() const;
//! get the cumulative remaining time
int getRemainingMinutes() const;
//! get the cumulative remaining percentage of the battery capacity
int getRemainingPercent() const;
//! get the current Charging state of the machine
int getChargingState() const;
//! get the current battery state
int getBatteryState() const;
//! get the number of available batteries
int getNumBatteries() const;
//! get the number of present batteries
int getNumPresentBatteries() const;
//! get the battery Type from enum \ref BAT_TYPE
int getBatteryType() const;
//! get the current battery rate
int getCurrentRate() const;
//! reports the chargelevel in percent when battery goes to state warning
int getWarnLevel() const;
//! reports the chargelevel in percent when battery goes to state low
int getLowLevel() const;
//! reports the chargelevel in percent when battery goes to state critical
int getCritLevel() const;
//! sets the chargelevel in percent when battery should go into state warning
bool setWarnLevel(int _warn_level);
//! sets the chargelevel in percent when battery should go into state low
bool setLowLevel(int _low_level);
//! sets the chargelevel in percent when battery should go into state critical
bool setCritLevel(int _crit_level);
};
#endif

@ -0,0 +1,312 @@
/**************************************************************************
* Copyright (C) 2006 by Daniel Gollub *
* <dgollub@suse.de> *
* Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file hardware_cpu.cpp
* \brief In this file can be found the CPU information related code.
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \author Daniel Gollub, <dgollub@suse.de>
* \author
* \date 2006
*/
// include own header
#include "hardware_cpu.h"
#include "hardware_cpu.moc"
// QT Header
#include <qdir.h>
#include <qtimer.h>
// system header
#include <fcntl.h>
/*! The default constructor of the class CPUInfo */
CPUInfo::CPUInfo() {
kdDebugFuncIn(trace);
update_info_cpufreq_speed_changed = true;
numOfCPUs = -1;
kdDebugFuncOut(trace);
}
/*! The default desctuctor of the class CPUInfo */
CPUInfo::~CPUInfo() {
kdDebugFuncIn(trace);
}
/*!
* This function counts all online/offline CPUS.
* Returns the total count of CPUs - _not_ the last CPU ID!
*/
int CPUInfo::getCPUNum() {
kdDebugFuncIn(trace);
int cpu_id=0;
QDir tmp_dir;
QString cpu_path = "/sys/devices/system/cpu/cpu0/";
#ifdef FAKE_CPU
cpu_path.prepend("/tmp/foo");
#endif
// let check if we support cpufreq in general
if (tmp_dir.exists(tmp_dir.absFilePath(cpu_path + "cpufreq/scaling_cur_freq", true))) {
cpuFreqHW = true;
} else {
cpuFreqHW = false;
}
QString tmp_path = tmp_dir.absFilePath(cpu_path, true);
while (tmp_dir.exists(tmp_path)) {
int tmp = cpu_id;
cpu_id++;
cpu_path.replace(QString::number(tmp), QString::number(cpu_id));
tmp_path = tmp_dir.absFilePath(cpu_path, true);
}
kdDebug() << "getCPUNum() return: '" << cpu_id << "'" << endl;
kdDebugFuncOut(trace);
return cpu_id;
}
/*!
* The function checks the current CPU Speed. The current cpu speed needs to be read out from
* sysfs and currently not be obtained through the daemon. If the CPUFreg changed the new value
* is set to \ref cpufreq_speed .
* \return Information if something changed or if there are errors as an interger value
* \retval -1 if there are error by reading from /sys/..
* \retval 0 if nothing changed
* \retval 1 if something changed
*/
int CPUInfo::checkCPUSpeed(){
kdDebugFuncOut(trace);
bool speed_changed = false;
int new_value = -1;
int fd;
char buf[15];
QString cpu_device = "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq";
#ifdef FAKE_CPU
cpu_device.prepend("/tmp/foo");
#endif
// first check path for the kernel on-demand-govenour then
// for the use userspace case
update_info_cpufreq_speed_changed = false;
cpufreq_speed.clear();
if (numOfCPUs == -1)
numOfCPUs = getCPUNum();
for (int cpu_id=0; cpu_id < numOfCPUs; cpu_id++) {
new_value = -1;
fd = open(cpu_device, O_RDONLY);
if (read(fd, buf, 14) > 0){
new_value = strtol(buf, NULL, 10)/1000;
close(fd);
}
else{
close(fd);
speed_changed = true;
// CPU disabeld -> set Freq to -1
cpufreq_speed.append(-1);
}
if (new_value != cpufreq_speed[cpu_id]) {
speed_changed = true;
cpufreq_speed.append(new_value);
}
cpu_device.replace(QString::number(cpu_id), QString::number(cpu_id+1));
}
if (speed_changed) {
update_info_cpufreq_speed_changed = true;
kdDebugFuncOut(trace);
return 1;
}
kdDebugFuncOut(trace);
return 0;
}
/*!
* The function checks the Speed of throttling CPU(s). The cpu speed needs to be read out from
* /proc/cpuinfo.
* \return Success or error while reading /proc/cpuinfo
* \retval 0 successful
* \retval -1 reading problem
*/
int CPUInfo::checkCPUSpeedThrottling() {
kdDebugFuncOut(trace);
QString cpu_file = "/proc/cpuinfo";
#ifdef FAKE_CPU
cpu_file.prepend("/tmp/foo");
#endif
QFile cpu_info(cpu_file);
// clear cpufreq list
cpufreq_speed.clear();
if ( !cpu_info.open(IO_ReadOnly) ) {
cpu_info.close();
kdDebugFuncOut(trace);
return -1;
}
QTextStream stream( &cpu_info );
QString line;
while ( !stream.atEnd() ) {
line = stream.readLine();
if (line.startsWith("cpu MHz : ")) {
line.remove("cpu MHz : ");
line = line.remove(line.length() - 4, 4);
cpufreq_speed.append(line.toInt());
}
}
while ((int) cpufreq_speed.count() < numOfCPUs) {
cpufreq_speed.append(-1);
}
cpu_info.close();
kdDebugFuncOut(trace);
return 0;
}
/*!
* The function gets the current throttling state of the CPU(s). The throttling state needs to be
* read out from /proc/acpi/processor/CPUX/throttling.
* \return boolean with info if throttling is supported
* \retval true if throttling is supported
* \retval false if not supported or on any other error
*/
bool CPUInfo::getCPUThrottlingState() {
kdDebugFuncIn(trace);
int id = 0;
QFileInfo *fi;
QString cpu_dirname;
QString dir_acpi_processor = "/proc/acpi/processor/";
#ifdef FAKE_CPU
dir_acpi_processor.prepend("/tmp/foo");
#endif
QDir d_throttling(dir_acpi_processor);
if (!d_throttling.exists()) {
kdDebugFuncOut(trace);
return false;
}
d_throttling.setFilter( QDir::Dirs );
d_throttling.setNameFilter("CPU*");
const QFileInfoList *list = d_throttling.entryInfoList();
QFileInfoListIterator it( *list );
// clear throttling value list
cpu_throttling.clear();
while ((fi = it.current()) != 0 ) {
cpu_dirname = fi->fileName();
QString throttling_device = d_throttling.absPath();
throttling_device.append("/").append(cpu_dirname).append("/throttling");
kdDebug() << "Throttling state file for CPU" << id << " will be: " << throttling_device << endl;
QFile throttling(throttling_device);
// open throttling state file
if ( throttling.open(IO_ReadOnly) ) {
QTextStream stream( &throttling );
QString line;
do {
line = stream.readLine();
} while (!line.startsWith(" *T") && !stream.atEnd() );
if (line.startsWith(" *T")) {
line = line.right(3);
line.remove("%");
cpu_throttling.append(line.toInt());
kdDebug () << "CPU " << id
<< ": cpu_throttling is set to: " << cpu_throttling[id] << endl;
} else {
cpu_throttling.append(0);
}
}
throttling.close();
++it; // next entry
id++; // count cpu id
}
kdDebugFuncOut(trace);
return true;
}
/*!
* The function gets the Max CPU Speed. The max cpu speed needs to be read out from
* sysfs and currently not be obtained through the daemon.
*/
void CPUInfo::getCPUMaxSpeed() {
kdDebugFuncIn(trace);
int fd;
int maxfreq;
char buf[15];
QString cpu_device_max = "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq";
#ifdef FAKE_CPU
cpu_device_max.prepend("/tmp/foo");
#endif
cpufreq_max_speed.clear();
if (numOfCPUs == -1)
numOfCPUs = getCPUNum();
// while (!access(cpu_device_max, R_OK)) {
for (int cpu_id=0; cpu_id < numOfCPUs; cpu_id++) {
fd = open(cpu_device_max, O_RDONLY);
if (read(fd, buf, 14) > 0){
maxfreq = strtol(buf, NULL, 10)/1000;
cpufreq_max_speed.append(maxfreq);
close(fd);
} else {
cpufreq_max_speed.append(-1);
close(fd);
}
cpu_device_max.replace(QString::number(cpu_id), QString::number(cpu_id+1));
}
kdDebugFuncOut(trace);
}

@ -0,0 +1,115 @@
/**************************************************************************
* Copyright (C) 2006 by Daniel Gollub *
* <dgollub@suse.de> *
* Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file hardware_cpu.h
* \brief Headerfile for hardware_cpu.cpp and the class \ref CPUInfo.
*/
/*!
* \class CPUInfo
* \brief class for CPU information related funtionality
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2006
*/
#ifndef _HARDWARE_CPU_H_
#define _HARDWARE_CPU_H_
// Global Header
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
// QT Headers
#include <qstring.h>
#include <qobject.h>
#include <qvaluelist.h>
// own headers
#include "kpowersave_debug.h"
class CPUInfo : public QObject{
Q_OBJECT
private:
//! Integer with the numbers of CPUs in the system
/*! This contains the number of CPUs in the current system */
int numOfCPUs;
public:
//! represent the current Throttling of the CPU
/*!
* This interge value represent the current throttling step of the CPU in percent
* \li a value >= 0 in %
*/
QValueList <int> cpu_throttling;
//! represent the current CPU speeds
/*!
* This integer value represent the current speed/frequency of the CPUs in Mhz
* \li a value > 0 in Mhz
*/
QValueList <int> cpufreq_speed;
//! represent the max. CPU speeds
/*!
* This integer value represent the max speed/frequency of the CPUs in Mhz
* \li a value > 0 in Mhz
*/
QValueList <int> cpufreq_max_speed;
//! if the machine support change CPU Freq in general
/*!
* This boolean represent information if the machine support change the
* CPU freqency in general vi sysfs
* \li true: if supported
* \li false: else
*/
bool cpuFreqHW;
//! tells if the CPUFreq Speed changed
/*!
* This boolean represent information about CPUFreq Speed changes.
* \li true: if something changed
* \li false: if nothing changed (or this is reset to false if the message was consumed)
*/
bool update_info_cpufreq_speed_changed;
// --> functions
//! default constructor
CPUInfo();
//! default destructor
~CPUInfo();
//! checks the current CPU Speed from sysfs
int checkCPUSpeed();
//! checks the Speed of throttling CPUs from /proc/cpuinfo
int checkCPUSpeedThrottling();
//! read the current throttling state of the CPUs from /proc/acpi/processor/CPUX/throttling
bool getCPUThrottlingState();
//! read the max speed of the CPUs
void getCPUMaxSpeed();
//! counts the total number of CPUs
int getCPUNum();
};
#endif

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,368 @@
/***************************************************************************
* Copyright (C) 2006-2007 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*! \file inactivity.cpp
* \brief In this file can be found the inactivity related code.
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2006-2007
*/
// own header
#include "inactivity.h"
/* needed for lXext C library linkage */
extern "C" {
#include <X11/Xproto.h>
#include <X11/extensions/dpms.h>
#include <X11/extensions/scrnsaver.h>
}
// KDE Headers
#include <klocale.h>
/*! The default constructor of the class autosuspend */
inactivity::inactivity() {
kdDebugFuncIn(trace);
proc = NULL;
timeToInactivity = 0;
blacklisted_running_last = 0;
pidof_call_failed = false;
pidof_call_started = false;
pidof_call_returned = false;
blacklisted_running = false;
int dummy = 0;
has_XSC_Extension = XScreenSaverQueryExtension( qt_xdisplay(), &dummy, &dummy );
checkInactivity = new QTimer( this );
connect( checkInactivity, SIGNAL(timeout()), this, SLOT(check()));
kdDebugFuncOut(trace);
}
/*! The default destructor of the class autosuspend */
inactivity::~inactivity() {
kdDebugFuncIn(trace);
delete proc;
proc = NULL;
kdDebugFuncOut(trace);
}
/*!
* This function start the monitoring of inactivity of user on the X-Server.
* Here wee set the time for the signal \ref inactivityTimeExpired() and start
* the needed QTimer.
* \param timeToExpire Integer value representing the time of inactivity which need
* to elapse befor send signal. The time is in seconds.
* \param blacked QStringList with blacklisted programs which if detected with
* pidof() as running prevent the autosuspend.
*/
void inactivity::start( int timeToExpire, QStringList blacked ) {
kdDebugFuncIn(trace);
blacklist = blacked;
if(timeToExpire > 0 && has_XSC_Extension){
stop();
timeToInactivity = (unsigned long) (timeToExpire * 1000);
checkInactivity->start(CHECK_for_INACTIVITY, true);
}
kdDebugFuncOut(trace);
}
/*!
* \b SLOT to call check as recheck inactivity if befor a running PID
* request was detected.
*/
void inactivity::recheck() {
kdDebugFuncIn(trace);
check(true);
kdDebugFuncOut(trace);
}
/*!
* \b SLOT to call check without a recheck.
*/
void inactivity::check() {
check(false);
}
/*!
* \b SLOT to check the current idle-time of the X-Server and if there
* are blacklisted programs are running. If the through \ref timeToInactivity
* defined time is expired, this function emit signal \ref inactivityTimeExpired() .
* \param recheck boolean which define if this is a recheck or not.
* \li true, if this is a recheck. In this case we didn't call
* \ref checkBlacklisted() again
* \li false, if this is normal check
*/
void inactivity::check( bool recheck ) {
kdDebugFuncIn(trace);
if (timeToInactivity > 0) {
checkXInactivity();
if (!pidof_call_started && !recheck) checkBlacklisted();
if( idleTime < blacklisted_running_last ) {
blacklisted_running_last = idleTime;
}
if((idleTime - blacklisted_running_last ) >= timeToInactivity) {
if (!pidof_call_started) {
if (( pidof_call_returned && !blacklisted_running ) ||
( pidof_call_returned && pidof_call_failed )) {
emit inactivityTimeExpired();
}
else {
checkInactivity->start(CHECK_for_INACTIVITY, true);
}
}
else {
//called if there is a getPIDs() is running
QTimer::singleShot(500, this, SLOT(recheck()));
}
}
else checkInactivity->start(CHECK_for_INACTIVITY, true);
} else {
kdWarning() << "timeToInactivity <= 0, stoped autosuspend checks!" << endl;
}
kdDebugFuncOut(trace);
}
/*!
* This function stop the monitoring and reset all variables and Timer.
*/
void inactivity::stop() {
kdDebugFuncIn(trace);
if (checkInactivity->isActive()) checkInactivity->stop();
timeToInactivity = 0;
idleTime = 0;
blacklisted_running_last = 0;
pidof_call_failed = false;
pidof_call_started = false;
pidof_call_returned = false;
blacklisted_running = false;
kdDebugFuncOut(trace);
}
/*!
* This function query the idle-time of user-imput from the X-Server and set
* the return value to \ref idleTime.
*/
void inactivity::checkXInactivity(){
kdDebugFuncIn(trace);
idleTime = getXInactivity();
kdDebug() << "autosuspend::checkXInactivity - idleTime: " << idleTime << endl;
kdDebugFuncOut(trace);
}
/*!
* This function query the idle-time of user-imput from the X-Server and
* return the current idle-time.
*/
unsigned long inactivity::getXInactivity(){
kdDebugFuncIn(trace);
if(has_XSC_Extension) {
static XScreenSaverInfo* mitInfo = 0;
if (!mitInfo) mitInfo = XScreenSaverAllocInfo ();
XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo);
kdDebugFuncOut(trace);
return workaroundCreepyXServer(mitInfo->idle);
}
else {
kdDebugFuncOut(trace);
return 0;
}
}
/*!
* This function workaround a fucking XServer idleTime bug in the
* XScreenSaverExtension, if dpms is running. In this case always the
* current dpms-state time is extracted from the current idletime.
* This mean: XScreenSaverInfo->idle is not the time since the last
* user activity, as descriped in the header file of the extension.
* This result in SUSE bug # and sf.net bug #
*
* Workaround: check if if XServer is in a dpms state, check the
* current timeout for this state and add this value to
* the current idle time and return.
*
* \param _idleTime a unsigned long value with the current ideletime fromm
* XScreenSaverInfo->idle
* \return a unsigned long with the corrected idletime
*/
unsigned long inactivity::workaroundCreepyXServer( unsigned long _idleTime ){
kdDebugFuncOut(trace);
int dummy;
CARD16 standby, suspend, off;
CARD16 state;
BOOL onoff;
Display *dpy = qt_xdisplay();
kdDebug() << "Current idleTime: " << _idleTime << endl;
if (DPMSQueryExtension(dpy, &dummy, &dummy)) {
if (DPMSCapable(dpy)) {
DPMSGetTimeouts(dpy, &standby, &suspend, &off);
DPMSInfo(dpy, &state, &onoff);
if (onoff) {
switch (state) {
case DPMSModeStandby:
kdDebug() << "DPMS enabled. Monitor in Standby. Standby: "
<< standby << " sec" << endl;
// this check is a littlebit paranoid, but be sure
if (_idleTime < (unsigned) (standby * 1000))
_idleTime += (standby * 1000);
break;
case DPMSModeSuspend:
kdDebug() << "DPMS enabled. Monitor in Suspend. Suspend: "
<< suspend << " sec" << endl;
if (_idleTime < (unsigned) ((suspend + standby) * 1000))
_idleTime += ((suspend + standby) * 1000);
break;
case DPMSModeOff:
kdDebug() << "DPMS enabled. Monitor is Off. Off: "
<< off << " sec" << endl;
if (_idleTime < (unsigned) ((off + suspend + standby) * 1000))
_idleTime += ((off + suspend + standby) * 1000);
break;
case DPMSModeOn:
default:
break;
}
}
}
}
kdDebug() << "Corrected idleTime: " << _idleTime << endl;
kdDebugFuncOut(trace);
return _idleTime;
}
/*!
* This funtion starts the monitoring of blacklisted processes.
*/
void inactivity::checkBlacklisted(){
kdDebugFuncIn(trace);
if (proc != NULL) {
delete proc;
proc = NULL;
}
proc = new KProcess;
*proc << "pidof" << blacklist;
connect( proc, SIGNAL(receivedStdout(KProcess *, char *, int)),this,
SLOT(getPIDs(KProcess *, char *, int)));
connect( proc, SIGNAL(processExited(KProcess *)),
SLOT(getPIDsExited(KProcess *)));
if (!proc->start(KProcess::NotifyOnExit, KProcess::AllOutput))
{
emit displayErrorMsg(i18n("Could not start 'pidof'. "
"Could not autosuspend the machine.\n"
"Please check your installation."));
}
pidof_call_started = true;
pidof_call_returned = false;
pidof_call_failed = false;
kdDebugFuncOut(trace);
}
/*!
* \b 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 *buffer the char pointer to the output of the process to stdout
* \param *lenght the length of the buffer
*/
void inactivity::getPIDs(KProcess */*proc*/, char *buffer, int /*lenght*/) {
kdDebugFuncIn(trace);
QString pids(buffer);
pids.remove(" ");
if(pids.isEmpty() || pids == "\n" ) {
kdDebug() << "NO! BLACKLISTED IS RUNNING" << endl;
blacklisted_running = false;
}
else {
if (pids.contains(QRegExp::QRegExp("[0-9]"))) {
kdDebug() << "BLACKLISTED IS RUNNING" << endl;
blacklisted_running = true;
blacklisted_running_last = idleTime;
}
else {
kdError() << "GET BLACKLISTED FAILED - WRONG RETURN" << endl;
blacklisted_running = false;
pidof_call_failed = true;
}
}
kdDebugFuncOut(trace);
}
/*!
* \b SLOT which called if the call of pidof is exited
* \param proc the KPocess which called this SLOT
*/
void inactivity::getPIDsExited(KProcess *proc){
kdDebugFuncIn(trace);
pidof_call_returned = true;
pidof_call_started = false;
if (proc->normalExit()){
// if returned some pids or if pid returned nothing
if (proc->exitStatus() == 1 || proc->exitStatus() == 0){
pidof_call_failed = false;
kdDebugFuncOut(trace);
return;
}
}
// if something crashed/failed
pidof_call_failed = true;
kdDebugFuncOut(trace);
}
#include "inactivity.moc"

@ -0,0 +1,170 @@
/**************************************************************************
* Copyright (C) 2006 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef _INACTIVITY_H_
#define _INACTIVITY_H_
/* this is needed to avoid typedef clash with X11
*/
#ifndef QT_CLEAN_NAMESPACE
#define QT_CLEAN_NAMESPACE
#endif
// KDE Header
#include <kprocess.h>
// QT Header
#include <qregexp.h>
#include <qstring.h>
#include <qwidget.h>
#include <qtimer.h>
#include <qevent.h>
// X11 Header
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
// from project
#include "kpowersave_debug.h"
/*!
* \file inactivity.h
* \brief Headerfile for inactivity.cpp and the class \ref inactivity.
*/
/*!
* \class inactivity
* \brief class for detect inactivity related funtionality
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2006
*/
class inactivity : public QWidget
{
Q_OBJECT
public:
//! default constructor
inactivity();
//! default destructor
~inactivity();
//! to start the monitoring of the X-Server
void start(int, QStringList);
//! to stop the monitoring of the X-Server
void stop();
//! to get the current user inactivity
unsigned long getXInactivity();
signals:
//! signal emited if the with \ref start() set time of inactivity is expired
void inactivityTimeExpired();
//! signal to emit error msg
void displayErrorMsg( QString );
private:
//! pointer to the process to call pidof
KProcess *proc;
//! about the call result of pidof
/*!
* This boolean tells if call of the command pidof failed.
* \li true: if failed
* \li false: if not
*/
bool pidof_call_failed;
//! about the call of command pidof
/*!
* This boolean tells if the call of the command pidof was started or if
* the command is running
* \li true: if is started/running
* \li false: if not
*/
bool pidof_call_started;
//! if pidof return value is recieved
/*!
* This boolean tells if the call of the command pidof returned and the
* returnvalue was parsed to set \ref blacklisted_running
* \li true: if returned and parsed
* \li false: if not
*/
bool pidof_call_returned;
//! if a blacklisted program/process is running
/*!
* This boolean tells if a blacklisted program/process is currently running.
* \li true: if a blacklisted program/process is running
* \li false: if not
*/
bool blacklisted_running;
//! QStringList with blacklisted programs for autosuspend
QStringList blacklist;
//! time which must expire befor emit signal for autosuspend
unsigned long timeToInactivity;
//! time of inactivity from the last check
unsigned long idleTime;
//! time of inactivity from the last check
unsigned long blacklisted_running_last;
//! if the XServer-has XScreenSaverExtension
int has_XSC_Extension;
//! QTimer intervall for the \ref checkInactivity Timer
/*!
* The time intervall to check for the current status and time of
* userinactivity. The timeslice is currently 30 sec.
*/
static const int CHECK_for_INACTIVITY = 30000;
//! QTimer for check inactivity
/*!
* This timer is used to check the currently status and time of
* userinactivity on the X-Server. The timerinterval is defined trough
* \ref CHECK_for_INACTIVITY .
*/
QTimer *checkInactivity;
// -------- FUNCTIONS ------------
//! to check the user-inactivity on the XServer
void checkXInactivity();
//! to check for running blacklisted programs
void checkBlacklisted();
//! to monitor the values
void check( bool recheck );
//! to workaround a strange behavior of the XScreenSaver extension
unsigned long workaroundCreepyXServer( unsigned long );
private slots:
//! to monitor the values
void check();
//! to monitor the values
void recheck();
//! to get the PIDs of blacklisted programs/processes
void getPIDs(KProcess *, char *, int);
//! to get the signal if the command call is exited
void getPIDsExited(KProcess *);
};
#endif

@ -0,0 +1,217 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>info_Dialog</class>
<widget class="QDialog">
<property name="name">
<cstring>info_Dialog</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>459</width>
<height>131</height>
</rect>
</property>
<property name="caption">
<string>Information</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QPushButton" row="3" column="4">
<property name="name">
<cstring>buttonOK</cstring>
</property>
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>OK</string>
</property>
<property name="accel">
<string></string>
</property>
</widget>
<spacer row="3" column="5" rowspan="1" colspan="2">
<property name="name">
<cstring>spacer3</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>171</width>
<height>21</height>
</size>
</property>
</spacer>
<spacer row="3" column="1" rowspan="1" colspan="3">
<property name="name">
<cstring>spacer2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>151</width>
<height>21</height>
</size>
</property>
</spacer>
<widget class="QLabel" row="0" column="1" rowspan="2" colspan="2">
<property name="name">
<cstring>iconPixmap</cstring>
</property>
<property name="minimumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="pixmap">
<pixmap>image0</pixmap>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
<widget class="QLabel" row="0" column="3" rowspan="2" colspan="4">
<property name="name">
<cstring>msgText</cstring>
</property>
<property name="minimumSize">
<size>
<width>370</width>
<height>50</height>
</size>
</property>
<property name="text">
<string></string>
</property>
<property name="alignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
<spacer row="1" column="0">
<property name="name">
<cstring>spacer6</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
<spacer row="1" column="2">
<property name="name">
<cstring>spacer6_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
<spacer row="2" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>61</width>
<height>21</height>
</size>
</property>
</spacer>
<widget class="QCheckBox" row="2" column="3" rowspan="1" colspan="3">
<property name="name">
<cstring>dontShowAgain</cstring>
</property>
<property name="minimumSize">
<size>
<width>330</width>
<height>0</height>
</size>
</property>
<property name="text">
<string></string>
</property>
<property name="accel">
<string></string>
</property>
</widget>
<spacer row="2" column="6">
<property name="name">
<cstring>spacer4</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>31</width>
<height>21</height>
</size>
</property>
</spacer>
</grid>
</widget>
<images>
<image name="image0">
<data format="XPM.GZ" length="2304">789c8593c9721a311086ef3cc5947573a5dacc303043a57230b6f1beef4ee530128bc1069bcd5b2aef9e5f52b702d855410cf0a9b7bf5b626d35ba39398c56d74a936931ed99c8dc17e368b5351b0cde7ffefaf1bbb4922411de59354a56be9556681c994895ddcbf12c70eeb8c19cb27d12d8d955c7711efc47cc6ca7a970ece2559739e77c3781bdff85b0f7a71d66c3fecf81bdff8be7b8ccfe75cb71b96c98ef3cc7a27f37b08fbf1266ff3eb3e879779c076e0ab3ff03b3e88985d95eb69cd42b329f4761b6f798a57ed572250efcc12cf56acc92ffd2732af932c775b03f9f4238f1f637cb699c72bc3281bdbe7bcbd5a456653e715c04ce99eb5c6f10d8db9f84b9de3a738bede7c2deae7cbd228bd99e58ae2562a7d47316b37f8bb9caac1c17b9c46f0973fc2db3e8df6716fd1b96b34a883f6516ff0ab3f4776839d745c1f98f2cd7d3c07b81eb8ebbcc6dd64b9e75c2fe078e8d663b5d5b2e52dde67a9bc21cdff36c12d63f0cecfd5bc29c6f9bb9c6f74f0973bc0eecedafc21c7fc65c707c4798ef4fdbb191fa4a0b73fc31b3d433817d3e89977a0533e73f9d06ce3d93a282d4fcb73ccbfbbedf85a5977861f9fa4bb93496a116b53fd798cbdfe1dc5dbaa71ef5e9811e69005aa839af1f11437aa2671ad1982678a634a317c4bc7ea95fc3fbcd79cee81d153e5063e2f80d96aff4af5303b9fbb4419bd0afd1c11635113d428d3658f46fb3ee1df8efd21ee77aa57d3aa043c48fa1f1888e17f41b3a419e199d22dad019f6cee9822e5169cbf5f3f4497f0fbb57748daeb79d36eb7543b788b8c3aff2d27c0ce637418c71bfd7e16975af439546e7638ad14d27e4b7937cc0ee87d36dbdc7e8654c899b5b0f99faf6f4e6f2b7713a53ecb6a802dd13e4f64f0a3d764655d273fa35340fb03b41779b5443fe017237dcca506744f9bff9b8b32d30cf3a229a98e0266ad83b94baf3b027b6a3e8d3fd39c644ed79f695822a5bf34015dc47e6e2b717ee8f565a19d7a93de30f74d9740a6d8d866a7dca8fa5dad0fd8c8899bf71aa8333cfe0ddc5ccf457f71f73eae22c7b98f73b6632806ef4a1eedd348ba5fbc97da81e3e87f018867d7916ef7f31f75feab86f1df6cd57faffbf56fe7c2ffd0519fbee77</data>
</image>
</images>
<connections>
<connection>
<sender>buttonOK</sender>
<signal>clicked()</signal>
<receiver>info_Dialog</receiver>
<slot>ButtonOK_clicked()</slot>
</connection>
</connections>
<slots>
<slot>ButtonOK_clicked()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -0,0 +1,120 @@
/***************************************************************************
* Copyright (C) 2005 by Danny Kukawka *
* danny.kukawka@web.de, dkukawka@suse.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file infodialog.cpp
* \brief In this file can be found the "information dialog with checkbox"
* related code.
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2005
*/
// own headers
#include "infodialog.h"
// KDE headers:
#include <kiconloader.h>
#include <klocale.h>
// QT headers:
#include <qcheckbox.h>
#include <qdialog.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qstring.h>
#include <qtooltip.h>
/*! This is the default constructor of class infoDialog . */
infoDialog::infoDialog( KConfig *config, QString captionName, QString message,
QString dontShowAgainMsg, QString settingsEntryName,
QWidget *parent, const char *name)
:info_Dialog( parent, name, false, Qt::WStyle_StaysOnTop | WDestructiveClose )
{
if ( message.isEmpty() || (!dontShowAgainMsg.isEmpty() && settingsEntryName.isEmpty()) ||
(!dontShowAgainMsg.isEmpty() && (config == 0)))
close();
if (config != 0) {
settings = config;
settings->reparseConfiguration();
if (settings->hasGroup("infoDialog")){
settings->setGroup("infoDialog");
if (settings->readBoolEntry(settingsEntryName, false)) {
dialogDisabled = true;
//close();
}
else
dialogDisabled = false;
}
}
buttonOK->setIconSet(SmallIconSet("ok", QIconSet::Automatic));
QPixmap pixmap = 0;
pixmap = KGlobal::iconLoader()->loadIcon("messagebox_warning", KIcon::NoGroup, KIcon::SizeMedium);
iconPixmap->setPixmap( pixmap );
msgText->setText(message);
if (!captionName.isEmpty())
this->setCaption(i18n("KPowersave") + " - " + captionName);
else
this->setCaption(i18n("KPowersave"));
if (dontShowAgainMsg.isEmpty()) {
dontShowAgain->setHidden(true);
} else {
entryName = settingsEntryName;
dontShowAgain->setText(dontShowAgainMsg);
dontShowAgain->setHidden(false);
}
this->adjustSize();
}
/*! This is the default destructor of class infoDialog . */
infoDialog::~infoDialog()
{
// no need to delete child widgets, Qt does it all for us
}
/*!
* Use this function to get the value of \ref dialogDisabled.
* \return boolean with value of \ref dialogDisabled
* \retval true if disabled by user before
* \retval false if not
*/
bool infoDialog::dialogIsDisabled() {
return dialogDisabled;
}
/*!
* SLOT: called if the 'ok' button clicked. This SLOT sync the settings
* and close the dialog.
*/
void infoDialog::ButtonOK_clicked() {
if (!entryName.isEmpty() && dontShowAgain->isVisible()) {
settings->setGroup( "infoDialog" );
settings->writeEntry( entryName, dontShowAgain->isChecked());
settings->sync();
}
close();
}
#include "infodialog.moc"

@ -0,0 +1,80 @@
/***************************************************************************
* Copyright (C) 2005 by Danny Kukawka *
* danny.kukawka@web.de, dkukawka@suse.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file infodialog.h
* \brief Headerfile for infoDialog.cpp and the class \ref infoDialog .
*/
/*!
* \class infoDialog
* \brief class for information dialog with checkbox (e.g. for DontShowAgain)
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2005
*/
#ifndef INFODIALOG_H
#define INFODIALOG_H
#include <kconfig.h>
#include "info_Dialog.h"
class infoDialog: public info_Dialog {
Q_OBJECT
public:
//! default constructor
infoDialog( KConfig *config = 0, QString captionName = QString(), QString message = QString(),
QString dontShowAgainMsg = QString(), QString settingsEntryName = QString(),
QWidget *parent = 0, const char *name = 0);
//! default destructor
~infoDialog();
//! return the value of dialogDisabled
bool dialogIsDisabled();
private:
//! the pointer to the settings of kpowersave, get from constructor
KConfig *settings;
//! name of the entry in the settings
/*! QString store the name of the settings entry to
* store settings of 'DontShowAgain' checkbox
*/
QString entryName;
//! represent if the dialog is disabled by user
/*!
* This boolean tell if the dialog is already disabled by user settings
* \li true: if dialog is disabled
* \li false: if not
*/
bool dialogDisabled;
private slots:
//! called if the 'ok' button clicked
void ButtonOK_clicked();
};
#endif

@ -0,0 +1,68 @@
[Desktop Entry]
Encoding=UTF-8
Name=kpowersave
Name[xx]=xxkpowersavexx
Name[de]=KPowersave
Name[es]=KPowersave
Name[fr]=KPowersave
Name[it]=KPowersave
Name[ja]=KPowersave
Name[pt_BR]=KPowersave
Name[ru]=KPowersave
Name[sv]=KPowersave
Name[zh_CN]=KPowersave
Name[zh_TW]=KPowersave
GenericName=Battery Monitor
Exec=kpowersave
Icon=kpowersave
Type=Application
Comment=Battery monitor and general power management
Comment[bg]=Монитор за батерията и основно управление на енергията
GenericName[bg]=Монитор за батерията
Comment[cs]=Sledování stavu baterií a správa napájení
GenericName[cs]=Monitor baterie
GenericName[de]=Akkuüberwachung
Comment[de]=Akkuüberwachung und allgemeine Energieverwaltung
GenericName[el]=Παρακολούθηση Μπαταρίας
GenericName[es]=Monitor de carga de la batería
Comment[es]=Monitor de batería y gestión general de la energía
Comment[fi]=Akkumonitori ja yleinen virranhallinta
GenericName[fi]=Akkumonitori
Comment[fr]=Moniteur de batterie et gestion de l'alimentation
GenericName[fr]=Moniteur de batterie
GenericName[hu]=Akkumulátorfigyelő
Comment[it]=Monitor della batteria e gestione generale dell'alimentazione
GenericName[it]=Monitor della batteria
Comment[km]=កមមវធ<200b>តរតពនតយ<200b>ថម នង គរបគរង<200b>ថាមពល<200b>ទទៅ
GenericName[km]=កមមវធ<200b>តរតពនតយ<200b>ថម
Comment[nb]=Batteriovervåking og generell strømstyring
GenericName[nb]=Batteriovervåker
GenericName[nl]=Batterijmonitor
GenericName[ja]=バッテリモニタ
Comment[ja]=バッテリモニタと一般電源管理
Name[pa]=ਕ-ਊਰਜਾ ਸਭਾਲ
GenericName[pa]=ਬਟਰੀ ਦਰਸ਼ਕ
Comment[pl]=Monitor stanu baterii i ogólne zarządzanie energią
GenericName[pl]=Monitor baterii
Comment[pt]=Monitor de bateria e gestor global de energia
GenericName[pt]=Monitor de Bateria
Comment[pt_BR]=Monitor de Bateria e Gerenciamento de Energia Geral
GenericName[pt_BR]=Monitor de Bateria
GenericName[ru]=Монитор Батареи
Comment[ru]=Монитор батареи и управление энергосбережением
GenericName[sv]=Batteriövervakare
GenericName[tr]=Pil durumu izleme ve güç yönetimi arayüzü
Comment[tr]=Pil durumu izleme ve güç yönetimi arayüzü
Comment[uk]=Монітор стану батареї і загальне керування живленням
GenericName[uk]=Монітор батарей
Comment[xx]=xxBattery monitor and general power managementxx
GenericName[zh_CN]=电池监视器
Comment[zh_CN]=电池监视器和常规电源管理
GenericName[zh_TW]=電池監視器
Comment[zh_TW]=電池監視器和一般電源管理
X-KDE-autostart-after=panel
X-KDE-StartupNotify=false
X-KDE-UniqueApplet=true
X-KDE-autostart-condition=kpowersaverc:General:Autostart:true
Categories=System;Applet;

File diff suppressed because it is too large Load Diff

@ -0,0 +1,68 @@
[Desktop Entry]
Encoding=UTF-8
Name=kpowersave
Name[xx]=xxkpowersavexx
Name[de]=KPowersave
Name[es]=KPowersave
Name[fr]=KPowersave
Name[it]=KPowersave
Name[ja]=KPowersave
Name[pt_BR]=KPowersave
Name[ru]=KPowersave
Name[sv]=KPowersave
Name[zh_CN]=KPowersave
Name[zh_TW]=KPowersave
GenericName=Battery Monitor
Exec=kpowersave --force-acpi-check
Icon=kpowersave
Type=Application
Comment=Battery monitor and general power management
Comment[bg]=Монитор за батерията и основно управление на енергията
GenericName[bg]=Монитор за батерията
Comment[cs]=Sledování stavu baterií a správa napájení
GenericName[cs]=Monitor baterie
GenericName[de]=Akkuüberwachung
Comment[de]=Akkuüberwachung und allgemeine Energieverwaltung
GenericName[el]=Παρακολούθηση Μπαταρίας
GenericName[es]=Monitor de carga de la batería
Comment[es]=Monitor de batería y gestión general de la energía
Comment[fi]=Akkumonitori ja yleinen virranhallinta
GenericName[fi]=Akkumonitori
Comment[fr]=Moniteur de batterie et gestion de l'alimentation
GenericName[fr]=Moniteur de batterie
GenericName[hu]=Akkumulátorfigyelő
Comment[it]=Monitor della batteria e gestione generale dell'alimentazione
GenericName[it]=Monitor della batteria
Comment[km]=កមមវធ<200b>តរតពនតយ<200b>ថម នង គរបគរង<200b>ថាមពល<200b>ទទៅ
GenericName[km]=កមមវធ<200b>តរតពនតយ<200b>ថម
Comment[nb]=Batteriovervåking og generell strømstyring
GenericName[nb]=Batteriovervåker
GenericName[nl]=Batterijmonitor
GenericName[ja]=バッテリモニタ
Comment[ja]=バッテリモニタと一般電源管理
Name[pa]=ਕ-ਊਰਜਾ ਸਭਾਲ
GenericName[pa]=ਬਟਰੀ ਦਰਸ਼ਕ
Comment[pl]=Monitor stanu baterii i ogólne zarządzanie energią
GenericName[pl]=Monitor baterii
Comment[pt]=Monitor de bateria e gestor global de energia
GenericName[pt]=Monitor de Bateria
Comment[pt_BR]=Monitor de Bateria e Gerenciamento de Energia Geral
GenericName[pt_BR]=Monitor de Bateria
GenericName[ru]=Монитор Батареи
Comment[ru]=Монитор батареи и управление энергосбережением
GenericName[sv]=Batteriövervakare
GenericName[tr]=Pil durumu izleme ve güç yönetimi arayüzü
Comment[tr]=Pil durumu izleme ve güç yönetimi arayüzü
Comment[uk]=Монітор стану батареї і загальне керування живленням
GenericName[uk]=Монітор батарей
Comment[xx]=xxBattery monitor and general power managementxx
GenericName[zh_CN]=电池监视器
Comment[zh_CN]=电池监视器和常规电源管理
GenericName[zh_TW]=電池監視器
Comment[zh_TW]=電池監視器和一般電源管理
X-KDE-autostart-after=panel
X-KDE-StartupNotify=false
X-KDE-UniqueApplet=true
X-KDE-autostart-condition=kpowersaverc:General:Autostart:true
Categories=System;Applet;

@ -0,0 +1,486 @@
/**************************************************************************
* Copyright (C) 2004 by Thomas Renninger *
* <trenn@suse.de> and *
* 2004-2007 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef _KPOWERSAVE_H_
#define _KPOWERSAVE_H_
// this is needed to avoid typedef clash with X11/Xmd.h (X11/Xproto.h)
#ifndef QT_CLEAN_NAMESPACE
#define QT_CLEAN_NAMESPACE
#endif
// Global Header
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
// KDE - Header
#include <kprocess.h>
#include <ksystemtray.h>
#include <dcopobject.h>
// QT - Header
#include <qpopupmenu.h>
// kpowersave - Header
#include "autosuspend.h"
#include "autodimm.h"
#include "configuredialog.h"
#include "countdowndialog.h"
#include "detaileddialog.h"
#include "hardware.h"
#include "kpowersave_debug.h"
#include "logviewer.h"
#include "screen.h"
#include "settings.h"
/*!
* \file kpowersave.h
* \brief Headerfile for kpowersave.cpp and the class \ref kpowersave.
*/
/*!
* \class kpowersave
* \brief The central class for the kpowersave-applet
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \author Thomas Renninger, <trenn@suse.de>
* \date 2004 - 2007
*/
class kpowersave : public KSystemTray, public DCOPObject
{
Q_OBJECT
K_DCOP
private:
// permanent pointers
//! to configure kpowersave
KConfig *config;
//! instance of \ref screen
screen *display;
//! instance of \ref settings
Settings *settings;
//! pointer to class HardwareInfo object
HardwareInfo *hwinfo;
//! instance of \ref autosuspend
autosuspend *autoSuspend;
//! instance of \ref autodimm
autodimm * autoDimm;
// temporary pointer, use them if needed
//! KProcess to start YaST-module for configuration
KProcess *yast2;
//! instance of \ref ConfigureDialog
/*! the implemtation and all related functions for the configure dialog*/
ConfigureDialog *configDlg;
//! instance of \ref LogViewer
LogViewer *logview;
//! instance of \ref countDownDialog
countDownDialog *countdown;
//! struct wth information about suspend states and permissions
SuspendStates suspend;
//! enum with the last called suspend, this need to be reset if needed
int calledSuspend;
//! instance of \ref detaileddialog
detaileddialog *detailedDlg;
//! represent the state of opened \ref detailedDlg
/*!
* This boolean represent information about the detailedDlg. Use this to inform
* if the dialog is displayed.
* \li true: if dialog is displayed
* \li false: if not
*/
bool detailedIsShown;
//! represent the state of the configure dialog
/*!
* This boolean represent information about the configure dialog. Use this to inform
* if the dialog is displayed.
* \li true: if dialog is displayed
* \li false: if not
*/
bool config_dialog_shown;
//! represent background status of the kickerapplet icon
/*!
* This boolean represent information about the background of the kickerapplet icon.
* \li true: if iconbackground is colored
* \li false: if iconbackground is not colored
*/
bool icon_BG_is_colored;
//! represent color status of the kickerapplet icon
/*!
* This boolean represent the state of the kickerapplet icon. It don't display
* information about the icon backgrund like \ref icon_BG_is_colored . It say
* only that the icon is in state to have a blinking background .
* \li true: if icon set to be colored
* \li false: if icon isn't set to be colored
*/
bool icon_set_colored;
//! represent the state of icon changing
/*!
* This boolean represent information about changing the icon background. It's used to
* change the intervall of redraw the kickerapplet icon.
* \li true: if the state of icon is changed
* \li false: if the state of icon isn't change
*/
bool icon_state_changed;
//! represent the state of the suspend/progress dialog
/*!
* This boolean represent information about the current state of
* visible of the suspend/progress dialog.
* \li true: if the dialog is shown
* \li false: if not
*/
bool suspend_dialog_shown;
//! represent display state of HAL error message
/*!
* This boolean represent information about the current state of
* the HAL error message
* \li true: if the errormessage was already displayed in this context
* \li false: if not
*/
bool hal_error_shown;
//! tell if the display should get dimmed down
/*!
* This boolean represent information if the display should get dimmed down
* within the \ref do_dimm() function or not.
* \li true: if the display should get dimmed down
* \li false: if the display should get dimmed up
*/
bool autoDimmDown;
//! to temporary hold the resume result
int resume_result;
//! a menu entry ID
/*! contains the ID of the menuentry for kpowersave configure Dialog */
int CONFIGURE_ID;
int CONFIGURE_EVENTS_ID;
//! a menu entry ID
/*! contains the ID of the menuentry for YaST-configuration */
int YAST_MODULE_MENU_ID;
//! a menu seperator ID
/*! contains the ID of the separator between YaST-entry and the sleep-states */
int SLEEP_SEPARATOR_MENU_ID;
//! a menu entry ID
/*! contains the ID of the menuentry for suspend-to-disk */
int SUSPEND2DISK_MENU_ID;
//! a menu entry ID
/*! contains the ID of the menuentry for suspend-to-ram */
int SUSPEND2RAM_MENU_ID;
//! a menu entry ID
/*! contains the ID of the menuentry for stand-by */
int STANDBY_MENU_ID;
//! a menu seperator ID
/*! contains the ID of the separator between sleep-states-entries and the cpufreq-submenu */
int CPUFREQ_SEPARATOR_MENU_ID;
//! a submenu ID
/*! contains the ID of the cpufreq sub menu*/
int CPUFREQ_MENU_ID;
//! a menu seperator ID
/*! contains the ID of the separator between cpufreq- and scheme-submenu*/
int SCHEME_SEPARATOR_MENU_ID;
//! a submenu ID
/*! contains the ID of the scheme submenu*/
int SCHEME_MENU_ID;
//! a menu seperator ID
/*! contains the ID of the separator between scheme-submenu and autosuspend*/
int AUTOSUSPEND_SEPARATOR_MENU_ID;
//! a menu entry ID
/*! contains the ID of the menuentry for disable inactivity actions */
int AUTOSUSPEND_MENU_ID;
//! a menu seperator ID
/*! contains the ID of the separator between autosuspend and Help*/
int HELP_SEPARATOR_MENU_ID;
//! a menu ID
/*! contains the ID of the help menu*/
int HELP_MENU;
//! number of white pixel in the kickerapplet icon
/*!
* This integer value represent the number of white pixel in the icon for
* the kickerapplet. with this 'global' variable we don't need to count the
* white pixel on every redraw.
*/
int countWhiteIconPixel;
//! QTimer-interval for icon background
/*!
* Time intervall to set the colored background of the batteryicon on/off.
* The value is 1000 msec/ 1 sec.
*/
static const int BAT_icon_BG_intervall = 1000;
//! QTimer-interval for display HAL error message
/*!
* Time intervall to delay display the HAL error message to prevent displayed
* the message if only HAL or powersave is restarted. The value is 15000 msec/ 15 sec.
*/
static const int HAL_ERROR_MSG_intervall = 15000;
//! type of current running suspend
/*! QString store the name of the current running suspend*/
QString suspendType;
//! current name of the pixmap
/*!
* Contains the current name of the icon/pixmap. The value must be a filename of a existing iconfile.
* \sa power_icon, no_battery_icon, charge_icon, battery, battery_RED or battery_ORANGE
*/
QString pixmap_name;
//! contains the 'real' schemenames
/*!
* This list store the real schemenames (not the i18n()-version)
* regarding to position in the scheme-menu
*/
QStringList org_schemenames;
//! a sub-menu of the kickerapplet
/*! QPopupMenu for the cpufreq-entries. */
QPopupMenu *speed_menu;
//! a sub-menu of the kickerapplet
/*! QPopupMenu for the scheme-entries. */
QPopupMenu *scheme_menu;
//! a sub-menu of the kickerapplet
/*! QPopupMenu for the help-entries. */
QPopupMenu *help_menu;
//! icon-pixmap
/*! QPixmap with the (pre-)loaded icon from \ref pixmap_name .*/
QPixmap pixmap;
//! icon-pixmap
/*! QPixmap with the full draw applet Icon (to be used in other classes) .*/
QPixmap fullIcon;
//! Timer for the blinking Icon background
/*!
* This timer is used to let blink the background of a icon in kicker.
* The timerinterval is defined in \ref BAT_icon_BG_intervall .
*/
QTimer *BAT_WARN_ICON_Timer;
//! Timer to delay the HAL error message
/*!
* This timer is used to add a delay befor display the HAL error message
* The timerinterval is defined in \ref HAL_ERROR_MSG_intervall .
*/
QTimer *DISPLAY_HAL_ERROR_Timer;
//! Timer to dimm down/up the brightness
/*!
* This timer is used dimm the display up and down. The timerinterval
* depends on calculated timePerStep in the calling function.
*/
QTimer *AUTODIMM_Timer;
//! draw all icon related things for \ref redrawPixmap()
void drawIcon();
//! to intialise the menu for the kickerapplet
void initMenu();
//! load the icon for \ref redrawPixmap()
void loadIcon();
//! draw/redraw the icon for the kickerapplet
void redrawPixmap();
//! to set the screensaver settings
void setSchemeSettings();
//! to update the Tooltip of the kickerapplet
void updateTooltip();
//! Eventhandler to catch mouse-press-events and react
void mousePressEvent( QMouseEvent *qme );
//! Event handler to catch mouse wheel events and react
void wheelEvent( QWheelEvent *qwe );
//! Eventhandler to catch mouse enter events and react
void enterEvent( QEvent *qee);
//! to handle mount/umount on resume/suspend
bool handleMounts ( bool suspend );
//! to get the i18n string for a suspend type
QString getSuspendString (int type);
private slots:
//! send command for stand-by to the HAL daemon
bool do_standby();
//! send command for suspend_to_disk to the HAL daemon
bool do_suspend2disk();
//! send command for suspend_to_RAM to the HAL daemon
bool do_suspend2ram();
//! show warning dialog or call autosuspend if signal \ref inactivity::inactivityTimeExpired() recieved
void do_autosuspendWarn();
//! execute the autosuspend
bool do_autosuspend(bool chancel);
//! starts the Yast2-power-management module
void do_config();
//! sets the new scheme with all settings
void do_setActiveScheme( int );
//! called if icon background must be changed
void do_setIconBG();
//! to set the autosuspend on/off over the menu
void do_setAutosuspend();
//! 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 * );
//! called to open the kpowersave help
void slotHelp();
//! called to open the kpowersave About dialog
void slotAbout();
//! called to open website to report bugs
void slotReportBug();
//! called if the configure dialog is destroyed
void observeConfigDlg();
//! called if user exit from kpowersave
void _quit();
//! called if the user get inactive and the display should get dimmed down
void do_downDimm();
//! called if the user get active again and the display should get dimmed up
void do_upDimm();
//! SLOT do do the dimmining for autodimm feature
void do_dimm();
//! SLOT to set autodimm related stuff and start autodimm monitoring
void setAutoDimm( bool resumed );
//! to update the main menu of the kickerapplet
/*! this is bound to generalDataChanged singal in pdaemon */
void update();
//! to update the scheme-menu within the main menu
void updateSchemeMenu();
//! to update the menu with the cpu frequency within the main menu
void updateCPUFreqMenu();
//! this set \ref suspendType from signal
void setSuspendType( QString suspendtype );
//! this set the autosuspend and start the monitoring
void setAutoSuspend( bool );
//! called for critical battery event SHUTDOWN
void handleCriticalBatteryActionCall();
//! set for a battery status the related actions
void handleActionCall ( action action, int value, bool checkAC = false, bool batWarnCall = false );
//! this lock/reactivate the screen if a lidcloseStatus() signal is triggered
void handleLidEvent( bool closed );
//! show the login dialog after locked the screen
void activateLoginScreen();
//! handle event for press power button and call action
void handlePowerButtonEvent();
//! handle event for press s2ram/sleep button and call action
void handleSleepButtonEvent();
//! handle event for press s2disk button and call action
void handleS2DiskButtonEvent();
//! handle changes of the session state
void handleSessionState (bool state);
//! to show the kpowersave configure_dialog
void showConfigureDialog();
//! to show the KNotify config dialog
void showConfigureNotificationsDialog();
//! this emit the KNotify event for a battery warning state state
void notifyBatteryStatusChange ( int type, int state );
//! this emit the KNotify event for change AC status
void handleACStatusChange ( bool acstate, bool notifyEvent = true );
//! this emit the KNotify events if scheme switched
void notifySchemeSwitch();
//! this emit the KNotify events if the machine go to suspend/Standby
void notifySuspend( int );
//! to independent handleResumeSignal from event loop
void forwardResumeSignal( int result );
//! this emit the KNotify events if the machine resumed
void handleResumeSignal();
//! to display HAL error msg
void showHalErrorMsg( );
//! this is invoked to display powersave error message
void showDBusErrorMsg( int );
//! this show a blocking dialog from kpowersave with the given message
void showErrorMessage( QString msg );
//! this is called when detailed dialog is closed
void closedetaileddialog();
public:
//! default constructor
kpowersave( bool force_acpi_check = false, bool trace_func = false);
//! default destructor
virtual ~kpowersave();
k_dcop:
//! dcop function to lock the screen
bool lockScreen();
//! dcop function to set a scheme
bool do_setScheme( QString );
//! dcop function to set CPU Freq policy
bool do_setCPUFreqPolicy( QString );
//! dcop function to send 'suspend to disk' command to powersaved
bool do_suspendToDisk();
//! dcop function to send 'suspend to RAM' command to powersaved
bool do_suspendToRAM();
//! dcop function to send 'standby' command to powersaved
bool do_standBy();
//! dcop function to set the brightness down
bool do_brightnessDown(int percentageStep = -1);
//! dcop function to set the brightness up
bool do_brightnessUp(int percentageStep = -1);
//! dcop function to disable/stop autosuspend
void disableAutosuspend( bool );
//! dcop function to show the detailed dialog
void showDetailedDialog();
//! dcop function to open the configure dialog
bool openConfigureDialog();
//! dcop function to find out if kpowersave manages DPMS
bool currentSchemeManagesDPMS();
//! dcop funtion to get the current brightness level
int brightnessGet();
//! dcop function to return the name of the current scheme
QString currentScheme ();
//! dcop function to return the current cpufreqpolicy
QString currentCPUFreqPolicy();
//! dcop function to return the supported sleeping states
QStringList allowed_sleepingStates();
//! dcop function to return the schemes
QStringList listSchemes();
//! dcop function to return the supported CPU
QStringList listCPUFreqPolicies();
};
#endif // _KPOWERSAVE_H_

@ -0,0 +1,16 @@
Begin3
Title: kpowersave -- Some description
Version: 0.1
Entered-date:
Description:
Keywords: KDE Qt
Author: Thomas Renninger <trenn@suse.de>
Maintained-by: Thomas Renninger <trenn@suse.de>
Home-page:
Alternate-site:
Primary-site: ftp://ftp.kde.org/pub/kde/unstable/apps/utils
xxxxxx kpowersave-0.1.tar.gz
xxx kpowersave-0.1.lsm
Platform: Linux. Needs KDE
Copying-policy: GPL
End

@ -0,0 +1,68 @@
/**************************************************************************
* Copyright (C) *
* 2004-2007 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef _KPOWERSAVE_DEBUG_H
#define _KPOWERSAVE_DEBUG_H
// Global Header
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
// Default Header
#include <stdio.h>
#include <stdlib.h>
// QT - Header
#include <qdatetime.h>
// KDE Header
#include <kdebug.h>
/*!
* \file kpowersave_debug.h
* \brief Headerfile for debug releated defines/macros. Currently this file
* contains the myDebug(...) macro.
*/
// to store the value over the different classes
extern bool trace;
/*
* macro to collect time and k_funcinfo information for kdDebug()
*/
#define funcinfo "[" << QTime::currentTime().toString().ascii() << \
":" << QTime::currentTime().msec() << "]" << k_funcinfo
/*
* macros to trace function entry and leave points
*/
#define kdDebugFuncIn(traceinfo) do { \
if (traceinfo == true) \
kdDebug() << funcinfo << "IN " << endl; \
} while (0)
#define kdDebugFuncOut(traceinfo) do { \
if (traceinfo == true) \
kdDebug() << funcinfo << "OUT " << endl; \
} while (0)
#endif //_KPOWERSAVE_DEBUG_H

@ -0,0 +1,104 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>log_viewer</class>
<widget class="QDialog">
<property name="name">
<cstring>log_viewer</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>480</height>
</rect>
</property>
<property name="caption">
<string>Form1</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout4</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="KTextEdit" row="0" column="0">
<property name="name">
<cstring>kTextEdit</cstring>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QLayoutWidget" row="1" column="0">
<property name="name">
<cstring>layout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QPushButton">
<property name="name">
<cstring>pB_save</cstring>
</property>
<property name="text">
<string>Save As ...</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>330</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<property name="name">
<cstring>pB_close</cstring>
</property>
<property name="text">
<string>Close</string>
</property>
</widget>
</hbox>
</widget>
</grid>
</widget>
</grid>
</widget>
<connections>
<connection>
<sender>pB_close</sender>
<signal>clicked()</signal>
<receiver>log_viewer</receiver>
<slot>pB_close_clicked()</slot>
</connection>
<connection>
<sender>pB_save</sender>
<signal>clicked()</signal>
<receiver>log_viewer</receiver>
<slot>pB_save_clicked()</slot>
</connection>
</connections>
<slots>
<slot>pB_close_clicked()</slot>
<slot>pB_save_clicked()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -0,0 +1,124 @@
/***************************************************************************
* Copyright (C) 2007 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*! \file logviewer.cpp
* \brief In this file can be found the LogViewer related code.
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \version 0.0.1
* \date 2007
*/
// QT header
#include <qfile.h>
#include <qtextstream.h>
// KDE header
#include <ktextedit.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kmessagebox.h>
// own header
#include "logviewer.h"
/*! This is the default constructor of the class LogViewer. */
LogViewer::LogViewer( QString filename, QWidget *parent, const char *name)
:log_viewer(parent, name, false, WDestructiveClose ) {
this->setCaption(i18n("KPowersave Logfile Viewer: %1").arg(filename));
if (!QFile::exists ( filename ))
return;
log_file = filename;
QFile file (log_file);
if (file.open(IO_ReadOnly)) {
QTextStream stream ( &file );
kTextEdit->setText (stream.read());
kTextEdit->setReadOnly(true);
}
file.close();
}
/*! This is the default destructor of the class LogViewer. */
LogViewer::~LogViewer(){
// no need to delete child widgets, Qt does it all for us
}
/*!
* SLOT: Called if the user click on 'Close' Button
*/
void LogViewer::pB_close_clicked() {
close();
}
/*!
* SLOT: Called if the user click on 'Save As ...' Button
*/
void LogViewer::pB_save_clicked() {
QString sFileName;
bool tryagain = true;
while (tryagain == true) {
int answer;
QString msg;
sFileName = KFileDialog::getSaveFileName( QDir::homeDirPath() );
QFileInfo info (sFileName);
if (QFile::exists(sFileName) && info.isWritable() && info.isReadable() && info.isFile()) {
msg = i18n("File already exist. Overwrite the file?");
answer = KMessageBox::questionYesNo(this, msg , i18n("Error while save logfile"));
if (answer == KMessageBox::Yes) {
tryagain = false;
}
} else if (QFile::exists(sFileName)) {
msg = i18n("File already exist.");
answer = KMessageBox::warningContinueCancel(this, msg ,
i18n("Error while save logfile"),
i18n("Try other filename ..."));
if (answer == KMessageBox::Cancel) {
tryagain = false;
return;
}
} else {
tryagain = false;
}
}
QFile in(log_file);
QFile out(sFileName);
if (in.open(IO_ReadOnly)) {
if (out.open(IO_WriteOnly)) {
QByteArray input(4096);
long l = 0;
while (!in.atEnd()) {
l = in.readLine(input.data(), 4096);
out.writeBlock(input, l);
}
out.close();
}
in.close();
}
}
#include "logviewer.moc"

@ -0,0 +1,60 @@
/***************************************************************************
* Copyright (C) 2007 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef LOGVIEWER_H
#define LOGVIEWER_H
/*!
* \file logviewer.h
* \brief Headerfile for logviewer.cpp and the class \ref LogViewer.
*/
/*!
* \class LogViewer
* \brief class for view logfiles in KPowersave related funtionality
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \version 0.0.1
* \date 2007
*/
// header of the UI
#include "log_viewer.h"
class LogViewer: public log_viewer {
Q_OBJECT
public:
//! default constructor
LogViewer( QString filename, QWidget *parent = 0, const char *name = 0);
//! default destructor
~LogViewer();
private:
//! name of the log file
QString log_file;
private slots:
//! called if the user click on 'Close' Button
void pB_close_clicked();
//! called if the user click on 'Save As ...' Button
void pB_save_clicked();
};
#endif

@ -0,0 +1,94 @@
/**************************************************************************
* Copyright (C) 2004 by Thomas Renninger *
* <trenn@suse.de> *
* 2004-2007 Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "kpowersave.h"
#include <kuniqueapplication.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <klocale.h>
#include <kiconloader.h>
#include "kpowersave_debug.h"
/*!
* \file main.cpp
* \brief The file with the \ref kdemain class to start kpowersave.
*/
/*!
* \class kdemain
* \brief The kpowersave kdemain class, which is the startpoint of KPowersave.
* \author Thomas Renninger, <trenn@suse.de>
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2004 - 2007
*/
static const char description[] = I18N_NOOP("KDE Frontend for Power Management, Battery Monitoring and Suspend");
KCmdLineOptions options[] = { { "force-acpi-check", I18N_NOOP("Force a new check for ACPI support"), 0 },
{ "dbg-trace", I18N_NOOP("Trace function entry and leave points for debug\n"), 0 },
{ 0, 0, 0 }};
static const char version[] = "0.7.x (0.7.3)";
bool trace = false;
extern "C"
int kdemain(int argc, char **argv)
{
KAboutData about("kpowersave", I18N_NOOP("KPowersave"), version, description,
KAboutData::License_GPL, I18N_NOOP("(c) 2004-2006, Danny Kukawka\n"
"(c) 2004 Thomas Renninger"));
about.addAuthor("Danny Kukawka", I18N_NOOP("Current maintainer"), "danny.kukawka@web.de" );
about.addAuthor("Thomas Renninger", 0, "trenn@suse.de" );
about.addCredit("Holger Macht", I18N_NOOP("Powersave developer and for D-Bus integration"),
"hmacht@suse.de");
about.addCredit("Stefan Seyfried", I18N_NOOP("Powersave developer and tester"),
"seife@suse.de");
about.addCredit("Daniel Gollub", I18N_NOOP("Added basic detailed dialog"), "dgollub@suse.de");
about.addCredit("Michael Biebl", I18N_NOOP("Packaging Debian and Ubuntu"), "biebl@teco.edu");
about.setBugAddress("powersave-users@forge.novell.com");
about.setHomepage("http://sourceforge.net/projects/powersave");
about.setTranslator("_: NAME OF TRANSLATORS\\nYour names","_: EMAIL OF TRANSLATORS\\nYour emails");
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions (options);
KUniqueApplication::addCmdLineOptions();
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if (!KUniqueApplication::start()) {
fprintf(stderr, "KPowersave is already running!\n");
exit(0);
}
KUniqueApplication app;
app.disableSessionManagement();
kpowersave *mainWin = 0;
mainWin = new kpowersave(args->isSet( "force-acpi-check" ), args->isSet( "dbg-trace" ));
app.setMainWidget( mainWin );
mainWin->show();
// mainWin has WDestructiveClose flag by default, so it will delete itself.
return app.exec();
}

@ -0,0 +1,3 @@
kpowersaveiconsdir = $(kde_datadir)/kpowersave/icons
kpowersaveicons_ICON = AUTO

@ -0,0 +1 @@
cr22-action-processor.png --> from kids-package (kcmprocessor.png)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,46 @@
/***************************************************************************
* Copyright (C) 2007 by Danny Kukawka *
* <dkukawka@suse.de, danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file privileges.h
* \brief Headerfile containing defines for privileges
* \author Danny Kukawka, <dkukawka@suse.de, danny.kukawka@web.de>
* \date 2007
*/
#ifndef _PRIVILEGES_H_
#define _PRIVILEGES_H_
#ifdef HAVE_HAL_0_5_10
#define PRIV_SUSPEND "org.freedesktop.hal.power-management.suspend"
#define PRIV_HIBERNATE "org.freedesktop.hal.power-management.hibernate"
#define PRIV_STANDBY "org.freedesktop.hal.power-management.standby"
#define PRIV_CPUFREQ "org.freedesktop.hal.power-management.cpufreq"
#define PRIV_LAPTOP_PANEL "org.freedesktop.hal.power-management.lcd-panel"
#define PRIV_SETPOWERSAVE "org.freedesktop.hal.power-management.set-powersave"
#else
#define PRIV_SUSPEND "hal-power-suspend"
#define PRIV_HIBERNATE "hal-power-hibernate"
#define PRIV_STANDBY "hal-power-standby"
#define PRIV_CPUFREQ "hal-power-cpufreq"
#define PRIV_LAPTOP_PANEL "hal-power-lcd-panel"
#define PRIV_SETPOWERSAVE "hal-power-set-powersave"
#endif
#endif

@ -0,0 +1,721 @@
/***************************************************************************
* Copyright (C) 2004-2006 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*! \file screen.cpp
* All here displayed file members of screen.cpp are related to operations with the
* XSreensaver/XServer. This functions are basic/low level operations. They are
* inspired, partly copied and modified from <a href="http://www.mplayerhq.hu/">MPlayer</a>
* code (1.05pre). Thanks for the inspiration. \n \n
* All 'higher level' class members of the class screen can be found here: \ref screen
* \brief In this file can be found all screensaver related code.
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2004 - 2006
*/
// own headers
#include "screen.h"
#include "kpowersave_debug.h"
/* needed for lXext C library linkage */
extern "C" {
#include <X11/Xproto.h>
#include <X11/extensions/dpms.h>
#include <X11/extensions/XTest.h>
}
// KDE Headers
#include <kprocess.h>
/*! The default constructor of the class screen */
screen::screen() {
kdDebugFuncIn(trace);
xscreensaver_lock = NULL;
xscreensaver_reset = NULL;
gnomescreensaver_lock = NULL;
gnomeScreensaverCheck = NULL;
xlock = NULL;
got_XScreensaver = false;
checkDPMSStatus();
check_xscreensaver_timer_runs = false;
SCREENSAVER_STATUS = -1;
screen_save_dcop_ref = DCOPRef( "kdesktop", "KScreensaverIface" );
check_xscreensaver_timer = new QTimer( this );
connect( check_xscreensaver_timer, SIGNAL(timeout()), this, SLOT(xscreensaver_ping() ));
SCREENSAVER_STATUS = checkScreenSaverStatus();
kdDebugFuncOut(trace);
}
/*! The default destructor of the class screen */
screen::~screen() {
kdDebugFuncIn(trace);
}
/*!
* To enable/disable the KScreensaver/Xscreensaver.
* \param enable true: activate/enable screensaver / false: deactivate/disable screensacer
* \return the result of try to set the screensaver
* \retval true if screensaver set correct
* \retval false if there is a error
*/
bool screen::setScreenSaver(bool enable){
kdDebugFuncIn(trace);
if(SCREENSAVER_STATUS == -1) SCREENSAVER_STATUS = checkScreenSaverStatus();
if((SCREENSAVER_STATUS == 1) || (SCREENSAVER_STATUS == 0)){
screen_save_dcop_ref.send( "enable", enable);
kdDebugFuncOut(trace);
return true;
}
if(SCREENSAVER_STATUS == 11 || SCREENSAVER_STATUS == 10){
if(enable) {
check_xscreensaver_timer->stop();
check_xscreensaver_timer_runs = false;
}
else {
check_xscreensaver_timer->start( xScreenSaver_timer_interval );
check_xscreensaver_timer_runs = true;
}
kdDebugFuncOut(trace);
return true;
} else {
kdDebugFuncOut(trace);
return false;
}
}
/* * * * *
* this inspired, partly copied and modified from MPlayer Code (1.05pre)
* START Section
*/
//! to handle information about wrong XWindows
/*!
* This integer represent information about XWindows.
* - got_badwindow == True: if the searched Window is wrong or if there is a problem/error
* - got_badwindow == False: if there is no problem/error
*/
static int got_badwindow;
//! ErrorHandler
/*! Errorhandler for all X-Server related operations */
static XErrorHandler defaultHandler;
//! to find/handle bad XWindows / XSetErrorHandler
/*!
* This function is involved by the search for the window of the Xscreensaver. By this
* function we seperate the BadWindow-error and set \ref got_badwindow if we get a BadWindow.
* For more information take a look at the XServer Documentation!
* \param dpy pointer to the active X-Display
* \param error pointer to XErrorEvent
* \return a info about a window-error
* \retval 0 if the window is a BadWindow as a integer
* \retval n the errorID/XErrorHandler if there is a error != BadWindow
*/
static int badwindow_handler(Display * dpy, XErrorEvent * error) {
if (error->error_code != BadWindow)
return (*defaultHandler) (dpy, error);
got_badwindow = True;
return 0;
}
//! to find the X-window of XScreensaver
/*!
* This function search for the X-Window of the active/activated XScreensaver.
* \param dpy pointer to the active X-Display
* \return The WindowID of the active XScreensaver.
* \retval 0 if no Windows/Xscreensaver was found
* \retval n ID of the founded XScreensaver window
*/
static Window find_xscreensaver_window(Display * dpy) {
kdDebugFuncIn(trace);
Window root = RootWindowOfScreen(DefaultScreenOfDisplay(dpy));
Window root2, parent, *kids;
Window retval = 0;
Atom xs_version;
unsigned int i;
unsigned int nkids = 0;
xs_version = XInternAtom(dpy, "_SCREENSAVER_VERSION", True);
if (!(xs_version != None && XQueryTree(dpy, root, &root2, &parent, &kids, &nkids)
&& kids && nkids)) {
kdDebugFuncOut(trace);
return 0;
}
defaultHandler = XSetErrorHandler(badwindow_handler);
for (i = 0; i < nkids; i++) {
Atom type;
int format, status;
unsigned long nitems, bytesafter;
unsigned char *v;
got_badwindow = False;
status = XGetWindowProperty(dpy, kids[i], xs_version, 0, 200, False, XA_STRING, &type, &format,
&nitems, &bytesafter, &v);
XSync(dpy, False);
if (got_badwindow) status = BadWindow;
if (status == Success && type != None){
retval = kids[i];
break;
}
}
XFree(kids);
XSetErrorHandler(defaultHandler);
kdDebugFuncOut(trace);
return retval;
}
/*!
* This function is used to ping the XScreensaver. There is no direct way to stop
* the XScreensaver without to kill/stop an restart or modify config-files of the
* current user. \n \n
* We ping the xscreensaver as defined in the QTimer-interval \ref xScreenSaver_timer_interval .
* The value of \ref xScreenSaver_timer_interval is 58 sec at the moment. The intervall must be
* smaller then 1 minute (this is the smallest interval of Xscreensaver a.t.m.).
*/
void screen::xscreensaver_ping(){
kdDebugFuncIn(trace);
if(!got_XScreensaver) {
mDisplay = qt_xdisplay();
xs_windowid = find_xscreensaver_window(mDisplay);
Atom deactivate = XInternAtom(mDisplay, "DEACTIVATE", False);
Atom screensaver = XInternAtom(mDisplay, "SCREENSAVER", False);
ev.xany.type = ClientMessage;
ev.xclient.display = mDisplay;
ev.xclient.window = xs_windowid;
ev.xclient.message_type = screensaver;
ev.xclient.format = 32;
memset(&ev.xclient.data, 0, sizeof(ev.xclient.data));
ev.xclient.data.l[0] = (long) deactivate;
if(xs_windowid != 0) got_XScreensaver = true;
}
if(got_XScreensaver){
if(XSendEvent(mDisplay, xs_windowid, False, 0L, &ev) == 0){
if(check_xscreensaver_timer->isActive()) {
check_xscreensaver_timer->stop();
this->got_XScreensaver = false;
}
}
XSync(mDisplay, False);
}
kdDebugFuncOut(trace);
}
/*
* END Section
* * * * * * */
/*!
* Checks if KScreenSaver or XscreenSaver is activated
* \return The result of the check as an integer value.
* \retval 0 KScreensaver is disabled
* \retval 1 KScreensaver is activated
* \retval 10 Xscreensaver is not found or not running
* \retval 11 Xscreensaver is activated
* \retval 99 gnome-screensaver check is running
* \retval -1 else
*/
int screen::checkScreenSaverStatus() {
kdDebugFuncIn(trace);
bool get_reply = false;
int kScreenSaver_tmp_status = -1;
int check = -1;
// check for KScreenSaver
DCOPReply reply = screen_save_dcop_ref.call("isEnabled()");
if(reply.isValid()){
if(reply.get(get_reply)){
if(get_reply) return 1;
/* don't return status her because we must also check if
* XScreensaver is activated !!!
*/
else kScreenSaver_tmp_status = 0;
}
}
// check for XScreensaver
if (got_XScreensaver) return 11;
else if(!got_XScreensaver) {
Display *dpy = qt_xdisplay();
Window windowid = find_xscreensaver_window(dpy);
if(windowid == 0) {
//Xscreensaver not detected
check_xscreensaver_timer->stop();
// KScreensaver activ and no XScreensaver found
if(kScreenSaver_tmp_status == 0) return 0;
// no KScreensaver and no XScreensaver found
else check = 10;
}
else return 11;
}
// check for gnome-screen-saver
if (check == 10) {
delete gnomeScreensaverCheck;
gnomeScreensaverCheck = new KProcess;
*gnomeScreensaverCheck << "gnome-screensaver-command" << "--query";
connect( gnomeScreensaverCheck , SIGNAL(processExited(KProcess *)),SLOT(getGSExited(KProcess *)));
if(!gnomeScreensaverCheck->start(KProcess::NotifyOnExit))
{
delete gnomeScreensaverCheck;
gnomeScreensaverCheck = NULL;
return 10;
}
else return 99;
}
return -1;
}
/*!
* \b SLOT which called if the call of gnomescreensaver-command exited
* \param gnomecheckcommand the KPocess which called this SLOT
*/
void screen::getGSExited (KProcess *gnomecheckcommand) {
kdDebugFuncIn(trace);
if (gnomecheckcommand->normalExit()){
if (gnomecheckcommand->exitStatus() == 1) SCREENSAVER_STATUS = 10;
else if (gnomecheckcommand->exitStatus() == 0) SCREENSAVER_STATUS = 20;
} else {
SCREENSAVER_STATUS = 10;
}
delete gnomeScreensaverCheck;
gnomeScreensaverCheck=NULL;
kdDebugFuncOut(trace);
return;
}
/*!
* This function check if DMPS is activated on the active X-Server.
* \return Integer value with the result of the check
* \retval 1 if DMPS is enabled
* \retval 0 if DMPS is disabled
* \retval -1 if there is a error
*/
int screen::checkDPMSStatus(){
kdDebugFuncIn(trace);
CARD16 state;
BOOL onoff;
int dummy;
Display *dpy = qt_xdisplay();
if (!DPMSQueryExtension(dpy, &dummy, &dummy) || !DPMSCapable(dpy)){
has_DPMS = false;
kdDebugFuncOut(trace);
return -1;
}
else
has_DPMS = true;
DPMSInfo(dpy, &state, &onoff);
if(onoff) {
kdDebugFuncOut(trace);
return 1;
} else {
kdDebugFuncOut(trace);
return 0;
}
}
/*!
* To set DPMS on X-Server on/off.
* \param enable true: activate/enable DMPS / false: deactivate/disable DPMS
* \return the result of try to set DPMS
* \retval true if DMPS correct set false
* \retval false if fail (DPMS not supported)
* \todo \li check/evaluate for errormessages
* \li check if DPMS-Settings correct set if DPMSEnable(dpy) used
*/
bool screen::setDPMS( bool enable ){
kdDebugFuncIn(trace);
defaultHandler = XSetErrorHandler(badwindow_handler);
Display *dpy = qt_xdisplay();
int dummy;
if (!DPMSQueryExtension(dpy, &dummy, &dummy) || !DPMSCapable(dpy)){
has_DPMS = false;
XSetErrorHandler(defaultHandler);
kdDebugFuncOut(trace);
return false;
}
if(enable) DPMSEnable(dpy);
else DPMSDisable(dpy);
XFlush(dpy);
XSetErrorHandler(defaultHandler);
kdDebugFuncOut(trace);
return true;
}
/*!
* This function set the Timeouts for DPMS for the X-Server.
* \param standby_timeout time in seconds to stand-by the display as integer value
* \param suspend_timeout time in seconds to suspend the display as integer value
* \param off_timeout time in seconds to switch off the display as integer value
* \return the result of try to set DPMS-Timeouts
* \retval true if DMPS correct set false
* \retval false if fail (DPMS not supported)
*/
bool screen::setDPMSTimeouts( int standby_timeout, int suspend_timeout, int off_timeout){
kdDebugFuncIn(trace);
//XErrFunc defaultHandler;
defaultHandler = XSetErrorHandler(badwindow_handler);
Display *dpy = qt_xdisplay();
int dummy;
if (!DPMSQueryExtension(dpy, &dummy, &dummy) || !DPMSCapable(dpy)){
has_DPMS = false;
XSetErrorHandler(defaultHandler);
kdDebugFuncOut(trace);
return false;
}
DPMSSetTimeouts(dpy, 60 * standby_timeout, 60 * suspend_timeout, 60 * off_timeout);
XFlush(dpy);
XSetErrorHandler(defaultHandler);
kdDebugFuncOut(trace);
return true;
}
/*!
* Use this function to lock the screen. This function use automatically the right
* method for KDE or GNOME.
* \return boolean with the result of the operation
* \retval true if the requested method worked
* \retval false if there was a error
*/
bool screen::lockScreen(){
kdDebugFuncIn(trace);
// screensaver status known?
if(SCREENSAVER_STATUS == -1) SCREENSAVER_STATUS = checkScreenSaverStatus();
// set lock for KScreensaver
if((SCREENSAVER_STATUS == 1) || (SCREENSAVER_STATUS == 0)){
DCOPReply reply = screen_save_dcop_ref.call("lock");
if ( reply.isValid() ) {
return true;
} else {
kdWarning() << "Could not lock KScreensaver, try XScreensaver as fallback." << endl;
goto xscreensaver;
}
}
// set lock for XScreensaver
else if(SCREENSAVER_STATUS == 11){
xscreensaver:
delete xscreensaver_lock;
xscreensaver_lock = new KProcess;
*xscreensaver_lock << "xscreensaver-command" << "-lock";
connect(xscreensaver_lock, SIGNAL(processExited(KProcess*)),
this, SLOT(cleanProcess(KProcess*)));
bool status = xscreensaver_lock->start(KProcess::DontCare);
if(!status)
{
delete xscreensaver_lock;
xscreensaver_lock = NULL;
}
return status;
}
// lock with gnome-screen-saver
else if(SCREENSAVER_STATUS == 20){
delete gnomescreensaver_lock;
gnomescreensaver_lock = new KProcess;
*gnomescreensaver_lock << "gnome-screensaver-command" << "--lock";
connect(gnomescreensaver_lock, SIGNAL(processExited(KProcess*)),
this, SLOT(cleanProcess(KProcess*)));
bool status = gnomescreensaver_lock->start(KProcess::DontCare);
if(!status)
{
delete gnomescreensaver_lock;
gnomescreensaver_lock=NULL;
}
return status;
}
// set lock for xlock --> no kscreensaver, no xscreensaver present and
// the check for gnome screensaver is not finished. This should normaly
// not happen, but in this case we use xlock
else if(SCREENSAVER_STATUS == 10 || SCREENSAVER_STATUS == 99){
delete xlock;
xlock = new KProcess;
*xlock << "xlock"; //<< "-mode" << "blank";
connect(xlock, SIGNAL(processExited(KProcess*)),
this, SLOT(cleanProcess(KProcess*)));
bool status = xlock->start(KProcess::DontCare);
if(!status)
{
delete xlock;
xlock = NULL;
}
return status;
}
else return false;
}
/*!
* Use this function to lock the screen with a specified lock method.
* \param lock_withMethod a QString, which contain the alias for the lock
* command.
* \return boolean with the result of the operation
* \retval true if the requested method worked
* \retval false if there was a error
* \todo check if we should also set blank only if the user would like!!!
*/
bool screen::lockScreen( QString lock_withMethod ) {
kdDebugFuncIn(trace);
if (lock_withMethod == "automatic") {
lockScreen();
return true;
}
else if (lock_withMethod == "xlock") {
delete xlock;
xlock = new KProcess;
*xlock << "xlock";
connect(xlock, SIGNAL(processExited(KProcess*)),
this, SLOT(cleanProcess(KProcess*)));
bool status = xlock->start(KProcess::DontCare);
if(!status)
{
delete xlock;
xlock=NULL;
}
return status;
}
else if (lock_withMethod == "gnomescreensaver") {
gnomescreensaver_lock = new KProcess;
*gnomescreensaver_lock << "gnome-screensaver-command" << "--lock";
connect(gnomescreensaver_lock, SIGNAL(processExited(KProcess*)),
this, SLOT(cleanProcess(KProcess*)));
bool status = gnomescreensaver_lock->start(KProcess::DontCare);
if(!status)
{
delete gnomescreensaver_lock;
gnomescreensaver_lock = NULL;
}
return status;
}
else {
// screensaver status known?
SCREENSAVER_STATUS = checkScreenSaverStatus();
if (lock_withMethod == "kscreensaver") {
if((SCREENSAVER_STATUS == 1) || (SCREENSAVER_STATUS == 0)){
DCOPReply reply = screen_save_dcop_ref.call("lock");
if ( reply.isValid() ) {
return true;
} else {
kdWarning() << "Could not call lock for KScreensaver, try XScreensaver "
<< "as fallback." << endl;
goto xscreensaver;
}
}
else return false;
}
else if (lock_withMethod == "xscreensaver") {
if(SCREENSAVER_STATUS == 11){
xscreensaver:
delete xscreensaver_lock;
xscreensaver_lock = new KProcess;
*xscreensaver_lock << "xscreensaver-command" << "-lock";
connect(xscreensaver_lock, SIGNAL(processExited(KProcess*)),
this, SLOT(cleanProcess(KProcess*)));
bool status = xscreensaver_lock->start(KProcess::DontCare);
if(!status)
{
delete xscreensaver_lock;
xscreensaver_lock = NULL;
}
return status;
}
else return false;
}
else return false;
}
return false;
}
/*!
* Use this function to set the screensaver to 'blank only' instead of
* using the in KDE or GNOME set screensaver.
* \todo find a way to set the xscreensaver to 'blank only'
*/
void screen::blankOnlyScreen( bool blankonly ){
kdDebugFuncIn(trace);
if(SCREENSAVER_STATUS == -1) SCREENSAVER_STATUS = checkScreenSaverStatus();
// set KScreensaver
if((SCREENSAVER_STATUS == 1) || (SCREENSAVER_STATUS == 0)){
screen_save_dcop_ref.send("setBlankOnly", blankonly);
}
// set XScreensaver
else if(SCREENSAVER_STATUS == 11){
// implement something !!!
}
kdDebugFuncOut(trace);
}
/*!
* Use this function to reset the KDE screensaver/DPMS settings
* \return boolean with the result of the operation
* \retval true if the reset was called
* \retval false if there was a error
*/
bool screen::resetKDEScreensaver(){
kdDebugFuncIn(trace);
if(SCREENSAVER_STATUS == -1)
SCREENSAVER_STATUS = checkScreenSaverStatus();
// do this only if the screensaver is not running
if(SCREENSAVER_STATUS == 0){
DCOPReply reply = screen_save_dcop_ref.call("configure");
if ( reply.isValid() ) {
kdDebugFuncOut(trace);
return true;
} else {
kdWarning() << "Could not call configure() for the KDE screensaver." << endl;
kdDebugFuncOut(trace);
return false;
}
} else {
kdDebugFuncOut(trace);
return false;
}
}
/*!
* Use this function to reset the xscreensaver settings
* \return boolean with the result of the operation
* \retval true if the reset was called
* \retval false if there was a error
*/
bool screen::resetXScreensaver(){
kdDebugFuncIn(trace);
if(checkScreenSaverStatus() == 11) {
delete xscreensaver_reset;
xscreensaver_reset = new KProcess;
*xscreensaver_reset << "xscreensaver-command" << "-restart";
connect(xscreensaver_reset, SIGNAL(processExited(KProcess*)),
this, SLOT(cleanProcess(KProcess*)));
bool status = xscreensaver_reset->start(KProcess::DontCare);
if(!status)
{
delete xscreensaver_reset;
xscreensaver_reset = NULL;
}
kdDebugFuncOut(trace);
return status;
} else {
kdDebugFuncOut(trace);
return false;
}
}
/*!
* function to call xset commandline tool to force shutdown the display with dpms
*/
void screen::forceDPMSOff() {
kdDebugFuncIn(trace);
KProcess *xset = new KProcess;
*xset << "xset" << "dpms" << "force" << "off";
connect(xset, SIGNAL(processExited(KProcess*)),
this, SLOT(cleanProcess(KProcess*)));
if(!xset->start())
{
delete xset;
}
kdDebugFuncOut(trace);
}
/*!
* function to clean KProcess objects
*/
void screen::cleanProcess(KProcess* proc)
{
delete proc;
proc = NULL;
}
/*!
* function to fake a key event for the shift key. Use this to show the login
* passwd dialog after suspend if we locked the screen.
*/
void screen::fakeShiftKeyEvent() {
kdDebugFuncIn(trace);
Display *dpy = qt_xdisplay();
if (dpy) {
XTestFakeKeyEvent(dpy, 62, 1, 0);
XTestFakeKeyEvent(dpy, 62, 0, 0);
XFlush(dpy);
}
kdDebugFuncOut(trace);
return;
}
#include "screen.moc"

@ -0,0 +1,178 @@
/**************************************************************************
* Copyright (C) 2004-2006 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef SCREEN_H
#define SCREEN_H
/* this is needed to avoid typedef clash with X11/Xmd.h (X11/Xproto.h)
*/
#ifndef QT_CLEAN_NAMESPACE
#define QT_CLEAN_NAMESPACE
#endif
// KDE Header
#include <dcopref.h>
#include <kprocess.h>
#include <klocale.h>
// QT Header
#include <qstring.h>
#include <qwidget.h>
//#include <qvector.h>
#include <qtimer.h>
#include <qevent.h>
// X11 Header
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
/*!
* \file screen.h
* \brief Headerfile for screen.cpp and the class \ref screen.
*/
/*!
* \class screen
* \brief class for all screensaver related funtionality
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2004 - 2006
*/
class screen : public QWidget
{
Q_OBJECT
private:
//! reference to DCOP
/*!
* This is the DCOP-reference to the KScreensaverIface. We use this to send
* 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;
//! contains information about Xscreensaver
/*!
* This boolean represent information if Xscreensaver is active in X.
* \li true: if there is a Xscreensaver
* \li false: if there isn't a Xscreensaver
*/
bool got_XScreensaver;
//! cointains status information about the screensaver
/*!
* The value of this integer represent statusinformation about the
* screensaver (Xscreensaver and KScreensaver):
* \li (value == 0) if KScreensaver is disabled
* \li (value == 1) if KScreensaver is activated
* \li (value == 10) if Xscreensaver is not found or not running
* \li (value == 11) if Xscreensaver is activated
* \li (value == 20) if gnome-screen-saver is available
* \li (value == -1) else
*/
int SCREENSAVER_STATUS;
//! QTimer - interval
/*! This is the interval to poll the Xscreensaver. The value is 58 sec */
static const int xScreenSaver_timer_interval = 58000;
//! QTimer to check/ping the Xscreensaver
/*! This is the QTimer to ping the Xscreensaver. The ping-interval is defined
* through \ref xScreenSaver_timer_interval . */
QTimer *check_xscreensaver_timer;
//! the active X-Display
/*! Here we store a pointer to the active X-Display of KDE or GNOME */
Display *mDisplay;
//! Xscreensaver windowsid
/*! The windowid of the active Xscreensaver. */
Window xs_windowid;
//! XEvent for the Xscreensaver
/*! This XEvent is used so send the commands to Xscreensaver. */
XEvent ev;
private slots:
//! to ping and deactivate the Xscreensaver
void xscreensaver_ping();
//! to get the return value of gnomescreensaver-command
void getGSExited(KProcess *);
void cleanProcess(KProcess *);
public slots:
//! to fake a keyevent for the login dialog after suspend with lock screen
void fakeShiftKeyEvent();
public:
//! to check if \ref check_xscreensaver_timer is active
/*!
* This boolean contains information about QTimer \ref check_xscreensaver_timer .
* \li true: if the QTtimer is running
* \li false: if the QTimer isn't active/ isn't in use
*/
bool check_xscreensaver_timer_runs;
//! info about DPMS on the machine
/*!
* This variable represent the DPMS status of the machine.
* \li true: if the machine is DPMSable
* \li false: if the machine isn't DPMSable or DPMS is basic deativated
*/
bool has_DPMS;
//! blank only the screen
void blankOnlyScreen( bool );
//! reset KDE screensaver settings
bool resetKDEScreensaver();
//! reset XScreensaver settings
bool resetXScreensaver();
//! force DPMS off for display
void forceDPMSOff();
//! lock the screen
bool lockScreen();
//! lock the screen with a give alias for the lock method
bool lockScreen( QString );
//! to set DPMS on/off
bool setDPMS( bool );
//! to set the DPMS Timeouts
bool setDPMSTimeouts( int, int, int );
//! to activate/disable the Screensaver
bool setScreenSaver( bool );
//! for check the status of the screensaver
int checkScreenSaverStatus();
//! for check the actual status of DPMS on the machine
int checkDPMSStatus();
//! default constructor
screen();
//! default destructor
virtual ~screen();
};
#endif

@ -0,0 +1,381 @@
/***************************************************************************
* Copyright (C) 2005 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file settings.cpp
* \brief In this file can be found the settings ( read ) related code.
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2005
*/
// KDE Header
#include <klocale.h>
// QT Header
// own headers
#include "settings.h"
/*! This is the default constructor of the class Settings. */
Settings::Settings()
{
kconfig = new KConfig("kpowersaverc", true );
kde = new KDE_Settings();
load_kde();
load_general_settings();
}
/*! This is the default destructor of the class Settings. */
Settings::~Settings()
{
delete kconfig;
delete kde;
}
/*!
* Loads the scheme settings from kpowersaverc and fills the related variables.
* \param schemeName QString with the name (realname not i18n() version) of the
* scheme which setting should be load. If the scheme could not
* be loaded, this function try to load "default-scheme"
* \return the result of the load
* \retval true if the settings could be loaded
* \retval false if there was no group named like schemeName or named "default-scheme"
*/
bool Settings::load_scheme_settings(QString schemeName){
kconfig->reparseConfiguration();
bool setToDefault = false;
if( schemeName == "Performance" || schemeName == i18n("Performance"))
schemeName = "Performance";
else if( schemeName == "Powersave" || schemeName == i18n("Powersave"))
schemeName = "Powersave";
else if( schemeName == "Presentation" || schemeName == i18n("Presentation"))
schemeName = "Presentation";
else if( schemeName == "Acoustic" || schemeName == i18n("Acoustic"))
schemeName = "Acoustic";
if(kconfig->hasGroup(schemeName) || kconfig->hasGroup("default-scheme") ){
if(kconfig->hasGroup(schemeName)) kconfig->setGroup(schemeName);
else {
// fallback to 'default-scheme'
kconfig->setGroup("default-scheme");
schemeName = "default-scheme";
setToDefault = true;
}
currentScheme = schemeName;
specSsSettings = kconfig->readBoolEntry("specSsSettings",false);
disableSs = kconfig->readBoolEntry("disableSs",false);
blankSs = kconfig->readBoolEntry("blankSs",false);
specPMSettings = kconfig->readBoolEntry("specPMSettings",false);
disableDPMS = kconfig->readBoolEntry("disableDPMS",false);
int i_standby = kconfig->readNumEntry("standbyAfter", -1);
if (i_standby >= 0) standbyAfter = i_standby;
else {
kconfig->setGroup("default-scheme");
i_standby = kconfig->readNumEntry("standbyAfter", -1);
if(i_standby >= 0) {
standbyAfter = i_standby;
}
else standbyAfter = 0;
// reset the group
kconfig->setGroup(schemeName);
}
int i_suspend = kconfig->readNumEntry("suspendAfter", -1);
if (i_suspend >= 0) suspendAfter = i_suspend;
else {
kconfig->setGroup("default-scheme");
i_suspend = kconfig->readNumEntry("suspendAfter", -1);
if(i_suspend >= 0) {
suspendAfter = i_suspend;
}
else suspendAfter = 0;
// reset the group
kconfig->setGroup(schemeName);
}
int i_poweroff = kconfig->readNumEntry("powerOffAfter", -1);
if (i_poweroff >= 0) powerOffAfter = i_poweroff;
else {
kconfig->setGroup("default-scheme");
i_poweroff = kconfig->readNumEntry("powerOffAfter", -1);
if(i_poweroff >= 0) {
powerOffAfter = i_poweroff;
}
else powerOffAfter = 0;
// reset the group
kconfig->setGroup(schemeName);
}
brightness = kconfig->readBoolEntry("enableBrightness",false);
brightnessValue = kconfig->readNumEntry("brightnessPercent", -1);
if (brightnessValue == -1) {
kconfig->setGroup("default-scheme");
brightnessValue = kconfig->readNumEntry("brightnessPercent", 100);
// reset the group
kconfig->setGroup(schemeName);
}
int i_autoInactiveActionAfter = kconfig->readNumEntry("autoInactiveActionAfter", -1);
if (i_autoInactiveActionAfter >= 0) autoInactiveActionAfter = i_autoInactiveActionAfter;
else {
kconfig->setGroup("default-scheme");
i_autoInactiveActionAfter = kconfig->readNumEntry("autoInactiveActionAfter", -1);
if(i_autoInactiveActionAfter >= 0) {
autoInactiveActionAfter = i_autoInactiveActionAfter;
}
else autoInactiveActionAfter = 0;
// reset the group
kconfig->setGroup(schemeName);
}
QString _autoInactiveAction = kconfig->readEntry("autoInactiveAction", "NULL");
if( _autoInactiveAction != "NULL") {
autoInactiveAction = _autoInactiveAction;
}
else {
kconfig->setGroup("default-scheme");
_autoInactiveAction = kconfig->readEntry("autoInactiveAction", "NULL");
if(_autoInactiveAction != "NULL") autoInactiveAction = _autoInactiveAction;
else autoInactiveAction = "_NONE_";
// reset the group
kconfig->setGroup(schemeName);
}
autoSuspend = kconfig->readBoolEntry("autoSuspend",false);
autoInactiveSBlistEnabled = kconfig->readBoolEntry("autoInactiveSchemeBlacklistEnabled",false);
autoInactiveSBlist = kconfig->readListEntry("autoInactiveSchemeBlacklist", ',');
int i_autoDimmAfter = kconfig->readNumEntry("autoDimmAfter", -1);
if (i_autoDimmAfter >= 0) autoDimmAfter = i_autoDimmAfter;
else {
kconfig->setGroup("default-scheme");
i_autoDimmAfter = kconfig->readNumEntry("autoDimmAfter", -1);
if(i_autoDimmAfter >= 0) {
autoDimmAfter = i_autoDimmAfter;
}
else autoDimmAfter = 0;
// reset the group
kconfig->setGroup(schemeName);
}
int i_autoDimmTo = kconfig->readNumEntry("autoDimmTo", -1);
if (i_autoDimmTo >= 0) autoDimmTo = i_autoDimmTo;
else {
kconfig->setGroup("default-scheme");
i_autoDimmTo = kconfig->readNumEntry("autoDimmAfter", -1);
if(i_autoDimmTo >= 0) {
autoDimmTo = i_autoDimmTo;
}
else autoDimmTo = 0;
// reset the group
kconfig->setGroup(schemeName);
}
autoDimm = kconfig->readBoolEntry("autoDimm",false);
autoDimmSBlistEnabled = kconfig->readBoolEntry("autoDimmSchemeBlacklistEnabled",false);
autoDimmSBlist = kconfig->readListEntry("autoDimmSchemeBlacklist", ',');
disableNotifications = kconfig->readBoolEntry("disableNotifications",false);
QString _cpufreqpolicy = kconfig->readEntry("cpuFreqPolicy", "NULL");
if( _cpufreqpolicy == "NULL") {
kconfig->setGroup("default-scheme");
_cpufreqpolicy = kconfig->readEntry("cpuFreqPolicy", "NULL");
// reset the group
kconfig->setGroup(schemeName);
}
if (_cpufreqpolicy.startsWith("DYNAMIC")) {
cpuFreqPolicy = DYNAMIC;
} else if (_cpufreqpolicy.startsWith("PERFORMANCE")) {
cpuFreqPolicy = PERFORMANCE;
} else if (_cpufreqpolicy.startsWith("POWERSAVE")) {
cpuFreqPolicy = POWERSAVE;
} else {
// set as default
cpuFreqPolicy = DYNAMIC;
}
cpuFreqDynamicPerformance = kconfig->readNumEntry("cpuFreqDynamicPerformance", -1);
if( cpuFreqDynamicPerformance == -1) {
kconfig->setGroup("default-scheme");
cpuFreqDynamicPerformance = kconfig->readNumEntry("cpuFreqDynamicPerformance", 51);
// reset the group
kconfig->setGroup(schemeName);
}
return true;
}
else return false;
}
/*!
* Loads the general settings from kpowersaverc and fills the related variables.
* \return the result of the load
* \retval true if the settings could be loaded
* \retval false if there was no group named 'General'
*/
bool Settings::load_general_settings(){
kconfig->reparseConfiguration();
if(kconfig->hasGroup("General")) {
kconfig->setGroup("General");
lockOnSuspend = kconfig->readBoolEntry("lockOnSuspend",true);
lockOnLidClose = kconfig->readBoolEntry("lockOnLidClose",true);
autostart = kconfig->readBoolEntry("Autostart",false);
autostartNeverAsk = kconfig->readBoolEntry("AutostartNeverAsk",false);
psMsgAsPassivePopup = kconfig->readBoolEntry("psMsgAsPassivePopup",false);
forceDpmsOffOnLidClose = kconfig->readBoolEntry("forceDpmsOffOnLidClose",false);
unmountExternalOnSuspend = kconfig->readBoolEntry("unmountExternalOnSuspend",true);
callSetPowerSaveOnAC = kconfig->readBoolEntry("callSetPowerSaveOnAC",true);
lockmethod = kconfig->readEntry("lockMethod", "NULL");
if(lockmethod == "NULL") lockmethod = "automatic";
autoInactiveGBlist = kconfig->readListEntry("autoInactiveBlacklist", ',');
autoDimmGBlist = kconfig->readListEntry("autoDimmBlacklist", ',');
autoSuspendCountdown = kconfig->readBoolEntry("AutoSuspendCountdown", false);
autoSuspendCountdownTimeout = kconfig->readNumEntry("AutoSuspendCountdownTimeOut", 30);
timeToFakeKeyAfterLock = kconfig->readNumEntry("timeToFakeKeyAfterLock", 5000);
schemes = kconfig->readListEntry("schemes", ',');
ac_scheme = kconfig->readEntry("ac_scheme", "Performance");
battery_scheme = kconfig->readEntry("battery_scheme", "Powersave");
// Read battery levels and related actions
batteryWarningLevel = kconfig->readNumEntry("batteryWarning", 12);
batteryLowLevel = kconfig->readNumEntry("batteryLow", 7);
batteryCriticalLevel = kconfig->readNumEntry("batteryCritical", 2);
batteryWarningLevelAction = mapActionToType(kconfig->readEntry("batteryWarningAction",""));
if (batteryWarningLevelAction == BRIGHTNESS) {
batteryWarningLevelActionValue = kconfig->readNumEntry("batteryWarningActionValue", -1);
}
batteryLowLevelAction = mapActionToType(kconfig->readEntry("batteryLowAction",""));
if (batteryLowLevelAction == BRIGHTNESS) {
batteryLowLevelActionValue = kconfig->readNumEntry("batteryLowActionValue", -1);
}
batteryCriticalLevelAction = mapActionToType(kconfig->readEntry("batteryCriticalAction",""));
if (batteryCriticalLevelAction == BRIGHTNESS) {
batteryCriticalLevelActionValue = kconfig->readNumEntry("batteryCriticalActionValue", -1);
}
lidcloseAction = mapActionToType(kconfig->readEntry("ActionOnLidClose",""));
if (lidcloseAction == BRIGHTNESS) {
lidcloseActionValue = kconfig->readNumEntry("ActionOnLidCloseValue", -1);
}
// avoid logout dialog since this make no sence with lidclose
if (lidcloseAction == LOGOUT_DIALOG) {
lidcloseAction = NONE;
}
powerButtonAction = mapActionToType(kconfig->readEntry("ActionOnPowerButton",""));
if (powerButtonAction == BRIGHTNESS) {
powerButtonActionValue = kconfig->readNumEntry("ActionOnPowerButtonValue", -1);
}
sleepButtonAction = mapActionToType(kconfig->readEntry("ActionOnSleepButton",""));
if ((sleepButtonAction != GO_SUSPEND2RAM) && (sleepButtonAction != GO_SUSPEND2DISK)) {
sleepButtonAction = NONE;
}
s2diskButtonAction = mapActionToType(kconfig->readEntry("ActionOnS2DiskButton",""));
if ((s2diskButtonAction != GO_SUSPEND2RAM) && (s2diskButtonAction != GO_SUSPEND2DISK)) {
s2diskButtonAction = NONE;
}
return true;
}
else return false;
}
/*!
* Map the string value from the config file to the type from \ref action
* \param _action a QString to map
* \return a integer value with the result of the mapping as \ref action
*/
action Settings::mapActionToType (QString _action) {
if (_action.isEmpty()) {
return NONE;
} else if (_action.startsWith("SHUTDOWN")) {
return GO_SHUTDOWN;
} else if (_action.startsWith("LOGOUT_DIALOG")) {
return LOGOUT_DIALOG;
} else if (_action.startsWith("SUSPEND2DISK")) {
return GO_SUSPEND2DISK;
} else if (_action.startsWith("SUSPEND2RAM")) {
return GO_SUSPEND2RAM;
} else if (_action.startsWith("CPUFREQ_POWERSAVE")) {
return CPUFREQ_POWERSAVE;
} else if (_action.startsWith("CPUFREQ_DYNAMIC")) {
return CPUFREQ_DYNAMIC;
} else if (_action.startsWith("CPUFREQ_PERFORMANCE")) {
return CPUFREQ_PERFORMANCE;
} else if (_action.startsWith("BRIGHTNESS")) {
return BRIGHTNESS;
} else {
return UNKNOWN_ACTION;
}
}
/*!
* Loads the default KDE Settings from the different configfiles and store
* them to a \ref KDE_Settings 'object'.
* \retval true if the settings could be loaded
* \retval false if there was a error/problem
*/
void Settings::load_kde(){
KConfig *_kconfig = new KConfig("kcmdisplayrc", true );
/* KDE settings [DisplayEnergy] from kcmdisplayrc */
if(_kconfig->hasGroup("DisplayEnergy")) {
_kconfig->setGroup("DisplayEnergy");
kde->displayEnergySaving = _kconfig->readBoolEntry("displayEnergySaving", true);
kde->displayStandby = _kconfig->readNumEntry("displayStandby", 7);
kde->displaySuspend = _kconfig->readNumEntry("displaySuspend", 13);
kde->displayPowerOff = _kconfig->readNumEntry("displayPowerOff", 19);
}
delete _kconfig;
_kconfig = new KConfig("kdesktoprc", true );
/* KDE settings [ScreenSaver] from kdesktoprc */
if(_kconfig->hasGroup("ScreenSaver")) {
_kconfig->setGroup("ScreenSaver");
kde->enabled = _kconfig->readBoolEntry("Enabled", true);
kde->lock = _kconfig->readBoolEntry("Lock", true);
QString _savername = _kconfig->readEntry("Saver", "KBlankscreen.desktop");
if (_savername.startsWith("KBlankscreen.desktop"))
kde->blanked = true;
else
kde->blanked = false;
}
delete _kconfig;
}

@ -0,0 +1,496 @@
/***************************************************************************
* Copyright (C) 2005 by Danny Kukawka *
* <dkukawka@suse.de>, <danny.kukawka@web.de> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file settings.h
* \brief Headerfile for settings.cpp and the class \ref Settings.
*/
#ifndef SETTINGS_H
#define SETTINGS_H
// KDE - Header
#include <kconfig.h>
// QT - Header
#include <qstring.h>
#include <qstringlist.h>
// own headers
#include "hardware.h"
enum action{
UNKNOWN_ACTION = -2,
NONE = -1,
GO_SHUTDOWN,
LOGOUT_DIALOG,
GO_SUSPEND2RAM,
GO_SUSPEND2DISK,
SWITCH_SCHEME,
BRIGHTNESS,
CPUFREQ_POWERSAVE,
CPUFREQ_DYNAMIC,
CPUFREQ_PERFORMANCE
};
/*!
* \class KDE_Settings
* \brief class/object for the KDE default settings
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2005
*/
class KDE_Settings {
public:
/* KDE settings [DisplayEnergy] */
//! if KDE enable DPMS
/*!
* This boolean tells if KDE enable DPMS by global settings.
* \li true: if KDE enable DPMS
* \li false: if not
*/
bool displayEnergySaving;
//! time for DPMS standby
/*!
* This integer represent the time in minutes after which the
* display should do to stand-by.
*/
int displayStandby;
//! time for DPMS suspend
/*!
* This integer represent the time in minutes after which the
* display should suspend.
*/
int displaySuspend;
//! time for DPMS power-off
/*!
* This integer represent the time in minutes after which the
* display should power off.
*/
int displayPowerOff;
/* KDE settings [ScreenSaver] */
//! if the KDE screensaver is enabled
/*!
* This boolean tells if the KDE screensaver is enabled.
* \li true: if screensaver enabled
* \li false: if screensaver disabled
*/
bool enabled;
//! if KDE should lock the screen
/*!
* This boolean tells if KDE lock the screen.
* \li true: if lock the screen
* \li false: if not
*/
bool lock;
//! if KDE already only blank the screensaver
/*!
* This boolean tells if KDE already only use the blank screensaver
* \li true: if blank screensaver
* \li false: if else
*/
bool blanked;
};
/*!
* \class Settings
* \brief class for the Settings ( read ) related funtionality
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2005
*/
class Settings{
public:
//! default constructor
Settings();
//! default destructor
virtual ~Settings();
//! a instance of the KDE global settings.
KDE_Settings *kde;
/* START ************************** General settings *******************************/
//! name of the default "onAC" scheme
QString ac_scheme;
//! name of the default "on Battery" scheme
QString battery_scheme;
//! a list with the names of the currently available schemes.
/*!
* List with the names of the currently configured schemes. The name of the
* schemes are the same as we use for the related selection in the configure file.
* Note: Be sure that the name for the default schemes is not translated !!!
*/
QStringList schemes;
//! the name of the lock method
/*!
* This QString contains a alias to the selected method for lock screen. Possible values:
* \li automatic for automatically selected (sequence: kscreensaver, xscreensaver, xlock)
* \li kscreensaver for KDE KScreensaver
* \li xscreensaver for XScreensaver (default used on GNOME)
* \li xlock for xlock
*/
QString lockmethod;
//! if the messages from powersave should popup as Kpassivepopup
/*!
* This boolean tells if the messages from powersave should be displayed
* as KPassivePopup or as KMessageBox::error
* \li true: if use KPassivePopup
* \li false: if not
*/
bool psMsgAsPassivePopup;
//! if the screen should be locked on suspend
/*!
* This boolean tells if the screen should be locked befor a suspend or standby.
* \li true: if the screen should be locked
* \li false: if not lock the screen
*/
bool lockOnSuspend;
//! if the screen should be locked on 'lid close' event
/*!
* This boolean tells if the screen should be locked on a 'Lid close' event.
* \li true: if the screen should be locked
* \li false: if not lock the screen
*/
bool lockOnLidClose;
//! if kpowersave starts on login
/*!
* This boolean tells if kpowersave should be start automatically on userlogin.
* The value could be changed trough the configuration dialog and if the user
* stop kpowersave.
* \li true: if autostart
* \li false: if not start on login
*/
bool autostart;
//! if kpowersave ask for the user for autostart
/*!
* This boolean tells if kpowersave ask for autostart settings if user stop kpowersave.
* \li true: if ask on stop
* \li false: if never ask
*/
bool autostartNeverAsk;
//! if kpowersave should force DPMS shutdown for display for lidclose
/*!
* This boolean tells if kpowersave should force dpms shutdown for the display if a
* lidclose event was recieved
* \li true: if shutdown display
* \li false: if not
*/
bool forceDpmsOffOnLidClose;
//! if kpowersave should call SetPowerSave() on HAL
/*!
* This boolean tells if kpowersave should call SetPowerSave on HAL depending
* on the AC state.
* \li true: if should call
* \li false: if not
*/
bool callSetPowerSaveOnAC;
//! time after resume to fake keyevent
/*!
* This integere contains the time after wich kpowersave should fake a keyevent
* to show the login dialog if the desktop was locked on suspend. Value is in msec.
*/
int timeToFakeKeyAfterLock;
//! percentag value of battery level for warning state
/*!
* This integer represent the remaining percentag of the battery
* where we reach the battery warning level. This is a value between 0 and 100.
*/
int batteryWarningLevel;
//! percentag value of battery level for low state
/*!
* This integer represent the remaining percentag of the battery
* where we reach the battery low level. This is a value between 0 and 100 and
* should be lower than \ref batteryWarningLevel and higher than \ref batteryCriticalLevel
*/
int batteryLowLevel;
//! percentag value of battery level for critical state
/*!
* This integer represent the remaining percentag of the battery
* where we reach the battery critical level. This is a value between 0 and 100 and
* should be lower than \ref batteryLowLevel and higher than 0
*/
int batteryCriticalLevel;
//! the action that should be called if the warning level is reached
action batteryWarningLevelAction;
//! to \ref batteryWarningLevelAction related value
int batteryWarningLevelActionValue;
//! the action that should be called if the low level is reached
action batteryLowLevelAction;
//! to \ref batteryLowLevelAction related value
int batteryLowLevelActionValue;
//! the action that should be called if the critical level is reached
action batteryCriticalLevelAction;
//! to \ref batteryCriticalLevelAction related value
int batteryCriticalLevelActionValue;
//! the action that should be called if the lid closed
action lidcloseAction;
//! to \ref lidcloseAction related value
int lidcloseActionValue;
//! the action that should be called if the power button get pressed
action powerButtonAction;
//! to \ref powerButtonAction related value
int powerButtonActionValue;
//! the action that should be called if the suspend2ram/sleep button get pressed
action sleepButtonAction;
//! the action that should be called if the suspend2disk button get pressed
action s2diskButtonAction;
/* END ************************** General settings *******************************/
/* START ************************ Scheme settings and values ***********************/
//! name of the scheme representing the current settings
QString currentScheme;
// ---------- Screensaver/DPMS section ------------ //
//! if kpowersave use own screensaver settings
/*!
* This boolean represent kpowersave userspecific screensaver settings. If kpowersave
* use own screensaver settings the KDE or GNOME settings are overwritten.
* \li true: if kpowersave use own settings
* \li false: if kpowersave don't change any screensaver settings
*/
bool specSsSettings;
//! if kpowersave should disable the screensaver
/*!
* This boolean tells if kpowersave should disable the screensaver.
* \li true: if kpowersave should disable the screensaver
* \li false: if not
*/
bool disableSs;
//! if kpowersave should blank only the screen
/*!
* This boolean tells if kpowersave should blank only the screen instead of
* using the global selected KDE or GNOME screensaver.
* \li true: if kpowersave should blank only the screen
* \li false: if not and don't change anything
*/
bool blankSs;
//! if kpowersave use own DPMS settings
/*!
* This boolean tells if kpowersave should use own userspecific settings for
* Display PowerManagement Settings. If this value is true kpowersave overwritte
* the KDE or GNOME global settings.
* \li true: if kpowersave use own DPMS settings
* \li false: if kpowersave don't change DPMS settings
*/
bool specPMSettings;
//! if kpowersave should disable DPMS
/*!
* This boolean tells if kpowersave should disable DPMS. If this is used,
* kpowersave overwrite the KDE or GNOME global settings.
* \li true: if kpowersave should disable dpms
* \li false: if not
*/
bool disableDPMS;
//! time for DPMS standby
/*!
* This integer represent the time in minutes after which the
* display should do to stand-by.
*/
int standbyAfter;
//! time for DPMS suspend
/*!
* This integer represent the time in minutes after which the
* display should suspend.
*/
int suspendAfter;
//! time for DPMS power-off
/*!
* This integer represent the time in minutes after which the
* display should power off.
*/
int powerOffAfter;
// ------------ Brightness section ---------------- //
//! if brightness is enabled for the current scheme
/*!
* This boolean tells if brightness is enabled for the
* current scheme
* \li true: if brightness is enabled
* \li false: if not
*/
bool brightness;
//! the value for the brighness
/*!
* This integer represent the value to which the brigthness
* should be set. This value is in percentage.
*/
int brightnessValue;
// ------------ Autosuspend section ---------------- //
//! if autosuspend is enabled for the current scheme
/*!
* This boolean tells if autosuspend is enabled for the
* current scheme
* \li true: if autosuspend is enabled
* \li false: if not
*/
bool autoSuspend;
//! if scheme specific blacklist is enabled
/*!
* This boolean tells if a scheme specific blacklist
* ( autoInactiveSchemeBlacklist ) should be used.
* \li true: if use scheme specific blacklist
* \li false: if not
*/
bool autoInactiveSBlistEnabled;
//! time of user inactivity to execute a defined action
/*!
* This integer represent the time in minutes after which kpowersave
* should execute a specific through \ref autoInactiveAction defined
* action.
*/
int autoInactiveActionAfter;
//! action which execute after a defined time of inactivity
/*!
* This QString contains the action/command which should be execute
* after a trough \ref autoInactiveActionAfter defined time. If nothing
* should happens this QString is empty or '_NONE_'
*/
QString autoInactiveAction;
//! general list with running programs which prevent the autosuspend
/*!
* This QStringList contains names of programs which prevent, if one of
* them is running/active the autossuspend.
*/
QStringList autoInactiveGBlist;
//! scheme list with running programs which prevent the autosuspend
/*!
* This QStringList contains names of programs which prevent, if one of
* them is running/active the autossuspend.
*/
QStringList autoInactiveSBlist;
// ------ Autosuspend countdown dialog section -------- //
//! if KPowersave should display a dialog with a warning for autosuspend
/*!
* This boolean tells if KPowersave should show a warning dialog
* with a countdown before call the autosuspend.
* \li true: if show dialog
* \li false: if not
*/
bool autoSuspendCountdown;
//! how long the autosuspend warn dialog should be shown
/*!
* This integer represent the time in seconds how long the autosuspend
* warning dialog should be shown. This time get stripped from
* \ref autoInactiveActionAfter to be sure the suspend get called within
* the expected time.
*/
int autoSuspendCountdownTimeout;
// -------------- Autodimm section ------------------- //
//! if autodimm is enabled for the current scheme
/*!
* This boolean tells if autodimm is enabled for the current scheme
* \li true: if autosuspend is enabled
* \li false: if not
*/
bool autoDimm;
//! if a scheme specific autodimm blacklist is enabled
/*!
* This boolean tells if a scheme specific autdimm blacklist
* ( autoDimmSBlist ) should be used.
* \li true: if use scheme specific blacklist
* \li false: if not
*/
bool autoDimmSBlistEnabled;
//! time of user inactivity to dimm the display
/*!
* This integer represent the time in minutes after which kpowersave
* should dimm the display to the level defined by \ref autoDimmTo .
*/
int autoDimmAfter;
//! percentage to which the display should dimmed to
/*!
* This integer represent the brightness percentage to which the
* display should get dimmed if the user is the via \ref autoDimmAfter
* defined time inactivit;
*/
int autoDimmTo;
//! general list with running programs which prevent the autodimm
/*!
* This QStringList contains names of programs which prevent, if one of
* them is running/active the autodimm of the display panel.
*/
QStringList autoDimmGBlist;
//! scheme specific list with running programs which prevent the autodimm
/*!
* This QStringList contains names of programs which prevent, if one of
* them is running/active the autodimm of the display panel. This list is
* scheme specific.
*/
QStringList autoDimmSBlist;
// ------------ CPU Frequency section ---------------- //
//! represent the CPU Frequency policy to set
cpufreq_type cpuFreqPolicy;
//! represent the performance level (how triggerhappy) for dynamic cpu freq policy
int cpuFreqDynamicPerformance;
// --------------- misc section -------------------- //
//! if scheme disabled notifications
/*!
* This boolean tells if a scheme should disable notifications.
* \li true: if disable notifications
* \li false: if not
*/
bool disableNotifications;
//! if umount/remount external volumes on suspend
/*!
* This boolean tells if KPowersave should umount external partitions
* before suspend and remount them after resume.
* \li true: if umount/remount
* \li false: if not
*/
bool unmountExternalOnSuspend;
/* END ************************ Scheme settings and values ******************************/
/******************* Functions ********************/
//! to load the general settings
bool load_general_settings();
//! to load the global KDE settings
void load_kde();
//! to load settings of a specific scheme
bool load_scheme_settings(QString);
private:
//! configuration of kpowersave
KConfig *kconfig;
//! to map a battery action string to the related type
action mapActionToType (QString _action);
};
#endif

@ -0,0 +1,102 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>suspend_Dialog</class>
<widget class="QDialog">
<property name="name">
<cstring>suspend_Dialog</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>300</width>
<height>90</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>90</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>300</width>
<height>90</height>
</size>
</property>
<widget class="QProgressBar">
<property name="name">
<cstring>progressBar</cstring>
</property>
<property name="geometry">
<rect>
<x>70</x>
<y>21</y>
<width>221</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>message</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<width>280</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>iconPixmap</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>48</width>
<height>48</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="pixmap">
<pixmap>image0</pixmap>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
</widget>
<images>
<image name="image0">
<data format="XPM.GZ" length="2304">789c8593c9721a311086ef3cc5947573a5dacc303043a57230b6f1beef4ee530128bc1069bcd5b2aef9e5f52b702d855410cf0a9b7bf5b626d35ba39398c56d74a936931ed99c8dc17e368b5351b0cde7ffefaf1bbb4922411de59354a56be9556681c994895ddcbf12c70eeb8c19cb27d12d8d955c7711efc47cc6ca7a970ece2559739e77c3781bdff85b0f7a71d66c3fecf81bdff8be7b8ccfe75cb71b96c98ef3cc7a27f37b08fbf1266ff3eb3e879779c076e0ab3ff03b3e88985d95eb69cd42b329f4761b6f798a57ed572250efcc12cf56acc92ffd2732af932c775b03f9f4238f1f637cb699c72bc3281bdbe7bcbd5a456653e715c04ce99eb5c6f10d8db9f84b9de3a738bede7c2deae7cbd228bd99e58ae2562a7d47316b37f8bb9caac1c17b9c46f0973fc2db3e8df6716fd1b96b34a883f6516ff0ab3f4776839d745c1f98f2cd7d3c07b81eb8ebbcc6dd64b9e75c2fe078e8d663b5d5b2e52dde67a9bc21cdff36c12d63f0cecfd5bc29c6f9bb9c6f74f0973bc0eecedafc21c7fc65c707c4798ef4fdbb191fa4a0b73fc31b3d433817d3e89977a0533e73f9d06ce3d93a282d4fcb73ccbfbbedf85a5977861f9fa4bb93496a116b53fd798cbdfe1dc5dbaa71ef5e9811e69005aa839af1f11437aa2671ad1982678a634a317c4bc7ea95fc3fbcd79cee81d153e5063e2f80d96aff4af5303b9fbb4419bd0afd1c11635113d428d3658f46fb3ee1df8efd21ee77aa57d3aa043c48fa1f1888e17f41b3a419e199d22dad019f6cee9822e5169cbf5f3f4497f0fbb57748daeb79d36eb7543b788b8c3aff2d27c0ce637418c71bfd7e16975af439546e7638ad14d27e4b7937cc0ee87d36dbdc7e8654c899b5b0f99faf6f4e6f2b7713a53ecb6a802dd13e4f64f0a3d764655d273fa35340fb03b41779b5443fe017237dcca506744f9bff9b8b32d30cf3a229a98e0266ad83b94baf3b027b6a3e8d3fd39c644ed79f695822a5bf34015dc47e6e2b717ee8f565a19d7a93de30f74d9740a6d8d866a7dca8fa5dad0fd8c8899bf71aa8333cfe0ddc5ccf457f71f73eae22c7b98f73b6632806ef4a1eedd348ba5fbc97da81e3e87f018867d7916ef7f31f75feab86f1df6cd57faffbf56fe7c2ffd0519fbee77</data>
</image>
</images>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -0,0 +1,95 @@
/***************************************************************************
* Copyright (C) 2005 by Danny Kukawka *
* danny.kukawka@web.de, dkukawka@suse.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file suspenddialog.cpp
* \brief In this file can be found the suspend dialog related code.
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2005
*/
// KDE - Headers
#include <klocale.h>
#include <kiconloader.h>
// QT - Headers
#include <qdialog.h>
#include <qlabel.h>
#include <qstring.h>
#include <qpixmap.h>
#include <qprogressbar.h>
#include "suspenddialog.h"
/*! This is the default constructor of the class. */
suspendDialog::suspendDialog(QWidget *parent, const char *name)
:suspend_Dialog(parent, name, true, Qt::WStyle_StaysOnTop | Qt::WDestructiveClose )
{
this->setIcon(SmallIcon("kpowersave", QIconSet::Automatic));
}
/*! This is the default destructor of the class. */
suspendDialog::~suspendDialog()
{
}
/*!
* This used to set Icon/pixmap for the dialog.
* \param type QString with the type of the current suspend
* to set the pixmap in the dialog
*/
void suspendDialog::setPixmap( QString type )
{
QPixmap pixmap = 0;
if(type.startsWith("suspend2disk")){// || type.startsWith("NULL")) {
pixmap = KGlobal::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);
} else if (type.startsWith("standby")) {
pixmap = KGlobal::iconLoader()->loadIcon("stand_by", KIcon::NoGroup, KIcon::SizeLarge);
} else {
pixmap = KGlobal::iconLoader()->loadIcon("kpowersave", KIcon::NoGroup, KIcon::SizeLarge);
}
setCaption(i18n("Preparing Suspend..."));
iconPixmap->setPixmap( pixmap );
}
/*!
* This used to set the values of progressbar for the dialog.
* \param percent integer value with current progress stauts of suspend
*/
void suspendDialog::setProgressbar( int percent )
{
progressBar->setPercentageVisible(true);
progressBar->setProgress(percent);
}
/*!
* This used to set the message of current suspend action to the the dialog.
* \param messageText QString with the message of the current running suspend
* prepare action
*/
void suspendDialog::setTextLabel( QString messageText )
{
message->show();
message->setText(messageText);
}
#include "suspenddialog.moc"

@ -0,0 +1,56 @@
/***************************************************************************
* Copyright (C) 2005 by Danny Kukawka *
* danny.kukawka@web.de, dkukawka@suse.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file suspenddialog.h
* \brief Headerfile for suspenddialog.cpp and the class \ref suspendDialog.
*/
/*!
* \class suspendDialog
* \brief class for the suspend dialog related funtionality
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2005
*/
#ifndef SUSPENDDIALOG_H
#define SUSPENDDIALOG_H
#include "suspend_Dialog.h"
class suspendDialog: public suspend_Dialog {
Q_OBJECT
public:
//! default constructor
suspendDialog(QWidget *parent = 0, const char *name = 0);
//! default destructor
~suspendDialog();
//! set all needed icons
void setPixmap( QString );
//! set the value for the progressbar
void setProgressbar( int );
//! set the message for the textlabel
void setTextLabel( QString );
};
#endif

@ -0,0 +1,29 @@
/***************************************************************************
* Copyright (C) $YEAR$ by $AUTHOR$ *
* <$EMAIL$> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*! \file $FILENAME$.cpp
* \brief In this file can be found the ____ related code.
* \author $AUTHOR$, <$EMAIL$>
* \version 0.0.1
* \date 2007
*/
#include "$FILENAME$.h"
#include "$FILENAME$.moc"

@ -0,0 +1,37 @@
/***************************************************************************
* Copyright (C) $YEAR$ by $AUTHOR$ *
* <$EMAIL$> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License *
* as published by the Free Software Foundation. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
/*!
* \file $FILENAME$.h
* \brief Headerfile for $FILENAME$.cpp and the class \ref *CLASS*.
*/
/*!
* \class *CLASS*
* \brief class for ____ related funtionality
* \author $AUTHOR$, <$EMAIL$>
* \version 0.0.1
* \date 2007
*/
#ifndef _$FILENAME$_H_
#define _$FILENAME$_H_
#endif
Loading…
Cancel
Save