Initial import of klcddimmer 0.3

pull/1/head
Slávek Banko 11 years ago
commit 29b50d195f

@ -0,0 +1 @@
Lorenzo Bettini, http://www.lorenzobettini.it

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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.

@ -0,0 +1,167 @@
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, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
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 at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' 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 a while. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Type `make install' to install the programs and any data files and
documentation.
4. You can remove the program binaries and object files from the
source code directory by typing `make clean'.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
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 supports 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' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
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' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
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 host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
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.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.

@ -0,0 +1,20 @@
KLcdDimmer
A KDE Panel applet to set brightness of LCD screen
Copyright (C) 2006, Lorenzo Bettini, http://www.lorenzobettini.it
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
The included file 'COPYING' is a copy of the GNU General Public License.

@ -0,0 +1,25 @@
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 LICENSE configure.in.in
dist-hook:
cd $(top_distdir) && perl admin/am_edit -padmin
cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
#kde_docs_KDEDOCS = COPYING NEWS INSTALL AUTHORS README

@ -0,0 +1,10 @@
all:
@echo "This Makefile is only for the CVS repository"
@echo "This will be deleted before making the distribution"
@echo ""
$(MAKE) -f admin/Makefile.common cvs
dist:
$(MAKE) -f admin/Makefile.common dist
.SILENT:

19
NEWS

@ -0,0 +1,19 @@
KLcdDimmer
A KDE Panel applet to set brightness of LCD screen
Copyright (C) 2006-2007, Lorenzo Bettini, http://www.lorenzobettini.it
Version 0.3
* Fixed tooltips and added what's this helps
* Fixed geometry (now should fit the panel better)
Version 0.2
* Fixed the name of the rc file to klcddimmerrc
* Can store the current brightness value and restore
it on startup
Version 0.1
First public release

@ -0,0 +1,19 @@
KLcdDimmer
A KDE Panel applet to set brightness of LCD screen
http://klcddimmer.sourceforge.net
Copyright (C) 2006, Lorenzo Bettini, http://www.lorenzobettini.it
Notice that this relies on an external program to get/set the
brightness.
For instance, I've used
SmartDimmer http://www.acc.umu.se/~erikw/program/
NVclock http://www.linuxhardware.org/nvclock/
but it is supposed to work also with others, since you can
configure the applet.
When you run configure, you should pass the KDE root directory
as --prefix (in my system it is /usr).

@ -0,0 +1 @@

File diff suppressed because it is too large Load Diff

12040
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

@ -0,0 +1,219 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define if you have the CoreAudio API */
#undef HAVE_COREAUDIO
/* Define to 1 if you have the <crt_externs.h> header file. */
#undef HAVE_CRT_EXTERNS_H
/* Defines if your system has the crypt function */
#undef HAVE_CRYPT
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define if you have libjpeg */
#undef HAVE_LIBJPEG
/* Define if you have libpng */
#undef HAVE_LIBPNG
/* Define if you have a working libpthread (will enable threaded code) */
#undef HAVE_LIBPTHREAD
/* Define if you have libz */
#undef HAVE_LIBZ
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define if your system needs _NSGetEnviron to set up the environment */
#undef HAVE_NSGETENVIRON
/* Define if you have the res_init function */
#undef HAVE_RES_INIT
/* Define if you have a STL implementation by SGI */
#undef HAVE_SGI_STL
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have strlcat */
#undef HAVE_STRLCAT
/* Define if you have the strlcat prototype */
#undef HAVE_STRLCAT_PROTO
/* Define if you have strlcpy */
#undef HAVE_STRLCPY
/* Define if you have the strlcpy prototype */
#undef HAVE_STRLCPY_PROTO
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `vsnprintf' function. */
#undef HAVE_VSNPRINTF
/* Suffix for lib directories */
#undef KDELIBSUFF
/* Define a safe value for MAXPATHLEN */
#undef KDEMAXPATHLEN
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* The size of a `char *', as computed by sizeof. */
#undef SIZEOF_CHAR_P
/* The size of a `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of a `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of a `short', as computed by sizeof. */
#undef SIZEOF_SHORT
/* The size of a `size_t', as computed by sizeof. */
#undef SIZEOF_SIZE_T
/* The size of a `unsigned long', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/*
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
* headers and I'm too lazy to write a configure test as long as only
* unixware is related
*/
#ifdef _UNIXWARE
#define HAVE_BOOLEAN
#endif
/*
* AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
* that defines bzero.
*/
#if defined(_AIX)
#include <strings.h>
#endif
#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
# include <sys/time.h>
# include <crt_externs.h>
# define environ (*_NSGetEnviron())
#endif
#if !defined(HAVE_STRLCAT_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
unsigned long strlcat(char*, const char*, unsigned long);
#ifdef __cplusplus
}
#endif
#endif
#if !defined(HAVE_STRLCPY_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
unsigned long strlcpy(char*, const char*, unsigned long);
#ifdef __cplusplus
}
#endif
#endif
/*
* On HP-UX, the declaration of vsnprintf() is needed every time !
*/
#if !defined(HAVE_VSNPRINTF) || defined(hpux)
#if __STDC__
#include <stdarg.h>
#include <stdlib.h>
#else
#include <varargs.h>
#endif
#ifdef __cplusplus
extern "C"
#endif
int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
#ifdef __cplusplus
extern "C"
#endif
int snprintf(char *str, size_t n, char const *fmt, ...);
#endif
#if defined(__SVR4) && !defined(__svr4__)
#define __svr4__ 1
#endif
/* Compatibility define */
#undef ksize_t
/* Define the real type of socklen_t */
#undef socklen_t

@ -0,0 +1,2 @@
./admin/configure.in.min
configure.in.in

@ -0,0 +1,82 @@
dnl This file is part of the KDE libraries/packages
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
# Original Author was Kalle@kde.org
# I lifted it in some mater. (Stephan Kulow)
# I used much code from Janos Farkas
dnl Process this file with autoconf to produce a configure script.
AC_INIT(acinclude.m4) dnl a source file from your sub dir
dnl This is so we can use kde-common
AC_CONFIG_AUX_DIR(admin)
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
unset CDPATH
dnl Checking host/target/build systems, for make, install etc.
AC_CANONICAL_SYSTEM
dnl Perform program name transformation
AC_ARG_PROGRAM
dnl Automake doc recommends to do this only here. (Janos)
AM_INIT_AUTOMAKE(klcddimmer, 0.3) dnl searches for some needed programs
KDE_SET_PREFIX
dnl generate the config header
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
dnl Checks for programs.
AC_CHECK_COMPILERS
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
KDE_PROG_LIBTOOL
dnl for NLS support. Call them in this order!
dnl WITH_NLS is for the po files
AM_KDE_WITH_NLS
KDE_USE_QT(3.2.0)
AC_PATH_KDE
#MIN_CONFIG(3.2.0)
dnl PACKAGE set before
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN
KDE_CREATE_SUBDIRSLIST
AC_CONFIG_FILES([ Makefile ])
AC_CONFIG_FILES([ doc/Makefile ])
AC_CONFIG_FILES([ doc/en/Makefile ])
AC_CONFIG_FILES([ po/Makefile ])
AC_CONFIG_FILES([ src/Makefile ])
AC_OUTPUT
if test "$all_tests" = "bad"; then
if test ! "$cache_file" = "/dev/null"; then
echo ""
echo "Please remove the file $cache_file after changing your setup"
echo "so that configure will find the changes next time."
echo ""
fi
else
echo ""
echo "Good - your configure finished. Start make now"
echo ""
fi

@ -0,0 +1,6 @@
#MIN_CONFIG(3.2.0)
AM_INIT_AUTOMAKE(klcddimmer, 0.3)
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN

@ -0,0 +1,8 @@
# 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 = klcddimmer
SUBDIRS = $(AUTODIRS)
kde_docs_KDEDOCS = configure.png hi48-app-klcddimmer.png\
klcddimmer-screenshot.png klcddimmer.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

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

