Compare commits
102 Commits
debian/0.9
...
ubuntu/que
Author | SHA1 | Date | |
---|---|---|---|
|
682b13003e | ||
|
70b91e587f | ||
|
14cd289ddf | ||
|
be9b5be51a | ||
|
69e7d78e3e | ||
c0a5d21319 | |||
a657e0710d | |||
bde7f42127 | |||
c67bc6f5cb | |||
b6ae6f489c | |||
23d9b31362 | |||
|
2055e287ba | ||
|
baf98df0e0 | ||
|
37bf2b91f3 | ||
|
c99c3fec0d | ||
|
d0a41a3683 | ||
|
e2d1b8be25 | ||
|
8b201d80e3 | ||
|
8b15c826fd | ||
235a550c36 | |||
928e094586 | |||
dd5c5e0199 | |||
e281b2507f | |||
5a6a3e97c9 | |||
55f23453c6 | |||
5409596e89 | |||
e3b40ebf98 | |||
06c44daa1b | |||
7c2c8e8386 | |||
1ee36eab58 | |||
56bcc84401 | |||
b9cb6b9902 | |||
1b0426f686 | |||
945833658f | |||
1133ed1990 | |||
f1549e6d75 | |||
bca604492d | |||
bf8a5dc047 | |||
13232669cd | |||
db847b4f69 | |||
981de0ac69 | |||
01c1ad4499 | |||
df5ce062af | |||
ce904c89b7 | |||
0afe853ef3 | |||
|
81851edb79 | ||
|
5929b137ba | ||
9cec4fda34 | |||
61a4b4da31 | |||
fd241ddb17 | |||
0cb596ad4b | |||
7361b84162 | |||
|
e0e0ee2890 | ||
|
c8f4fe8700 | ||
|
8059003eb6 | ||
|
cbffb14960 | ||
|
6454e9e0b0 | ||
|
7d29e1544c | ||
|
e47d968f4b | ||
|
50a9ce9e92 | ||
|
b3d2ece52c | ||
|
5b33c94faf | ||
|
2e801811c4 | ||
|
fa2f5f969d | ||
|
0483bb2d83 | ||
|
532ac47014 | ||
|
aa94287072 | ||
|
8697d66290 | ||
|
c49411002b | ||
|
3db02b4d75 | ||
|
8d84225684 | ||
|
68389ffe78 | ||
|
fd201e3745 | ||
|
ee233e5aa1 | ||
|
20d1c95d12 | ||
|
a65e8a4d49 | ||
|
b55a93db64 | ||
|
c2801837da | ||
|
59b51e5bcc | ||
|
0c4973005b | ||
|
f79aea1c02 | ||
|
9e7d502f12 | ||
|
195dd4b5d9 | ||
|
9344649f16 | ||
|
647120c653 | ||
|
aca07a450f | ||
|
75c9850719 | ||
|
8a8ae06cce | ||
|
23495f619b | ||
|
9153436fff | ||
|
dd7709f0fe | ||
|
c5db783c32 | ||
|
fa6fcd8430 | ||
|
0a4ec25d09 | ||
|
68207d1ebb | ||
|
b27039f629 | ||
|
67f723c0a4 | ||
|
f4d5a60b31 | ||
|
fe3d3c1489 | ||
|
ac8e53a12b | ||
|
9b62447222 | ||
|
6a8950212d |
8
AUTHORS
8
AUTHORS
@ -1,8 +0,0 @@
|
||||
Upstream Authors:
|
||||
LXQt team: http://lxqt.org
|
||||
|
||||
Copyright:
|
||||
Copyright (c) 2013-2014 LXQt team
|
||||
|
||||
License: GPL-2 and LGPL-2.1+
|
||||
The full text of the licenses can be found in the 'COPYING' file.
|
@ -1,35 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||
|
||||
project(lxqt-powermanagement)
|
||||
|
||||
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(Qt5DBus REQUIRED)
|
||||
find_package(Qt5X11Extras REQUIRED)
|
||||
find_package(Qt5Svg REQUIRED)
|
||||
find_package(Qt5LinguistTools REQUIRED QUIET)
|
||||
find_package(lxqt REQUIRED QUIET)
|
||||
find_package(KF5Solid REQUIRED)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(LXQtCompilerSettings NO_POLICY_SCOPE)
|
||||
include(LXQtTranslate)
|
||||
|
||||
add_subdirectory(config)
|
||||
add_subdirectory(src)
|
||||
|
||||
# building tarball with CPack -------------------------------------------------
|
||||
include(InstallRequiredSystemLibraries)
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${LXQT_MAJOR_VERSION})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${LXQT_MINOR_VERSION})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${LXQT_PATCH_VERSION})
|
||||
set(CPACK_GENERATOR TBZ2)
|
||||
set(CPACK_SOURCE_GENERATOR TBZ2)
|
||||
set(CPACK_SOURCE_IGNORE_FILES /build/;.gitignore;.*~;.git;.kdev4;temp)
|
||||
include(CPack)
|
502
LICENSE
502
LICENSE
@ -1,502 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
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 and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, 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 library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete 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 distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
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 Library or any portion
|
||||
of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
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 Library, 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 Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you 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.
|
||||
|
||||
If distribution of 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 satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be 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.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library 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.
|
||||
|
||||
9. 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 Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
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 with
|
||||
this License.
|
||||
|
||||
11. 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 Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library 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 Library.
|
||||
|
||||
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.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library 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.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser 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 Library
|
||||
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 Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
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
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "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
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. 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 LIBRARY 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
|
||||
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. 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.
|
||||
|
||||
powermanagement module for lxde-qt
|
||||
Copyright (C) 2013 Christian Surlykke
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
{signature of Ty Coon}, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
@ -1,4 +0,0 @@
|
||||
lxqt-powermanagement
|
||||
====================
|
||||
|
||||
Power management module for LXQt
|
@ -1,71 +0,0 @@
|
||||
project(lxqt-config-powermanagement)
|
||||
|
||||
set(QTX_LIBRARIES Qt5::Widgets Qt5::DBus Qt5::Svg)
|
||||
|
||||
set(SOURCES
|
||||
main.cpp
|
||||
mainwindow.cpp
|
||||
lidwatchersettings.cpp
|
||||
batterywatchersettings.cpp
|
||||
idlenesswatchersettings.cpp
|
||||
powermanagementsettings.cpp
|
||||
helpers.cpp
|
||||
../src/iconproducer.cpp
|
||||
)
|
||||
|
||||
set(UI_FILES
|
||||
lidwatchersettings.ui
|
||||
batterywatchersettings.ui
|
||||
idlenesswatchersettings.ui
|
||||
)
|
||||
|
||||
set(ICON_FILES
|
||||
icons/laptop-lid.svg
|
||||
)
|
||||
|
||||
set(DESKTOP_FILES_IN
|
||||
lxqt-config-powermanagement.desktop.in
|
||||
)
|
||||
|
||||
# Translations **********************************
|
||||
|
||||
lxqt_translate_ts(QM_FILES
|
||||
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
|
||||
SOURCES
|
||||
${SOURCES}
|
||||
${UI_FILES}
|
||||
INSTALL_DIR
|
||||
${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
lxqt_app_translation_loader(config-powermanagement_QM_LOADER ${PROJECT_NAME})
|
||||
lxqt_translate_desktop(DESKTOP_FILES SOURCES ${DESKTOP_FILES_IN})
|
||||
|
||||
add_executable(${PROJECT_NAME}
|
||||
${SOURCES}
|
||||
${DESKTOP_FILES}
|
||||
${QM_FILES}
|
||||
${config-powermanagement_QM_LOADER}
|
||||
)
|
||||
|
||||
target_link_libraries(lxqt-config-powermanagement
|
||||
lxqt
|
||||
${QTX_LIBRARIES}
|
||||
KF5::Solid
|
||||
)
|
||||
|
||||
install(TARGETS
|
||||
${PROJECT_NAME}
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
COMPONENT Runtime
|
||||
)
|
||||
install(FILES
|
||||
${DESKTOP_FILES}
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
|
||||
COMPONENT Runtime
|
||||
)
|
||||
install(FILES
|
||||
${ICON_FILES}
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/devices"
|
||||
COMPONENT Runtime
|
||||
)
|
@ -1,111 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
#include <LXQt/Settings>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QLabel>
|
||||
#include <QGroupBox>
|
||||
#include <Solid/Battery>
|
||||
|
||||
#include "batterywatchersettings.h"
|
||||
#include "ui_batterywatchersettings.h"
|
||||
#include "powermanagementsettings.h"
|
||||
|
||||
BatteryWatcherSettings::BatteryWatcherSettings(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
mSettings(),
|
||||
mUi(new Ui::BatteryWatcherSettings),
|
||||
mChargingIconProducer(),
|
||||
mDischargingIconProducer()
|
||||
|
||||
{
|
||||
mUi->setupUi(this);
|
||||
fillComboBox(mUi->actionComboBox);
|
||||
mUi->chargeLevelSlider->setValue(53);
|
||||
mChargingIconProducer.updateState(Solid::Battery::Charging);
|
||||
mDischargingIconProducer.updateState(Solid::Battery::Discharging);
|
||||
|
||||
connect(mUi->groupBox, SIGNAL(clicked()), this, SLOT(saveSettings()));
|
||||
connect(mUi->actionComboBox, SIGNAL(activated(int)), this, SLOT(saveSettings()));
|
||||
connect(mUi->warningSpinBox, SIGNAL(editingFinished()), this, SLOT(saveSettings()));
|
||||
connect(mUi->levelSpinBox, SIGNAL(editingFinished()), this, SLOT(saveSettings()));
|
||||
connect(mUi->showIconCheckBox, SIGNAL(clicked(bool)), this, SLOT(saveSettings()));
|
||||
connect(mUi->showIconCheckBox, SIGNAL(clicked(bool)), mUi->previewBox, SLOT(setEnabled(bool)));
|
||||
connect(mUi->useThemeIconsCheckBox, SIGNAL(clicked(bool)), this, SLOT(saveSettings()));
|
||||
connect(mUi->useThemeIconsCheckBox, SIGNAL(clicked(bool)), this, SLOT(updatePreview()));
|
||||
connect(mUi->chargeLevelSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
|
||||
connect(&mChargingIconProducer, SIGNAL(iconChanged()), this, SLOT(onChargeIconChanged()));
|
||||
connect(&mDischargingIconProducer, SIGNAL(iconChanged()), this, SLOT(onDischargeIconChanged()));
|
||||
updatePreview();
|
||||
}
|
||||
|
||||
BatteryWatcherSettings::~BatteryWatcherSettings()
|
||||
{
|
||||
delete mUi;
|
||||
}
|
||||
|
||||
void BatteryWatcherSettings::loadSettings()
|
||||
{
|
||||
mUi->groupBox->setChecked(mSettings.isBatteryWatcherEnabled());
|
||||
setComboBoxToValue(mUi->actionComboBox, mSettings.getPowerLowAction());
|
||||
mUi->warningSpinBox->setValue(mSettings.getPowerLowWarningTime());
|
||||
mUi->levelSpinBox->setValue(mSettings.getPowerLowLevel());
|
||||
mUi->showIconCheckBox->setChecked(mSettings.isShowIcon());
|
||||
mUi->useThemeIconsCheckBox->setChecked(mSettings.isUseThemeIcons());
|
||||
}
|
||||
|
||||
void BatteryWatcherSettings::saveSettings()
|
||||
{
|
||||
mSettings.setBatteryWatcherEnabled(mUi->groupBox->isChecked());
|
||||
mSettings.setPowerLowAction(currentValue(mUi->actionComboBox));
|
||||
mSettings.setPowerLowWarningTime(mUi->warningSpinBox->value());
|
||||
mSettings.setPowerLowLevel(mUi->levelSpinBox->value());
|
||||
mSettings.setShowIcon(mUi->showIconCheckBox->isChecked());
|
||||
mSettings.setUseThemeIcons(mUi->useThemeIconsCheckBox->isChecked());
|
||||
}
|
||||
|
||||
void BatteryWatcherSettings::updatePreview()
|
||||
{
|
||||
mUi->previewBox->setTitle(tr("Preview") + QString(" (%1)").arg(mSettings.isUseThemeIcons() ? QIcon::themeName() : tr("built in")));
|
||||
|
||||
int chargePercent = mUi->chargeLevelSlider->value();
|
||||
mChargingIconProducer.updateChargePercent(chargePercent);
|
||||
mDischargingIconProducer.updateChargePercent(chargePercent);
|
||||
mUi->chargeLevelLabel->setText(tr("Level: %1%").arg(chargePercent));
|
||||
}
|
||||
|
||||
void BatteryWatcherSettings::onChargeIconChanged()
|
||||
{
|
||||
mUi->chargingIcon->setPixmap(mChargingIconProducer.mIcon.pixmap(mUi->chargingIcon->size()));
|
||||
mUi->chargingLabel->setText(mChargingIconProducer.mIconName);
|
||||
}
|
||||
|
||||
void BatteryWatcherSettings::onDischargeIconChanged()
|
||||
{
|
||||
mUi->dischargingIcon->setPixmap(mDischargingIconProducer.mIcon.pixmap(mUi->dischargingIcon->size()));
|
||||
mUi->dischargingLabel->setText(mDischargingIconProducer.mIconName);
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
#ifndef POWERLOWSETTINGS_H
|
||||
#define POWERLOWSETTINGS_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <LXQt/Settings>
|
||||
|
||||
#include "../config/powermanagementsettings.h"
|
||||
#include "../src/iconproducer.h"
|
||||
|
||||
#include "helpers.h"
|
||||
|
||||
namespace Ui {
|
||||
class BatteryWatcherSettings;
|
||||
}
|
||||
|
||||
class BatteryWatcherSettings : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BatteryWatcherSettings(QWidget *parent = 0);
|
||||
~BatteryWatcherSettings();
|
||||
|
||||
public slots:
|
||||
void loadSettings();
|
||||
|
||||
private slots:
|
||||
void saveSettings();
|
||||
void updatePreview();
|
||||
void onChargeIconChanged();
|
||||
void onDischargeIconChanged();
|
||||
|
||||
private:
|
||||
PowerManagementSettings mSettings;
|
||||
Ui::BatteryWatcherSettings *mUi;
|
||||
IconProducer mChargingIconProducer;
|
||||
IconProducer mDischargingIconProducer;
|
||||
};
|
||||
|
||||
#endif // POWERLOWSETTINGS_H
|
@ -1,249 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>BatteryWatcherSettings</class>
|
||||
<widget class="QWidget" name="BatteryWatcherSettings">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>428</width>
|
||||
<height>414</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Battery Watcher Settings</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>E&nable Battery Watcher</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="actionLabel">
|
||||
<property name="text">
|
||||
<string>When power is low then:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="actionComboBox"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="warningLabel">
|
||||
<property name="text">
|
||||
<string>Warning:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="warningSpinBox">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> seconds</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>500</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="levelLabel">
|
||||
<property name="text">
|
||||
<string>Level is low at:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="levelSpinBox">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> %</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="showIconLabel">
|
||||
<property name="text">
|
||||
<string>Show icon:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="showIconCheckBox">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="useThemeIconsLabel">
|
||||
<property name="text">
|
||||
<string>Use icons from theme:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QCheckBox" name="useThemeIconsCheckBox">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="previewBox">
|
||||
<property name="title">
|
||||
<string>Preview</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QSlider" name="chargeLevelSlider">
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="chargingIcon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="chargingLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Charging</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="dischargingIcon">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QLabel" name="chargeLevelLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="dischargingLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Discharging</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>15</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -1,60 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
*
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QComboBox>
|
||||
|
||||
#include <LXQt/Power>
|
||||
|
||||
#include "helpers.h"
|
||||
|
||||
void fillComboBox(QComboBox* comboBox)
|
||||
{
|
||||
comboBox->clear();
|
||||
comboBox->addItem(QObject::tr("Nothing"), -1);
|
||||
comboBox->addItem(QObject::tr("Lock screen"), -2); // FIXME
|
||||
comboBox->addItem(QObject::tr("Suspend"), LxQt::Power::PowerSuspend);
|
||||
comboBox->addItem(QObject::tr("Hibernate"), LxQt::Power::PowerHibernate);
|
||||
comboBox->addItem(QObject::tr("Shutdown"), LxQt::Power::PowerShutdown);
|
||||
}
|
||||
|
||||
void setComboBoxToValue(QComboBox* comboBox, int value)
|
||||
{
|
||||
for (int index = 0; index < comboBox->count(); index++)
|
||||
{
|
||||
if (value == comboBox->itemData(index).toInt())
|
||||
{
|
||||
comboBox->setCurrentIndex(index);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
comboBox->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
int currentValue(QComboBox *comboBox)
|
||||
{
|
||||
return comboBox->itemData(comboBox->currentIndex()).toInt();
|
||||
}
|
||||
|
@ -1,19 +0,0 @@
|
||||
/*
|
||||
* File: Settings.h
|
||||
* Author: christian
|
||||
*
|
||||
* Created on 15. februar 2014, 11:44
|
||||
*/
|
||||
#ifndef POWER_MANAGEMENT_SETTINGS_H
|
||||
#define POWER_MANAGEMENT_SETTINGS_H
|
||||
|
||||
#include <QComboBox>
|
||||
|
||||
void fillComboBox(QComboBox* comboBox);
|
||||
|
||||
void setComboBoxToValue(QComboBox* comboBox, int value);
|
||||
|
||||
int currentValue(QComboBox *comboBox);
|
||||
|
||||
#endif // POWER_MANAGEMENT_SETTINGS_H
|
||||
|
@ -1,119 +0,0 @@
|
||||
<?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://creativecommons.org/ns#"
|
||||
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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="400"
|
||||
height="250"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
sodipodi:docname="lid.svg">
|
||||
<defs
|
||||
id="defs4">
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
id="filter3831"
|
||||
x="-0.66894451"
|
||||
width="2.337889"
|
||||
y="-0.63549728"
|
||||
height="2.2709946">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="15.130887"
|
||||
id="feGaussianBlur3833" />
|
||||
</filter>
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
id="filter3835"
|
||||
x="-0.058792319"
|
||||
width="1.1175846"
|
||||
y="-0.14165475"
|
||||
height="1.2833095">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="8.3204747"
|
||||
id="feGaussianBlur3837" />
|
||||
</filter>
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
id="filter3839"
|
||||
x="-0.054746114"
|
||||
width="1.1094922"
|
||||
y="-6.9892057"
|
||||
height="14.978411">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="8.3204747"
|
||||
id="feGaussianBlur3841" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.59105127"
|
||||
inkscape:cx="-415.65465"
|
||||
inkscape:cy="283.12685"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1440"
|
||||
inkscape:window-height="849"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0" />
|
||||
<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" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-79.26997,-572.39138)">
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:18.77737617000000014;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3839)"
|
||||
d="m 114,806.07647 364.75903,2.85714"
|
||||
id="path2994"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(0.92840961,0,0,1,6.016738,0)" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:20.75679016000000132;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:none;filter:url(#filter3835)"
|
||||
d="M 107.31506,789.13315 446.97064,648.16266"
|
||||
id="path2994-7"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="matrix(0.92840961,0,0,1,6.016738,0)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.03783953000000007px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter3831)"
|
||||
id="path3793"
|
||||
sodipodi:cx="118.57143"
|
||||
sodipodi:cy="798.07648"
|
||||
sodipodi:rx="27.142857"
|
||||
sodipodi:ry="28.571428"
|
||||
d="m 145.71428,798.07648 c 0,15.77956 -12.15227,28.57143 -27.14285,28.57143 -14.99059,0 -27.14286,-12.79187 -27.14286,-28.57143 0,-15.77957 12.15227,-28.57143 27.14286,-28.57143 14.99058,0 27.14285,12.79186 27.14285,28.57143 z"
|
||||
transform="matrix(0.52079989,0,0,0.53905881,36.427947,370.56763)" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 4.0 KiB |
@ -1,117 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QDebug>
|
||||
|
||||
#include "idlenesswatchersettings.h"
|
||||
#include "ui_idlenesswatchersettings.h"
|
||||
#include "helpers.h"
|
||||
|
||||
#define MINIMUM_SECONDS 30
|
||||
|
||||
IdlenessWatcherSettings::IdlenessWatcherSettings(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
mSettings(),
|
||||
mUi(new Ui::IdlenessWatcherSettings)
|
||||
{
|
||||
mUi->setupUi(this);
|
||||
fillComboBox(mUi->idleActionComboBox);
|
||||
connect(mUi->idlenessWatcherGroupBox, SIGNAL(clicked()), SLOT(saveSettings()));
|
||||
connect(mUi->idleActionComboBox, SIGNAL(activated(int)), SLOT(saveSettings()));
|
||||
connect(mUi->idleTimeMinutesSpinBox, SIGNAL(editingFinished()), SLOT(saveSettings()));
|
||||
connect(mUi->idleTimeMinutesSpinBox, SIGNAL(valueChanged(int)), SLOT(minutesChanged(int)));
|
||||
connect(mUi->idleTimeSecondsSpinBox, SIGNAL(valueChanged(int)), SLOT(secondsChanged(int)));
|
||||
|
||||
connect(mUi->idleTimeSecondsSpinBox, SIGNAL(editingFinished()), SLOT(saveSettings()));
|
||||
}
|
||||
|
||||
IdlenessWatcherSettings::~IdlenessWatcherSettings()
|
||||
{
|
||||
delete mUi;
|
||||
}
|
||||
|
||||
void IdlenessWatcherSettings::loadSettings()
|
||||
{
|
||||
mUi->idlenessWatcherGroupBox->setChecked(mSettings.isIdlenessWatcherEnabled());
|
||||
setComboBoxToValue(mUi->idleActionComboBox, mSettings.getIdlenessAction());
|
||||
|
||||
int idlenessTimeSeconds = mSettings.getIdlenessTimeSecs();
|
||||
// if less than minimum, change to 15 minutes
|
||||
if (idlenessTimeSeconds < MINIMUM_SECONDS)
|
||||
idlenessTimeSeconds = 900;
|
||||
int idlenessTimeMinutes = idlenessTimeSeconds / 60;
|
||||
idlenessTimeSeconds = idlenessTimeSeconds % 60;
|
||||
mUi->idleTimeMinutesSpinBox->setValue(idlenessTimeMinutes);
|
||||
mUi->idleTimeSecondsSpinBox->setValue(idlenessTimeSeconds);
|
||||
}
|
||||
|
||||
void IdlenessWatcherSettings::minutesChanged(int newVal)
|
||||
{
|
||||
if (newVal < 1 && mUi->idleTimeSecondsSpinBox->value() < MINIMUM_SECONDS)
|
||||
{
|
||||
mUi->idleTimeSecondsSpinBox->setValue(MINIMUM_SECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
void IdlenessWatcherSettings::secondsChanged(int newVal)
|
||||
{
|
||||
if (newVal > 59)
|
||||
{
|
||||
mUi->idleTimeSecondsSpinBox->setValue(0);
|
||||
mUi->idleTimeMinutesSpinBox->setValue(mUi->idleTimeMinutesSpinBox->value() + 1);
|
||||
}
|
||||
else if (mUi->idleTimeMinutesSpinBox->value() < 1 && newVal < MINIMUM_SECONDS)
|
||||
{
|
||||
mUi->idleTimeMinutesSpinBox->setValue(0);
|
||||
mUi->idleTimeSecondsSpinBox->setValue(MINIMUM_SECONDS);
|
||||
}
|
||||
else if (newVal < 0)
|
||||
{
|
||||
mUi->idleTimeMinutesSpinBox->setValue(mUi->idleTimeMinutesSpinBox->value() - 1);
|
||||
mUi->idleTimeSecondsSpinBox->setValue(59);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void IdlenessWatcherSettings::saveSettings()
|
||||
{
|
||||
mSettings.setIdlenessWatcherEnabled(mUi->idlenessWatcherGroupBox->isChecked());
|
||||
mSettings.setIdlenessAction(currentValue(mUi->idleActionComboBox));
|
||||
|
||||
int idleTimeSecs = 60 * mUi->idleTimeMinutesSpinBox->value() + mUi->idleTimeSecondsSpinBox->value();
|
||||
// if less than minimum, change 15 minutes
|
||||
if (idleTimeSecs < MINIMUM_SECONDS)
|
||||
{
|
||||
idleTimeSecs = 900;
|
||||
mUi->idleTimeMinutesSpinBox->setValue(15);
|
||||
mUi->idleTimeSecondsSpinBox->setValue(0);
|
||||
}
|
||||
|
||||
mSettings.setIdlenessTimeSecs(idleTimeSecs);
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
#ifndef IDLE_SETTINGS_H
|
||||
#define IDLE_SETTINGS_H
|
||||
|
||||
#include <QGroupBox>
|
||||
#include <LXQt/Settings>
|
||||
|
||||
#include "powermanagementsettings.h"
|
||||
|
||||
namespace Ui {
|
||||
class IdlenessWatcherSettings;
|
||||
}
|
||||
|
||||
class IdlenessWatcherSettings : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit IdlenessWatcherSettings(QWidget *parent = 0);
|
||||
~IdlenessWatcherSettings();
|
||||
|
||||
public slots:
|
||||
void loadSettings();
|
||||
|
||||
private slots:
|
||||
void minutesChanged(int newVal);
|
||||
void secondsChanged(int newVal);
|
||||
void saveSettings();
|
||||
|
||||
private:
|
||||
PowerManagementSettings mSettings;
|
||||
Ui::IdlenessWatcherSettings *mUi;
|
||||
};
|
||||
|
||||
#endif // IDLE_SETTINGS_H
|
@ -1,103 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>IdlenessWatcherSettings</class>
|
||||
<widget class="QWidget" name="IdlenessWatcherSettings">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>309</width>
|
||||
<height>177</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="idlenessWatcherGroupBox">
|
||||
<property name="title">
|
||||
<string>Enab&le Idleness Watcher</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="idleTimeLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>When idle then:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="idleActionComboBox"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="idleActionLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Idle time:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="idleTimeMinutesSpinBox">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> minutes</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="idleTimeSecondsSpinBox">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> seconds</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>60</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -1,83 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QDebug>
|
||||
|
||||
#include "lidwatchersettings.h"
|
||||
#include "ui_lidwatchersettings.h"
|
||||
#include "helpers.h"
|
||||
|
||||
LidWatcherSettings::LidWatcherSettings(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
mSettings(),
|
||||
mUi(new Ui::LidWatcherSettings)
|
||||
{
|
||||
mUi->setupUi(this);
|
||||
|
||||
fillComboBox(mUi->onBatteryActionComboBox);
|
||||
fillComboBox(mUi->onAcActionComboBox);
|
||||
fillComboBox(mUi->extMonOnBatteryActionComboBox);
|
||||
fillComboBox(mUi->extMonOnAcActionComboBox);
|
||||
|
||||
connect(mUi->lidWatcherSettingsGroupBox, SIGNAL(clicked()), this, SLOT(saveSettings()));
|
||||
connect(mUi->onBatteryActionComboBox, SIGNAL(activated(int)), this, SLOT(saveSettings()));
|
||||
connect(mUi->onAcActionComboBox, SIGNAL(activated(int)), this, SLOT(saveSettings()));
|
||||
connect(mUi->extMonOnBatteryActionComboBox, SIGNAL(activated(int)), this, SLOT(saveSettings()));
|
||||
connect(mUi->extMonOnAcActionComboBox, SIGNAL(activated(int)), this, SLOT(saveSettings()));
|
||||
connect(mUi->extMonGroupBox, SIGNAL(clicked()), this, SLOT(saveSettings()));
|
||||
}
|
||||
|
||||
LidWatcherSettings::~LidWatcherSettings()
|
||||
{
|
||||
delete mUi;
|
||||
}
|
||||
|
||||
void LidWatcherSettings::loadSettings()
|
||||
{
|
||||
mUi->lidWatcherSettingsGroupBox->setChecked(mSettings.isLidWatcherEnabled());
|
||||
|
||||
setComboBoxToValue(mUi->onBatteryActionComboBox, mSettings.getLidClosedAction());
|
||||
setComboBoxToValue(mUi->onAcActionComboBox, mSettings.getLidClosedAcAction());
|
||||
|
||||
mUi->extMonGroupBox->setChecked(mSettings.isEnableExtMonLidClosedActions());
|
||||
setComboBoxToValue(mUi->extMonOnBatteryActionComboBox, mSettings.getLidClosedExtMonAction());
|
||||
setComboBoxToValue(mUi->extMonOnAcActionComboBox, mSettings.getLidClosedExtMonAcAction());
|
||||
|
||||
}
|
||||
|
||||
void LidWatcherSettings::saveSettings()
|
||||
{
|
||||
mSettings.setLidWatcherEnabled(mUi->lidWatcherSettingsGroupBox->isChecked());
|
||||
|
||||
mSettings.setLidClosedAction(currentValue(mUi->onBatteryActionComboBox));
|
||||
mSettings.setLidClosedAcAction(currentValue(mUi->onAcActionComboBox));
|
||||
|
||||
mSettings.setEnableExtMonLidClosedActions(mUi->extMonGroupBox->isChecked());
|
||||
mSettings.setLidClosedExtMonAction(currentValue(mUi->extMonOnBatteryActionComboBox));
|
||||
mSettings.setLidClosedExtMonAcAction(currentValue(mUi->extMonOnAcActionComboBox));
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
#ifndef LIDSETTINGS_H
|
||||
#define LIDSETTINGS_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <LXQt/Settings>
|
||||
|
||||
#include "powermanagementsettings.h"
|
||||
|
||||
namespace Ui {
|
||||
class LidWatcherSettings;
|
||||
}
|
||||
|
||||
class LidWatcherSettings : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit LidWatcherSettings(QWidget *parent = 0);
|
||||
~LidWatcherSettings();
|
||||
|
||||
public slots:
|
||||
void loadSettings();
|
||||
|
||||
private slots:
|
||||
void saveSettings();
|
||||
|
||||
private:
|
||||
PowerManagementSettings mSettings;
|
||||
Ui::LidWatcherSettings *mUi;
|
||||
};
|
||||
|
||||
#endif // LIDSETTINGS_H
|
@ -1,152 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>LidWatcherSettings</class>
|
||||
<widget class="QWidget" name="LidWatcherSettings">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>276</width>
|
||||
<height>289</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QGroupBox QGroupBox {
|
||||
border: none;
|
||||
padding-top: 30px;
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="lidWatcherSettingsGroupBox">
|
||||
<property name="title">
|
||||
<string>Enable &Lid Watcher</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Action when lid is closed</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="onBatteryActionLabel">
|
||||
<property name="text">
|
||||
<string>On Battery</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="onBatteryActionComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Nothing</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Suspend</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Hibernate</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Shut down</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="onAcActionLabel">
|
||||
<property name="text">
|
||||
<string>On AC</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="onAcActionComboBox"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="extMonGroupBox">
|
||||
<property name="title">
|
||||
<string>When &using external monitor</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="extMonOnBatteryActionLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>On Battery</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="extMonOnBatteryActionComboBox"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="extMonOnAcActionLabel">
|
||||
<property name="text">
|
||||
<string>On Ac</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="extMonOnAcActionComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -1,10 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Power Management
|
||||
GenericName=Power Management Settings
|
||||
Exec=lxqt-config-powermanagement
|
||||
Icon=preferences-system-power-management
|
||||
Categories=Settings;DesktopSettings;Qt;LXQt;
|
||||
OnlyShowIn=LXQt;LXDE;
|
||||
|
||||
#TRANSLATIONS_DIR=translations
|
@ -1,42 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <LXQt/SingleApplication>
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
LxQt::SingleApplication a(argc, argv);
|
||||
|
||||
MainWindow mainWindow;
|
||||
mainWindow.setWindowIcon(QIcon::fromTheme("preferences-system-power-management"));
|
||||
mainWindow.show();
|
||||
a.setActivationWindow(&mainWindow);
|
||||
|
||||
return a.exec();
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "lidwatchersettings.h"
|
||||
#include "batterywatchersettings.h"
|
||||
#include "idlenesswatchersettings.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
LxQt::ConfigDialog(tr("Power Management Settings"), new PowerManagementSettings(parent))
|
||||
{
|
||||
BatteryWatcherSettings* batteryWatcherSettings = new BatteryWatcherSettings(this);
|
||||
addPage(batteryWatcherSettings, tr("Battery"), "battery");
|
||||
connect(this, SIGNAL(reset()), batteryWatcherSettings, SLOT(loadSettings()));
|
||||
|
||||
LidWatcherSettings *lidwatcherSettings = new LidWatcherSettings(this);
|
||||
addPage(lidwatcherSettings, tr("Lid"), "laptop-lid");
|
||||
connect(this, SIGNAL(reset()), lidwatcherSettings, SLOT(loadSettings()));
|
||||
|
||||
IdlenessWatcherSettings* idlenessWatcherSettings = new IdlenessWatcherSettings(this);
|
||||
addPage(idlenessWatcherSettings, tr("Idle"), (QStringList() << "user-idle" << "user-away"));
|
||||
connect(this, SIGNAL(reset()), idlenessWatcherSettings, SLOT(loadSettings()));
|
||||
|
||||
emit reset();
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <LXQt/ConfigDialog>
|
||||
|
||||
class MainWindow : public LxQt::ConfigDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow(QWidget *parent = 0);
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
@ -1,225 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
*
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include <LXQt/Power>
|
||||
|
||||
#include "powermanagementsettings.h"
|
||||
|
||||
namespace PowerManagementSettingsConstants
|
||||
{
|
||||
const QString RUN_CHECK_LEVEL = "runCheckLevel";
|
||||
const QString ENABLE_BATTERY_WATCHER_KEY = "enableBatteryWatcher";
|
||||
const QString ENABLE_LID_WATCHER_KEY = "enableLidWatcher";
|
||||
const QString ENABLE_IDLENESS_WATCHER_KEY = "enableIdlenessWatcher";
|
||||
const QString LID_CLOSED_ACTION_KEY = "lidClosedAction";
|
||||
const QString LID_CLOSED_AC_ACTION_KEY = "lidClosedAcAction";
|
||||
const QString LID_CLOSED_EXT_MON_ACTION_KEY = "lidClosedExtMonAction";
|
||||
const QString LID_CLOSED_EXT_MON_AC_ACTION_KEY = "lidClosedExtMonAcAction";
|
||||
const QString ENABLE_EXT_MON_LIDCLOSED_ACTIONS_KEY = "enableExtMonLidClosedActions";
|
||||
const QString POWER_LOW_ACTION_KEY = "powerLowAction";
|
||||
const QString POWER_LOW_WARNING_KEY = "powerLowWarning";
|
||||
const QString POWER_LOW_LEVEL_KEY = "powerLowLevel";
|
||||
const QString SHOW_ICON_KEY = "showIcon";
|
||||
const QString USE_THEME_ICONS_KEY = "useThemeIcons";
|
||||
const QString IDLENESS_ACTION_KEY = "idlenessAction";
|
||||
const QString IDLENESS_TIME_SECS_KEY = "idlenessTimeSecs";
|
||||
}
|
||||
|
||||
using namespace PowerManagementSettingsConstants;
|
||||
|
||||
PowerManagementSettings::PowerManagementSettings(QObject* parent) : LxQt::Settings("lxqt-powermanagement")
|
||||
{
|
||||
}
|
||||
|
||||
PowerManagementSettings::~PowerManagementSettings()
|
||||
{
|
||||
}
|
||||
|
||||
int PowerManagementSettings::getRunCheckLevel()
|
||||
{
|
||||
return value(RUN_CHECK_LEVEL, 0).toInt();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setRunCheckLevel(int newLevel)
|
||||
{
|
||||
setValue(RUN_CHECK_LEVEL, newLevel);
|
||||
}
|
||||
|
||||
bool PowerManagementSettings::isBatteryWatcherEnabled()
|
||||
{
|
||||
return value(ENABLE_BATTERY_WATCHER_KEY, true).toBool();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setBatteryWatcherEnabled(bool batteryWatcherEnabled)
|
||||
{
|
||||
setValue(ENABLE_BATTERY_WATCHER_KEY, batteryWatcherEnabled);
|
||||
}
|
||||
|
||||
int PowerManagementSettings::getPowerLowAction()
|
||||
{
|
||||
return value(POWER_LOW_ACTION_KEY, 0).toInt();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setPowerLowAction(int powerLowAction)
|
||||
{
|
||||
setValue(POWER_LOW_ACTION_KEY, powerLowAction);
|
||||
}
|
||||
|
||||
int PowerManagementSettings::getPowerLowLevel()
|
||||
{
|
||||
return value(POWER_LOW_LEVEL_KEY, 5).toInt();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setPowerLowLevel(int powerLowLevel)
|
||||
{
|
||||
setValue(POWER_LOW_LEVEL_KEY, powerLowLevel);
|
||||
}
|
||||
|
||||
int PowerManagementSettings::getPowerLowWarningTime()
|
||||
{
|
||||
return value(POWER_LOW_WARNING_KEY, 30).toInt();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setPowerLowWarningTime(int powerLowWarningTime)
|
||||
{
|
||||
setValue(POWER_LOW_WARNING_KEY, powerLowWarningTime);
|
||||
}
|
||||
|
||||
bool PowerManagementSettings::isShowIcon()
|
||||
{
|
||||
return value(SHOW_ICON_KEY, true).toBool();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setShowIcon(bool showIcon)
|
||||
{
|
||||
setValue(SHOW_ICON_KEY, showIcon);
|
||||
}
|
||||
|
||||
bool PowerManagementSettings::isUseThemeIcons()
|
||||
{
|
||||
return value(USE_THEME_ICONS_KEY, false).toBool();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setUseThemeIcons(bool useThemeIcons)
|
||||
{
|
||||
setValue(USE_THEME_ICONS_KEY, useThemeIcons);
|
||||
}
|
||||
|
||||
bool PowerManagementSettings::isLidWatcherEnabled()
|
||||
{
|
||||
return value(ENABLE_LID_WATCHER_KEY, true).toBool();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setLidWatcherEnabled(bool lidWatcherEnabled)
|
||||
{
|
||||
setValue(ENABLE_LID_WATCHER_KEY, lidWatcherEnabled);
|
||||
}
|
||||
|
||||
int PowerManagementSettings::getLidClosedAcAction()
|
||||
{
|
||||
return value(LID_CLOSED_AC_ACTION_KEY, 0).toInt();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setLidClosedAcAction(int lidClosedAcAction)
|
||||
{
|
||||
setValue(LID_CLOSED_AC_ACTION_KEY, lidClosedAcAction);
|
||||
}
|
||||
|
||||
int PowerManagementSettings::getLidClosedAction()
|
||||
{
|
||||
return value(LID_CLOSED_ACTION_KEY, 0).toInt();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setLidClosedAction(int lidClosedAction)
|
||||
{
|
||||
setValue(LID_CLOSED_ACTION_KEY, lidClosedAction);
|
||||
}
|
||||
|
||||
int PowerManagementSettings::getLidClosedExtMonAcAction()
|
||||
{
|
||||
return value(LID_CLOSED_EXT_MON_AC_ACTION_KEY, 0).toInt();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setLidClosedExtMonAcAction(int lidClosedExtMonAcAction)
|
||||
{
|
||||
setValue(LID_CLOSED_EXT_MON_AC_ACTION_KEY, lidClosedExtMonAcAction);
|
||||
}
|
||||
|
||||
int PowerManagementSettings::getLidClosedExtMonAction()
|
||||
{
|
||||
return value(LID_CLOSED_EXT_MON_ACTION_KEY, 0).toInt();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setLidClosedExtMonAction(int lidClosedExtMonAction)
|
||||
{
|
||||
setValue(LID_CLOSED_EXT_MON_ACTION_KEY, lidClosedExtMonAction);
|
||||
}
|
||||
|
||||
bool PowerManagementSettings::isEnableExtMonLidClosedActions()
|
||||
{
|
||||
return value(ENABLE_EXT_MON_LIDCLOSED_ACTIONS_KEY, 0).toBool();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setEnableExtMonLidClosedActions(bool enableExtMonLidClosedActions)
|
||||
{
|
||||
setValue(ENABLE_EXT_MON_LIDCLOSED_ACTIONS_KEY, enableExtMonLidClosedActions);
|
||||
}
|
||||
|
||||
int PowerManagementSettings::getIdlenessAction()
|
||||
{
|
||||
// default to nothing (-1)
|
||||
return value(IDLENESS_ACTION_KEY, -1).toInt();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setIdlenessAction(int idlenessAction)
|
||||
{
|
||||
setValue(IDLENESS_ACTION_KEY, idlenessAction);
|
||||
}
|
||||
|
||||
int PowerManagementSettings::getIdlenessTimeSecs()
|
||||
{
|
||||
// default to 15 minutes
|
||||
return value(IDLENESS_TIME_SECS_KEY, 900).toInt();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setIdlenessTimeSecs(int idlenessTimeSecs)
|
||||
{
|
||||
setValue(IDLENESS_TIME_SECS_KEY, idlenessTimeSecs);
|
||||
}
|
||||
|
||||
|
||||
bool PowerManagementSettings::isIdlenessWatcherEnabled()
|
||||
{
|
||||
return value(ENABLE_IDLENESS_WATCHER_KEY, false).toBool();
|
||||
}
|
||||
|
||||
void PowerManagementSettings::setIdlenessWatcherEnabled(bool idlenessWatcherEnabled)
|
||||
{
|
||||
setValue(ENABLE_IDLENESS_WATCHER_KEY, idlenessWatcherEnabled);
|
||||
}
|
||||
|
||||
|
@ -1,95 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QString>
|
||||
|
||||
#include <LXQt/Settings>
|
||||
|
||||
class PowerManagementSettings : public LxQt::Settings
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PowerManagementSettings(QObject* parent = 0);
|
||||
~PowerManagementSettings();
|
||||
|
||||
int getRunCheckLevel();
|
||||
void setRunCheckLevel(int newLevel);
|
||||
|
||||
bool isBatteryWatcherEnabled();
|
||||
void setBatteryWatcherEnabled(bool batteryWatcherEnabled);
|
||||
|
||||
int getPowerLowAction();
|
||||
void setPowerLowAction(int powerLowAction);
|
||||
|
||||
int getPowerLowLevel();
|
||||
void setPowerLowLevel(int powerLowLevel);
|
||||
|
||||
int getPowerLowWarningTime();
|
||||
void setPowerLowWarningTime(int powerLowWarningTime);
|
||||
|
||||
bool isShowIcon();
|
||||
void setShowIcon(bool showIcon);
|
||||
|
||||
bool isUseThemeIcons();
|
||||
void setUseThemeIcons(bool useThemeIcons);
|
||||
|
||||
|
||||
bool isLidWatcherEnabled();
|
||||
void setLidWatcherEnabled(bool lidWatcherEnabled);
|
||||
|
||||
int getLidClosedAcAction();
|
||||
void setLidClosedAcAction(int lidClosedAcAction);
|
||||
|
||||
int getLidClosedAction();
|
||||
void setLidClosedAction(int lidClosedAction);
|
||||
|
||||
int getLidClosedExtMonAcAction();
|
||||
void setLidClosedExtMonAcAction(int lidClosedExtMonAcAction);
|
||||
|
||||
int getLidClosedExtMonAction();
|
||||
void setLidClosedExtMonAction(int lidClosedExtMonAction);
|
||||
|
||||
bool isEnableExtMonLidClosedActions();
|
||||
void setEnableExtMonLidClosedActions(bool enableExtMonLidClosedActions);
|
||||
|
||||
int getIdlenessAction();
|
||||
void setIdlenessAction(int idlenessAction);
|
||||
|
||||
int getIdlenessTimeSecs();
|
||||
void setIdlenessTimeSecs(int idlenessTimeSecs);
|
||||
|
||||
bool isIdlenessWatcherEnabled();
|
||||
void setIdlenessWatcherEnabled(bool idlenessWatcherEnabled);
|
||||
};
|
||||
|
||||
|
||||
#endif // COMMON_H
|
@ -1,195 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>BatteryWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="14"/>
|
||||
<source>Battery Watcher Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="37"/>
|
||||
<source>E&nable Battery Watcher</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="55"/>
|
||||
<source>Warning:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="68"/>
|
||||
<source> seconds</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="78"/>
|
||||
<source>Level is low at:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="91"/>
|
||||
<source> %</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="98"/>
|
||||
<source>Use icons from theme:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="112"/>
|
||||
<source>When power is low then:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="129"/>
|
||||
<source>Show icon:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IdlenessWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="26"/>
|
||||
<source>Enab&le Idleness Watcher</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="47"/>
|
||||
<source>When idle then:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="66"/>
|
||||
<source>Idle time:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="79"/>
|
||||
<source> minutes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="92"/>
|
||||
<source> seconds</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LidWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="26"/>
|
||||
<source>Enable &Lid Watcher</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="45"/>
|
||||
<source>Action when lid is closed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="57"/>
|
||||
<location filename="../lidwatchersettings.ui" line="160"/>
|
||||
<source>On Battery</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="77"/>
|
||||
<source>Nothing</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="82"/>
|
||||
<source>Suspend</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="87"/>
|
||||
<source>Hibernate</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="92"/>
|
||||
<source>Shut down</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="100"/>
|
||||
<source>On AC</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="139"/>
|
||||
<source>When &using external monitor</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="177"/>
|
||||
<source>On Ac</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="34"/>
|
||||
<source>LXQt Powermanagement Configuration</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="37"/>
|
||||
<source>Battery</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="41"/>
|
||||
<source>Lid</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="45"/>
|
||||
<source>idle</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="35"/>
|
||||
<source>Nothing</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="36"/>
|
||||
<source>Lock screen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="37"/>
|
||||
<source>Suspend</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="38"/>
|
||||
<source>Hibernate</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="39"/>
|
||||
<source>Shutdown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,3 +0,0 @@
|
||||
# Translations
|
||||
GenericName[hu]=LXQt energiakezelés beállítása
|
||||
Name[hu]=Energiakezelés
|
@ -1,195 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="hu_HU">
|
||||
<context>
|
||||
<name>BatteryWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="14"/>
|
||||
<source>Battery Watcher Settings</source>
|
||||
<translation>Akkumulátor figyelő beállítás</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="37"/>
|
||||
<source>E&nable Battery Watcher</source>
|
||||
<translation>Akkumulátor figyelő e&ngedélyezése</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="55"/>
|
||||
<source>Warning:</source>
|
||||
<translation>Figyelmeztetés:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="68"/>
|
||||
<source> seconds</source>
|
||||
<translation> másodperc</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="78"/>
|
||||
<source>Level is low at:</source>
|
||||
<translation>Alacsony energiaszint:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="91"/>
|
||||
<source> %</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="98"/>
|
||||
<source>Use icons from theme:</source>
|
||||
<translation>Ikonok a témából:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="112"/>
|
||||
<source>When power is low then:</source>
|
||||
<translation>Alacsony energiánál:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="129"/>
|
||||
<source>Show icon:</source>
|
||||
<translation>Ikon mutatás:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IdlenessWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation>Űrlap</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="26"/>
|
||||
<source>Enab&le Idleness Watcher</source>
|
||||
<translation>Tétle&nségi felügyelet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="47"/>
|
||||
<source>When idle then:</source>
|
||||
<translation>Tétlenség esetén:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="66"/>
|
||||
<source>Idle time:</source>
|
||||
<translation>Tétlenségi idő:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="79"/>
|
||||
<source> minutes</source>
|
||||
<translation> perc</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="92"/>
|
||||
<source> seconds</source>
|
||||
<translation> másodperc</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LidWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation>Űrlap</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="26"/>
|
||||
<source>Enable &Lid Watcher</source>
|
||||
<translation>Fedélfelügyelet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="45"/>
|
||||
<source>Action when lid is closed</source>
|
||||
<translation>Teendő fedélzáráskor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="57"/>
|
||||
<location filename="../lidwatchersettings.ui" line="160"/>
|
||||
<source>On Battery</source>
|
||||
<translation>Akkumulátor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="77"/>
|
||||
<source>Nothing</source>
|
||||
<translation>Semmi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="82"/>
|
||||
<source>Suspend</source>
|
||||
<translation>Készenlét</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="87"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>Alvás</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="92"/>
|
||||
<source>Shut down</source>
|
||||
<translation>Kikapcsolás</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="100"/>
|
||||
<source>On AC</source>
|
||||
<translation>Külső táp</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="139"/>
|
||||
<source>When &using external monitor</source>
|
||||
<translation>&Külső monitor használatakor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="177"/>
|
||||
<source>On Ac</source>
|
||||
<translation>Külső táp</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="34"/>
|
||||
<source>LXQt Powermanagement Configuration</source>
|
||||
<translation>LXQt energiafelügyelet beállítás</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="37"/>
|
||||
<source>Battery</source>
|
||||
<translation>Akkumulátor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="41"/>
|
||||
<source>Lid</source>
|
||||
<translation>Fedél</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="45"/>
|
||||
<source>idle</source>
|
||||
<translation>Tétlenség</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="35"/>
|
||||
<source>Nothing</source>
|
||||
<translation>Semmi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="36"/>
|
||||
<source>Lock screen</source>
|
||||
<translation>Képernyőzár</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="37"/>
|
||||
<source>Suspend</source>
|
||||
<translation>Készenlét</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="38"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>Alvás</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="39"/>
|
||||
<source>Shutdown</source>
|
||||
<translation>Kikapcsolás</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,2 +0,0 @@
|
||||
Name[it]=Gestore energia
|
||||
GenericName[it]=Impostazioni del risparmio energetico
|
@ -1,195 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="it" sourcelanguage="it">
|
||||
<context>
|
||||
<name>BatteryWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="14"/>
|
||||
<source>Battery Watcher Settings</source>
|
||||
<translation>Impostazioni monitor batteria</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="37"/>
|
||||
<source>E&nable Battery Watcher</source>
|
||||
<translation>&Attiva il monitor della batteria</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="55"/>
|
||||
<source>Warning:</source>
|
||||
<translation>Tempo di attesa:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="68"/>
|
||||
<source> seconds</source>
|
||||
<translation> secondi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="78"/>
|
||||
<source>Level is low at:</source>
|
||||
<translation>Livello basso :</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="91"/>
|
||||
<source> %</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="98"/>
|
||||
<source>Use icons from theme:</source>
|
||||
<translation>Usa icone del tema:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="112"/>
|
||||
<source>When power is low then:</source>
|
||||
<translation>Quando il livello è basso:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="129"/>
|
||||
<source>Show icon:</source>
|
||||
<translation>Mostra icona:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IdlenessWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="26"/>
|
||||
<source>Enab&le Idleness Watcher</source>
|
||||
<translation>&Attiva monitor attività sistema</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="47"/>
|
||||
<source>When idle then:</source>
|
||||
<translation>Quando inattivo:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="66"/>
|
||||
<source>Idle time:</source>
|
||||
<translation>Tempo di inattività:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="79"/>
|
||||
<source> minutes</source>
|
||||
<translation> minuti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="92"/>
|
||||
<source> seconds</source>
|
||||
<translation> secondi</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LidWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="26"/>
|
||||
<source>Enable &Lid Watcher</source>
|
||||
<translation>&Attiva monitor coperchio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="45"/>
|
||||
<source>Action when lid is closed</source>
|
||||
<translation>Azione a chiusura</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="57"/>
|
||||
<location filename="../lidwatchersettings.ui" line="160"/>
|
||||
<source>On Battery</source>
|
||||
<translation>Alimentazione a batteria</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="77"/>
|
||||
<source>Nothing</source>
|
||||
<translation>Niente</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="82"/>
|
||||
<source>Suspend</source>
|
||||
<translation>Sospendi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="87"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>Iberna</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="92"/>
|
||||
<source>Shut down</source>
|
||||
<translation>Spegni</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="100"/>
|
||||
<source>On AC</source>
|
||||
<translation>Alimentazione di rete</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="139"/>
|
||||
<source>When &using external monitor</source>
|
||||
<translation>Quando è in uso un monitor &esterno</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="177"/>
|
||||
<source>On Ac</source>
|
||||
<translation>Alimentazione di rete</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="34"/>
|
||||
<source>LXQt Powermanagement Configuration</source>
|
||||
<translation>Configurazione gestione energetica di LXQt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="37"/>
|
||||
<source>Battery</source>
|
||||
<translation>Batteria</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="41"/>
|
||||
<source>Lid</source>
|
||||
<translation>Coperchio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="45"/>
|
||||
<source>idle</source>
|
||||
<translation>Inattività</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="35"/>
|
||||
<source>Nothing</source>
|
||||
<translation>Nessuna azione</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="36"/>
|
||||
<source>Lock screen</source>
|
||||
<translation>Blocca schermo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="37"/>
|
||||
<source>Suspend</source>
|
||||
<translation>Sospendi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="38"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>Iberna</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="39"/>
|
||||
<source>Shutdown</source>
|
||||
<translation>Spegni</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,5 +0,0 @@
|
||||
# Translations
|
||||
GenericName[ja]=電源管理の設定
|
||||
Name[ja]=電源管理
|
||||
|
||||
#TRANSLATIONS_DIR=translations
|
@ -1,195 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ja">
|
||||
<context>
|
||||
<name>BatteryWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="14"/>
|
||||
<source>Battery Watcher Settings</source>
|
||||
<translation>バッテリーの監視設定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="37"/>
|
||||
<source>E&nable Battery Watcher</source>
|
||||
<translation>バッテリー監視を有効にする(&N)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="55"/>
|
||||
<source>Warning:</source>
|
||||
<translation>警告:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="68"/>
|
||||
<source> seconds</source>
|
||||
<translation> 秒</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="78"/>
|
||||
<source>Level is low at:</source>
|
||||
<translation>低いと判断するレベル:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="91"/>
|
||||
<source> %</source>
|
||||
<translation> %</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="98"/>
|
||||
<source>Use icons from theme:</source>
|
||||
<translation>テーマのアイコンを用いる:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="112"/>
|
||||
<source>When power is low then:</source>
|
||||
<translation>電源が低いときには:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="129"/>
|
||||
<source>Show icon:</source>
|
||||
<translation>アイコンを表示:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IdlenessWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation>フォーム</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="26"/>
|
||||
<source>Enab&le Idleness Watcher</source>
|
||||
<translation>アイドル状態の監視</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="47"/>
|
||||
<source>When idle then:</source>
|
||||
<translation>アイドル時には:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="66"/>
|
||||
<source>Idle time:</source>
|
||||
<translation>アイドル状態の時間</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="79"/>
|
||||
<source> minutes</source>
|
||||
<translation> 分</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="92"/>
|
||||
<source> seconds</source>
|
||||
<translation> 秒</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LidWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation>フォーム</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="26"/>
|
||||
<source>Enable &Lid Watcher</source>
|
||||
<translation>フタの監視を有効にする</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="45"/>
|
||||
<source>Action when lid is closed</source>
|
||||
<translation>フタが閉じていたときの動作</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="57"/>
|
||||
<location filename="../lidwatchersettings.ui" line="160"/>
|
||||
<source>On Battery</source>
|
||||
<translation>バッテリー動作時</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="77"/>
|
||||
<source>Nothing</source>
|
||||
<translation>何もしない</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="82"/>
|
||||
<source>Suspend</source>
|
||||
<translation>サスペンド</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="87"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>ハイバネート</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="92"/>
|
||||
<source>Shut down</source>
|
||||
<translation>シャットダウン</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="100"/>
|
||||
<source>On AC</source>
|
||||
<translation>AC電源時</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="139"/>
|
||||
<source>When &using external monitor</source>
|
||||
<translation>外部モニター使用時</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="177"/>
|
||||
<source>On Ac</source>
|
||||
<translation>AC電源時</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="34"/>
|
||||
<source>LXQt Powermanagement Configuration</source>
|
||||
<translation>LXQt電源管理の設定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="37"/>
|
||||
<source>Battery</source>
|
||||
<translation>バッテリー</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="41"/>
|
||||
<source>Lid</source>
|
||||
<translation>フタ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="45"/>
|
||||
<source>idle</source>
|
||||
<translation>アイドル</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="35"/>
|
||||
<source>Nothing</source>
|
||||
<translation>何もしない</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="36"/>
|
||||
<source>Lock screen</source>
|
||||
<translation>スクリーンをロック</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="37"/>
|
||||
<source>Suspend</source>
|
||||
<translation>サスペンド</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="38"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>ハイバネート</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="39"/>
|
||||
<source>Shutdown</source>
|
||||
<translation>シャットダウン</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,2 +0,0 @@
|
||||
Name[pl_PL]=Zarządzanie energią
|
||||
GenericName[pl_PL]=Konfiguracja zarządzania energią
|
@ -1,195 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="pl_PL">
|
||||
<context>
|
||||
<name>BatteryWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="14"/>
|
||||
<source>Battery Watcher Settings</source>
|
||||
<translation>Ustawienia monitorowania baterii</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="37"/>
|
||||
<source>E&nable Battery Watcher</source>
|
||||
<translation>W&łącz monitorowanie baterii</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="55"/>
|
||||
<source>Warning:</source>
|
||||
<translation>Ostrzeżenie:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="68"/>
|
||||
<source> seconds</source>
|
||||
<translation> sek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="78"/>
|
||||
<source>Level is low at:</source>
|
||||
<translation>Poziom niski od:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="91"/>
|
||||
<source> %</source>
|
||||
<translation> %</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="98"/>
|
||||
<source>Use icons from theme:</source>
|
||||
<translation>Użyj ikon z motywu:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="112"/>
|
||||
<source>When power is low then:</source>
|
||||
<translation>Gdy poziom jest niski:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="129"/>
|
||||
<source>Show icon:</source>
|
||||
<translation>Pokaż ikonę:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IdlenessWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation>Form</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="26"/>
|
||||
<source>Enab&le Idleness Watcher</source>
|
||||
<translation>W&łącz monitorowanie bezczynności</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="47"/>
|
||||
<source>When idle then:</source>
|
||||
<translation>Gdy bezczynny:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="66"/>
|
||||
<source>Idle time:</source>
|
||||
<translation>Czas bezczynności:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="79"/>
|
||||
<source> minutes</source>
|
||||
<translation>min</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="92"/>
|
||||
<source> seconds</source>
|
||||
<translation>sek</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LidWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation>Form</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="26"/>
|
||||
<source>Enable &Lid Watcher</source>
|
||||
<translation>W&łącz monitorowanie pokrywy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="45"/>
|
||||
<source>Action when lid is closed</source>
|
||||
<translation>Reakcja na zamknięcie pokrywy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="57"/>
|
||||
<location filename="../lidwatchersettings.ui" line="160"/>
|
||||
<source>On Battery</source>
|
||||
<translation>Na baterii</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="77"/>
|
||||
<source>Nothing</source>
|
||||
<translation>Brak</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="82"/>
|
||||
<source>Suspend</source>
|
||||
<translation>Wstrzymaj</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="87"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>Hibernuj</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="92"/>
|
||||
<source>Shut down</source>
|
||||
<translation>Wyłącz</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="100"/>
|
||||
<source>On AC</source>
|
||||
<translation>Na zasilaniu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="139"/>
|
||||
<source>When &using external monitor</source>
|
||||
<translation>Przy używaniu &zewnętrznego monitora</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="177"/>
|
||||
<source>On Ac</source>
|
||||
<translation>Na zasilaniu</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="34"/>
|
||||
<source>LXQt Powermanagement Configuration</source>
|
||||
<translation>LXQt Konfiguracja zarządzania energią</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="37"/>
|
||||
<source>Battery</source>
|
||||
<translation>Bateria</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="41"/>
|
||||
<source>Lid</source>
|
||||
<translation>Pokrywa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="45"/>
|
||||
<source>idle</source>
|
||||
<translation>Bezczynność</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="35"/>
|
||||
<source>Nothing</source>
|
||||
<translation>Brak reakcji</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="36"/>
|
||||
<source>Lock screen</source>
|
||||
<translation>Zablokuj ekran</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="37"/>
|
||||
<source>Suspend</source>
|
||||
<translation>Wstrzymaj</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="38"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>Hibernuj</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="39"/>
|
||||
<source>Shutdown</source>
|
||||
<translation>Wyłącz</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,2 +0,0 @@
|
||||
Name[pt]=Gestão de energia
|
||||
GenericName[pt]=Definições do gestor de energia
|
@ -1,195 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="pt">
|
||||
<context>
|
||||
<name>BatteryWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="14"/>
|
||||
<source>Battery Watcher Settings</source>
|
||||
<translation>Definições do monitorizador de energia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="37"/>
|
||||
<source>E&nable Battery Watcher</source>
|
||||
<translation>&Ativar monitorizador de energia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="55"/>
|
||||
<source>Warning:</source>
|
||||
<translation>Aviso:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="68"/>
|
||||
<source> seconds</source>
|
||||
<translation> segundos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="78"/>
|
||||
<source>Level is low at:</source>
|
||||
<translation>O nível está baixo em:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="91"/>
|
||||
<source> %</source>
|
||||
<translation> %</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="98"/>
|
||||
<source>Use icons from theme:</source>
|
||||
<translation>Utilizar ícones do tema:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="112"/>
|
||||
<source>When power is low then:</source>
|
||||
<translation>Se a energia estiver baixa:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="129"/>
|
||||
<source>Show icon:</source>
|
||||
<translation>Mostrar ícone:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IdlenessWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation>Formulário</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="26"/>
|
||||
<source>Enab&le Idleness Watcher</source>
|
||||
<translation>Ativar monitori&zador de inatividade</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="47"/>
|
||||
<source>When idle then:</source>
|
||||
<translation>Se existir inatividade:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="66"/>
|
||||
<source>Idle time:</source>
|
||||
<translation>Tempo para inatividade:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="79"/>
|
||||
<source> minutes</source>
|
||||
<translation> minutos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="92"/>
|
||||
<source> seconds</source>
|
||||
<translation> segundos</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LidWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation>Formulário</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="26"/>
|
||||
<source>Enable &Lid Watcher</source>
|
||||
<translation>Ativar monitori&zador da tampa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="45"/>
|
||||
<source>Action when lid is closed</source>
|
||||
<translation>Ação ao fechar a tampa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="57"/>
|
||||
<location filename="../lidwatchersettings.ui" line="160"/>
|
||||
<source>On Battery</source>
|
||||
<translation>Com bateria</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="77"/>
|
||||
<source>Nothing</source>
|
||||
<translation>Nada fazer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="82"/>
|
||||
<source>Suspend</source>
|
||||
<translation>Suspender</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="87"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>Hibernar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="92"/>
|
||||
<source>Shut down</source>
|
||||
<translation>Desligar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="100"/>
|
||||
<source>On AC</source>
|
||||
<translation>Com corrente</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="139"/>
|
||||
<source>When &using external monitor</source>
|
||||
<translation>Ao &utilizar monitor externo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="177"/>
|
||||
<source>On Ac</source>
|
||||
<translation>Com corrente</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="34"/>
|
||||
<source>LXQt Powermanagement Configuration</source>
|
||||
<translation>Configuração do gestor de energia do LxQt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="37"/>
|
||||
<source>Battery</source>
|
||||
<translation>Bateria</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="41"/>
|
||||
<source>Lid</source>
|
||||
<translation>Tampa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="45"/>
|
||||
<source>idle</source>
|
||||
<translation>inatividade</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="35"/>
|
||||
<source>Nothing</source>
|
||||
<translation>Nada fazer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="36"/>
|
||||
<source>Lock screen</source>
|
||||
<translation>Bloquear ecrã</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="37"/>
|
||||
<source>Suspend</source>
|
||||
<translation>Suspender</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="38"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>Hibernar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="39"/>
|
||||
<source>Shutdown</source>
|
||||
<translation>Desligar</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,3 +0,0 @@
|
||||
# Translations
|
||||
GenericName[ru]=Настройки управления энергопотреблением
|
||||
Name[ru]=Управление энергопотреблением
|
@ -1,195 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ru">
|
||||
<context>
|
||||
<name>BatteryWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="14"/>
|
||||
<source>Battery Watcher Settings</source>
|
||||
<translation>Настройки наблюдения за батареей</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="37"/>
|
||||
<source>E&nable Battery Watcher</source>
|
||||
<translation>&Разрешить наблюдение за батареей</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="55"/>
|
||||
<source>Warning:</source>
|
||||
<translation>Предупреждение:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="68"/>
|
||||
<source> seconds</source>
|
||||
<translation> секунд</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="78"/>
|
||||
<source>Level is low at:</source>
|
||||
<translation>Низкий уровень при:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="91"/>
|
||||
<source> %</source>
|
||||
<translation> %</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="98"/>
|
||||
<source>Use icons from theme:</source>
|
||||
<translation>Использовать значки из темы:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="112"/>
|
||||
<source>When power is low then:</source>
|
||||
<translation>При низком заряде:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="129"/>
|
||||
<source>Show icon:</source>
|
||||
<translation>Показывать значок:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IdlenessWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="26"/>
|
||||
<source>Enab&le Idleness Watcher</source>
|
||||
<translation>Включить наблюдение за простоем</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="47"/>
|
||||
<source>When idle then:</source>
|
||||
<translation>При простое:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="66"/>
|
||||
<source>Idle time:</source>
|
||||
<translation>Время простоя:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="79"/>
|
||||
<source> minutes</source>
|
||||
<translation> минут</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="92"/>
|
||||
<source> seconds</source>
|
||||
<translation> секунд</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LidWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="26"/>
|
||||
<source>Enable &Lid Watcher</source>
|
||||
<translation>Включить наблюдение за крышкой</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="45"/>
|
||||
<source>Action when lid is closed</source>
|
||||
<translation>Действие при закрытии крышки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="57"/>
|
||||
<location filename="../lidwatchersettings.ui" line="160"/>
|
||||
<source>On Battery</source>
|
||||
<translation>От батареи</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="77"/>
|
||||
<source>Nothing</source>
|
||||
<translation>Ничего</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="82"/>
|
||||
<source>Suspend</source>
|
||||
<translation>Ждущий режим</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="87"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>Спящий режим</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="92"/>
|
||||
<source>Shut down</source>
|
||||
<translation>Выключить</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="100"/>
|
||||
<source>On AC</source>
|
||||
<translation>От сети</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="139"/>
|
||||
<source>When &using external monitor</source>
|
||||
<translation>При использовании внешнего монитора</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="177"/>
|
||||
<source>On Ac</source>
|
||||
<translation>От сети</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="34"/>
|
||||
<source>LXQt Powermanagement Configuration</source>
|
||||
<translation>Настройка энергопотребления LXQt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="37"/>
|
||||
<source>Battery</source>
|
||||
<translation>Батарея</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="41"/>
|
||||
<source>Lid</source>
|
||||
<translation>Крышка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="45"/>
|
||||
<source>idle</source>
|
||||
<translation>бездействие</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="35"/>
|
||||
<source>Nothing</source>
|
||||
<translation>Ничего</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="36"/>
|
||||
<source>Lock screen</source>
|
||||
<translation>Блокирвать экран</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="37"/>
|
||||
<source>Suspend</source>
|
||||
<translation>Ждущий режим</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="38"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>Спящий режим</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="39"/>
|
||||
<source>Shutdown</source>
|
||||
<translation>Выключить компьютер</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,3 +0,0 @@
|
||||
# Translations
|
||||
GenericName[ru_RU]=Настройки управления энергопотреблением
|
||||
Name[ru_RU]=Управление энергопотреблением
|
@ -1,195 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ru_RU">
|
||||
<context>
|
||||
<name>BatteryWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="14"/>
|
||||
<source>Battery Watcher Settings</source>
|
||||
<translation>Настройки наблюдения за батареей</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="37"/>
|
||||
<source>E&nable Battery Watcher</source>
|
||||
<translation>&Разрешить наблюдение за батареей</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="55"/>
|
||||
<source>Warning:</source>
|
||||
<translation>Предупреждение:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="68"/>
|
||||
<source> seconds</source>
|
||||
<translation> секунд</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="78"/>
|
||||
<source>Level is low at:</source>
|
||||
<translation>Низкий уровень при:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="91"/>
|
||||
<source> %</source>
|
||||
<translation> %</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="98"/>
|
||||
<source>Use icons from theme:</source>
|
||||
<translation>Использовать значки из темы:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="112"/>
|
||||
<source>When power is low then:</source>
|
||||
<translation>При низком заряде:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatchersettings.ui" line="129"/>
|
||||
<source>Show icon:</source>
|
||||
<translation>Показывать значок:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IdlenessWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="26"/>
|
||||
<source>Enab&le Idleness Watcher</source>
|
||||
<translation>Включить наблюдение за простоем</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="47"/>
|
||||
<source>When idle then:</source>
|
||||
<translation>При простое:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="66"/>
|
||||
<source>Idle time:</source>
|
||||
<translation>Время простоя:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="79"/>
|
||||
<source> minutes</source>
|
||||
<translation> минут</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatchersettings.ui" line="92"/>
|
||||
<source> seconds</source>
|
||||
<translation> секунд</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LidWatcherSettings</name>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="26"/>
|
||||
<source>Enable &Lid Watcher</source>
|
||||
<translation>Включить наблюдение за крышкой</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="45"/>
|
||||
<source>Action when lid is closed</source>
|
||||
<translation>Действие при закрытии крышки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="57"/>
|
||||
<location filename="../lidwatchersettings.ui" line="160"/>
|
||||
<source>On Battery</source>
|
||||
<translation>От батареи</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="77"/>
|
||||
<source>Nothing</source>
|
||||
<translation>Ничего</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="82"/>
|
||||
<source>Suspend</source>
|
||||
<translation>Ждущий режим</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="87"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>Спящий режим</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="92"/>
|
||||
<source>Shut down</source>
|
||||
<translation>Выключить</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="100"/>
|
||||
<source>On AC</source>
|
||||
<translation>От сети</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="139"/>
|
||||
<source>When &using external monitor</source>
|
||||
<translation>При использовании внешнего монитора</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../lidwatchersettings.ui" line="177"/>
|
||||
<source>On Ac</source>
|
||||
<translation>От сети</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="34"/>
|
||||
<source>LXQt Powermanagement Configuration</source>
|
||||
<translation>Настройка энергопотребления LXQt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="37"/>
|
||||
<source>Battery</source>
|
||||
<translation>Батарея</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="41"/>
|
||||
<source>Lid</source>
|
||||
<translation>Крышка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../mainwindow.cpp" line="45"/>
|
||||
<source>idle</source>
|
||||
<translation>бездействие</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="35"/>
|
||||
<source>Nothing</source>
|
||||
<translation>Ничего</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="36"/>
|
||||
<source>Lock screen</source>
|
||||
<translation>Блокирвать экран</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="37"/>
|
||||
<source>Suspend</source>
|
||||
<translation>Ждущий режим</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="38"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>Спящий режим</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../helpers.cpp" line="39"/>
|
||||
<source>Shutdown</source>
|
||||
<translation>Выключить компьютер</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
2
debian/.gitignore
vendored
2
debian/.gitignore
vendored
@ -1,7 +1,7 @@
|
||||
/*.debhelper
|
||||
/*.log
|
||||
/*.substvars
|
||||
/debhelper-build-stamp
|
||||
/files
|
||||
|
||||
/lxqt-powermanagement/
|
||||
/lxqt-powermanagement-dbg/
|
||||
|
314
debian/changelog
vendored
314
debian/changelog
vendored
@ -1,3 +1,317 @@
|
||||
lxqt-powermanagement (2.2.1-0ubuntu1) questing; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
- Update build dependencies.
|
||||
- Refresh DPMS revert patch.
|
||||
* Update Standards-Version to 4.7.2, no changes needed.
|
||||
|
||||
-- Aaron Rainbolt <arraybolt3@ubuntu.com> Wed, 30 Jul 2025 15:45:36 -0500
|
||||
|
||||
lxqt-powermanagement (2.1.0-0ubuntu3) plucky; urgency=medium
|
||||
|
||||
* Update Standards-Version to 4.7.1, no changes needed.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 21 Feb 2025 16:37:50 -0600
|
||||
|
||||
lxqt-powermanagement (2.1.0-0ubuntu2) plucky; urgency=medium
|
||||
|
||||
* No-change rebuild for lxqt-build-tools C++17 -> C++20.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 03 Jan 2025 03:58:19 -0600
|
||||
|
||||
lxqt-powermanagement (2.1.0-0ubuntu1) plucky; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
- Bump build dependencies.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 15 Nov 2024 15:33:02 -0600
|
||||
|
||||
lxqt-powermanagement (2.0.0-0ubuntu1) oracular; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Fix DPMS-related patch.
|
||||
* Update copyright file.
|
||||
* Adjusted build dependencies.
|
||||
* Fix battery notification patch.
|
||||
* Bump Standards-Version to 4.7.0, no changes necessary.
|
||||
|
||||
-- Aaron Rainbolt <arraybolt3@ubuntu.com> Thu, 15 Aug 2024 16:29:08 -0500
|
||||
|
||||
lxqt-powermanagement (1.4.0-0ubuntu2) noble; urgency=medium
|
||||
|
||||
* Patched out DPMS-related code (it was causing constant crashes)
|
||||
* Renamed the "Repository-Browser" field to "Repository-Browse" in upstream
|
||||
metadata.
|
||||
|
||||
-- Aaron Rainbolt <arraybolt3@gmail.com> Tue, 14 Nov 2023 19:00:33 -0600
|
||||
|
||||
lxqt-powermanagement (1.4.0-0ubuntu1) noble; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Bump build dependencies.
|
||||
* Show a notification when the battery is present, not absent.
|
||||
* Wraaaaaaaaaaaaaaaaaaaaap.
|
||||
* Add some missing build dependencies.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Mon, 13 Nov 2023 11:48:51 -0600
|
||||
|
||||
lxqt-powermanagement (1.3.0-0ubuntu1) mantic; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Bump build dependencies.
|
||||
* Remove redundant hardening rule.
|
||||
* Bump Standards-Version to 4.6.2, no changes needed.
|
||||
* I guess we don't require root to build, do we?
|
||||
* Update copyright years.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 11 Aug 2023 12:50:06 -0500
|
||||
|
||||
lxqt-powermanagement (1.2.0-0ubuntu1) lunar; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Fix the watch file, for real this time.
|
||||
* Bump build dependencies in debian/control.
|
||||
* Bump Standards-version to 4.6.1, no changes needed.
|
||||
* Lubuntuify the package slightly, to make debhelper happy.
|
||||
* Add some missing brackets in the Lintian overrides.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 18 Nov 2022 21:55:31 -0600
|
||||
|
||||
lxqt-powermanagement (1.1.0-0ubuntu1) kinetic; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Bumped build dependencies.
|
||||
* Drop old Breaks/Replaces since we're past the LTS. Update the
|
||||
runtime dependencies too.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Thu, 02 Jun 2022 12:43:41 -0500
|
||||
|
||||
lxqt-powermanagement (0.17.1-0ubuntu1) impish; urgency=medium
|
||||
|
||||
* New upstream release 0.17.1
|
||||
* Update debian/control
|
||||
- Bump Standards-Version to 4.5.1
|
||||
- Use liblxqt0-dev 0.17.0
|
||||
- Use libglobalkeys0-dev 0.17.0
|
||||
- Use libglobalkeys-ui0-dev 0.17.0
|
||||
- Extend lxqt-powermanagement-l10n package description
|
||||
* Rename tag for lintian override
|
||||
* Update debian/copyright
|
||||
|
||||
-- apt-ghetto <apt-ghetto@protonmail.com> Fri, 13 Aug 2021 15:31:53 +0200
|
||||
|
||||
lxqt-powermanagement (0.16.0-1ubuntu1) hirsute; urgency=medium
|
||||
|
||||
* New upstream version. Merge from debian unstable.
|
||||
* Bump debhelper-compat requirement to 13.
|
||||
* Update dependencies.
|
||||
|
||||
-- Raman Sarda <theloudspeaker@disroot.org> Mon, 22 Feb 2021 02:55:40 +0530
|
||||
|
||||
lxqt-powermanagement (0.16.0-1) unstable; urgency=medium
|
||||
|
||||
[ Alf Gaida ]
|
||||
* Switched to gbp
|
||||
* Bumped Standards-Version to 4.4.0, no changes needed
|
||||
|
||||
[ Andrew Lee (李健秋) ]
|
||||
* New upstream release.
|
||||
* debian/control: update build-deps.
|
||||
|
||||
-- Andrew Lee (李健秋) <ajqlee@debian.org> Wed, 06 Jan 2021 17:58:35 +0800
|
||||
|
||||
lxqt-powermanagement (0.15.0-0ubuntu1) groovy; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
- Update upstream signing key.
|
||||
- Update LXQt build dependencies.
|
||||
* Bump Standards-version to 4.5.0, no changes needed.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Thu, 04 Jun 2020 14:34:24 -0500
|
||||
|
||||
lxqt-powermanagement (0.14.1-1ubuntu2) focal; urgency=medium
|
||||
|
||||
* Updated rules to be consistent with debian unstable.
|
||||
|
||||
-- Raman Sarda <theloudspeaker@lubuntu.me> Sun, 16 Feb 2020 00:11:05 +0530
|
||||
|
||||
lxqt-powermanagement (0.14.1-1ubuntu1) focal; urgency=low
|
||||
|
||||
* Merge from Debian unstable. Remaining changes:
|
||||
- Using debhelper-compat
|
||||
- Keeping ubuntu-side tweaks of writing depends in one line.
|
||||
- Updated build deps according to new minimum requirements.
|
||||
- Added upstream metadata
|
||||
|
||||
-- Raman Sarda <theloudspeaker@lubuntu.me> Wed, 12 Feb 2020 11:13:49 +0530
|
||||
|
||||
lxqt-powermanagement (0.14.1-1) unstable; urgency=medium
|
||||
|
||||
* Cherry-picking new upstream version 0.14.1.
|
||||
* Bumped minimum version liblxqt0-dev (>= 0.14.1~)
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Tue, 26 Feb 2019 02:47:54 +0100
|
||||
|
||||
lxqt-powermanagement (0.14.1-0ubuntu1) disco; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Run wrap-and-sort.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Sat, 09 Mar 2019 13:15:31 -0600
|
||||
|
||||
lxqt-powermanagement (0.14.0-1) unstable; urgency=medium
|
||||
|
||||
* Cherry-picking new upstream version 0.14.0.
|
||||
* Bumped Standards to 4.3.0, no changes needed
|
||||
* Dropped d/compat, use debhelper-compat = 12, no changes needed
|
||||
* Fixed years in d/copyright
|
||||
* Bumped minimum version liblxqt0-dev (>= 0.14.0~)
|
||||
* Removed obsolete PULL_TRANSLATIONS= OFF from dh_auto_configure
|
||||
* Added l10n-package, moved from lxqt-l10n
|
||||
* Added d/upstream/metadata
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Sun, 27 Jan 2019 18:03:45 +0100
|
||||
|
||||
lxqt-powermanagement (0.14.0-0ubuntu1) disco; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
- Bump build dependencies.
|
||||
* Bump Standards-version to 4.3.0, no changes needed.
|
||||
* Bump debhelper compat to 12, no changes needed.
|
||||
* Add a lxqt-powermanagement-l10n package.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Sat, 26 Jan 2019 00:39:28 -0600
|
||||
|
||||
lxqt-powermanagement (0.13.0-1) unstable; urgency=medium
|
||||
|
||||
* Cherry-picking new upstream version 0.13.0.
|
||||
* Bumped build dependency liblxqt0-dev to >= 0.13.0~
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Thu, 24 May 2018 22:46:32 +0200
|
||||
|
||||
lxqt-powermanagement (0.13.0-0ubuntu1) cosmic; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Update Vcs-* and Maintainer to Lubuntu values.
|
||||
* Update build dependencies.
|
||||
|
||||
-- Simon Quigley <tsimonq2@ubuntu.com> Tue, 22 May 2018 23:47:42 -0500
|
||||
|
||||
lxqt-powermanagement (0.12.0-5) unstable; urgency=medium
|
||||
|
||||
* Bumped compat to 11
|
||||
* Bumped debhelper to >= 11~
|
||||
* Bumped Standards to 4.1.4, no changes needed
|
||||
* Changed VCS fields for salsa
|
||||
* Changed Homepage, Source and watch to lxqt
|
||||
* Bumped years in copyright
|
||||
* Removed trailing whitespaces in changelog
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Sat, 28 Apr 2018 15:54:07 +0200
|
||||
|
||||
lxqt-powermanagement (0.12.0-4) unstable; urgency=medium
|
||||
|
||||
* Bumped Standards to 4.1.2, no changes needed
|
||||
* Removed debian/gbp.conf
|
||||
* Removed branch from VCS fields
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Thu, 14 Dec 2017 22:01:39 +0100
|
||||
|
||||
lxqt-powermanagement (0.12.0-3) unstable; urgency=medium
|
||||
|
||||
* Transition to unstable
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Tue, 05 Dec 2017 00:06:38 +0100
|
||||
|
||||
lxqt-powermanagement (0.12.0-2) experimental; urgency=medium
|
||||
|
||||
* Added missed breaks and replaces for lxqt-common << 0.12.0
|
||||
(Closes: #879911) - Thanks Andreas Beckmann <anbe@debian.org>
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Fri, 27 Oct 2017 22:10:31 +0200
|
||||
|
||||
lxqt-powermanagement (0.12.0-1) experimental; urgency=medium
|
||||
|
||||
* Cherry-picking upstream release 0.12.0.
|
||||
* Switched to experimental
|
||||
* Bumped liblxqt0-dev to >= 0.12.0
|
||||
* Bumped Standards to 4.1.1 - no changes needed
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Tue, 24 Oct 2017 19:14:29 +0200
|
||||
|
||||
lxqt-powermanagement (0.11.1-2) unstable; urgency=medium
|
||||
|
||||
* Bumped standards to 4.0.0 - no changes needed
|
||||
* Depends on lxqt-policykit
|
||||
* Make upower a dependency instead of recommend it
|
||||
* Recommend lxqt-qtplugin and lxqt-session
|
||||
(Closes: #866256)
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Sun, 02 Jul 2017 02:19:42 +0200
|
||||
|
||||
lxqt-powermanagement (0.11.1-1) unstable; urgency=medium
|
||||
|
||||
* Cherry-picking upstream release 0.11.1.
|
||||
* Removed some build dependencies:
|
||||
-cmake
|
||||
-libqt5xdg-dev
|
||||
-libqt5xdgiconloader-dev
|
||||
-pkg-config
|
||||
-qttools5-dev
|
||||
-qttools5-dev-tools
|
||||
* Bumped build dependency liblxqt0-dev (>= 0.11.1)
|
||||
* Bumped years in d/copyright
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Mon, 02 Jan 2017 15:51:47 +0100
|
||||
|
||||
lxqt-powermanagement (0.11.0-2) unstable; urgency=medium
|
||||
|
||||
* Cherry-picking upstream release 0.11.0
|
||||
* Synced debian foo with experimental
|
||||
* Bumped compat to 10
|
||||
* Removed --parallel from rules, standard in compat 10
|
||||
* Bumped minimum version debhelper to />= 10)
|
||||
* Bumped minimum version liblxqt0-dev (>= 0.11.0)
|
||||
* Bumped minimum version libqt5xdg-dev (>= 2.0.0)
|
||||
* Added build dependency libkf5idletime-dev
|
||||
* Added build dependency libqt5svg5-dev
|
||||
* Added Recommends lxqt-powermanagement-l10n
|
||||
* Added build dependency libqt5xdgiconloader-dev (>= 2.0.0)
|
||||
* Removed build dependency libx11-xcb-dev
|
||||
* Removed build dependency libxcb-dpms0-dev
|
||||
* Removed build dependency libxcb-screensaver0-dev
|
||||
* Added translation control to rules
|
||||
* Set CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
* Exported LC_ALL=C.UTF-8, make builds reproducible
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Tue, 18 Oct 2016 17:25:42 +0200
|
||||
|
||||
lxqt-powermanagement (0.10.0-4) unstable; urgency=medium
|
||||
|
||||
* Added Recommends: upower (Closes: #828697)
|
||||
Thanks to Martin Küttler <martin.kuettler@os.inf.tu-dresden.de>
|
||||
* Bump Standards to 3.9.8, no changes needed
|
||||
* Bump years in copyright
|
||||
* Changed VCS-fields to use https
|
||||
* Fixed copyright Format field
|
||||
* Add hardening=+all to debian/rules
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Sat, 09 Jul 2016 11:05:07 +0200
|
||||
|
||||
lxqt-powermanagement (0.10.0-3) unstable; urgency=medium
|
||||
|
||||
* Remove dbg package in favor of dbgsym.
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Sat, 26 Dec 2015 20:50:04 +0100
|
||||
|
||||
lxqt-powermanagement (0.10.0-2) unstable; urgency=medium
|
||||
|
||||
* Merge from experimental.
|
||||
* New upstream release.
|
||||
* Set minimum version for liblxqt and libqtxdg.
|
||||
|
||||
-- ChangZhuo Chen (陳昌倬) <czchen@debian.org> Thu, 19 Nov 2015 21:55:09 +0800
|
||||
|
||||
lxqt-powermanagement (0.9.0+20150807-2) unstable; urgency=medium
|
||||
|
||||
* Fixed czchen's email address
|
||||
|
1
debian/compat
vendored
1
debian/compat
vendored
@ -1 +0,0 @@
|
||||
9
|
57
debian/control
vendored
57
debian/control
vendored
@ -1,47 +1,46 @@
|
||||
Source: lxqt-powermanagement
|
||||
Maintainer: LXQt Packaging Team <pkg-lxqt-devel@lists.alioth.debian.org>
|
||||
Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
|
||||
Original-Maintainer: LXQt Packaging Team <pkg-lxqt-devel@lists.alioth.debian.org>
|
||||
Uploaders: Alf Gaida <agaida@siduction.org>,
|
||||
ChangZhuo Chen (陳昌倬) <czchen@debian.org>,
|
||||
Andrew Lee (李健秋) <ajqlee@debian.org>
|
||||
Section: x11
|
||||
Priority: optional
|
||||
Build-Depends: debhelper (>= 9),
|
||||
cmake (>= 3.0.2),
|
||||
libkf5solid-dev,
|
||||
libkf5windowsystem-dev,
|
||||
liblxqt0-dev,
|
||||
libqt5svg5-dev,
|
||||
libqt5x11extras5-dev,
|
||||
libqt5xdg-dev,
|
||||
Build-Depends: debhelper-compat (= 13),
|
||||
libkf6idletime-dev,
|
||||
libkf6solid-dev,
|
||||
libkf6windowsystem-dev,
|
||||
liblxqt-globalkeys-ui2-dev (>= 2.2.0),
|
||||
liblxqt-globalkeys2-dev (>= 2.2.0),
|
||||
liblxqt2-dev (>= 2.2.0),
|
||||
libx11-dev,
|
||||
libx11-xcb-dev,
|
||||
libxcb-dpms0-dev,
|
||||
libxcb-screensaver0-dev,
|
||||
pkg-config,
|
||||
qtbase5-private-dev,
|
||||
qttools5-dev,
|
||||
qttools5-dev-tools
|
||||
Standards-Version: 3.9.6
|
||||
Vcs-Browser: http://anonscm.debian.org/cgit/pkg-lxqt/lxqt-powermanagement.git
|
||||
Vcs-Git: git://anonscm.debian.org/pkg-lxqt/lxqt-powermanagement.git
|
||||
Homepage: https://github.com/lxde/lxqt-powermanagement
|
||||
qt6-base-private-dev (>= 6.6.0),
|
||||
qt6-svg-dev (>= 6.6.0)
|
||||
Standards-Version: 4.7.2
|
||||
Vcs-Browser: https://git.lubuntu.me/Lubuntu/lxqt-powermanagement-packaging
|
||||
Vcs-Git: https://git.lubuntu.me/Lubuntu/lxqt-powermanagement-packaging.git
|
||||
Debian-Vcs-Browser: https://salsa.debian.org/lxqt-team/lxqt-powermanagement
|
||||
Debian-Vcs-Git: https://salsa.debian.org/lxqt-team/lxqt-powermanagement.git
|
||||
Rules-Requires-Root: no
|
||||
Homepage: https://github.com/lxqt/lxqt-powermanagement
|
||||
|
||||
Package: lxqt-powermanagement
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Depends: lxqt-policykit, upower, ${misc:Depends}, ${shlibs:Depends}
|
||||
Recommends: lxqt-powermanagement-l10n, lxqt-qtplugin, lxqt-session
|
||||
Description: power management module for LXQt
|
||||
The Power management module for LXQt.
|
||||
.
|
||||
This package contain power management module for LXQt.
|
||||
|
||||
Package: lxqt-powermanagement-dbg
|
||||
Architecture: any
|
||||
Section: debug
|
||||
Priority: extra
|
||||
Depends: ${misc:Depends},
|
||||
lxqt-powermanagement (= ${binary:Version})
|
||||
Description: power management module for LXQt (debug symbols)
|
||||
The Power management module for LXQt.
|
||||
Package: lxqt-powermanagement-l10n
|
||||
Architecture: all
|
||||
Multi-Arch: foreign
|
||||
Section: localization
|
||||
Depends: qt6-translations-l10n, ${misc:Depends}
|
||||
Description: Language package for lxqt-powermanagement
|
||||
The l10n files for lxqt-powermanagement
|
||||
.
|
||||
This package contain debugging symbols.
|
||||
This package contains the l10n files needed by lxqt-powermanagement.
|
||||
|
29
debian/copyright
vendored
29
debian/copyright
vendored
@ -1,14 +1,33 @@
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: lxqt-powermanagement
|
||||
Source: https://github.com/lxde/lxqt-openssh-askpass
|
||||
Source: https://github.com/lxqt/lxqt-powermanagement
|
||||
|
||||
Files: *
|
||||
Copyright: 2013-2015 LXQt team
|
||||
Copyright: 2013-2025, LXQt team
|
||||
2011-2012, Razor team
|
||||
License: LGPL-2.1+
|
||||
|
||||
Files: config/helpers.h
|
||||
src/batteryinfodialog.cpp
|
||||
src/batteryinfodialog.h
|
||||
src/iconproducer.cpp
|
||||
src/iconproducer.h
|
||||
src/powermanagementd.h
|
||||
src/watcher.h
|
||||
Copyright: 2014-2015, Christian Surlykke <christian@surlykke.dk>
|
||||
2014-2015, Paulo Lieuthier
|
||||
License: LGPL-2.1+
|
||||
|
||||
Files: src/idlenesswatcher.cpp
|
||||
src/idlenesswatcher.h
|
||||
Copyright: 2013, Alec Moskvin <alecm@gmx.com>
|
||||
License: LGPL-2.1+
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2014-2015 Alf Gaida <agaida@siduction.org>
|
||||
2015 Andrew Lee (李健秋) <ajqlee@debian.org>
|
||||
Copyright: 2021-2025, Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
|
||||
2014-2019, Alf Gaida <agaida@siduction.org>
|
||||
2015, Andrew Lee (李健秋) <ajqlee@debian.org>
|
||||
2025, Aaron Rainbolt <arraybolt3@ubuntu.com>
|
||||
License: LGPL-2.1+
|
||||
|
||||
License: LGPL-2.1+
|
||||
|
6
debian/gbp.conf
vendored
Normal file
6
debian/gbp.conf
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
[DEFAULT]
|
||||
debian-branch = debian/sid
|
||||
upstream-branch = upstream/latest
|
||||
pristine-tar = True
|
||||
compression = xz
|
||||
|
6
debian/lintian-overrides
vendored
6
debian/lintian-overrides
vendored
@ -1,6 +1,6 @@
|
||||
# there will be no manpages in a foreseable future
|
||||
lxqt-powermanagement: binary-without-manpage usr/bin/lxqt-config-powermanagement
|
||||
lxqt-powermanagement: binary-without-manpage usr/bin/lxqt-powermanagement
|
||||
lxqt-powermanagement: no-manual-page [usr/bin/lxqt-config-powermanagement]
|
||||
lxqt-powermanagement: no-manual-page [usr/bin/lxqt-powermanagement]
|
||||
|
||||
# category LXQt in not yet in freedesktop specs - no bug
|
||||
lxqt-powermanagement: desktop-entry-invalid-category LXQt usr/share/applications/lxqt-config-powermanagement.desktop
|
||||
lxqt-powermanagement: desktop-entry-invalid-category LXQt [usr/share/applications/lxqt-config-powermanagement.desktop]
|
||||
|
2
debian/lxqt-powermanagement-l10n.install
vendored
Normal file
2
debian/lxqt-powermanagement-l10n.install
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
usr/share/lxqt/translations/lxqt-config-powermanagement
|
||||
usr/share/lxqt/translations/lxqt-powermanagement
|
5
debian/lxqt-powermanagement.install
vendored
Normal file
5
debian/lxqt-powermanagement.install
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
etc/xdg/autostart/lxqt-powermanagement.desktop
|
||||
usr/bin/lxqt-config-powermanagement
|
||||
usr/bin/lxqt-powermanagement
|
||||
usr/share/applications/lxqt-config-powermanagement.desktop
|
||||
usr/share/icons/hicolor/scalable/devices/laptop-lid.svg
|
4
debian/lxqt-powermanagement.lintian-overrides
vendored
Normal file
4
debian/lxqt-powermanagement.lintian-overrides
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# This is expected
|
||||
lxqt-powermanagement: desktop-entry-lacks-keywords-entry [usr/share/applications/lxqt-config-powermanagement.desktop]
|
||||
lxqt-powermanagement: desktop-entry-invalid-category LXQt [usr/share/applications/lxqt-config-powermanagement.desktop]
|
||||
lxqt-powermanagement: no-manual-page *
|
114
debian/patches/battery-ux.patch
vendored
Normal file
114
debian/patches/battery-ux.patch
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
Description: Show a notification when the battery is present, not absent
|
||||
In virtual machines especially, it is odd to see a message about the battery not being present. This commit moves that message to only display when there is a battery present.
|
||||
Author: Simon Quigley <tsimonq2@lubuntu.me>
|
||||
Origin: upstream
|
||||
Forwarded: https://github.com/lxqt/lxqt-powermanagement/pull/382
|
||||
Last-Update: 2023-10-03
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- a/src/batterywatcher.cpp
|
||||
+++ b/src/batterywatcher.cpp
|
||||
@@ -43,13 +43,6 @@ BatteryWatcher::BatteryWatcher(QObject *
|
||||
{
|
||||
const QList<Solid::Device> devices = Solid::Device::listFromType(Solid::DeviceInterface::Battery, QString());
|
||||
|
||||
- if (devices.isEmpty())
|
||||
- {
|
||||
- LXQt::Notification::notify(tr("No battery!"),
|
||||
- tr("LXQt could not find data about any battery - monitoring disabled"),
|
||||
- QSL("lxqt-powermanagement"));
|
||||
- }
|
||||
-
|
||||
for (Solid::Device device : devices)
|
||||
{
|
||||
Solid::Battery *battery = device.as<Solid::Battery>();
|
||||
@@ -57,11 +50,24 @@ BatteryWatcher::BatteryWatcher(QObject *
|
||||
{
|
||||
continue;
|
||||
}
|
||||
+
|
||||
mBatteries << battery;
|
||||
connect(battery, &Solid::Battery::energyChanged, this, &BatteryWatcher::batteryChanged);
|
||||
connect(battery, &Solid::Battery::chargeStateChanged, this, &BatteryWatcher::batteryChanged);
|
||||
}
|
||||
|
||||
+ bool discharging;
|
||||
+ double chargeLevel;
|
||||
+ chargeLevelAndStatus(discharging, chargeLevel);
|
||||
+
|
||||
+ if (!devices.isEmpty()) {
|
||||
+ QString status = discharging ? QStringLiteral("Discharging") : QStringLiteral("Charging");
|
||||
+ QString message = tr("%1 (%2%)").arg(status).arg(chargeLevel);
|
||||
+ LXQt::Notification::notify(tr("Battery Present"),
|
||||
+ message,
|
||||
+ QSL("lxqt-powermanagement"));
|
||||
+ }
|
||||
+
|
||||
mBatteryInfoDialog = new BatteryInfoDialog(mBatteries);
|
||||
|
||||
connect(&mSettings, &PowerManagementSettings::settingsChanged, this, &BatteryWatcher::settingsChanged);
|
||||
@@ -85,19 +91,10 @@ void BatteryWatcher::batteryChanged()
|
||||
static QTime actionTime;
|
||||
static LXQt::Notification *notification = nullptr;
|
||||
|
||||
- double totalEnergyFull = 0;
|
||||
- double totalEnergyNow = 0;
|
||||
- bool discharging = true;
|
||||
+ bool discharging;
|
||||
double chargeLevel;
|
||||
|
||||
- for (const Solid::Battery *battery : std::as_const(mBatteries))
|
||||
- {
|
||||
- totalEnergyFull += battery->energyFull();
|
||||
- totalEnergyNow += battery->energy();
|
||||
- discharging &= (battery->chargeState() == Solid::Battery::Discharging);
|
||||
- }
|
||||
-
|
||||
- chargeLevel = 100 * totalEnergyNow / totalEnergyFull;
|
||||
+ chargeLevelAndStatus(discharging, chargeLevel);
|
||||
|
||||
qDebug() << "BatteryChanged"
|
||||
<< "discharging:" << discharging
|
||||
@@ -160,6 +157,31 @@ void BatteryWatcher::batteryChanged()
|
||||
}
|
||||
}
|
||||
|
||||
+void BatteryWatcher::chargeLevelAndStatus(bool &discharging, double &chargeLevel)
|
||||
+{
|
||||
+ double totalEnergyFull = 0;
|
||||
+ double totalEnergyNow = 0;
|
||||
+ bool batteries = false;
|
||||
+ discharging = true;
|
||||
+
|
||||
+ for (const Solid::Battery *battery : std::as_const(mBatteries))
|
||||
+ {
|
||||
+ batteries = true;
|
||||
+
|
||||
+ totalEnergyFull += battery->energyFull();
|
||||
+ totalEnergyNow += battery->energy();
|
||||
+ discharging &= (battery->chargeState() == Solid::Battery::Discharging);
|
||||
+ }
|
||||
+
|
||||
+ if (!batteries) {
|
||||
+ discharging = false;
|
||||
+ chargeLevel = 0;
|
||||
+ }
|
||||
+ else {
|
||||
+ chargeLevel = 100 * totalEnergyNow / totalEnergyFull;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void BatteryWatcher::settingsChanged()
|
||||
{
|
||||
if (!mSettings.isShowIcon())
|
||||
--- a/src/batterywatcher.h
|
||||
+++ b/src/batterywatcher.h
|
||||
@@ -51,6 +51,8 @@ private slots:
|
||||
void setPause(TrayIcon::PAUSE duration);
|
||||
|
||||
private:
|
||||
+ void chargeLevelAndStatus(bool &discharging, double &chargeLevel);
|
||||
+
|
||||
QList<Solid::Battery*> mBatteries;
|
||||
QList<TrayIcon*> mTrayIcons;
|
||||
QTimer mPauseTimer;
|
115
debian/patches/revert-dpms-changes.patch
vendored
Normal file
115
debian/patches/revert-dpms-changes.patch
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
Description: Remove DPMS-related and screensaver-suspending-related code
|
||||
lxqt-powermanagement added some code that allows the power manager to mess
|
||||
with DPMS stuff. However it appears that DPMS is oftentimes not available in
|
||||
Lubuntu, making lxqt-powermanagement crash over and over until it finally
|
||||
gets disabled by LXQt until the next login. Some screensaver-related stuff
|
||||
was also thrown in which seems unrelated but is in with a function that
|
||||
sets DPMS timeouts. This patch removes all of that code, fixing the crashes.
|
||||
Author: Aaron Rainbolt
|
||||
Origin: ubuntu
|
||||
Last-Update: 2024-06-26
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -29,7 +29,6 @@ find_package(KF6IdleTime ${KF6_MINIMUM_V
|
||||
find_package(KF6Solid ${KF6_MINIMUM_VERSION} REQUIRED)
|
||||
find_package(lxqt ${LXQT_MINIMUM_VERSION} REQUIRED)
|
||||
find_package(lxqt-globalkeys-ui ${LXQT_GLOBALKEYS_MINIMUM_VERSION} REQUIRED)
|
||||
-find_package(XCB REQUIRED COMPONENTS DPMS SCREENSAVER)
|
||||
|
||||
message(STATUS "Building with Qt${Qt6Core_VERSION}")
|
||||
|
||||
--- a/src/idlenesswatcher.cpp
|
||||
+++ b/src/idlenesswatcher.cpp
|
||||
@@ -35,8 +35,6 @@
|
||||
#include <QDebug>
|
||||
#include <LXQt/lxqtnotification.h>
|
||||
#include <QObject>
|
||||
-#include <xcb/dpms.h>
|
||||
-#include <xcb/screensaver.h>
|
||||
|
||||
IdlenessWatcher::IdlenessWatcher(QObject* parent):
|
||||
Watcher(parent)
|
||||
@@ -70,47 +68,14 @@ IdlenessWatcher::IdlenessWatcher(QObject
|
||||
|
||||
connect(&mPSettings, &LXQt::Settings::settingsChanged, this, &IdlenessWatcher::onSettingsChanged);
|
||||
|
||||
- // retrieve DPMS timeouts
|
||||
- mDpmsStandby = mDpmsSuspend = mDpmsOff = 0;
|
||||
- if (QGuiApplication::platformName() == QStringLiteral("xcb")) {
|
||||
- if (auto x11NativeInterface = qGuiApp->nativeInterface<QNativeInterface::QX11Application>()) {
|
||||
- xcb_connection_t* c = x11NativeInterface->connection();
|
||||
- xcb_dpms_get_timeouts_cookie_t cookie = xcb_dpms_get_timeouts(c);
|
||||
- xcb_dpms_get_timeouts_reply_t* reply = xcb_dpms_get_timeouts_reply(c, cookie, nullptr);
|
||||
- if (reply) {
|
||||
- mDpmsStandby = reply->standby_timeout;
|
||||
- mDpmsSuspend = reply->suspend_timeout;
|
||||
- mDpmsOff = reply->off_timeout;
|
||||
- free(reply);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
setup();
|
||||
}
|
||||
|
||||
IdlenessWatcher::~IdlenessWatcher()
|
||||
{
|
||||
- setDpmsTimeouts(true);
|
||||
KIdleTime::instance()->removeAllIdleTimeouts();
|
||||
}
|
||||
|
||||
-void IdlenessWatcher::setDpmsTimeouts(bool restore) {
|
||||
- if (QGuiApplication::platformName() == QStringLiteral("xcb")) {
|
||||
- if (auto x11NativeInterface = qGuiApp->nativeInterface<QNativeInterface::QX11Application>()) {
|
||||
- xcb_connection_t* c = x11NativeInterface->connection();
|
||||
- if (restore) {
|
||||
- xcb_dpms_set_timeouts(c, mDpmsStandby, mDpmsSuspend, mDpmsOff);
|
||||
- xcb_screensaver_suspend(c, 0); // WARNING: This is not documented but works.
|
||||
- }
|
||||
- else {
|
||||
- xcb_dpms_set_timeouts(c, 0, 0, 0);
|
||||
- xcb_screensaver_suspend(c, XCB_SCREENSAVER_SUSPEND);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
void IdlenessWatcher::setup()
|
||||
{
|
||||
if(mPSettings.isIdlenessWatcherEnabled()) {
|
||||
@@ -144,13 +109,6 @@ void IdlenessWatcher::setup()
|
||||
milliseconds = 1000;
|
||||
mIdleBacklightWatcher = KIdleTime::instance()->addIdleTimeout(milliseconds);
|
||||
}
|
||||
-
|
||||
- // override DPMS settings
|
||||
- setDpmsTimeouts(false);
|
||||
- }
|
||||
- else {
|
||||
- // restore DPMS settings
|
||||
- setDpmsTimeouts(true);
|
||||
}
|
||||
}
|
||||
|
||||
--- a/src/idlenesswatcher.h
|
||||
+++ b/src/idlenesswatcher.h
|
||||
@@ -45,8 +45,6 @@ private Q_SLOTS:
|
||||
void onSettingsChanged();
|
||||
|
||||
private:
|
||||
- void setDpmsTimeouts(bool restore);
|
||||
-
|
||||
PowerManagementSettings mPSettings;
|
||||
int mIdleACWatcher;
|
||||
int mIdleBatteryWatcher;
|
||||
@@ -54,7 +52,6 @@ private:
|
||||
LXQt::Backlight *mBacklight;
|
||||
int mBacklightActualValue;
|
||||
bool mDischarging;
|
||||
- quint16 mDpmsStandby, mDpmsSuspend, mDpmsOff;
|
||||
};
|
||||
|
||||
#endif // IDLENESSWATCHER_H
|
2
debian/patches/series
vendored
Normal file
2
debian/patches/series
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
battery-ux.patch
|
||||
revert-dpms-changes.patch
|
16
debian/rules
vendored
16
debian/rules
vendored
@ -1,13 +1,17 @@
|
||||
#!/usr/bin/make -f
|
||||
# export DH_VERBOSE=1
|
||||
|
||||
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||
export LC_ALL=C.UTF-8
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
%:
|
||||
dh ${@} --buildsystem cmake --parallel
|
||||
dh ${@} --buildsystem cmake
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install -- DESTDIR=$(CURDIR)/debian/lxqt-powermanagement
|
||||
override_dh_missing:
|
||||
dh_missing --fail-missing
|
||||
|
||||
override_dh_strip:
|
||||
dh_strip --dbg-package=lxqt-powermanagement-dbg
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- \
|
||||
-DPULL_TRANSLATIONS=OFF\
|
||||
-DUPDATE_TRANSLATIONS=OFF\
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
|
2
debian/source/lintian-overrides
vendored
Normal file
2
debian/source/lintian-overrides
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
# We won't be forwarding this patch upstream
|
||||
lxqt-powermanagement source: patch-not-forwarded-upstream [debian/patches/revert-dpms-changes.patch]
|
6
debian/upstream/metadata
vendored
Normal file
6
debian/upstream/metadata
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
Name: lxqt-powermanagement
|
||||
Bug-Database: https://github.com/lxqt/lxqt-powermanagement/issues
|
||||
Bug-Submit: https://github.com/lxqt/lxqt-powermanagement/issues/new
|
||||
Changelog: https://github.com/lxqt/lxqt-powermanagement/blob/master/CHANGELOG
|
||||
Repository: https://github.com/lxqt/lxqt-powermanagement
|
||||
Repository-Browse: https://github.com/lxqt/lxqt-powermanagement
|
52
debian/upstream/signing-key.asc
vendored
Normal file
52
debian/upstream/signing-key.asc
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBF6cxrwBEADfl3ydxNfLBbWGPesXty2baQgixZ3D6aCxadI2kX+aikmT8rd0
|
||||
ttDKN18cXV52Ssxnj0qhgf4hwnu/b0be6BzqSEyGM+UQR3X2CYpxrMakfW32Q18K
|
||||
X5ec0RPR2ucBq9G0r9t6FYC8FkJ4uQUU3xxrLW3z302S0Makjgzm8BV9WrFQ7oFF
|
||||
uJQj0BHbHYC4RyaZb2AfxY4Y92BPGTjtGekWqgw6vEXCCnvAbGYVQzvxZt3nw21/
|
||||
1YmV4g7xhGFQPbOf9v3ejFUJeJIGzuJf5NAh7kvfCdUBAGYH0gnj0GpOve4ftnaG
|
||||
sAId2CQwm3oYF4Tu7yBPTOBpkaKkNaT+UdwTyeKERuCZ9ocZWX++/YF9ItRkJ5mM
|
||||
zoP1GluWn2atNWpRh/K97gyAGgr2fSmrAA4d1JrVbMujZAHoHAOKwJKqX9jPziPZ
|
||||
BFHfhcIOzG3ZhXAuumHsd7uwfPBVt20g+G+cOjBghbSSu9EOtMkAZl1g3ybvZixu
|
||||
Jtxa5exZWEmU7vtytEb8eq9Dj5XcGoTDbErE2RpJ/20HPzhyRKg9RN4iGS+0OiHS
|
||||
oRbDi5IEOizvQjp2bsBmfa3rsoDSOqF2pevp+u8I56I6bU1GFpxxNC5IGvgo2Q79
|
||||
quz0oIk5hs3eLlUdEYsLGwR6pWJaJyf36vuDsq7iLrLyvHI5irAowO4r1QARAQAB
|
||||
tCVQZWRyYW0gUG91cmFuZyA8dHN1amFuMjAwMEBnbWFpbC5jb20+iQJOBBMBCAA4
|
||||
FiEEGd/fOleb1QnbtXLYvnkwB60i334FAl6cxrwCGwMFCwkIBwIGFQoJCAsCBBYC
|
||||
AwECHgECF4AACgkQvnkwB60i335f9RAAgRpn8gUa/l10UkVAnpM2Cz0MuNMwwCOq
|
||||
IfVnuZuPBtYYiTU5Su++/aPZe3fF5B4v61F+XjNi7qeVL2t52X3jZ/iIx9Syasb+
|
||||
vDAIfQ5t6lKXvOptWxf6vteOg6CHbXwpGHbPjUkUS2vQwRikjBnR0SnkrMoXtgSX
|
||||
amPFqsitNrOhEJfeDfo0NzKESZuliWrCFt2v8c5q18G8cCZAvPLBlGuwRl58cDep
|
||||
3EIibMI/9MUSJbKoiHlK+LcHtG7BQTNis/e7Pe1PkRmExfhxe1lNajtOx8FO72Tq
|
||||
B6zY6drippM9VaIc1M+zp9BRpsFu8whOmapCqlXHRgAK8xTdQRIGInQFqLWPOxSC
|
||||
f0B6N+EvQvgkyFQ1rW+u91OJBma46uKkhrwf+mDttVRncaIAkgE6e6pqm18yIPFk
|
||||
D42rt/yHcOl+2qkcJS3gPcg5UvlCzqOwg1rKZQIk+TcPuDx3r2UghDEYZN9X6vw3
|
||||
zCBufr7ygZNf4tkbnVARFWTR4GzyCseFkWgOVZL9DccAhs8NeMy1WLkUzB75adeR
|
||||
3LONmEL7xOI8FuknKY4e6EcWhmstNIDgXfRe0hwO0VBdW3unoZC/K2ZM/ZuZyMdK
|
||||
TFjvYJrNewmymKge68wo0054bGZn8oz17i2AosJz7kW+ITsxmxhVcpfl4bav9Neq
|
||||
RpQwhnhK9bC5Ag0EXpzGvAEQANbeRHFbpgQVIqV9WVOVnTj4FIqrTPTPKKa02vJA
|
||||
7tGpgFapgvjdxnMxJfV6wuwOBUUFLR7DrXlV8EVFAYc5qTIeSQXvJsWw6gQ3+f0D
|
||||
z13oGOhZPBIzIKnV/MZI/jhIio8kSPWAuM5hR2X9Hvw3/CLo+H+hZZ6cFYoCxrQS
|
||||
tTzcKMkdQizLLa+WNbqUSxg6I/P5k/smUDY9gKW7RtI5t/PupA3WTnsVD6CYWa3Q
|
||||
c1O/1mUgqT6nQ5N9KCPpjZQRT6D6eIMmePtS85z4PPeYMJxPsKRYWPGRxKhCSdZl
|
||||
/0wsC8aRtmwYT729e0ZgTAmUnj+rQp5hboF/ZPFjIoXR9G+0HnoY0a/nqVO4lUON
|
||||
AV25GnMFGVyiHHlbH/0gboywwnzEg8BZbk+Z/61oOzBIW09sfG8fn8bsbkpL+nHf
|
||||
Mi/Vauge6wSfw7I5AfSiwrSDNHmKVsu39koWV6JGxEeFr2MffF+CuaoJCNOr/ZII
|
||||
SYR5ku3Y/lMKyUH1Oas0RWzFrdRcInqYK90A0x083zP4V445MvCwbRPzQAkm9wOP
|
||||
kILLhE5FW+9/O0/9bpx4joJUDLV4d3hFZy7GSHKiZUs1QW6BV75JQKqoi+cVt+/L
|
||||
+o1S8CMNekjqdC2mWRosM3doo51zT/FWNzQA1QcoZP2hORJDfw66y+4wPq6o8y1W
|
||||
jR35ABEBAAGJAjYEGAEIACAWIQQZ3986V5vVCdu1cti+eTAHrSLffgUCXpzGvAIb
|
||||
DAAKCRC+eTAHrSLffgbJD/4qW5YOo/BayBhaUh2L7VP7JNlECb/2xNNOFKI1NjNr
|
||||
nOmgSJLzf74Uhmt5W+iVjmJBHrDceprIPkizmPrn90kIsPIMtHIDNxzUgKZHbnza
|
||||
j1vZyAeC+JV79X1hOVpprj1TJwy65lpxXNyYnGqeIOgyFokn9fOHXv8aMQwpNuUr
|
||||
bdUJ1C75jYrvwy/NR1DczIFFYgsbkDGDtjVBjyMc5JAgvUBz37/iVPJfWP6dKVnf
|
||||
abRnUVzHgvgK7bnab00SA1TiWvjHURGjo+5rnRtv8X/AgStc2Phjq68TMIgMn0F2
|
||||
kjUVvfQotNqzo9madNshvUDmsGtAzKh4e0dS1ear7u3nRp4Z7fqSrTEtXKNbEPwZ
|
||||
wdWrWmmQLacNQBSe/FtcMzGF6xIVr4lnrL0bFjqBdQpdTC7vns3QSKk8/GFiEfpv
|
||||
kzXrDbGV7jX2OWDjNHKcmXX2+E1CsNaJgS7zOgZw5jvbvlTLJUwyYNlM1VLI2OFW
|
||||
Oa86l8pqli+B7rpTbsAE9Ut8qUaWjm87oUNSJbaKgqNnMaE+b/8VJaEeWHgQJwsD
|
||||
bJSJ/O/vzlRtDjOJ1JDlMRLs7TnOFeUh5pgwyaJoidYbJEiGlMGJbI6BjwhDTBFO
|
||||
NLJtd3SsRjc7ICtGdCvej59IvCDTjxtkhx5okF03APi1aXpHQrE18/arFD7BpoGO
|
||||
sw==
|
||||
=gSIv
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
7
debian/watch
vendored
7
debian/watch
vendored
@ -1,2 +1,5 @@
|
||||
version=3
|
||||
https://github.com/lxde/lxqt-powermanagement/releases .*/([\d\.]+).tar.gz
|
||||
version=4
|
||||
opts="searchmode=plain, \
|
||||
pgpsigurlmangle=s/$/.asc/, \
|
||||
uversionmangle=s/(\d+\.\d+\.\d+).*/$1/" \
|
||||
https://api.github.com/repos/lxqt/@PACKAGE@/releases https:\/\/github.com\/lxqt\/@PACKAGE@\/releases\/download\/@ANY_VERSION@\/@PACKAGE@-@ANY_VERSION@.tar.xz
|
||||
|
@ -1,123 +0,0 @@
|
||||
project(lxqt-powermanagement)
|
||||
|
||||
set(QTX_LIBRARIES Qt5::Widgets Qt5::DBus Qt5::Svg Qt5::X11Extras)
|
||||
|
||||
set(SOURCES
|
||||
watcher.cpp
|
||||
batteryhelper.cpp
|
||||
batteryinfoframe.cpp
|
||||
batteryinfodialog.cpp
|
||||
batterywatcher.cpp
|
||||
idlenesswatcher.cpp
|
||||
lid.cpp
|
||||
lidwatcher.cpp
|
||||
main.cpp
|
||||
powermanagementd.cpp
|
||||
trayicon.cpp
|
||||
iconproducer.cpp
|
||||
x11helper.cpp
|
||||
../config/powermanagementsettings.cpp
|
||||
)
|
||||
|
||||
set(UI_FILES
|
||||
batteryinfoframe.ui
|
||||
batteryinfodialog.ui
|
||||
)
|
||||
|
||||
set(DESKTOP_FILES_IN
|
||||
lxqt-powermanagement.desktop.in
|
||||
)
|
||||
|
||||
qt5_add_dbus_adaptor(SOURCES
|
||||
org.freedesktop.ScreenSaver.xml
|
||||
idlenesswatcher.h
|
||||
IdlenessWatcher
|
||||
)
|
||||
|
||||
lxqt_translate_ts(QM_FILES
|
||||
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
|
||||
SOURCES
|
||||
${SOURCES}
|
||||
${UI_FILES}
|
||||
INSTALL_DIR
|
||||
${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
lxqt_app_translation_loader(lxqt-powermanagement_QM_LOADER ${PROJECT_NAME})
|
||||
|
||||
# XCB stuff (TODO: move into findXCB)
|
||||
find_package(PkgConfig)
|
||||
|
||||
pkg_check_modules(PKG_XCB xcb)
|
||||
find_path(XCB_INCLUDE_DIR xcb/xcb.h
|
||||
${PKG_XCB_INCLUDE_DIRS}
|
||||
)
|
||||
find_library(XCB_LIBRARY NAMES xcb
|
||||
PATHS
|
||||
${PKG_XCB_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
pkg_check_modules(PKG_X11_XCB x11-xcb)
|
||||
find_path(X11_XCB_INCLUDE_DIR X11/Xlib-xcb.h
|
||||
${PKG_X11_XCB_INCLUDE_DIRS}
|
||||
)
|
||||
find_library(X11_XCB_LIBRARY NAMES X11-xcb
|
||||
PATHS
|
||||
${PKG_X11_XCB_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
pkg_check_modules(PKG_XCB_SCREENSAVER xcb-screensaver)
|
||||
find_path(XCB_SCREENSAVER_INCLUDE_DIR xcb/screensaver.h
|
||||
${PKG_XCB_SCREENSAVER_INCLUDE_DIRS}
|
||||
)
|
||||
find_library(XCB_SCREENSAVER_LIBRARY NAMES xcb-screensaver
|
||||
PATHS
|
||||
${PKG_XCB_SCREENSAVER_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
pkg_check_modules(PKG_XCB_DPMS xcb-dpms)
|
||||
find_path(XCB_DPMS_INCLUDE_DIR xcb/dpms.h
|
||||
${PKG_XCB_SCREENSAVER_INCLUDE_DIRS}
|
||||
)
|
||||
find_library(XCB_DPMS_LIBRARY NAMES xcb-dpms
|
||||
PATHS
|
||||
${PKG_XCB_DPMS_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
|
||||
include_directories(
|
||||
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
|
||||
${XCB_INCLUDE_DIR}
|
||||
${X11_XCB_INCLUDE_DIR}
|
||||
${XCB_SCREENSAVER_INCLUDE_DIR}
|
||||
${XCB_DPMS_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
add_executable(lxqt-powermanagement
|
||||
${SOURCES}
|
||||
${RSCS}
|
||||
${QM_FILES}
|
||||
${lxqt-powermanagement_QM_LOADER}
|
||||
${DESKTOP_FILES}
|
||||
)
|
||||
|
||||
target_link_libraries(lxqt-powermanagement
|
||||
lxqt
|
||||
${QTX_LIBRARIES}
|
||||
${XCB_LIBRARY}
|
||||
${XCB_SCREENSAVER_LIBRARY}
|
||||
${XCB_DPMS_LIBRARY}
|
||||
${X11_XCB_LIBRARY}
|
||||
KF5::Solid
|
||||
)
|
||||
|
||||
install(TARGETS
|
||||
${PROJECT_NAME}
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
COMPONENT Runtime
|
||||
)
|
||||
install(FILES
|
||||
${DESKTOP_FILES}
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
|
||||
COMPONENT Runtime
|
||||
)
|
@ -1,101 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2011 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QList>
|
||||
#include <QDebug>
|
||||
#include <QMap>
|
||||
#include <QDateTime>
|
||||
#include <cmath>
|
||||
|
||||
#include "batteryhelper.h"
|
||||
#include "../config/powermanagementsettings.h"
|
||||
|
||||
QString BatteryHelper::stateToString(Solid::Battery::ChargeState state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case Solid::Battery::NoCharge:
|
||||
return tr("Empty");
|
||||
case Solid::Battery::Discharging:
|
||||
return tr("Discharging");
|
||||
case Solid::Battery::FullyCharged:
|
||||
return tr("Fully charged");
|
||||
case Solid::Battery::Charging:
|
||||
default:
|
||||
return tr("Charging");
|
||||
}
|
||||
}
|
||||
|
||||
QString BatteryHelper::technologyToString(Solid::Battery::Technology tech)
|
||||
{
|
||||
switch (tech)
|
||||
{
|
||||
case Solid::Battery::LithiumIon:
|
||||
return tr("Lithium ion");
|
||||
case Solid::Battery::LithiumPolymer:
|
||||
return tr("Lithium polymer");
|
||||
case Solid::Battery::LithiumIronPhosphate:
|
||||
return tr("Lithium iron phosphate");
|
||||
case Solid::Battery::LeadAcid:
|
||||
return tr("Lead acid");
|
||||
case Solid::Battery::NickelCadmium:
|
||||
return tr("Nickel cadmium");
|
||||
case Solid::Battery::NickelMetalHydride:
|
||||
return tr("Nickel metal hydride");
|
||||
case Solid::Battery::UnknownTechnology:
|
||||
default:
|
||||
return tr("Unknown");
|
||||
}
|
||||
}
|
||||
|
||||
QString BatteryHelper::typeToString(Solid::Battery::BatteryType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case Solid::Battery::PdaBattery:
|
||||
return tr("Personal Digital Assistent's battery");
|
||||
case Solid::Battery::UpsBattery:
|
||||
return tr("Uninterruptible Power Supply's battery");
|
||||
case Solid::Battery::PrimaryBattery:
|
||||
return tr("Primary battery");
|
||||
case Solid::Battery::MouseBattery:
|
||||
return tr("Mouse battery");
|
||||
case Solid::Battery::KeyboardBattery:
|
||||
return tr("Keyboard battery");
|
||||
case Solid::Battery::KeyboardMouseBattery:
|
||||
return tr("Keyboard and mouse's battery");
|
||||
case Solid::Battery::CameraBattery:
|
||||
return tr("Camera battery");
|
||||
case Solid::Battery::PhoneBattery:
|
||||
return tr("Phone battery");
|
||||
case Solid::Battery::MonitorBattery:
|
||||
return tr("Monitor battery");
|
||||
case Solid::Battery::UnknownBattery:
|
||||
default:
|
||||
return tr("Unkown battery");
|
||||
}
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2011 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
#ifndef BATTERYHELPER_H
|
||||
#define BATTERYHELPER_H
|
||||
|
||||
#include <QVariantMap>
|
||||
#include <QDateTime>
|
||||
#include <Solid/Battery>
|
||||
#include <Solid/Device>
|
||||
|
||||
class BatteryHelper : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static QString stateToString(Solid::Battery::ChargeState state);
|
||||
static QString technologyToString(Solid::Battery::Technology tech);
|
||||
static QString typeToString(Solid::Battery::BatteryType type);
|
||||
};
|
||||
#endif
|
@ -1,42 +0,0 @@
|
||||
#include "batteryinfodialog.h"
|
||||
#include "ui_batteryinfodialog.h"
|
||||
|
||||
#include <QFormLayout>
|
||||
#include <QTabWidget>
|
||||
#include <QDebug>
|
||||
|
||||
BatteryInfoDialog::BatteryInfoDialog(QList<Solid::Battery*> batteries, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::BatteryInfoDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
setWindowTitle(tr("Battery Info"));
|
||||
|
||||
if (batteries.size() == 1)
|
||||
{
|
||||
BatteryInfoFrame *batteryInfoFrame = new BatteryInfoFrame(batteries[0]);
|
||||
ui->verticalLayout->insertWidget(0, batteryInfoFrame);
|
||||
}
|
||||
else
|
||||
{
|
||||
QTabWidget *tabWidget = new QTabWidget(this);
|
||||
ui->verticalLayout->insertWidget(0, tabWidget);
|
||||
foreach (Solid::Battery *battery, batteries)
|
||||
{
|
||||
BatteryInfoFrame *batteryInfoFrame = new BatteryInfoFrame(battery);
|
||||
tabWidget->addTab(batteryInfoFrame, "BAT");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BatteryInfoDialog::~BatteryInfoDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void BatteryInfoDialog::toggleShow()
|
||||
{
|
||||
qDebug() << "toggleShow";
|
||||
isVisible() ? hide() : show();
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
#ifndef BATTERYINFODIALOG_H
|
||||
#define BATTERYINFODIALOG_H
|
||||
|
||||
#include "batteryinfoframe.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QList>
|
||||
#include <Solid/Battery>
|
||||
|
||||
namespace Ui {
|
||||
class BatteryInfoDialog;
|
||||
}
|
||||
|
||||
class BatteryInfoDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BatteryInfoDialog(QList<Solid::Battery*> batteries, QWidget *parent = 0);
|
||||
~BatteryInfoDialog();
|
||||
|
||||
public slots:
|
||||
void toggleShow();
|
||||
|
||||
private:
|
||||
Ui::BatteryInfoDialog *ui;
|
||||
};
|
||||
|
||||
#endif // BATTERYINFODIALOG_H
|
@ -1,64 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>BatteryInfoDialog</class>
|
||||
<widget class="QDialog" name="BatteryInfoDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>334</width>
|
||||
<height>301</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>BatteryInfoDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>BatteryInfoDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
@ -1,68 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
|
||||
#include "batteryinfoframe.h"
|
||||
#include "batteryhelper.h"
|
||||
#include "ui_batteryinfoframe.h"
|
||||
|
||||
BatteryInfoFrame::BatteryInfoFrame(Solid::Battery *battery) :
|
||||
QFrame(),
|
||||
mBattery(battery),
|
||||
mUi(new Ui::BatteryInfoFrame)
|
||||
{
|
||||
mUi->setupUi(this);
|
||||
|
||||
mUi->energyFullDesignValue->setText(QString("%1 Wh").arg(mBattery->energyFullDesign(), 0, 'f', 2));
|
||||
mUi->typeValue->setText(BatteryHelper::typeToString(mBattery->type()));
|
||||
mUi->technologyValue->setText(BatteryHelper::technologyToString(mBattery->technology()));
|
||||
|
||||
QString vendor = QString("%1 %2").arg(battery->recallVendor()).arg(battery->serial());
|
||||
if (vendor.trimmed().isEmpty())
|
||||
vendor = "Unkown";
|
||||
mUi->vendorValue->setText(vendor);
|
||||
|
||||
connect(mBattery, SIGNAL(energyChanged(double, const QString)), this, SLOT(onBatteryChanged()));
|
||||
connect(mBattery, SIGNAL(chargeStateChanged(int, const QString)), this, SLOT(onBatteryChanged()));
|
||||
onBatteryChanged();
|
||||
}
|
||||
|
||||
BatteryInfoFrame::~BatteryInfoFrame()
|
||||
{
|
||||
delete mUi;
|
||||
}
|
||||
|
||||
void BatteryInfoFrame::onBatteryChanged()
|
||||
{
|
||||
mUi->stateValue->setText(BatteryHelper::stateToString(mBattery->chargeState()));
|
||||
mUi->energyFullValue->setText(QString("%1 Wh (%2 %)").arg(mBattery->energyFull(), 0, 'f', 2).arg(mBattery->capacity()));
|
||||
mUi->energyValue->setText(QString("%1 Wh (%2 %)").arg(mBattery->energy(), 0, 'f', 2).arg(mBattery->chargePercent()));
|
||||
mUi->energyRateValue->setText(QString("%1 W").arg(mBattery->energyRate(), 0, 'f', 2));
|
||||
mUi->voltageValue->setText(QString("%1 V").arg(mBattery->voltage(), 0, 'f', 2));
|
||||
mUi->temperatureValue->setText(QString("%1 ºC").arg(mBattery->temperature()));
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
#ifndef BATTERYINFOFRAME_H
|
||||
#define BATTERYINFOFRAME_H
|
||||
|
||||
#include <QFrame>
|
||||
|
||||
#include <Solid/Battery>
|
||||
|
||||
namespace Ui {
|
||||
class BatteryInfoFrame;
|
||||
}
|
||||
|
||||
class BatteryInfoFrame : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit BatteryInfoFrame(Solid::Battery* battery);
|
||||
~BatteryInfoFrame();
|
||||
|
||||
private slots:
|
||||
void onBatteryChanged();
|
||||
|
||||
private:
|
||||
Solid::Battery* mBattery;
|
||||
Ui::BatteryInfoFrame *mUi;
|
||||
};
|
||||
|
||||
#endif // BATTERYINFOFRAME_H
|
@ -1,203 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>BatteryInfoFrame</class>
|
||||
<widget class="QFrame" name="BatteryInfoFrame">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>277</width>
|
||||
<height>292</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Power Management</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLabel" name="vendorValue">
|
||||
<property name="text">
|
||||
<string notr="true">DELL 00</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="typeValue">
|
||||
<property name="text">
|
||||
<string notr="true">Primary</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLabel" name="temperatureValue">
|
||||
<property name="text">
|
||||
<string notr="true">12.27 ºC</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="temperatureCaption">
|
||||
<property name="text">
|
||||
<string>Temperature:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="typeCaption">
|
||||
<property name="text">
|
||||
<string>Type:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="stateCaption">
|
||||
<property name="text">
|
||||
<string>State:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="stateValue">
|
||||
<property name="text">
|
||||
<string notr="true">Charging</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="energyFullDesignCaption">
|
||||
<property name="text">
|
||||
<string>Energy Full Design:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="energyFullDesignValue">
|
||||
<property name="text">
|
||||
<string notr="true">73.26 Wh</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="energyFullCaption">
|
||||
<property name="text">
|
||||
<string>Energy Full:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="energyFullValue">
|
||||
<property name="text">
|
||||
<string notr="true">64.58 Wh (88.2 %)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="energyCaption">
|
||||
<property name="text">
|
||||
<string>Energy Now:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="energyValue">
|
||||
<property name="text">
|
||||
<string notr="true">63.41 Wh (98.2 %)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="energyRateCaption">
|
||||
<property name="text">
|
||||
<string>Energy rate:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="energyRateValue">
|
||||
<property name="text">
|
||||
<string notr="true">15.11 W</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="technologyValue">
|
||||
<property name="text">
|
||||
<string notr="true">Lithium ion</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="technologyCaption">
|
||||
<property name="text">
|
||||
<string>Technology:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLabel" name="voltageValue">
|
||||
<property name="text">
|
||||
<string notr="true">12.27 V</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="voltageCaption">
|
||||
<property name="text">
|
||||
<string>Voltage:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="vendorCaption">
|
||||
<property name="text">
|
||||
<string>Vendor:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -1,177 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QDebug>
|
||||
#include <QTime>
|
||||
#include <QTimer>
|
||||
|
||||
#include <LXQt/Notification>
|
||||
#include <LXQt/AutostartEntry>
|
||||
#include <LXQt/Power>
|
||||
#include <Solid/Device>
|
||||
#include <Solid/Battery>
|
||||
|
||||
#include "batterywatcher.h"
|
||||
#include "../config/powermanagementsettings.h"
|
||||
|
||||
BatteryWatcher::BatteryWatcher(QObject *parent) : Watcher(parent)
|
||||
{
|
||||
QList<Solid::Device> devices = Solid::Device::listFromType(Solid::DeviceInterface::Battery, QString());
|
||||
|
||||
if (devices.isEmpty())
|
||||
{
|
||||
LxQt::Notification::notify(tr("No battery!"),
|
||||
tr("LXQt could not find data about any battery - monitoring disabled"),
|
||||
"lxqt-powermanagement");
|
||||
}
|
||||
|
||||
foreach (Solid::Device device, devices)
|
||||
{
|
||||
Solid::Battery *battery = device.as<Solid::Battery>();
|
||||
if (battery->type() != Solid::Battery::PrimaryBattery)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
mBatteries << battery;
|
||||
connect(battery, &Solid::Battery::energyChanged, this, &BatteryWatcher::batteryChanged);
|
||||
connect(battery, &Solid::Battery::chargeStateChanged, this, &BatteryWatcher::batteryChanged);
|
||||
}
|
||||
|
||||
mBatteryInfoDialog = new BatteryInfoDialog(mBatteries);
|
||||
|
||||
connect(&mSettings, SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
||||
connect(LxQt::Settings::globalSettings(), SIGNAL(iconThemeChanged()), this, SLOT(settingsChanged()));
|
||||
|
||||
settingsChanged();
|
||||
batteryChanged();
|
||||
}
|
||||
|
||||
BatteryWatcher::~BatteryWatcher()
|
||||
{
|
||||
}
|
||||
|
||||
void BatteryWatcher::batteryChanged()
|
||||
{
|
||||
static QTime actionTime;
|
||||
static LxQt::Notification *notification = 0;
|
||||
|
||||
double totalEnergyFull = 0;
|
||||
double totalEnergyNow = 0;
|
||||
bool discharging = true;
|
||||
double chargeLevel;
|
||||
|
||||
foreach (Solid::Battery *battery, mBatteries)
|
||||
{
|
||||
totalEnergyFull += battery->energyFull();
|
||||
totalEnergyNow += battery->energy();
|
||||
discharging &= (battery->chargeState() == Solid::Battery::Discharging);
|
||||
}
|
||||
|
||||
chargeLevel = 100 * totalEnergyNow / totalEnergyFull;
|
||||
|
||||
qDebug() << "BatteryChanged"
|
||||
<< "discharging:" << discharging
|
||||
<< "chargeLevel:" << chargeLevel
|
||||
<< "actionTime:" << actionTime;
|
||||
|
||||
bool powerLowActionRequired =
|
||||
discharging &&
|
||||
chargeLevel < mSettings.getPowerLowLevel() &&
|
||||
mSettings.getPowerLowAction() > 0;
|
||||
|
||||
if (powerLowActionRequired)
|
||||
{
|
||||
if (actionTime.isNull())
|
||||
actionTime = QTime::currentTime().addMSecs(mSettings.getPowerLowWarningTime() * 1000);
|
||||
|
||||
if (!notification)
|
||||
{
|
||||
notification = new LxQt::Notification(tr("Power low!"), this);
|
||||
notification->setTimeout(2000);
|
||||
}
|
||||
|
||||
int milliSecondsToAction = QTime::currentTime().msecsTo(actionTime);
|
||||
|
||||
if (milliSecondsToAction > 0)
|
||||
{
|
||||
int secondsToAction = milliSecondsToAction / 1000;
|
||||
switch (mSettings.getPowerLowAction())
|
||||
{
|
||||
case LxQt::Power::PowerSuspend:
|
||||
notification->setBody(tr("Suspending in %1 seconds").arg(secondsToAction));
|
||||
break;
|
||||
case LxQt::Power::PowerHibernate:
|
||||
notification->setBody(tr("Hibernating in %1 seconds").arg(secondsToAction));
|
||||
break;
|
||||
case LxQt::Power::PowerShutdown:
|
||||
notification->setBody(tr("Shutting down in %1 seconds").arg(secondsToAction));
|
||||
break;
|
||||
}
|
||||
|
||||
notification->update();
|
||||
|
||||
QTimer::singleShot(200, this, SLOT(batteryChanged()));
|
||||
}
|
||||
else
|
||||
{
|
||||
doAction(mSettings.getPowerLowAction());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!actionTime.isNull())
|
||||
actionTime = QTime();
|
||||
|
||||
if (notification)
|
||||
{
|
||||
delete notification;
|
||||
notification = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BatteryWatcher::settingsChanged()
|
||||
{
|
||||
if (!mSettings.isShowIcon())
|
||||
{
|
||||
while (!mTrayIcons.isEmpty())
|
||||
{
|
||||
mTrayIcons.first()->hide();
|
||||
mTrayIcons.takeFirst()->deleteLater();
|
||||
}
|
||||
}
|
||||
else if (mTrayIcons.isEmpty())
|
||||
{
|
||||
foreach (Solid::Battery *battery, mBatteries)
|
||||
{
|
||||
mTrayIcons.append(new TrayIcon(battery, this));
|
||||
connect(mTrayIcons.last(), SIGNAL(toggleShowInfo()), mBatteryInfoDialog, SLOT(toggleShow()));
|
||||
mTrayIcons.last()->show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,56 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
#ifndef BATTERYWATCHER_H
|
||||
#define BATTERYWATCHER_H
|
||||
|
||||
#include "watcher.h"
|
||||
#include "trayicon.h"
|
||||
#include "batteryinfodialog.h"
|
||||
#include "../config/powermanagementsettings.h"
|
||||
|
||||
#include <Solid/Battery>
|
||||
|
||||
class BatteryWatcher : public Watcher
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit BatteryWatcher(QObject *parent = 0);
|
||||
virtual ~BatteryWatcher();
|
||||
|
||||
private slots:
|
||||
void batteryChanged();
|
||||
void settingsChanged();
|
||||
|
||||
private:
|
||||
QList<Solid::Battery*> mBatteries;
|
||||
QList<TrayIcon*> mTrayIcons;
|
||||
|
||||
PowerManagementSettings mSettings;
|
||||
BatteryInfoDialog *mBatteryInfoDialog;
|
||||
};
|
||||
|
||||
#endif // BATTERYWATCHER_H
|
@ -1,235 +0,0 @@
|
||||
#include "iconproducer.h"
|
||||
#include <LXQt/Settings>
|
||||
#include <XdgIcon>
|
||||
#include <QDebug>
|
||||
#include <QtSvg/QSvgRenderer>
|
||||
#include <QPainter>
|
||||
#include <math.h>
|
||||
|
||||
IconProducer::IconProducer(Solid::Battery *battery, QObject *parent) : QObject(parent)
|
||||
{
|
||||
connect(battery, &Solid::Battery::chargeStateChanged, this, &IconProducer::updateState);
|
||||
connect(battery, &Solid::Battery::chargePercentChanged, this, &IconProducer::updateChargePercent);
|
||||
connect(&mSettings, SIGNAL(settingsChanged()), this, SLOT(update()));
|
||||
|
||||
mChargePercent = battery->chargePercent();
|
||||
mState = battery->chargeState();
|
||||
themeChanged();
|
||||
}
|
||||
|
||||
IconProducer::IconProducer(QObject *parent): QObject(parent)
|
||||
{
|
||||
themeChanged();
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
void IconProducer::updateChargePercent(int newChargePercent)
|
||||
{
|
||||
mChargePercent = newChargePercent;
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void IconProducer::updateState(int newState)
|
||||
{
|
||||
mState = (Solid::Battery::ChargeState) newState;
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void IconProducer::update()
|
||||
{
|
||||
QString newIconName;
|
||||
|
||||
if (mSettings.isUseThemeIcons())
|
||||
{
|
||||
QMap<float, QString> *levelNameMap = (mState == Solid::Battery::Discharging ? &mLevelNameMapDischarging : &mLevelNameMapCharging);
|
||||
foreach (float level, levelNameMap->keys())
|
||||
{
|
||||
if (level >= mChargePercent)
|
||||
{
|
||||
newIconName = levelNameMap->value(level);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mSettings.isUseThemeIcons() && newIconName == mIconName)
|
||||
return;
|
||||
|
||||
mIconName = newIconName;
|
||||
mIcon = mSettings.isUseThemeIcons() ? QIcon::fromTheme(mIconName) : circleIcon();
|
||||
emit iconChanged();
|
||||
}
|
||||
|
||||
void IconProducer::themeChanged()
|
||||
{
|
||||
/*
|
||||
* We maintain specific charge-level-to-icon-name mappings for Oxygen and Awoken and
|
||||
* asume all other themes adhere to the freedesktop standard.
|
||||
* This is certainly not true, and as bug reports come in stating that
|
||||
* this and that theme is not working we will probably have to add new
|
||||
* mappings beside Oxygen and Awoken
|
||||
*/
|
||||
mLevelNameMapDischarging.clear();
|
||||
mLevelNameMapCharging.clear();
|
||||
|
||||
if (QIcon::themeName() == "oxygen")
|
||||
{
|
||||
// Means:
|
||||
// Use 'battery-low' for levels up to 10
|
||||
// - 'battery-caution' for levels between 10 and 20
|
||||
// - 'battery-040' for levels between 20 and 40, etc..
|
||||
mLevelNameMapDischarging[10] = "battery-low";
|
||||
mLevelNameMapDischarging[20] = "battery-caution";
|
||||
mLevelNameMapDischarging[40] = "battery-040";
|
||||
mLevelNameMapDischarging[60] = "battery-060";
|
||||
mLevelNameMapDischarging[80] = "battery-080";
|
||||
mLevelNameMapDischarging[101] = "battery-100";
|
||||
mLevelNameMapCharging[10] = "battery-charging-low";
|
||||
mLevelNameMapCharging[20] = "battery-charging-caution";
|
||||
mLevelNameMapCharging[40] = "battery-charging-040";
|
||||
mLevelNameMapCharging[60] = "battery-charging-060";
|
||||
mLevelNameMapCharging[80] = "battery-charging-080";
|
||||
mLevelNameMapCharging[101] = "battery-charging";
|
||||
}
|
||||
else if (QIcon::themeName().startsWith("AwOken")) // AwOken, AwOkenWhite, AwOkenDark
|
||||
{
|
||||
mLevelNameMapDischarging[5] = "battery-000";
|
||||
mLevelNameMapDischarging[30] = "battery-020";
|
||||
mLevelNameMapDischarging[50] = "battery-040";
|
||||
mLevelNameMapDischarging[70] = "battery-060";
|
||||
mLevelNameMapDischarging[95] = "battery-080";
|
||||
mLevelNameMapDischarging[101] = "battery-100";
|
||||
mLevelNameMapCharging[5] = "battery-000-charging";
|
||||
mLevelNameMapCharging[30] = "battery-020-charging";
|
||||
mLevelNameMapCharging[50] = "battery-040-charging";
|
||||
mLevelNameMapCharging[70] = "battery-060-charging";
|
||||
mLevelNameMapCharging[95] = "battery-080-charging";
|
||||
mLevelNameMapCharging[101] = "battery-100-charging";
|
||||
}
|
||||
else // As default we fall back to the freedesktop scheme.
|
||||
{
|
||||
mLevelNameMapDischarging[3] = "battery-empty";
|
||||
mLevelNameMapDischarging[10] = "battery-caution";
|
||||
mLevelNameMapDischarging[50] = "battery-low";
|
||||
mLevelNameMapDischarging[90] = "battery-good";
|
||||
mLevelNameMapDischarging[101] = "battery-full";
|
||||
mLevelNameMapCharging[3] = "battery-empty";
|
||||
mLevelNameMapCharging[10] = "battery-caution-charging";
|
||||
mLevelNameMapCharging[50] = "battery-low-charging";
|
||||
mLevelNameMapCharging[90] = "battery-good-charging";
|
||||
mLevelNameMapCharging[101] = "battery-full-charging";
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
QIcon& IconProducer::circleIcon()
|
||||
{
|
||||
static QMap<Solid::Battery::ChargeState, QMap<int, QIcon> > cache;
|
||||
|
||||
int chargeLevelAsInt = (int) (mChargePercent + 0.49);
|
||||
|
||||
if (!cache[mState].contains(chargeLevelAsInt))
|
||||
cache[mState][chargeLevelAsInt] = buildCircleIcon(mState, mChargePercent);
|
||||
|
||||
return cache[mState][chargeLevelAsInt];
|
||||
}
|
||||
|
||||
QIcon IconProducer::buildCircleIcon(Solid::Battery::ChargeState state, int chargeLevel)
|
||||
{
|
||||
static QString svg_template =
|
||||
"<svg\n"
|
||||
" xmlns:dc='http://purl.org/dc/elements/1.1/'\n"
|
||||
" xmlns:cc='http://creativecommons.org/ns#'\n"
|
||||
" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\n"
|
||||
" xmlns:svg='http://www.w3.org/2000/svg'\n"
|
||||
" xmlns='http://www.w3.org/2000/svg'\n"
|
||||
" version='1.1'\n"
|
||||
" width='200'\n"
|
||||
" height='200'>\n"
|
||||
"\n"
|
||||
"<defs>\n"
|
||||
" <linearGradient id='greenGradient' x1='0%' y1='0%' x2='100%' y2='100%'>\n"
|
||||
" <stop offset='0%' style='stop-color:rgb(125,255,125);stop-opacity:1' />\n"
|
||||
" <stop offset='150%' style='stop-color:rgb(15,125,15);stop-opacity:1' />\n"
|
||||
" </linearGradient>\n"
|
||||
"</defs>\n"
|
||||
"\n"
|
||||
"<circle cx='100' cy='100' r='99' style='fill:#FFFFFF;stroke:none; opacity:0.2;'/>\n"
|
||||
"<path d='M 100,20 A80,80 0, LARGE_ARC_FLAG, SWEEP_FLAG, END_X,END_Y' style='fill:none; stroke:url(#greenGradient); stroke-width:38;' />\n"
|
||||
"<path d='M 100,20 A80,80 0, LARGE_ARC_FLAG, SWEEP_FLAG, END_X,END_Y' style='fill:none; stroke:red; stroke-width:38; opacity:RED_OPACITY' />\n"
|
||||
"\n"
|
||||
" STATE_MARKER\n"
|
||||
"\n"
|
||||
"</svg>";
|
||||
|
||||
static QString filledCircle = "<circle cx='100' cy='100' r='35'/>";
|
||||
static QString plus = "<path d='M 60,100 L140,100 M100,60 L100,140' style='stroke:black; stroke-width:30;'/>";
|
||||
static QString minus = "<path d='M 60,100 L140,100' style='stroke:black; stroke-width:30;'/>";
|
||||
static QString hollowCircle = "<circle cx='100' cy='100' r='30' style='fill:none;stroke:black;stroke-width:10'/>";
|
||||
|
||||
QString svg = svg_template;
|
||||
|
||||
if (chargeLevel > 99)
|
||||
chargeLevel = 99;
|
||||
|
||||
double angle;
|
||||
QString sweepFlag;
|
||||
if (state == Solid::Battery::Discharging)
|
||||
{
|
||||
angle = M_PI_2 + 2 * M_PI * chargeLevel/100;
|
||||
sweepFlag = "0";
|
||||
}
|
||||
else
|
||||
{
|
||||
angle = M_PI_2 - 2 *M_PI * chargeLevel/100;
|
||||
sweepFlag = "1";
|
||||
}
|
||||
double circle_endpoint_x = 80.0 * cos(angle) + 100;
|
||||
double circle_endpoint_y = -80.0 * sin(angle) + 100;
|
||||
|
||||
QString largeArgFlag = chargeLevel > 50 ? "1" : "0";
|
||||
|
||||
svg.replace(QString("END_X"), QString::number(circle_endpoint_x));
|
||||
svg.replace(QString("END_Y"), QString::number(circle_endpoint_y));
|
||||
svg.replace(QString("LARGE_ARC_FLAG"), largeArgFlag);
|
||||
svg.replace(QString("SWEEP_FLAG"), sweepFlag);
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case Solid::Battery::FullyCharged:
|
||||
svg.replace("STATE_MARKER", filledCircle);
|
||||
break;
|
||||
case Solid::Battery::Charging:
|
||||
svg.replace("STATE_MARKER", plus);
|
||||
break;
|
||||
case Solid::Battery::Discharging:
|
||||
svg.replace("STATE_MARKER", minus);
|
||||
break;
|
||||
default:
|
||||
svg.replace("STATE_MARKER", hollowCircle);
|
||||
}
|
||||
|
||||
if (state != Solid::Battery::FullyCharged && state != Solid::Battery::Charging && chargeLevel < mSettings.getPowerLowLevel() + 30)
|
||||
{
|
||||
if (chargeLevel <= mSettings.getPowerLowLevel() + 10)
|
||||
svg.replace("RED_OPACITY", "1");
|
||||
else
|
||||
svg.replace("RED_OPACITY", QString::number((mSettings.getPowerLowLevel() + 30 - chargeLevel)/20.0));
|
||||
}
|
||||
else
|
||||
svg.replace("RED_OPACITY", "0");
|
||||
|
||||
// qDebug() << svg;
|
||||
|
||||
// Paint the svg on a pixmap and create an icon from that.
|
||||
QSvgRenderer render(svg.toLatin1());
|
||||
QPixmap pixmap(render.defaultSize());
|
||||
pixmap.fill(QColor(0,0,0,0));
|
||||
QPainter painter(&pixmap);
|
||||
render.render(&painter);
|
||||
return QIcon(pixmap);
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
#ifndef ICONPRODUCER_H
|
||||
#define ICONPRODUCER_H
|
||||
#include <QString>
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include "../config/powermanagementsettings.h"
|
||||
#include <Solid/Battery>
|
||||
|
||||
class IconProducer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
IconProducer(Solid::Battery* battery, QObject *parent = 0);
|
||||
IconProducer(QObject *parent = 0);
|
||||
|
||||
QIcon mIcon;
|
||||
QString mIconName;
|
||||
|
||||
signals:
|
||||
void iconChanged();
|
||||
|
||||
public slots:
|
||||
void updateChargePercent(int newChargePercent);
|
||||
void updateState(int newState);
|
||||
void update();
|
||||
void themeChanged();
|
||||
|
||||
private:
|
||||
|
||||
QIcon &circleIcon();
|
||||
QIcon buildCircleIcon(Solid::Battery::ChargeState state, int chargeLevel);
|
||||
|
||||
|
||||
int mChargePercent;
|
||||
Solid::Battery::ChargeState mState;
|
||||
|
||||
PowerManagementSettings mSettings;
|
||||
|
||||
QMap<float, QString> mLevelNameMapCharging;
|
||||
QMap<float, QString> mLevelNameMapDischarging;
|
||||
|
||||
};
|
||||
|
||||
#endif // ICONPRODUCER_H
|
@ -1,283 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright (C) 2013 Alec Moskvin <alecm@gmx.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <xcb/dpms.h>
|
||||
#include <xcb/screensaver.h>
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QDBusServiceWatcher>
|
||||
|
||||
#include <LXQt/ProgramFinder>
|
||||
|
||||
#include "screensaveradaptor.h"
|
||||
#include "idlenesswatcher.h"
|
||||
#include "x11helper.h"
|
||||
|
||||
/* lockers:
|
||||
*
|
||||
* xlock(more)
|
||||
* i3lock -n
|
||||
* slock
|
||||
* alock
|
||||
* xtrlock
|
||||
*/
|
||||
|
||||
|
||||
IdlenessWatcher::IdlenessWatcher(QObject* parent):
|
||||
Watcher(parent),
|
||||
mPSettings(),
|
||||
mErrorNotification(tr("LxQt Idleness watcher failed to start")),
|
||||
mDBusWatcher(this),
|
||||
mInhibitorCookie(0),
|
||||
mIsLocked(false)
|
||||
{
|
||||
qDebug() << "Starting idlenesswatcher";
|
||||
mConn = X11Helper::connection();
|
||||
xcb_prefetch_extension_data(mConn, &xcb_screensaver_id);
|
||||
xcb_prefetch_extension_data(mConn, &xcb_dpms_id);
|
||||
xcb_screensaver_query_version_cookie_t verCookie = xcb_screensaver_query_version_unchecked(mConn, XCB_SCREENSAVER_MAJOR_VERSION, XCB_SCREENSAVER_MINOR_VERSION);
|
||||
xcb_dpms_get_version_cookie_t dpmsVerCookie = xcb_dpms_get_version_unchecked(mConn, XCB_DPMS_MAJOR_VERSION, XCB_DPMS_MINOR_VERSION);
|
||||
// Note that XCB is asynchronous, so we want to make requests ASAP and get the responses as late as possible.
|
||||
|
||||
mScreen = screenOfDisplay(mConn, 0);
|
||||
mErrorNotification.setUrgencyHint(LxQt::Notification::UrgencyCritical);
|
||||
mErrorNotification.setIcon("object-unlocked");
|
||||
mErrorNotification.setTimeout(0);
|
||||
|
||||
new ScreenSaverAdaptor(this);
|
||||
QDBusConnection sessionBus = QDBusConnection::sessionBus();
|
||||
if (!sessionBus.registerService("org.freedesktop.ScreenSaver")
|
||||
|| !sessionBus.registerObject("/ScreenSaver", this))
|
||||
{
|
||||
mErrorNotification.setBody(tr("D-Bus interface org.freedesktop.ScreenSaver is already registered"));
|
||||
mErrorNotification.update();
|
||||
qWarning() << "ERROR: D-Bus interface org.freedesktop.ScreenSaver is already registered";
|
||||
}
|
||||
|
||||
mDBusWatcher.setConnection(QDBusConnection::sessionBus());
|
||||
mDBusWatcher.setWatchMode(QDBusServiceWatcher::WatchForUnregistration);
|
||||
|
||||
connect(&mTimer, SIGNAL(timeout()), SLOT(idleTimeout()));
|
||||
connect(&mPSettings, SIGNAL(settingsChanged()), SLOT(restartTimer()));
|
||||
connect(this, SIGNAL(done()), this, SLOT(restartTimer()));
|
||||
connect(&mDBusWatcher, SIGNAL(serviceUnregistered(QString)), SLOT(serviceUnregistered(QString)));
|
||||
connect(&mLockProcess, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(screenUnlocked(int,QProcess::ExitStatus)));
|
||||
connect(&mErrorNotification, SIGNAL(actionActivated(int)), SLOT(notificationAction(int)));
|
||||
|
||||
// Get XCB responses ...
|
||||
const xcb_query_extension_reply_t* extReply = xcb_get_extension_data(mConn, &xcb_screensaver_id);
|
||||
const xcb_query_extension_reply_t* dpmsExtReply = xcb_get_extension_data(mConn, &xcb_dpms_id);
|
||||
xcb_screensaver_query_version_reply_t* verReply = xcb_screensaver_query_version_reply(mConn, verCookie, NULL);
|
||||
xcb_dpms_get_version_reply_t* dpmsVerReply = xcb_dpms_get_version_reply(mConn, dpmsVerCookie, NULL);
|
||||
|
||||
if (mScreen && extReply && extReply->present && dpmsExtReply && dpmsExtReply->present
|
||||
&& verReply && dpmsVerReply
|
||||
&& verReply->server_major_version == XCB_SCREENSAVER_MAJOR_VERSION
|
||||
&& verReply->server_minor_version >= XCB_SCREENSAVER_MINOR_VERSION
|
||||
//&& dpmsVerReply->server_major_version == XCB_DPMS_MAJOR_VERSION
|
||||
//&& dpmsVerReply->server_minor_version >= XCB_DPMS_MINOR_VERSION
|
||||
)
|
||||
{
|
||||
free(verReply);
|
||||
free(dpmsVerReply);
|
||||
}
|
||||
else
|
||||
{
|
||||
mErrorNotification.setBody(tr("The X11 Screensaver extension is not usable"));
|
||||
mErrorNotification.update();
|
||||
if (verReply)
|
||||
free(verReply);
|
||||
qCritical() << "ERROR: Can't use the X11 Screensaver Extension!";
|
||||
}
|
||||
|
||||
mErrorNotification.setActions(QStringList(tr("Configure...")));
|
||||
|
||||
qDebug() << "LxQt Screenlocker started.";
|
||||
qDebug() << "timeout:" << getMaxIdleTimeoutMs() << "ms, lock command:" << mLockCommand;
|
||||
restartTimer();
|
||||
}
|
||||
|
||||
xcb_screen_t* IdlenessWatcher::screenOfDisplay(xcb_connection_t* conn, int screen)
|
||||
{
|
||||
xcb_screen_iterator_t iter = xcb_setup_roots_iterator(xcb_get_setup(conn));
|
||||
for (; iter.rem; --screen, xcb_screen_next(&iter))
|
||||
if (screen == 0)
|
||||
return iter.data;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
uint IdlenessWatcher::getIdleTimeMs()
|
||||
{
|
||||
xcb_screensaver_query_info_cookie_t infoCookie = xcb_screensaver_query_info_unchecked(mConn, mScreen->root);
|
||||
xcb_screensaver_query_info_reply_t* infoReply = xcb_screensaver_query_info_reply(mConn, infoCookie, NULL);
|
||||
if (!infoReply)
|
||||
{
|
||||
qWarning() << "Bad reply from X11 Screensaver";
|
||||
return 0;
|
||||
}
|
||||
uint msSinceUserInput = infoReply->ms_since_user_input;
|
||||
free(infoReply);
|
||||
return msSinceUserInput;
|
||||
}
|
||||
|
||||
uint IdlenessWatcher::getMaxIdleTimeoutMs()
|
||||
{
|
||||
return 1000 * mPSettings.getIdlenessTimeSecs();
|
||||
}
|
||||
|
||||
void IdlenessWatcher::idleTimeout()
|
||||
{
|
||||
uint msSinceUserInput = getIdleTimeMs();
|
||||
if (msSinceUserInput >= getMaxIdleTimeoutMs())
|
||||
{
|
||||
mTimer.stop();
|
||||
doAction(mPSettings.getIdlenessAction());
|
||||
}
|
||||
else
|
||||
mTimer.start(getMaxIdleTimeoutMs() - msSinceUserInput);
|
||||
}
|
||||
|
||||
void IdlenessWatcher::restartTimer()
|
||||
{
|
||||
qDebug() << ">>> Timer Restarted, waiting: " << getMaxIdleTimeoutMs() << "msecs";
|
||||
mTimer.start(getMaxIdleTimeoutMs());
|
||||
}
|
||||
|
||||
void IdlenessWatcher::screenUnlocked(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
|
||||
mIsLocked = false;
|
||||
emit ActiveChanged(false);
|
||||
|
||||
if (exitCode == 0)
|
||||
{
|
||||
restartTimer();
|
||||
}
|
||||
else
|
||||
{
|
||||
mErrorNotification.setSummary(tr("ERROR: Screen unlocked"));
|
||||
if (exitStatus == QProcess::NormalExit)
|
||||
mErrorNotification.setBody(tr("Locking program \"%1\" exited with error code %2").arg(mLockCommand).arg(exitCode));
|
||||
else
|
||||
mErrorNotification.setBody(tr("Locking program \"%1\" crashed with error code %2").arg(mLockCommand).arg(exitCode));
|
||||
mErrorNotification.update();
|
||||
mTimer.stop();
|
||||
connect(&mErrorNotification, SIGNAL(notificationClosed(CloseReason)), SLOT(idleTimeout()));
|
||||
}
|
||||
}
|
||||
|
||||
void IdlenessWatcher::notificationAction(int num)
|
||||
{
|
||||
switch (num)
|
||||
{
|
||||
case 0: // "Configure"
|
||||
QProcess::startDetached("lxqt-config-screenlocker");
|
||||
}
|
||||
}
|
||||
|
||||
void IdlenessWatcher::serviceUnregistered(const QString& service)
|
||||
{
|
||||
for (QMutableMapIterator<uint, QString> iter(mInhibitors); iter.hasNext();)
|
||||
{
|
||||
if (iter.next().value() == service)
|
||||
{
|
||||
qDebug() << "Service unregistered:" << iter.value();
|
||||
mDBusWatcher.removeWatchedService(iter.value());
|
||||
iter.remove();
|
||||
}
|
||||
}
|
||||
|
||||
if (mInhibitors.isEmpty())
|
||||
restartTimer();
|
||||
}
|
||||
|
||||
/* ---------- D-Bus methods ---------- */
|
||||
|
||||
void IdlenessWatcher::Lock()
|
||||
{
|
||||
// lockScreen();
|
||||
}
|
||||
|
||||
uint IdlenessWatcher::GetSessionIdleTime()
|
||||
{
|
||||
return getIdleTimeMs() / 1000;
|
||||
}
|
||||
|
||||
uint IdlenessWatcher::GetActiveTime()
|
||||
{
|
||||
if (!mIsLocked)
|
||||
return 0;
|
||||
return mLockTime.secsTo(QDateTime::currentDateTime());
|
||||
}
|
||||
|
||||
bool IdlenessWatcher::GetActive()
|
||||
{
|
||||
return mIsLocked;
|
||||
}
|
||||
|
||||
bool IdlenessWatcher::SetActive(bool activate)
|
||||
{
|
||||
//if (!activate)
|
||||
return false;
|
||||
//return lockScreen();
|
||||
}
|
||||
|
||||
void IdlenessWatcher::SimulateUserActivity()
|
||||
{
|
||||
restartTimer();
|
||||
}
|
||||
|
||||
uint IdlenessWatcher::Inhibit(const QString& applicationName, const QString& reasonForInhibit)
|
||||
{
|
||||
mInhibitorCookie++;
|
||||
QString service(this->message().service());
|
||||
qDebug() << "*** Inhibit by" << applicationName << ":" << reasonForInhibit << ". Service:" << service << "->" << mInhibitorCookie;
|
||||
mDBusWatcher.addWatchedService(service);
|
||||
qDebug() << mDBusWatcher.watchedServices();
|
||||
mInhibitors.insert(mInhibitorCookie, service);
|
||||
mTimer.stop();
|
||||
return mInhibitorCookie;
|
||||
}
|
||||
|
||||
void IdlenessWatcher::UnInhibit(uint cookie)
|
||||
{
|
||||
qDebug() << "*** Uninhibit" << cookie;
|
||||
mDBusWatcher.removeWatchedService(mInhibitors.value(cookie));
|
||||
mInhibitors.remove(cookie);
|
||||
|
||||
if (mInhibitors.isEmpty())
|
||||
restartTimer();
|
||||
}
|
||||
|
||||
uint IdlenessWatcher::Throttle(const QString& applicationName, const QString& reasonForThrottle)
|
||||
{
|
||||
Q_UNUSED(applicationName);
|
||||
Q_UNUSED(reasonForThrottle);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void IdlenessWatcher::UnThrottle(uint cookie)
|
||||
{
|
||||
Q_UNUSED(cookie);
|
||||
}
|
@ -1,91 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright (C) 2013 Alec Moskvin <alecm@gmx.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#ifndef IDLENESSWATCHER_H
|
||||
#define IDLENESSWATCHER_H
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <QMap>
|
||||
#include <QTimer>
|
||||
#include <QProcess>
|
||||
#include <QDateTime>
|
||||
#include <QDBusContext>
|
||||
#include <QDBusServiceWatcher>
|
||||
|
||||
#include <LXQt/Settings>
|
||||
#include <LXQt/Notification>
|
||||
|
||||
#include "../config/powermanagementsettings.h"
|
||||
#include "watcher.h"
|
||||
|
||||
class IdlenessWatcher : public Watcher, protected QDBusContext
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit IdlenessWatcher(QObject* parent = 0);
|
||||
|
||||
signals:
|
||||
void ActiveChanged(bool in0);
|
||||
|
||||
public slots:
|
||||
void Lock();
|
||||
uint GetSessionIdleTime();
|
||||
uint GetActiveTime();
|
||||
bool GetActive();
|
||||
bool SetActive(bool activate);
|
||||
void SimulateUserActivity();
|
||||
uint Inhibit(const QString& applicationName, const QString& reasonForInhibit);
|
||||
void UnInhibit(uint cookie);
|
||||
uint Throttle(const QString& applicationName, const QString& reasonForThrottle);
|
||||
void UnThrottle(uint cookie);
|
||||
|
||||
private slots:
|
||||
void idleTimeout();
|
||||
void screenUnlocked(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void notificationAction(int num);
|
||||
void serviceUnregistered(const QString& service);
|
||||
void restartTimer();
|
||||
|
||||
private:
|
||||
uint getIdleTimeMs();
|
||||
uint getMaxIdleTimeoutMs();
|
||||
|
||||
static xcb_screen_t* screenOfDisplay(xcb_connection_t* mConn, int screen);
|
||||
|
||||
PowerManagementSettings mPSettings;
|
||||
QTimer mTimer;
|
||||
QProcess mLockProcess;
|
||||
LxQt::Notification mErrorNotification;
|
||||
QString mLockCommand;
|
||||
QDateTime mLockTime;
|
||||
QMap<uint,QString> mInhibitors;
|
||||
QDBusServiceWatcher mDBusWatcher;
|
||||
xcb_connection_t* mConn;
|
||||
xcb_screen_t* mScreen;
|
||||
uint mInhibitorCookie;
|
||||
bool mIsLocked;
|
||||
bool mTurnOffDisplay;
|
||||
};
|
||||
|
||||
#endif // IDLENESSWATCHER_H
|
74
src/lid.cpp
74
src/lid.cpp
@ -1,74 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2011 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusReply>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
#include "lid.h"
|
||||
|
||||
Lid::Lid()
|
||||
{
|
||||
mUPowerInterface = new QDBusInterface("org.freedesktop.UPower", "/org/freedesktop/UPower", "org.freedesktop.UPower",
|
||||
QDBusConnection::systemBus(), this);
|
||||
mUPowerPropertiesInterface = new QDBusInterface("org.freedesktop.UPower", "/org/freedesktop/UPower", "org.freedesktop.DBus.Properties",
|
||||
QDBusConnection::systemBus(), this);
|
||||
if (! connect(mUPowerInterface, SIGNAL(Changed()), this, SLOT(uPowerChange())))
|
||||
{
|
||||
qDebug() << "Could not connect to org.freedesktop.UPower.changed(), connecting to org.freedesktop.DBus.Properties.PropertiesChanged(..) instead";
|
||||
QDBusConnection::systemBus().connect("org.freedesktop.UPower",
|
||||
"/org/freedesktop/UPower",
|
||||
"org.freedesktop.DBus.Properties",
|
||||
"PropertiesChanged",
|
||||
this,
|
||||
SLOT(uPowerChange()));
|
||||
}
|
||||
|
||||
mIsClosed = mUPowerPropertiesInterface->property("LidIsClosed").toBool();
|
||||
}
|
||||
|
||||
bool Lid::haveLid()
|
||||
{
|
||||
return mUPowerInterface->property("LidIsPresent").toBool();
|
||||
}
|
||||
|
||||
bool Lid::onBattery()
|
||||
{
|
||||
return mUPowerInterface->property("OnBattery").toBool();
|
||||
}
|
||||
|
||||
|
||||
void Lid::uPowerChange()
|
||||
{
|
||||
bool newIsClosed = mUPowerInterface->property("LidIsClosed").toBool();
|
||||
if (newIsClosed != mIsClosed)
|
||||
{
|
||||
mIsClosed = newIsClosed;
|
||||
emit changed(mIsClosed);
|
||||
}
|
||||
}
|
54
src/lid.h
54
src/lid.h
@ -1,54 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2011 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
#ifndef LID_H
|
||||
#define LID_H
|
||||
|
||||
#include <QDBusInterface>
|
||||
|
||||
class Lid : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
signals:
|
||||
void changed(bool closed);
|
||||
|
||||
public:
|
||||
Lid();
|
||||
bool haveLid();
|
||||
bool onBattery();
|
||||
bool isClosed() { return mIsClosed; }
|
||||
|
||||
private:
|
||||
bool mIsClosed;
|
||||
QDBusInterface *mUPowerInterface;
|
||||
QDBusInterface *mUPowerPropertiesInterface;
|
||||
|
||||
private slots:
|
||||
void uPowerChange();
|
||||
};
|
||||
|
||||
#endif // LID_H
|
@ -1,127 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QTimer>
|
||||
#include <QCoreApplication>
|
||||
#include <QProcess>
|
||||
#include <QDebug>
|
||||
#include <QDBusInterface>
|
||||
#include <QDBusReply>
|
||||
|
||||
#include "lidwatcher.h"
|
||||
#include "../config/powermanagementsettings.h"
|
||||
|
||||
LidWatcher::LidWatcher(QObject *parent) : Watcher(parent)
|
||||
{
|
||||
inhibitSystemdLogin();
|
||||
connect(&mLid, SIGNAL(changed(bool)), this, SLOT(lidChanged(bool)));
|
||||
}
|
||||
|
||||
LidWatcher::~LidWatcher(){
|
||||
}
|
||||
|
||||
void LidWatcher::lidChanged(bool closed)
|
||||
{
|
||||
if (closed)
|
||||
{
|
||||
doAction(action());
|
||||
}
|
||||
}
|
||||
|
||||
int LidWatcher::action()
|
||||
{
|
||||
if (mSettings.isEnableExtMonLidClosedActions() && externalMonitorPlugged())
|
||||
{
|
||||
if (mLid.onBattery())
|
||||
{
|
||||
return mSettings.getLidClosedExtMonAction();
|
||||
}
|
||||
else
|
||||
{
|
||||
return mSettings.getLidClosedExtMonAcAction();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mLid.onBattery())
|
||||
{
|
||||
return mSettings.getLidClosedAction();
|
||||
}
|
||||
else
|
||||
{
|
||||
return mSettings.getLidClosedAcAction();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool LidWatcher::externalMonitorPlugged()
|
||||
{
|
||||
int monitorCount = 0;
|
||||
|
||||
QProcess xrandr(this);
|
||||
xrandr.start("xrandr", QIODevice::ReadOnly);
|
||||
xrandr.waitForFinished(1000);
|
||||
|
||||
if (xrandr.exitCode() != 0)
|
||||
{
|
||||
return false; // Well, what to do?
|
||||
}
|
||||
|
||||
QTextStream xrandr_stdout(&xrandr);
|
||||
while (!xrandr_stdout.atEnd())
|
||||
{
|
||||
QString line = xrandr_stdout.readLine();
|
||||
qDebug() << ">>" << line;
|
||||
if (line.indexOf(" connected", 0) > -1)
|
||||
{
|
||||
monitorCount++;
|
||||
}
|
||||
}
|
||||
|
||||
qDebug() << "monitorCount: " << monitorCount;
|
||||
|
||||
return monitorCount >= 2;
|
||||
}
|
||||
|
||||
void LidWatcher::inhibitSystemdLogin()
|
||||
{
|
||||
QDBusInterface manager("org.freedesktop.login1",
|
||||
"/org/freedesktop/login1",
|
||||
"org.freedesktop.login1.Manager",
|
||||
QDBusConnection::systemBus(), this);
|
||||
QDBusReply<QDBusUnixFileDescriptor> reply = manager.call("Inhibit", "handle-lid-switch", "lxqt-powermanagment", "LidWatcher is in da house!", "block");
|
||||
if (reply.isValid())
|
||||
{
|
||||
logindLock = reply.value();
|
||||
qDebug() << "Inhibit got:" << logindLock.fileDescriptor();
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << "Error from inhibit:" << reply.error();
|
||||
}
|
||||
}
|
||||
|
@ -1,61 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2012 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
#ifndef LIDWATCHER_H
|
||||
#define LIDWATCHER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QTime>
|
||||
#include <QDBusUnixFileDescriptor>
|
||||
|
||||
#include <LXQt/Power>
|
||||
|
||||
#include "../config/powermanagementsettings.h"
|
||||
#include "watcher.h"
|
||||
#include "lid.h"
|
||||
|
||||
class LidWatcher : public Watcher
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LidWatcher(QObject *parent = 0);
|
||||
virtual ~LidWatcher();
|
||||
|
||||
private slots:
|
||||
void lidChanged(bool closed);
|
||||
|
||||
private:
|
||||
int action();
|
||||
bool externalMonitorPlugged();
|
||||
void inhibitSystemdLogin();
|
||||
|
||||
Lid mLid;
|
||||
LxQt::Power mLxQtPower;
|
||||
PowerManagementSettings mSettings;
|
||||
QDBusUnixFileDescriptor logindLock;
|
||||
};
|
||||
|
||||
#endif // LIDWATCHER_H
|
52
src/main.cpp
52
src/main.cpp
@ -1,52 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
*
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QDBusConnection>
|
||||
#include <QDebug>
|
||||
|
||||
#include <LXQt/Application>
|
||||
|
||||
#include "powermanagementd.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
LxQt::Application a(argc, argv);
|
||||
a.setQuitOnLastWindowClosed(false);
|
||||
|
||||
// To ensure only one instance of lxqt-powermanagement is running we register as a DBus service and refuse to run
|
||||
// if not able to do so.
|
||||
// We do not register any object as we don't have any dbus-operations to expose.
|
||||
if (! QDBusConnection::sessionBus().registerService("org.lxqt.lxqt-powermanagement"))
|
||||
{
|
||||
qWarning() << "Unable to register 'org.lxqt.lxqt-powermanagement' service - is another instance of lxqt-powermanagement running?";
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
PowerManagementd powerManagementd;
|
||||
return a.exec();
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node>
|
||||
<interface name="org.freedesktop.ScreenSaver">
|
||||
<signal name="ActiveChanged">
|
||||
<arg type="b"/>
|
||||
</signal>
|
||||
<method name="Lock">
|
||||
</method>
|
||||
<method name="SimulateUserActivity">
|
||||
</method>
|
||||
<method name="GetActive">
|
||||
<arg type="b" direction="out"/>
|
||||
</method>
|
||||
<method name="GetActiveTime">
|
||||
<arg name="seconds" type="u" direction="out"/>
|
||||
</method>
|
||||
<method name="GetSessionIdleTime">
|
||||
<arg name="seconds" type="u" direction="out"/>
|
||||
</method>
|
||||
<method name="SetActive">
|
||||
<arg type="b" direction="out"/>
|
||||
<arg name="e" type="b" direction="in"/>
|
||||
</method>
|
||||
<method name="Inhibit">
|
||||
<arg name="application_name" type="s" direction="in"/>
|
||||
<arg name="reason_for_inhibit" type="s" direction="in"/>
|
||||
<arg name="cookie" type="u" direction="out"/>
|
||||
</method>
|
||||
<method name="UnInhibit">
|
||||
<arg name="cookie" type="u" direction="in"/>
|
||||
</method>
|
||||
<method name="Throttle">
|
||||
<arg name="application_name" type="s" direction="in"/>
|
||||
<arg name="reason_for_throttle" type="s" direction="in"/>
|
||||
<arg name="cookie" type="u" direction="out"/>
|
||||
</method>
|
||||
<method name="UnThrottle">
|
||||
<arg name="cookie" type="u" direction="in"/>
|
||||
</method>
|
||||
</interface>
|
||||
</node>
|
@ -1,113 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
*
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QDebug>
|
||||
#include <QStringList>
|
||||
|
||||
#include "batteryhelper.h"
|
||||
#include "powermanagementd.h"
|
||||
#include "../config/powermanagementsettings.h"
|
||||
#include "idlenesswatcher.h"
|
||||
#include "lidwatcher.h"
|
||||
#include "batterywatcher.h"
|
||||
|
||||
#define CURRENT_RUNCHECK_LEVEL 1
|
||||
|
||||
PowerManagementd::PowerManagementd() :
|
||||
mBatterywatcherd(0),
|
||||
mLidwatcherd(0),
|
||||
mIdlenesswatcherd(0),
|
||||
mSettings()
|
||||
{
|
||||
connect(&mSettings, SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
||||
settingsChanged();
|
||||
|
||||
if (mSettings.getRunCheckLevel() < CURRENT_RUNCHECK_LEVEL)
|
||||
{
|
||||
performRunCheck();
|
||||
mSettings.setRunCheckLevel(CURRENT_RUNCHECK_LEVEL);
|
||||
}
|
||||
}
|
||||
|
||||
PowerManagementd::~PowerManagementd()
|
||||
{
|
||||
}
|
||||
|
||||
void PowerManagementd::settingsChanged()
|
||||
{
|
||||
if (mSettings.isBatteryWatcherEnabled() && !mBatterywatcherd)
|
||||
mBatterywatcherd = new BatteryWatcher(this);
|
||||
else if (mBatterywatcherd && ! mSettings.isBatteryWatcherEnabled())
|
||||
{
|
||||
mBatterywatcherd->deleteLater();
|
||||
mBatterywatcherd = 0;
|
||||
}
|
||||
|
||||
if (mSettings.isLidWatcherEnabled() && !mLidwatcherd)
|
||||
{
|
||||
mLidwatcherd = new LidWatcher(this);
|
||||
}
|
||||
else if (mLidwatcherd && ! mSettings.isLidWatcherEnabled())
|
||||
{
|
||||
mLidwatcherd->deleteLater();
|
||||
mLidwatcherd = 0;
|
||||
}
|
||||
|
||||
if (mSettings.isIdlenessWatcherEnabled() && !mIdlenesswatcherd)
|
||||
{
|
||||
mIdlenesswatcherd = new IdlenessWatcher(this);
|
||||
}
|
||||
else if (mIdlenesswatcherd && !mSettings.isIdlenessWatcherEnabled())
|
||||
{
|
||||
mIdlenesswatcherd->deleteLater();
|
||||
mIdlenesswatcherd = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void PowerManagementd::runConfigure()
|
||||
{
|
||||
mNotification.close();
|
||||
QProcess::startDetached("lxqt-config-powermanagement");
|
||||
}
|
||||
|
||||
void PowerManagementd::performRunCheck()
|
||||
{
|
||||
mSettings.setLidWatcherEnabled(Lid().haveLid());
|
||||
bool hasBattery = false;
|
||||
foreach (Solid::Device device, Solid::Device::listFromType(Solid::DeviceInterface::Battery, QString()))
|
||||
if (device.as<Solid::Battery>()->type() == Solid::Battery::PrimaryBattery)
|
||||
hasBattery = true;
|
||||
mSettings.setBatteryWatcherEnabled(hasBattery);
|
||||
mSettings.setIdlenessWatcherEnabled(true);
|
||||
mSettings.sync();
|
||||
|
||||
mNotification.setSummary(tr("Power Management"));
|
||||
mNotification.setBody(tr("You are running LXQt Power Management for the first time.\nYou can configure it from settings... "));
|
||||
mNotification.setActions(QStringList() << tr("Configure..."));
|
||||
mNotification.setTimeout(10000);
|
||||
connect(&mNotification, SIGNAL(actionActivated(int)), SLOT(runConfigure()));
|
||||
mNotification.update();
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
/*
|
||||
* File: powermanagementd.h
|
||||
* Author: Christian Surlykke
|
||||
*
|
||||
* Created on 9. februar 2014, 16:15
|
||||
*/
|
||||
|
||||
#ifndef POWERMANAGEMENTD_H
|
||||
#define POWERMANAGEMENTD_H
|
||||
|
||||
#include <LXQt/Notification>
|
||||
|
||||
#include "../config/powermanagementsettings.h"
|
||||
|
||||
class BatteryWatcher;
|
||||
class LidWatcher;
|
||||
class IdlenessWatcher;
|
||||
|
||||
class PowerManagementd : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PowerManagementd();
|
||||
virtual ~PowerManagementd();
|
||||
|
||||
private slots:
|
||||
void settingsChanged();
|
||||
void runConfigure();
|
||||
|
||||
private:
|
||||
void performRunCheck();
|
||||
|
||||
BatteryWatcher* mBatterywatcherd;
|
||||
LidWatcher* mLidwatcherd;
|
||||
IdlenessWatcher* mIdlenesswatcherd;
|
||||
|
||||
PowerManagementSettings mSettings;
|
||||
LxQt::Notification mNotification;
|
||||
};
|
||||
|
||||
#endif /* POWERMANAGEMENTD_H */
|
||||
|
@ -1,259 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>Battery</name>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="136"/>
|
||||
<source>Charging</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="137"/>
|
||||
<source>Discharging</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="138"/>
|
||||
<source>Empty</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="139"/>
|
||||
<source>Fully charged</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="140"/>
|
||||
<source>Pending charge</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="141"/>
|
||||
<source>Pending discharge</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="142"/>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BatteryInfo</name>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="14"/>
|
||||
<source>Power Management</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="25"/>
|
||||
<source>Battery info</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="40"/>
|
||||
<source>Energy Now:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="62"/>
|
||||
<source>Updated:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="72"/>
|
||||
<source>Technology:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="82"/>
|
||||
<source>Model:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="92"/>
|
||||
<source>Energy rate:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="102"/>
|
||||
<source>Voltage:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="112"/>
|
||||
<source>Energy Full, Design:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="129"/>
|
||||
<source>Energy Full:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="181"/>
|
||||
<source>State:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="74"/>
|
||||
<source>Lithium ion</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="75"/>
|
||||
<source>Lithium polymer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="76"/>
|
||||
<source>Lithium iron phosphate</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="77"/>
|
||||
<source>Lead acid</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="78"/>
|
||||
<source>Nickel cadmium</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="79"/>
|
||||
<source>Nickel metal hydride</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="80"/>
|
||||
<source>Unknown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BatteryWatcher</name>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="49"/>
|
||||
<source>No battery!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="50"/>
|
||||
<source>LXQt could not find data about any battery - monitoring disabled</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="91"/>
|
||||
<source>Power low!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="103"/>
|
||||
<source>Suspending in %1 seconds</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="106"/>
|
||||
<source>Hibernating in %1 seconds</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="109"/>
|
||||
<source>Shutting down in %1 seconds</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IdlenessWatcher</name>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="50"/>
|
||||
<source>LxQt Idleness watcher failed to start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="73"/>
|
||||
<source>D-Bus interface org.freedesktop.ScreenSaver is already registered</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="106"/>
|
||||
<source>The X11 Screensaver extension is not usable</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="113"/>
|
||||
<source>Configure...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="181"/>
|
||||
<source>ERROR: Screen unlocked</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="183"/>
|
||||
<source>Locking program "%1" exited with error code %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="185"/>
|
||||
<source>Locking program "%1" crashed with error code %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PowerManagementd</name>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="104"/>
|
||||
<source>Power Management</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="105"/>
|
||||
<source>You are running LXQt Power Management for the first time.
|
||||
You can configure it from settings... </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="106"/>
|
||||
<source>Configure...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TrayIcon</name>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="132"/>
|
||||
<source>Configure</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="133"/>
|
||||
<location filename="../trayicon.cpp" line="167"/>
|
||||
<source>About</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="134"/>
|
||||
<source>Disable icon</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="154"/>
|
||||
<source>discharging</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="154"/>
|
||||
<source>charging</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="168"/>
|
||||
<source><p> <b>LXQt Powermanagement</b><br/> - Powermanagement for the LXQt Desktop Environment</p><p> Authors:<br/> &nbsp; Christian Surlykke, Alec Moskvin<br/> &nbsp; - and others from the Razor and LXQt projects</p><p> Copyright &copy; 2012-2014</p></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,260 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="hu_HU">
|
||||
<context>
|
||||
<name>Battery</name>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="136"/>
|
||||
<source>Charging</source>
|
||||
<translation>Töltés</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="137"/>
|
||||
<source>Discharging</source>
|
||||
<translation>Kisütés</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="138"/>
|
||||
<source>Empty</source>
|
||||
<translation>Üres</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="139"/>
|
||||
<source>Fully charged</source>
|
||||
<translation>Teletöltve</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="140"/>
|
||||
<source>Pending charge</source>
|
||||
<translation>Tölthetőség</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="141"/>
|
||||
<source>Pending discharge</source>
|
||||
<translation>Kisüthetőség</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="142"/>
|
||||
<source>Unknown</source>
|
||||
<translation>Ismeretlen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BatteryInfo</name>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="14"/>
|
||||
<source>Power Management</source>
|
||||
<translation>Energiakezelés</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="25"/>
|
||||
<source>Battery info</source>
|
||||
<translation>Akkumulátor információ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="40"/>
|
||||
<source>Energy Now:</source>
|
||||
<translation>Állapot:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="62"/>
|
||||
<source>Updated:</source>
|
||||
<translation>Frissítve:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="72"/>
|
||||
<source>Technology:</source>
|
||||
<translation>Technológia:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="82"/>
|
||||
<source>Model:</source>
|
||||
<translation>Modell:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="92"/>
|
||||
<source>Energy rate:</source>
|
||||
<translation>Energiaállapot:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="102"/>
|
||||
<source>Voltage:</source>
|
||||
<translation>Feszültség:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="112"/>
|
||||
<source>Energy Full, Design:</source>
|
||||
<translation>Névleges kapacitás: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="129"/>
|
||||
<source>Energy Full:</source>
|
||||
<translation>Teljes kapacitás:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="181"/>
|
||||
<source>State:</source>
|
||||
<translation>Állapot:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="74"/>
|
||||
<source>Lithium ion</source>
|
||||
<translation>Lítium ion</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="75"/>
|
||||
<source>Lithium polymer</source>
|
||||
<translation>Lítium polimer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="76"/>
|
||||
<source>Lithium iron phosphate</source>
|
||||
<translation>Lítium vasfoszfát</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="77"/>
|
||||
<source>Lead acid</source>
|
||||
<translation>Savas ólom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="78"/>
|
||||
<source>Nickel cadmium</source>
|
||||
<translation>Nikkel kadmium</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="79"/>
|
||||
<source>Nickel metal hydride</source>
|
||||
<translation>Nikkel fémhidrid</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="80"/>
|
||||
<source>Unknown</source>
|
||||
<translation>Ismeretlen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BatteryWatcher</name>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="49"/>
|
||||
<source>No battery!</source>
|
||||
<translation>Nincs akku!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="50"/>
|
||||
<source>LXQt could not find data about any battery - monitoring disabled</source>
|
||||
<translation>Az LXQt nem ismert fel akkut - figyelés tiltva</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="91"/>
|
||||
<source>Power low!</source>
|
||||
<translation>Alacsony feszültség!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="103"/>
|
||||
<source>Suspending in %1 seconds</source>
|
||||
<translation>%1 másodperc múlva készülség</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="106"/>
|
||||
<source>Hibernating in %1 seconds</source>
|
||||
<translation>%1 másodperc múlva mélykészenlét</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="109"/>
|
||||
<source>Shutting down in %1 seconds</source>
|
||||
<translation>%1 másodperc múlva kikapcsolás</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IdlenessWatcher</name>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="50"/>
|
||||
<source>LxQt Idleness watcher failed to start</source>
|
||||
<translation>Az LXQt tétlenség figyelő indítása sikertelen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="73"/>
|
||||
<source>D-Bus interface org.freedesktop.ScreenSaver is already registered</source>
|
||||
<translation>A D-Bus interface org.freedesktop.ScreenSaver imár regisztrálva van.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="106"/>
|
||||
<source>The X11 Screensaver extension is not usable</source>
|
||||
<translation>Az X11 képernyővédő bővítmény használhatatlan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="113"/>
|
||||
<source>Configure...</source>
|
||||
<translation>Beállítás...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="181"/>
|
||||
<source>ERROR: Screen unlocked</source>
|
||||
<translation>HIBA: A képernyő nem zárolt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="183"/>
|
||||
<source>Locking program "%1" exited with error code %2</source>
|
||||
<translation>A"%1" program %2 hibakóddal kilépett</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="185"/>
|
||||
<source>Locking program "%1" crashed with error code %2</source>
|
||||
<translation>A"%1" program %2 hibakóddal összeomlott</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PowerManagementd</name>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="104"/>
|
||||
<source>Power Management</source>
|
||||
<translation>Energiakezelés</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="105"/>
|
||||
<source>You are running LXQt Power Management for the first time.
|
||||
You can configure it from settings... </source>
|
||||
<translation>Az LXQt energiakezelő első alkalommal fut.
|
||||
A beállításokban konfigurálható...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="106"/>
|
||||
<source>Configure...</source>
|
||||
<translation>Beállítás...</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TrayIcon</name>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="132"/>
|
||||
<source>Configure</source>
|
||||
<translation>Beállítás</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="133"/>
|
||||
<location filename="../trayicon.cpp" line="167"/>
|
||||
<source>About</source>
|
||||
<translation>Rólunk</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="134"/>
|
||||
<source>Disable icon</source>
|
||||
<translation>Ikon tiltása</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="154"/>
|
||||
<source>discharging</source>
|
||||
<translation>kisütés</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="154"/>
|
||||
<source>charging</source>
|
||||
<translation>töltés</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="168"/>
|
||||
<source><p> <b>LXQt Powermanagement</b><br/> - Powermanagement for the LXQt Desktop Environment</p><p> Authors:<br/> &nbsp; Christian Surlykke, Alec Moskvin<br/> &nbsp; - and others from the Razor and LXQt projects</p><p> Copyright &copy; 2012-2014</p></source>
|
||||
<translation><p> <b>LXQt energiakezelő</b><br/> - Energiakezelő az LXQt asztal részére</p><p> Szerzők:<br/> &nbsp; Christian Surlykke, Alec Moskvin<br/> &nbsp; - és még többen a Razor és LXQt fejlesztőiből.</p><p> Copyright &copy; 2012-2014</p></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,259 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ja">
|
||||
<context>
|
||||
<name>Battery</name>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="136"/>
|
||||
<source>Charging</source>
|
||||
<translation>充電中</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="137"/>
|
||||
<source>Discharging</source>
|
||||
<translation>放電中</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="138"/>
|
||||
<source>Empty</source>
|
||||
<translation>空</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="139"/>
|
||||
<source>Fully charged</source>
|
||||
<translation>満充電</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="140"/>
|
||||
<source>Pending charge</source>
|
||||
<translation>充電中断中</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="141"/>
|
||||
<source>Pending discharge</source>
|
||||
<translation>放電中断中</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="142"/>
|
||||
<source>Unknown</source>
|
||||
<translation>不明</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BatteryInfo</name>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="14"/>
|
||||
<source>Power Management</source>
|
||||
<translation>電源管理</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="25"/>
|
||||
<source>Battery info</source>
|
||||
<translation>バッテリー情報</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="40"/>
|
||||
<source>Energy Now:</source>
|
||||
<translation>現在の容量:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="62"/>
|
||||
<source>Updated:</source>
|
||||
<translation>更新:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="72"/>
|
||||
<source>Technology:</source>
|
||||
<translation>技術:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="82"/>
|
||||
<source>Model:</source>
|
||||
<translation>型式:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="92"/>
|
||||
<source>Energy rate:</source>
|
||||
<translation>エネルギー率:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="102"/>
|
||||
<source>Voltage:</source>
|
||||
<translation>電圧:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="112"/>
|
||||
<source>Energy Full, Design:</source>
|
||||
<translation>満エネルギー、デザイン:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="129"/>
|
||||
<source>Energy Full:</source>
|
||||
<translation>満エネルギー:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="181"/>
|
||||
<source>State:</source>
|
||||
<translation>状態:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="74"/>
|
||||
<source>Lithium ion</source>
|
||||
<translation>リチウムイオン</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="75"/>
|
||||
<source>Lithium polymer</source>
|
||||
<translation>リチウムポリマー</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="76"/>
|
||||
<source>Lithium iron phosphate</source>
|
||||
<translation>リン酸鉄リチウム</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="77"/>
|
||||
<source>Lead acid</source>
|
||||
<translation>鉛蓄電池</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="78"/>
|
||||
<source>Nickel cadmium</source>
|
||||
<translation>ニッカド</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="79"/>
|
||||
<source>Nickel metal hydride</source>
|
||||
<translation>ニッケル水素</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="80"/>
|
||||
<source>Unknown</source>
|
||||
<translation>不明</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BatteryWatcher</name>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="49"/>
|
||||
<source>No battery!</source>
|
||||
<translation>バッテリーがありません!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="50"/>
|
||||
<source>LXQt could not find data about any battery - monitoring disabled</source>
|
||||
<translation>バッテリーのデーターを見つけられませんので、監視機能は無効です</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="91"/>
|
||||
<source>Power low!</source>
|
||||
<translation>電源が少なくなっています!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="103"/>
|
||||
<source>Suspending in %1 seconds</source>
|
||||
<translation>%1秒でサスペンドに入ります</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="106"/>
|
||||
<source>Hibernating in %1 seconds</source>
|
||||
<translation>%1秒でハイバネートに入ります</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="109"/>
|
||||
<source>Shutting down in %1 seconds</source>
|
||||
<translation>%1秒でシャットダウンします</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IdlenessWatcher</name>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="50"/>
|
||||
<source>LxQt Idleness watcher failed to start</source>
|
||||
<translation>LXQtのアイドル状態監視は始動に失敗しました</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="73"/>
|
||||
<source>D-Bus interface org.freedesktop.ScreenSaver is already registered</source>
|
||||
<translation>D-Busインターフェース org.freedesktop.ScreenSaver が既に登録されています</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="106"/>
|
||||
<source>The X11 Screensaver extension is not usable</source>
|
||||
<translation>X11スクリーンセーバー拡張を使えません</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="113"/>
|
||||
<source>Configure...</source>
|
||||
<translation>設定する</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="181"/>
|
||||
<source>ERROR: Screen unlocked</source>
|
||||
<translation>エラー: スクリーンのロックが解除されました</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="183"/>
|
||||
<source>Locking program "%1" exited with error code %2</source>
|
||||
<translation>ロック用プログラム "%1" は、エラーコード %2 により終了しました</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="185"/>
|
||||
<source>Locking program "%1" crashed with error code %2</source>
|
||||
<translation>ロック用プログラム "%1" は、エラーコード %2 によりクラッシュしました</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PowerManagementd</name>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="104"/>
|
||||
<source>Power Management</source>
|
||||
<translation>電源管理</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="105"/>
|
||||
<source>You are running LXQt Power Management for the first time.
|
||||
You can configure it from settings... </source>
|
||||
<translation>LXQt電源管理は初めて実行されましたので、設定を行ってください</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="106"/>
|
||||
<source>Configure...</source>
|
||||
<translation>設定する</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TrayIcon</name>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="132"/>
|
||||
<source>Configure</source>
|
||||
<translation>設定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="133"/>
|
||||
<location filename="../trayicon.cpp" line="167"/>
|
||||
<source>About</source>
|
||||
<translation>情報</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="134"/>
|
||||
<source>Disable icon</source>
|
||||
<translation>アイコンを無効</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="154"/>
|
||||
<source>discharging</source>
|
||||
<translation>放電中</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="154"/>
|
||||
<source>charging</source>
|
||||
<translation>充電中</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="168"/>
|
||||
<source><p> <b>LXQt Powermanagement</b><br/> - Powermanagement for the LXQt Desktop Environment</p><p> Authors:<br/> &nbsp; Christian Surlykke, Alec Moskvin<br/> &nbsp; - and others from the Razor and LXQt projects</p><p> Copyright &copy; 2012-2014</p></source>
|
||||
<translation><p> <b>LXQt Powermanagement</b><br/> - LXQtデスクトップ環境の電源管理</p><p> 作者:<br/> &nbsp; Christian Surlykke, Alec Moskvin<br/> &nbsp; - その他 Razor-qtおよびLXQtプロジェクトのメンバー</p><p> Copyright &copy; 2012-2014</p></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,260 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="pl_PL">
|
||||
<context>
|
||||
<name>Battery</name>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="136"/>
|
||||
<source>Charging</source>
|
||||
<translation>Ładowanie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="137"/>
|
||||
<source>Discharging</source>
|
||||
<translation>Rozładowywanie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="138"/>
|
||||
<source>Empty</source>
|
||||
<translation>Pusta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="139"/>
|
||||
<source>Fully charged</source>
|
||||
<translation>W pełni naładowana</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="140"/>
|
||||
<source>Pending charge</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="141"/>
|
||||
<source>Pending discharge</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="142"/>
|
||||
<source>Unknown</source>
|
||||
<translation>Nieznana</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BatteryInfo</name>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="14"/>
|
||||
<source>Power Management</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="25"/>
|
||||
<source>Battery info</source>
|
||||
<translation>Informacje o baterii</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="40"/>
|
||||
<source>Energy Now:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="62"/>
|
||||
<source>Updated:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="72"/>
|
||||
<source>Technology:</source>
|
||||
<translation>Technologia:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="82"/>
|
||||
<source>Model:</source>
|
||||
<translation>Model:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="92"/>
|
||||
<source>Energy rate:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="102"/>
|
||||
<source>Voltage:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="112"/>
|
||||
<source>Energy Full, Design:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="129"/>
|
||||
<source>Energy Full:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="181"/>
|
||||
<source>State:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="74"/>
|
||||
<source>Lithium ion</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="75"/>
|
||||
<source>Lithium polymer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="76"/>
|
||||
<source>Lithium iron phosphate</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="77"/>
|
||||
<source>Lead acid</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="78"/>
|
||||
<source>Nickel cadmium</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="79"/>
|
||||
<source>Nickel metal hydride</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="80"/>
|
||||
<source>Unknown</source>
|
||||
<translation>Nieznana</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BatteryWatcher</name>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="49"/>
|
||||
<source>No battery!</source>
|
||||
<translation>Brak baterii!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="50"/>
|
||||
<source>LXQt could not find data about any battery - monitoring disabled</source>
|
||||
<translation>LXQt nie znalazł danych o żadnej baterii - monitorowanie wyłączone</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="91"/>
|
||||
<source>Power low!</source>
|
||||
<translation>Niski poziom zasilania!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="103"/>
|
||||
<source>Suspending in %1 seconds</source>
|
||||
<translation>Wstrzymanie nastąpi w ciągu %1 sekund</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="106"/>
|
||||
<source>Hibernating in %1 seconds</source>
|
||||
<translation>Hibernacja nastąpi w ciągu %1 sekund</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="109"/>
|
||||
<source>Shutting down in %1 seconds</source>
|
||||
<translation>Wyłączenie systemu nastąpi w ciągu %1 sekund</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IdlenessWatcher</name>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="50"/>
|
||||
<source>LxQt Idleness watcher failed to start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="73"/>
|
||||
<source>D-Bus interface org.freedesktop.ScreenSaver is already registered</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="106"/>
|
||||
<source>The X11 Screensaver extension is not usable</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="113"/>
|
||||
<source>Configure...</source>
|
||||
<translation>Konfiguruj...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="181"/>
|
||||
<source>ERROR: Screen unlocked</source>
|
||||
<translation>BŁĄD: Ekran odblokowany</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="183"/>
|
||||
<source>Locking program "%1" exited with error code %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="185"/>
|
||||
<source>Locking program "%1" crashed with error code %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PowerManagementd</name>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="104"/>
|
||||
<source>Power Management</source>
|
||||
<translation>Zarządzanie zasilaniem</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="105"/>
|
||||
<source>You are running LXQt Power Management for the first time.
|
||||
You can configure it from settings... </source>
|
||||
<translation>Uruchamiasz zarządzanie energią LXQt po raz pierwszy.
|
||||
Możesz skonfiguroweć jego ustawienia...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="106"/>
|
||||
<source>Configure...</source>
|
||||
<translation>Konfiguruj...</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TrayIcon</name>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="132"/>
|
||||
<source>Configure</source>
|
||||
<translation>Konfiguruj</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="133"/>
|
||||
<location filename="../trayicon.cpp" line="167"/>
|
||||
<source>About</source>
|
||||
<translation>Info</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="134"/>
|
||||
<source>Disable icon</source>
|
||||
<translation>Wyłącz ikonę</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="154"/>
|
||||
<source>discharging</source>
|
||||
<translation>rozładowywanie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="154"/>
|
||||
<source>charging</source>
|
||||
<translation>ładowanie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="168"/>
|
||||
<source><p> <b>LXQt Powermanagement</b><br/> - Powermanagement for the LXQt Desktop Environment</p><p> Authors:<br/> &nbsp; Christian Surlykke, Alec Moskvin<br/> &nbsp; - and others from the Razor and LXQt projects</p><p> Copyright &copy; 2012-2014</p></source>
|
||||
<translation><p> <b>LXQt Zarządzanie Energią</b><br/> - Zarządzanie energią dla środowiska LXQt</p><p> Autorzy:<br/> &nbsp; Christian Surlykke, Alec Moskvin<br/> &nbsp; - i inni z projektów Razor oraz LXQt</p><p> Copyright &copy; 2012-2014</p></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,260 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="pt">
|
||||
<context>
|
||||
<name>Battery</name>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="136"/>
|
||||
<source>Charging</source>
|
||||
<translation>A carregar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="137"/>
|
||||
<source>Discharging</source>
|
||||
<translation>A descarregar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="138"/>
|
||||
<source>Empty</source>
|
||||
<translation>Vazia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="139"/>
|
||||
<source>Fully charged</source>
|
||||
<translation>Totalmente carregada</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="140"/>
|
||||
<source>Pending charge</source>
|
||||
<translation>Por carregar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="141"/>
|
||||
<source>Pending discharge</source>
|
||||
<translation>Por descarregar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="142"/>
|
||||
<source>Unknown</source>
|
||||
<translation>Desconhecido</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BatteryInfo</name>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="14"/>
|
||||
<source>Power Management</source>
|
||||
<translation>Gestão de energia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="25"/>
|
||||
<source>Battery info</source>
|
||||
<translation>Informações da bateria</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="40"/>
|
||||
<source>Energy Now:</source>
|
||||
<translation>Energia atual:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="62"/>
|
||||
<source>Updated:</source>
|
||||
<translation>Atualização:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="72"/>
|
||||
<source>Technology:</source>
|
||||
<translation>Tecnologia:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="82"/>
|
||||
<source>Model:</source>
|
||||
<translation>Modelo:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="92"/>
|
||||
<source>Energy rate:</source>
|
||||
<translation>Taxa de energia:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="102"/>
|
||||
<source>Voltage:</source>
|
||||
<translation>Tensão:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="112"/>
|
||||
<source>Energy Full, Design:</source>
|
||||
<translation>Energia máxima teórica:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="129"/>
|
||||
<source>Energy Full:</source>
|
||||
<translation>Energia máxima:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="181"/>
|
||||
<source>State:</source>
|
||||
<translation>Estado:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="74"/>
|
||||
<source>Lithium ion</source>
|
||||
<translation>Ião de lítio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="75"/>
|
||||
<source>Lithium polymer</source>
|
||||
<translation>Polímero de lítio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="76"/>
|
||||
<source>Lithium iron phosphate</source>
|
||||
<translation>Fosfato de Ferro-Lítio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="77"/>
|
||||
<source>Lead acid</source>
|
||||
<translation>Ácido de chumbo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="78"/>
|
||||
<source>Nickel cadmium</source>
|
||||
<translation>Níquel-Cádmio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="79"/>
|
||||
<source>Nickel metal hydride</source>
|
||||
<translation>Níquel-Hidreto Metálico</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="80"/>
|
||||
<source>Unknown</source>
|
||||
<translation>Desconhecido</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BatteryWatcher</name>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="49"/>
|
||||
<source>No battery!</source>
|
||||
<translation>Nenhuma bateria!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="50"/>
|
||||
<source>LXQt could not find data about any battery - monitoring disabled</source>
|
||||
<translation>O LxQt não consegui encontrar qualquer bateria e a monitorização foi desativada</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="91"/>
|
||||
<source>Power low!</source>
|
||||
<translation>Energia baixa!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="103"/>
|
||||
<source>Suspending in %1 seconds</source>
|
||||
<translation>Suspensão dentro de %1 segundos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="106"/>
|
||||
<source>Hibernating in %1 seconds</source>
|
||||
<translation>Hibernação dentro de %1 segundos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="109"/>
|
||||
<source>Shutting down in %1 seconds</source>
|
||||
<translation>A desligar dentro de %1 segundos</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IdlenessWatcher</name>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="50"/>
|
||||
<source>LxQt Idleness watcher failed to start</source>
|
||||
<translation>O monitorizador de inatividade não foi iniciado</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="73"/>
|
||||
<source>D-Bus interface org.freedesktop.ScreenSaver is already registered</source>
|
||||
<translation>A interface D-Bus org.freedesktop.ScreenSaver já está registada</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="106"/>
|
||||
<source>The X11 Screensaver extension is not usable</source>
|
||||
<translation>A extensão X 11 Screensaver não pode ser utilizada</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="113"/>
|
||||
<source>Configure...</source>
|
||||
<translation>Configurar...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="181"/>
|
||||
<source>ERROR: Screen unlocked</source>
|
||||
<translation>Erro: ecrã não bloqueado</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="183"/>
|
||||
<source>Locking program "%1" exited with error code %2</source>
|
||||
<translation>O bloqueio do programa "%1" terminou com o erro "%2"</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="185"/>
|
||||
<source>Locking program "%1" crashed with error code %2</source>
|
||||
<translation>O bloqueio do programa "%1" crashou com o erro "%2"</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PowerManagementd</name>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="104"/>
|
||||
<source>Power Management</source>
|
||||
<translation>Gestão de energia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="105"/>
|
||||
<source>You are running LXQt Power Management for the first time.
|
||||
You can configure it from settings... </source>
|
||||
<translation>Está a executar a gestão de energia do LxQt pela primeira vez.
|
||||
Pode configurar as opções nas definições...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="106"/>
|
||||
<source>Configure...</source>
|
||||
<translation>Configurar...</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TrayIcon</name>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="132"/>
|
||||
<source>Configure</source>
|
||||
<translation>Configurar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="133"/>
|
||||
<location filename="../trayicon.cpp" line="167"/>
|
||||
<source>About</source>
|
||||
<translation>Sobre</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="134"/>
|
||||
<source>Disable icon</source>
|
||||
<translation>Desativar ícone</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="154"/>
|
||||
<source>discharging</source>
|
||||
<translation>a descarregar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="154"/>
|
||||
<source>charging</source>
|
||||
<translation>a carregar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="168"/>
|
||||
<source><p> <b>LXQt Powermanagement</b><br/> - Powermanagement for the LXQt Desktop Environment</p><p> Authors:<br/> &nbsp; Christian Surlykke, Alec Moskvin<br/> &nbsp; - and others from the Razor and LXQt projects</p><p> Copyright &copy; 2012-2014</p></source>
|
||||
<translation><p> <b>Gestor de energia do LxQt</b><br/>Gestão de energia para o ambiente de trabalho LxQt</p><p> Autores:<br/> &nbsp; Christian Surlykke, Alec Moskvin<br/> &nbsp; - e outros colaboradores dos projetos Razor e LxQt</p><p> Direitos de autor &copy; 2012-2015</p></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,260 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ru">
|
||||
<context>
|
||||
<name>Battery</name>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="136"/>
|
||||
<source>Charging</source>
|
||||
<translation>Заряжается</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="137"/>
|
||||
<source>Discharging</source>
|
||||
<translation>Разряжается</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="138"/>
|
||||
<source>Empty</source>
|
||||
<translation>Пустая</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="139"/>
|
||||
<source>Fully charged</source>
|
||||
<translation>Полностью заряжена</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="140"/>
|
||||
<source>Pending charge</source>
|
||||
<translation>Ожидает заряда</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="141"/>
|
||||
<source>Pending discharge</source>
|
||||
<translation>Ожидает разряда</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="142"/>
|
||||
<source>Unknown</source>
|
||||
<translation>Неизвестно</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BatteryInfo</name>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="14"/>
|
||||
<source>Power Management</source>
|
||||
<translation>Управление энергопотреблением</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="25"/>
|
||||
<source>Battery info</source>
|
||||
<translation>Информация о батарее</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="40"/>
|
||||
<source>Energy Now:</source>
|
||||
<translation>Заряд сейчас:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="62"/>
|
||||
<source>Updated:</source>
|
||||
<translation>Обновлено:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="72"/>
|
||||
<source>Technology:</source>
|
||||
<translation>Технология:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="82"/>
|
||||
<source>Model:</source>
|
||||
<translation>Модель:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="92"/>
|
||||
<source>Energy rate:</source>
|
||||
<translation>Мощность тока:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="102"/>
|
||||
<source>Voltage:</source>
|
||||
<translation>Напряжение:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="112"/>
|
||||
<source>Energy Full, Design:</source>
|
||||
<translation>Максимальный заряд:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="129"/>
|
||||
<source>Energy Full:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="181"/>
|
||||
<source>State:</source>
|
||||
<translation>Состояние:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="74"/>
|
||||
<source>Lithium ion</source>
|
||||
<translation>Литий-ионная</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="75"/>
|
||||
<source>Lithium polymer</source>
|
||||
<translation>Литий-полимерная</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="76"/>
|
||||
<source>Lithium iron phosphate</source>
|
||||
<translation>Литий-железо-фосфатная</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="77"/>
|
||||
<source>Lead acid</source>
|
||||
<translation>Свинцово-кислотная</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="78"/>
|
||||
<source>Nickel cadmium</source>
|
||||
<translation>Никель-кадмиевая</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="79"/>
|
||||
<source>Nickel metal hydride</source>
|
||||
<translation>Никель-металл-гидридная</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="80"/>
|
||||
<source>Unknown</source>
|
||||
<translation>Неизвестно</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BatteryWatcher</name>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="49"/>
|
||||
<source>No battery!</source>
|
||||
<translation>Нет батареи!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="50"/>
|
||||
<source>LXQt could not find data about any battery - monitoring disabled</source>
|
||||
<translation>LXQt не смог найти информацию о какой-либо батарее - наблюдение отменено</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="91"/>
|
||||
<source>Power low!</source>
|
||||
<translation>Низкий заряд!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="103"/>
|
||||
<source>Suspending in %1 seconds</source>
|
||||
<translation>Ждущий режим через %1 секунд</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="106"/>
|
||||
<source>Hibernating in %1 seconds</source>
|
||||
<translation>Спящий режим через %1 секунд</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="109"/>
|
||||
<source>Shutting down in %1 seconds</source>
|
||||
<translation>Выключение компьютера через %1 секунд</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IdlenessWatcher</name>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="50"/>
|
||||
<source>LxQt Idleness watcher failed to start</source>
|
||||
<translation>Не удалось запустить наблюдение за простоем LxQt </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="73"/>
|
||||
<source>D-Bus interface org.freedesktop.ScreenSaver is already registered</source>
|
||||
<translation>Интерфейс D-Bus org.freedesktop.ScreenSaver уже зарегистрирован</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="106"/>
|
||||
<source>The X11 Screensaver extension is not usable</source>
|
||||
<translation>Расширение X11 Скринсейвер непригодно для использования</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="113"/>
|
||||
<source>Configure...</source>
|
||||
<translation>Настроить…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="181"/>
|
||||
<source>ERROR: Screen unlocked</source>
|
||||
<translation>ОШИБКА: экран разблокирован</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="183"/>
|
||||
<source>Locking program "%1" exited with error code %2</source>
|
||||
<translation>Программа блокировки экрана "%1" вышла с кодом ошибки %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="185"/>
|
||||
<source>Locking program "%1" crashed with error code %2</source>
|
||||
<translation>Программа блокировки экрана "%1" упала с кодом ошибки %2</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PowerManagementd</name>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="104"/>
|
||||
<source>Power Management</source>
|
||||
<translation>Управление энергопотреблением</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="105"/>
|
||||
<source>You are running LXQt Power Management for the first time.
|
||||
You can configure it from settings... </source>
|
||||
<translation>Вы запускаете управление энергопотреблением LXQt впервые.
|
||||
Вы можете сконфигурировать его в настройках…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="106"/>
|
||||
<source>Configure...</source>
|
||||
<translation>Настроить…</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TrayIcon</name>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="154"/>
|
||||
<source>discharging</source>
|
||||
<translation>разряжается</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="154"/>
|
||||
<source>charging</source>
|
||||
<translation>заряжается</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="133"/>
|
||||
<location filename="../trayicon.cpp" line="167"/>
|
||||
<source>About</source>
|
||||
<translation>О программе</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="132"/>
|
||||
<source>Configure</source>
|
||||
<translation>Настроить</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="134"/>
|
||||
<source>Disable icon</source>
|
||||
<translation>Не показывать значок</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="168"/>
|
||||
<source><p> <b>LXQt Powermanagement</b><br/> - Powermanagement for the LXQt Desktop Environment</p><p> Authors:<br/> &nbsp; Christian Surlykke, Alec Moskvin<br/> &nbsp; - and others from the Razor and LXQt projects</p><p> Copyright &copy; 2012-2014</p></source>
|
||||
<translation><p> <b>Управление энергопотреблением LXQt</b><br/> - Управление энергопотреблением для окружения рабочего стола LXQt</p><p> Авторы:<br/> &nbsp; Christian Surlykke, Alec Moskvin<br/> &nbsp; - и другие из проектов Razor и LXQt</p><p> Copyright &copy; 2012-2014</p></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,260 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ru_RU">
|
||||
<context>
|
||||
<name>Battery</name>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="136"/>
|
||||
<source>Charging</source>
|
||||
<translation>Заряжается</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="137"/>
|
||||
<source>Discharging</source>
|
||||
<translation>Разряжается</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="138"/>
|
||||
<source>Empty</source>
|
||||
<translation>Пустая</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="139"/>
|
||||
<source>Fully charged</source>
|
||||
<translation>Полностью заряжена</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="140"/>
|
||||
<source>Pending charge</source>
|
||||
<translation>Ожидает заряда</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="141"/>
|
||||
<source>Pending discharge</source>
|
||||
<translation>Ожидает разряда</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../battery.cpp" line="142"/>
|
||||
<source>Unknown</source>
|
||||
<translation>Неизвестно</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BatteryInfo</name>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="14"/>
|
||||
<source>Power Management</source>
|
||||
<translation>Управление энергопотреблением</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="25"/>
|
||||
<source>Battery info</source>
|
||||
<translation>Информация о батарее</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="40"/>
|
||||
<source>Energy Now:</source>
|
||||
<translation>Заряд сейчас:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="62"/>
|
||||
<source>Updated:</source>
|
||||
<translation>Обновлено:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="72"/>
|
||||
<source>Technology:</source>
|
||||
<translation>Технология:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="82"/>
|
||||
<source>Model:</source>
|
||||
<translation>Модель:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="92"/>
|
||||
<source>Energy rate:</source>
|
||||
<translation>Мощность тока:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="102"/>
|
||||
<source>Voltage:</source>
|
||||
<translation>Напряжение:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="112"/>
|
||||
<source>Energy Full, Design:</source>
|
||||
<translation>Максимальный заряд:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="129"/>
|
||||
<source>Energy Full:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.ui" line="181"/>
|
||||
<source>State:</source>
|
||||
<translation>Состояние:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="74"/>
|
||||
<source>Lithium ion</source>
|
||||
<translation>Литий-ионная</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="75"/>
|
||||
<source>Lithium polymer</source>
|
||||
<translation>Литий-полимерная</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="76"/>
|
||||
<source>Lithium iron phosphate</source>
|
||||
<translation>Литий-железо-фосфатная</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="77"/>
|
||||
<source>Lead acid</source>
|
||||
<translation>Свинцово-кислотная</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="78"/>
|
||||
<source>Nickel cadmium</source>
|
||||
<translation>Никель-кадмиевая</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="79"/>
|
||||
<source>Nickel metal hydride</source>
|
||||
<translation>Никель-металл-гидридная</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batteryinfo.cpp" line="80"/>
|
||||
<source>Unknown</source>
|
||||
<translation>Неизвестно</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BatteryWatcher</name>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="49"/>
|
||||
<source>No battery!</source>
|
||||
<translation>Нет батареи!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="50"/>
|
||||
<source>LXQt could not find data about any battery - monitoring disabled</source>
|
||||
<translation>LXQt не смог найти информацию о какой-либо батарее - наблюдение отменено</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="91"/>
|
||||
<source>Power low!</source>
|
||||
<translation>Низкий заряд!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="103"/>
|
||||
<source>Suspending in %1 seconds</source>
|
||||
<translation>Ждущий режим через %1 секунд</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="106"/>
|
||||
<source>Hibernating in %1 seconds</source>
|
||||
<translation>Спящий режим через %1 секунд</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../batterywatcher.cpp" line="109"/>
|
||||
<source>Shutting down in %1 seconds</source>
|
||||
<translation>Выключение компьютера через %1 секунд</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>IdlenessWatcher</name>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="50"/>
|
||||
<source>LxQt Idleness watcher failed to start</source>
|
||||
<translation>Не удалось запустить наблюдение за простоем LxQt </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="73"/>
|
||||
<source>D-Bus interface org.freedesktop.ScreenSaver is already registered</source>
|
||||
<translation>Интерфейс D-Bus org.freedesktop.ScreenSaver уже зарегистрирован</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="106"/>
|
||||
<source>The X11 Screensaver extension is not usable</source>
|
||||
<translation>Расширение X11 Скринсейвер непригодно для использования</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="113"/>
|
||||
<source>Configure...</source>
|
||||
<translation>Настроить…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="181"/>
|
||||
<source>ERROR: Screen unlocked</source>
|
||||
<translation>ОШИБКА: экран разблокирован</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="183"/>
|
||||
<source>Locking program "%1" exited with error code %2</source>
|
||||
<translation>Программа блокировки экрана "%1" вышла с кодом ошибки %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../idlenesswatcher.cpp" line="185"/>
|
||||
<source>Locking program "%1" crashed with error code %2</source>
|
||||
<translation>Программа блокировки экрана "%1" упала с кодом ошибки %2</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PowerManagementd</name>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="104"/>
|
||||
<source>Power Management</source>
|
||||
<translation>Управление энергопотреблением</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="105"/>
|
||||
<source>You are running LXQt Power Management for the first time.
|
||||
You can configure it from settings... </source>
|
||||
<translation>Вы запускаете управление энергопотреблением LXQt впервые.
|
||||
Вы можете сконфигурировать его в настройках…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../powermanagementd.cpp" line="106"/>
|
||||
<source>Configure...</source>
|
||||
<translation>Настроить…</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TrayIcon</name>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="154"/>
|
||||
<source>discharging</source>
|
||||
<translation>разряжается</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="154"/>
|
||||
<source>charging</source>
|
||||
<translation>заряжается</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="133"/>
|
||||
<location filename="../trayicon.cpp" line="167"/>
|
||||
<source>About</source>
|
||||
<translation>О программе</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="132"/>
|
||||
<source>Configure</source>
|
||||
<translation>Настроить</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="134"/>
|
||||
<source>Disable icon</source>
|
||||
<translation>Не показывать значок</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../trayicon.cpp" line="168"/>
|
||||
<source><p> <b>LXQt Powermanagement</b><br/> - Powermanagement for the LXQt Desktop Environment</p><p> Authors:<br/> &nbsp; Christian Surlykke, Alec Moskvin<br/> &nbsp; - and others from the Razor and LXQt projects</p><p> Copyright &copy; 2012-2014</p></source>
|
||||
<translation><p> <b>Управление энергопотреблением LXQt</b><br/> - Управление энергопотреблением для окружения рабочего стола LXQt</p><p> Авторы:<br/> &nbsp; Christian Surlykke, Alec Moskvin<br/> &nbsp; - и другие из проектов Razor и LXQt</p><p> Copyright &copy; 2012-2014</p></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
117
src/trayicon.cpp
117
src/trayicon.cpp
@ -1,117 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2011 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QDebug>
|
||||
#include <QApplication>
|
||||
#include <QProcess>
|
||||
#include <QMessageBox>
|
||||
#include <QToolTip>
|
||||
#include <QHelpEvent>
|
||||
#include <Solid/Battery>
|
||||
#include <Solid/Device>
|
||||
#include <XdgIcon>
|
||||
|
||||
#include "trayicon.h"
|
||||
#include "batteryhelper.h"
|
||||
#include "../config/powermanagementsettings.h"
|
||||
|
||||
TrayIcon::TrayIcon(Solid::Battery *battery, QObject *parent)
|
||||
: QSystemTrayIcon(parent),
|
||||
mBattery(battery),
|
||||
mIconProducer(battery),
|
||||
mContextMenu()
|
||||
{
|
||||
connect(mBattery, &Solid::Battery::chargePercentChanged, this, &TrayIcon::updateTooltip);
|
||||
connect(mBattery, &Solid::Battery::chargeStateChanged, this, &TrayIcon::updateTooltip);
|
||||
updateTooltip();
|
||||
|
||||
connect(&mIconProducer, SIGNAL(iconChanged()), this, SLOT(iconChanged()));
|
||||
iconChanged();
|
||||
|
||||
connect(this, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
|
||||
SLOT(onActivated(QSystemTrayIcon::ActivationReason)));
|
||||
|
||||
mContextMenu.addAction(XdgIcon::fromTheme(QStringLiteral("configure")), tr("Configure"),
|
||||
this, SLOT(onConfigureTriggered()));
|
||||
mContextMenu.addAction(XdgIcon::fromTheme(QStringLiteral("help-about")), tr("About"),
|
||||
this, SLOT(onAboutTriggered()));
|
||||
mContextMenu.addAction(XdgIcon::fromTheme(QStringLiteral("edit-delete")), tr("Disable icon"),
|
||||
this, SLOT(onDisableIconTriggered()));
|
||||
setContextMenu(&mContextMenu);
|
||||
}
|
||||
|
||||
TrayIcon::~TrayIcon()
|
||||
{
|
||||
}
|
||||
|
||||
void TrayIcon::iconChanged()
|
||||
{
|
||||
setIcon(mIconProducer.mIcon);
|
||||
}
|
||||
|
||||
void TrayIcon::updateTooltip()
|
||||
{
|
||||
QString tooltip = BatteryHelper::stateToString(mBattery->chargeState());
|
||||
tooltip += QString(" (%1 %)").arg(mBattery->chargePercent());
|
||||
setToolTip(tooltip);
|
||||
}
|
||||
|
||||
void TrayIcon::onConfigureTriggered()
|
||||
{
|
||||
QProcess::startDetached("lxqt-config-powermanagement");
|
||||
}
|
||||
|
||||
void TrayIcon::onAboutTriggered()
|
||||
{
|
||||
QMessageBox::about(0,
|
||||
tr("About"),
|
||||
tr( "<p>"
|
||||
" <b>LXQt Power Management</b><br/>"
|
||||
" - Power Management for the LXQt Desktop Environment"
|
||||
"</p>"
|
||||
"<p>"
|
||||
" Authors:<br/>"
|
||||
" Christian Surlykke, Alec Moskvin<br/>"
|
||||
" - and others from the Razor and LXQt projects"
|
||||
"</p>"
|
||||
"<p>"
|
||||
" Copyright © 2012-2014"
|
||||
"</p>"
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
void TrayIcon::onDisableIconTriggered()
|
||||
{
|
||||
PowerManagementSettings().setShowIcon(false);
|
||||
}
|
||||
|
||||
void TrayIcon::onActivated(QSystemTrayIcon::ActivationReason reason)
|
||||
{
|
||||
qDebug() << "onActivated" << reason;
|
||||
if (Trigger == reason) emit toggleShowInfo();
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2011 Razor team
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#ifndef TRAYICON_H
|
||||
#define TRAYICON_H
|
||||
|
||||
#include <QSystemTrayIcon>
|
||||
#include <QMenu>
|
||||
#include <Solid/Battery>
|
||||
|
||||
#include "iconproducer.h"
|
||||
#include "../config/powermanagementsettings.h"
|
||||
|
||||
class TrayIcon : public QSystemTrayIcon
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TrayIcon(Solid::Battery *battery, QObject *parent = 0);
|
||||
~TrayIcon();
|
||||
|
||||
signals:
|
||||
void toggleShowInfo();
|
||||
|
||||
public slots:
|
||||
void iconChanged();
|
||||
void updateTooltip();
|
||||
|
||||
private slots:
|
||||
void onConfigureTriggered();
|
||||
void onAboutTriggered();
|
||||
void onDisableIconTriggered();
|
||||
void onActivated(QSystemTrayIcon::ActivationReason reason);
|
||||
|
||||
private:
|
||||
Solid::Battery *mBattery;
|
||||
IconProducer mIconProducer;
|
||||
QMenu mContextMenu;
|
||||
};
|
||||
|
||||
#endif // TRAYICON_H
|
@ -1,53 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
*
|
||||
* Authors:
|
||||
* Christian Surlykke <christian@surlykke.dk>
|
||||
*
|
||||
* This program or library is free software; you can redistribute it
|
||||
* and/or modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <QDebug>
|
||||
#include "../config/powermanagementsettings.h"
|
||||
#include "watcher.h"
|
||||
|
||||
Watcher::Watcher(QObject *parent) :
|
||||
QObject(parent),
|
||||
mScreenSaver(this)
|
||||
{
|
||||
connect(&mScreenSaver, SIGNAL(done()), &mLoop, SLOT(quit()));
|
||||
}
|
||||
|
||||
Watcher::~Watcher()
|
||||
{
|
||||
}
|
||||
|
||||
void Watcher::doAction(int action)
|
||||
{
|
||||
// if (action == -1) { }
|
||||
if (action == -2)
|
||||
{
|
||||
mScreenSaver.lockScreen();
|
||||
mLoop.exec();
|
||||
}
|
||||
else if (action >= 0)
|
||||
mPower.doAction((LxQt::Power::Action) action);
|
||||
|
||||
emit done();
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
#ifndef WATCHER_H
|
||||
#define WATCHER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QEventLoop>
|
||||
#include <LXQt/Power>
|
||||
#include <LXQt/ScreenSaver>
|
||||
|
||||
class Watcher : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Watcher(QObject *parent = 0);
|
||||
virtual ~Watcher();
|
||||
|
||||
protected:
|
||||
void doAction(int action);
|
||||
|
||||
signals:
|
||||
void done();
|
||||
|
||||
private:
|
||||
LxQt::Power mPower;
|
||||
LxQt::ScreenSaver mScreenSaver;
|
||||
QEventLoop mLoop;
|
||||
};
|
||||
|
||||
#endif // WATCHER_H
|
@ -1,42 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright (C) 2012 Alec Moskvin <alecm@gmx.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include "x11helper.h"
|
||||
|
||||
#include <QtGui/QGuiApplication>
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
|
||||
Display* X11Helper::display()
|
||||
{
|
||||
QPlatformNativeInterface *native = qApp->platformNativeInterface();
|
||||
void* display = native->nativeResourceForWindow("display", 0);
|
||||
return reinterpret_cast<Display*>(display);
|
||||
}
|
||||
|
||||
xcb_connection_t* X11Helper::connection()
|
||||
{
|
||||
QPlatformNativeInterface *native = qApp->platformNativeInterface();
|
||||
void* connection = native->nativeResourceForWindow("connection", 0);
|
||||
return reinterpret_cast<xcb_connection_t*>(connection);
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright (C) 2013 Alec Moskvin <alecm@gmx.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#ifndef X11HELPER_H
|
||||
#define X11HELPER_H
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
|
||||
// Avoid polluting everything with X11/Xlib.h:
|
||||
typedef struct _XDisplay Display;
|
||||
|
||||
/**
|
||||
* @brief The X11Helper class is class to get the X11 Display or XCB connection
|
||||
*
|
||||
* It's intended to be used as a wrapper/replacement for QX11Info, which is removed in Qt5.
|
||||
*/
|
||||
class X11Helper
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief display Returns the X11 display
|
||||
* @return
|
||||
*/
|
||||
static Display* display();
|
||||
|
||||
/**
|
||||
* @brief connection Returns the XCB connection
|
||||
* @return
|
||||
*/
|
||||
static xcb_connection_t* connection();
|
||||
};
|
||||
|
||||
#endif // X11HELPER_H
|
Loading…
x
Reference in New Issue
Block a user