@ -0,0 +1,555 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY klcddimmer "<application>klcddimmer 0.1</application>">
<!ENTITY kappname "&klcddimmer;"><!-- Do *not* replace kappname-->
<!ENTITY package "kde-module"><!-- kdebase, kdeadmin, etc -->
<!ENTITY % addindex "IGNORE">
<!ENTITY % English "INCLUDE"><!-- change language only here -->
<!-- Do not define any other entities; instead, use the entities
from kde-genent.entities and $LANG/user.entities. -->
]>
<!-- kdoctemplate v0.8 October 1 1999
Minor update to "Credits and Licenses" section on August 24, 2000
Removed "Revision history" section on 22 January 2001
Changed to Installation/Help menu entities 18 October 2001
Other minor cleanup and changes 18 October 2001 -->
<!--
This template was designed by: David Rugge davidrugge@mindspring.com
with lots of help from: Eric Bischoff ebisch@cybercable.tm.fr
and Frederik Fouvry fouvry@sfs.nphil.uni-tuebingen.de
of the KDE DocBook team.
You may freely use this template for writing any sort of KDE documentation.
If you have any changes or improvements, please let us know.
Remember:
- in XML, the case of the <tags> and attributes is relevant ;
- also, quote all attributes.
Please don't forget to remove all these comments in your final documentation,
thanks ;-).
-->
<!-- ................................................................ -->
<!-- The language must NOT be changed here. -->
<book lang="&language;">
<!-- This header contains all of the meta-information for the document such
as Authors, publish date, the abstract, and Keywords -->
<bookinfo>
<title>The &klcddimmer; Handbook</title>
<authorgroup>
<author>
<firstname></firstname>
<othername></othername>
<surname>Lorenzo Bettini, http://www.lorenzobettini.it,,</surname>
<affiliation>
<address><email></email></address>
</affiliation>
</author>
</authorgroup>
<!-- TRANS:ROLES_OF_TRANSLATORS -->
<copyright>
<year>1999</year>
<year>2005</year>
<holder>Lorenzo Bettini, http://www.lorenzobettini.it,,</holder>
</copyright>
<!-- Translators: put here the copyright notice of the translation -->
<!-- Put here the FDL notice. Read the explanation in fdl-notice.docbook
and in the FDL itself on how to use it. -->
<legalnotice>&FDLNotice;</legalnotice>
<!-- Date and version information of the documentation
Don't forget to include this last date and this last revision number, we
need them for translation coordination !
Please respect the format of the date (YYYY-MM-DD) and of the version
(V.MM.LL), it could be used by automation scripts.
Do NOT change these in the translation. -->
<date>2001-10-18</date>
<releaseinfo>0.1</releaseinfo>
<!-- Abstract about this handbook -->
<abstract>
<para>
&klcddimmer; is an application specially designed to do nothing you would
ever want.
</para>
</abstract>
<!-- This is a set of Keywords for indexing by search engines.
Please at least include KDE, the KDE package it is in, the name
of your application, and a few relevant keywords. -->
<keywordset>
<keyword>KDE</keyword>
<keyword>klcddimmer</keyword>
<keyword>nothing</keyword>
<keyword>nothing else</keyword>
</keywordset>
</bookinfo>
<!-- The contents of the documentation begin here. Label
each chapter so with the id attribute. This is necessary for two reasons: it
allows you to easily reference the chapter from other chapters of your
document, and if there is no ID, the name of the generated HTML files will vary
from time to time making it hard to manage for maintainers and for the CVS
system. Any chapter labelled (OPTIONAL) may be left out at the author's
discretion. Other chapters should not be left out in order to maintain a
consistent documentation style across all KDE apps. -->
<chapter id="introduction">
<title>Introduction</title>
<!-- The introduction chapter contains a brief introduction for the
application that explains what it does and where to report
problems. Basically a long version of the abstract. Don't include a
revision history. (see installation appendix comment) -->
<para>
&klcddimmer; is a program that lets you do absolutely nothing. Please report
any problems or feature requests to the &kde; mailing lists.
</para>
</chapter>
<chapter id="using-klcddimmer">
<title>Using &klcddimmer;</title>
<!-- This chapter should tell the user how to use your app. You should use as
many sections (Chapter, Sect1, Sect3, etc...) as is necessary to fully document
your application. -->
<para>
<!-- Note that all graphics should be in .png format. Use no gifs because of
patent issues. -->
<screenshot>
<screeninfo>Here's a screenshot of &klcddimmer;</screeninfo>
<mediaobject>
<imageobject>
<imagedata fileref="screenshot.png" format="PNG"/>
</imageobject>
<imageobject>
<imagedata fileref="screenshot.eps" format="EPS"/>
</imageobject>
<textobject>
<phrase>Screenshot</phrase>
</textobject>
</mediaobject>
</screenshot>
</para>
<sect1 id="klcddimmer-features">
<title>More &klcddimmer; features</title>
<para>It slices! It dices! and it comes with a free toaster!</para>
<para>
The Squiggle Tool <guiicon><inlinemediaobject>
<imageobject>
<imagedata fileref="squiggle.png" format="PNG"/>
</imageobject>
<imageobject>
<imagedata fileref="squiggle.eps" format="EPS"/>
</imageobject>
<textobject>
<phrase>Squiggle</phrase>
</textobject>
</inlinemediaobject></guiicon> is used to draw squiggly lines all over
the &klcddimmer; main window. It's not a bug, it's a feature!
</para>
</sect1>
</chapter>
<chapter id="commands">
<title>Command Reference</title>
<!-- (OPTIONAL, BUT RECOMMENDED) This chapter should list all of the
application windows and their menubar and toolbar commands for easy reference.
Also include any keys that have a special function but have no equivalent in the
menus or toolbars. This may not be necessary for small apps or apps with no tool
or menu bars. -->
<sect1 id="klcddimmer-mainwindow">
<title>The main &klcddimmer; window</title>
<sect2>
<title>The File Menu</title>
<para>
<variablelist>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
</shortcut>
<guimenu>File</guimenu>
<guimenuitem>New</guimenuitem>
</menuchoice></term>
<listitem><para><action>Creates a new document</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>S</keycap></keycombo>
</shortcut>
<guimenu>File</guimenu>
<guimenuitem>Save</guimenuitem>
</menuchoice></term>
<listitem><para><action>Saves the document</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>Q</keycap></keycombo>
</shortcut>
<guimenu>File</guimenu>
<guimenuitem>Quit</guimenuitem>
</menuchoice></term>
<listitem><para><action>Quits</action> &klcddimmer;</para></listitem>
</varlistentry>
</variablelist>
</para>
</sect2>
<sect2>
<title>The <guimenu>Help</guimenu> Menu</title>
<!-- Assuming you have a standard help menu (help, what's this, about -->
<!-- &klcddimmer;, about KDE) then the documentation is already written. -->
<!-- The following entity is valid anywhere that a variablelist is -->
<!-- valid. -->
&help.menu.documentation;
</sect2>
</sect1>
</chapter>
<chapter id="developers">
<title>Developer's Guide to &klcddimmer;</title>
<!-- (OPTIONAL) A Programming/Scripting reference chapter should be
used for apps that use plugins or that provide their own scripting hooks
and/or development libraries. -->
<para>
Programming &klcddimmer; plugins is a joy to behold. Just read through the next
66 pages of API's to learn how!
</para>
<!-- Use refentries to describe APIs. Refentries are fairly complicated and you
should consult the docbook reference for further details. The example below was
taken from that reference and shortened a bit for readability. -->
<refentry id="re-1007-unmanagechildren-1">
<refmeta>
<refentrytitle>XtUnmanageChildren</refentrytitle>
<refmiscinfo>Xt - Geometry Management</refmiscinfo>
</refmeta>
<refnamediv>
<refname>XtUnmanageChildren
</refname>
<refpurpose>remove a list of children from a parent widget's managed
list.
<indexterm id="ix-1007-unmanagechildren-1"><primary>widgets</primary><secondary>removing</secondary></indexterm>
<indexterm id="ix-1007-unmanagechildren-2"><primary>XtUnmanageChildren</primary></indexterm>
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<refsynopsisdivinfo>
<date>4 March 1996</date>
</refsynopsisdivinfo>
<synopsis>
void XtUnmanageChildren(<replaceable class="parameter">children</replaceable>, <replaceable class="parameter">num_children</replaceable>)
WidgetList <replaceable class="parameter">children</replaceable>;
Cardinal <replaceable class="parameter">num_children</replaceable>;
</synopsis>
<refsect2 id="r2-1007-unmanagechildren-1">
<title>Inputs</title>
<variablelist>
<varlistentry>
<term><replaceable class="parameter">children</replaceable>
</term>
<listitem>
<para>Specifies an array of child widgets. Each child must be of
class RectObj or any subclass thereof.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">num_children</replaceable>
</term>
<listitem>
<para>Specifies the number of elements in <replaceable class="parameter">children</replaceable>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2></refsynopsisdiv>
<refsect1 id="r1-1007-unmanagechildren-1">
<title>Description
</title>
<para><function>XtUnmanageChildren()</function> unmaps the specified widgets
and removes them from their parent's geometry management.
The widgets will disappear from the screen, and (depending
on its parent) may no longer have screen space allocated for
them.
</para>
<para>Each of the widgets in the <replaceable class="parameter">children</replaceable> array must have
the same parent.
</para>
<para>See the &ldquo;Algorithm&rdquo; section below for full details of the
widget unmanagement procedure.
</para>
</refsect1>
<refsect1 id="r1-1007-unmanagechildren-2">
<title>Usage</title>
<para>Unmanaging widgets is the usual method for temporarily
making them invisible. They can be re-managed with
<function>XtManageChildren()</function>.
</para>
<para>You can unmap a widget, but leave it under geometry
management by calling <function>XtUnmapWidget()</function>. You can
destroy a widget's window without destroying the widget by
calling <function>XtUnrealizeWidget()</function>. You can destroy a
widget completely with <function>XtDestroyWidget()</function>.
</para>
<para>If you are only going to unmanage a single widget, it is
more convenient to call <function>XtUnmanageChild()</function>. It is
often more convenient to call <function>XtUnmanageChild()</function>
several times than it is to declare and initialize an array
of widgets to pass to <function>XtUnmanageChildren()</function>. Calling
<function>XtUnmanageChildren()</function> is more efficient, however,
because it only calls the parent's <function>change_managed()</function>
method once.
</para>
</refsect1>
<refsect1 id="r1-1007-unmanagechildren-3">
<title>Algorithm
</title>
<para><function>XtUnmanageChildren()</function> performs the following:
</para>
<variablelist>
<varlistentry>
<term>-
</term>
<listitem>
<para>Ignores the child if it already is unmanaged or is being
destroyed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-
</term>
<listitem>
<para>Otherwise, if the child is realized, it makes it nonvisible
by unmapping it.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
</para>
</refsect1>
<refsect1 id="r1-1007-unmanagechildren-4">
<title>Structures</title>
<para>The <type>WidgetList</type> type is simply an array of widgets:
</para>
<screen id="sc-1007-unmanagechildren-1">typedef Widget *WidgetList;
</screen>
</refsect1>
</refentry>
</chapter>
<chapter id="faq">
<title>Questions and Answers</title>
<!-- (OPTIONAL but recommended) This chapter should include all of the silly
(and not-so-silly) newbie questions that fill up your mailbox. This chapter
should be reserved for BRIEF questions and answers! If one question uses more
than a page or so then it should probably be part of the
"Using this Application" chapter instead. You should use links to
cross-reference questions to the parts of your documentation that answer them.
This is also a great place to provide pointers to other FAQ's if your users
must do some complicated configuration on other programs in order for your
application work. -->
&reporting.bugs;
&updating.documentation;
<qandaset id="faqlist">
<qandaentry>
<question>
<para>My Mouse doesn't work. How do I quit &klcddimmer;?</para>
</question>
<answer>
<para>You silly goose! Check out the <link linkend="commands">Commands
Section</link> for the answer.</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para>Why can't I twiddle my documents?</para>
</question>
<answer>
<para>You can only twiddle your documents if you have the foobar.lib
installed.</para>
</answer>
</qandaentry>
</qandaset>
</chapter>
<chapter id="credits">
<!-- Include credits for the programmers, documentation writers, and
contributors here. The license for your software should then be included below
the credits with a reference to the appropriate license file included in the KDE
distribution. -->
<title>Credits and License</title>
<para>
&klcddimmer;
</para>
<para>
Program copyright 2005 Lorenzo Bettini, http://www.lorenzobettini.it,,
</para>
<para>
Contributors:
<itemizedlist>
<listitem><para>Konqui the KDE Dragon <email>konqui@kde.org</email></para>
</listitem>
<listitem><para>Tux the Linux Penguin <email>tux@linux.org</email></para>
</listitem>
</itemizedlist>
</para>
<para>
Documentation copyright 2005 Lorenzo Bettini, http://www.lorenzobettini.it,,
</para>
<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
&underFDL; <!-- FDL: do not remove -->
<!-- Determine which license your application is licensed under,
and delete all the remaining licenses below:
(NOTE: All documentation are licensed under the FDL,
regardless of what license the application uses) -->
&underGPL; <!-- GPL License -->
&underBSDLicense; <!-- BSD License -->
&underArtisticLicense; <!-- BSD Artistic License -->
&underX11License; <!-- X11 License -->
</chapter>
<appendix id="installation">
<title>Installation</title>
<sect1 id="getting-klcddimmer">
<title>How to obtain &klcddimmer;</title>
<!-- This first entity contains boiler plate for applications that are
part of KDE CVS. You should remove it if you are releasing your
application -->
&install.intro.documentation;
</sect1>
<sect1 id="requirements">
<title>Requirements</title>
<!--
List any special requirements for your application here. This should include:
.Libraries or other software that is not included in kdesupport,
kdelibs, or kdebase.
.Hardware requirements like amount of RAM, disk space, graphics card
capabilities, screen resolution, special expansion cards, etc.
.Operating systems the app will run on. If your app is designed only for a
specific OS, (you wrote a graphical LILO configurator for example) put this
information here.
-->
<para>
In order to successfully use &klcddimmer;, you need &kde; 1.1. Foobar.lib is
required in order to support the advanced &klcddimmer; features. &klcddimmer; uses
about 5 megs of memory to run, but this may vary depending on your
platform and configuration.
</para>
<para>
All required libraries as well as &klcddimmer; itself can be found
on <ulink url="ftp://ftp.klcddimmer.org">The &klcddimmer; home page</ulink>.
</para>
<!-- For a list of updates, you may refer to the application web site
or the ChangeLog file, or ... -->
<para>
You can find a list of changes at <ulink
url="http://apps.kde.org/klcddimmer">http://apps.kde.org/klcddimmer</ulink>.
</para>
</sect1>
<sect1 id="compilation">
<title>Compilation and Installation</title>
<!-- This entity contains the boilerplate text for standard -->
<!-- compilation instructions. If your application requires any -->
<!-- special handling, remove it, and replace with your own text. -->
&install.compile.documentation;
</sect1>
<sect1 id="configuration">
<title>Configuration</title>
<para>Don't forget to tell your system to start the <filename>dtd</filename>
dicer-toaster daemon first, or &klcddimmer; won't work !</para>
</sect1>
</appendix>
&documentation.index;
</book>
<!--
Local Variables:
mode: sgml
sgml-minimize-attributes:nil
sgml-general-insert-case:lower
sgml-indent-step:0
sgml-indent-data:nil
End:
vim:tabstop=2:shiftwidth=2:expandtab
-->

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@ -0,0 +1,156 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or
g/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type" />
<meta content="Lorenzo Bettini" name="author" />
<title>KLcdDimmer - A KDE Applet to adjust LCD brightness</title>
</head>
<body>
<h1><img style="width: 48px; height: 48px;" alt="KLcdDimmer icon" src="hi48-app-klcddimmer.png"> KLcdDimmer</h1>
<h1><small>A KDE Applet to adjust LCD brightness</small></h1>
by <a href="http://www.lorenzobettini.it">Lorenzo
Bettini</a><br>
<br>
<img style="width: 290px; height: 176px;" alt="KLcdDimmer Screenshot" src="klcddimmer-screenshot.png"><br>
<br>
To adjust the brightness simply click with the&nbsp;mouse&nbsp;left
button and use the slider<br>
<br>
Notice that this applet relies on an external program to get/set the
brightness.<br>
<br>
For instance, I've used<br>
<br>
<span style="font-weight: bold;">SmartDimmer</span> <a href="http://www.acc.umu.se/%7Eerikw/program/">http://www.acc.umu.se/~erikw/program/</a><br>
<span style="font-weight: bold;">NVclock</span> <a href="http://www.linuxhardware.org/nvclock/">http://www.linuxhardware.org/nvclock/</a><br>
<br>
but it is supposed to work also with others, since you can configure
the applet. In order to do this, click with the mouse right button and
choose <span style="font-style: italic;">configure</span>:<br>
<br>
<img style="width: 411px; height: 346px;" alt="The configuration dialog" src="configure.png"><br>
<br>
You have to set the right command line argument for&nbsp;setting and
getting the brightness (you have to check the documentation of the
program you're using for setting the brightness). &nbsp;If the program
you're using does not support the "get" argument (e.g., nvclock), just
leave that field empty. As for the minimum, maximum and step values,
again, you have to check the documentation of the program (you'll
already find all the correct values for smartdimmer).<br>
<br>
If you check the "Save the current brightness value", the current value will be saved, and restored when you enter kde again. <br>
<h2>Download (License: GNU GPL)</h2>
KlcdDimmer's Sources can be downloaded from <a href="http://sourceforge.net/projects/klcddimmer">http://sourceforge.net/projects/klcddimmer</a>.<br>
<br>
You can also find details about new features on my blog, in this area: <a href="http://tronprog.blogspot.com/search/label/klcddimmer">http://tronprog.blogspot.com/search/label/klcddimmer</a>.
<h2>Installation</h2>
When you run configure, you should pass the KDE root directory as
--prefix (in my system it is /usr). If you don't know about this directory, you can get the right value by running:<br>
<pre>kde-config --prefix</pre>
<p>The steps to perform for the
installation are standard for packages
in source form: once you have unpacked the sources in a directory, `cd'
to the directory containing the package's source code and execute the
following steps: </p>
<pre>./configure --prefix=&lt;your KDE directory&gt;<br></pre>
Or, to automatically get the KDE root directory (notice it is ` and not '):
<pre>./configure --prefix=`kde-config --prefix`<br></pre>
<p>and then:</p>
<pre>make<br>make install (as root)</pre>
<p>Then you'll be able to add the applet to the panel, by using your
KDE panel. </p>
</body>
</html>

@ -0,0 +1,243 @@
<?xml version = '1.0'?>
<kdevelop>
<general>
<author>Lorenzo Bettini, http://www.lorenzobettini.it,,</author>
<email/>
<version>0.3</version>
<projectmanagement>KDevKDEAutoProject</projectmanagement>
<primarylanguage>C++</primarylanguage>
<keywords>
<keyword>C++</keyword>
<keyword>Code</keyword>
<keyword>Qt</keyword>
<keyword>KDE</keyword>
<keyword>Kicker</keyword>
</keywords>
<versioncontrol>kdevcvsservice</versioncontrol>
<ignoreparts/>
<projectdirectory>.</projectdirectory>
<absoluteprojectpath>false</absoluteprojectpath>
<description/>
<projectname>klcddimmer</projectname>
<defaultencoding/>
</general>
<kdevautoproject>
<general>
<activetarget>src/klcddimmer_panelapplet.la</activetarget>
<useconfiguration>default</useconfiguration>
</general>
<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=/usr</configargs>
<builddir>debug</builddir>
<ccompiler>kdevgccoptions</ccompiler>
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevg77options</f77compiler>
<cxxflags>-O0 -g3</cxxflags>
<envvars/>
<topsourcedir/>
<cppflags/>
<ldflags/>
<ccompilerbinary/>
<cxxcompilerbinary/>
<f77compilerbinary/>
<cflags/>
<f77flags/>
</debug>
</configurations>
<make>
<envvars>
<envvar value="1" name="WANT_AUTOCONF_2_5" />
<envvar value="1" name="WANT_AUTOMAKE_1_6" />
</envvars>
</make>
<run>
<directoryradio>executable</directoryradio>
</run>
</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>
<showvcsfields>false</showvcsfields>
<hidenonprojectfiles>false</hidenonprojectfiles>
<hidepatterns>*.o,*.lo,CVS</hidepatterns>
</tree>
</kdevfileview>
<kdevdoctreeview>
<ignoretocs>
<toc>ada</toc>
<toc>ada_bugs_gcc</toc>
<toc>bash</toc>
<toc>bash_bugs</toc>
<toc>clanlib</toc>
<toc>fortran_bugs_gcc</toc>
<toc>gnome1</toc>
<toc>gnustep</toc>
<toc>gtk</toc>
<toc>gtk_bugs</toc>
<toc>haskell</toc>
<toc>haskell_bugs_ghc</toc>
<toc>java_bugs_gcc</toc>
<toc>java_bugs_sun</toc>
<toc>opengl</toc>
<toc>pascal_bugs_fp</toc>
<toc>php</toc>
<toc>php_bugs</toc>
<toc>perl</toc>
<toc>perl_bugs</toc>
<toc>python</toc>
<toc>python_bugs</toc>
<toc>ruby</toc>
<toc>ruby_bugs</toc>
<toc>sdl</toc>
<toc>stl</toc>
<toc>sw</toc>
<toc>w3c-dom-level2-html</toc>
<toc>w3c-svg</toc>
<toc>w3c-uaag10</toc>
<toc>wxwidgets_bugs</toc>
</ignoretocs>
<ignoreqt_xml>
<toc>qmake User Guide</toc>
</ignoreqt_xml>
</kdevdoctreeview>
<kdevdebugger>
<general>
<dbgshell>libtool</dbgshell>
<programargs/>
<gdbpath/>
<configGdbScript/>
<runShellScript/>
<runGdbScript/>
<breakonloadinglibs>true</breakonloadinglibs>
<separatetty>false</separatetty>
<floatingtoolbar>false</floatingtoolbar>
</general>
<display>
<staticmembers>false</staticmembers>
<demanglenames>true</demanglenames>
<outputradix>10</outputradix>
</display>
</kdevdebugger>
<kdevfilecreate>
<filetypes/>
<useglobaltypes>
<type ext="ui" />
<type ext="cpp" />
<type ext="h" />
</useglobaltypes>
</kdevfilecreate>
<kdevdocumentation>
<projectdoc>
<docsystem>Doxygen Documentation Collection</docsystem>
<docurl>klcddimmer.tag</docurl>
</projectdoc>
</kdevdocumentation>
<substmap>
<APPNAME>klcddimmer</APPNAME>
<APPNAMELC>klcddimmer</APPNAMELC>
<APPNAMESC>Klcddimmer</APPNAMESC>
<APPNAMEUC>KLCDDIMMER</APPNAMEUC>
<AUTHOR>Lorenzo Bettini, http://www.lorenzobettini.it,,</AUTHOR>
<EMAIL/>
<LICENSE>Custom</LICENSE>
<VERSION>0.1</VERSION>
<YEAR>2005</YEAR>
<dest>/home/bettini/work/klcddimmer</dest>
</substmap>
<cppsupportpart>
<filetemplates>
<interfacesuffix>.h</interfacesuffix>
<implementationsuffix>.cpp</implementationsuffix>
</filetemplates>
</cppsupportpart>
<kdevcppsupport>
<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>
</codecompletion>
<creategettersetter>
<prefixGet/>
<prefixSet>set</prefixSet>
<prefixVariable>m_,_</prefixVariable>
<parameterName>theValue</parameterName>
<inlineGet>true</inlineGet>
<inlineSet>true</inlineSet>
</creategettersetter>
<references/>
<designerintegration>
<qtdesigner>
<implementation class="klcddimmer" path="src/brightnesschooser.ui" implementationpath="src/klcddimmer.h" />
</qtdesigner>
</designerintegration>
<qt>
<used>false</used>
<version>3</version>
<root>/usr/share/qt3</root>
<includestyle>3</includestyle>
<designerintegration>EmbeddedKDevDesigner</designerintegration>
<qmake>/usr/bin/qmake-qt3</qmake>
<designer>/usr/bin/designer-qt3</designer>
<designerpluginpaths/>
</qt>
<splitheadersource>
<enabled>false</enabled>
<synchronize>true</synchronize>
<orientation>Vertical</orientation>
</splitheadersource>
</kdevcppsupport>
<kdevvisualadvance>
<emulator>VisualBoyAdvance</emulator>
<binary/>
<addOptions/>
<terminal>false</terminal>
<fullscreen>false</fullscreen>
<graphicFilter>-f0</graphicFilter>
<scaling>-1</scaling>
</kdevvisualadvance>
<kdevcvsservice>
<recursivewhenupdate>true</recursivewhenupdate>
<prunedirswhenupdate>true</prunedirswhenupdate>
<createdirswhenupdate>true</createdirswhenupdate>
<recursivewhencommitremove>true</recursivewhencommitremove>
<revertoptions>-C</revertoptions>
</kdevcvsservice>
</kdevelop>

@ -0,0 +1 @@
POFILES = AUTO

@ -0,0 +1,20 @@
INCLUDES= $(all_includes)
METASOURCES = AUTO
lib_LTLIBRARIES = klcddimmer_panelapplet.la
klcddimmer_panelapplet_la_SOURCES = brightnesschooser.ui \
brightnesschooserimpl.cpp klcddimmer.cpp klcddimmerapplet.cpp preferences.kcfg preferences.kcfgc \
progpreferences.ui
klcddimmer_panelapplet_la_LDFLAGS = -module -avoid-version $(all_libraries)
klcddimmer_panelapplet_la_LIBADD = $(LIB_KDEUI)
klcddimmer_DATA = klcddimmer.desktop
klcddimmerdir = $(kde_datadir)/kicker/applets
messages: rc.cpp
$(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp
$(XGETTEXT) *.cpp -o $(podir)/klcddimmer.pot
noinst_HEADERS = brightnesschooserimpl.h klcddimmerapplet.h
KDE_ICON = AUTO

@ -0,0 +1,100 @@
#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/home/bettini/work/klcddimmer/src/brightnesschooser.ui'
**
** Created: Sat Feb 24 20:45:57 2007
** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.7 edited Aug 31 2005 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "brightnesschooser.h"
#include <qvariant.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qslider.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a BrightnessChooser as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
BrightnessChooser::BrightnessChooser( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "BrightnessChooser" );
BrightnessChooserLayout = new QGridLayout( this, 1, 1, 11, 6, "BrightnessChooserLayout");
layout9 = new QGridLayout( 0, 1, 1, 0, 6, "layout9");
layout7 = new QHBoxLayout( 0, 0, 0, "layout7");
spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
layout7->addItem( spacer1 );
layout5 = new QVBoxLayout( 0, 0, 6, "layout5");
valueLabel = new QLabel( this, "valueLabel" );
valueLabel->setAlignment( int( QLabel::AlignCenter ) );
layout5->addWidget( valueLabel );
brightnessSlider = new QSlider( this, "brightnessSlider" );
brightnessSlider->setOrientation( QSlider::Vertical );
layout5->addWidget( brightnessSlider );
layout7->addLayout( layout5 );
spacer1_2 = new QSpacerItem( 16, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
layout7->addItem( spacer1_2 );
layout9->addLayout( layout7, 0, 0 );
okButton = new QPushButton( this, "okButton" );
okButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, okButton->sizePolicy().hasHeightForWidth() ) );
layout9->addWidget( okButton, 1, 0 );
BrightnessChooserLayout->addLayout( layout9, 0, 0 );
languageChange();
resize( QSize(124, 163).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( okButton, SIGNAL( clicked() ), this, SLOT( updateBrightness() ) );
connect( brightnessSlider, SIGNAL( valueChanged(int) ), this, SLOT( updateValue(int) ) );
}
/*
* Destroys the object and frees any allocated resources
*/
BrightnessChooser::~BrightnessChooser()
{
// no need to delete child widgets, Qt does it all for us
}
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void BrightnessChooser::languageChange()
{
setCaption( tr2i18n( "Form1" ) );
valueLabel->setText( tr2i18n( "0" ) );
QToolTip::add( brightnessSlider, tr2i18n( "set the brightness and click OK or press ENTER" ) );
okButton->setText( tr2i18n( "&OK" ) );
okButton->setAccel( QKeySequence( tr2i18n( "Alt+O" ) ) );
}
void BrightnessChooser::updateBrightness()
{
qWarning( "BrightnessChooser::updateBrightness(): Not implemented yet" );
}
void BrightnessChooser::updateValue(int)
{
qWarning( "BrightnessChooser::updateValue(int): Not implemented yet" );
}
#include "brightnesschooser.moc"

@ -0,0 +1,53 @@
/****************************************************************************
** Form interface generated from reading ui file '/home/bettini/work/klcddimmer/src/brightnesschooser.ui'
**
** Created: Sat Feb 24 20:45:57 2007
** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.7 edited Aug 31 2005 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef BRIGHTNESSCHOOSER_H
#define BRIGHTNESSCHOOSER_H
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QSpacerItem;
class QLabel;
class QSlider;
class QPushButton;
class BrightnessChooser : public QWidget
{
Q_OBJECT
public:
BrightnessChooser( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~BrightnessChooser();
QLabel* valueLabel;
QSlider* brightnessSlider;
QPushButton* okButton;
public slots:
virtual void updateBrightness();
virtual void updateValue(int);
protected:
QGridLayout* BrightnessChooserLayout;
QGridLayout* layout9;
QHBoxLayout* layout7;
QSpacerItem* spacer1;
QSpacerItem* spacer1_2;
QVBoxLayout* layout5;
protected slots:
virtual void languageChange();
};
#endif // BRIGHTNESSCHOOSER_H

@ -0,0 +1,154 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>BrightnessChooser</class>
<widget class="QWidget">
<property name="name">
<cstring>BrightnessChooser</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>124</width>
<height>163</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>layout9</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="0" column="0">
<property name="name">
<cstring>layout7</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<spacer>
<property name="name">
<cstring>spacer1</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Minimum</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout5</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>valueLabel</cstring>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
<widget class="QSlider">
<property name="name">
<cstring>brightnessSlider</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="toolTip" stdset="0">
<string>set the brightness and click OK or press ENTER</string>
</property>
</widget>
</vbox>
</widget>
<spacer>
<property name="name">
<cstring>spacer1_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Minimum</enum>
</property>
<property name="sizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
</hbox>
</widget>
<widget class="QPushButton" row="1" column="0">
<property name="name">
<cstring>okButton</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;OK</string>
</property>
<property name="accel">
<string>Alt+O</string>
</property>
</widget>
</grid>
</widget>
</grid>
</widget>
<connections>
<connection>
<sender>okButton</sender>
<signal>clicked()</signal>
<receiver>BrightnessChooser</receiver>
<slot>updateBrightness()</slot>
</connection>
<connection>
<sender>brightnessSlider</sender>
<signal>valueChanged(int)</signal>
<receiver>BrightnessChooser</receiver>
<slot>updateValue(int)</slot>
</connection>
</connections>
<slots>
<slot>updateBrightness()</slot>
<slot>updateValue(int)</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>

@ -0,0 +1,217 @@
/***************************************************************************
* Copyright (C) 2005 by Lorenzo Bettini *
* http://www.lorenzobettini.it *
* *
* 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., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "brightnesschooserimpl.h"
#include <qprocess.h>
#include <qslider.h>
#include <qlabel.h>
#include <qmessagebox.h>
#include <kdebug.h>
#include <qevent.h>
#include <qregexp.h>
#include "preferences.h"
BrightnessChooserImpl::BrightnessChooserImpl(QWidget *parent, const char *name)
: BrightnessChooser(parent, name), proc(0)
{
updateSlider();
// check whether to restore the previous brightness value
if (Preferences::saveCurrent()) {
kdDebug() << "restore previous brightness value: " <<
Preferences::currentValue() << endl;
setValue(Preferences::currentValue());
}
valueLabel->setText(getValue());
brightnessSlider->setFocus();
}
BrightnessChooserImpl::~BrightnessChooserImpl()
{
// in case save the current brightness setting
if (Preferences::saveCurrent()) {
const QString &val = getValue();
kdDebug() << "save the current brightness value: " << val << endl;
Preferences::setCurrentValue(val);
Preferences::writeConfig();
}
}
void BrightnessChooserImpl::updateSlider()
{
brightnessSlider->setPageStep(QString(Preferences::step()).toInt());
brightnessSlider->setLineStep(QString(Preferences::step()).toInt());
brightnessSlider->setRange(QString(Preferences::minValue()).toInt(),
QString(Preferences::maxValue()).toInt()+1);
valueLabel->setText(getValue());
kdDebug() << "updateSlider" << endl;
kdDebug() << "program: " << Preferences::program() << endl;
kdDebug() << "min value: " << Preferences::minValue() << endl;
kdDebug() << "max value: " << Preferences::maxValue() << endl;
kdDebug() << "page step: " << brightnessSlider->pageStep() << endl;
kdDebug() << "line step: " << brightnessSlider->lineStep() << endl;
}
void BrightnessChooserImpl::updateBrightness()
{
if (proc)
delete proc; // delete the previous instance
proc = new QProcess(this);
QString args = Preferences::setArgument();
args += getValue();
proc->addArgument( Preferences::program() );
proc->addArgument( args );
connect( proc, SIGNAL(readyReadStdout()),
this, SLOT(readFromStdout()) );
connect( proc, SIGNAL(readyReadStderr()),
this, SLOT(readFromStderr()) );
connect( proc, SIGNAL(processExited()),
this, SLOT(procExited()) );
if ( !proc->start() ) {
// error handling
QMessageBox::critical( 0,
tr("Fatal error"),
tr("Could not start the brightness adjustment command."),
tr("Quit") );
}
QString arguments = proc->arguments().join(" ");
qWarning("%s", arguments.ascii());
}
void BrightnessChooserImpl::getBrightness()
{
QString args = Preferences::getArgument();
/* some programs, such as nvclock, do not have a parameter to
get the current brightness; in such case we simply return */
if (args == "") {
kdDebug() << "the program does not support a get brightness functionality" << endl;
return;
}
if (proc)
delete proc; // delete the previous instance
proc = new QProcess(this);
proc->addArgument( Preferences::program() );
proc->addArgument( args );
connect( proc, SIGNAL(readyReadStdout()),
this, SLOT(readValueFromStdout()) );
connect( proc, SIGNAL(readyReadStderr()),
this, SLOT(readFromStderr()) );
connect( proc, SIGNAL(processExited()),
this, SLOT(procExited()) );
if ( !proc->start() ) {
// error handling
QMessageBox::critical( 0,
tr("Fatal error"),
tr("Could not start the brightness adjustment command."),
tr("Quit") );
}
QString arguments = proc->arguments().join(" ");
qWarning("%s", arguments.ascii());
}
void BrightnessChooserImpl::updateValue(int)
{
valueLabel->setText(getValue());
}
void BrightnessChooserImpl::readFromStderr()
{
// Read and process the data.
// Bear in mind that the data might be output in chunks.
QString out = proc->readStderr();
qWarning( "%s", out.ascii() );
}
void BrightnessChooserImpl::readFromStdout()
{
// Read and process the data.
// Bear in mind that the data might be output in chunks.
QString out = proc->readStdout();
qWarning( "%s", out.ascii() );
}
void BrightnessChooserImpl::readValueFromStdout()
{
// Read and process the data.
// Bear in mind that the data might be output in chunks.
QString out = proc->readStdout();
QRegExp regexp("(\\d+)");
if (regexp.search(out) > 0) {
QString result = regexp.cap(1);
kdDebug() << "initial slider value: " << brightnessSlider->value() << endl;
kdDebug() << "captured result: " << result << endl;
brightnessSlider->setValue(brightnessSlider->maxValue() - result.toInt());
kdDebug() << "updated slider value: " << brightnessSlider->value() << endl;
}
qWarning( "%s", out.ascii() );
}
void BrightnessChooserImpl::procExited()
{
qWarning("process terminated");
emit valueUpdated();
}
const QString BrightnessChooserImpl::getValue()
{
return QString::number((brightnessSlider->maxValue() - brightnessSlider->value()));
}
void BrightnessChooserImpl::setValue(const QString &val)
{
int iVal = brightnessSlider->maxValue() - val.toInt();
kdDebug() << "set slider value: " << iVal << endl;
brightnessSlider->setValue(iVal);
updateBrightness();
}
void BrightnessChooserImpl::keyPressEvent(QKeyEvent *event)
{
/* intercept ENTER and simulate the OK button;
also intercept ESC in order to close the parent widget (otherwise
ESC is passed to the applet which seems to close the main panel?)*/
if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) {
kdDebug() << "pressed ENTER" << endl;
updateBrightness();
} else if (event->key() == Qt::Key_Escape) {
kdDebug() << "pressed ESC" << endl;
parentWidget()->close();
} else {
BrightnessChooser::keyPressEvent(event);
}
}
#include "brightnesschooserimpl.moc"

@ -0,0 +1,82 @@
/***************************************************************************
* Copyright (C) 2005 by Lorenzo Bettini *
* http://www.lorenzobettini.it *
* *
* 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., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef BRIGHTNESSCHOOSERIMPL_H
#define BRIGHTNESSCHOOSERIMPL_H
#include <brightnesschooser.h>
class QProcess;
/**
Implementation slots for BrightnessChooser
@author Lorenzo Bettini, http://www.lorenzobettini.it,,
*/
class BrightnessChooserImpl : public BrightnessChooser
{
Q_OBJECT
public:
BrightnessChooserImpl(QWidget *parent = 0, const char *name = 0);
~BrightnessChooserImpl();
/**
* Updates the slider properties according to the global
* properties.
*/
void updateSlider();
/**
* Returns the current value of brightness.
* @return
*/
const QString getValue();
/**
* Sets the current value of brightness
* @param val
*/
void setValue(const QString &val);
/// retrieve the current brightness
void getBrightness();
protected slots:
void updateBrightness();
void updateValue(int);
void readFromStderr();
void readFromStdout();
void readValueFromStdout();
void procExited();
private:
/// process instance used to adjust brightness
QProcess *proc;
signals:
void valueUpdated();
protected:
/// to intercept the Enter key press and direct it to OK button
void keyPressEvent( QKeyEvent * );
};
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -0,0 +1,213 @@
/***************************************************************************
* Copyright (C) 2005 by Lorenzo Bettini *
* http://www.lorenzobettini.it *
* *
* 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., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <qlcdnumber.h>
#include <kglobal.h>
#include <klocale.h>
#include <kconfigdialog.h>
#include <kapplication.h>
#include <kmessagebox.h>
#include <kpopupmenu.h>
#include <kdatetbl.h> // for KPopupFrame
#include <kiconloader.h>
#include <kaboutapplication.h>
#include <qlabel.h>
#include <qframe.h>
#include <kdebug.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "klcddimmer.h"
#include "brightnesschooserimpl.h"
#include "progpreferences.h"
#include "preferences.h"
#include "klcddimmerapplet.h"
klcddimmer::klcddimmer(const QString& configFile, Type type, int actions, QWidget *parent, const char *name)
: KPanelApplet(configFile, type, actions, parent, name),
mBrightnessChooserFrame(0)
{
// Get the current application configuration handle
ksConfig = config();
/*
QLCDNumber *w = new QLCDNumber(this);
w->display(42);
*/
// this is the popup windows that is shown when the left button is pressed
mBrightnessChooserFrame = new KPopupFrame(this);
//mBrightnessChooserFrame = new QWidget
// (this, "klcddimmer popup", WStyle_Customize | WType_Popup | Qt::WStyle_DialogBorder);
chooser = new BrightnessChooserImpl(mBrightnessChooserFrame);
mBrightnessChooserFrame->setMainWidget(chooser);
mBrightnessChooserFrame->resize(chooser->size());
connect(chooser, SIGNAL(valueUpdated()), this, SLOT(valueUpdate()));
initContextMenu();
/*
QFrame *w = new QFrame(this);
valueLabel = new QLabel(w);
valueLabel->setText(chooser->getValue());
*/
klcddimmerView = new KlcdDimmerApplet(this);
mainView = klcddimmerView;
// klcddimmerView->brightnessIcon->setPixmap(SmallIcon("klcddimmer"));
klcddimmerView->setBrightnessLevel(chooser->getValue());
//klcddimmerView->resize( QSize(122, 48).expandedTo(minimumSizeHint()) );
mainView->show();
/* get the current value */
chooser->getBrightness();
}
klcddimmer::~klcddimmer()
{
}
void klcddimmer::about()
{
//KMessageBox::information(0, i18n("This is an about box"));
KAboutData aboutData("KLcdDimmer", "KLcdDimmer", VERSION,
I18N_NOOP("Applet for LCD brightness adjustment"), KAboutData::License_GPL_V2);
aboutData.addAuthor("Lorenzo Bettini", "main author", "",
"http://www.lorenzobettini.it");
aboutData.setHomepage("http://klcddimmer.sourceforge.net");
aboutData.setCustomAuthorText("please use http://sourceforge.net/projects/klcddimmer to report bugs",
"please use <a href=http://sourceforge.net/projects/klcddimmer>http://sourceforge.net/projects/klcddimmer</a> to report bugs");
KAboutApplication about(&aboutData, this, 0);
about.setProgramLogo( KGlobal::instance()->iconLoader()->iconPath( "klcddimmer", -KIcon::SizeLarge ) );
about.exec();
}
void klcddimmer::help()
{
KMessageBox::information(0, i18n("This is a help box"));
}
void klcddimmer::preferences()
{
KConfigDialog dialog( this, "settings", Preferences::self() );
ProgPreferences *preferences = new ProgPreferences(0, "Program");
dialog.addPage(preferences, i18n("Program"), "wizard");
if (dialog.exec())
{
chooser->updateSlider();
}
}
/*
int klcddimmer::widthForHeight(int height) const
{
return klcddimmerView->width();
}
int klcddimmer::heightForWidth(int width) const
{
return klcddimmerView->height();
}
*/
int klcddimmer::widthForHeight( int height ) const
{
// kdDebug() << "icon sizeHint: " << klcddimmerView->brightnessIcon->sizeHint() << endl;
// kdDebug() << "text sizeHint: " << klcddimmerView->brightnessLevel->sizeHint() << endl;
return height;
}
int klcddimmer::heightForWidth( int width ) const
{
// kdDebug() << "icon sizeHint: " << klcddimmerView->brightnessIcon->sizeHint() << endl;
// kdDebug() << "text sizeHint: " << klcddimmerView->brightnessLevel->sizeHint() << endl;
return width;
}
void klcddimmer::resizeEvent(QResizeEvent *e)
{
klcddimmerView->resize(this->width(),this->height());
}
void klcddimmer::initContextMenu()
{
mContextMenu = new KPopupMenu(this);
//mContextMenu->insertItem(SmallIcon("reload"), i18n("&Update Now"),
// this, SLOT(slotUpdateNow()), 0, -1, 2);
mContextMenu->insertSeparator();
mContextMenu->insertItem(SmallIcon("klcddimmer"), i18n("&About KLcdDimmer"), this, SLOT(about()));
mContextMenu->insertItem(SmallIcon("configure"),
i18n("&Configure KLcdDimmer..."), this, SLOT(preferences()));
setCustomMenu(mContextMenu);
}
void klcddimmer::mousePressEvent(QMouseEvent *e)
{
if ( e->button() == LeftButton )
{
if (!mBrightnessChooserFrame->isShown()) {
mBrightnessChooserFrame->popup(e->globalPos());
}
}
else if ( e->button() != RightButton )
{
KPanelApplet::mousePressEvent( e );
return;
}
else // must be right button
{
mContextMenu->exec(e->globalPos());
}
}
void klcddimmer::valueUpdate()
{
kdDebug() << "updated value: " << chooser->getValue() << endl;
klcddimmerView->setBrightnessLevel(chooser->getValue());
}
extern "C"
{
KPanelApplet* init( QWidget *parent, const QString& configFile)
{
KGlobal::locale()->insertCatalogue("klcddimmer");
return new klcddimmer(configFile, KPanelApplet::Normal,
KPanelApplet::About | KPanelApplet::Help | KPanelApplet::Preferences,
parent, "klcddimmer");
}
}

@ -0,0 +1,34 @@
[Desktop Entry]
Encoding=UTF-8
Comment=A KDE panel applet to set brightness of LCD screen
Comment[br]=Un arloadig panell a vez graet klcddimmer
Comment[ca]=Un applet del plafó anomenat klcddimmer
Comment[cy]=Rhaglennig panel o'r enw klcddimmer
Comment[da]=En panel-applet der hedder klcddimmer
Comment[de]=Ein Miniprogramm mit dem Namen klcddimmer
Comment[es]=Un applet del panel llamado klcddimmer
Comment[et]=Paneeliaplett nimega klcddimmer
Comment[eu]=klcddimmer izeneko panel applet bat
Comment[fr]=Un applet pour le tableau de bord nommé klcddimmer
Comment[hi]=एक फलक ऐपलेट जो कहलाता है- klcddimmer
Comment[hu]=klcddimmer nevű panel-kisalkalmazás
Comment[is]=Spjaldforritlingur nefndur klcddimmer
Comment[it]=Un applet per il pannello chiamata klcddimmer
Comment[ja]=klcddimmer と呼ばれるパネルアプレット
Comment[nb]=Et panelprogram som heter klcddimmer
Comment[nl]=Een paneel-applet met naam klcddimmer
Comment[pl]=Aplet panelu o nazwie klcddimmer
Comment[pt]=Um 'applet' para o painel chamado klcddimmer
Comment[pt_BR]=Uma applet de painel chamada klcddimmer
Comment[ru]=Апплет панели klcddimmer
Comment[sl]=Pultni vstavek z imenom klcddimmer
Comment[sr]=Панелни аплет по имену klcddimmer
Comment[sr@Latn]=Panelni aplet po imenu klcddimmer
Comment[sv]=Ett panelminiprogram som kallas klcddimmer
Comment[ta]=ஒரு பானல் ஆப்லெட் klcddimmer என்ற்உ அழைக்கப்படுகிறது
Comment[tg]=Пайраҳаи апплети klcddimmer
Comment[zh_CN]=一个称作klcddimmer的面板小程序
Name=klcddimmer
Icon=klcddimmer
X-KDE-Library=klcddimmer_panelapplet
X-KDE-UniqueApplet = false

@ -0,0 +1,146 @@
/***************************************************************************
* Copyright (C) 2005 by Lorenzo Bettini *
* http://www.lorenzobettini.it *
* *
* 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., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef KLCDDIMMER_H
#define KLCDDIMMER_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <kpanelapplet.h>
#include <qstring.h>
#include <kconfig.h>
class KPopupMenu;
class BrightnessChooserImpl;
class KPopupFrame;
class KlcdDimmerApplet;
class klcddimmer : public KPanelApplet
{
Q_OBJECT
public:
/**
* Construct a @ref KPanelApplet just like any other widget.
*
* @param configFile The configFile handed over in the factory function.
* @param Type The applet @ref type().
* @param actions Standard RMB menu actions supported by the applet (see @ref action() ).
* @param parent The pointer to the parent widget handed over in the factory function.
* @param name A Qt object name for your applet.
**/
klcddimmer(const QString& configFile, Type t = Normal, int actions = 0,
QWidget *parent = 0, const char *name = 0);
/** destructor */
~klcddimmer();
/**
* Retrieve a suggested width for a given height.
*
* Every applet should reimplement this function.
*
* Depending on the panel orientation the height (horizontal panel) or the
* width (vertical panel) of the applets is fixed.
* The exact values of the fixed size component depend on the panel size.
*
* On a horizontal panel the applet height is fixed, the panel will
* call @ref widthForHeight(int height) with @p height
* equal to 'the fixed applet height'
* when laying out the applets.
*
* The applet can now choose the other size component (width)
* based on the given height.
*
* The width you return is granted.
**/
virtual int widthForHeight(int height) const;
/**
* @return A suggested height for a given width.
*
* Every applet should reimplement this function.
*
* Depending on the panel orientation the height (horizontal panel) or the
* width (vertical panel) of the applets is fixed.
* The exact values of the fixed size component depend on the panel size.
*
* On a vertical panel the applet width is fixed, the panel will
* call @ref heightForWidth(int width) with @p width
* equal to 'the fixed applet width'
* when laying out the applets.
*
* The applet can now choose the other size component (height)
* based on the given width.
*
* The height you return is granted.
**/
virtual int heightForWidth(int width) const;
/**
* Is called when the user selects "About" from the applets RMB menu.
* Reimplement this function to launch a about dialog.
*
* Note that this is called only when your applet supports the About action.
* See @ref Action and @ref KPanelApplet().
**/
public slots:
virtual void about();
/**
* Is called when the user selects "Help" from the applets RMB menu.
* Reimplement this function to launch a manual or help page.
*
* Note that this is called only when your applet supports the Help action.
* See @ref Action and @ref KPanelApplet().
**/
virtual void help();
/**
* Is called when the user selects "Preferences" from the applets RMB menu.
* Reimplement this function to launch a preferences dialog or kcontrol module.
*
* Note that this is called only when your applet supports the preferences action.
* See @ref Action and @ref KPanelApplet().
**/
virtual void preferences();
/**
* It is called when the brightness value has been updated.
*/
virtual void valueUpdate();
protected:
void resizeEvent(QResizeEvent *);
void mousePressEvent(QMouseEvent *e);
private:
KConfig *ksConfig;
QWidget *mainView;
KPopupMenu *mContextMenu;
KPopupFrame *mBrightnessChooserFrame;
BrightnessChooserImpl *chooser;
KlcdDimmerApplet *klcddimmerView;
private: // Private methods
/**
* Initializes the context menu
*/
void initContextMenu();
};
#endif

@ -0,0 +1,16 @@
Begin3
Title: klcddimmer -- Some description
Version: 0.1
Entered-date:
Description:
Keywords: KDE Qt
Author: Lorenzo Bettini, http://www.lorenzobettini.it,,
Maintained-by: Lorenzo Bettini, http://www.lorenzobettini.it,,
Home-page:
Alternate-site:
Primary-site: ftp://ftp.kde.org/pub/kde/unstable/apps/utils
xxxxxx klcddimmer-0.1.tar.gz
xxx klcddimmer-0.1.lsm
Platform: Linux. Needs KDE
Copying-policy: Custom
End

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="744.09448819"
height="1052.3622047"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.42.2"
sodipodi:docbase="/home/bettini/tmp"
sodipodi:docname="klcddimmer.svg">
<defs
id="defs4">
<linearGradient
id="linearGradient6681">
<stop
style="stop-color:#1d2c9e;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop6683" />
<stop
style="stop-color:#0e739e;stop-opacity:0;"
offset="1"
id="stop6685" />
</linearGradient>
<linearGradient
id="linearGradient5206">
<stop
style="stop-color:#fff600;stop-opacity:1;"
offset="0"
id="stop5208" />
<stop
style="stop-color:#fff600;stop-opacity:0;"
offset="1"
id="stop5210" />
</linearGradient>
<linearGradient
id="linearGradient5198">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop5200" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop5202" />
</linearGradient>
<linearGradient
id="linearGradient2060">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop2062" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop2064" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient5198"
id="radialGradient5204"
cx="213.71428"
cy="280.93362"
fx="213.71428"
fy="280.93362"
r="71.928574"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient5206"
id="radialGradient5212"
cx="213.71428"
cy="280.93362"
fx="213.71428"
fy="280.93362"
r="71.928574"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient6681"
id="linearGradient6689"
x1="422.69739"
y1="277.47690"
x2="483.50323"
y2="277.47690"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.0000000"
inkscape:cx="375.00000"
inkscape:cy="523.84790"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:window-width="1273"
inkscape:window-height="944"
inkscape:window-x="0"
inkscape:window-y="46" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
sodipodi:type="arc"
style="fill:url(#radialGradient5212);fill-opacity:1.0;fill-rule:evenodd;stroke:url(#radialGradient5204);stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;opacity:1.0000000"
id="path1314"
sodipodi:cx="245.71428"
sodipodi:cy="280.93362"
sodipodi:rx="71.428574"
sodipodi:ry="71.428574"
d="M 317.14285 280.93362 A 71.428574 71.428574 0 1 1 174.28571,280.93362 A 71.428574 71.428574 0 1 1 317.14285 280.93362 z"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000"
inkscape:export-filename="/home/bettini/tmp/path5943.png" />
<path
sodipodi:type="arc"
style="opacity:1.0000000;fill:url(#linearGradient6689);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.99968761;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:0.0000000"
id="path5943"
sodipodi:cx="424.00000"
sodipodi:cy="277.36218"
sodipodi:rx="59.000000"
sodipodi:ry="60.000000"
d="M 429.15265,217.59143 A 59.000000,60.000000 0 0 1 423.19738,337.35663"
sodipodi:start="4.7998334"
sodipodi:end="7.8675857"
sodipodi:open="true"
transform="matrix(1.228777,-6.370894e-2,5.618174e-2,1.180589,-292.2493,-20.31316)"
inkscape:export-xdpi="90.000000"
inkscape:export-ydpi="90.000000" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

@ -0,0 +1,57 @@
/***************************************************************************
* Copyright (C) 2005 by Lorenzo Bettini *
* http://www.lorenzobettini.it *
* *
* 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., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "klcddimmerapplet.h"
#include <qpixmap.h>
#include <qlabel.h>
#include <kiconloader.h>
#include <qlayout.h>
KlcdDimmerApplet::KlcdDimmerApplet(QWidget *parent, const char *name)
: QWidget(parent, name)
{
// the icon and the text will be aligned vertically centered
layout = new QVBoxLayout(this);
brightnessIcon = new QLabel(this);
brightnessIcon->setAlignment(AlignCenter);
brightnessIcon->setBackgroundOrigin(AncestorOrigin);
brightnessLevel = new QLabel(this);
brightnessLevel->setAlignment(AlignCenter);
// use the same background of the panel
brightnessLevel->setBackgroundOrigin(AncestorOrigin);
layout->addWidget(brightnessIcon);
layout->addWidget(brightnessLevel);
brightnessIcon->setPixmap(SmallIcon("klcddimmer"));
}
KlcdDimmerApplet::~KlcdDimmerApplet()
{
}
void KlcdDimmerApplet::setBrightnessLevel(const QString &level)
{
brightnessLevel->setText(level);
}
#include "klcddimmerapplet.moc"

@ -0,0 +1,50 @@
/***************************************************************************
* Copyright (C) 2005 by Lorenzo Bettini *
* http://www.lorenzobettini.it *
* *
* 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., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef KLCDDIMMERAPPLET_H
#define KLCDDIMMERAPPLET_H
#include <qwidget.h>
class QLabel;
class QBoxLayout;
/**
* The actual graphical representation for KlcdDimmer
* @author Lorenzo Bettini, http://www.lorenzobettini.it,,
*/
class KlcdDimmerApplet : public QWidget
{
Q_OBJECT
public:
KlcdDimmerApplet(QWidget *parent=0, const char *name=0);
~KlcdDimmerApplet();
void setBrightnessLevel(const QString &level);
protected:
QLabel* brightnessLevel;
QLabel* brightnessIcon;
QBoxLayout *layout;
};
#endif

@ -0,0 +1,58 @@
// This file is generated by kconfig_compiler from preferences.kcfg.
// All changes you do to this file will be lost.
#include "preferences.h"
#include <kstaticdeleter.h>
Preferences *Preferences::mSelf = 0;
static KStaticDeleter<Preferences> staticPreferencesDeleter;
Preferences *Preferences::self()
{
if ( !mSelf ) {
staticPreferencesDeleter.setObject( mSelf, new Preferences() );
mSelf->readConfig();
}
return mSelf;
}
Preferences::Preferences( )
: KConfigSkeleton( QString::fromLatin1( "klcddimmerrc" ) )
{
mSelf = this;
setCurrentGroup( QString::fromLatin1( "general" ) );
KConfigSkeleton::ItemString *itemProgram;
itemProgram = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "Program" ), mProgram, QString::fromLatin1( "smartdimmer" ) );
addItem( itemProgram, QString::fromLatin1( "Program" ) );
KConfigSkeleton::ItemString *itemSetArgument;
itemSetArgument = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "SetArgument" ), mSetArgument, QString::fromLatin1( "-s" ) );
addItem( itemSetArgument, QString::fromLatin1( "SetArgument" ) );
KConfigSkeleton::ItemString *itemGetArgument;
itemGetArgument = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "GetArgument" ), mGetArgument, QString::fromLatin1( "-g" ) );
addItem( itemGetArgument, QString::fromLatin1( "GetArgument" ) );
KConfigSkeleton::ItemString *itemMinValue;
itemMinValue = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "MinValue" ), mMinValue, QString::fromLatin1( "1" ) );
addItem( itemMinValue, QString::fromLatin1( "MinValue" ) );
KConfigSkeleton::ItemString *itemMaxValue;
itemMaxValue = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "MaxValue" ), mMaxValue, QString::fromLatin1( "21" ) );
addItem( itemMaxValue, QString::fromLatin1( "MaxValue" ) );
KConfigSkeleton::ItemString *itemStep;
itemStep = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "Step" ), mStep, QString::fromLatin1( "1" ) );
addItem( itemStep, QString::fromLatin1( "Step" ) );
KConfigSkeleton::ItemBool *itemSaveCurrent;
itemSaveCurrent = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "SaveCurrent" ), mSaveCurrent, false );
addItem( itemSaveCurrent, QString::fromLatin1( "SaveCurrent" ) );
KConfigSkeleton::ItemString *itemCurrentValue;
itemCurrentValue = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "CurrentValue" ), mCurrentValue );
addItem( itemCurrentValue, QString::fromLatin1( "CurrentValue" ) );
}
Preferences::~Preferences()
{
if ( mSelf == this )
staticPreferencesDeleter.setObject( mSelf, 0, false );
}

@ -0,0 +1,192 @@
// This file is generated by kconfig_compiler from preferences.kcfg.
// All changes you do to this file will be lost.
#ifndef PREFERENCES_H
#define PREFERENCES_H
#include <kconfigskeleton.h>
#include <kdebug.h>
class Preferences : public KConfigSkeleton
{
public:
static Preferences *self();
~Preferences();
/**
Set program to adjust lcd brightness
*/
static
void setProgram( const QString & v )
{
if (!self()->isImmutable( QString::fromLatin1( "Program" ) ))
self()->mProgram = v;
}
/**
Get program to adjust lcd brightness
*/
static
QString program()
{
return self()->mProgram;
}
/**
Set argument to set the brighness
*/
static
void setSetArgument( const QString & v )
{
if (!self()->isImmutable( QString::fromLatin1( "SetArgument" ) ))
self()->mSetArgument = v;
}
/**
Get argument to set the brighness
*/
static
QString setArgument()
{
return self()->mSetArgument;
}
/**
Set argument to get the brighness
*/
static
void setGetArgument( const QString & v )
{
if (!self()->isImmutable( QString::fromLatin1( "GetArgument" ) ))
self()->mGetArgument = v;
}
/**
Get argument to get the brighness
*/
static
QString getArgument()
{
return self()->mGetArgument;
}
/**
Set minimum value for brightness
*/
static
void setMinValue( const QString & v )
{
if (!self()->isImmutable( QString::fromLatin1( "MinValue" ) ))
self()->mMinValue = v;
}
/**
Get minimum value for brightness
*/
static
QString minValue()
{
return self()->mMinValue;
}
/**
Set maximum value for brightness
*/
static
void setMaxValue( const QString & v )
{
if (!self()->isImmutable( QString::fromLatin1( "MaxValue" ) ))
self()->mMaxValue = v;
}
/**
Get maximum value for brightness
*/
static
QString maxValue()
{
return self()->mMaxValue;
}
/**
Set step to increment
*/
static
void setStep( const QString & v )
{
if (!self()->isImmutable( QString::fromLatin1( "Step" ) ))
self()->mStep = v;
}
/**
Get step to increment
*/
static
QString step()
{
return self()->mStep;
}
/**
Set save the current value
*/
static
void setSaveCurrent( bool v )
{
if (!self()->isImmutable( QString::fromLatin1( "SaveCurrent" ) ))
self()->mSaveCurrent = v;
}
/**
Get save the current value
*/
static
bool saveCurrent()
{
return self()->mSaveCurrent;
}
/**
Set the current brightness value
*/
static
void setCurrentValue( const QString & v )
{
if (!self()->isImmutable( QString::fromLatin1( "CurrentValue" ) ))
self()->mCurrentValue = v;
}
/**
Get the current brightness value
*/
static
QString currentValue()
{
return self()->mCurrentValue;
}
static
void writeConfig()
{
static_cast<KConfigSkeleton*>(self())->writeConfig();
}
protected:
Preferences();
static Preferences *mSelf;
// general
QString mProgram;
QString mSetArgument;
QString mGetArgument;
QString mMinValue;
QString mMaxValue;
QString mStep;
bool mSaveCurrent;
QString mCurrentValue;
private:
};
#endif

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
<kcfg>
<kcfgfile name="klcddimmerrc"/>
<group name="general">
<entry name="Program" type="String">
<label>program to adjust lcd brightness</label>
<default>smartdimmer</default>
</entry>
<entry name="SetArgument" type="String">
<label>argument to set the brighness</label>
<default>-s</default>
</entry>
<entry name="GetArgument" type="String">
<label>argument to get the brighness</label>
<default>-g</default>
</entry>
<entry name="MinValue" type="String">
<label>minimum value for brightness</label>
<default>1</default>
</entry>
<entry name="MaxValue" type="String">
<label>maximum value for brightness</label>
<default>21</default>
</entry>
<entry name="Step" type="String">
<label>step to increment</label>
<default>1</default>
</entry>
<entry name="SaveCurrent" type="Bool">
<label>save the current value</label>
<default>false</default>
</entry>
<entry name="CurrentValue" type="String">
<label>the current brightness value</label>
</entry>
</group>
</kcfg>

@ -0,0 +1,4 @@
File=preferences.kcfg
ClassName=Preferences
Singleton=true
Mutators=true

@ -0,0 +1,152 @@
#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/home/bettini/work/klcddimmer/src/progpreferences.ui'
**
** Created: Sat Feb 24 20:45:58 2007
** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.7 edited Aug 31 2005 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "progpreferences.h"
#include <qvariant.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <knuminput.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a ProgPreferences as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
ProgPreferences::ProgPreferences( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
if ( !name )
setName( "ProgPreferences" );
ProgPreferencesLayout = new QGridLayout( this, 1, 1, 11, 6, "ProgPreferencesLayout");
layout11 = new QVBoxLayout( 0, 0, 6, "layout11");
layout2 = new QHBoxLayout( 0, 0, 6, "layout2");
textLabel1 = new QLabel( this, "textLabel1" );
layout2->addWidget( textLabel1 );
kcfg_Program = new QLineEdit( this, "kcfg_Program" );
layout2->addWidget( kcfg_Program );
layout11->addLayout( layout2 );
layout3 = new QHBoxLayout( 0, 0, 6, "layout3");
textLabel2 = new QLabel( this, "textLabel2" );
layout3->addWidget( textLabel2 );
kcfg_SetArgument = new QLineEdit( this, "kcfg_SetArgument" );
layout3->addWidget( kcfg_SetArgument );
layout11->addLayout( layout3 );
layout3_2 = new QHBoxLayout( 0, 0, 6, "layout3_2");
textLabel2_2 = new QLabel( this, "textLabel2_2" );
layout3_2->addWidget( textLabel2_2 );
kcfg_GetArgument = new QLineEdit( this, "kcfg_GetArgument" );
layout3_2->addWidget( kcfg_GetArgument );
layout11->addLayout( layout3_2 );
layout7 = new QHBoxLayout( 0, 0, 6, "layout7");
textLabel3 = new QLabel( this, "textLabel3" );
layout7->addWidget( textLabel3 );
spacer1 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
layout7->addItem( spacer1 );
kcfg_MinValue = new KIntNumInput( this, "kcfg_MinValue" );
layout7->addWidget( kcfg_MinValue );
layout11->addLayout( layout7 );
layout7_2 = new QHBoxLayout( 0, 0, 6, "layout7_2");
textLabel3_2 = new QLabel( this, "textLabel3_2" );
layout7_2->addWidget( textLabel3_2 );
spacer1_2 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
layout7_2->addItem( spacer1_2 );
kcfg_MaxValue = new KIntNumInput( this, "kcfg_MaxValue" );
layout7_2->addWidget( kcfg_MaxValue );
layout11->addLayout( layout7_2 );
layout7_2_2 = new QHBoxLayout( 0, 0, 6, "layout7_2_2");
textLabel3_2_2 = new QLabel( this, "textLabel3_2_2" );
layout7_2_2->addWidget( textLabel3_2_2 );
spacer1_2_2 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
layout7_2_2->addItem( spacer1_2_2 );
kcfg_Step = new KIntNumInput( this, "kcfg_Step" );
layout7_2_2->addWidget( kcfg_Step );
layout11->addLayout( layout7_2_2 );
kcfg_SaveCurrent = new QCheckBox( this, "kcfg_SaveCurrent" );
layout11->addWidget( kcfg_SaveCurrent );
ProgPreferencesLayout->addLayout( layout11, 0, 0 );
languageChange();
resize( QSize(600, 480).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
}
/*
* Destroys the object and frees any allocated resources
*/
ProgPreferences::~ProgPreferences()
{
// no need to delete child widgets, Qt does it all for us
}
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void ProgPreferences::languageChange()
{
setCaption( tr2i18n( "Form1" ) );
textLabel1->setText( tr2i18n( "program" ) );
QToolTip::add( kcfg_Program, tr2i18n( "the program to set the brightness" ) );
QWhatsThis::add( kcfg_Program, tr2i18n( "the program to set the brightness" ) );
textLabel2->setText( tr2i18n( "set argument" ) );
QToolTip::add( kcfg_SetArgument, tr2i18n( "the argument to pass to the program<br>to set the brightness" ) );
QWhatsThis::add( kcfg_SetArgument, tr2i18n( "the argument to pass to the program<br>\n"
"to set the brightness" ) );
textLabel2_2->setText( tr2i18n( "get argument" ) );
QToolTip::add( kcfg_GetArgument, tr2i18n( "the argument to pass to the program<br>to get the brightness" ) );
QWhatsThis::add( kcfg_GetArgument, tr2i18n( "the argument to pass to the program<br>\n"
"to get the brightness.\n"
"<p>\n"
"This can be left empty if the program does not support\n"
"a \"get\" argument." ) );
textLabel3->setText( tr2i18n( "minimum value" ) );
QToolTip::add( kcfg_MinValue, tr2i18n( "the minimum value for the brightness" ) );
QWhatsThis::add( kcfg_MinValue, tr2i18n( "brightness" ) );
textLabel3_2->setText( tr2i18n( "maximum value" ) );
QToolTip::add( kcfg_MaxValue, tr2i18n( "the maximum value for the brightness" ) );
QWhatsThis::add( kcfg_MaxValue, tr2i18n( "brightness" ) );
textLabel3_2_2->setText( tr2i18n( "step" ) );
QToolTip::add( kcfg_Step, tr2i18n( "step value<br>to increment/decrement the brightness" ) );
QWhatsThis::add( kcfg_Step, tr2i18n( "brightness" ) );
kcfg_SaveCurrent->setText( tr2i18n( "S&ave the current brightness value" ) );
kcfg_SaveCurrent->setAccel( QKeySequence( tr2i18n( "Alt+A" ) ) );
QToolTip::add( kcfg_SaveCurrent, tr2i18n( "When closing, it saves the current brightness value<br>so that it can be restored<br>when the applet starts." ) );
QWhatsThis::add( kcfg_SaveCurrent, tr2i18n( "When closing, it saves the current brightness value<br>\n"
"so that it can be restored<br>\n"
"when the applet starts." ) );
}
#include "progpreferences.moc"

@ -0,0 +1,65 @@
/****************************************************************************
** Form interface generated from reading ui file '/home/bettini/work/klcddimmer/src/progpreferences.ui'
**
** Created: Sat Feb 24 20:45:58 2007
** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.7 edited Aug 31 2005 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef PROGPREFERENCES_H
#define PROGPREFERENCES_H
#include <qvariant.h>
#include <qwidget.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QSpacerItem;
class QLabel;
class QLineEdit;
class KIntNumInput;
class QCheckBox;
class ProgPreferences : public QWidget
{
Q_OBJECT
public:
ProgPreferences( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~ProgPreferences();
QLabel* textLabel1;
QLineEdit* kcfg_Program;
QLabel* textLabel2;
QLineEdit* kcfg_SetArgument;
QLabel* textLabel2_2;
QLineEdit* kcfg_GetArgument;
QLabel* textLabel3;
KIntNumInput* kcfg_MinValue;
QLabel* textLabel3_2;
KIntNumInput* kcfg_MaxValue;
QLabel* textLabel3_2_2;
KIntNumInput* kcfg_Step;
QCheckBox* kcfg_SaveCurrent;
protected:
QGridLayout* ProgPreferencesLayout;
QVBoxLayout* layout11;
QHBoxLayout* layout2;
QHBoxLayout* layout3;
QHBoxLayout* layout3_2;
QHBoxLayout* layout7;
QSpacerItem* spacer1;
QHBoxLayout* layout7_2;
QSpacerItem* spacer1_2;
QHBoxLayout* layout7_2_2;
QSpacerItem* spacer1_2_2;
protected slots:
virtual void languageChange();
};
#endif // PROGPREFERENCES_H

@ -0,0 +1,292 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ProgPreferences</class>
<widget class="QWidget">
<property name="name">
<cstring>ProgPreferences</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>layout11</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>program</string>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>kcfg_Program</cstring>
</property>
<property name="toolTip" stdset="0">
<string>the program to set the brightness</string>
</property>
<property name="whatsThis" stdset="0">
<string>the program to set the brightness</string>
</property>
</widget>
</hbox>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
<property name="text">
<string>set argument</string>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>kcfg_SetArgument</cstring>
</property>
<property name="toolTip" stdset="0">
<string>the argument to pass to the program&lt;br&gt;to set the brightness</string>
</property>
<property name="whatsThis" stdset="0">
<string>the argument to pass to the program&lt;br&gt;
to set the brightness</string>
</property>
</widget>
</hbox>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout3_2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
<property name="text">
<string>get argument</string>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>kcfg_GetArgument</cstring>
</property>
<property name="toolTip" stdset="0">
<string>the argument to pass to the program&lt;br&gt;to get the brightness</string>
</property>
<property name="whatsThis" stdset="0">
<string>the argument to pass to the program&lt;br&gt;
to get the brightness.
&lt;p&gt;
This can be left empty if the program does not support
a "get" argument.</string>
</property>
</widget>
</hbox>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout7</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
<property name="text">
<string>minimum value</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>40</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="KIntNumInput">
<property name="name">
<cstring>kcfg_MinValue</cstring>
</property>
<property name="toolTip" stdset="0">
<string>the minimum value for the brightness</string>
</property>
<property name="whatsThis" stdset="0">
<string>brightness</string>
</property>
</widget>
</hbox>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout7_2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel3_2</cstring>
</property>
<property name="text">
<string>maximum value</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer1_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="KIntNumInput">
<property name="name">
<cstring>kcfg_MaxValue</cstring>
</property>
<property name="toolTip" stdset="0">
<string>the maximum value for the brightness</string>
</property>
<property name="whatsThis" stdset="0">
<string>brightness</string>
</property>
</widget>
</hbox>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout7_2_2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel3_2_2</cstring>
</property>
<property name="text">
<string>step</string>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacer1_2_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="KIntNumInput">
<property name="name">
<cstring>kcfg_Step</cstring>
</property>
<property name="toolTip" stdset="0">
<string>step value&lt;br&gt;to increment/decrement the brightness</string>
</property>
<property name="whatsThis" stdset="0">
<string>brightness</string>
</property>
</widget>
</hbox>
</widget>
<widget class="QCheckBox">
<property name="name">
<cstring>kcfg_SaveCurrent</cstring>
</property>
<property name="text">
<string>S&amp;ave the current brightness value</string>
</property>
<property name="accel">
<string>Alt+A</string>
</property>
<property name="toolTip" stdset="0">
<string>When closing, it saves the current brightness value&lt;br&gt;so that it can be restored&lt;br&gt;when the applet starts.</string>
</property>
<property name="whatsThis" stdset="0">
<string>When closing, it saves the current brightness value&lt;br&gt;
so that it can be restored&lt;br&gt;
when the applet starts.</string>
</property>
</widget>
</vbox>
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
</includehints>
</UI>

@ -0,0 +1,3 @@
doc
po
src
Loading…
Cancel
Save