mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
generic: reimplement screen saver interface via xscreensaver
my monitor is not the latest stock but it has its own screen saver feature Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
1fb801c1e1
commit
fcbc69b222
178 changed files with 368 additions and 28064 deletions
|
@ -94,7 +94,7 @@ macro_optional_find_package(OpenGL)
|
||||||
set_package_properties(OpenGL PROPERTIES
|
set_package_properties(OpenGL PROPERTIES
|
||||||
DESCRIPTION "The OpenGL libraries"
|
DESCRIPTION "The OpenGL libraries"
|
||||||
URL "http://www.opengl.org"
|
URL "http://www.opengl.org"
|
||||||
PURPOSE "3D screensavers and OpenGL info module"
|
PURPOSE "OpenGL info module"
|
||||||
TYPE OPTIONAL
|
TYPE OPTIONAL
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -257,18 +257,18 @@ add_feature_info(mtools
|
||||||
"KIO floppy support"
|
"KIO floppy support"
|
||||||
)
|
)
|
||||||
|
|
||||||
find_program(FORTUNE_EXECUTABLE fortune)
|
|
||||||
add_feature_info(fortune
|
|
||||||
FORTUNE_EXECUTABLE
|
|
||||||
"Fortune messages support in screensaver"
|
|
||||||
)
|
|
||||||
|
|
||||||
find_program(QRENCODE_EXECUTABLE qrencode)
|
find_program(QRENCODE_EXECUTABLE qrencode)
|
||||||
add_feature_info(qrencode
|
add_feature_info(qrencode
|
||||||
QRENCODE_EXECUTABLE
|
QRENCODE_EXECUTABLE
|
||||||
"QR Code support in klipper"
|
"QR Code support in klipper"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
find_program(XSCREENSAVER_EXECUTABLE xscreensaver)
|
||||||
|
add_feature_info(xscreensaver
|
||||||
|
XSCREENSAVER_EXECUTABLE
|
||||||
|
"Screen saver and screen locking support"
|
||||||
|
)
|
||||||
|
|
||||||
check_include_files(sys/wait.h HAVE_SYS_WAIT_H)
|
check_include_files(sys/wait.h HAVE_SYS_WAIT_H)
|
||||||
check_include_files(sys/time.h HAVE_SYS_TIME_H)
|
check_include_files(sys/time.h HAVE_SYS_TIME_H)
|
||||||
|
|
||||||
|
@ -290,9 +290,9 @@ add_subdirectory(libs)
|
||||||
add_subdirectory(systemsettings)
|
add_subdirectory(systemsettings)
|
||||||
|
|
||||||
# core apps
|
# core apps
|
||||||
add_subdirectory(kcheckpass)
|
|
||||||
add_subdirectory(kwin)
|
add_subdirectory(kwin)
|
||||||
add_subdirectory(ksmserver)
|
add_subdirectory(ksmserver)
|
||||||
|
add_subdirectory(kscreensaver)
|
||||||
|
|
||||||
add_subdirectory(ksplash)
|
add_subdirectory(ksplash)
|
||||||
|
|
||||||
|
@ -306,7 +306,6 @@ add_subdirectory(kmenuedit)
|
||||||
add_subdirectory(krunner)
|
add_subdirectory(krunner)
|
||||||
add_subdirectory(kstartupconfig)
|
add_subdirectory(kstartupconfig)
|
||||||
add_subdirectory(freespacenotifier)
|
add_subdirectory(freespacenotifier)
|
||||||
add_subdirectory(kscreensaver)
|
|
||||||
add_subdirectory(kinfocenter)
|
add_subdirectory(kinfocenter)
|
||||||
|
|
||||||
if(Q_WS_X11 AND X11_Xinput_FOUND)
|
if(Q_WS_X11 AND X11_Xinput_FOUND)
|
||||||
|
|
|
@ -1,21 +1,8 @@
|
||||||
include(UnixAuth)
|
|
||||||
set_package_properties(PAM PROPERTIES
|
|
||||||
DESCRIPTION "PAM Libraries"
|
|
||||||
URL "https://www.kernel.org/pub/linux/libs/pam/"
|
|
||||||
TYPE OPTIONAL
|
|
||||||
PURPOSE "Required for screen unlocking"
|
|
||||||
)
|
|
||||||
|
|
||||||
include(CMakePushCheckState)
|
include(CMakePushCheckState)
|
||||||
include(CheckTypeSize)
|
include(CheckTypeSize)
|
||||||
include(CheckSymbolExists)
|
include(CheckSymbolExists)
|
||||||
include(CheckLibraryExists)
|
include(CheckLibraryExists)
|
||||||
|
|
||||||
if (PAM_FOUND)
|
|
||||||
set(KDE4_PAM_SERVICE "kde" CACHE STRING "The PAM service")
|
|
||||||
mark_as_advanced(KDE4_PAM_SERVICE)
|
|
||||||
endif (PAM_FOUND)
|
|
||||||
|
|
||||||
find_program(some_x_program NAMES iceauth xrdb xterm)
|
find_program(some_x_program NAMES iceauth xrdb xterm)
|
||||||
if (NOT some_x_program)
|
if (NOT some_x_program)
|
||||||
set(some_x_program ${CMAKE_INSTALL_PREFIX}/bin/xrdb)
|
set(some_x_program ${CMAKE_INSTALL_PREFIX}/bin/xrdb)
|
||||||
|
@ -27,7 +14,6 @@ get_filename_component(xrootdir "${xbindir}" PATH)
|
||||||
set(XLIBDIR "${xrootdir}/lib/X11")
|
set(XLIBDIR "${xrootdir}/lib/X11")
|
||||||
set(XKBDIR "${xrootdir}/share/X11")
|
set(XKBDIR "${xrootdir}/share/X11")
|
||||||
|
|
||||||
check_function_exists(getpassphrase HAVE_GETPASSPHRASE)
|
|
||||||
check_function_exists(nice HAVE_NICE)
|
check_function_exists(nice HAVE_NICE)
|
||||||
|
|
||||||
check_include_files(string.h HAVE_STRING_H)
|
check_include_files(string.h HAVE_STRING_H)
|
||||||
|
@ -54,8 +40,6 @@ macro_bool_to_01(X11_XSync_FOUND HAVE_XSYNC) # kwin
|
||||||
macro_bool_to_01(X11_XRes_FOUND HAVE_XRES) # ksysguard
|
macro_bool_to_01(X11_XRes_FOUND HAVE_XRES) # ksysguard
|
||||||
macro_bool_to_01(X11_xf86vmode_FOUND HAVE_XF86VMODE) # powerdevil
|
macro_bool_to_01(X11_xf86vmode_FOUND HAVE_XF86VMODE) # powerdevil
|
||||||
|
|
||||||
check_function_exists(setpriority HAVE_SETPRIORITY) # kscreenlocker
|
|
||||||
|
|
||||||
cmake_reset_check_state()
|
cmake_reset_check_state()
|
||||||
set(CMAKE_REQUIRED_LIBRARIES ${X11_Xext_LIB})
|
set(CMAKE_REQUIRED_LIBRARIES ${X11_Xext_LIB})
|
||||||
set(CMAKE_REQUIRED_INCLUDES ${X11_X11_INCLUDE_PATH})
|
set(CMAKE_REQUIRED_INCLUDES ${X11_X11_INCLUDE_PATH})
|
||||||
|
|
|
@ -21,7 +21,6 @@ _kde4workspace_set_lib_vars( KWORKSPACE kworkspace)
|
||||||
_kde4workspace_set_lib_vars( PROCESSUI processui)
|
_kde4workspace_set_lib_vars( PROCESSUI processui)
|
||||||
_kde4workspace_set_lib_vars( LSOFUI lsofui)
|
_kde4workspace_set_lib_vars( LSOFUI lsofui)
|
||||||
_kde4workspace_set_lib_vars( PLASMACLOCK plasmaclock)
|
_kde4workspace_set_lib_vars( PLASMACLOCK plasmaclock)
|
||||||
_kde4workspace_set_lib_vars( KSCREENSAVER kscreensaver)
|
|
||||||
_kde4workspace_set_lib_vars( WEATHERION weather_ion)
|
_kde4workspace_set_lib_vars( WEATHERION weather_ion)
|
||||||
_kde4workspace_set_lib_vars( KWINEFFECTS kwineffects)
|
_kde4workspace_set_lib_vars( KWINEFFECTS kwineffects)
|
||||||
_kde4workspace_set_lib_vars( KDECORATIONS kdecorations)
|
_kde4workspace_set_lib_vars( KDECORATIONS kdecorations)
|
||||||
|
|
69
README.pam
69
README.pam
|
@ -1,69 +0,0 @@
|
||||||
KDE can be configured to support the PAM ("Pluggable Authentication
|
|
||||||
Modules") system for password checking by the screen saver kscreensaver (for
|
|
||||||
unlocking the display).
|
|
||||||
|
|
||||||
PAM is a flexible application-transparent configurable user-authentication
|
|
||||||
system found on FreeBSD, Solaris, and Linux (and maybe other unixes).
|
|
||||||
|
|
||||||
Information about PAM may be found on its homepage
|
|
||||||
http://www.kernel.org/pub/linux/libs/pam/
|
|
||||||
(Despite the location, this information is NOT Linux-specific.)
|
|
||||||
|
|
||||||
|
|
||||||
Known Solaris Issues:
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
For compiling PAM support on Solaris, PAM_MESSAGE_CONST must NOT
|
|
||||||
be defined. This should now be handled automatically by the
|
|
||||||
build system.
|
|
||||||
|
|
||||||
|
|
||||||
Using PAM
|
|
||||||
---------
|
|
||||||
|
|
||||||
By default, PAM is automatically used, if it is found. Use
|
|
||||||
-DWITH_PAM=FALSE to disable it.
|
|
||||||
|
|
||||||
If PAM is found, KDE usually uses the PAM service "kde". You may
|
|
||||||
override it for all KDE programs by using -DKDE4_PAM_SERVICE=<service>.
|
|
||||||
|
|
||||||
One file is provided but not installed - kde.pamd. The usual location to put
|
|
||||||
that file is /etc/pam.d/. You may want to edit the definitions in them to meet
|
|
||||||
your needs, on BSD host for example you may have to substitue "pam_unix.so"
|
|
||||||
with "pam_bsdauth.so". If the services are misconfigured, you will NOT be able
|
|
||||||
to unlock a locked screen!
|
|
||||||
|
|
||||||
To verify the configuration you can invoke kcheckpass directly and examine
|
|
||||||
its exit status. If it is not 0 when correct password is entered (if
|
|
||||||
password for the user is set) then you will have to thinker with the
|
|
||||||
configuration. kcheckpass is usually installed in /usr/libexec/kde4.
|
|
||||||
Authorization failure reason should be logged to /var/log/auth.log.
|
|
||||||
|
|
||||||
If there is ever any doubt about which PAM service a program was
|
|
||||||
compiled with, it can be determined by examining the PAM-generated
|
|
||||||
entries in the system log associated with kcheckpass for
|
|
||||||
authentication failures.
|
|
||||||
|
|
||||||
PAM configuration files have four types of entries for each service:
|
|
||||||
|
|
||||||
type used by kcheckpass
|
|
||||||
---- ------------------
|
|
||||||
auth x
|
|
||||||
account x
|
|
||||||
password x
|
|
||||||
session x
|
|
||||||
|
|
||||||
There may be more than one entry of each type. Check existing PAM
|
|
||||||
configuration files and PAM documentation on your system for guidance as
|
|
||||||
to what entries to make. If you call a PAM service that is not
|
|
||||||
configured, the default action of PAM is likely to be denial of service.
|
|
||||||
|
|
||||||
Note: Screensavers typically only authenticate a user to allow him/her
|
|
||||||
to continue working. They may also renew tokens etc., where supported.
|
|
||||||
See the Linux PAM Administrators guide, which is part of the PAM
|
|
||||||
distribution, for more details.
|
|
||||||
|
|
||||||
As of 4.21 if authentication via PAM fails attempts will be made to
|
|
||||||
authenticate via other methods (e.g. shadow). That way the user will not be
|
|
||||||
stuck with locked screen if PAM is misconfigured and authentication via other
|
|
||||||
method is possible.
|
|
|
@ -25,9 +25,8 @@ build_script:
|
||||||
libxcb-sync-dev libxcb-render-util0-dev libxcb-keysyms1-dev \
|
libxcb-sync-dev libxcb-render-util0-dev libxcb-keysyms1-dev \
|
||||||
libglu1-mesa-dev mesa-common-dev libmtp-dev libusb-1.0-0-dev libssh-dev \
|
libglu1-mesa-dev mesa-common-dev libmtp-dev libusb-1.0-0-dev libssh-dev \
|
||||||
libsmbclient-dev libdrm-dev libraw1394-dev libsensors4-dev \
|
libsmbclient-dev libdrm-dev libraw1394-dev libsensors4-dev \
|
||||||
libegl-dev libpam0g-dev libpci-dev libopenexr-dev \
|
libegl-dev libpci-dev libopenexr-dev liblzma-dev libbz2-dev libgphoto2-dev \
|
||||||
liblzma-dev libbz2-dev libgphoto2-dev liblightdm-gobject-1-dev \
|
liblightdm-gobject-1-dev libgeoclue-2-dev libdbusmenu-katie ccache
|
||||||
libgeoclue-2-dev libdbusmenu-katie ccache
|
|
||||||
|
|
||||||
export PATH="/usr/lib/ccache/:$PATH"
|
export PATH="/usr/lib/ccache/:$PATH"
|
||||||
|
|
||||||
|
|
|
@ -1,36 +1,9 @@
|
||||||
/* Defines if you have PAM (Pluggable Authentication Modules) */
|
|
||||||
#cmakedefine HAVE_PAM 1
|
|
||||||
|
|
||||||
/* Define if your PAM expects a conversation function with const pam_message (Solaris) */
|
|
||||||
#cmakedefine PAM_MESSAGE_CONST 1
|
|
||||||
|
|
||||||
/* The PAM service to be used by kcheckpass */
|
|
||||||
#cmakedefine KDE4_PAM_SERVICE "${KDE4_PAM_SERVICE}"
|
|
||||||
|
|
||||||
/* Defines if your system has the getspnam function */
|
|
||||||
#cmakedefine HAVE_GETSPNAM 1
|
|
||||||
|
|
||||||
/* Defines if your system has the crypt function */
|
|
||||||
#cmakedefine HAVE_CRYPT 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <crypt.h> header file. */
|
|
||||||
#cmakedefine HAVE_CRYPT_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `pw_encrypt' function. */
|
|
||||||
#cmakedefine HAVE_PW_ENCRYPT 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `getpassphrase' function. */
|
|
||||||
#cmakedefine HAVE_GETPASSPHRASE 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <limits.h> header file. */
|
/* Define to 1 if you have the <limits.h> header file. */
|
||||||
#cmakedefine HAVE_LIMITS_H 1
|
#cmakedefine HAVE_LIMITS_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `nice' function. */
|
/* Define to 1 if you have the `nice' function. */
|
||||||
#cmakedefine HAVE_NICE 1
|
#cmakedefine HAVE_NICE 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `setpriority' function. */
|
|
||||||
#cmakedefine HAVE_SETPRIORITY 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <string.h> header file. */
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
#cmakedefine HAVE_STRING_H 1
|
#cmakedefine HAVE_STRING_H 1
|
||||||
|
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
include_directories(${UNIXAUTH_INCLUDE_DIRS})
|
|
||||||
|
|
||||||
set(kcheckpass_SRCS
|
|
||||||
kcheckpass.h
|
|
||||||
kcheckpass.c
|
|
||||||
checkpass_etcpasswd.c
|
|
||||||
checkpass_pam.c
|
|
||||||
checkpass_shadow.c
|
|
||||||
)
|
|
||||||
|
|
||||||
add_executable(kcheckpass ${kcheckpass_SRCS})
|
|
||||||
|
|
||||||
add_definitions(-U_REENTRANT)
|
|
||||||
target_link_libraries(kcheckpass
|
|
||||||
${UNIXAUTH_LIBRARIES}
|
|
||||||
${SOCKET_LIBRARIES}
|
|
||||||
)
|
|
||||||
|
|
||||||
set(kcheckpass_suid "")
|
|
||||||
if (HAVE_GETSPNAM)
|
|
||||||
set(kcheckpass_suid "SETUID")
|
|
||||||
message(WARNING "Will install kcheckpass SUID")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install(
|
|
||||||
TARGETS kcheckpass
|
|
||||||
DESTINATION ${KDE4_LIBEXEC_INSTALL_DIR}
|
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ${kcheckpass_suid}
|
|
||||||
)
|
|
|
@ -1,49 +0,0 @@
|
||||||
The KCheckPass authentication software:
|
|
||||||
-----------------------------------------
|
|
||||||
|
|
||||||
KCheckPass is KDE's authentication program. It is meant to be
|
|
||||||
used by any software in need of user authentication, most
|
|
||||||
notably screensavers.
|
|
||||||
|
|
||||||
It enhances security be the following means:
|
|
||||||
|
|
||||||
- It's only a small program, which is hopefully simple enough to
|
|
||||||
allow it to be SUID root. Setting it to SUID root is necessary
|
|
||||||
on Shadow Password systems.
|
|
||||||
- No other program in need of user authentication, must be
|
|
||||||
SUID root.
|
|
||||||
- It provides a single implementation to check passwords. So one
|
|
||||||
only must take a closer look at KCheckPass to ensure password
|
|
||||||
security. It's much easier for programs using KCheckPass to
|
|
||||||
preserve security.
|
|
||||||
|
|
||||||
|
|
||||||
Technique:
|
|
||||||
----------
|
|
||||||
KCheckPass is a simple password checker. Just invoke and
|
|
||||||
send it the password on stdin.
|
|
||||||
|
|
||||||
If the password was accepted, the program exits with 0;
|
|
||||||
if it was rejected, it exits with 1. Any other exit
|
|
||||||
code signals an error.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Compilation hints:
|
|
||||||
------------------
|
|
||||||
Compile with -DHAVE_PAM if you have a PAM system, and link with -lpam -ldl
|
|
||||||
(If libdl is present).
|
|
||||||
Compile with -DHAVE_SHADOW if you have a shadow password system.
|
|
||||||
|
|
||||||
Copyright, Author and License notice:
|
|
||||||
-------------------------------------
|
|
||||||
Copyright (C) 1998, Caldera, Inc.
|
|
||||||
Released under the GNU General Public License
|
|
||||||
|
|
||||||
Olaf Kirch <okir@caldera.de> General Framework and PAM support
|
|
||||||
Christian Esken <esken@kde.org> Shadow and /etc/passwd support
|
|
||||||
|
|
||||||
Some parts were taken from kscreensaver's passwd.cpp
|
|
||||||
|
|
||||||
Currently this Software is maintained by Oswald Buddenhagen <ossi@kde.org>.
|
|
||||||
Please send new authentication modules (checkpass_*.cpp) to me.
|
|
|
@ -1,53 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 1998 Christian Esken <esken@kde.org>
|
|
||||||
* Copyright (c) 2003 Oswald Buddenhagen <ossi@kde.org>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public
|
|
||||||
* License along with this program; if not, write to the Free
|
|
||||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*
|
|
||||||
* Copyright (C) 1998, Christian Esken <esken@kde.org>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "kcheckpass.h"
|
|
||||||
|
|
||||||
/*******************************************************************
|
|
||||||
* This is the authentication code for /etc/passwd passwords
|
|
||||||
*******************************************************************/
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <syslog.h>
|
|
||||||
|
|
||||||
AuthReturn Authenticate_etcpasswd(const char *login, const char *password)
|
|
||||||
{
|
|
||||||
struct passwd *pw;
|
|
||||||
char *crpt_passwd;
|
|
||||||
|
|
||||||
openlog("kcheckpass", LOG_PID, LOG_AUTH);
|
|
||||||
|
|
||||||
/* Get the password entry for the user we want */
|
|
||||||
if (!(pw = getpwnam(login))) {
|
|
||||||
syslog(LOG_ERR, "getpwnam: %s", strerror(errno));
|
|
||||||
return AuthAbort;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!*pw->pw_passwd)
|
|
||||||
return AuthOk;
|
|
||||||
|
|
||||||
if ((crpt_passwd = crypt(password, pw->pw_passwd)) && !strcmp(pw->pw_passwd, crpt_passwd)) {
|
|
||||||
return AuthOk; /* Success */
|
|
||||||
}
|
|
||||||
return AuthBad; /* Password wrong or account locked */
|
|
||||||
}
|
|
|
@ -1,190 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 1998 Caldera, Inc.
|
|
||||||
* Copyright (C) 2003 Oswald Buddenhagen <ossi@kde.org>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public
|
|
||||||
* License along with this program; if not, write to the Free
|
|
||||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "kcheckpass.h"
|
|
||||||
|
|
||||||
#ifdef HAVE_PAM
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <syslog.h>
|
|
||||||
#include <security/pam_appl.h>
|
|
||||||
|
|
||||||
struct pam_data {
|
|
||||||
const char* password;
|
|
||||||
char *(*conv) (ConvRequest, const char *);
|
|
||||||
int abort:1;
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef PAM_MESSAGE_CONST
|
|
||||||
typedef const struct pam_message pam_message_type;
|
|
||||||
typedef const void *pam_gi_type;
|
|
||||||
#else
|
|
||||||
typedef struct pam_message pam_message_type;
|
|
||||||
typedef void *pam_gi_type;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int
|
|
||||||
PAM_conv (int num_msg, pam_message_type **msg,
|
|
||||||
struct pam_response **resp,
|
|
||||||
void *appdata_ptr)
|
|
||||||
{
|
|
||||||
int count;
|
|
||||||
struct pam_response *repl;
|
|
||||||
struct pam_data *pd = (struct pam_data *)appdata_ptr;
|
|
||||||
|
|
||||||
if (!(repl = calloc(num_msg, sizeof(struct pam_response))))
|
|
||||||
return PAM_CONV_ERR;
|
|
||||||
|
|
||||||
for (count = 0; count < num_msg; count++)
|
|
||||||
switch (msg[count]->msg_style) {
|
|
||||||
case PAM_TEXT_INFO:
|
|
||||||
pd->conv(ConvPutInfo, msg[count]->msg);
|
|
||||||
break;
|
|
||||||
case PAM_ERROR_MSG:
|
|
||||||
pd->conv(ConvPutError, msg[count]->msg);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
switch (msg[count]->msg_style) {
|
|
||||||
case PAM_PROMPT_ECHO_ON:
|
|
||||||
case PAM_PROMPT_ECHO_OFF:
|
|
||||||
repl[count].resp = strdup(pd->password);
|
|
||||||
break;
|
|
||||||
#ifdef PAM_BINARY_PROMPT
|
|
||||||
case PAM_BINARY_PROMPT:
|
|
||||||
repl[count].resp = pd->conv(ConvGetBinary, msg[count]->msg);
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
|
||||||
/* Must be an error of some sort... */
|
|
||||||
goto conv_err;
|
|
||||||
}
|
|
||||||
if (!repl[count].resp) {
|
|
||||||
pd->abort = 1;
|
|
||||||
goto conv_err;
|
|
||||||
}
|
|
||||||
repl[count].resp_retcode = PAM_SUCCESS;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
*resp = repl;
|
|
||||||
return PAM_SUCCESS;
|
|
||||||
|
|
||||||
conv_err:
|
|
||||||
for (; count >= 0; count--)
|
|
||||||
if (repl[count].resp)
|
|
||||||
switch (msg[count]->msg_style) {
|
|
||||||
case PAM_PROMPT_ECHO_ON:
|
|
||||||
case PAM_PROMPT_ECHO_OFF:
|
|
||||||
free(repl[count].resp);
|
|
||||||
break;
|
|
||||||
#ifdef PAM_BINARY_PROMPT
|
|
||||||
case PAM_BINARY_PROMPT: /* handle differently? */
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
free(repl);
|
|
||||||
return PAM_CONV_ERR;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct pam_data PAM_data;
|
|
||||||
|
|
||||||
static struct pam_conv PAM_conversation = {
|
|
||||||
&PAM_conv,
|
|
||||||
&PAM_data
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef PAM_FAIL_DELAY
|
|
||||||
static void
|
|
||||||
fail_delay(int retval ATTR_UNUSED, unsigned usec_delay ATTR_UNUSED,
|
|
||||||
void *appdata_ptr ATTR_UNUSED)
|
|
||||||
{}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
AuthReturn Authenticate_pam(const char *caller, const char *user,
|
|
||||||
const char *password, char *(*conv) (ConvRequest, const char *))
|
|
||||||
{
|
|
||||||
const char *tty;
|
|
||||||
pam_handle_t *pamh;
|
|
||||||
pam_gi_type pam_item;
|
|
||||||
const char *pam_service;
|
|
||||||
char pservb[64];
|
|
||||||
int pam_error;
|
|
||||||
|
|
||||||
openlog("kcheckpass", LOG_PID, LOG_AUTH);
|
|
||||||
|
|
||||||
PAM_data.password = password;
|
|
||||||
PAM_data.conv = conv;
|
|
||||||
|
|
||||||
pam_error = pam_start(caller, user, &PAM_conversation, &pamh);
|
|
||||||
if (pam_error != PAM_SUCCESS)
|
|
||||||
return AuthError;
|
|
||||||
|
|
||||||
tty = ttyname(0);
|
|
||||||
if (!tty)
|
|
||||||
tty = getenv ("DISPLAY");
|
|
||||||
|
|
||||||
pam_error = pam_set_item (pamh, PAM_TTY, tty);
|
|
||||||
if (pam_error != PAM_SUCCESS) {
|
|
||||||
pam_end(pamh, pam_error);
|
|
||||||
return AuthError;
|
|
||||||
}
|
|
||||||
|
|
||||||
# ifdef PAM_FAIL_DELAY
|
|
||||||
pam_set_item (pamh, PAM_FAIL_DELAY, (void *)fail_delay);
|
|
||||||
# endif
|
|
||||||
|
|
||||||
pam_error = pam_authenticate(pamh, 0);
|
|
||||||
if (pam_error != PAM_SUCCESS) {
|
|
||||||
if (PAM_data.abort) {
|
|
||||||
pam_end(pamh, PAM_SUCCESS);
|
|
||||||
return AuthAbort;
|
|
||||||
}
|
|
||||||
pam_end(pamh, pam_error);
|
|
||||||
switch (pam_error) {
|
|
||||||
case PAM_USER_UNKNOWN:
|
|
||||||
case PAM_AUTH_ERR:
|
|
||||||
case PAM_MAXTRIES: /* should handle this better ... */
|
|
||||||
case PAM_AUTHINFO_UNAVAIL: /* returned for unknown users ... bogus */
|
|
||||||
return AuthBad;
|
|
||||||
default:
|
|
||||||
return AuthError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* just in case some module is stupid enough to ignore a preset PAM_USER */
|
|
||||||
pam_error = pam_get_item (pamh, PAM_USER, &pam_item);
|
|
||||||
if (pam_error != PAM_SUCCESS) {
|
|
||||||
pam_end(pamh, pam_error);
|
|
||||||
return AuthError;
|
|
||||||
}
|
|
||||||
if (strcmp((const char *)pam_item, user)) {
|
|
||||||
pam_end(pamh, PAM_SUCCESS); /* maybe use PAM_AUTH_ERR? */
|
|
||||||
return AuthBad;
|
|
||||||
}
|
|
||||||
|
|
||||||
pam_error = pam_setcred(pamh, PAM_REFRESH_CRED);
|
|
||||||
/* ignore errors on refresh credentials. If this did not work we use the old ones. */
|
|
||||||
|
|
||||||
pam_end(pamh, PAM_SUCCESS);
|
|
||||||
return AuthOk;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // HAVE_PAM
|
|
|
@ -1,92 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 1998 Christian Esken <esken@kde.org>
|
|
||||||
* Copyright (C) 2003 Oswald Buddenhagen <ossi@kde.org>
|
|
||||||
*
|
|
||||||
* This is a modified version of checkpass_shadow.cpp
|
|
||||||
*
|
|
||||||
* Modifications made by Thorsten Kukuk <kukuk@suse.de>
|
|
||||||
* Mathias Kettner <kettner@suse.de>
|
|
||||||
*
|
|
||||||
* ------------------------------------------------------------
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public
|
|
||||||
* License along with this program; if not, write to the Free
|
|
||||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "kcheckpass.h"
|
|
||||||
|
|
||||||
/*******************************************************************
|
|
||||||
* This is the authentication code for Shadow-Passwords
|
|
||||||
*******************************************************************/
|
|
||||||
|
|
||||||
#ifdef HAVE_SHADOW
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <syslog.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
#include <shadow.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
AuthReturn Authenticate_shadow(const char *login, const char *typed_in_password)
|
|
||||||
{
|
|
||||||
char *crpt_passwd;
|
|
||||||
char *password;
|
|
||||||
struct passwd *pw;
|
|
||||||
struct spwd *spw;
|
|
||||||
|
|
||||||
openlog("kcheckpass", LOG_PID, LOG_AUTH);
|
|
||||||
|
|
||||||
if (!(pw = getpwnam(login))) {
|
|
||||||
syslog(LOG_ERR, "getpwnam: %s", strerror(errno));
|
|
||||||
return AuthAbort;
|
|
||||||
}
|
|
||||||
|
|
||||||
uid_t eid = geteuid();
|
|
||||||
if (eid != 0 && seteuid(0) != 0) {
|
|
||||||
syslog(LOG_ERR, "seteuid: %s", strerror(errno));
|
|
||||||
return AuthAbort;
|
|
||||||
}
|
|
||||||
|
|
||||||
spw = getspnam(login);
|
|
||||||
password = spw ? spw->sp_pwdp : pw->pw_passwd;
|
|
||||||
|
|
||||||
if (!*password) {
|
|
||||||
seteuid(eid);
|
|
||||||
return AuthOk;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined( __linux__ ) && defined( HAVE_PW_ENCRYPT )
|
|
||||||
crpt_passwd = pw_encrypt(typed_in_password, password); /* (1) */
|
|
||||||
#else
|
|
||||||
crpt_passwd = crypt(typed_in_password, password);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (crpt_passwd && !strcmp(password, crpt_passwd )) {
|
|
||||||
seteuid(eid);
|
|
||||||
return AuthOk; /* Success */
|
|
||||||
}
|
|
||||||
seteuid(eid);
|
|
||||||
return AuthBad; /* Password wrong or account locked */
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
(1) Deprecated - long passwords have known weaknesses. Also,
|
|
||||||
pw_encrypt is non-standard (requires libshadow.a) while
|
|
||||||
everything else you need to support shadow passwords is in
|
|
||||||
the standard (ELF) libc.
|
|
||||||
*/
|
|
||||||
#endif // HAVE_SHADOW
|
|
|
@ -1,70 +0,0 @@
|
||||||
/*****************************************************************
|
|
||||||
*
|
|
||||||
*· kcheckpass
|
|
||||||
*
|
|
||||||
*· Simple password checker. Just invoke and send it
|
|
||||||
*· the password on stdin.
|
|
||||||
*
|
|
||||||
*· If the password was accepted, the program exits with 0;
|
|
||||||
*· if it was rejected, it exits with 1. Any other exit
|
|
||||||
*· code signals an error.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public
|
|
||||||
* License along with this program; if not, write to the Free
|
|
||||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*
|
|
||||||
*· Copyright (C) 1998, Caldera, Inc.
|
|
||||||
*· Released under the GNU General Public License
|
|
||||||
*
|
|
||||||
*· Olaf Kirch <okir@caldera.de> General Framework and PAM support
|
|
||||||
*· Christian Esken <esken@kde.org> Shadow and /etc/passwd support
|
|
||||||
*· Oswald Buddenhagen <ossi@kde.org> Binary server mode
|
|
||||||
*
|
|
||||||
* Other parts were taken from kscreensaver's passwd.cpp
|
|
||||||
*****************************************************************/
|
|
||||||
|
|
||||||
#ifndef KCHECKPASS_ENUMS_H
|
|
||||||
#define KCHECKPASS_ENUMS_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* these must match kcheckpass' exit codes */
|
|
||||||
typedef enum {
|
|
||||||
AuthOk = 0,
|
|
||||||
AuthBad = 1,
|
|
||||||
AuthError = 2,
|
|
||||||
AuthAbort = 3
|
|
||||||
} AuthReturn;
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
ConvGetBinary,
|
|
||||||
ConvGetNormal,
|
|
||||||
ConvGetHidden,
|
|
||||||
ConvPutInfo,
|
|
||||||
ConvPutError
|
|
||||||
} ConvRequest;
|
|
||||||
|
|
||||||
/* these must match the defs in kgreeterplugin.h */
|
|
||||||
typedef enum {
|
|
||||||
IsUser = 1, /* unused in kcheckpass */
|
|
||||||
IsPassword = 2
|
|
||||||
} DataTag;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* KCHECKPASS_ENUMS_H */
|
|
|
@ -1,509 +0,0 @@
|
||||||
/*****************************************************************
|
|
||||||
*
|
|
||||||
* kcheckpass - Simple password checker
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public
|
|
||||||
* License along with this program; if not, write to the Free
|
|
||||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* kcheckpass is a simple password checker. Just invoke and
|
|
||||||
* send it the password on stdin.
|
|
||||||
*
|
|
||||||
* If the password was accepted, the program exits with 0;
|
|
||||||
* if it was rejected, it exits with 1. Any other exit
|
|
||||||
* code signals an error.
|
|
||||||
*
|
|
||||||
* It's hopefully simple enough to allow it to be setuid
|
|
||||||
* root.
|
|
||||||
*
|
|
||||||
* Compile with -DHAVE_PAM if you have a PAM system,
|
|
||||||
* and link with -lpam -ldl.
|
|
||||||
* Compile with -DHAVE_SHADOW if you have a shadow
|
|
||||||
* password system.
|
|
||||||
*
|
|
||||||
* Copyright (C) 1998, Caldera, Inc.
|
|
||||||
* Released under the GNU General Public License
|
|
||||||
*
|
|
||||||
* Olaf Kirch <okir@caldera.de> General Framework and PAM support
|
|
||||||
* Christian Esken <esken@kde.org> Shadow and /etc/passwd support
|
|
||||||
* Roberto Teixeira <maragato@kde.org> other user (-U) support
|
|
||||||
* Oswald Buddenhagen <ossi@kde.org> Binary server mode
|
|
||||||
*
|
|
||||||
* Other parts were taken from kscreensaver's passwd.cpp.
|
|
||||||
*
|
|
||||||
*****************************************************************/
|
|
||||||
|
|
||||||
#include "kcheckpass.h"
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <syslog.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
/* Compatibility: accept some options from environment variables */
|
|
||||||
#define ACCEPT_ENV
|
|
||||||
|
|
||||||
#define THROTTLE 3
|
|
||||||
|
|
||||||
static int havetty = 0;
|
|
||||||
static int nullpass = 0;
|
|
||||||
static int sfd = -1;
|
|
||||||
|
|
||||||
static const char* methods[3] = { "", "", "" };
|
|
||||||
#if defined(HAVE_PAM)
|
|
||||||
const char *method = "pam";
|
|
||||||
#elif defined(HAVE_SHADOW)
|
|
||||||
const char *method = "shadow";
|
|
||||||
#else
|
|
||||||
const char *method = "etcpasswd";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static char *
|
|
||||||
conv_legacy (ConvRequest what, const char *prompt)
|
|
||||||
{
|
|
||||||
char *p, *p2;
|
|
||||||
int len;
|
|
||||||
char buf[1024];
|
|
||||||
|
|
||||||
switch (what) {
|
|
||||||
case ConvGetBinary:
|
|
||||||
break;
|
|
||||||
case ConvGetNormal:
|
|
||||||
/* there is no prompt == 0 case */
|
|
||||||
if (!havetty)
|
|
||||||
break;
|
|
||||||
/* i guess we should use /dev/tty ... */
|
|
||||||
fputs(prompt, stdout);
|
|
||||||
fflush(stdout);
|
|
||||||
if (!fgets(buf, sizeof(buf), stdin))
|
|
||||||
return 0;
|
|
||||||
len = strlen(buf);
|
|
||||||
if (len && buf[len - 1] == '\n')
|
|
||||||
buf[--len] = 0;
|
|
||||||
return strdup(buf);
|
|
||||||
case ConvGetHidden:
|
|
||||||
if (havetty) {
|
|
||||||
#ifdef HAVE_GETPASSPHRASE
|
|
||||||
p = getpassphrase(prompt ? prompt : "Password: ");
|
|
||||||
#else
|
|
||||||
p = getpass(prompt ? prompt : "Password: ");
|
|
||||||
#endif
|
|
||||||
p2 = strdup(p);
|
|
||||||
memset(p, 0, strlen(p));
|
|
||||||
return p2;
|
|
||||||
} else {
|
|
||||||
if (prompt)
|
|
||||||
break;
|
|
||||||
if ((len = read(0, buf, sizeof(buf) - 1)) < 0) {
|
|
||||||
message("Cannot read password\n");
|
|
||||||
return 0;
|
|
||||||
} else {
|
|
||||||
if (len && buf[len - 1] == '\n')
|
|
||||||
--len;
|
|
||||||
buf[len] = 0;
|
|
||||||
p2 = strdup(buf);
|
|
||||||
memset(buf, 0, len);
|
|
||||||
return p2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case ConvPutInfo:
|
|
||||||
message("Information: %s\n", prompt);
|
|
||||||
return 0;
|
|
||||||
case ConvPutError:
|
|
||||||
message("Error: %s\n", prompt);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
message("Authentication backend requested data type which cannot be handled.\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
Reader (void *buf, int count)
|
|
||||||
{
|
|
||||||
int ret, rlen;
|
|
||||||
|
|
||||||
for (rlen = 0; rlen < count; ) {
|
|
||||||
dord:
|
|
||||||
ret = read (sfd, (void *)((char *)buf + rlen), count - rlen);
|
|
||||||
if (ret < 0) {
|
|
||||||
if (errno == EINTR)
|
|
||||||
goto dord;
|
|
||||||
if (errno == EAGAIN)
|
|
||||||
break;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (!ret)
|
|
||||||
break;
|
|
||||||
rlen += ret;
|
|
||||||
}
|
|
||||||
return rlen;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
GRead (void *buf, int count)
|
|
||||||
{
|
|
||||||
if (Reader (buf, count) != count) {
|
|
||||||
message ("Communication breakdown on read\n");
|
|
||||||
exit(15);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
GWrite (const void *buf, int count)
|
|
||||||
{
|
|
||||||
if (write (sfd, buf, count) != count) {
|
|
||||||
message ("Communication breakdown on write\n");
|
|
||||||
exit(15);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
GSendInt (int val)
|
|
||||||
{
|
|
||||||
GWrite (&val, sizeof(val));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
GSendStr (const char *buf)
|
|
||||||
{
|
|
||||||
unsigned len = buf ? strlen (buf) + 1 : 0;
|
|
||||||
GWrite (&len, sizeof(len));
|
|
||||||
GWrite (buf, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
GSendArr (int len, const char *buf)
|
|
||||||
{
|
|
||||||
GWrite (&len, sizeof(len));
|
|
||||||
GWrite (buf, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
GRecvInt (void)
|
|
||||||
{
|
|
||||||
int val;
|
|
||||||
|
|
||||||
GRead (&val, sizeof(val));
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *
|
|
||||||
GRecvStr (void)
|
|
||||||
{
|
|
||||||
unsigned len;
|
|
||||||
char *buf;
|
|
||||||
|
|
||||||
if (!(len = GRecvInt()))
|
|
||||||
return (char *)0;
|
|
||||||
if (len > 0x1000 || !(buf = malloc (len))) {
|
|
||||||
message ("No memory for read buffer\n");
|
|
||||||
exit(15);
|
|
||||||
}
|
|
||||||
GRead (buf, len);
|
|
||||||
buf[len - 1] = 0; /* we're setuid ... don't trust "them" */
|
|
||||||
return buf;
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *
|
|
||||||
GRecvArr (void)
|
|
||||||
{
|
|
||||||
unsigned len;
|
|
||||||
char *arr;
|
|
||||||
unsigned const char *up;
|
|
||||||
|
|
||||||
if (!(len = (unsigned) GRecvInt()))
|
|
||||||
return (char *)0;
|
|
||||||
if (len < 4) {
|
|
||||||
message ("Too short binary authentication data block\n");
|
|
||||||
exit(15);
|
|
||||||
}
|
|
||||||
if (len > 0x10000 || !(arr = malloc (len))) {
|
|
||||||
message ("No memory for read buffer\n");
|
|
||||||
exit(15);
|
|
||||||
}
|
|
||||||
GRead (arr, len);
|
|
||||||
up = (unsigned const char *)arr;
|
|
||||||
if (len != (unsigned)(up[3] | (up[2] << 8) | (up[1] << 16) | (up[0] << 24))) {
|
|
||||||
message ("Mismatched binary authentication data block size\n");
|
|
||||||
exit(15);
|
|
||||||
}
|
|
||||||
return arr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static char *
|
|
||||||
conv_server (ConvRequest what, const char *prompt)
|
|
||||||
{
|
|
||||||
GSendInt (what);
|
|
||||||
switch (what) {
|
|
||||||
case ConvGetBinary: {
|
|
||||||
unsigned const char *up = (unsigned const char *)prompt;
|
|
||||||
int len = up[3] | (up[2] << 8) | (up[1] << 16) | (up[0] << 24);
|
|
||||||
GSendArr (len, prompt);
|
|
||||||
return GRecvArr ();
|
|
||||||
}
|
|
||||||
case ConvGetNormal:
|
|
||||||
case ConvGetHidden: {
|
|
||||||
char *msg;
|
|
||||||
GSendStr (prompt);
|
|
||||||
msg = GRecvStr ();
|
|
||||||
if (msg && (GRecvInt() & IsPassword) && !*msg)
|
|
||||||
nullpass = 1;
|
|
||||||
return msg;
|
|
||||||
}
|
|
||||||
case ConvPutInfo:
|
|
||||||
case ConvPutError:
|
|
||||||
default: {
|
|
||||||
GSendStr (prompt);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
message(const char *fmt, ...)
|
|
||||||
{
|
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
va_start(ap, fmt);
|
|
||||||
vfprintf(stderr, fmt, ap);
|
|
||||||
va_end(ap);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef O_NOFOLLOW
|
|
||||||
# define O_NOFOLLOW 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void ATTR_NORETURN
|
|
||||||
usage(int exitval)
|
|
||||||
{
|
|
||||||
message(
|
|
||||||
"usage: kcheckpass {-h|[-c caller] [-m method] [-U username|-S handle]}\n"
|
|
||||||
" options:\n"
|
|
||||||
" -h this help message\n"
|
|
||||||
" -U username authenticate the specified user instead of current user\n"
|
|
||||||
" -S handle operate in binary server mode on file descriptor handle\n"
|
|
||||||
" -c caller the calling application, effectively the PAM service basename\n"
|
|
||||||
" -m method use the specified authentication method (default: \"%s\")\n"
|
|
||||||
" -n do not fallback to other methods if one fails\n"
|
|
||||||
" exit codes:\n"
|
|
||||||
" 0 success\n"
|
|
||||||
" 1 invalid password\n"
|
|
||||||
" 2 cannot read password database\n"
|
|
||||||
" Anything else tells you something's badly hosed.\n",
|
|
||||||
method);
|
|
||||||
exit(exitval);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
#if defined(HAVE_PAM)
|
|
||||||
const char *caller = KDE4_PAM_SERVICE;
|
|
||||||
#endif
|
|
||||||
const char *username = 0;
|
|
||||||
#ifdef ACCEPT_ENV
|
|
||||||
char *p;
|
|
||||||
#endif
|
|
||||||
struct passwd *pw;
|
|
||||||
int c, nfd, lfd;
|
|
||||||
uid_t uid;
|
|
||||||
time_t nexttime;
|
|
||||||
AuthReturn ret = AuthError;
|
|
||||||
struct flock lk;
|
|
||||||
char fname[64], fcont[64];
|
|
||||||
char *password = NULL;
|
|
||||||
int validmethod = 0;
|
|
||||||
int fallback = 1;
|
|
||||||
|
|
||||||
/* Make sure stdout/stderr are open */
|
|
||||||
for (c = 1; c <= 2; c++) {
|
|
||||||
if (fcntl(c, F_GETFL) == -1) {
|
|
||||||
if ((nfd = open("/dev/null", O_WRONLY)) < 0) {
|
|
||||||
message("cannot open /dev/null: %s\n", strerror(errno));
|
|
||||||
exit(10);
|
|
||||||
}
|
|
||||||
if (c != nfd) {
|
|
||||||
dup2(nfd, c);
|
|
||||||
close(nfd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
havetty = isatty(0);
|
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "hc:m:U:S:n")) != -1) {
|
|
||||||
switch (c) {
|
|
||||||
case 'h':
|
|
||||||
usage(0);
|
|
||||||
break;
|
|
||||||
case 'c':
|
|
||||||
#ifdef HAVE_PAM
|
|
||||||
caller = optarg;
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
case 'm':
|
|
||||||
method = optarg;
|
|
||||||
break;
|
|
||||||
case 'U':
|
|
||||||
username = optarg;
|
|
||||||
break;
|
|
||||||
case 'S':
|
|
||||||
sfd = atoi(optarg);
|
|
||||||
break;
|
|
||||||
case 'n':
|
|
||||||
fallback = 0;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
message("Command line option parsing error\n");
|
|
||||||
usage(10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_PAM
|
|
||||||
methods[0] = "pam";
|
|
||||||
if (strcmp(method, "pam") == 0) {
|
|
||||||
validmethod = 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_SHADOW
|
|
||||||
methods[1] = ", shadow";
|
|
||||||
if (strcmp(method, "shadow") == 0) {
|
|
||||||
validmethod = 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
methods[2] = ", etcpasswd";
|
|
||||||
if (strcmp(method, "etcpasswd") == 0) {
|
|
||||||
validmethod = 1;
|
|
||||||
}
|
|
||||||
if (!validmethod) {
|
|
||||||
message("Method must be one of: %s%s%s\n", methods[0], methods[1], methods[2]);
|
|
||||||
usage(11);
|
|
||||||
}
|
|
||||||
|
|
||||||
uid = getuid();
|
|
||||||
|
|
||||||
#ifdef ACCEPT_ENV
|
|
||||||
if (!username) {
|
|
||||||
if (!(p = getenv("LOGNAME")) || !(pw = getpwnam(p)) || pw->pw_uid != uid) {
|
|
||||||
if (!(p = getenv("USER")) || !(pw = getpwnam(p)) || pw->pw_uid != uid) {
|
|
||||||
if (!(pw = getpwuid(uid))) {
|
|
||||||
message("Cannot determinate current user\n");
|
|
||||||
return AuthError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!(username = strdup(pw->pw_name))) {
|
|
||||||
message("Out of memory\n");
|
|
||||||
return AuthError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Throttle kcheckpass invocations to avoid abusing it for bruteforcing
|
|
||||||
* the password. This delay belongs to the *previous* invocation, where
|
|
||||||
* we can't enforce it reliably (without risking giving away the result
|
|
||||||
* before it is due). We don't differentiate between success and failure -
|
|
||||||
* it's not expected to have a noticeable adverse effect.
|
|
||||||
*/
|
|
||||||
if ( uid != geteuid() ) {
|
|
||||||
sprintf(fname, "/var/run/kcheckpass.%d", uid);
|
|
||||||
if ((lfd = open(fname, O_RDWR | O_CREAT | O_NOFOLLOW, 0600)) < 0) {
|
|
||||||
message("Cannot open lockfile\n");
|
|
||||||
return AuthError;
|
|
||||||
}
|
|
||||||
|
|
||||||
lk.l_type = F_WRLCK;
|
|
||||||
lk.l_whence = SEEK_SET;
|
|
||||||
lk.l_start = lk.l_len = 0;
|
|
||||||
if (fcntl(lfd, F_SETLKW, &lk)) {
|
|
||||||
message("Cannot obtain lock\n");
|
|
||||||
return AuthError;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((c = read(lfd, fcont, sizeof(fcont)-1)) > 0 &&
|
|
||||||
(fcont[c] = '\0', sscanf(fcont, "%ld", &nexttime) == 1)) {
|
|
||||||
time_t ct = time(0);
|
|
||||||
if (nexttime > ct && nexttime < ct + THROTTLE)
|
|
||||||
sleep(nexttime - ct);
|
|
||||||
}
|
|
||||||
|
|
||||||
lseek(lfd, 0, SEEK_SET);
|
|
||||||
write(lfd, fcont, sprintf(fcont, "%lu\n", time(0) + THROTTLE));
|
|
||||||
|
|
||||||
close(lfd);
|
|
||||||
}
|
|
||||||
|
|
||||||
password = (sfd < 0 ? conv_legacy(ConvGetHidden, 0) : conv_server(ConvGetHidden, 0));
|
|
||||||
if (!password) {
|
|
||||||
return AuthAbort;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Now do the fandango */
|
|
||||||
#ifdef HAVE_PAM
|
|
||||||
if (strcmp(method, "pam") == 0) {
|
|
||||||
ret = Authenticate_pam(
|
|
||||||
caller,
|
|
||||||
username,
|
|
||||||
password,
|
|
||||||
sfd < 0 ? conv_legacy : conv_server
|
|
||||||
);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_SHADOW
|
|
||||||
if (strcmp(method, "shadow") == 0 || (fallback && ret == AuthBad)) {
|
|
||||||
ret = Authenticate_shadow(
|
|
||||||
username,
|
|
||||||
password
|
|
||||||
);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (strcmp(method, "etcpasswd") == 0 || (fallback && ret == AuthBad)) {
|
|
||||||
ret = Authenticate_etcpasswd(
|
|
||||||
username,
|
|
||||||
password
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
dispose(password);
|
|
||||||
|
|
||||||
if (ret == AuthBad) {
|
|
||||||
message("Authentication failure\n");
|
|
||||||
if (!nullpass) {
|
|
||||||
openlog("kcheckpass", LOG_PID, LOG_AUTH);
|
|
||||||
syslog(LOG_NOTICE, "Authentication failure for %s (invoked by uid %d)", username, uid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
dispose(char *str)
|
|
||||||
{
|
|
||||||
memset(str, 0, strlen(str));
|
|
||||||
free(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************
|
|
||||||
The real authentication methods are in separate source files.
|
|
||||||
Look in checkpass_*.c
|
|
||||||
*****************************************************************/
|
|
|
@ -1,108 +0,0 @@
|
||||||
/*****************************************************************
|
|
||||||
*
|
|
||||||
* kcheckpass
|
|
||||||
*
|
|
||||||
* Simple password checker. Just invoke and send it
|
|
||||||
* the password on stdin.
|
|
||||||
*
|
|
||||||
* If the password was accepted, the program exits with 0;
|
|
||||||
* if it was rejected, it exits with 1. Any other exit
|
|
||||||
* code signals an error.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public
|
|
||||||
* License along with this program; if not, write to the Free
|
|
||||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*
|
|
||||||
* Copyright (C) 1998, Caldera, Inc.
|
|
||||||
* Released under the GNU General Public License
|
|
||||||
*
|
|
||||||
* Olaf Kirch <okir@caldera.de> General Framework and PAM support
|
|
||||||
* Christian Esken <esken@kde.org> Shadow and /etc/passwd support
|
|
||||||
* Oswald Buddenhagen <ossi@kde.org> Binary server mode
|
|
||||||
*
|
|
||||||
* Other parts were taken from kscreensaver's passwd.cpp
|
|
||||||
*****************************************************************/
|
|
||||||
|
|
||||||
#ifndef KCHECKPASS_H_
|
|
||||||
#define KCHECKPASS_H_
|
|
||||||
|
|
||||||
#include <config-workspace.h>
|
|
||||||
#include <config-unix.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_CRYPT_H
|
|
||||||
#include <crypt.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <pwd.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_GETSPNAM
|
|
||||||
# define HAVE_SHADOW
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(__INSURE__)
|
|
||||||
# define ATTR_UNUSED __attribute__((unused))
|
|
||||||
# define ATTR_NORETURN __attribute__((noreturn))
|
|
||||||
# define ATTR_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
|
|
||||||
#else
|
|
||||||
# define ATTR_UNUSED
|
|
||||||
# define ATTR_NORETURN
|
|
||||||
# define ATTR_PRINTFLIKE(fmt,var)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "kcheckpass-enums.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*****************************************************************
|
|
||||||
* Authenticates user
|
|
||||||
*****************************************************************/
|
|
||||||
#ifdef HAVE_PAM
|
|
||||||
AuthReturn Authenticate_pam(
|
|
||||||
const char *caller,
|
|
||||||
const char *user,
|
|
||||||
const char *password,
|
|
||||||
char *(*conv) (ConvRequest, const char *)
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_SHADOW
|
|
||||||
AuthReturn Authenticate_shadow(
|
|
||||||
const char *user,
|
|
||||||
const char *password
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
AuthReturn Authenticate_etcpasswd(
|
|
||||||
const char *user,
|
|
||||||
const char *password
|
|
||||||
);
|
|
||||||
|
|
||||||
/*****************************************************************
|
|
||||||
* Output a message to stderr
|
|
||||||
*****************************************************************/
|
|
||||||
void message(const char *, ...) ATTR_PRINTFLIKE(1, 2);
|
|
||||||
|
|
||||||
/*****************************************************************
|
|
||||||
* Overwrite and free the passed string
|
|
||||||
*****************************************************************/
|
|
||||||
void dispose(char *);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
|
@ -12,7 +12,6 @@ if(X11_Xkb_FOUND AND X11_Xkbfile_FOUND)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory( input )
|
add_subdirectory( input )
|
||||||
add_subdirectory( screensaver )
|
|
||||||
add_subdirectory( dateandtime )
|
add_subdirectory( dateandtime )
|
||||||
add_subdirectory( autostart )
|
add_subdirectory( autostart )
|
||||||
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
include_directories(
|
|
||||||
# for kworkspace_export.h
|
|
||||||
${CMAKE_BINARY_DIR}/libs/kworkspace
|
|
||||||
)
|
|
||||||
|
|
||||||
########### next target ###############
|
|
||||||
|
|
||||||
set(kcm_screensaver_PART_SRCS
|
|
||||||
scrnsave.cpp
|
|
||||||
testwin.cpp
|
|
||||||
saverconfig.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(kscreensaver_xml ${CMAKE_SOURCE_DIR}/ksmserver/screenlocker/dbus/org.kde.screensaver.xml)
|
|
||||||
QT4_ADD_DBUS_INTERFACE( kcm_screensaver_PART_SRCS ${kscreensaver_xml} kscreensaver_interface )
|
|
||||||
|
|
||||||
kde4_add_plugin(kcm_screensaver ${kcm_screensaver_PART_SRCS})
|
|
||||||
|
|
||||||
|
|
||||||
target_link_libraries(kcm_screensaver ${KDE4_PLASMA_LIBS} ${X11_LIBRARIES} kworkspace)
|
|
||||||
|
|
||||||
find_library(DL_LIBRARY dl)
|
|
||||||
if (DL_LIBRARY)
|
|
||||||
target_link_libraries(kcm_screensaver ${DL_LIBRARY})
|
|
||||||
endif(DL_LIBRARY)
|
|
||||||
|
|
||||||
install(TARGETS kcm_screensaver DESTINATION ${KDE4_PLUGIN_INSTALL_DIR} )
|
|
||||||
|
|
||||||
|
|
||||||
########### install files ###############
|
|
||||||
|
|
||||||
install( FILES screensaver.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR} )
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
sed 's/X-KDE-Category=\(.*\)/i18nc\("Screen saver category","\1"\);/' < category_list > category_list.cpp
|
|
||||||
$EXTRACTRC *.ui >> rc.cpp
|
|
||||||
$XGETTEXT *.cpp -o $podir/kcmscreensaver.pot
|
|
||||||
rm -f category_list.cpp
|
|
||||||
rm -f rc.cpp
|
|
|
@ -1,16 +0,0 @@
|
||||||
// This list contains all screen saver categories.
|
|
||||||
// The categories are extracted for translation (see Messages.sh).
|
|
||||||
|
|
||||||
// To show a screen saver in the list under a category, add the
|
|
||||||
// category in the screen saver desktop file using the syntax below.
|
|
||||||
|
|
||||||
X-KDE-Category=Banners & Pictures
|
|
||||||
X-KDE-Category=Desktop Distortions
|
|
||||||
X-KDE-Category=Flying Things
|
|
||||||
X-KDE-Category=Fractals
|
|
||||||
X-KDE-Category=Gadgets & Simulations
|
|
||||||
X-KDE-Category=Illusions of Depth
|
|
||||||
X-KDE-Category=Miscellaneous
|
|
||||||
X-KDE-Category=OpenGL Screen Savers
|
|
||||||
X-KDE-Category=Rapid Motion
|
|
||||||
X-KDE-Category=Visit to Flatland
|
|
|
@ -1,40 +0,0 @@
|
||||||
/*
|
|
||||||
* ksmmonitor.h
|
|
||||||
* Copyright 1997 Matthias Hoelzer
|
|
||||||
* Copyright 1996,1999,2002 Martin R. Jones
|
|
||||||
* Copyright 2004 Chris Howells
|
|
||||||
* Copyright 2007-2008 Benjamin Meyer <ben@meyerhome.net>
|
|
||||||
* Copyright 2007-2008 Hamish Rodda <rodda@kde.org>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2 of
|
|
||||||
* the License or (at your option) version 3 or any later version
|
|
||||||
* accepted by the membership of KDE e.V. (or its successor approved
|
|
||||||
* by the membership of KDE e.V.), which shall act as a proxy
|
|
||||||
* defined in Section 14 of version 3 of the license.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef KSSMONITOR_H
|
|
||||||
#define KSSMONITOR_H
|
|
||||||
|
|
||||||
#include <QWidget>
|
|
||||||
|
|
||||||
class KSSMonitor : public QWidget
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
KSSMonitor( QWidget *parent ) : QWidget( parent ) {}
|
|
||||||
|
|
||||||
// we don't want no steenking palette change
|
|
||||||
virtual void setPalette( const QPalette & ) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,69 +0,0 @@
|
||||||
/*
|
|
||||||
* saverconfig.cpp
|
|
||||||
* Copyright 1997 Matthias Hoelzer
|
|
||||||
* Copyright 1996,1999,2002 Martin R. Jones
|
|
||||||
* Copyright 2004 Chris Howells
|
|
||||||
* Copyright 2007-2008 Benjamin Meyer <ben@meyerhome.net>
|
|
||||||
* Copyright 2007-2008 Hamish Rodda <rodda@kde.org>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2 of
|
|
||||||
* the License or (at your option) version 3 or any later version
|
|
||||||
* accepted by the membership of KDE e.V. (or its successor approved
|
|
||||||
* by the membership of KDE e.V.), which shall act as a proxy
|
|
||||||
* defined in Section 14 of version 3 of the license.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "saverconfig.h"
|
|
||||||
|
|
||||||
#include <KDesktopFile>
|
|
||||||
#include <KLocale>
|
|
||||||
#include <KConfigGroup>
|
|
||||||
|
|
||||||
SaverConfig::SaverConfig()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SaverConfig::read(const QString &file)
|
|
||||||
{
|
|
||||||
KDesktopFile config(file);
|
|
||||||
const KConfigGroup group = config.desktopGroup();
|
|
||||||
#if 0
|
|
||||||
if( !config.tryExec())
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
mExec = group.readPathEntry("Exec", QString());
|
|
||||||
mName = group.readEntry("Name");
|
|
||||||
QString categoryName = group.readEntry("X-KDE-Category");
|
|
||||||
if(categoryName.isEmpty())
|
|
||||||
mCategory = categoryName;
|
|
||||||
else
|
|
||||||
mCategory = i18nc("Screen saver category", // Must be same in CMakeFiles.txt
|
|
||||||
categoryName.toUtf8());
|
|
||||||
|
|
||||||
if (config.hasActionGroup("Setup"))
|
|
||||||
{
|
|
||||||
mSetup = config.actionGroup("Setup").readPathEntry("Exec", QString());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.hasActionGroup("InWindow"))
|
|
||||||
{
|
|
||||||
mSaver = config.actionGroup("InWindow").readPathEntry("Exec", QString());
|
|
||||||
}
|
|
||||||
|
|
||||||
int indx = file.lastIndexOf('/');
|
|
||||||
if (indx >= 0) {
|
|
||||||
mFile = file.mid(indx+1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return !mSaver.isEmpty();
|
|
||||||
}
|
|
|
@ -1,59 +0,0 @@
|
||||||
/*
|
|
||||||
* saverconfig.h
|
|
||||||
* Copyright 1997 Matthias Hoelzer
|
|
||||||
* Copyright 1996,1999,2002 Martin R. Jones
|
|
||||||
* Copyright 2004 Chris Howells
|
|
||||||
* Copyright 2007-2008 Benjamin Meyer <ben@meyerhome.net>
|
|
||||||
* Copyright 2007-2008 Hamish Rodda <rodda@kde.org>
|
|
||||||
* Copyright 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2 of
|
|
||||||
* the License or (at your option) version 3 or any later version
|
|
||||||
* accepted by the membership of KDE e.V. (or its successor approved
|
|
||||||
* by the membership of KDE e.V.), which shall act as a proxy
|
|
||||||
* defined in Section 14 of version 3 of the license.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef SAVERCONFIG_H
|
|
||||||
#define SAVERCONFIG_H
|
|
||||||
|
|
||||||
#include <QString>
|
|
||||||
|
|
||||||
class SaverConfig
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
SaverConfig();
|
|
||||||
|
|
||||||
bool read(const QString &file);
|
|
||||||
|
|
||||||
QString exec() const { return mExec; }
|
|
||||||
QString setup() const { return mSetup; }
|
|
||||||
QString saver() const { return mSaver; }
|
|
||||||
QString name() const { return mName; }
|
|
||||||
QString file() const { return mFile; }
|
|
||||||
QString category() const { return mCategory; }
|
|
||||||
|
|
||||||
bool operator<(const SaverConfig & other) const {
|
|
||||||
return (name().localeAwareCompare(other.name()) < 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
QString mExec;
|
|
||||||
QString mSetup;
|
|
||||||
QString mSaver;
|
|
||||||
QString mName;
|
|
||||||
QString mFile;
|
|
||||||
QString mCategory;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,148 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Exec=kcmshell4 screensaver
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
Type=Service
|
|
||||||
X-KDE-ServiceTypes=KCModule
|
|
||||||
X-DocPath=kcontrol/screensaver/index.html
|
|
||||||
|
|
||||||
X-KDE-Library=kcm_screensaver
|
|
||||||
X-KDE-ParentApp=kcontrol
|
|
||||||
|
|
||||||
X-KDE-System-Settings-Parent-Category=display
|
|
||||||
X-KDE-Weight=70
|
|
||||||
|
|
||||||
Name=Screen Locker
|
|
||||||
Name[bs]=Zaključavanje ekrana
|
|
||||||
Name[ca]=Bloqueig de pantalla
|
|
||||||
Name[ca@valencia]=Bloqueig de pantalla
|
|
||||||
Name[cs]=Zámek obrazovky
|
|
||||||
Name[da]=Skærmlås
|
|
||||||
Name[de]=Bildschirmsperre
|
|
||||||
Name[el]=Κλείδωμα οθόνης
|
|
||||||
Name[en_GB]=Screen Locker
|
|
||||||
Name[es]=Bloqueador de pantalla
|
|
||||||
Name[et]=Ekraani lukustaja
|
|
||||||
Name[eu]=Pantaila giltzatzea
|
|
||||||
Name[fi]=Näyttölukko
|
|
||||||
Name[fr]=Verrouillage d'écran
|
|
||||||
Name[gl]=Bloqueador da pantalla
|
|
||||||
Name[he]=נועל מסך
|
|
||||||
Name[hu]=Képernyőzároló
|
|
||||||
Name[ia]=Blocator de schermo
|
|
||||||
Name[is]=Skjálæsing
|
|
||||||
Name[kk]=Экран бұғаттағышы
|
|
||||||
Name[ko]=화면 잠금
|
|
||||||
Name[lt]=Ekrano užraktas
|
|
||||||
Name[mr]=स्क्रीन कुलूपबंद करणारा
|
|
||||||
Name[nb]=Skjermlåser
|
|
||||||
Name[nds]=Schirmslott
|
|
||||||
Name[nl]=Schermvergrendelaar
|
|
||||||
Name[pa]=ਸਕਰੀਨ ਲਾਕਰ
|
|
||||||
Name[pl]=Blokowanie ekranu
|
|
||||||
Name[pt]=Bloqueio do Ecrã
|
|
||||||
Name[pt_BR]=Bloqueador de sessão
|
|
||||||
Name[ro]=Blocarea ecranului
|
|
||||||
Name[ru]=Блокировщик экрана
|
|
||||||
Name[sk]=Zamykač obrazovky
|
|
||||||
Name[sl]=Zaklep zaslona
|
|
||||||
Name[sr]=Закључавач екрана
|
|
||||||
Name[sr@ijekavian]=Закључавач екрана
|
|
||||||
Name[sr@ijekavianlatin]=Zaključavač ekrana
|
|
||||||
Name[sr@latin]=Zaključavač ekrana
|
|
||||||
Name[sv]=Skärmlåsning
|
|
||||||
Name[tr]=Ekran Kilitleyici
|
|
||||||
Name[uk]=Блокування екрана
|
|
||||||
Name[x-test]=xxScreen Lockerxx
|
|
||||||
Name[zh_CN]=屏幕锁
|
|
||||||
Name[zh_TW]=螢幕鎖定程式
|
|
||||||
|
|
||||||
Comment=Screen Locker Settings
|
|
||||||
Comment[bs]=Postavke zaključavanja ekrana
|
|
||||||
Comment[ca]=Arranjament del bloqueig de pantalla
|
|
||||||
Comment[ca@valencia]=Arranjament del bloqueig de pantalla
|
|
||||||
Comment[cs]=Nastavení zámku obrazovky
|
|
||||||
Comment[da]=Indstilling af skærmlås
|
|
||||||
Comment[de]=Einstellungen für Bildschirmsperre
|
|
||||||
Comment[el]=Ρυθμίσεις κλειδώματος οθόνης
|
|
||||||
Comment[en_GB]=Screen Locker Settings
|
|
||||||
Comment[es]=Preferencias del bloqueador de pantalla
|
|
||||||
Comment[et]=Ekraani lukustaja seadistused
|
|
||||||
Comment[eu]=Pantaila giltzatzeko ezarpenak
|
|
||||||
Comment[fi]=Näyttölukon asetukset
|
|
||||||
Comment[fr]=Configuration du verrouillage de l'écran
|
|
||||||
Comment[gl]=Configuración do bloqueador da pantalla
|
|
||||||
Comment[he]=הגדרות נועל המסך
|
|
||||||
Comment[hu]=A képernyőzároló beállításai
|
|
||||||
Comment[ia]=Preferentias de Blocator de schermo
|
|
||||||
Comment[is]=Stillingar skjálæsingar
|
|
||||||
Comment[kk]=Экран бұғаттағышының параметрлері
|
|
||||||
Comment[ko]=화면 잠금 설정
|
|
||||||
Comment[lt]=Ekrano užrakto nustatymai
|
|
||||||
Comment[mr]=स्क्रीन कुलूपबंद संयोजना
|
|
||||||
Comment[nb]=Tilpasning av skjermlåser
|
|
||||||
Comment[nds]=Schirmslott instellen
|
|
||||||
Comment[nl]=Instellingen voor schermvergrendeling
|
|
||||||
Comment[pa]=ਸਕਰੀਨ ਲਾਕਰ ਸੈਟਿੰਗ
|
|
||||||
Comment[pl]=Ustawienia blokowania ekranu
|
|
||||||
Comment[pt]=Configuração do Bloqueio do Ecrã
|
|
||||||
Comment[pt_BR]=Configurações do bloqueador de sessão
|
|
||||||
Comment[ro]=Configurări pentru blocarea ecranului
|
|
||||||
Comment[ru]=Настройка блокировщика экрана
|
|
||||||
Comment[sk]=Nastavenie zamykača obrazovky
|
|
||||||
Comment[sl]=Nastavitve zaklepa zaslona
|
|
||||||
Comment[sr]=Поставке закључавача екрана
|
|
||||||
Comment[sr@ijekavian]=Поставке закључавача екрана
|
|
||||||
Comment[sr@ijekavianlatin]=Postavke zaključavača ekrana
|
|
||||||
Comment[sr@latin]=Postavke zaključavača ekrana
|
|
||||||
Comment[sv]=Inställningar av skärmlåsning
|
|
||||||
Comment[tr]=Ekran Kilitleyici Ayarları
|
|
||||||
Comment[uk]=Параметри блокування екрана
|
|
||||||
Comment[x-test]=xxScreen Locker Settingsxx
|
|
||||||
Comment[zh_CN]=屏幕锁定程序设置
|
|
||||||
Comment[zh_TW]=螢幕鎖定程式設定
|
|
||||||
|
|
||||||
X-KDE-Keywords=screensavers,Priority,locking,security
|
|
||||||
X-KDE-Keywords[bs]=čuvar ekrana,prioritet,zaključavanje,sigurnost
|
|
||||||
X-KDE-Keywords[ca]=estalvis de pantalla,Prioritat,bloqueig,seguretat
|
|
||||||
X-KDE-Keywords[ca@valencia]=estalvis de pantalla,Prioritat,bloqueig,seguretat
|
|
||||||
X-KDE-Keywords[cs]=spořiče obrazovky,priorita,zamykání,bezpečnost
|
|
||||||
X-KDE-Keywords[da]=screensaver,pauseskærme,prioritet,lås,sikkerhed
|
|
||||||
X-KDE-Keywords[de]=Bildschirmschoner,Priorität,Bildschirmsperre,Sicherheit
|
|
||||||
X-KDE-Keywords[el]=προφύλαξη οθόνης,Προτεραιότητα,κλείδωμα,ασφάλεια
|
|
||||||
X-KDE-Keywords[en_GB]=screensavers,Priority,locking,security
|
|
||||||
X-KDE-Keywords[es]=salvapantallas,Prioridad,bloqueo,seguridad
|
|
||||||
X-KDE-Keywords[et]=ekraanisäästjad,prioriteet,lukustamine,turvalisus,turve
|
|
||||||
X-KDE-Keywords[eu]=pantaila-babesleak,lehentasuna,giltzatzea,blokeatzea,segurtasuna
|
|
||||||
X-KDE-Keywords[fi]=näytönsäästäjät,prioriteetti,tärkeys,lukitus,turvallisuus
|
|
||||||
X-KDE-Keywords[fr]=écran de veille, priorité, verrouillage, sécurité
|
|
||||||
X-KDE-Keywords[ga]=spárálaithe scáileáin,Tosaíocht,glasáil,slándáil
|
|
||||||
X-KDE-Keywords[gl]=protector de pantalla, salvapantallas, prioridade, seguranza, seguridade
|
|
||||||
X-KDE-Keywords[he]=screensavers,Priority,locking,security,שומר מסך, עדיפות, אבטחה, נעילה, נעל
|
|
||||||
X-KDE-Keywords[hu]=képernyővédők,Prioritás,zárolás,biztonság
|
|
||||||
X-KDE-Keywords[ia]=Salvatores de schermo,Prioritate,blocante,securitate
|
|
||||||
X-KDE-Keywords[kk]=screensavers,Priority,locking,security
|
|
||||||
X-KDE-Keywords[ko]=screensavers,Priority,locking,security,화면보호기,화면 보호기,잠금,보안
|
|
||||||
X-KDE-Keywords[lt]=užsklandos,prioritetas,užrakinimas,saugumas
|
|
||||||
X-KDE-Keywords[mr]=स्क्रीन सेवर्स, प्रायोरीटी, लॉकिंग, सिक़्युरिटी
|
|
||||||
X-KDE-Keywords[nb]=pauseskjermer,Prioritet,låsing,sikkerhet
|
|
||||||
X-KDE-Keywords[nds]=Pausschirmen,Prioriteet,afsluten,Sekerheit
|
|
||||||
X-KDE-Keywords[nl]=schermbeveiliging,prioriteit,vergrendeling,beveiliging
|
|
||||||
X-KDE-Keywords[pa]=ਸਕਰੀਨ-ਸੇਵਰ,ਤਰਜੀਹ,ਲਾਕ ਕਰਨਾ,ਸੁਰੱਖਿਆ
|
|
||||||
X-KDE-Keywords[pl]=wygaszacze ekranu,Priorytet,blokowanie,bezpieczeństwo
|
|
||||||
X-KDE-Keywords[pt]=protector de ecrã,prioridade,bloqueio,segurança
|
|
||||||
X-KDE-Keywords[pt_BR]=protetor de tela,Prioridade,bloqueio,segurança
|
|
||||||
X-KDE-Keywords[ru]=screensavers,Priority,locking,security,хранители экрана, приоритет,блокировка,безопасность
|
|
||||||
X-KDE-Keywords[sk]=šetriče obrazovky,Priorita,zamykanie,bezpečnosť
|
|
||||||
X-KDE-Keywords[sl]=ohranjevalniki zaslona,prednost,zaklepanje,varnost
|
|
||||||
X-KDE-Keywords[sr]=screensavers,Priority,locking,security,чувар екрана,приоритет,закључавање,безбедност
|
|
||||||
X-KDE-Keywords[sr@ijekavian]=screensavers,Priority,locking,security,чувар екрана,приоритет,закључавање,безбедност
|
|
||||||
X-KDE-Keywords[sr@ijekavianlatin]=screensavers,Priority,locking,security,čuvar ekrana,prioritet,zaključavanje,bezbednost
|
|
||||||
X-KDE-Keywords[sr@latin]=screensavers,Priority,locking,security,čuvar ekrana,prioritet,zaključavanje,bezbednost
|
|
||||||
X-KDE-Keywords[sv]=skärmsläckare,Prioritet,låsa,säkerhet
|
|
||||||
X-KDE-Keywords[tr]=ekran koruyucular,Öncelik,kilitleme,güvenlik
|
|
||||||
X-KDE-Keywords[uk]=screensavers,Priority,locking,security,зберігач,екран,блокування,захист,безпека
|
|
||||||
X-KDE-Keywords[x-test]=xxscreensavers,Priority,locking,securityxx
|
|
||||||
X-KDE-Keywords[zh_CN]=screensavers,Priority,locking,security,屏幕保护,优先级,锁定,安全
|
|
||||||
X-KDE-Keywords[zh_TW]=screensavers,Priority,locking,security
|
|
||||||
|
|
||||||
Categories=Qt;KDE;X-KDE-settings-looknfeel;
|
|
|
@ -1,352 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<author>Davide Bettio <davide.bettio@kdemail.net></author>
|
|
||||||
<class>ScreenSaver</class>
|
|
||||||
<widget class="QWidget" name="ScreenSaver">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>801</width>
|
|
||||||
<height>733</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="mSettingsGroup" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QFormLayout" name="formLayout">
|
|
||||||
<item row="0" column="1">
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QCheckBox" name="mEnabledCheckBox">
|
|
||||||
<property name="whatsThis">
|
|
||||||
<string>Automatically start the screen saver after a period of inactivity.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Start a&utomatically after:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="KIntSpinBox" name="mWaitEdit"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<spacer name="horizontalSpacer_6">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>243</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="mLockCheckBox">
|
|
||||||
<property name="whatsThis">
|
|
||||||
<string>Prevent potential unauthorized use by requiring a password to stop the screen saver.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>&Require password after:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="KIntSpinBox" name="mWaitLockEdit">
|
|
||||||
<property name="whatsThis">
|
|
||||||
<string>The amount of time, after the screen saver has started, to ask for the unlock password.</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<spacer name="horizontalSpacer_7">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>243</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Screen locker type:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>mSimpleLockerRadio</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QRadioButton" name="mSimpleLockerRadio">
|
|
||||||
<property name="text">
|
|
||||||
<string>S&imple locker</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="mPlasmaWidgetsRadio">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Desktop Widgets</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="KPushButton" name="mPlasmaSetup">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Configure...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QRadioButton" name="mScreenSaverRadio">
|
|
||||||
<property name="text">
|
|
||||||
<string>S&creen saver</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QWidget" name="mScreenSaverSettings" native="true">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>1</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>16</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QTreeWidget" name="mSaverListView">
|
|
||||||
<property name="whatsThis">
|
|
||||||
<string>Select the screen saver to use.</string>
|
|
||||||
</property>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">1</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="mPreviewAreaWidget" native="true">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>145</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="widget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>5</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="KPushButton" name="mTestBt">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="whatsThis">
|
|
||||||
<string>Show a full screen preview of the screen saver.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>&Test</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="KPushButton" name="mSetupBt">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="whatsThis">
|
|
||||||
<string>Configure the screen saver's options, if any.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>&Setup...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>5</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>145</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>KIntSpinBox</class>
|
|
||||||
<extends>QSpinBox</extends>
|
|
||||||
<header>knuminput.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>KPushButton</class>
|
|
||||||
<extends>QPushButton</extends>
|
|
||||||
<header>kpushbutton.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>mEnabledCheckBox</tabstop>
|
|
||||||
<tabstop>mWaitEdit</tabstop>
|
|
||||||
<tabstop>mLockCheckBox</tabstop>
|
|
||||||
<tabstop>mWaitLockEdit</tabstop>
|
|
||||||
<tabstop>mSimpleLockerRadio</tabstop>
|
|
||||||
<tabstop>mPlasmaWidgetsRadio</tabstop>
|
|
||||||
<tabstop>mPlasmaSetup</tabstop>
|
|
||||||
<tabstop>mScreenSaverRadio</tabstop>
|
|
||||||
<tabstop>mSaverListView</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>mPlasmaWidgetsRadio</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>mPlasmaSetup</receiver>
|
|
||||||
<slot>setEnabled(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>175</x>
|
|
||||||
<y>147</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>283</x>
|
|
||||||
<y>147</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>mScreenSaverRadio</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>mScreenSaverSettings</receiver>
|
|
||||||
<slot>setEnabled(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>163</x>
|
|
||||||
<y>176</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>485</x>
|
|
||||||
<y>512</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
|
@ -1,781 +0,0 @@
|
||||||
/*
|
|
||||||
* scrnsave.cpp
|
|
||||||
* Copyright 1997 Matthias Hoelzer
|
|
||||||
* Copyright 1996,1999,2002 Martin R. Jones
|
|
||||||
* Copyright 2004 Chris Howells
|
|
||||||
* Copyright 2007-2008 Benjamin Meyer <ben@meyerhome.net>
|
|
||||||
* Copyright 2007-2008 Hamish Rodda <rodda@kde.org>
|
|
||||||
* Copyright 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
|
|
||||||
* Copyright 2009 Davide Bettio
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2 of
|
|
||||||
* the License or (at your option) version 3 or any later version
|
|
||||||
* accepted by the membership of KDE e.V. (or its successor approved
|
|
||||||
* by the membership of KDE e.V.), which shall act as a proxy
|
|
||||||
* defined in Section 14 of version 3 of the license.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <config-workspace.h>
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/wait.h>
|
|
||||||
|
|
||||||
#include <QCheckBox>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QPushButton>
|
|
||||||
#include <QTimer>
|
|
||||||
#include <QTreeWidget>
|
|
||||||
#include <QHeaderView>
|
|
||||||
#include <QtGui/qtreewidget.h>
|
|
||||||
#include <QTextStream>
|
|
||||||
#include <QtGui/qevent.h>
|
|
||||||
#include <QHBoxLayout>
|
|
||||||
#include <QBoxLayout>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QtGui/qevent.h>
|
|
||||||
#include <QtGui/qevent.h>
|
|
||||||
#include <QtDBus/QtDBus>
|
|
||||||
|
|
||||||
#include <QDesktopWidget>
|
|
||||||
|
|
||||||
#include <kmacroexpander.h>
|
|
||||||
#include <KShell>
|
|
||||||
#include <KServiceTypeTrader>
|
|
||||||
#include <KStandardDirs>
|
|
||||||
#include <KApplication>
|
|
||||||
#include <KDebug>
|
|
||||||
#include <KDialog>
|
|
||||||
#include <KAboutData>
|
|
||||||
#include <KIcon>
|
|
||||||
#include <KNumInput>
|
|
||||||
#include <QProcess>
|
|
||||||
//#include <KServiceGroup>
|
|
||||||
#include <KPluginFactory>
|
|
||||||
#include <KPluginLoader>
|
|
||||||
|
|
||||||
#include <kscreensaver_interface.h>
|
|
||||||
#include <kworkspace/screenpreviewwidget.h>
|
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <fixx11h.h>
|
|
||||||
|
|
||||||
#include "scrnsave.h"
|
|
||||||
#include <QtGui/qx11info_x11.h>
|
|
||||||
|
|
||||||
const uint widgetEventMask = // X event mask
|
|
||||||
(uint)(
|
|
||||||
ExposureMask |
|
|
||||||
PropertyChangeMask |
|
|
||||||
StructureNotifyMask
|
|
||||||
);
|
|
||||||
|
|
||||||
//===========================================================================
|
|
||||||
// DLL Interface for kcontrol
|
|
||||||
K_PLUGIN_FACTORY(KSSFactory,
|
|
||||||
registerPlugin<KScreenSaver>();
|
|
||||||
)
|
|
||||||
K_EXPORT_PLUGIN(KSSFactory("kcmscreensaver"))
|
|
||||||
|
|
||||||
|
|
||||||
static QString findExe(const QString &exe) {
|
|
||||||
QString result = KStandardDirs::locate("exe", exe);
|
|
||||||
if (result.isEmpty())
|
|
||||||
result = KStandardDirs::findExe(exe);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
KScreenSaver::KScreenSaver(QWidget *parent, const QVariantList&)
|
|
||||||
: KCModule(KSSFactory::componentData(), parent)
|
|
||||||
{
|
|
||||||
mSetupProc = 0;
|
|
||||||
mPreviewProc = 0;
|
|
||||||
mTestWin = 0;
|
|
||||||
mTestProc = 0;
|
|
||||||
mPrevSelected = -2;
|
|
||||||
mMonitor = 0;
|
|
||||||
mTesting = false;
|
|
||||||
|
|
||||||
setQuickHelp( i18n("<h1>Screen Saver</h1> <p>This module allows you to enable and"
|
|
||||||
" configure a screen saver. Note that you can enable a screen saver"
|
|
||||||
" even if you have power saving features enabled for your display.</p>"
|
|
||||||
" <p>Besides providing an endless variety of entertainment and"
|
|
||||||
" preventing monitor burn-in, a screen saver also gives you a simple"
|
|
||||||
" way to lock your display if you are going to leave it unattended"
|
|
||||||
" for a while. If you want the screen saver to lock the session, make sure you enable"
|
|
||||||
" the \"Require password\" feature of the screen saver; if you do not, you can still"
|
|
||||||
" explicitly lock the session using the desktop's \"Lock Session\" action.</p>"));
|
|
||||||
|
|
||||||
setButtons( KCModule::Help | KCModule::Apply );
|
|
||||||
|
|
||||||
|
|
||||||
setupUi(this);
|
|
||||||
|
|
||||||
readSettings();
|
|
||||||
|
|
||||||
mSetupProc = new QProcess;
|
|
||||||
connect(mSetupProc, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(slotSetupDone()));
|
|
||||||
|
|
||||||
mPreviewProc = new QProcess;
|
|
||||||
connect(mPreviewProc, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(slotPreviewExited()));
|
|
||||||
|
|
||||||
mSaverListView->setColumnCount(1);
|
|
||||||
mSaverListView->header()->hide();
|
|
||||||
mSelected = -1;
|
|
||||||
connect( mSaverListView, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(slotSetup()));
|
|
||||||
|
|
||||||
connect( mSetupBt, SIGNAL(clicked()), SLOT(slotSetup()) );
|
|
||||||
connect( mTestBt, SIGNAL(clicked()), SLOT(slotTest()) );
|
|
||||||
|
|
||||||
mEnabledCheckBox->setChecked(mEnabled);
|
|
||||||
connect(mEnabledCheckBox, SIGNAL(toggled(bool)),
|
|
||||||
this, SLOT(slotEnable(bool)));
|
|
||||||
|
|
||||||
mWaitEdit->setRange(1, INT_MAX);
|
|
||||||
mWaitEdit->setSuffix(ki18ncp("unit of time. minutes until the screensaver is triggered",
|
|
||||||
" minute", " minutes"));
|
|
||||||
mWaitEdit->setValue(mTimeout/60);
|
|
||||||
mWaitEdit->setEnabled(mEnabled);
|
|
||||||
connect(mWaitEdit, SIGNAL(valueChanged(int)),
|
|
||||||
this, SLOT(slotTimeoutChanged(int)));
|
|
||||||
|
|
||||||
mLockCheckBox->setEnabled( mEnabled );
|
|
||||||
mLockCheckBox->setChecked( mLock );
|
|
||||||
connect( mLockCheckBox, SIGNAL(toggled(bool)),
|
|
||||||
this, SLOT(slotLock(bool)) );
|
|
||||||
|
|
||||||
mWaitLockEdit->setRange(1, 300);
|
|
||||||
mWaitLockEdit->setSuffix(ki18np(" second", " seconds"));
|
|
||||||
mWaitLockEdit->setValue(mLockTimeout/1000);
|
|
||||||
mWaitLockEdit->setEnabled(mEnabled && mLock);
|
|
||||||
connect(mWaitLockEdit, SIGNAL(valueChanged(int)),
|
|
||||||
this, SLOT(slotLockTimeoutChanged(int)));
|
|
||||||
|
|
||||||
connect(mPlasmaWidgetsRadio, SIGNAL(toggled(bool)), this, SLOT(slotEnablePlasma(bool)));
|
|
||||||
connect(mScreenSaverRadio, SIGNAL(toggled(bool)), this, SLOT(slotEnableLegacyScreenSaver(bool)));
|
|
||||||
|
|
||||||
mPlasmaSetup->setEnabled(mPlasmaEnabled);
|
|
||||||
connect(mPlasmaSetup, SIGNAL(clicked()), this, SLOT(slotPlasmaSetup()));
|
|
||||||
|
|
||||||
mMonitorPreview = new ScreenPreviewWidget(this);
|
|
||||||
mMonitorPreview->setFixedSize(200,220);
|
|
||||||
QDesktopWidget *desktop = QApplication::desktop();
|
|
||||||
QRect avail = desktop->availableGeometry(desktop->screenNumber(this));
|
|
||||||
mMonitorPreview->setRatio((qreal)avail.width()/(qreal)avail.height());
|
|
||||||
mMonitorPreview->setWhatsThis( i18n("A preview of the selected screen saver.") );
|
|
||||||
mPreviewAreaWidget->layout()->addWidget(mMonitorPreview);
|
|
||||||
|
|
||||||
if (mImmutable)
|
|
||||||
{
|
|
||||||
setButtons(buttons() & ~Default);
|
|
||||||
mSettingsGroup->setEnabled(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// finding the savers can take some time, so defer loading until
|
|
||||||
// we've started up.
|
|
||||||
mNumLoaded = 0;
|
|
||||||
mLoadTimer = new QTimer( this );
|
|
||||||
connect( mLoadTimer, SIGNAL(timeout()), SLOT(findSavers()) );
|
|
||||||
mLoadTimer->start( 100 );
|
|
||||||
mChanged = false;
|
|
||||||
emit changed(false);
|
|
||||||
|
|
||||||
KAboutData *about =
|
|
||||||
new KAboutData(I18N_NOOP("kcmscreensaver"), 0, ki18n("KDE Screen Saver Control Module"),
|
|
||||||
0, KLocalizedString(), KAboutData::License_GPL,
|
|
||||||
ki18n("(c) 1997-2002 Martin R. Jones\n"
|
|
||||||
"(c) 2003-2004 Chris Howells"));
|
|
||||||
about->addAuthor(ki18n("Chris Howells"), KLocalizedString(), "howells@kde.org");
|
|
||||||
about->addAuthor(ki18n("Martin R. Jones"), KLocalizedString(), "jones@kde.org");
|
|
||||||
|
|
||||||
setAboutData( about );
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
bool KScreenSaver::event(QEvent *e)
|
|
||||||
{
|
|
||||||
if (e->type() == QEvent::Resize) {
|
|
||||||
if (mMonitor)
|
|
||||||
mMonitor->setGeometry(mMonitorPreview->previewRect());
|
|
||||||
} else if (e->type() == QEvent::KeyPress ||
|
|
||||||
e->type() == QEvent::MouseButtonPress) {
|
|
||||||
if (mTesting) {
|
|
||||||
slotStopTest();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return KCModule::event(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
KScreenSaver::~KScreenSaver()
|
|
||||||
{
|
|
||||||
if (mPreviewProc)
|
|
||||||
{
|
|
||||||
if (mPreviewProc->state() == QProcess::Running)
|
|
||||||
{
|
|
||||||
//Avoid triggering slotPreviewExited on close
|
|
||||||
mPreviewProc->disconnect(this);
|
|
||||||
|
|
||||||
mPreviewProc->kill( );
|
|
||||||
mPreviewProc->waitForFinished( );
|
|
||||||
}
|
|
||||||
delete mPreviewProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mSetupProc)
|
|
||||||
{
|
|
||||||
if (mSetupProc->state() == QProcess::Running)
|
|
||||||
{
|
|
||||||
//Avoid triggering slotSetupDone on close
|
|
||||||
mSetupProc->disconnect(this);
|
|
||||||
|
|
||||||
mSetupProc->kill( );
|
|
||||||
mSetupProc->waitForFinished( );
|
|
||||||
}
|
|
||||||
delete mSetupProc;
|
|
||||||
}
|
|
||||||
|
|
||||||
delete mTestProc;
|
|
||||||
delete mTestWin;
|
|
||||||
|
|
||||||
qDeleteAll(mSaverList);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::load()
|
|
||||||
{
|
|
||||||
readSettings();
|
|
||||||
|
|
||||||
//with the following line, the Test and Setup buttons are not enabled correctly
|
|
||||||
//if no saver was selected, the "Reset" and the "Enable screensaver", it is only called when starting and when pressing reset, aleXXX
|
|
||||||
// mSelected = -1;
|
|
||||||
|
|
||||||
QTreeWidgetItem * selectedItem = treeItemForSaverFile(mSaver);
|
|
||||||
if (selectedItem) {
|
|
||||||
mSelected = indexForSaverFile(mSaver);
|
|
||||||
mSaverListView->setCurrentItem(selectedItem, QItemSelectionModel::ClearAndSelect);
|
|
||||||
slotScreenSaver(selectedItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
updateValues();
|
|
||||||
mChanged = false;
|
|
||||||
|
|
||||||
emit changed(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
//------------------------------------------------------------After---------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::readSettings()
|
|
||||||
{
|
|
||||||
KConfigGroup config( KSharedConfig::openConfig( "kscreensaverrc"), "ScreenSaver" );
|
|
||||||
|
|
||||||
mImmutable = config.isImmutable();
|
|
||||||
|
|
||||||
mEnabled = config.readEntry("Enabled", false);
|
|
||||||
mTimeout = config.readEntry("Timeout", 300);
|
|
||||||
mLockTimeout = config.readEntry("LockGrace", 60000);
|
|
||||||
mLock = config.readEntry("Lock", false);
|
|
||||||
mSaver = config.readEntry("Saver");
|
|
||||||
|
|
||||||
bool legacyScreenSaver = config.readEntry("LegacySaverEnabled", false);
|
|
||||||
mScreenSaverRadio->setChecked(legacyScreenSaver);
|
|
||||||
if (!legacyScreenSaver) {
|
|
||||||
mPlasmaEnabled = config.readEntry("PlasmaEnabled", false);
|
|
||||||
mPlasmaWidgetsRadio->setChecked(mPlasmaEnabled);
|
|
||||||
} else {
|
|
||||||
mPlasmaEnabled = false;
|
|
||||||
}
|
|
||||||
if (!legacyScreenSaver && !mPlasmaEnabled) {
|
|
||||||
mSimpleLockerRadio->setChecked(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mTimeout < 60) mTimeout = 60;
|
|
||||||
if (mLockTimeout < 0) mLockTimeout = 0;
|
|
||||||
if (mLockTimeout > 300000) mLockTimeout = 300000;
|
|
||||||
|
|
||||||
mChanged = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::updateValues()
|
|
||||||
{
|
|
||||||
if (mEnabled)
|
|
||||||
{
|
|
||||||
mWaitEdit->setValue(mTimeout/60);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mWaitEdit->setValue(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
mWaitLockEdit->setValue(mLockTimeout/1000);
|
|
||||||
mLockCheckBox->setChecked(mLock);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::defaults()
|
|
||||||
{
|
|
||||||
if (mImmutable) return;
|
|
||||||
|
|
||||||
slotScreenSaver( 0 );
|
|
||||||
QTreeWidgetItem *item = mSaverListView->topLevelItem(0);
|
|
||||||
if (item) {
|
|
||||||
mSaverListView->setCurrentItem(item, QItemSelectionModel::ClearAndSelect);
|
|
||||||
mSaverListView->scrollToItem(item);
|
|
||||||
}
|
|
||||||
slotTimeoutChanged( 5 );
|
|
||||||
slotLockTimeoutChanged( 60 );
|
|
||||||
slotLock( false );
|
|
||||||
mEnabledCheckBox->setChecked(false);
|
|
||||||
mSimpleLockerRadio->setChecked(true);
|
|
||||||
mPlasmaSetup->setEnabled(false);
|
|
||||||
|
|
||||||
updateValues();
|
|
||||||
|
|
||||||
emit changed(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::save()
|
|
||||||
{
|
|
||||||
if ( !mChanged )
|
|
||||||
return;
|
|
||||||
|
|
||||||
KConfigGroup config(KSharedConfig::openConfig( "kscreensaverrc"), "ScreenSaver" );
|
|
||||||
|
|
||||||
config.writeEntry("Enabled", mEnabled);
|
|
||||||
config.writeEntry("Timeout", mTimeout);
|
|
||||||
config.writeEntry("LockGrace", mLockTimeout);
|
|
||||||
config.writeEntry("Lock", mLock);
|
|
||||||
config.writeEntry("PlasmaEnabled", mPlasmaEnabled);
|
|
||||||
config.writeEntry("LegacySaverEnabled", mScreenSaverRadio->isChecked());
|
|
||||||
|
|
||||||
if ( !mSaver.isEmpty() )
|
|
||||||
config.writeEntry("Saver", mSaver);
|
|
||||||
config.sync();
|
|
||||||
|
|
||||||
org::kde::screensaver kscreensaver("org.kde.screensaver", "/ScreenSaver", QDBusConnection::sessionBus());
|
|
||||||
kscreensaver.configure();
|
|
||||||
|
|
||||||
mChanged = false;
|
|
||||||
emit changed(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::findSavers()
|
|
||||||
{
|
|
||||||
if ( !mNumLoaded ) {
|
|
||||||
mSaverServices = KServiceTypeTrader::self()->query( "ScreenSaver");
|
|
||||||
new QTreeWidgetItem ( mSaverListView, QStringList() << i18n("Loading...") );
|
|
||||||
if ( mSaverServices.isEmpty() )
|
|
||||||
mLoadTimer->stop();
|
|
||||||
else
|
|
||||||
mLoadTimer->start( 50 );
|
|
||||||
}
|
|
||||||
for( KService::List::const_iterator it = mSaverServices.constBegin();
|
|
||||||
it != mSaverServices.constEnd(); it++,mNumLoaded++)
|
|
||||||
{
|
|
||||||
SaverConfig *saver = new SaverConfig;
|
|
||||||
QString file = KStandardDirs::locate("services", (*it)->entryPath());
|
|
||||||
if (saver->read(file)) {
|
|
||||||
mSaverList.append(saver);
|
|
||||||
} else
|
|
||||||
delete saver;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( mNumLoaded != mSaverServices.count() ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int categoryCount = 0;
|
|
||||||
|
|
||||||
mLoadTimer->stop();
|
|
||||||
delete mLoadTimer;
|
|
||||||
|
|
||||||
qSort(mSaverList.begin(), mSaverList.end());
|
|
||||||
|
|
||||||
mSaverListView->clear();
|
|
||||||
//Create the treewidget items
|
|
||||||
Q_FOREACH( SaverConfig *s, mSaverList )
|
|
||||||
{
|
|
||||||
QTreeWidgetItem *item = 0;
|
|
||||||
if (s->category().isEmpty()) {
|
|
||||||
//Create top level item without category
|
|
||||||
item = new QTreeWidgetItem ( mSaverListView, QStringList() << s->name() << '2' + s->name() );
|
|
||||||
item->setData(0, Qt::UserRole, s->file());
|
|
||||||
} else {
|
|
||||||
//Create item within a category
|
|
||||||
QList<QTreeWidgetItem*> categoryItemList = mSaverListView->findItems( s->category(), Qt::MatchExactly );
|
|
||||||
QTreeWidgetItem * categoryItem = 0;
|
|
||||||
if ( categoryItemList.isEmpty() ) { //Create the category toplevel item
|
|
||||||
categoryItem = new QTreeWidgetItem ( mSaverListView, QStringList() << s->category() << '1' + s->category() );
|
|
||||||
categoryItem->setIcon ( 0, KIcon ( "preferences-desktop-screensaver" ) );
|
|
||||||
} else {
|
|
||||||
categoryItem = categoryItemList.first();
|
|
||||||
}
|
|
||||||
//Add the child item to the category
|
|
||||||
item = new QTreeWidgetItem ( categoryItem, QStringList() << s->name() << '2' + s->name() );
|
|
||||||
item->setData(0, Qt::UserRole, s->file());
|
|
||||||
categoryCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Get the current Item and index
|
|
||||||
mSelected = indexForSaverFile(mSaver);
|
|
||||||
QTreeWidgetItem *selectedItem = treeItemForSaverFile(mSaver);
|
|
||||||
|
|
||||||
// Delete categories with only one item
|
|
||||||
QList<QTreeWidgetItem*> itemsToBeDeleted;
|
|
||||||
QList<QTreeWidgetItem*> itemsToBeAddedAsTopLevel;
|
|
||||||
QTreeWidgetItemIterator it(mSaverListView, QTreeWidgetItemIterator::HasChildren);
|
|
||||||
while ((*it)) {
|
|
||||||
if ((*it)->childCount() == 1) {
|
|
||||||
QTreeWidgetItem * item = (*it)->child(0);
|
|
||||||
(*it)->removeChild(item);
|
|
||||||
itemsToBeAddedAsTopLevel.append(item);
|
|
||||||
itemsToBeDeleted.append((*it));
|
|
||||||
}
|
|
||||||
++it;
|
|
||||||
}
|
|
||||||
mSaverListView->addTopLevelItems(itemsToBeAddedAsTopLevel);
|
|
||||||
qDeleteAll(itemsToBeDeleted);
|
|
||||||
|
|
||||||
mSaverListView->setRootIsDecorated ( categoryCount > 0 );
|
|
||||||
mSaverListView->sortByColumn ( 0, Qt::AscendingOrder );
|
|
||||||
|
|
||||||
//Set the current screensaver
|
|
||||||
if ( mSelected > -1 )
|
|
||||||
{
|
|
||||||
mSaverListView->setCurrentItem(selectedItem, QItemSelectionModel::ClearAndSelect);
|
|
||||||
mSaverListView->scrollToItem(selectedItem);
|
|
||||||
|
|
||||||
mSetupBt->setEnabled(!mSaverList.at(mSelected)->setup().isEmpty());
|
|
||||||
mTestBt->setEnabled(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
connect( mSaverListView, SIGNAL(itemSelectionChanged()),
|
|
||||||
this, SLOT(slotSelectionChanged()) );
|
|
||||||
|
|
||||||
setMonitor();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void KScreenSaver::slotSelectionChanged()
|
|
||||||
{
|
|
||||||
QList<QTreeWidgetItem *> selection = mSaverListView->selectedItems();
|
|
||||||
if (selection.isEmpty()) {
|
|
||||||
slotScreenSaver(0);
|
|
||||||
} else {
|
|
||||||
slotScreenSaver(selection.at(0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::setMonitor()
|
|
||||||
{
|
|
||||||
if (mPreviewProc->state() == QProcess::Running)
|
|
||||||
// CC: this will automatically cause a "slotPreviewExited"
|
|
||||||
// when the viewer exits
|
|
||||||
mPreviewProc->kill();
|
|
||||||
else
|
|
||||||
slotPreviewExited();
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::slotPreviewExited()
|
|
||||||
{
|
|
||||||
// Ugly hack to prevent continual respawning of savers that crash
|
|
||||||
if (mSelected == mPrevSelected)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ( mSaverList.isEmpty() ) // safety check
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Some xscreensaver hacks do something nasty to the window that
|
|
||||||
// requires a new one to be created (or proper investigation of the
|
|
||||||
// problem).
|
|
||||||
delete mMonitor;
|
|
||||||
|
|
||||||
mMonitor = new KSSMonitor(mMonitorPreview);
|
|
||||||
QPalette palette;
|
|
||||||
palette.setColor(mMonitor->backgroundRole(), Qt::black);
|
|
||||||
mMonitor->setPalette(palette);
|
|
||||||
mMonitor->setGeometry(mMonitorPreview->previewRect());
|
|
||||||
mMonitor->setVisible(mScreenSaverRadio->isChecked());
|
|
||||||
// So that hacks can XSelectInput ButtonPressMask
|
|
||||||
XSelectInput(QX11Info::display(), mMonitor->winId(), widgetEventMask );
|
|
||||||
|
|
||||||
if (mSelected >= 0) {
|
|
||||||
QString saver = mSaverList.at(mSelected)->saver();
|
|
||||||
|
|
||||||
QHash<QChar, QString> keyMap;
|
|
||||||
keyMap.insert('w', QString::number(mMonitor->winId()));
|
|
||||||
QStringList previewArgs = KShell::splitArgs(KMacroExpander::expandMacrosShellQuote(saver, keyMap));
|
|
||||||
QString previewProgram = previewArgs.takeAt(0);
|
|
||||||
|
|
||||||
mPreviewProc->start(previewProgram, previewArgs);
|
|
||||||
}
|
|
||||||
|
|
||||||
mPrevSelected = mSelected;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::slotEnable(bool e)
|
|
||||||
{
|
|
||||||
mEnabled = e;
|
|
||||||
mWaitEdit->setEnabled( e );
|
|
||||||
mLockCheckBox->setEnabled( e );
|
|
||||||
mWaitLockEdit->setEnabled( e && mLock );
|
|
||||||
mChanged = true;
|
|
||||||
emit changed(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void KScreenSaver::slotEnablePlasma(bool enable)
|
|
||||||
{
|
|
||||||
mPlasmaEnabled = enable;
|
|
||||||
//FIXME even though the button's enabled, plasma isn't until the user hits apply
|
|
||||||
//so the button will just show the screensaver, no plasma.
|
|
||||||
//what should I do about this?
|
|
||||||
mPlasmaSetup->setEnabled(mPlasmaEnabled);
|
|
||||||
mChanged = true;
|
|
||||||
emit changed(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void KScreenSaver::slotEnableLegacyScreenSaver(bool enable)
|
|
||||||
{
|
|
||||||
if (mMonitor) {
|
|
||||||
mMonitor->setVisible(enable);
|
|
||||||
}
|
|
||||||
mChanged = true;
|
|
||||||
emit changed(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void KScreenSaver::slotPlasmaSetup()
|
|
||||||
{
|
|
||||||
org::kde::screensaver kscreensaver("org.kde.screensaver", "/ScreenSaver", QDBusConnection::sessionBus());
|
|
||||||
kscreensaver.setupPlasma();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::slotScreenSaver(QTreeWidgetItem *item)
|
|
||||||
{
|
|
||||||
if (!item)
|
|
||||||
{
|
|
||||||
mSetupBt->setEnabled(false);
|
|
||||||
mTestBt->setEnabled(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Get the index of the saver file of the current selected treewidget item
|
|
||||||
int indx = indexForSaverFile(item->data(0, Qt::UserRole).toString());
|
|
||||||
|
|
||||||
mSetupBt->setEnabled(item->childCount()==0);
|
|
||||||
mTestBt->setEnabled(item->childCount()==0);
|
|
||||||
if (indx == -1) {
|
|
||||||
mSelected = -1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool bChanged = (indx != mSelected);
|
|
||||||
|
|
||||||
if (mSetupProc->state() != QProcess::Running)
|
|
||||||
mSetupBt->setEnabled(!mSaverList.at(indx)->setup().isEmpty());
|
|
||||||
mTestBt->setEnabled(true);
|
|
||||||
mSaver = mSaverList.at(indx)->file();
|
|
||||||
|
|
||||||
mSelected = indx;
|
|
||||||
setMonitor();
|
|
||||||
if (bChanged)
|
|
||||||
{
|
|
||||||
mChanged = true;
|
|
||||||
emit changed(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::slotSetup()
|
|
||||||
{
|
|
||||||
if ( mSelected < 0 )
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (mSetupProc->state() == QProcess::Running)
|
|
||||||
return;
|
|
||||||
|
|
||||||
QString setup = mSaverList.at(mSelected)->setup();
|
|
||||||
if( setup.isEmpty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
QStringList setupArgs = KShell::splitArgs(setup);
|
|
||||||
QString setupProgram = setupArgs.takeAt(0);
|
|
||||||
|
|
||||||
QString path = findExe(setupProgram);
|
|
||||||
|
|
||||||
if (!path.isEmpty()) {
|
|
||||||
// Add caption and icon to about dialog
|
|
||||||
setupArgs << "-caption"
|
|
||||||
<< mSaverList.at(mSelected)->name()
|
|
||||||
<< "-icon"
|
|
||||||
<< "kscreensaver";
|
|
||||||
|
|
||||||
mSetupBt->setEnabled( false );
|
|
||||||
kapp->flush();
|
|
||||||
|
|
||||||
mSetupProc->start(path, setupArgs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::slotTest()
|
|
||||||
{
|
|
||||||
if ( mSelected == -1 )
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!mTestProc) {
|
|
||||||
mTestProc = new QProcess;
|
|
||||||
} else {
|
|
||||||
mPreviewProc->kill();
|
|
||||||
mPreviewProc->waitForFinished();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!mTestWin) {
|
|
||||||
mTestWin = new TestWin();
|
|
||||||
mTestWin->setAttribute(Qt::WA_NoSystemBackground, true);
|
|
||||||
mTestWin->setAttribute(Qt::WA_PaintOnScreen, true);
|
|
||||||
mTestWin->setGeometry(qApp->desktop()->geometry());
|
|
||||||
}
|
|
||||||
|
|
||||||
mTestWin->show();
|
|
||||||
mTestWin->raise();
|
|
||||||
mTestWin->setFocus();
|
|
||||||
// So that hacks can XSelectInput ButtonPressMask
|
|
||||||
XSelectInput(QX11Info::display(), mTestWin->winId(), widgetEventMask );
|
|
||||||
|
|
||||||
grabMouse();
|
|
||||||
grabKeyboard();
|
|
||||||
|
|
||||||
mTestBt->setEnabled( false );
|
|
||||||
|
|
||||||
QString saver = mSaverList.at(mSelected)->saver();
|
|
||||||
QHash<QChar, QString> keyMap;
|
|
||||||
keyMap.insert('w', QString::number(mTestWin->winId()));
|
|
||||||
QStringList testArgs = KShell::splitArgs(KMacroExpander::expandMacrosShellQuote(saver, keyMap));
|
|
||||||
QString testProgram = testArgs.takeAt(0);
|
|
||||||
|
|
||||||
mTestProc->start(testProgram, testArgs);
|
|
||||||
|
|
||||||
mTesting = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::slotStopTest()
|
|
||||||
{
|
|
||||||
if (mTestProc->state() == QProcess::Running) {
|
|
||||||
mTestProc->kill();
|
|
||||||
mTestProc->waitForFinished(500);
|
|
||||||
}
|
|
||||||
releaseMouse();
|
|
||||||
releaseKeyboard();
|
|
||||||
mTestWin->hide();
|
|
||||||
mTestBt->setEnabled(true);
|
|
||||||
mPrevSelected = -1;
|
|
||||||
setMonitor();
|
|
||||||
mTesting = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::slotTimeoutChanged(int to )
|
|
||||||
{
|
|
||||||
mTimeout = to * 60;
|
|
||||||
mChanged = true;
|
|
||||||
emit changed(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::slotLockTimeoutChanged(int to )
|
|
||||||
{
|
|
||||||
mLockTimeout = to * 1000;
|
|
||||||
mChanged = true;
|
|
||||||
emit changed(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::slotLock( bool l )
|
|
||||||
{
|
|
||||||
mLock = l;
|
|
||||||
mWaitLockEdit->setEnabled( l );
|
|
||||||
mChanged = true;
|
|
||||||
emit changed(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
void KScreenSaver::slotSetupDone()
|
|
||||||
{
|
|
||||||
mPrevSelected = -1; // see ugly hack in slotPreviewExited()
|
|
||||||
setMonitor();
|
|
||||||
mSetupBt->setEnabled( true );
|
|
||||||
emit changed(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
QTreeWidgetItem * KScreenSaver::treeItemForSaverFile(const QString & saver)
|
|
||||||
{
|
|
||||||
QTreeWidgetItem * item = 0;
|
|
||||||
QTreeWidgetItemIterator it(mSaverListView);
|
|
||||||
while ((*it) && item == 0) {
|
|
||||||
if ((*it)->data(0, Qt::UserRole) == saver) {
|
|
||||||
item = (*it);
|
|
||||||
}
|
|
||||||
++it;
|
|
||||||
}
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
|
|
||||||
int KScreenSaver::indexForSaverFile(const QString & saver)
|
|
||||||
{
|
|
||||||
int index = -1;
|
|
||||||
int i = 0;
|
|
||||||
Q_FOREACH( SaverConfig* saverConfig, mSaverList ) {
|
|
||||||
if (saverConfig->file() == saver) {
|
|
||||||
index = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
return index;
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "moc_scrnsave.cpp"
|
|
|
@ -1,121 +0,0 @@
|
||||||
/*
|
|
||||||
* scrnsave.h
|
|
||||||
* Copyright 1997 Matthias Hoelzer
|
|
||||||
* Copyright 1996,1999,2002 Martin R. Jones
|
|
||||||
* Copyright 2004 Chris Howells
|
|
||||||
* Copyright 2007-2008 Benjamin Meyer <ben@meyerhome.net>
|
|
||||||
* Copyright 2007-2008 Hamish Rodda <rodda@kde.org>
|
|
||||||
* Copyright 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
|
|
||||||
* Copyright 2009 Davide Bettio
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2 of
|
|
||||||
* the License or (at your option) version 3 or any later version
|
|
||||||
* accepted by the membership of KDE e.V. (or its successor approved
|
|
||||||
* by the membership of KDE e.V.), which shall act as a proxy
|
|
||||||
* defined in Section 14 of version 3 of the license.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef SCRNSAVE__H
|
|
||||||
#define SCRNSAVE__H
|
|
||||||
|
|
||||||
#include <QWidget>
|
|
||||||
#include <QtGui/qevent.h>
|
|
||||||
|
|
||||||
#include <KCModule>
|
|
||||||
|
|
||||||
#include "kssmonitor.h"
|
|
||||||
#include "saverconfig.h"
|
|
||||||
#include "testwin.h"
|
|
||||||
#include "ui_screensaver.h"
|
|
||||||
|
|
||||||
#include <QTimer>
|
|
||||||
|
|
||||||
class KIntSpinBox;
|
|
||||||
|
|
||||||
class ScreenPreviewWidget;
|
|
||||||
|
|
||||||
typedef QList<SaverConfig*> SaverList;
|
|
||||||
|
|
||||||
//===========================================================================
|
|
||||||
class KScreenSaver : public KCModule, private Ui::ScreenSaver
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
KScreenSaver(QWidget *parent, const QVariantList &);
|
|
||||||
~KScreenSaver();
|
|
||||||
|
|
||||||
virtual void load();
|
|
||||||
virtual void save();
|
|
||||||
virtual void defaults();
|
|
||||||
|
|
||||||
void updateValues();
|
|
||||||
void readSettings();
|
|
||||||
|
|
||||||
protected Q_SLOTS:
|
|
||||||
void slotEnable( bool );
|
|
||||||
void slotSelectionChanged();
|
|
||||||
void slotScreenSaver( QTreeWidgetItem* );
|
|
||||||
void slotSetup();
|
|
||||||
void slotTest();
|
|
||||||
void slotStopTest();
|
|
||||||
void slotTimeoutChanged( int );
|
|
||||||
void slotLockTimeoutChanged( int );
|
|
||||||
void slotLock( bool );
|
|
||||||
void slotSetupDone();
|
|
||||||
// when selecting a new screensaver, the old preview will
|
|
||||||
// be killed. -- This callback is responsible for restarting the
|
|
||||||
// new preview
|
|
||||||
void slotPreviewExited();
|
|
||||||
void findSavers();
|
|
||||||
void slotEnablePlasma(bool enable);
|
|
||||||
void slotEnableLegacyScreenSaver(bool enable);
|
|
||||||
void slotPlasmaSetup();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void writeSettings();
|
|
||||||
void getSaverNames();
|
|
||||||
void setMonitor();
|
|
||||||
void setDefaults();
|
|
||||||
bool event(QEvent *);
|
|
||||||
|
|
||||||
QTreeWidgetItem * treeItemForSaverFile(const QString &);
|
|
||||||
int indexForSaverFile(const QString &);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
TestWin *mTestWin;
|
|
||||||
QProcess *mTestProc;
|
|
||||||
QProcess *mSetupProc;
|
|
||||||
QProcess *mPreviewProc;
|
|
||||||
KSSMonitor *mMonitor;
|
|
||||||
ScreenPreviewWidget *mMonitorPreview;
|
|
||||||
KService::List mSaverServices;
|
|
||||||
SaverList mSaverList;
|
|
||||||
QTimer *mLoadTimer;
|
|
||||||
|
|
||||||
int mSelected;
|
|
||||||
int mPrevSelected;
|
|
||||||
int mNumLoaded;
|
|
||||||
bool mChanged;
|
|
||||||
bool mTesting;
|
|
||||||
|
|
||||||
// Settings
|
|
||||||
int mTimeout;
|
|
||||||
int mLockTimeout;
|
|
||||||
bool mLock;
|
|
||||||
bool mEnabled;
|
|
||||||
QString mSaver;
|
|
||||||
bool mImmutable;
|
|
||||||
bool mPlasmaEnabled;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,34 +0,0 @@
|
||||||
/*
|
|
||||||
* testwin.cpp
|
|
||||||
* Copyright 1997 Matthias Hoelzer
|
|
||||||
* Copyright 1996,1999,2002 Martin R. Jones
|
|
||||||
* Copyright 2004 Chris Howells
|
|
||||||
* Copyright 2007-2008 Benjamin Meyer <ben@meyerhome.net>
|
|
||||||
* Copyright 2007-2008 Hamish Rodda <rodda@kde.org>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2 of
|
|
||||||
* the License or (at your option) version 3 or any later version
|
|
||||||
* accepted by the membership of KDE e.V. (or its successor approved
|
|
||||||
* by the membership of KDE e.V.), which shall act as a proxy
|
|
||||||
* defined in Section 14 of version 3 of the license.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "testwin.h"
|
|
||||||
|
|
||||||
TestWin::TestWin()
|
|
||||||
: QWidget(0, Qt::X11BypassWindowManagerHint)
|
|
||||||
{
|
|
||||||
setFocusPolicy(Qt::StrongFocus);
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "moc_testwin.cpp"
|
|
|
@ -1,39 +0,0 @@
|
||||||
/*
|
|
||||||
* testwin.h
|
|
||||||
* Copyright 1997 Matthias Hoelzer
|
|
||||||
* Copyright 1996,1999,2002 Martin R. Jones
|
|
||||||
* Copyright 2004 Chris Howells
|
|
||||||
* Copyright 2007-2008 Benjamin Meyer <ben@meyerhome.net>
|
|
||||||
* Copyright 2007-2008 Hamish Rodda <rodda@kde.org>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2 of
|
|
||||||
* the License or (at your option) version 3 or any later version
|
|
||||||
* accepted by the membership of KDE e.V. (or its successor approved
|
|
||||||
* by the membership of KDE e.V.), which shall act as a proxy
|
|
||||||
* defined in Section 14 of version 3 of the license.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef TESTWIN_H
|
|
||||||
#define TESTWIN_H
|
|
||||||
|
|
||||||
#include <QWidget>
|
|
||||||
|
|
||||||
class TestWin : public QWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
TestWin();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
8
kde.pamd
8
kde.pamd
|
@ -1,8 +0,0 @@
|
||||||
#%PAM-1.0
|
|
||||||
auth required pam_unix.so shadow nullok
|
|
||||||
|
|
||||||
account required pam_unix.so
|
|
||||||
|
|
||||||
password required pam_unix.so shadow nullok use_authtok
|
|
||||||
|
|
||||||
session required pam_permit.so
|
|
|
@ -1,9 +1,42 @@
|
||||||
include_directories(
|
project(kscreensaver)
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/libkscreensaver
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/libkscreensaver
|
set(kded_kscreensaver_SRCS
|
||||||
|
kded_kscreensaver.cpp
|
||||||
|
kscreensaver.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_subdirectory( libkscreensaver )
|
qt4_add_dbus_adaptor(kded_kscreensaver_SRCS
|
||||||
add_subdirectory( kblank_screensaver )
|
org.freedesktop.ScreenSaver.xml
|
||||||
add_subdirectory( krandom_screensaver )
|
kscreensaver.h
|
||||||
add_subdirectory( kdesavers )
|
KScreenSaver
|
||||||
|
)
|
||||||
|
|
||||||
|
set(kded_kscreensaver_SRCS
|
||||||
|
${kded_kscreensaver_SRCS}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/org.kde.kscreensaver.xml
|
||||||
|
)
|
||||||
|
|
||||||
|
qt4_generate_dbus_interface(kded_kscreensaver.h org.kde.kscreensaver.xml)
|
||||||
|
|
||||||
|
kde4_add_plugin(kded_kscreensaver ${kded_kscreensaver_SRCS})
|
||||||
|
target_link_libraries(kded_kscreensaver PRIVATE
|
||||||
|
${KDE4_KDECORE_LIBS}
|
||||||
|
${KDE4_KIDLETIME_LIBS}
|
||||||
|
${QT_QTCORE_LIBRARY}
|
||||||
|
${QT_QTDBUS_LIBRARY}
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
TARGETS kded_kscreensaver
|
||||||
|
DESTINATION ${KDE4_PLUGIN_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES kscreensaver.desktop
|
||||||
|
DESTINATION ${KDE4_SERVICES_INSTALL_DIR}/kded
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.kscreensaver.xml
|
||||||
|
DESTINATION ${KDE4_DBUS_INTERFACES_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
$EXTRACTRC kdesavers/*.ui >> rc.cpp
|
|
||||||
$XGETTEXT kdesavers/*.cpp rc.cpp -o $podir/klock.pot
|
|
||||||
rm -f rc.cpp
|
|
|
@ -1,7 +0,0 @@
|
||||||
This contains the basic components of the KDE Screensaver system.
|
|
||||||
|
|
||||||
The application that actually launches the screensavers is krunner
|
|
||||||
|
|
||||||
KDE's screensavers use the kscreensaver library which is in libkscreensaver
|
|
||||||
|
|
||||||
More screensavers can be found in kdeartwork/kscreensaver
|
|
|
@ -1,19 +0,0 @@
|
||||||
|
|
||||||
include_directories( ${CMAKE_SOURCE_DIR}/kscreensaver/libkscreensaver )
|
|
||||||
|
|
||||||
|
|
||||||
########### next target ###############
|
|
||||||
|
|
||||||
set(kblankscrn.kss_SRCS blankscrn.cpp )
|
|
||||||
|
|
||||||
|
|
||||||
add_executable(kblankscrn.kss ${kblankscrn.kss_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(kblankscrn.kss ${KDE4_KDEUI_LIBS} kscreensaver m )
|
|
||||||
|
|
||||||
install(TARGETS kblankscrn.kss ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
||||||
|
|
||||||
|
|
||||||
########### install files ###############
|
|
||||||
|
|
||||||
install( FILES kblank.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR}/ScreenSavers )
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
$XGETTEXT *.cpp *.h -o $podir/kblankscrn.pot
|
|
|
@ -1,163 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// kblankscrn - Basic screen saver for KDE
|
|
||||||
//
|
|
||||||
// Copyright (c) Martin R. Jones 1996
|
|
||||||
//
|
|
||||||
// 1998/04/19 Layout management added by Mario Weilguni <mweilguni@kde.org>
|
|
||||||
// 2001/03/04 Converted to use libkscreensaver by Martin R. Jones
|
|
||||||
// 2006/03/12 Ported to KScreenSaverInterface by David Faure
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QLayout>
|
|
||||||
#include <QFrame>
|
|
||||||
#include <QGridLayout>
|
|
||||||
#include <kapplication.h>
|
|
||||||
#include <klocale.h>
|
|
||||||
#include <kconfig.h>
|
|
||||||
#include <kcolordialog.h>
|
|
||||||
#include <kcolorbutton.h>
|
|
||||||
#include <kglobal.h>
|
|
||||||
#include <kaboutdata.h>
|
|
||||||
#include <kdeversion.h>
|
|
||||||
|
|
||||||
#include "blankscrn.h"
|
|
||||||
#include <config-workspace.h>
|
|
||||||
#include "moc_blankscrn.cpp"
|
|
||||||
|
|
||||||
// libkscreensaver interface
|
|
||||||
class KBlankSaverInterface : public KScreenSaverInterface
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual KAboutData* aboutData()
|
|
||||||
{
|
|
||||||
return new KAboutData( "kblankscrn.kss", "kblankscrn", ki18n( "KBlankScreen" ),
|
|
||||||
KDE_VERSION_STRING, ki18n( "Blank Screen Saver" ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual KScreenSaver* create( WId id )
|
|
||||||
{
|
|
||||||
return new KBlankSaver( id );
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual QDialog* setup()
|
|
||||||
{
|
|
||||||
return new KBlankSetup();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
int main( int argc, char *argv[] )
|
|
||||||
{
|
|
||||||
KBlankSaverInterface kss;
|
|
||||||
return kScreenSaverMain( argc, argv, kss );
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// dialog to setup screen saver parameters
|
|
||||||
//
|
|
||||||
KBlankSetup::KBlankSetup( QWidget *parent, const char *name )
|
|
||||||
: KDialog( parent )
|
|
||||||
{
|
|
||||||
setObjectName( name );
|
|
||||||
setModal( true );
|
|
||||||
setCaption( i18n( "Setup Blank Screen Saver" ) );
|
|
||||||
setButtons( Ok | Cancel );
|
|
||||||
|
|
||||||
readSettings();
|
|
||||||
|
|
||||||
QFrame *main = new QFrame( this );
|
|
||||||
setMainWidget( main );
|
|
||||||
QGridLayout *grid = new QGridLayout(main);
|
|
||||||
grid->setSpacing(spacingHint());
|
|
||||||
grid->setMargin(0);
|
|
||||||
|
|
||||||
QLabel *label = new QLabel( i18n("Color:"), main );
|
|
||||||
grid->addWidget(label, 0, 0);
|
|
||||||
|
|
||||||
KColorButton *colorPush = new KColorButton( color, main );
|
|
||||||
colorPush->setMinimumWidth(80);
|
|
||||||
connect( colorPush, SIGNAL(changed(QColor)),
|
|
||||||
SLOT(slotColor(QColor)) );
|
|
||||||
grid->addWidget(colorPush, 1, 0);
|
|
||||||
|
|
||||||
preview = new QWidget( main );
|
|
||||||
preview->setFixedSize( 220, 165 );
|
|
||||||
QPalette palette;
|
|
||||||
palette.setColor( preview->backgroundRole(), Qt::black );
|
|
||||||
preview->setPalette(palette);
|
|
||||||
preview->setAutoFillBackground(true);
|
|
||||||
preview->show(); // otherwise saver does not get correct size
|
|
||||||
saver = new KBlankSaver( preview->winId() );
|
|
||||||
grid->addWidget(preview, 0, 1, 3, 1);
|
|
||||||
|
|
||||||
grid->setRowStretch( 2, 10 );
|
|
||||||
grid->setRowStretch( 3, 20 );
|
|
||||||
|
|
||||||
setMinimumSize( sizeHint() );
|
|
||||||
connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
|
|
||||||
}
|
|
||||||
|
|
||||||
// read settings from config file
|
|
||||||
void KBlankSetup::readSettings()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
QColor aux = Qt::black;
|
|
||||||
color = config.readEntry( "Color", aux );
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlankSetup::slotColor( const QColor &col )
|
|
||||||
{
|
|
||||||
color = col;
|
|
||||||
saver->setColor( color );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ok pressed - save settings and exit
|
|
||||||
void KBlankSetup::slotOk()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
config.writeEntry( "Color", color );
|
|
||||||
config.sync();
|
|
||||||
|
|
||||||
accept();
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
KBlankSaver::KBlankSaver( WId id ) : KScreenSaver( id )
|
|
||||||
{
|
|
||||||
readSettings();
|
|
||||||
blank();
|
|
||||||
setAutoFillBackground(true);
|
|
||||||
show();
|
|
||||||
}
|
|
||||||
|
|
||||||
KBlankSaver::~KBlankSaver()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// set the color
|
|
||||||
void KBlankSaver::setColor( const QColor &col )
|
|
||||||
{
|
|
||||||
color = col;
|
|
||||||
blank();
|
|
||||||
}
|
|
||||||
|
|
||||||
// read configuration settings from config file
|
|
||||||
void KBlankSaver::readSettings()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
QColor aux = Qt::black;
|
|
||||||
color = config.readEntry( "Color", aux );
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlankSaver::blank()
|
|
||||||
{
|
|
||||||
QPalette palette;
|
|
||||||
palette.setColor( backgroundRole(), color );
|
|
||||||
setPalette(palette);
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// kblankscrn - Basic screen saver for KDE
|
|
||||||
//
|
|
||||||
// Copyright (c) Martin R. Jones 1996
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef BLANKSCRN_H
|
|
||||||
#define BLANKSCRN_H
|
|
||||||
|
|
||||||
#include <QColor>
|
|
||||||
#include <kdialog.h>
|
|
||||||
#include "kscreensaver.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class KBlankSaver : public KScreenSaver
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
KBlankSaver( WId drawable );
|
|
||||||
virtual ~KBlankSaver();
|
|
||||||
|
|
||||||
void setColor( const QColor &col );
|
|
||||||
|
|
||||||
private:
|
|
||||||
void readSettings();
|
|
||||||
void blank();
|
|
||||||
|
|
||||||
private:
|
|
||||||
QColor color;
|
|
||||||
};
|
|
||||||
|
|
||||||
class KBlankSetup : public KDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
KBlankSetup( QWidget *parent = NULL, const char *name = NULL );
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void readSettings();
|
|
||||||
|
|
||||||
private Q_SLOTS:
|
|
||||||
void slotColor( const QColor & );
|
|
||||||
void slotOk();
|
|
||||||
|
|
||||||
private:
|
|
||||||
QWidget *preview;
|
|
||||||
KBlankSaver *saver;
|
|
||||||
|
|
||||||
QColor color;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,370 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Exec=kblankscrn.kss
|
|
||||||
Icon=kscreensaver
|
|
||||||
Type=Service
|
|
||||||
X-KDE-ServiceTypes=ScreenSaver
|
|
||||||
Actions=Setup;InWindow;Root;
|
|
||||||
Name=Blank Screen
|
|
||||||
Name[af]=Leë Skerm
|
|
||||||
Name[ar]=شاشة فارغة
|
|
||||||
Name[ast]=Pantalla en blanco
|
|
||||||
Name[be]=Чысты экран
|
|
||||||
Name[be@latin]=Vyčyščeńnie ekrana
|
|
||||||
Name[bg]=Празен екран
|
|
||||||
Name[bn]=ফাঁকা স্ক্রীণ
|
|
||||||
Name[bn_IN]=ফাঁকা পর্দা
|
|
||||||
Name[br]=Skramm goullo
|
|
||||||
Name[bs]=Prazan ekran
|
|
||||||
Name[ca]=Pantalla en blanc
|
|
||||||
Name[ca@valencia]=Pantalla en blanc
|
|
||||||
Name[cs]=Prázdná obrazovka
|
|
||||||
Name[csb]=Czôrny ekran
|
|
||||||
Name[cy]=Sgrîn Gwag
|
|
||||||
Name[da]=Blank skærm
|
|
||||||
Name[de]=Leerer Bildschirm
|
|
||||||
Name[el]=Κενή οθόνη
|
|
||||||
Name[en_GB]=Blank Screen
|
|
||||||
Name[eo]=Blanka ekrano
|
|
||||||
Name[es]=Pantalla negra
|
|
||||||
Name[et]=Tühi ekraan
|
|
||||||
Name[eu]=Pantaila hutsik
|
|
||||||
Name[fa]=پرده خالی
|
|
||||||
Name[fi]=Tyhjä ruutu
|
|
||||||
Name[fr]=Écran vide
|
|
||||||
Name[fy]=Leech skerm
|
|
||||||
Name[ga]=Scáileán Glan
|
|
||||||
Name[gl]=Pantalla baleira
|
|
||||||
Name[gu]=કોરો સ્ક્રિન
|
|
||||||
Name[he]=מסך ריק
|
|
||||||
Name[hi]=स्क्रीन शून्य करें
|
|
||||||
Name[hne]=स्क्रीन सून्य करव
|
|
||||||
Name[hr]=Prazan zaslon
|
|
||||||
Name[hsb]=Prózdna wobrazowka
|
|
||||||
Name[hu]=Üres képernyő
|
|
||||||
Name[ia]=Schermo vacue (Blank Screen)
|
|
||||||
Name[id]=Layar Kosong
|
|
||||||
Name[is]=Svartur skjár
|
|
||||||
Name[ja]=なし
|
|
||||||
Name[ka]=ცარიელი ეკრანი
|
|
||||||
Name[kk]=Бос экран
|
|
||||||
Name[km]=អេក្រង់ទទេ
|
|
||||||
Name[kn]=ಖಾಲಿ ತೆರೆ
|
|
||||||
Name[ko]=빈 화면
|
|
||||||
Name[ku]=Dîmendera Vala
|
|
||||||
Name[lt]=Tuščias ekranas
|
|
||||||
Name[lv]=Tukšs ekrāns
|
|
||||||
Name[mai]=स्क्रीन शून्य करू
|
|
||||||
Name[mk]=Празен екран
|
|
||||||
Name[ml]=ശൂന്യമായ സ്ക്രീന്
|
|
||||||
Name[mr]=रिकामी स्क्रीन
|
|
||||||
Name[ms]=Skrin Kosong
|
|
||||||
Name[nb]=Tom skjerm
|
|
||||||
Name[nds]=Leddig Schirm
|
|
||||||
Name[ne]=खाली पर्दा
|
|
||||||
Name[nl]=Leeg scherm
|
|
||||||
Name[nn]=Tom skjerm
|
|
||||||
Name[pa]=ਖਾਲੀ ਸਕਰੀਨ
|
|
||||||
Name[pl]=Pusty ekran
|
|
||||||
Name[pt]=Ecrã Vazio
|
|
||||||
Name[pt_BR]=Limpar tela
|
|
||||||
Name[ro]=Ecran gol
|
|
||||||
Name[ru]=Пустой экран
|
|
||||||
Name[se]=Guorus šearbma
|
|
||||||
Name[si]=හිස් තිරය
|
|
||||||
Name[sk]=Prázdna obrazovka
|
|
||||||
Name[sl]=Prazen zaslon
|
|
||||||
Name[sr]=Празан екран
|
|
||||||
Name[sr@ijekavian]=Празан екран
|
|
||||||
Name[sr@ijekavianlatin]=Prazan ekran
|
|
||||||
Name[sr@latin]=Prazan ekran
|
|
||||||
Name[sv]=Tom skärm
|
|
||||||
Name[ta]=வெற்று திரை
|
|
||||||
Name[te]=ఖాళీ తెర
|
|
||||||
Name[tg]=Экрани холӣ
|
|
||||||
Name[th]=หน้าจอว่าง
|
|
||||||
Name[tr]=Boş Ekran
|
|
||||||
Name[ug]=قارا ئېكران
|
|
||||||
Name[uk]=Порожній екран
|
|
||||||
Name[uz]=Boʻsh ekran
|
|
||||||
Name[uz@cyrillic]=Бўш экран
|
|
||||||
Name[vi]=Màn hình trống
|
|
||||||
Name[wa]=Noere waitroûle
|
|
||||||
Name[xh]=Ikhusi Elingenanto
|
|
||||||
Name[x-test]=xxBlank Screenxx
|
|
||||||
Name[zh_CN]=黑屏
|
|
||||||
Name[zh_TW]=空白螢幕
|
|
||||||
|
|
||||||
[Desktop Action Setup]
|
|
||||||
Exec=kblankscrn.kss -setup
|
|
||||||
Name=Setup...
|
|
||||||
Name[af]=Opstelling...
|
|
||||||
Name[ar]=إعداد...
|
|
||||||
Name[ast]=Configuración...
|
|
||||||
Name[be]=Наставіць...
|
|
||||||
Name[be@latin]=Nałady...
|
|
||||||
Name[bg]=Настройки...
|
|
||||||
Name[bn]=সেট-আপ...
|
|
||||||
Name[bn_IN]=প্রস্তুতি...
|
|
||||||
Name[br]=Kefluniadur ...
|
|
||||||
Name[bs]=Podesi...
|
|
||||||
Name[ca]=Configuració...
|
|
||||||
Name[ca@valencia]=Configuració...
|
|
||||||
Name[cs]=Nastavení...
|
|
||||||
Name[csb]=Ùstôw...
|
|
||||||
Name[cy]=Gosod...
|
|
||||||
Name[da]=Opsætning...
|
|
||||||
Name[de]=Einrichtung ...
|
|
||||||
Name[el]=Ρύθμιση...
|
|
||||||
Name[en_GB]=Setup...
|
|
||||||
Name[eo]=Agordo...
|
|
||||||
Name[es]=Configuración...
|
|
||||||
Name[et]=Seadistused...
|
|
||||||
Name[eu]=Konfiguratu...
|
|
||||||
Name[fa]=برپایی...
|
|
||||||
Name[fi]=Asetukset…
|
|
||||||
Name[fr]=Configuration...
|
|
||||||
Name[fy]=Opset...
|
|
||||||
Name[ga]=Socrú...
|
|
||||||
Name[gl]=Configuración...
|
|
||||||
Name[gu]=ગોઠવણી...
|
|
||||||
Name[he]=הגדרות...
|
|
||||||
Name[hi]=सेटअप...
|
|
||||||
Name[hne]=सेटअप...
|
|
||||||
Name[hr]=Postavke…
|
|
||||||
Name[hsb]=Připrawić...
|
|
||||||
Name[hu]=Beállítás…
|
|
||||||
Name[ia]=Disposition ...
|
|
||||||
Name[id]=Pengaturan...
|
|
||||||
Name[is]=Stillingar...
|
|
||||||
Name[ja]=セットアップ...
|
|
||||||
Name[ka]=კონფიგურაცია...
|
|
||||||
Name[kk]=Баптау...
|
|
||||||
Name[km]=រៀបចំ...
|
|
||||||
Name[kn]=ಸಿದ್ಧತೆ...
|
|
||||||
Name[ko]=설정...
|
|
||||||
Name[ku]=Sazkirin...
|
|
||||||
Name[lt]=Nustatymas...
|
|
||||||
Name[lv]=Konfigurēt...
|
|
||||||
Name[mai]=सेटअप...
|
|
||||||
Name[mk]=Постави...
|
|
||||||
Name[ml]=സജ്ജീകരണം...
|
|
||||||
Name[mr]=व्यवस्था ...
|
|
||||||
Name[ms]=Tetapan...
|
|
||||||
Name[nb]=Oppsett …
|
|
||||||
Name[nds]=Instellen...
|
|
||||||
Name[ne]=सेटअप...
|
|
||||||
Name[nl]=Instellingen...
|
|
||||||
Name[nn]=Oppsett …
|
|
||||||
Name[pa]=ਸੈੱਟਅੱਪ...
|
|
||||||
Name[pl]=Ustawienia...
|
|
||||||
Name[pt]=Configurar...
|
|
||||||
Name[pt_BR]=Configurar...
|
|
||||||
Name[ro]=Opțiuni...
|
|
||||||
Name[ru]=Настроить...
|
|
||||||
Name[se]=Heiveheapmi …
|
|
||||||
Name[si]=සැකසුම්...
|
|
||||||
Name[sk]=Nastavenie...
|
|
||||||
Name[sl]=Nastavitve ...
|
|
||||||
Name[sr]=Подеси...
|
|
||||||
Name[sr@ijekavian]=Подеси...
|
|
||||||
Name[sr@ijekavianlatin]=Podesi...
|
|
||||||
Name[sr@latin]=Podesi...
|
|
||||||
Name[sv]=Inställningar...
|
|
||||||
Name[ta]=அமைப்பு...
|
|
||||||
Name[te]=అమర్పు...
|
|
||||||
Name[tg]=Танзимот...
|
|
||||||
Name[th]=ตั้งค่า...
|
|
||||||
Name[tr]=Kurulum...
|
|
||||||
Name[ug]=ئورنات…
|
|
||||||
Name[uk]=Встановити...
|
|
||||||
Name[uz]=Oʻrnatish
|
|
||||||
Name[uz@cyrillic]=Ўрнатиш
|
|
||||||
Name[vi]=Thiết lập...
|
|
||||||
Name[wa]=Apontyî...
|
|
||||||
Name[xh]=Iyacwangciswa...
|
|
||||||
Name[x-test]=xxSetup...xx
|
|
||||||
Name[zh_CN]=设置...
|
|
||||||
Name[zh_TW]=設定...
|
|
||||||
Icon=kscreensaver
|
|
||||||
|
|
||||||
[Desktop Action InWindow]
|
|
||||||
Exec=kblankscrn.kss -window-id %w
|
|
||||||
Name=Display in Specified Window
|
|
||||||
Name[af]=Vertoon in gespesifiseerde venster
|
|
||||||
Name[ar]=اعرض في النافذة المحددة
|
|
||||||
Name[ast]=Amosar na ventana especificada
|
|
||||||
Name[be]=Паказваць у вызначаным акне
|
|
||||||
Name[be@latin]=Pakažy ŭ aznačanym aknie
|
|
||||||
Name[bg]=Показване в указан прозорец
|
|
||||||
Name[bn]=নির্দিষ্ট উইণ্ডোয় দেখাও
|
|
||||||
Name[bn_IN]=সুনির্দিষ্ট উইন্ডোর মধ্যে প্রদর্শন করা হবে
|
|
||||||
Name[br]=Diskwel er prenestr spisaet
|
|
||||||
Name[bs]=Prikaži u određenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra especificada
|
|
||||||
Name[ca@valencia]=Mostra a la finestra especificada
|
|
||||||
Name[cs]=Zobrazit v určeném okně
|
|
||||||
Name[csb]=Wëskrzëni w pòdónym òknie
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Benodol
|
|
||||||
Name[da]=Visning i angivet vindue
|
|
||||||
Name[de]=In angegebenem Fenster anzeigen
|
|
||||||
Name[el]=Προβολή στο καθορισμένο παράθυρο
|
|
||||||
Name[en_GB]=Display in Specified Window
|
|
||||||
Name[eo]=Montriĝi en indikita fenestro
|
|
||||||
Name[es]=Mostrar en la ventana especificada
|
|
||||||
Name[et]=Määratud aknas näitamine
|
|
||||||
Name[eu]=Bistaratu adierazitako leihoan
|
|
||||||
Name[fa]=نمایش در پنجره مشخصشده
|
|
||||||
Name[fi]=Näytä määrätyssä ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre spécifiée
|
|
||||||
Name[fy]=Werjefte yn in definiëare finster
|
|
||||||
Name[ga]=Taispeáin san Fhuinneog Sonraithe
|
|
||||||
Name[gl]=Mostrar na xanela especificada
|
|
||||||
Name[gu]=સ્પષ્ટ કરેલ વિન્ડોમાં બતાવો
|
|
||||||
Name[he]=הצגה בחלון המצויין
|
|
||||||
Name[hi]=निर्दिष्ट विंडो में प्रदर्शित करें
|
|
||||||
Name[hne]=खास विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u odabranom prozoru
|
|
||||||
Name[hsb]=W podatym woknje pokazać
|
|
||||||
Name[hu]=Megjelenítés egy megadott ablakban
|
|
||||||
Name[ia]=Monstra in le fenestra specificate
|
|
||||||
Name[id]=Tampilkan di Jendela yang Ditentukan
|
|
||||||
Name[is]=Birta í völdum glugga
|
|
||||||
Name[ja]=指定したウィンドウで表示
|
|
||||||
Name[ka]=მოცემულ ფანჯარაში ასახვა
|
|
||||||
Name[kk]=Келтірілген терезеде көрсету
|
|
||||||
Name[km]=បង្ហាញក្នុងបង្អួចដែលបានបញ្ជាក់
|
|
||||||
Name[kn]=ನಿರ್ದಿಷ್ಟಗೊಳಿಸಿದ ಕಿಟಕಿಯಲ್ಲಿ ಪ್ರದರ್ಶಿಸು
|
|
||||||
Name[ko]=지정한 창에 보이기
|
|
||||||
Name[lt]=Rodyti nurodytame lange
|
|
||||||
Name[lv]=Rādīt norādītajā logā
|
|
||||||
Name[mai]=निर्दिष्ट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во наведениот прозорец
|
|
||||||
Name[ml]=വ്യക്തമാക്കിയിട്ടുള്ള ജാലകത്തില് കാണിക്കുക
|
|
||||||
Name[mr]=निर्देशीत चौकटीत दर्शवा
|
|
||||||
Name[ms]=Paparan dalam Tetingkap Yang Dinyatakan
|
|
||||||
Name[nb]=Vis i det valgte vinduet
|
|
||||||
Name[nds]=In't utsöchte Finster wiesen
|
|
||||||
Name[ne]=निर्दिष्ट गरिएको सञ्झ्यालमा प्रदर्शन गर्नुहोस्
|
|
||||||
Name[nl]=In een gedefinieerd venster weergeven
|
|
||||||
Name[nn]=Vis i valt vindauge
|
|
||||||
Name[pa]=ਦਿੱਤੀ ਵਿੰਡੋ ਵਿੱਚ ਵੇਖੋ
|
|
||||||
Name[pl]=Wyświetl w podanym oknie
|
|
||||||
Name[pt]=Mostrar na Janela Indicada
|
|
||||||
Name[pt_BR]=Exibir na janela indicada
|
|
||||||
Name[ro]=Afișează în fereastra specificată
|
|
||||||
Name[ru]=Показать в указанном окне
|
|
||||||
Name[se]=Čájet meroštuvvon láses
|
|
||||||
Name[si]=නිවේශිත කවුළුවේ පෙන්වන්න
|
|
||||||
Name[sk]=Zobraziť v zadanom okne
|
|
||||||
Name[sl]=Prikaži v določenemu oknu
|
|
||||||
Name[sr]=Прикажи у одређеном прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у одређеном прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u određenom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u određenom prozoru
|
|
||||||
Name[sv]=Visa i angivet fönster
|
|
||||||
Name[ta]=குறிப்பிடப்பட்ட சாளரத்தில் காட்டு
|
|
||||||
Name[te]=తెలుపబడిన విండోనందు ప్రదర్శించుము
|
|
||||||
Name[tg]=Намоиш дар тирезаи муайяншуда
|
|
||||||
Name[th]=แสดงในหน้าต่างที่ระบุ
|
|
||||||
Name[tr]=Belirtilen Pencerede Göster
|
|
||||||
Name[ug]=بەلگىلەنگەن كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Показати у вказаному вікні
|
|
||||||
Name[uz]=Koʻrsatilgan oynada koʻrsatish
|
|
||||||
Name[uz@cyrillic]=Кўрсатилган ойнада кўрсатиш
|
|
||||||
Name[vi]=Hiển thị trong cửa sổ được chỉ định
|
|
||||||
Name[wa]=Håyner dins l' finiesse specifieye
|
|
||||||
Name[x-test]=xxDisplay in Specified Windowxx
|
|
||||||
Name[zh_CN]=在指定窗口中显示
|
|
||||||
Name[zh_TW]=在指定的視窗中顯示
|
|
||||||
NoDisplay=true
|
|
||||||
|
|
||||||
[Desktop Action Root]
|
|
||||||
Exec=kblankscrn.kss -root
|
|
||||||
Name=Display in Root Window
|
|
||||||
Name[af]=Vertoon in root venster
|
|
||||||
Name[ar]=اعرض في نافذة الجذر
|
|
||||||
Name[ast]=Amosar na ventana raíz
|
|
||||||
Name[be]=Паказваць у галоўным акне
|
|
||||||
Name[be@latin]=Pakažy ŭ hałoŭnym aknie
|
|
||||||
Name[bg]=Показване в главния прозорец
|
|
||||||
Name[bn]=রুট উইণ্ডোয় দেখাও
|
|
||||||
Name[bn_IN]=Root উইন্ডোর মধ্যে প্রদর্শন করা হবে
|
|
||||||
Name[br]=Diskwel er prenestr gwrizienn
|
|
||||||
Name[bs]=Prikaži u korijenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra arrel
|
|
||||||
Name[ca@valencia]=Mostra a la finestra arrel
|
|
||||||
Name[cs]=Zobrazit na pozadí plochy
|
|
||||||
Name[csb]=Wëskrzëni w przédnym òknie
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Wraidd
|
|
||||||
Name[da]=Visning i root-vindue
|
|
||||||
Name[de]=Im Basisfenster (Root Window) anzeigen
|
|
||||||
Name[el]=Προβολή στο βασικό παράθυρο
|
|
||||||
Name[en_GB]=Display in Root Window
|
|
||||||
Name[eo]=Montriĝi en radika fenestro
|
|
||||||
Name[es]=Mostrar en la ventana raíz
|
|
||||||
Name[et]=Juuraknas näitamine
|
|
||||||
Name[eu]=Bistaratu erroko leihoan
|
|
||||||
Name[fa]=نمایش در پنجره ریشه
|
|
||||||
Name[fi]=Näytä juuri-ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre racine
|
|
||||||
Name[fy]=Werjefte yn haadfinster
|
|
||||||
Name[ga]=Taispeáin sa Phríomhfhuinneog
|
|
||||||
Name[gl]=Mostrar na xanela raíz
|
|
||||||
Name[gu]=રૂટ વિન્ડોમાં બતાવો
|
|
||||||
Name[he]=הצגה בחלון השורש
|
|
||||||
Name[hi]=रूट विंडो में प्रदर्शित करें
|
|
||||||
Name[hne]=रूट विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u korijenskom prozoru
|
|
||||||
Name[hsb]=W zakładnym woknje pokazać
|
|
||||||
Name[hu]=Megjelenítés a gyökérablakban
|
|
||||||
Name[ia]=Monstra in le fenestra radice (Root)
|
|
||||||
Name[id]=Tampilkan di Jendela Root
|
|
||||||
Name[is]=Birta í bakgrunni skjáborðs
|
|
||||||
Name[ja]=ルートウィンドウで表示
|
|
||||||
Name[ka]=ძირეულ ფანჯარაში ასახვა
|
|
||||||
Name[kk]=Root терезесінде көрсету
|
|
||||||
Name[km]=បង្ហាញក្នុងបង្អួច Root
|
|
||||||
Name[kn]=ಆದ್ಯ (ರೂಟ್) ಕಿಟಕಿಯಲ್ಲಿ ಪ್ರದರ್ಶಿಸು
|
|
||||||
Name[ko]=전체 화면으로 보이기
|
|
||||||
Name[lt]=Rodyti root lange
|
|
||||||
Name[lv]=Rādīt saknes logā
|
|
||||||
Name[mai]=रूट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во кореновиот прозорец
|
|
||||||
Name[ml]=റൂട്ടിനുള്ള ജാലകത്തില് കാണിക്കുക
|
|
||||||
Name[mr]=रूट चौकट मध्ये दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Root
|
|
||||||
Name[nb]=Vis i rotvinduet
|
|
||||||
Name[nds]=In't Hööftfinster wiesen
|
|
||||||
Name[ne]=मूल सञ्झ्यालमा प्रदर्शन गर्नुहोस्
|
|
||||||
Name[nl]=In hoofdvenster weergeven
|
|
||||||
Name[nn]=Vis i rotvindauget
|
|
||||||
Name[pa]=ਰੂਟ (root) ਵਿੰਡੋ ਵਿੱਚ ਵੇਖੋ
|
|
||||||
Name[pl]=Wyświetl w oknie głównym
|
|
||||||
Name[pt]=Mostrar na Janela de Fundo
|
|
||||||
Name[pt_BR]=Exibir na janela raiz
|
|
||||||
Name[ro]=Afișează în fereastra rădăcină
|
|
||||||
Name[ru]=Показать в корневом окне
|
|
||||||
Name[se]=Čájet ruohtasláses
|
|
||||||
Name[si]=රූට් කවුළුවේ පෙන්වන්න
|
|
||||||
Name[sk]=Zobraziť v koreňovom okne
|
|
||||||
Name[sl]=Prikaži v korenskem oknu
|
|
||||||
Name[sr]=Прикажи у кореном прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у корјеном прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u korjenom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u korenom prozoru
|
|
||||||
Name[sv]=Visa i rotfönstret
|
|
||||||
Name[ta]=மூல சாளரத்தில் காட்டு
|
|
||||||
Name[te]=Root విండోనందు ప్రదర్శించుము
|
|
||||||
Name[tg]=Намоиш дар тирезаи Root
|
|
||||||
Name[th]=แสดงในหน้าต่างราก
|
|
||||||
Name[tr]=Kök Pencerede Göster
|
|
||||||
Name[ug]=غول كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Показати на тлі екрана
|
|
||||||
Name[uz]=Tub oynada koʻrsatish
|
|
||||||
Name[uz@cyrillic]=Туб ойнада кўрсатиш
|
|
||||||
Name[vi]=Hiển thị trong cửa sổ gốc
|
|
||||||
Name[wa]=Håyner el finiesse raecene (li fond do scribanne)
|
|
||||||
Name[x-test]=xxDisplay in Root Windowxx
|
|
||||||
Name[zh_CN]=在 Root 窗口中显示
|
|
||||||
Name[zh_TW]=在 Root 視窗中顯示
|
|
||||||
NoDisplay=true
|
|
37
kscreensaver/kded_kscreensaver.cpp
Normal file
37
kscreensaver/kded_kscreensaver.cpp
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 2022 Ivailo Monev <xakepa10@gmail.com>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License version 2, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
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
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public License
|
||||||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "kded_kscreensaver.h"
|
||||||
|
#include <kpluginfactory.h>
|
||||||
|
|
||||||
|
K_PLUGIN_FACTORY(KScreenSaverModuleFactory, registerPlugin<KScreenSaverModule>();)
|
||||||
|
K_EXPORT_PLUGIN(KScreenSaverModuleFactory("kscreensaver"))
|
||||||
|
|
||||||
|
KScreenSaverModule::KScreenSaverModule(QObject *parent, const QList<QVariant>&)
|
||||||
|
: KDEDModule(parent),
|
||||||
|
m_kscreensaver(nullptr)
|
||||||
|
{
|
||||||
|
m_kscreensaver = new KScreenSaver(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
KScreenSaverModule::~KScreenSaverModule()
|
||||||
|
{
|
||||||
|
m_kscreensaver->deleteLater();
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "moc_kded_kscreensaver.cpp"
|
39
kscreensaver/kded_kscreensaver.h
Normal file
39
kscreensaver/kded_kscreensaver.h
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 2022 Ivailo Monev <xakepa10@gmail.com>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License version 2, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
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
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public License
|
||||||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef KSCREENSAVER_KDED_H
|
||||||
|
#define KSCREENSAVER_KDED_H
|
||||||
|
|
||||||
|
#include "kscreensaver.h"
|
||||||
|
|
||||||
|
#include <kdedmodule.h>
|
||||||
|
|
||||||
|
class KScreenSaverModule: public KDEDModule
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_CLASSINFO("D-Bus Interface", "org.kde.kscreensaver")
|
||||||
|
|
||||||
|
public:
|
||||||
|
KScreenSaverModule(QObject *parent, const QList<QVariant>&);
|
||||||
|
~KScreenSaverModule();
|
||||||
|
|
||||||
|
private:
|
||||||
|
KScreenSaver* m_kscreensaver;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // KSCREENSAVER_KDED_H
|
|
@ -1,123 +0,0 @@
|
||||||
add_subdirectory( asciiquarium )
|
|
||||||
|
|
||||||
SET(LIBMATH "m")
|
|
||||||
|
|
||||||
########### next target ###############
|
|
||||||
|
|
||||||
set(kbanner.kss_SRCS banner.cpp )
|
|
||||||
|
|
||||||
add_executable(kbanner.kss ${kbanner.kss_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(kbanner.kss ${KDE4_KDEUI_LIBS} kscreensaver)
|
|
||||||
|
|
||||||
install(TARGETS kbanner.kss ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
||||||
|
|
||||||
########### next target ###############
|
|
||||||
|
|
||||||
set(kpolygon.kss_SRCS polygon.cpp )
|
|
||||||
|
|
||||||
add_executable(kpolygon.kss ${kpolygon.kss_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(kpolygon.kss ${KDE4_KDEUI_LIBS} kscreensaver)
|
|
||||||
|
|
||||||
install(TARGETS kpolygon.kss ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
||||||
|
|
||||||
########### next target ###############
|
|
||||||
|
|
||||||
set(kslideshow.kss_SRCS slideshow.cpp slideshowcfg.ui)
|
|
||||||
|
|
||||||
add_executable(kslideshow.kss ${kslideshow.kss_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(kslideshow.kss
|
|
||||||
${KDE4_KIO_LIBS}
|
|
||||||
${KDE4_KEXIV2_LIBS}
|
|
||||||
${LIBMATH}
|
|
||||||
kscreensaver
|
|
||||||
)
|
|
||||||
|
|
||||||
install(TARGETS kslideshow.kss ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
||||||
|
|
||||||
########### next target ###############
|
|
||||||
|
|
||||||
set(klines.kss_SRCS lines.cpp)
|
|
||||||
|
|
||||||
add_executable(klines.kss ${klines.kss_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(klines.kss ${KDE4_KDEUI_LIBS} kscreensaver)
|
|
||||||
|
|
||||||
install(TARGETS klines.kss ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
||||||
|
|
||||||
########### next target ###############
|
|
||||||
|
|
||||||
set(klorenz.kss_SRCS lorenz.cpp)
|
|
||||||
|
|
||||||
add_executable(klorenz.kss ${klorenz.kss_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(klorenz.kss ${KDE4_KDEUI_LIBS} ${LIBMATH} kscreensaver)
|
|
||||||
|
|
||||||
install(TARGETS klorenz.kss ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
||||||
|
|
||||||
########### next target ###############
|
|
||||||
|
|
||||||
set(kblob.kss_SRCS blob.cpp)
|
|
||||||
|
|
||||||
add_executable(kblob.kss ${kblob.kss_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(kblob.kss ${KDE4_KDEUI_LIBS} ${LIBMATH} kscreensaver)
|
|
||||||
|
|
||||||
install(TARGETS kblob.kss ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
||||||
|
|
||||||
########### next target ###############
|
|
||||||
|
|
||||||
set(kvm.kss_SRCS kvm.cpp vm.c vm_random.c)
|
|
||||||
|
|
||||||
add_executable(kvm.kss ${kvm.kss_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(kvm.kss ${KDE4_KDEUI_LIBS} kscreensaver)
|
|
||||||
|
|
||||||
install(TARGETS kvm.kss ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
||||||
|
|
||||||
########### next target ###############
|
|
||||||
|
|
||||||
set(kclock.kss_SRCS kclock.cpp)
|
|
||||||
|
|
||||||
add_executable(kclock.kss ${kclock.kss_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(kclock.kss ${KDE4_KDEUI_LIBS} ${LIBMATH} kscreensaver)
|
|
||||||
|
|
||||||
install(TARGETS kclock.kss ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
||||||
|
|
||||||
########### next target ###############
|
|
||||||
|
|
||||||
#set($(X11_KSAVERS)_SRCS dummy.cpp )
|
|
||||||
if(Q_WS_X11)
|
|
||||||
set(kscience.kss_SRCS science.cpp)
|
|
||||||
|
|
||||||
add_executable(kscience.kss ${kscience.kss_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(kscience.kss ${KDE4_KDEUI_LIBS} kscreensaver ${X11_LIBRARIES})
|
|
||||||
|
|
||||||
install(TARGETS kscience.kss ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
||||||
install(FILES KScience.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR}/ScreenSavers)
|
|
||||||
endif(Q_WS_X11)
|
|
||||||
|
|
||||||
########### install files ###############
|
|
||||||
|
|
||||||
install(
|
|
||||||
FILES
|
|
||||||
kscience.png
|
|
||||||
DESTINATION ${KDE4_DATA_INSTALL_DIR}/kscreensaver
|
|
||||||
)
|
|
||||||
install(
|
|
||||||
FILES
|
|
||||||
KBanner.desktop
|
|
||||||
KPolygon.desktop
|
|
||||||
KSlideshow.desktop
|
|
||||||
KLines-saver.desktop
|
|
||||||
KLorenz.desktop
|
|
||||||
KBlob.desktop
|
|
||||||
KVm.desktop
|
|
||||||
KClock.desktop
|
|
||||||
DESTINATION ${KDE4_SERVICES_INSTALL_DIR}/ScreenSavers
|
|
||||||
)
|
|
||||||
|
|
|
@ -1,295 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Exec=kbanner.kss
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
Type=Service
|
|
||||||
X-KDE-ServiceTypes=ScreenSaver
|
|
||||||
Actions=Setup;InWindow;Root;
|
|
||||||
X-KDE-Category=Banners & Pictures
|
|
||||||
Name=Banner
|
|
||||||
Name[af]=Bannier
|
|
||||||
Name[ast]=Pancarta
|
|
||||||
Name[bg]=Банер
|
|
||||||
Name[br]=Lugan
|
|
||||||
Name[bs]=Zastava
|
|
||||||
Name[ca]=Rètol
|
|
||||||
Name[ca@valencia]=Rètol
|
|
||||||
Name[cs]=Běžící text
|
|
||||||
Name[cy]=Baner
|
|
||||||
Name[da]=Banner
|
|
||||||
Name[de]=Lauftext
|
|
||||||
Name[el]=Τίτλος
|
|
||||||
Name[en_GB]=Banner
|
|
||||||
Name[eo]=Standardo
|
|
||||||
Name[es]=Pancarta
|
|
||||||
Name[et]=Tekstiriba
|
|
||||||
Name[eu]=Titularra
|
|
||||||
Name[fa]=بنر
|
|
||||||
Name[fi]=Viesti
|
|
||||||
Name[fr]=Bannière
|
|
||||||
Name[fy]=Ljochtkrante
|
|
||||||
Name[ga]=Meirge
|
|
||||||
Name[gl]=Cartel
|
|
||||||
Name[he]=כתובית
|
|
||||||
Name[hne]=बैनर
|
|
||||||
Name[hr]=Natpis
|
|
||||||
Name[hu]=Banner
|
|
||||||
Name[is]=Borði
|
|
||||||
Name[it]=Testo scorrevole
|
|
||||||
Name[ja]=バナー
|
|
||||||
Name[kk]=Баннер
|
|
||||||
Name[ko]=흐르는 텍스트
|
|
||||||
Name[lt]=Plakatas
|
|
||||||
Name[lv]=Karogs
|
|
||||||
Name[mk]=Транспарент
|
|
||||||
Name[ml]=ബാനര്
|
|
||||||
Name[ms]=Kain Rentang
|
|
||||||
Name[nb]=Banner
|
|
||||||
Name[nds]=Looptext
|
|
||||||
Name[ne]=ब्यानर
|
|
||||||
Name[nl]=Lichtkrant
|
|
||||||
Name[nn]=Fane
|
|
||||||
Name[pa]=ਬੈਨਰ
|
|
||||||
Name[pl]=Banner
|
|
||||||
Name[pt]=Cartaz
|
|
||||||
Name[pt_BR]=Banner
|
|
||||||
Name[ro]=Baner
|
|
||||||
Name[ru]=Бегущая строка
|
|
||||||
Name[sk]=Banner
|
|
||||||
Name[sl]=Napis
|
|
||||||
Name[sq]=Banner
|
|
||||||
Name[sr]=Барјак
|
|
||||||
Name[sr@ijekavian]=Барјак
|
|
||||||
Name[sr@ijekavianlatin]=Barjak
|
|
||||||
Name[sr@latin]=Barjak
|
|
||||||
Name[sv]=Rubrik
|
|
||||||
Name[ta]=பேனர்
|
|
||||||
Name[tg]=Давида истодаи рах
|
|
||||||
Name[th]=ป้ายกระกาศ
|
|
||||||
Name[tr]=Afiş
|
|
||||||
Name[ug]=لەۋھە
|
|
||||||
Name[uk]=Транспарант
|
|
||||||
Name[vi]=Biểu ngữ
|
|
||||||
Name[xh]=Isiqwentshu selaphu
|
|
||||||
Name[x-test]=xxBannerxx
|
|
||||||
Name[zh_CN]=横幅
|
|
||||||
Name[zh_TW]=標誌
|
|
||||||
|
|
||||||
[Desktop Action Setup]
|
|
||||||
Exec=kbanner.kss -setup
|
|
||||||
Name=Setup...
|
|
||||||
Name[af]=Opstelling...
|
|
||||||
Name[ast]=Configuración...
|
|
||||||
Name[bg]=Настройки...
|
|
||||||
Name[br]=Kefluniadur ...
|
|
||||||
Name[bs]=Podesi...
|
|
||||||
Name[ca]=Arranjament...
|
|
||||||
Name[ca@valencia]=Arranjament...
|
|
||||||
Name[cs]=Nastavení...
|
|
||||||
Name[cy]=Gosod ...
|
|
||||||
Name[da]=Opsætning...
|
|
||||||
Name[de]=Einrichtung ...
|
|
||||||
Name[el]=Ρύθμιση...
|
|
||||||
Name[en_GB]=Setup...
|
|
||||||
Name[eo]=Agordo...
|
|
||||||
Name[es]=Configuración...
|
|
||||||
Name[et]=Seadistamine...
|
|
||||||
Name[eu]=Konfiguratu...
|
|
||||||
Name[fa]=برپایی...
|
|
||||||
Name[fi]=Asetukset…
|
|
||||||
Name[fr]=Configuration...
|
|
||||||
Name[fy]=Opset...
|
|
||||||
Name[ga]=Socrú...
|
|
||||||
Name[gl]=Configuración...
|
|
||||||
Name[he]=הגדרות...
|
|
||||||
Name[hne]=सेटअप...
|
|
||||||
Name[hr]=Postavke …
|
|
||||||
Name[hu]=Beállítás...
|
|
||||||
Name[is]=Stillingar...
|
|
||||||
Name[it]=Impostazioni...
|
|
||||||
Name[ja]=設定...
|
|
||||||
Name[kk]=Баптау...
|
|
||||||
Name[ko]=설정...
|
|
||||||
Name[lt]=Sąranka ...
|
|
||||||
Name[lv]=Iestatījumi...
|
|
||||||
Name[mai]=सेटअप...
|
|
||||||
Name[mk]=Поставување...
|
|
||||||
Name[ml]=ഒരുക്കം...
|
|
||||||
Name[mr]=संयोजना ...
|
|
||||||
Name[ms]=Setkan...
|
|
||||||
Name[nb]=Innstillinger …
|
|
||||||
Name[nds]=Instellen...
|
|
||||||
Name[ne]=सेटअप...
|
|
||||||
Name[nl]=Instellingen...
|
|
||||||
Name[nn]=Oppsett …
|
|
||||||
Name[pa]=ਸੈਟਅੱਪ...
|
|
||||||
Name[pl]=Ustawienia...
|
|
||||||
Name[pt]=Configurar...
|
|
||||||
Name[pt_BR]=Configurar...
|
|
||||||
Name[ro]=Configurare...
|
|
||||||
Name[ru]=Настройка...
|
|
||||||
Name[sk]=Nastavenie...
|
|
||||||
Name[sl]=Nastavi ...
|
|
||||||
Name[sq]=Instalimi...
|
|
||||||
Name[sr]=Подеси...
|
|
||||||
Name[sr@ijekavian]=Подеси...
|
|
||||||
Name[sr@ijekavianlatin]=Podesi...
|
|
||||||
Name[sr@latin]=Podesi...
|
|
||||||
Name[sv]=Inställningar...
|
|
||||||
Name[ta]=அமைப்பு...
|
|
||||||
Name[tg]=Барпосозӣ...
|
|
||||||
Name[th]=ตั้งค่า...
|
|
||||||
Name[tr]=Kurulum...
|
|
||||||
Name[ug]=ئورنات…
|
|
||||||
Name[uk]=Встановити...
|
|
||||||
Name[uz]=Oʻrnatish
|
|
||||||
Name[uz@cyrillic]=Ўрнатиш
|
|
||||||
Name[vi]=Thiết lập...
|
|
||||||
Name[xh]=Iyacwangciswa...
|
|
||||||
Name[x-test]=xxSetup...xx
|
|
||||||
Name[zh_CN]=设置...
|
|
||||||
Name[zh_TW]=設定...
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
|
|
||||||
[Desktop Action InWindow]
|
|
||||||
Exec=kbanner.kss -window-id %w
|
|
||||||
Name=Display in Specified Window
|
|
||||||
Name[ast]=Amosar na ventana especificada
|
|
||||||
Name[bg]=Показване в избран прозорец
|
|
||||||
Name[br]=Diskwel er prenestr spisaet
|
|
||||||
Name[bs]=Prikaži u određenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra especificada
|
|
||||||
Name[ca@valencia]=Mostra a la finestra especificada
|
|
||||||
Name[cs]=Zobrazit v určeném okně
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Benodol
|
|
||||||
Name[da]=Visning i angivet vindue
|
|
||||||
Name[de]=In bestimmten Fenster anzeigen
|
|
||||||
Name[el]=Προβολή στο καθορισμένο παράθυρο
|
|
||||||
Name[en_GB]=Display in Specified Window
|
|
||||||
Name[eo]=Montri en indikita fenestro
|
|
||||||
Name[es]=Mostrar en la ventana especificada
|
|
||||||
Name[et]=Määratud aknas näitamine
|
|
||||||
Name[eu]=Bistaratu zehaztutako lehioan
|
|
||||||
Name[fa]=نمایش در پنجره مشخصشده
|
|
||||||
Name[fi]=Näytä määrätyssä ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre spécifiée
|
|
||||||
Name[fy]=Werjefte yn in definiearre finster
|
|
||||||
Name[ga]=Taispeáin san Fhuinneog Sonraithe
|
|
||||||
Name[gl]=Mostrar na xanela indicada
|
|
||||||
Name[he]=הצג בחלון המצוין
|
|
||||||
Name[hne]=निरधारित विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u određenom prozoru
|
|
||||||
Name[hu]=Megjelenítés a megadott ablakban
|
|
||||||
Name[is]=Birta í völdum glugga
|
|
||||||
Name[it]=Mostra nella finestra specificata
|
|
||||||
Name[ja]=指定したウィンドウで表示
|
|
||||||
Name[kk]=Келтірілген терезеде көрсетілсін
|
|
||||||
Name[ko]=지정한 창에 보이기
|
|
||||||
Name[lt]=Rodyti nurodytame lange
|
|
||||||
Name[lv]=Rādīt norādītajā logā
|
|
||||||
Name[mai]=निर्दिष्ट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во наведениот прозорец
|
|
||||||
Name[ml]=പ്രത്യേകം പറഞ്ഞിരിക്കുന്ന ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=निर्देशीत चौकटीत दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Yang Dinyatakan
|
|
||||||
Name[nb]=Vis i angitt vindu
|
|
||||||
Name[nds]=In utsöcht Finster wiesen
|
|
||||||
Name[ne]=निर्दिष्ट सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven In een opgegeven venster
|
|
||||||
Name[nn]=Vis i oppgjeve vindauge
|
|
||||||
Name[pa]=ਦੱਸੇ ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w zadanym oknie
|
|
||||||
Name[pt]=Mostrar na Janela Indicada
|
|
||||||
Name[pt_BR]=Exibir na janela indicada
|
|
||||||
Name[ro]=Afișează în fereastra specificată
|
|
||||||
Name[ru]=Показывать в указанном окне
|
|
||||||
Name[sk]=Zobraziť v zadanom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren e Specifikuar
|
|
||||||
Name[sr]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sv]=Visa i angivet fönster
|
|
||||||
Name[ta]=குறித்த சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи нишондода намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างที่กำหนด
|
|
||||||
Name[tr]=Belirtilen Pencerede Göster
|
|
||||||
Name[ug]=بەلگىلەنگەن كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити у вказаному вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Đã định
|
|
||||||
Name[x-test]=xxDisplay in Specified Windowxx
|
|
||||||
Name[zh_CN]=在指定的窗口中显示
|
|
||||||
Name[zh_TW]=在指定的視窗中顯示
|
|
||||||
NoDisplay=true
|
|
||||||
|
|
||||||
[Desktop Action Root]
|
|
||||||
Exec=kbanner.kss -root
|
|
||||||
Name=Display in Root Window
|
|
||||||
Name[ast]=Amosar na ventana raíz
|
|
||||||
Name[bg]=Показване в главния прозорец
|
|
||||||
Name[br]=Diskwel er prenestr gwrizienn
|
|
||||||
Name[bs]=Prikaži u korijenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra arrel
|
|
||||||
Name[ca@valencia]=Mostra a la finestra arrel
|
|
||||||
Name[cs]=Zobrazit na pozadí plochy
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Wraidd
|
|
||||||
Name[da]=Visning i root-vindue
|
|
||||||
Name[de]=In Hintergrundfenster anzeigen
|
|
||||||
Name[el]=Προβολή στο βασικό παράθυρο
|
|
||||||
Name[en_GB]=Display in Root Window
|
|
||||||
Name[eo]=Montri en radika fenestro
|
|
||||||
Name[es]=Mostrar en la ventana raíz
|
|
||||||
Name[et]=Juuraknas näitamine
|
|
||||||
Name[eu]=Bistaratu erro lehioan
|
|
||||||
Name[fa]=نمایش در پنجره ریشه
|
|
||||||
Name[fi]=Näytä juuri-ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre racine
|
|
||||||
Name[fy]=Werjefte yn haadfinster
|
|
||||||
Name[ga]=Taispeáin sa Phríomhfhuinneog
|
|
||||||
Name[gl]=Mostrar na xanela raíz
|
|
||||||
Name[he]=הצג בחלון השורש
|
|
||||||
Name[hne]=रूट विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u ishodišnom prozoru
|
|
||||||
Name[hu]=Megjelenítés a gyökérablakban
|
|
||||||
Name[is]=Birta í rótarglugganum
|
|
||||||
Name[it]=Mostra sullo sfondo
|
|
||||||
Name[ja]=ルートウィンドウで表示
|
|
||||||
Name[kk]=Түбір терезесінде көрсетілсін
|
|
||||||
Name[ko]=전체 화면으로 보이기
|
|
||||||
Name[lt]=Rodyti root lange
|
|
||||||
Name[lv]=Rādīt saknes logā
|
|
||||||
Name[mai]=रूट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во коренскиот прозорец
|
|
||||||
Name[ml]=മൂല ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=रूट चौकट मध्ये दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Root
|
|
||||||
Name[nb]=Vis i root-vindu
|
|
||||||
Name[nds]=In Hööftfinster wiesen
|
|
||||||
Name[ne]=मूल सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven in hoofdvenster
|
|
||||||
Name[nn]=Vis i rotvindauget
|
|
||||||
Name[pa]=Root ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w oknie głównym
|
|
||||||
Name[pt]=Mostrar na Janela de Fundo
|
|
||||||
Name[pt_BR]=Exibir na janela raiz
|
|
||||||
Name[ro]=Afișează în fereastra rădăcină
|
|
||||||
Name[ru]=Показывать в корневом окне
|
|
||||||
Name[sk]=Zobraziť v koreňovom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren Bazë
|
|
||||||
Name[sr]=Прикажи у кореном прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у корјеном прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u korjenom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u korenom prozoru
|
|
||||||
Name[sv]=Visa i rotfönstret
|
|
||||||
Name[ta]=ஆரம்ப சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи решагӣ намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างราก
|
|
||||||
Name[tr]=Kök Pencerede Göster
|
|
||||||
Name[ug]=غول كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити в кореневому вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Gốc
|
|
||||||
Name[x-test]=xxDisplay in Root Windowxx
|
|
||||||
Name[zh_CN]=在根窗口中显示
|
|
||||||
Name[zh_TW]=在根視窗中顯示
|
|
||||||
NoDisplay=true
|
|
|
@ -1,291 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Exec=kblob.kss
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
Type=Service
|
|
||||||
X-KDE-ServiceTypes=ScreenSaver
|
|
||||||
Actions=Setup;InWindow;Root;
|
|
||||||
X-KDE-Category=Visit to Flatland
|
|
||||||
Name=Blob
|
|
||||||
Name[af]=Blob
|
|
||||||
Name[ast]=Blob
|
|
||||||
Name[bg]=Петно
|
|
||||||
Name[br]=Pokard
|
|
||||||
Name[bs]=Grudva
|
|
||||||
Name[ca]=Bombolla
|
|
||||||
Name[ca@valencia]=Bombolla
|
|
||||||
Name[cs]=Kaňka
|
|
||||||
Name[cy]=Smotyn
|
|
||||||
Name[da]=Dråbe
|
|
||||||
Name[de]=Blob
|
|
||||||
Name[el]=Blob
|
|
||||||
Name[en_GB]=Blob
|
|
||||||
Name[eo]=Gutoj
|
|
||||||
Name[es]=Blob
|
|
||||||
Name[et]=Piisk
|
|
||||||
Name[eu]=Tanta
|
|
||||||
Name[fi]=Kuplat
|
|
||||||
Name[fr]=Blob
|
|
||||||
Name[fy]=Blob
|
|
||||||
Name[ga]=Blob
|
|
||||||
Name[gl]=Blob
|
|
||||||
Name[he]=כתמים
|
|
||||||
Name[hne]=ब्लाब
|
|
||||||
Name[hu]=Blob
|
|
||||||
Name[is]=Blob
|
|
||||||
Name[it]=Blob
|
|
||||||
Name[ja]=斑点
|
|
||||||
Name[kk]=Геометриялық өрнектер
|
|
||||||
Name[ko]=덩어리
|
|
||||||
Name[lt]=Rutuliukas
|
|
||||||
Name[lv]=Lāse
|
|
||||||
Name[mk]=Дамка
|
|
||||||
Name[ml]=ബ്ലോബ്ബ്
|
|
||||||
Name[ms]=Blob
|
|
||||||
Name[nb]=Fargeflekk
|
|
||||||
Name[nds]=Blob
|
|
||||||
Name[ne]=ब्लब
|
|
||||||
Name[nl]=Blob
|
|
||||||
Name[nn]=Klattar
|
|
||||||
Name[pa]=Blob
|
|
||||||
Name[pl]=Bąbel
|
|
||||||
Name[pt]=Blob
|
|
||||||
Name[pt_BR]=Gotas
|
|
||||||
Name[ro]=Bule
|
|
||||||
Name[ru]=Геометрические построения
|
|
||||||
Name[sk]=Blob
|
|
||||||
Name[sl]=Kepica
|
|
||||||
Name[sq]=Blob
|
|
||||||
Name[sr]=БЛОБ
|
|
||||||
Name[sr@ijekavian]=БЛОБ
|
|
||||||
Name[sr@ijekavianlatin]=BLOB
|
|
||||||
Name[sr@latin]=BLOB
|
|
||||||
Name[sv]=Färgfläck
|
|
||||||
Name[ta]=தொழிற்பொருள்
|
|
||||||
Name[tg]=Асос гузории геометрӣ
|
|
||||||
Name[tr]=Damlacık
|
|
||||||
Name[uk]=Геометричні візерунки
|
|
||||||
Name[vi]=Giọt nước
|
|
||||||
Name[xh]=Ichaphaza elincinane
|
|
||||||
Name[x-test]=xxBlobxx
|
|
||||||
Name[zh_CN]=斑迹
|
|
||||||
Name[zh_TW]=斑點
|
|
||||||
|
|
||||||
[Desktop Action Setup]
|
|
||||||
Exec=kblob.kss -setup
|
|
||||||
Name=Setup...
|
|
||||||
Name[af]=Opstelling...
|
|
||||||
Name[ast]=Configuración...
|
|
||||||
Name[bg]=Настройки...
|
|
||||||
Name[br]=Kefluniadur ...
|
|
||||||
Name[bs]=Podesi...
|
|
||||||
Name[ca]=Arranjament...
|
|
||||||
Name[ca@valencia]=Arranjament...
|
|
||||||
Name[cs]=Nastavení...
|
|
||||||
Name[cy]=Gosod ...
|
|
||||||
Name[da]=Opsætning...
|
|
||||||
Name[de]=Einrichtung ...
|
|
||||||
Name[el]=Ρύθμιση...
|
|
||||||
Name[en_GB]=Setup...
|
|
||||||
Name[eo]=Agordo...
|
|
||||||
Name[es]=Configuración...
|
|
||||||
Name[et]=Seadistamine...
|
|
||||||
Name[eu]=Konfiguratu...
|
|
||||||
Name[fa]=برپایی...
|
|
||||||
Name[fi]=Asetukset…
|
|
||||||
Name[fr]=Configuration...
|
|
||||||
Name[fy]=Opset...
|
|
||||||
Name[ga]=Socrú...
|
|
||||||
Name[gl]=Configuración...
|
|
||||||
Name[he]=הגדרות...
|
|
||||||
Name[hne]=सेटअप...
|
|
||||||
Name[hr]=Postavke …
|
|
||||||
Name[hu]=Beállítás...
|
|
||||||
Name[is]=Stillingar...
|
|
||||||
Name[it]=Impostazioni...
|
|
||||||
Name[ja]=設定...
|
|
||||||
Name[kk]=Баптау...
|
|
||||||
Name[ko]=설정...
|
|
||||||
Name[lt]=Sąranka ...
|
|
||||||
Name[lv]=Iestatījumi...
|
|
||||||
Name[mai]=सेटअप...
|
|
||||||
Name[mk]=Поставување...
|
|
||||||
Name[ml]=ഒരുക്കം...
|
|
||||||
Name[mr]=संयोजना ...
|
|
||||||
Name[ms]=Setkan...
|
|
||||||
Name[nb]=Innstillinger …
|
|
||||||
Name[nds]=Instellen...
|
|
||||||
Name[ne]=सेटअप...
|
|
||||||
Name[nl]=Instellingen...
|
|
||||||
Name[nn]=Oppsett …
|
|
||||||
Name[pa]=ਸੈਟਅੱਪ...
|
|
||||||
Name[pl]=Ustawienia...
|
|
||||||
Name[pt]=Configurar...
|
|
||||||
Name[pt_BR]=Configurar...
|
|
||||||
Name[ro]=Configurare...
|
|
||||||
Name[ru]=Настройка...
|
|
||||||
Name[sk]=Nastavenie...
|
|
||||||
Name[sl]=Nastavi ...
|
|
||||||
Name[sq]=Instalimi...
|
|
||||||
Name[sr]=Подеси...
|
|
||||||
Name[sr@ijekavian]=Подеси...
|
|
||||||
Name[sr@ijekavianlatin]=Podesi...
|
|
||||||
Name[sr@latin]=Podesi...
|
|
||||||
Name[sv]=Inställningar...
|
|
||||||
Name[ta]=அமைப்பு...
|
|
||||||
Name[tg]=Барпосозӣ...
|
|
||||||
Name[th]=ตั้งค่า...
|
|
||||||
Name[tr]=Kurulum...
|
|
||||||
Name[ug]=ئورنات…
|
|
||||||
Name[uk]=Встановити...
|
|
||||||
Name[uz]=Oʻrnatish
|
|
||||||
Name[uz@cyrillic]=Ўрнатиш
|
|
||||||
Name[vi]=Thiết lập...
|
|
||||||
Name[xh]=Iyacwangciswa...
|
|
||||||
Name[x-test]=xxSetup...xx
|
|
||||||
Name[zh_CN]=设置...
|
|
||||||
Name[zh_TW]=設定...
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
|
|
||||||
[Desktop Action InWindow]
|
|
||||||
Exec=kblob.kss -window-id %w
|
|
||||||
Name=Display in Specified Window
|
|
||||||
Name[ast]=Amosar na ventana especificada
|
|
||||||
Name[bg]=Показване в избран прозорец
|
|
||||||
Name[br]=Diskwel er prenestr spisaet
|
|
||||||
Name[bs]=Prikaži u određenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra especificada
|
|
||||||
Name[ca@valencia]=Mostra a la finestra especificada
|
|
||||||
Name[cs]=Zobrazit v určeném okně
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Benodol
|
|
||||||
Name[da]=Visning i angivet vindue
|
|
||||||
Name[de]=In bestimmten Fenster anzeigen
|
|
||||||
Name[el]=Προβολή στο καθορισμένο παράθυρο
|
|
||||||
Name[en_GB]=Display in Specified Window
|
|
||||||
Name[eo]=Montri en indikita fenestro
|
|
||||||
Name[es]=Mostrar en la ventana especificada
|
|
||||||
Name[et]=Määratud aknas näitamine
|
|
||||||
Name[eu]=Bistaratu zehaztutako lehioan
|
|
||||||
Name[fa]=نمایش در پنجره مشخصشده
|
|
||||||
Name[fi]=Näytä määrätyssä ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre spécifiée
|
|
||||||
Name[fy]=Werjefte yn in definiearre finster
|
|
||||||
Name[ga]=Taispeáin san Fhuinneog Sonraithe
|
|
||||||
Name[gl]=Mostrar na xanela indicada
|
|
||||||
Name[he]=הצג בחלון המצוין
|
|
||||||
Name[hne]=निरधारित विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u određenom prozoru
|
|
||||||
Name[hu]=Megjelenítés a megadott ablakban
|
|
||||||
Name[is]=Birta í völdum glugga
|
|
||||||
Name[it]=Mostra nella finestra specificata
|
|
||||||
Name[ja]=指定したウィンドウで表示
|
|
||||||
Name[kk]=Келтірілген терезеде көрсетілсін
|
|
||||||
Name[ko]=지정한 창에 보이기
|
|
||||||
Name[lt]=Rodyti nurodytame lange
|
|
||||||
Name[lv]=Rādīt norādītajā logā
|
|
||||||
Name[mai]=निर्दिष्ट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во наведениот прозорец
|
|
||||||
Name[ml]=പ്രത്യേകം പറഞ്ഞിരിക്കുന്ന ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=निर्देशीत चौकटीत दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Yang Dinyatakan
|
|
||||||
Name[nb]=Vis i angitt vindu
|
|
||||||
Name[nds]=In utsöcht Finster wiesen
|
|
||||||
Name[ne]=निर्दिष्ट सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven In een opgegeven venster
|
|
||||||
Name[nn]=Vis i oppgjeve vindauge
|
|
||||||
Name[pa]=ਦੱਸੇ ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w zadanym oknie
|
|
||||||
Name[pt]=Mostrar na Janela Indicada
|
|
||||||
Name[pt_BR]=Exibir na janela indicada
|
|
||||||
Name[ro]=Afișează în fereastra specificată
|
|
||||||
Name[ru]=Показывать в указанном окне
|
|
||||||
Name[sk]=Zobraziť v zadanom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren e Specifikuar
|
|
||||||
Name[sr]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sv]=Visa i angivet fönster
|
|
||||||
Name[ta]=குறித்த சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи нишондода намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างที่กำหนด
|
|
||||||
Name[tr]=Belirtilen Pencerede Göster
|
|
||||||
Name[ug]=بەلگىلەنگەن كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити у вказаному вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Đã định
|
|
||||||
Name[x-test]=xxDisplay in Specified Windowxx
|
|
||||||
Name[zh_CN]=在指定的窗口中显示
|
|
||||||
Name[zh_TW]=在指定的視窗中顯示
|
|
||||||
NoDisplay=true
|
|
||||||
|
|
||||||
[Desktop Action Root]
|
|
||||||
Exec=kblob.kss -root
|
|
||||||
Name=Display in Root Window
|
|
||||||
Name[ast]=Amosar na ventana raíz
|
|
||||||
Name[bg]=Показване в главния прозорец
|
|
||||||
Name[br]=Diskwel er prenestr gwrizienn
|
|
||||||
Name[bs]=Prikaži u korijenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra arrel
|
|
||||||
Name[ca@valencia]=Mostra a la finestra arrel
|
|
||||||
Name[cs]=Zobrazit na pozadí plochy
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Wraidd
|
|
||||||
Name[da]=Visning i root-vindue
|
|
||||||
Name[de]=In Hintergrundfenster anzeigen
|
|
||||||
Name[el]=Προβολή στο βασικό παράθυρο
|
|
||||||
Name[en_GB]=Display in Root Window
|
|
||||||
Name[eo]=Montri en radika fenestro
|
|
||||||
Name[es]=Mostrar en la ventana raíz
|
|
||||||
Name[et]=Juuraknas näitamine
|
|
||||||
Name[eu]=Bistaratu erro lehioan
|
|
||||||
Name[fa]=نمایش در پنجره ریشه
|
|
||||||
Name[fi]=Näytä juuri-ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre racine
|
|
||||||
Name[fy]=Werjefte yn haadfinster
|
|
||||||
Name[ga]=Taispeáin sa Phríomhfhuinneog
|
|
||||||
Name[gl]=Mostrar na xanela raíz
|
|
||||||
Name[he]=הצג בחלון השורש
|
|
||||||
Name[hne]=रूट विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u ishodišnom prozoru
|
|
||||||
Name[hu]=Megjelenítés a gyökérablakban
|
|
||||||
Name[is]=Birta í rótarglugganum
|
|
||||||
Name[it]=Mostra sullo sfondo
|
|
||||||
Name[ja]=ルートウィンドウで表示
|
|
||||||
Name[kk]=Түбір терезесінде көрсетілсін
|
|
||||||
Name[ko]=전체 화면으로 보이기
|
|
||||||
Name[lt]=Rodyti root lange
|
|
||||||
Name[lv]=Rādīt saknes logā
|
|
||||||
Name[mai]=रूट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во коренскиот прозорец
|
|
||||||
Name[ml]=മൂല ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=रूट चौकट मध्ये दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Root
|
|
||||||
Name[nb]=Vis i root-vindu
|
|
||||||
Name[nds]=In Hööftfinster wiesen
|
|
||||||
Name[ne]=मूल सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven in hoofdvenster
|
|
||||||
Name[nn]=Vis i rotvindauget
|
|
||||||
Name[pa]=Root ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w oknie głównym
|
|
||||||
Name[pt]=Mostrar na Janela de Fundo
|
|
||||||
Name[pt_BR]=Exibir na janela raiz
|
|
||||||
Name[ro]=Afișează în fereastra rădăcină
|
|
||||||
Name[ru]=Показывать в корневом окне
|
|
||||||
Name[sk]=Zobraziť v koreňovom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren Bazë
|
|
||||||
Name[sr]=Прикажи у кореном прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у корјеном прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u korjenom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u korenom prozoru
|
|
||||||
Name[sv]=Visa i rotfönstret
|
|
||||||
Name[ta]=ஆரம்ப சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи решагӣ намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างราก
|
|
||||||
Name[tr]=Kök Pencerede Göster
|
|
||||||
Name[ug]=غول كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити в кореневому вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Gốc
|
|
||||||
Name[x-test]=xxDisplay in Root Windowxx
|
|
||||||
Name[zh_CN]=在根窗口中显示
|
|
||||||
Name[zh_TW]=在根視窗中顯示
|
|
||||||
NoDisplay=true
|
|
|
@ -1,299 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Exec=kclock.kss
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
Type=Service
|
|
||||||
X-KDE-ServiceTypes=ScreenSaver
|
|
||||||
Actions=Setup;InWindow;Root;
|
|
||||||
X-KDE-Category=Miscellaneous
|
|
||||||
Name=Clock
|
|
||||||
Name[ast]=Reló
|
|
||||||
Name[bg]=Часовник
|
|
||||||
Name[br]=Eurier
|
|
||||||
Name[bs]=Sat
|
|
||||||
Name[ca]=Rellotge
|
|
||||||
Name[ca@valencia]=Rellotge
|
|
||||||
Name[cs]=Hodiny
|
|
||||||
Name[cy]=Cloc
|
|
||||||
Name[da]=Ur
|
|
||||||
Name[de]=Uhr
|
|
||||||
Name[el]=Clock
|
|
||||||
Name[en_GB]=Clock
|
|
||||||
Name[eo]=Horloĝo
|
|
||||||
Name[es]=Reloj
|
|
||||||
Name[et]=Kell
|
|
||||||
Name[eu]=Erlojua
|
|
||||||
Name[fa]=ساعت
|
|
||||||
Name[fi]=Kello
|
|
||||||
Name[fr]=Horloge
|
|
||||||
Name[fy]=Klok
|
|
||||||
Name[ga]=Clog
|
|
||||||
Name[gl]=Reloxo
|
|
||||||
Name[he]=שעון
|
|
||||||
Name[hne]=घड़ी
|
|
||||||
Name[hu]=Clock
|
|
||||||
Name[is]=Klukka
|
|
||||||
Name[it]=Orologio
|
|
||||||
Name[ja]=時計
|
|
||||||
Name[kk]=Сағат
|
|
||||||
Name[ko]=시계
|
|
||||||
Name[ku]=Saet
|
|
||||||
Name[lt]=Laikrodis
|
|
||||||
Name[lv]=Pulkstenis
|
|
||||||
Name[mai]=घड़ी
|
|
||||||
Name[mk]=Часовник
|
|
||||||
Name[ml]=ഘടികാരം
|
|
||||||
Name[mr]=घड्याळ
|
|
||||||
Name[ms]=Jam
|
|
||||||
Name[nb]=Klokke
|
|
||||||
Name[nds]=Klock
|
|
||||||
Name[ne]=घडी
|
|
||||||
Name[nl]=Klok
|
|
||||||
Name[nn]=Klokke
|
|
||||||
Name[oc]=Relòtge
|
|
||||||
Name[pa]=ਘੜੀ
|
|
||||||
Name[pl]=Zegar
|
|
||||||
Name[pt]=Relógio
|
|
||||||
Name[pt_BR]=Relógio
|
|
||||||
Name[ro]=Ceas
|
|
||||||
Name[ru]=Часы
|
|
||||||
Name[sk]=Hodiny
|
|
||||||
Name[sl]=Ura
|
|
||||||
Name[sq]=Ora
|
|
||||||
Name[sr]=Сат
|
|
||||||
Name[sr@ijekavian]=Сат
|
|
||||||
Name[sr@ijekavianlatin]=Sat
|
|
||||||
Name[sr@latin]=Sat
|
|
||||||
Name[sv]=Klocka
|
|
||||||
Name[ta]=கடிகாரம்
|
|
||||||
Name[tg]=Соат
|
|
||||||
Name[th]=นาฬิกา
|
|
||||||
Name[tr]=Saat
|
|
||||||
Name[ug]=سائەت
|
|
||||||
Name[uk]=Годинник
|
|
||||||
Name[uz]=Soat
|
|
||||||
Name[uz@cyrillic]=Соат
|
|
||||||
Name[vi]=Đồng hồ
|
|
||||||
Name[xh]=Ikloko
|
|
||||||
Name[x-test]=xxClockxx
|
|
||||||
Name[zh_CN]=时钟
|
|
||||||
Name[zh_TW]=時鐘
|
|
||||||
|
|
||||||
[Desktop Action Setup]
|
|
||||||
Exec=kclock.kss -setup
|
|
||||||
Name=Setup...
|
|
||||||
Name[af]=Opstelling...
|
|
||||||
Name[ast]=Configuración...
|
|
||||||
Name[bg]=Настройки...
|
|
||||||
Name[br]=Kefluniadur ...
|
|
||||||
Name[bs]=Podesi...
|
|
||||||
Name[ca]=Arranjament...
|
|
||||||
Name[ca@valencia]=Arranjament...
|
|
||||||
Name[cs]=Nastavení...
|
|
||||||
Name[cy]=Gosod ...
|
|
||||||
Name[da]=Opsætning...
|
|
||||||
Name[de]=Einrichtung ...
|
|
||||||
Name[el]=Ρύθμιση...
|
|
||||||
Name[en_GB]=Setup...
|
|
||||||
Name[eo]=Agordo...
|
|
||||||
Name[es]=Configuración...
|
|
||||||
Name[et]=Seadistamine...
|
|
||||||
Name[eu]=Konfiguratu...
|
|
||||||
Name[fa]=برپایی...
|
|
||||||
Name[fi]=Asetukset…
|
|
||||||
Name[fr]=Configuration...
|
|
||||||
Name[fy]=Opset...
|
|
||||||
Name[ga]=Socrú...
|
|
||||||
Name[gl]=Configuración...
|
|
||||||
Name[he]=הגדרות...
|
|
||||||
Name[hne]=सेटअप...
|
|
||||||
Name[hr]=Postavke …
|
|
||||||
Name[hu]=Beállítás...
|
|
||||||
Name[is]=Stillingar...
|
|
||||||
Name[it]=Impostazioni...
|
|
||||||
Name[ja]=設定...
|
|
||||||
Name[kk]=Баптау...
|
|
||||||
Name[ko]=설정...
|
|
||||||
Name[lt]=Sąranka ...
|
|
||||||
Name[lv]=Iestatījumi...
|
|
||||||
Name[mai]=सेटअप...
|
|
||||||
Name[mk]=Поставување...
|
|
||||||
Name[ml]=ഒരുക്കം...
|
|
||||||
Name[mr]=संयोजना ...
|
|
||||||
Name[ms]=Setkan...
|
|
||||||
Name[nb]=Innstillinger …
|
|
||||||
Name[nds]=Instellen...
|
|
||||||
Name[ne]=सेटअप...
|
|
||||||
Name[nl]=Instellingen...
|
|
||||||
Name[nn]=Oppsett …
|
|
||||||
Name[pa]=ਸੈਟਅੱਪ...
|
|
||||||
Name[pl]=Ustawienia...
|
|
||||||
Name[pt]=Configurar...
|
|
||||||
Name[pt_BR]=Configurar...
|
|
||||||
Name[ro]=Configurare...
|
|
||||||
Name[ru]=Настройка...
|
|
||||||
Name[sk]=Nastavenie...
|
|
||||||
Name[sl]=Nastavi ...
|
|
||||||
Name[sq]=Instalimi...
|
|
||||||
Name[sr]=Подеси...
|
|
||||||
Name[sr@ijekavian]=Подеси...
|
|
||||||
Name[sr@ijekavianlatin]=Podesi...
|
|
||||||
Name[sr@latin]=Podesi...
|
|
||||||
Name[sv]=Inställningar...
|
|
||||||
Name[ta]=அமைப்பு...
|
|
||||||
Name[tg]=Барпосозӣ...
|
|
||||||
Name[th]=ตั้งค่า...
|
|
||||||
Name[tr]=Kurulum...
|
|
||||||
Name[ug]=ئورنات…
|
|
||||||
Name[uk]=Встановити...
|
|
||||||
Name[uz]=Oʻrnatish
|
|
||||||
Name[uz@cyrillic]=Ўрнатиш
|
|
||||||
Name[vi]=Thiết lập...
|
|
||||||
Name[xh]=Iyacwangciswa...
|
|
||||||
Name[x-test]=xxSetup...xx
|
|
||||||
Name[zh_CN]=设置...
|
|
||||||
Name[zh_TW]=設定...
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
|
|
||||||
[Desktop Action InWindow]
|
|
||||||
Exec=kclock.kss -window-id %w
|
|
||||||
Name=Display in Specified Window
|
|
||||||
Name[ast]=Amosar na ventana especificada
|
|
||||||
Name[bg]=Показване в избран прозорец
|
|
||||||
Name[br]=Diskwel er prenestr spisaet
|
|
||||||
Name[bs]=Prikaži u određenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra especificada
|
|
||||||
Name[ca@valencia]=Mostra a la finestra especificada
|
|
||||||
Name[cs]=Zobrazit v určeném okně
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Benodol
|
|
||||||
Name[da]=Visning i angivet vindue
|
|
||||||
Name[de]=In bestimmten Fenster anzeigen
|
|
||||||
Name[el]=Προβολή στο καθορισμένο παράθυρο
|
|
||||||
Name[en_GB]=Display in Specified Window
|
|
||||||
Name[eo]=Montri en indikita fenestro
|
|
||||||
Name[es]=Mostrar en la ventana especificada
|
|
||||||
Name[et]=Määratud aknas näitamine
|
|
||||||
Name[eu]=Bistaratu zehaztutako lehioan
|
|
||||||
Name[fa]=نمایش در پنجره مشخصشده
|
|
||||||
Name[fi]=Näytä määrätyssä ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre spécifiée
|
|
||||||
Name[fy]=Werjefte yn in definiearre finster
|
|
||||||
Name[ga]=Taispeáin san Fhuinneog Sonraithe
|
|
||||||
Name[gl]=Mostrar na xanela indicada
|
|
||||||
Name[he]=הצג בחלון המצוין
|
|
||||||
Name[hne]=निरधारित विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u određenom prozoru
|
|
||||||
Name[hu]=Megjelenítés a megadott ablakban
|
|
||||||
Name[is]=Birta í völdum glugga
|
|
||||||
Name[it]=Mostra nella finestra specificata
|
|
||||||
Name[ja]=指定したウィンドウで表示
|
|
||||||
Name[kk]=Келтірілген терезеде көрсетілсін
|
|
||||||
Name[ko]=지정한 창에 보이기
|
|
||||||
Name[lt]=Rodyti nurodytame lange
|
|
||||||
Name[lv]=Rādīt norādītajā logā
|
|
||||||
Name[mai]=निर्दिष्ट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во наведениот прозорец
|
|
||||||
Name[ml]=പ്രത്യേകം പറഞ്ഞിരിക്കുന്ന ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=निर्देशीत चौकटीत दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Yang Dinyatakan
|
|
||||||
Name[nb]=Vis i angitt vindu
|
|
||||||
Name[nds]=In utsöcht Finster wiesen
|
|
||||||
Name[ne]=निर्दिष्ट सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven In een opgegeven venster
|
|
||||||
Name[nn]=Vis i oppgjeve vindauge
|
|
||||||
Name[pa]=ਦੱਸੇ ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w zadanym oknie
|
|
||||||
Name[pt]=Mostrar na Janela Indicada
|
|
||||||
Name[pt_BR]=Exibir na janela indicada
|
|
||||||
Name[ro]=Afișează în fereastra specificată
|
|
||||||
Name[ru]=Показывать в указанном окне
|
|
||||||
Name[sk]=Zobraziť v zadanom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren e Specifikuar
|
|
||||||
Name[sr]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sv]=Visa i angivet fönster
|
|
||||||
Name[ta]=குறித்த சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи нишондода намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างที่กำหนด
|
|
||||||
Name[tr]=Belirtilen Pencerede Göster
|
|
||||||
Name[ug]=بەلگىلەنگەن كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити у вказаному вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Đã định
|
|
||||||
Name[x-test]=xxDisplay in Specified Windowxx
|
|
||||||
Name[zh_CN]=在指定的窗口中显示
|
|
||||||
Name[zh_TW]=在指定的視窗中顯示
|
|
||||||
NoDisplay=true
|
|
||||||
|
|
||||||
[Desktop Action Root]
|
|
||||||
Exec=kclock.kss -root
|
|
||||||
Name=Display in Root Window
|
|
||||||
Name[ast]=Amosar na ventana raíz
|
|
||||||
Name[bg]=Показване в главния прозорец
|
|
||||||
Name[br]=Diskwel er prenestr gwrizienn
|
|
||||||
Name[bs]=Prikaži u korijenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra arrel
|
|
||||||
Name[ca@valencia]=Mostra a la finestra arrel
|
|
||||||
Name[cs]=Zobrazit na pozadí plochy
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Wraidd
|
|
||||||
Name[da]=Visning i root-vindue
|
|
||||||
Name[de]=In Hintergrundfenster anzeigen
|
|
||||||
Name[el]=Προβολή στο βασικό παράθυρο
|
|
||||||
Name[en_GB]=Display in Root Window
|
|
||||||
Name[eo]=Montri en radika fenestro
|
|
||||||
Name[es]=Mostrar en la ventana raíz
|
|
||||||
Name[et]=Juuraknas näitamine
|
|
||||||
Name[eu]=Bistaratu erro lehioan
|
|
||||||
Name[fa]=نمایش در پنجره ریشه
|
|
||||||
Name[fi]=Näytä juuri-ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre racine
|
|
||||||
Name[fy]=Werjefte yn haadfinster
|
|
||||||
Name[ga]=Taispeáin sa Phríomhfhuinneog
|
|
||||||
Name[gl]=Mostrar na xanela raíz
|
|
||||||
Name[he]=הצג בחלון השורש
|
|
||||||
Name[hne]=रूट विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u ishodišnom prozoru
|
|
||||||
Name[hu]=Megjelenítés a gyökérablakban
|
|
||||||
Name[is]=Birta í rótarglugganum
|
|
||||||
Name[it]=Mostra sullo sfondo
|
|
||||||
Name[ja]=ルートウィンドウで表示
|
|
||||||
Name[kk]=Түбір терезесінде көрсетілсін
|
|
||||||
Name[ko]=전체 화면으로 보이기
|
|
||||||
Name[lt]=Rodyti root lange
|
|
||||||
Name[lv]=Rādīt saknes logā
|
|
||||||
Name[mai]=रूट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во коренскиот прозорец
|
|
||||||
Name[ml]=മൂല ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=रूट चौकट मध्ये दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Root
|
|
||||||
Name[nb]=Vis i root-vindu
|
|
||||||
Name[nds]=In Hööftfinster wiesen
|
|
||||||
Name[ne]=मूल सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven in hoofdvenster
|
|
||||||
Name[nn]=Vis i rotvindauget
|
|
||||||
Name[pa]=Root ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w oknie głównym
|
|
||||||
Name[pt]=Mostrar na Janela de Fundo
|
|
||||||
Name[pt_BR]=Exibir na janela raiz
|
|
||||||
Name[ro]=Afișează în fereastra rădăcină
|
|
||||||
Name[ru]=Показывать в корневом окне
|
|
||||||
Name[sk]=Zobraziť v koreňovom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren Bazë
|
|
||||||
Name[sr]=Прикажи у кореном прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у корјеном прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u korjenom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u korenom prozoru
|
|
||||||
Name[sv]=Visa i rotfönstret
|
|
||||||
Name[ta]=ஆரம்ப சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи решагӣ намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างราก
|
|
||||||
Name[tr]=Kök Pencerede Göster
|
|
||||||
Name[ug]=غول كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити в кореневому вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Gốc
|
|
||||||
Name[x-test]=xxDisplay in Root Windowxx
|
|
||||||
Name[zh_CN]=在根窗口中显示
|
|
||||||
Name[zh_TW]=在根視窗中顯示
|
|
||||||
NoDisplay=true
|
|
|
@ -1,300 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Exec=klines.kss
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
Type=Service
|
|
||||||
X-KDE-ServiceTypes=ScreenSaver
|
|
||||||
Actions=Setup;InWindow;Root;
|
|
||||||
X-KDE-Category=Flying Things
|
|
||||||
Name=Lines
|
|
||||||
Name[af]=Lyne
|
|
||||||
Name[ast]=Llinies
|
|
||||||
Name[bg]=Линии
|
|
||||||
Name[br]=Linennoù
|
|
||||||
Name[bs]=Linije
|
|
||||||
Name[ca]=Línies
|
|
||||||
Name[ca@valencia]=Línies
|
|
||||||
Name[cs]=Linie
|
|
||||||
Name[cy]=Llinellau
|
|
||||||
Name[da]=Linjer
|
|
||||||
Name[de]=Linien
|
|
||||||
Name[el]=Γραμμές
|
|
||||||
Name[en_GB]=Lines
|
|
||||||
Name[eo]=Linioj
|
|
||||||
Name[es]=Líneas
|
|
||||||
Name[et]=Jooned
|
|
||||||
Name[eu]=Lerroak
|
|
||||||
Name[fa]=خطوط
|
|
||||||
Name[fi]=Viivat
|
|
||||||
Name[fr]=Lignes
|
|
||||||
Name[fy]=Linen
|
|
||||||
Name[ga]=Línte
|
|
||||||
Name[gl]=Liñas
|
|
||||||
Name[he]=קווים
|
|
||||||
Name[hne]=पंक्तियाँ
|
|
||||||
Name[hu]=Vonalak
|
|
||||||
Name[is]=Línur
|
|
||||||
Name[it]=Linee
|
|
||||||
Name[ja]=線
|
|
||||||
Name[kk]=Сызықтар
|
|
||||||
Name[ko]=직선
|
|
||||||
Name[lt]=Linijos
|
|
||||||
Name[lv]=Līnijas
|
|
||||||
Name[mai]=रेखासभ
|
|
||||||
Name[mk]=Прави
|
|
||||||
Name[ml]=ലൈന്സ്
|
|
||||||
Name[mr]=ओळी
|
|
||||||
Name[ms]=Baris
|
|
||||||
Name[nb]=Linjer
|
|
||||||
Name[nds]=Lienen
|
|
||||||
Name[ne]=रेखा
|
|
||||||
Name[nl]=Lijnen
|
|
||||||
Name[nn]=Linjer
|
|
||||||
Name[oc]=Linhas
|
|
||||||
Name[pa]=ਲਾਇਨਾਂ
|
|
||||||
Name[pl]=Linie
|
|
||||||
Name[pt]=Linhas
|
|
||||||
Name[pt_BR]=Linhas
|
|
||||||
Name[ro]=Linii
|
|
||||||
Name[ru]=Линии
|
|
||||||
Name[sk]=Čiary
|
|
||||||
Name[sl]=Črte
|
|
||||||
Name[sq]=Vijat
|
|
||||||
Name[sr]=Линије
|
|
||||||
Name[sr@ijekavian]=Линије
|
|
||||||
Name[sr@ijekavianlatin]=Linije
|
|
||||||
Name[sr@latin]=Linije
|
|
||||||
Name[sv]=Linjer
|
|
||||||
Name[ta]=கம்பிகள்
|
|
||||||
Name[tg]=Рахҳо
|
|
||||||
Name[th]=เส้นตรง
|
|
||||||
Name[tr]=Çizgiler
|
|
||||||
Name[ug]=سىزىقلار
|
|
||||||
Name[uk]=Лінії
|
|
||||||
Name[uz]=Chiziqlar
|
|
||||||
Name[uz@cyrillic]=Чизиқлар
|
|
||||||
Name[vi]=Dòng kẻ
|
|
||||||
Name[xh]=Iilayini
|
|
||||||
Name[x-test]=xxLinesxx
|
|
||||||
Name[zh_CN]=线条
|
|
||||||
Name[zh_TW]=線條
|
|
||||||
|
|
||||||
[Desktop Action Setup]
|
|
||||||
Exec=klines.kss -setup
|
|
||||||
Name=Setup...
|
|
||||||
Name[af]=Opstelling...
|
|
||||||
Name[ast]=Configuración...
|
|
||||||
Name[bg]=Настройки...
|
|
||||||
Name[br]=Kefluniadur ...
|
|
||||||
Name[bs]=Podesi...
|
|
||||||
Name[ca]=Arranjament...
|
|
||||||
Name[ca@valencia]=Arranjament...
|
|
||||||
Name[cs]=Nastavení...
|
|
||||||
Name[cy]=Gosod ...
|
|
||||||
Name[da]=Opsætning...
|
|
||||||
Name[de]=Einrichtung ...
|
|
||||||
Name[el]=Ρύθμιση...
|
|
||||||
Name[en_GB]=Setup...
|
|
||||||
Name[eo]=Agordo...
|
|
||||||
Name[es]=Configuración...
|
|
||||||
Name[et]=Seadistamine...
|
|
||||||
Name[eu]=Konfiguratu...
|
|
||||||
Name[fa]=برپایی...
|
|
||||||
Name[fi]=Asetukset…
|
|
||||||
Name[fr]=Configuration...
|
|
||||||
Name[fy]=Opset...
|
|
||||||
Name[ga]=Socrú...
|
|
||||||
Name[gl]=Configuración...
|
|
||||||
Name[he]=הגדרות...
|
|
||||||
Name[hne]=सेटअप...
|
|
||||||
Name[hr]=Postavke …
|
|
||||||
Name[hu]=Beállítás...
|
|
||||||
Name[is]=Stillingar...
|
|
||||||
Name[it]=Impostazioni...
|
|
||||||
Name[ja]=設定...
|
|
||||||
Name[kk]=Баптау...
|
|
||||||
Name[ko]=설정...
|
|
||||||
Name[lt]=Sąranka ...
|
|
||||||
Name[lv]=Iestatījumi...
|
|
||||||
Name[mai]=सेटअप...
|
|
||||||
Name[mk]=Поставување...
|
|
||||||
Name[ml]=ഒരുക്കം...
|
|
||||||
Name[mr]=संयोजना ...
|
|
||||||
Name[ms]=Setkan...
|
|
||||||
Name[nb]=Innstillinger …
|
|
||||||
Name[nds]=Instellen...
|
|
||||||
Name[ne]=सेटअप...
|
|
||||||
Name[nl]=Instellingen...
|
|
||||||
Name[nn]=Oppsett …
|
|
||||||
Name[pa]=ਸੈਟਅੱਪ...
|
|
||||||
Name[pl]=Ustawienia...
|
|
||||||
Name[pt]=Configurar...
|
|
||||||
Name[pt_BR]=Configurar...
|
|
||||||
Name[ro]=Configurare...
|
|
||||||
Name[ru]=Настройка...
|
|
||||||
Name[sk]=Nastavenie...
|
|
||||||
Name[sl]=Nastavi ...
|
|
||||||
Name[sq]=Instalimi...
|
|
||||||
Name[sr]=Подеси...
|
|
||||||
Name[sr@ijekavian]=Подеси...
|
|
||||||
Name[sr@ijekavianlatin]=Podesi...
|
|
||||||
Name[sr@latin]=Podesi...
|
|
||||||
Name[sv]=Inställningar...
|
|
||||||
Name[ta]=அமைப்பு...
|
|
||||||
Name[tg]=Барпосозӣ...
|
|
||||||
Name[th]=ตั้งค่า...
|
|
||||||
Name[tr]=Kurulum...
|
|
||||||
Name[ug]=ئورنات…
|
|
||||||
Name[uk]=Встановити...
|
|
||||||
Name[uz]=Oʻrnatish
|
|
||||||
Name[uz@cyrillic]=Ўрнатиш
|
|
||||||
Name[vi]=Thiết lập...
|
|
||||||
Name[xh]=Iyacwangciswa...
|
|
||||||
Name[x-test]=xxSetup...xx
|
|
||||||
Name[zh_CN]=设置...
|
|
||||||
Name[zh_TW]=設定...
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
|
|
||||||
[Desktop Action InWindow]
|
|
||||||
Exec=klines.kss -window-id %w
|
|
||||||
Name=Display in Specified Window
|
|
||||||
Name[ast]=Amosar na ventana especificada
|
|
||||||
Name[bg]=Показване в избран прозорец
|
|
||||||
Name[br]=Diskwel er prenestr spisaet
|
|
||||||
Name[bs]=Prikaži u određenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra especificada
|
|
||||||
Name[ca@valencia]=Mostra a la finestra especificada
|
|
||||||
Name[cs]=Zobrazit v určeném okně
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Benodol
|
|
||||||
Name[da]=Visning i angivet vindue
|
|
||||||
Name[de]=In bestimmten Fenster anzeigen
|
|
||||||
Name[el]=Προβολή στο καθορισμένο παράθυρο
|
|
||||||
Name[en_GB]=Display in Specified Window
|
|
||||||
Name[eo]=Montri en indikita fenestro
|
|
||||||
Name[es]=Mostrar en la ventana especificada
|
|
||||||
Name[et]=Määratud aknas näitamine
|
|
||||||
Name[eu]=Bistaratu zehaztutako lehioan
|
|
||||||
Name[fa]=نمایش در پنجره مشخصشده
|
|
||||||
Name[fi]=Näytä määrätyssä ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre spécifiée
|
|
||||||
Name[fy]=Werjefte yn in definiearre finster
|
|
||||||
Name[ga]=Taispeáin san Fhuinneog Sonraithe
|
|
||||||
Name[gl]=Mostrar na xanela indicada
|
|
||||||
Name[he]=הצג בחלון המצוין
|
|
||||||
Name[hne]=निरधारित विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u određenom prozoru
|
|
||||||
Name[hu]=Megjelenítés a megadott ablakban
|
|
||||||
Name[is]=Birta í völdum glugga
|
|
||||||
Name[it]=Mostra nella finestra specificata
|
|
||||||
Name[ja]=指定したウィンドウで表示
|
|
||||||
Name[kk]=Келтірілген терезеде көрсетілсін
|
|
||||||
Name[ko]=지정한 창에 보이기
|
|
||||||
Name[lt]=Rodyti nurodytame lange
|
|
||||||
Name[lv]=Rādīt norādītajā logā
|
|
||||||
Name[mai]=निर्दिष्ट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во наведениот прозорец
|
|
||||||
Name[ml]=പ്രത്യേകം പറഞ്ഞിരിക്കുന്ന ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=निर्देशीत चौकटीत दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Yang Dinyatakan
|
|
||||||
Name[nb]=Vis i angitt vindu
|
|
||||||
Name[nds]=In utsöcht Finster wiesen
|
|
||||||
Name[ne]=निर्दिष्ट सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven In een opgegeven venster
|
|
||||||
Name[nn]=Vis i oppgjeve vindauge
|
|
||||||
Name[pa]=ਦੱਸੇ ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w zadanym oknie
|
|
||||||
Name[pt]=Mostrar na Janela Indicada
|
|
||||||
Name[pt_BR]=Exibir na janela indicada
|
|
||||||
Name[ro]=Afișează în fereastra specificată
|
|
||||||
Name[ru]=Показывать в указанном окне
|
|
||||||
Name[sk]=Zobraziť v zadanom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren e Specifikuar
|
|
||||||
Name[sr]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sv]=Visa i angivet fönster
|
|
||||||
Name[ta]=குறித்த சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи нишондода намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างที่กำหนด
|
|
||||||
Name[tr]=Belirtilen Pencerede Göster
|
|
||||||
Name[ug]=بەلگىلەنگەن كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити у вказаному вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Đã định
|
|
||||||
Name[x-test]=xxDisplay in Specified Windowxx
|
|
||||||
Name[zh_CN]=在指定的窗口中显示
|
|
||||||
Name[zh_TW]=在指定的視窗中顯示
|
|
||||||
NoDisplay=true
|
|
||||||
|
|
||||||
[Desktop Action Root]
|
|
||||||
Exec=klines.kss -root
|
|
||||||
Name=Display in Root Window
|
|
||||||
Name[ast]=Amosar na ventana raíz
|
|
||||||
Name[bg]=Показване в главния прозорец
|
|
||||||
Name[br]=Diskwel er prenestr gwrizienn
|
|
||||||
Name[bs]=Prikaži u korijenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra arrel
|
|
||||||
Name[ca@valencia]=Mostra a la finestra arrel
|
|
||||||
Name[cs]=Zobrazit na pozadí plochy
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Wraidd
|
|
||||||
Name[da]=Visning i root-vindue
|
|
||||||
Name[de]=In Hintergrundfenster anzeigen
|
|
||||||
Name[el]=Προβολή στο βασικό παράθυρο
|
|
||||||
Name[en_GB]=Display in Root Window
|
|
||||||
Name[eo]=Montri en radika fenestro
|
|
||||||
Name[es]=Mostrar en la ventana raíz
|
|
||||||
Name[et]=Juuraknas näitamine
|
|
||||||
Name[eu]=Bistaratu erro lehioan
|
|
||||||
Name[fa]=نمایش در پنجره ریشه
|
|
||||||
Name[fi]=Näytä juuri-ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre racine
|
|
||||||
Name[fy]=Werjefte yn haadfinster
|
|
||||||
Name[ga]=Taispeáin sa Phríomhfhuinneog
|
|
||||||
Name[gl]=Mostrar na xanela raíz
|
|
||||||
Name[he]=הצג בחלון השורש
|
|
||||||
Name[hne]=रूट विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u ishodišnom prozoru
|
|
||||||
Name[hu]=Megjelenítés a gyökérablakban
|
|
||||||
Name[is]=Birta í rótarglugganum
|
|
||||||
Name[it]=Mostra sullo sfondo
|
|
||||||
Name[ja]=ルートウィンドウで表示
|
|
||||||
Name[kk]=Түбір терезесінде көрсетілсін
|
|
||||||
Name[ko]=전체 화면으로 보이기
|
|
||||||
Name[lt]=Rodyti root lange
|
|
||||||
Name[lv]=Rādīt saknes logā
|
|
||||||
Name[mai]=रूट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во коренскиот прозорец
|
|
||||||
Name[ml]=മൂല ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=रूट चौकट मध्ये दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Root
|
|
||||||
Name[nb]=Vis i root-vindu
|
|
||||||
Name[nds]=In Hööftfinster wiesen
|
|
||||||
Name[ne]=मूल सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven in hoofdvenster
|
|
||||||
Name[nn]=Vis i rotvindauget
|
|
||||||
Name[pa]=Root ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w oknie głównym
|
|
||||||
Name[pt]=Mostrar na Janela de Fundo
|
|
||||||
Name[pt_BR]=Exibir na janela raiz
|
|
||||||
Name[ro]=Afișează în fereastra rădăcină
|
|
||||||
Name[ru]=Показывать в корневом окне
|
|
||||||
Name[sk]=Zobraziť v koreňovom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren Bazë
|
|
||||||
Name[sr]=Прикажи у кореном прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у корјеном прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u korjenom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u korenom prozoru
|
|
||||||
Name[sv]=Visa i rotfönstret
|
|
||||||
Name[ta]=ஆரம்ப சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи решагӣ намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างราก
|
|
||||||
Name[tr]=Kök Pencerede Göster
|
|
||||||
Name[ug]=غول كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити в кореневому вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Gốc
|
|
||||||
Name[x-test]=xxDisplay in Root Windowxx
|
|
||||||
Name[zh_CN]=在根窗口中显示
|
|
||||||
Name[zh_TW]=在根視窗中顯示
|
|
||||||
NoDisplay=true
|
|
||||||
X-DBUS-StartupType=Multi
|
|
|
@ -1,292 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Exec=klorenz.kss
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
Type=Service
|
|
||||||
X-KDE-ServiceTypes=ScreenSaver
|
|
||||||
Actions=Setup;InWindow;Root;
|
|
||||||
X-KDE-Category=Gadgets & Simulations
|
|
||||||
Name=Lorenz Attractor
|
|
||||||
Name[af]=Lorenz Aantrekker
|
|
||||||
Name[ast]=Atractor de Lorenz
|
|
||||||
Name[bg]=Лоренцо
|
|
||||||
Name[br]=Dedenner Lorenz
|
|
||||||
Name[bs]=Lorenz Atraktor
|
|
||||||
Name[ca]=Lorenz Attractor
|
|
||||||
Name[ca@valencia]=Lorenz Attractor
|
|
||||||
Name[cs]=Lorenzův atraktor
|
|
||||||
Name[cy]=Attynydd Lorenz
|
|
||||||
Name[da]=Lorenz-attraktor
|
|
||||||
Name[de]=Lorenz-Attraktor
|
|
||||||
Name[el]=Ελκυστής Lorenz
|
|
||||||
Name[en_GB]=Lorenz Attractor
|
|
||||||
Name[eo]=Lorenza atraktoro
|
|
||||||
Name[es]=Atractor de Lorenz
|
|
||||||
Name[et]=Lorenzi atraktor
|
|
||||||
Name[eu]=Lorenz erakarlea
|
|
||||||
Name[fa]=رباینده Lorenz
|
|
||||||
Name[fi]=Lorentz attraktori
|
|
||||||
Name[fr]=Attracteur de Lorentz
|
|
||||||
Name[fy]=Lorenz Oanlûker
|
|
||||||
Name[ga]=Aomthóir Lorenz
|
|
||||||
Name[gl]=Atractor de Lorenz
|
|
||||||
Name[he]=מושך לורנץ
|
|
||||||
Name[hne]=आठ एकम आठ
|
|
||||||
Name[hu]=Lorenz-féle képernyővédő
|
|
||||||
Name[is]=Lorenz aðdráttur
|
|
||||||
Name[it]=Attrattore di Lorenz
|
|
||||||
Name[ja]=ローレンツアトラクタ
|
|
||||||
Name[kk]=Лоренц аттракторы
|
|
||||||
Name[ko]=로렌츠 끌개
|
|
||||||
Name[lt]=Lorenz Attractor
|
|
||||||
Name[lv]=Lorensa atraktors
|
|
||||||
Name[mk]=Лоренцов атрактор
|
|
||||||
Name[ml]=ലോറെന്സ് അറ്റ്രാക്ടര്
|
|
||||||
Name[ms]=Lorenz Attractor
|
|
||||||
Name[nb]=Lorenz-attraktor
|
|
||||||
Name[nds]=Lorenz-Antrecker
|
|
||||||
Name[ne]=लोरेन्ज आकर्षक
|
|
||||||
Name[nl]=Lorenz Attractor
|
|
||||||
Name[nn]=Lorenz-tiltrekking
|
|
||||||
Name[pl]=Atraktor Lorenza
|
|
||||||
Name[pt]=Força de Lorenz
|
|
||||||
Name[pt_BR]=Atração Lorenz
|
|
||||||
Name[ro]=Atracție Lorenz
|
|
||||||
Name[ru]=Странный аттрактор Лоренца
|
|
||||||
Name[sk]=Lorenz Attractor
|
|
||||||
Name[sl]=Lorenzov atraktor
|
|
||||||
Name[sq]=Lorenz Attractor
|
|
||||||
Name[sr]=К‑лоренц
|
|
||||||
Name[sr@ijekavian]=К‑лоренц
|
|
||||||
Name[sr@ijekavianlatin]=K‑lorenc
|
|
||||||
Name[sr@latin]=K‑lorenc
|
|
||||||
Name[sv]=Lorenz attraktor
|
|
||||||
Name[ta]=லோரன்ஸ் கவர்பவர்
|
|
||||||
Name[tg]=Аттракти аҷоиби Лоренс
|
|
||||||
Name[th]=สิ่งที่น่าดึงดูดของลอเรนซ์
|
|
||||||
Name[tr]=Cazibe
|
|
||||||
Name[uk]=Атрактор Лоренца
|
|
||||||
Name[vi]=Điểm hút Lorenz
|
|
||||||
Name[xh]=Umtsali we Lorenz
|
|
||||||
Name[x-test]=xxLorenz Attractorxx
|
|
||||||
Name[zh_CN]=洛仑兹吸引子
|
|
||||||
Name[zh_TW]=Lorenz 吸引者
|
|
||||||
|
|
||||||
[Desktop Action Setup]
|
|
||||||
Exec=klorenz.kss -setup
|
|
||||||
Name=Setup...
|
|
||||||
Name[af]=Opstelling...
|
|
||||||
Name[ast]=Configuración...
|
|
||||||
Name[bg]=Настройки...
|
|
||||||
Name[br]=Kefluniadur ...
|
|
||||||
Name[bs]=Podesi...
|
|
||||||
Name[ca]=Arranjament...
|
|
||||||
Name[ca@valencia]=Arranjament...
|
|
||||||
Name[cs]=Nastavení...
|
|
||||||
Name[cy]=Gosod ...
|
|
||||||
Name[da]=Opsætning...
|
|
||||||
Name[de]=Einrichtung ...
|
|
||||||
Name[el]=Ρύθμιση...
|
|
||||||
Name[en_GB]=Setup...
|
|
||||||
Name[eo]=Agordo...
|
|
||||||
Name[es]=Configuración...
|
|
||||||
Name[et]=Seadistamine...
|
|
||||||
Name[eu]=Konfiguratu...
|
|
||||||
Name[fa]=برپایی...
|
|
||||||
Name[fi]=Asetukset…
|
|
||||||
Name[fr]=Configuration...
|
|
||||||
Name[fy]=Opset...
|
|
||||||
Name[ga]=Socrú...
|
|
||||||
Name[gl]=Configuración...
|
|
||||||
Name[he]=הגדרות...
|
|
||||||
Name[hne]=सेटअप...
|
|
||||||
Name[hr]=Postavke …
|
|
||||||
Name[hu]=Beállítás...
|
|
||||||
Name[is]=Stillingar...
|
|
||||||
Name[it]=Impostazioni...
|
|
||||||
Name[ja]=設定...
|
|
||||||
Name[kk]=Баптау...
|
|
||||||
Name[ko]=설정...
|
|
||||||
Name[lt]=Sąranka ...
|
|
||||||
Name[lv]=Iestatījumi...
|
|
||||||
Name[mai]=सेटअप...
|
|
||||||
Name[mk]=Поставување...
|
|
||||||
Name[ml]=ഒരുക്കം...
|
|
||||||
Name[mr]=संयोजना ...
|
|
||||||
Name[ms]=Setkan...
|
|
||||||
Name[nb]=Innstillinger …
|
|
||||||
Name[nds]=Instellen...
|
|
||||||
Name[ne]=सेटअप...
|
|
||||||
Name[nl]=Instellingen...
|
|
||||||
Name[nn]=Oppsett …
|
|
||||||
Name[pa]=ਸੈਟਅੱਪ...
|
|
||||||
Name[pl]=Ustawienia...
|
|
||||||
Name[pt]=Configurar...
|
|
||||||
Name[pt_BR]=Configurar...
|
|
||||||
Name[ro]=Configurare...
|
|
||||||
Name[ru]=Настройка...
|
|
||||||
Name[sk]=Nastavenie...
|
|
||||||
Name[sl]=Nastavi ...
|
|
||||||
Name[sq]=Instalimi...
|
|
||||||
Name[sr]=Подеси...
|
|
||||||
Name[sr@ijekavian]=Подеси...
|
|
||||||
Name[sr@ijekavianlatin]=Podesi...
|
|
||||||
Name[sr@latin]=Podesi...
|
|
||||||
Name[sv]=Inställningar...
|
|
||||||
Name[ta]=அமைப்பு...
|
|
||||||
Name[tg]=Барпосозӣ...
|
|
||||||
Name[th]=ตั้งค่า...
|
|
||||||
Name[tr]=Kurulum...
|
|
||||||
Name[ug]=ئورنات…
|
|
||||||
Name[uk]=Встановити...
|
|
||||||
Name[uz]=Oʻrnatish
|
|
||||||
Name[uz@cyrillic]=Ўрнатиш
|
|
||||||
Name[vi]=Thiết lập...
|
|
||||||
Name[xh]=Iyacwangciswa...
|
|
||||||
Name[x-test]=xxSetup...xx
|
|
||||||
Name[zh_CN]=设置...
|
|
||||||
Name[zh_TW]=設定...
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
|
|
||||||
[Desktop Action InWindow]
|
|
||||||
Exec=klorenz.kss -window-id %w
|
|
||||||
Name=Display in Specified Window
|
|
||||||
Name[ast]=Amosar na ventana especificada
|
|
||||||
Name[bg]=Показване в избран прозорец
|
|
||||||
Name[br]=Diskwel er prenestr spisaet
|
|
||||||
Name[bs]=Prikaži u određenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra especificada
|
|
||||||
Name[ca@valencia]=Mostra a la finestra especificada
|
|
||||||
Name[cs]=Zobrazit v určeném okně
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Benodol
|
|
||||||
Name[da]=Visning i angivet vindue
|
|
||||||
Name[de]=In bestimmten Fenster anzeigen
|
|
||||||
Name[el]=Προβολή στο καθορισμένο παράθυρο
|
|
||||||
Name[en_GB]=Display in Specified Window
|
|
||||||
Name[eo]=Montri en indikita fenestro
|
|
||||||
Name[es]=Mostrar en la ventana especificada
|
|
||||||
Name[et]=Määratud aknas näitamine
|
|
||||||
Name[eu]=Bistaratu zehaztutako lehioan
|
|
||||||
Name[fa]=نمایش در پنجره مشخصشده
|
|
||||||
Name[fi]=Näytä määrätyssä ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre spécifiée
|
|
||||||
Name[fy]=Werjefte yn in definiearre finster
|
|
||||||
Name[ga]=Taispeáin san Fhuinneog Sonraithe
|
|
||||||
Name[gl]=Mostrar na xanela indicada
|
|
||||||
Name[he]=הצג בחלון המצוין
|
|
||||||
Name[hne]=निरधारित विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u određenom prozoru
|
|
||||||
Name[hu]=Megjelenítés a megadott ablakban
|
|
||||||
Name[is]=Birta í völdum glugga
|
|
||||||
Name[it]=Mostra nella finestra specificata
|
|
||||||
Name[ja]=指定したウィンドウで表示
|
|
||||||
Name[kk]=Келтірілген терезеде көрсетілсін
|
|
||||||
Name[ko]=지정한 창에 보이기
|
|
||||||
Name[lt]=Rodyti nurodytame lange
|
|
||||||
Name[lv]=Rādīt norādītajā logā
|
|
||||||
Name[mai]=निर्दिष्ट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во наведениот прозорец
|
|
||||||
Name[ml]=പ്രത്യേകം പറഞ്ഞിരിക്കുന്ന ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=निर्देशीत चौकटीत दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Yang Dinyatakan
|
|
||||||
Name[nb]=Vis i angitt vindu
|
|
||||||
Name[nds]=In utsöcht Finster wiesen
|
|
||||||
Name[ne]=निर्दिष्ट सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven In een opgegeven venster
|
|
||||||
Name[nn]=Vis i oppgjeve vindauge
|
|
||||||
Name[pa]=ਦੱਸੇ ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w zadanym oknie
|
|
||||||
Name[pt]=Mostrar na Janela Indicada
|
|
||||||
Name[pt_BR]=Exibir na janela indicada
|
|
||||||
Name[ro]=Afișează în fereastra specificată
|
|
||||||
Name[ru]=Показывать в указанном окне
|
|
||||||
Name[sk]=Zobraziť v zadanom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren e Specifikuar
|
|
||||||
Name[sr]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sv]=Visa i angivet fönster
|
|
||||||
Name[ta]=குறித்த சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи нишондода намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างที่กำหนด
|
|
||||||
Name[tr]=Belirtilen Pencerede Göster
|
|
||||||
Name[ug]=بەلگىلەنگەن كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити у вказаному вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Đã định
|
|
||||||
Name[x-test]=xxDisplay in Specified Windowxx
|
|
||||||
Name[zh_CN]=在指定的窗口中显示
|
|
||||||
Name[zh_TW]=在指定的視窗中顯示
|
|
||||||
NoDisplay=true
|
|
||||||
|
|
||||||
[Desktop Action Root]
|
|
||||||
Exec=klorenz.kss -root
|
|
||||||
Name=Display in Root Window
|
|
||||||
Name[ast]=Amosar na ventana raíz
|
|
||||||
Name[bg]=Показване в главния прозорец
|
|
||||||
Name[br]=Diskwel er prenestr gwrizienn
|
|
||||||
Name[bs]=Prikaži u korijenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra arrel
|
|
||||||
Name[ca@valencia]=Mostra a la finestra arrel
|
|
||||||
Name[cs]=Zobrazit na pozadí plochy
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Wraidd
|
|
||||||
Name[da]=Visning i root-vindue
|
|
||||||
Name[de]=In Hintergrundfenster anzeigen
|
|
||||||
Name[el]=Προβολή στο βασικό παράθυρο
|
|
||||||
Name[en_GB]=Display in Root Window
|
|
||||||
Name[eo]=Montri en radika fenestro
|
|
||||||
Name[es]=Mostrar en la ventana raíz
|
|
||||||
Name[et]=Juuraknas näitamine
|
|
||||||
Name[eu]=Bistaratu erro lehioan
|
|
||||||
Name[fa]=نمایش در پنجره ریشه
|
|
||||||
Name[fi]=Näytä juuri-ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre racine
|
|
||||||
Name[fy]=Werjefte yn haadfinster
|
|
||||||
Name[ga]=Taispeáin sa Phríomhfhuinneog
|
|
||||||
Name[gl]=Mostrar na xanela raíz
|
|
||||||
Name[he]=הצג בחלון השורש
|
|
||||||
Name[hne]=रूट विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u ishodišnom prozoru
|
|
||||||
Name[hu]=Megjelenítés a gyökérablakban
|
|
||||||
Name[is]=Birta í rótarglugganum
|
|
||||||
Name[it]=Mostra sullo sfondo
|
|
||||||
Name[ja]=ルートウィンドウで表示
|
|
||||||
Name[kk]=Түбір терезесінде көрсетілсін
|
|
||||||
Name[ko]=전체 화면으로 보이기
|
|
||||||
Name[lt]=Rodyti root lange
|
|
||||||
Name[lv]=Rādīt saknes logā
|
|
||||||
Name[mai]=रूट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во коренскиот прозорец
|
|
||||||
Name[ml]=മൂല ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=रूट चौकट मध्ये दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Root
|
|
||||||
Name[nb]=Vis i root-vindu
|
|
||||||
Name[nds]=In Hööftfinster wiesen
|
|
||||||
Name[ne]=मूल सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven in hoofdvenster
|
|
||||||
Name[nn]=Vis i rotvindauget
|
|
||||||
Name[pa]=Root ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w oknie głównym
|
|
||||||
Name[pt]=Mostrar na Janela de Fundo
|
|
||||||
Name[pt_BR]=Exibir na janela raiz
|
|
||||||
Name[ro]=Afișează în fereastra rădăcină
|
|
||||||
Name[ru]=Показывать в корневом окне
|
|
||||||
Name[sk]=Zobraziť v koreňovom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren Bazë
|
|
||||||
Name[sr]=Прикажи у кореном прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у корјеном прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u korjenom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u korenom prozoru
|
|
||||||
Name[sv]=Visa i rotfönstret
|
|
||||||
Name[ta]=ஆரம்ப சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи решагӣ намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างราก
|
|
||||||
Name[tr]=Kök Pencerede Göster
|
|
||||||
Name[ug]=غول كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити в кореневому вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Gốc
|
|
||||||
Name[x-test]=xxDisplay in Root Windowxx
|
|
||||||
Name[zh_CN]=在根窗口中显示
|
|
||||||
Name[zh_TW]=在根視窗中顯示
|
|
||||||
NoDisplay=true
|
|
|
@ -1,297 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Exec=kpolygon.kss
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
Type=Service
|
|
||||||
X-KDE-ServiceTypes=ScreenSaver
|
|
||||||
Actions=Setup;InWindow;Root;
|
|
||||||
X-KDE-Category=Rapid Motion
|
|
||||||
Name=Polygons
|
|
||||||
Name[af]=Poligone
|
|
||||||
Name[ast]=Polígonos
|
|
||||||
Name[bg]=Полигон
|
|
||||||
Name[br]=Lieskognegoù
|
|
||||||
Name[bs]=Poligoni
|
|
||||||
Name[ca]=Polígons
|
|
||||||
Name[ca@valencia]=Polígons
|
|
||||||
Name[cs]=Polygony
|
|
||||||
Name[cy]=Polygonau
|
|
||||||
Name[da]=Polygoner
|
|
||||||
Name[de]=Polygon
|
|
||||||
Name[el]=Polygons
|
|
||||||
Name[en_GB]=Polygons
|
|
||||||
Name[eo]=Poligonoj
|
|
||||||
Name[es]=Polígonos
|
|
||||||
Name[et]=Polügoonid
|
|
||||||
Name[eu]=Poligonoak
|
|
||||||
Name[fa]=چند ضلعیها
|
|
||||||
Name[fi]=Polygonit
|
|
||||||
Name[fr]=Polygones
|
|
||||||
Name[fy]=Polygoanen
|
|
||||||
Name[ga]=Polagáin
|
|
||||||
Name[gl]=Polígonos
|
|
||||||
Name[he]=מצולעים
|
|
||||||
Name[hne]=बहुभुज
|
|
||||||
Name[hu]=Poligonok
|
|
||||||
Name[is]=Marghyrningar
|
|
||||||
Name[it]=Poligoni
|
|
||||||
Name[ja]=ポリゴン
|
|
||||||
Name[kk]=Көпбұрыштар
|
|
||||||
Name[ko]=다각형
|
|
||||||
Name[lt]=Daugiakampiai
|
|
||||||
Name[lv]=Daudzstūri
|
|
||||||
Name[mai]=बहुभुज क्षेत्र
|
|
||||||
Name[mk]=Полигони
|
|
||||||
Name[ml]=പോളിഗണ്സ്
|
|
||||||
Name[ms]=Poligon
|
|
||||||
Name[nb]=Polygoner
|
|
||||||
Name[nds]=Veelecken
|
|
||||||
Name[ne]=बहुँभुज
|
|
||||||
Name[nl]=Polygonen
|
|
||||||
Name[nn]=Polygon
|
|
||||||
Name[pa]=ਬਹੁਭੁਜਾਂ
|
|
||||||
Name[pl]=Wielokąty
|
|
||||||
Name[pt]=Polígonos
|
|
||||||
Name[pt_BR]=Polígonos
|
|
||||||
Name[ro]=Poligoane
|
|
||||||
Name[ru]=Многоугольники
|
|
||||||
Name[sk]=Polygóny
|
|
||||||
Name[sl]=Mnogokotniki
|
|
||||||
Name[sq]=Poligonë
|
|
||||||
Name[sr]=Полигони
|
|
||||||
Name[sr@ijekavian]=Полигони
|
|
||||||
Name[sr@ijekavianlatin]=Poligoni
|
|
||||||
Name[sr@latin]=Poligoni
|
|
||||||
Name[sv]=Polygoner
|
|
||||||
Name[ta]=பலகோணவடிவங்கள்
|
|
||||||
Name[tg]=Бисёркунҷа
|
|
||||||
Name[th]=หลายเหลี่ยม
|
|
||||||
Name[tr]=Poligonlar
|
|
||||||
Name[ug]=كۆپ تەرەپلىك
|
|
||||||
Name[uk]=Багатокутники
|
|
||||||
Name[uz]=Koʻpburchaklar
|
|
||||||
Name[uz@cyrillic]=Кўпбурчаклар
|
|
||||||
Name[vi]=Đa giác
|
|
||||||
Name[xh]=Iziqu ezinekona namacala amaninzi
|
|
||||||
Name[x-test]=xxPolygonsxx
|
|
||||||
Name[zh_CN]=多边形
|
|
||||||
Name[zh_TW]=多邊形
|
|
||||||
|
|
||||||
[Desktop Action Setup]
|
|
||||||
Exec=kpolygon.kss -setup
|
|
||||||
Name=Setup...
|
|
||||||
Name[af]=Opstelling...
|
|
||||||
Name[ast]=Configuración...
|
|
||||||
Name[bg]=Настройки...
|
|
||||||
Name[br]=Kefluniadur ...
|
|
||||||
Name[bs]=Podesi...
|
|
||||||
Name[ca]=Arranjament...
|
|
||||||
Name[ca@valencia]=Arranjament...
|
|
||||||
Name[cs]=Nastavení...
|
|
||||||
Name[cy]=Gosod ...
|
|
||||||
Name[da]=Opsætning...
|
|
||||||
Name[de]=Einrichtung ...
|
|
||||||
Name[el]=Ρύθμιση...
|
|
||||||
Name[en_GB]=Setup...
|
|
||||||
Name[eo]=Agordo...
|
|
||||||
Name[es]=Configuración...
|
|
||||||
Name[et]=Seadistamine...
|
|
||||||
Name[eu]=Konfiguratu...
|
|
||||||
Name[fa]=برپایی...
|
|
||||||
Name[fi]=Asetukset…
|
|
||||||
Name[fr]=Configuration...
|
|
||||||
Name[fy]=Opset...
|
|
||||||
Name[ga]=Socrú...
|
|
||||||
Name[gl]=Configuración...
|
|
||||||
Name[he]=הגדרות...
|
|
||||||
Name[hne]=सेटअप...
|
|
||||||
Name[hr]=Postavke …
|
|
||||||
Name[hu]=Beállítás...
|
|
||||||
Name[is]=Stillingar...
|
|
||||||
Name[it]=Impostazioni...
|
|
||||||
Name[ja]=設定...
|
|
||||||
Name[kk]=Баптау...
|
|
||||||
Name[ko]=설정...
|
|
||||||
Name[lt]=Sąranka ...
|
|
||||||
Name[lv]=Iestatījumi...
|
|
||||||
Name[mai]=सेटअप...
|
|
||||||
Name[mk]=Поставување...
|
|
||||||
Name[ml]=ഒരുക്കം...
|
|
||||||
Name[mr]=संयोजना ...
|
|
||||||
Name[ms]=Setkan...
|
|
||||||
Name[nb]=Innstillinger …
|
|
||||||
Name[nds]=Instellen...
|
|
||||||
Name[ne]=सेटअप...
|
|
||||||
Name[nl]=Instellingen...
|
|
||||||
Name[nn]=Oppsett …
|
|
||||||
Name[pa]=ਸੈਟਅੱਪ...
|
|
||||||
Name[pl]=Ustawienia...
|
|
||||||
Name[pt]=Configurar...
|
|
||||||
Name[pt_BR]=Configurar...
|
|
||||||
Name[ro]=Configurare...
|
|
||||||
Name[ru]=Настройка...
|
|
||||||
Name[sk]=Nastavenie...
|
|
||||||
Name[sl]=Nastavi ...
|
|
||||||
Name[sq]=Instalimi...
|
|
||||||
Name[sr]=Подеси...
|
|
||||||
Name[sr@ijekavian]=Подеси...
|
|
||||||
Name[sr@ijekavianlatin]=Podesi...
|
|
||||||
Name[sr@latin]=Podesi...
|
|
||||||
Name[sv]=Inställningar...
|
|
||||||
Name[ta]=அமைப்பு...
|
|
||||||
Name[tg]=Барпосозӣ...
|
|
||||||
Name[th]=ตั้งค่า...
|
|
||||||
Name[tr]=Kurulum...
|
|
||||||
Name[ug]=ئورنات…
|
|
||||||
Name[uk]=Встановити...
|
|
||||||
Name[uz]=Oʻrnatish
|
|
||||||
Name[uz@cyrillic]=Ўрнатиш
|
|
||||||
Name[vi]=Thiết lập...
|
|
||||||
Name[xh]=Iyacwangciswa...
|
|
||||||
Name[x-test]=xxSetup...xx
|
|
||||||
Name[zh_CN]=设置...
|
|
||||||
Name[zh_TW]=設定...
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
|
|
||||||
[Desktop Action InWindow]
|
|
||||||
Exec=kpolygon.kss -window-id %w
|
|
||||||
Name=Display in Specified Window
|
|
||||||
Name[ast]=Amosar na ventana especificada
|
|
||||||
Name[bg]=Показване в избран прозорец
|
|
||||||
Name[br]=Diskwel er prenestr spisaet
|
|
||||||
Name[bs]=Prikaži u određenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra especificada
|
|
||||||
Name[ca@valencia]=Mostra a la finestra especificada
|
|
||||||
Name[cs]=Zobrazit v určeném okně
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Benodol
|
|
||||||
Name[da]=Visning i angivet vindue
|
|
||||||
Name[de]=In bestimmten Fenster anzeigen
|
|
||||||
Name[el]=Προβολή στο καθορισμένο παράθυρο
|
|
||||||
Name[en_GB]=Display in Specified Window
|
|
||||||
Name[eo]=Montri en indikita fenestro
|
|
||||||
Name[es]=Mostrar en la ventana especificada
|
|
||||||
Name[et]=Määratud aknas näitamine
|
|
||||||
Name[eu]=Bistaratu zehaztutako lehioan
|
|
||||||
Name[fa]=نمایش در پنجره مشخصشده
|
|
||||||
Name[fi]=Näytä määrätyssä ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre spécifiée
|
|
||||||
Name[fy]=Werjefte yn in definiearre finster
|
|
||||||
Name[ga]=Taispeáin san Fhuinneog Sonraithe
|
|
||||||
Name[gl]=Mostrar na xanela indicada
|
|
||||||
Name[he]=הצג בחלון המצוין
|
|
||||||
Name[hne]=निरधारित विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u određenom prozoru
|
|
||||||
Name[hu]=Megjelenítés a megadott ablakban
|
|
||||||
Name[is]=Birta í völdum glugga
|
|
||||||
Name[it]=Mostra nella finestra specificata
|
|
||||||
Name[ja]=指定したウィンドウで表示
|
|
||||||
Name[kk]=Келтірілген терезеде көрсетілсін
|
|
||||||
Name[ko]=지정한 창에 보이기
|
|
||||||
Name[lt]=Rodyti nurodytame lange
|
|
||||||
Name[lv]=Rādīt norādītajā logā
|
|
||||||
Name[mai]=निर्दिष्ट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во наведениот прозорец
|
|
||||||
Name[ml]=പ്രത്യേകം പറഞ്ഞിരിക്കുന്ന ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=निर्देशीत चौकटीत दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Yang Dinyatakan
|
|
||||||
Name[nb]=Vis i angitt vindu
|
|
||||||
Name[nds]=In utsöcht Finster wiesen
|
|
||||||
Name[ne]=निर्दिष्ट सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven In een opgegeven venster
|
|
||||||
Name[nn]=Vis i oppgjeve vindauge
|
|
||||||
Name[pa]=ਦੱਸੇ ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w zadanym oknie
|
|
||||||
Name[pt]=Mostrar na Janela Indicada
|
|
||||||
Name[pt_BR]=Exibir na janela indicada
|
|
||||||
Name[ro]=Afișează în fereastra specificată
|
|
||||||
Name[ru]=Показывать в указанном окне
|
|
||||||
Name[sk]=Zobraziť v zadanom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren e Specifikuar
|
|
||||||
Name[sr]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sv]=Visa i angivet fönster
|
|
||||||
Name[ta]=குறித்த சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи нишондода намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างที่กำหนด
|
|
||||||
Name[tr]=Belirtilen Pencerede Göster
|
|
||||||
Name[ug]=بەلگىلەنگەن كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити у вказаному вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Đã định
|
|
||||||
Name[x-test]=xxDisplay in Specified Windowxx
|
|
||||||
Name[zh_CN]=在指定的窗口中显示
|
|
||||||
Name[zh_TW]=在指定的視窗中顯示
|
|
||||||
NoDisplay=true
|
|
||||||
|
|
||||||
[Desktop Action Root]
|
|
||||||
Exec=kpolygon.kss -root
|
|
||||||
Name=Display in Root Window
|
|
||||||
Name[ast]=Amosar na ventana raíz
|
|
||||||
Name[bg]=Показване в главния прозорец
|
|
||||||
Name[br]=Diskwel er prenestr gwrizienn
|
|
||||||
Name[bs]=Prikaži u korijenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra arrel
|
|
||||||
Name[ca@valencia]=Mostra a la finestra arrel
|
|
||||||
Name[cs]=Zobrazit na pozadí plochy
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Wraidd
|
|
||||||
Name[da]=Visning i root-vindue
|
|
||||||
Name[de]=In Hintergrundfenster anzeigen
|
|
||||||
Name[el]=Προβολή στο βασικό παράθυρο
|
|
||||||
Name[en_GB]=Display in Root Window
|
|
||||||
Name[eo]=Montri en radika fenestro
|
|
||||||
Name[es]=Mostrar en la ventana raíz
|
|
||||||
Name[et]=Juuraknas näitamine
|
|
||||||
Name[eu]=Bistaratu erro lehioan
|
|
||||||
Name[fa]=نمایش در پنجره ریشه
|
|
||||||
Name[fi]=Näytä juuri-ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre racine
|
|
||||||
Name[fy]=Werjefte yn haadfinster
|
|
||||||
Name[ga]=Taispeáin sa Phríomhfhuinneog
|
|
||||||
Name[gl]=Mostrar na xanela raíz
|
|
||||||
Name[he]=הצג בחלון השורש
|
|
||||||
Name[hne]=रूट विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u ishodišnom prozoru
|
|
||||||
Name[hu]=Megjelenítés a gyökérablakban
|
|
||||||
Name[is]=Birta í rótarglugganum
|
|
||||||
Name[it]=Mostra sullo sfondo
|
|
||||||
Name[ja]=ルートウィンドウで表示
|
|
||||||
Name[kk]=Түбір терезесінде көрсетілсін
|
|
||||||
Name[ko]=전체 화면으로 보이기
|
|
||||||
Name[lt]=Rodyti root lange
|
|
||||||
Name[lv]=Rādīt saknes logā
|
|
||||||
Name[mai]=रूट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во коренскиот прозорец
|
|
||||||
Name[ml]=മൂല ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=रूट चौकट मध्ये दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Root
|
|
||||||
Name[nb]=Vis i root-vindu
|
|
||||||
Name[nds]=In Hööftfinster wiesen
|
|
||||||
Name[ne]=मूल सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven in hoofdvenster
|
|
||||||
Name[nn]=Vis i rotvindauget
|
|
||||||
Name[pa]=Root ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w oknie głównym
|
|
||||||
Name[pt]=Mostrar na Janela de Fundo
|
|
||||||
Name[pt_BR]=Exibir na janela raiz
|
|
||||||
Name[ro]=Afișează în fereastra rădăcină
|
|
||||||
Name[ru]=Показывать в корневом окне
|
|
||||||
Name[sk]=Zobraziť v koreňovom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren Bazë
|
|
||||||
Name[sr]=Прикажи у кореном прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у корјеном прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u korjenom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u korenom prozoru
|
|
||||||
Name[sv]=Visa i rotfönstret
|
|
||||||
Name[ta]=ஆரம்ப சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи решагӣ намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างราก
|
|
||||||
Name[tr]=Kök Pencerede Göster
|
|
||||||
Name[ug]=غول كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити в кореневому вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Gốc
|
|
||||||
Name[x-test]=xxDisplay in Root Windowxx
|
|
||||||
Name[zh_CN]=在根窗口中显示
|
|
||||||
Name[zh_TW]=在根視窗中顯示
|
|
||||||
NoDisplay=true
|
|
|
@ -1,300 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Exec=kscience.kss
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
Type=Service
|
|
||||||
X-KDE-ServiceTypes=ScreenSaver
|
|
||||||
Actions=Setup;InWindow;Root;
|
|
||||||
X-KDE-Category=Desktop Distortions
|
|
||||||
X-KDE-Type=ManipulateScreen
|
|
||||||
Name=Science
|
|
||||||
Name[af]=Wetenskap
|
|
||||||
Name[ast]=Ciencia
|
|
||||||
Name[bg]=Наука
|
|
||||||
Name[br]=Skiantoù
|
|
||||||
Name[bs]=Nauka
|
|
||||||
Name[ca]=Ciència
|
|
||||||
Name[ca@valencia]=Ciència
|
|
||||||
Name[cs]=Věda
|
|
||||||
Name[cy]=Gwyddoniaeth
|
|
||||||
Name[da]=Videnskab
|
|
||||||
Name[de]=Wissenschaft
|
|
||||||
Name[el]=Science
|
|
||||||
Name[en_GB]=Science
|
|
||||||
Name[eo]=Scienco
|
|
||||||
Name[es]=Ciencia
|
|
||||||
Name[et]=Teadus
|
|
||||||
Name[eu]=Zientzia
|
|
||||||
Name[fa]=علم
|
|
||||||
Name[fi]=Linssi
|
|
||||||
Name[fr]=Science
|
|
||||||
Name[fy]=Wittenskiplik
|
|
||||||
Name[ga]=Eolaíocht
|
|
||||||
Name[gl]=Ciencia
|
|
||||||
Name[he]=מדע
|
|
||||||
Name[hne]=विग्यान
|
|
||||||
Name[hu]=Tudomány
|
|
||||||
Name[is]=Vísindi
|
|
||||||
Name[it]=Scienza
|
|
||||||
Name[ja]=サイエンス
|
|
||||||
Name[kk]=Ғылым
|
|
||||||
Name[ko]=과학
|
|
||||||
Name[lt]=Mokslas
|
|
||||||
Name[lv]=Zinātne
|
|
||||||
Name[mai]=विज्ञान
|
|
||||||
Name[mk]=Наука
|
|
||||||
Name[ml]=ശാസ്ത്ര
|
|
||||||
Name[mr]=विज्ञान
|
|
||||||
Name[ms]=Sains
|
|
||||||
Name[nb]=Vitenskap
|
|
||||||
Name[nds]=Wetenschap
|
|
||||||
Name[ne]=विज्ञान
|
|
||||||
Name[nl]=Wetenschappelijk
|
|
||||||
Name[nn]=Vitskap
|
|
||||||
Name[oc]=Sciéncia
|
|
||||||
Name[pa]=ਵਿਗਿਆਨ
|
|
||||||
Name[pl]=Nauka
|
|
||||||
Name[pt]=Ciência
|
|
||||||
Name[pt_BR]=Ciências
|
|
||||||
Name[ro]=Știință
|
|
||||||
Name[ru]=Наука
|
|
||||||
Name[sk]=Vedecký
|
|
||||||
Name[sl]=Znanost
|
|
||||||
Name[sq]=Shkencë
|
|
||||||
Name[sr]=Наука
|
|
||||||
Name[sr@ijekavian]=Наука
|
|
||||||
Name[sr@ijekavianlatin]=Nauka
|
|
||||||
Name[sr@latin]=Nauka
|
|
||||||
Name[sv]=Vetenskap
|
|
||||||
Name[ta]=அறிவியல்
|
|
||||||
Name[tg]=Илм
|
|
||||||
Name[th]=วิทยาศาสตร์
|
|
||||||
Name[tr]=Bilim
|
|
||||||
Name[ug]=ئىلىم
|
|
||||||
Name[uk]=Наука
|
|
||||||
Name[uz]=Fan
|
|
||||||
Name[uz@cyrillic]=Фан
|
|
||||||
Name[vi]=Khoa học
|
|
||||||
Name[xh]=Inzulu lwazi
|
|
||||||
Name[x-test]=xxSciencexx
|
|
||||||
Name[zh_CN]=科学
|
|
||||||
Name[zh_TW]=科學
|
|
||||||
|
|
||||||
[Desktop Action Setup]
|
|
||||||
Exec=kscience.kss -setup
|
|
||||||
Name=Setup...
|
|
||||||
Name[af]=Opstelling...
|
|
||||||
Name[ast]=Configuración...
|
|
||||||
Name[bg]=Настройки...
|
|
||||||
Name[br]=Kefluniadur ...
|
|
||||||
Name[bs]=Podesi...
|
|
||||||
Name[ca]=Arranjament...
|
|
||||||
Name[ca@valencia]=Arranjament...
|
|
||||||
Name[cs]=Nastavení...
|
|
||||||
Name[cy]=Gosod ...
|
|
||||||
Name[da]=Opsætning...
|
|
||||||
Name[de]=Einrichtung ...
|
|
||||||
Name[el]=Ρύθμιση...
|
|
||||||
Name[en_GB]=Setup...
|
|
||||||
Name[eo]=Agordo...
|
|
||||||
Name[es]=Configuración...
|
|
||||||
Name[et]=Seadistamine...
|
|
||||||
Name[eu]=Konfiguratu...
|
|
||||||
Name[fa]=برپایی...
|
|
||||||
Name[fi]=Asetukset…
|
|
||||||
Name[fr]=Configuration...
|
|
||||||
Name[fy]=Opset...
|
|
||||||
Name[ga]=Socrú...
|
|
||||||
Name[gl]=Configuración...
|
|
||||||
Name[he]=הגדרות...
|
|
||||||
Name[hne]=सेटअप...
|
|
||||||
Name[hr]=Postavke …
|
|
||||||
Name[hu]=Beállítás...
|
|
||||||
Name[is]=Stillingar...
|
|
||||||
Name[it]=Impostazioni...
|
|
||||||
Name[ja]=設定...
|
|
||||||
Name[kk]=Баптау...
|
|
||||||
Name[ko]=설정...
|
|
||||||
Name[lt]=Sąranka ...
|
|
||||||
Name[lv]=Iestatījumi...
|
|
||||||
Name[mai]=सेटअप...
|
|
||||||
Name[mk]=Поставување...
|
|
||||||
Name[ml]=ഒരുക്കം...
|
|
||||||
Name[mr]=संयोजना ...
|
|
||||||
Name[ms]=Setkan...
|
|
||||||
Name[nb]=Innstillinger …
|
|
||||||
Name[nds]=Instellen...
|
|
||||||
Name[ne]=सेटअप...
|
|
||||||
Name[nl]=Instellingen...
|
|
||||||
Name[nn]=Oppsett …
|
|
||||||
Name[pa]=ਸੈਟਅੱਪ...
|
|
||||||
Name[pl]=Ustawienia...
|
|
||||||
Name[pt]=Configurar...
|
|
||||||
Name[pt_BR]=Configurar...
|
|
||||||
Name[ro]=Configurare...
|
|
||||||
Name[ru]=Настройка...
|
|
||||||
Name[sk]=Nastavenie...
|
|
||||||
Name[sl]=Nastavi ...
|
|
||||||
Name[sq]=Instalimi...
|
|
||||||
Name[sr]=Подеси...
|
|
||||||
Name[sr@ijekavian]=Подеси...
|
|
||||||
Name[sr@ijekavianlatin]=Podesi...
|
|
||||||
Name[sr@latin]=Podesi...
|
|
||||||
Name[sv]=Inställningar...
|
|
||||||
Name[ta]=அமைப்பு...
|
|
||||||
Name[tg]=Барпосозӣ...
|
|
||||||
Name[th]=ตั้งค่า...
|
|
||||||
Name[tr]=Kurulum...
|
|
||||||
Name[ug]=ئورنات…
|
|
||||||
Name[uk]=Встановити...
|
|
||||||
Name[uz]=Oʻrnatish
|
|
||||||
Name[uz@cyrillic]=Ўрнатиш
|
|
||||||
Name[vi]=Thiết lập...
|
|
||||||
Name[xh]=Iyacwangciswa...
|
|
||||||
Name[x-test]=xxSetup...xx
|
|
||||||
Name[zh_CN]=设置...
|
|
||||||
Name[zh_TW]=設定...
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
|
|
||||||
[Desktop Action InWindow]
|
|
||||||
Exec=kscience.kss -window-id %w
|
|
||||||
Name=Display in Specified Window
|
|
||||||
Name[ast]=Amosar na ventana especificada
|
|
||||||
Name[bg]=Показване в избран прозорец
|
|
||||||
Name[br]=Diskwel er prenestr spisaet
|
|
||||||
Name[bs]=Prikaži u određenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra especificada
|
|
||||||
Name[ca@valencia]=Mostra a la finestra especificada
|
|
||||||
Name[cs]=Zobrazit v určeném okně
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Benodol
|
|
||||||
Name[da]=Visning i angivet vindue
|
|
||||||
Name[de]=In bestimmten Fenster anzeigen
|
|
||||||
Name[el]=Προβολή στο καθορισμένο παράθυρο
|
|
||||||
Name[en_GB]=Display in Specified Window
|
|
||||||
Name[eo]=Montri en indikita fenestro
|
|
||||||
Name[es]=Mostrar en la ventana especificada
|
|
||||||
Name[et]=Määratud aknas näitamine
|
|
||||||
Name[eu]=Bistaratu zehaztutako lehioan
|
|
||||||
Name[fa]=نمایش در پنجره مشخصشده
|
|
||||||
Name[fi]=Näytä määrätyssä ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre spécifiée
|
|
||||||
Name[fy]=Werjefte yn in definiearre finster
|
|
||||||
Name[ga]=Taispeáin san Fhuinneog Sonraithe
|
|
||||||
Name[gl]=Mostrar na xanela indicada
|
|
||||||
Name[he]=הצג בחלון המצוין
|
|
||||||
Name[hne]=निरधारित विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u određenom prozoru
|
|
||||||
Name[hu]=Megjelenítés a megadott ablakban
|
|
||||||
Name[is]=Birta í völdum glugga
|
|
||||||
Name[it]=Mostra nella finestra specificata
|
|
||||||
Name[ja]=指定したウィンドウで表示
|
|
||||||
Name[kk]=Келтірілген терезеде көрсетілсін
|
|
||||||
Name[ko]=지정한 창에 보이기
|
|
||||||
Name[lt]=Rodyti nurodytame lange
|
|
||||||
Name[lv]=Rādīt norādītajā logā
|
|
||||||
Name[mai]=निर्दिष्ट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во наведениот прозорец
|
|
||||||
Name[ml]=പ്രത്യേകം പറഞ്ഞിരിക്കുന്ന ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=निर्देशीत चौकटीत दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Yang Dinyatakan
|
|
||||||
Name[nb]=Vis i angitt vindu
|
|
||||||
Name[nds]=In utsöcht Finster wiesen
|
|
||||||
Name[ne]=निर्दिष्ट सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven In een opgegeven venster
|
|
||||||
Name[nn]=Vis i oppgjeve vindauge
|
|
||||||
Name[pa]=ਦੱਸੇ ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w zadanym oknie
|
|
||||||
Name[pt]=Mostrar na Janela Indicada
|
|
||||||
Name[pt_BR]=Exibir na janela indicada
|
|
||||||
Name[ro]=Afișează în fereastra specificată
|
|
||||||
Name[ru]=Показывать в указанном окне
|
|
||||||
Name[sk]=Zobraziť v zadanom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren e Specifikuar
|
|
||||||
Name[sr]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sv]=Visa i angivet fönster
|
|
||||||
Name[ta]=குறித்த சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи нишондода намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างที่กำหนด
|
|
||||||
Name[tr]=Belirtilen Pencerede Göster
|
|
||||||
Name[ug]=بەلگىلەنگەن كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити у вказаному вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Đã định
|
|
||||||
Name[x-test]=xxDisplay in Specified Windowxx
|
|
||||||
Name[zh_CN]=在指定的窗口中显示
|
|
||||||
Name[zh_TW]=在指定的視窗中顯示
|
|
||||||
NoDisplay=true
|
|
||||||
|
|
||||||
[Desktop Action Root]
|
|
||||||
Exec=kscience.kss -root
|
|
||||||
Name=Display in Root Window
|
|
||||||
Name[ast]=Amosar na ventana raíz
|
|
||||||
Name[bg]=Показване в главния прозорец
|
|
||||||
Name[br]=Diskwel er prenestr gwrizienn
|
|
||||||
Name[bs]=Prikaži u korijenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra arrel
|
|
||||||
Name[ca@valencia]=Mostra a la finestra arrel
|
|
||||||
Name[cs]=Zobrazit na pozadí plochy
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Wraidd
|
|
||||||
Name[da]=Visning i root-vindue
|
|
||||||
Name[de]=In Hintergrundfenster anzeigen
|
|
||||||
Name[el]=Προβολή στο βασικό παράθυρο
|
|
||||||
Name[en_GB]=Display in Root Window
|
|
||||||
Name[eo]=Montri en radika fenestro
|
|
||||||
Name[es]=Mostrar en la ventana raíz
|
|
||||||
Name[et]=Juuraknas näitamine
|
|
||||||
Name[eu]=Bistaratu erro lehioan
|
|
||||||
Name[fa]=نمایش در پنجره ریشه
|
|
||||||
Name[fi]=Näytä juuri-ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre racine
|
|
||||||
Name[fy]=Werjefte yn haadfinster
|
|
||||||
Name[ga]=Taispeáin sa Phríomhfhuinneog
|
|
||||||
Name[gl]=Mostrar na xanela raíz
|
|
||||||
Name[he]=הצג בחלון השורש
|
|
||||||
Name[hne]=रूट विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u ishodišnom prozoru
|
|
||||||
Name[hu]=Megjelenítés a gyökérablakban
|
|
||||||
Name[is]=Birta í rótarglugganum
|
|
||||||
Name[it]=Mostra sullo sfondo
|
|
||||||
Name[ja]=ルートウィンドウで表示
|
|
||||||
Name[kk]=Түбір терезесінде көрсетілсін
|
|
||||||
Name[ko]=전체 화면으로 보이기
|
|
||||||
Name[lt]=Rodyti root lange
|
|
||||||
Name[lv]=Rādīt saknes logā
|
|
||||||
Name[mai]=रूट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во коренскиот прозорец
|
|
||||||
Name[ml]=മൂല ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=रूट चौकट मध्ये दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Root
|
|
||||||
Name[nb]=Vis i root-vindu
|
|
||||||
Name[nds]=In Hööftfinster wiesen
|
|
||||||
Name[ne]=मूल सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven in hoofdvenster
|
|
||||||
Name[nn]=Vis i rotvindauget
|
|
||||||
Name[pa]=Root ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w oknie głównym
|
|
||||||
Name[pt]=Mostrar na Janela de Fundo
|
|
||||||
Name[pt_BR]=Exibir na janela raiz
|
|
||||||
Name[ro]=Afișează în fereastra rădăcină
|
|
||||||
Name[ru]=Показывать в корневом окне
|
|
||||||
Name[sk]=Zobraziť v koreňovom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren Bazë
|
|
||||||
Name[sr]=Прикажи у кореном прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у корјеном прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u korjenom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u korenom prozoru
|
|
||||||
Name[sv]=Visa i rotfönstret
|
|
||||||
Name[ta]=ஆரம்ப சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи решагӣ намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างราก
|
|
||||||
Name[tr]=Kök Pencerede Göster
|
|
||||||
Name[ug]=غول كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити в кореневому вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Gốc
|
|
||||||
Name[x-test]=xxDisplay in Root Windowxx
|
|
||||||
Name[zh_CN]=在根窗口中显示
|
|
||||||
Name[zh_TW]=在根視窗中顯示
|
|
||||||
NoDisplay=true
|
|
|
@ -1,300 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Exec=kslideshow.kss
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
Type=Service
|
|
||||||
X-KDE-ServiceTypes=ScreenSaver
|
|
||||||
Actions=Setup;InWindow;Root;
|
|
||||||
X-KDE-Category=Banners & Pictures
|
|
||||||
Name=Slide Show
|
|
||||||
Name[af]=Skuif Vertoon
|
|
||||||
Name[ast]=Presentación
|
|
||||||
Name[bg]=Прожекция
|
|
||||||
Name[br]=Diskouezadur skeudennoù
|
|
||||||
Name[bs]=Slajd-šou
|
|
||||||
Name[ca]=Passi de diapositives
|
|
||||||
Name[ca@valencia]=Passe de diapositives
|
|
||||||
Name[cs]=Promítání
|
|
||||||
Name[cy]=Sioe Tryloywder
|
|
||||||
Name[da]=Diasshow
|
|
||||||
Name[de]=Dia-Schau
|
|
||||||
Name[el]=Προβολή διαφανειών
|
|
||||||
Name[en_GB]=Slide Show
|
|
||||||
Name[eo]=Lumbildoj
|
|
||||||
Name[es]=Presentación
|
|
||||||
Name[et]=Slaidishow
|
|
||||||
Name[eu]=Diapositiba erakusketa
|
|
||||||
Name[fa]=نمایش اسلاید
|
|
||||||
Name[fi]=Diaesitys
|
|
||||||
Name[fr]=Diaporama
|
|
||||||
Name[fy]=Diafoarstelling
|
|
||||||
Name[ga]=Taispeántas Sleamhnán
|
|
||||||
Name[gl]=Presentación
|
|
||||||
Name[he]=מצגת שקופיות
|
|
||||||
Name[hne]=स्लाइड सो
|
|
||||||
Name[hu]=Diavetítés
|
|
||||||
Name[is]=Skyggnusýning
|
|
||||||
Name[it]=Sequenza di immagini
|
|
||||||
Name[ja]=スライドショー
|
|
||||||
Name[kk]=Слайд-шоу
|
|
||||||
Name[ko]=슬라이드 쇼
|
|
||||||
Name[lt]=Skaidrių šou
|
|
||||||
Name[lv]=Slīdrāde
|
|
||||||
Name[mai]=स्लाइड शो
|
|
||||||
Name[mk]=Слајд-шоу
|
|
||||||
Name[ml]=സ്ലൈഡ് ഷോ
|
|
||||||
Name[mr]=स्लाइड शो
|
|
||||||
Name[ms]=Tayangan Slaid
|
|
||||||
Name[nb]=Lysbildeshow
|
|
||||||
Name[nds]=Diaschau
|
|
||||||
Name[ne]=स्लाइड प्रदर्शन
|
|
||||||
Name[nl]=Diavoorstelling
|
|
||||||
Name[nn]=Framvising
|
|
||||||
Name[oc]=Diaporama
|
|
||||||
Name[pa]=ਸਲਾਇਡ ਸ਼ੋ
|
|
||||||
Name[pl]=Sekwencja slajdów
|
|
||||||
Name[pt]=Apresentação
|
|
||||||
Name[pt_BR]=Apresentação de slides
|
|
||||||
Name[ro]=Succesiune de imagini
|
|
||||||
Name[ru]=Слайд-шоу
|
|
||||||
Name[sk]=Slide Show
|
|
||||||
Name[sl]=Predstavitev
|
|
||||||
Name[sq]=Diapozitiv
|
|
||||||
Name[sr]=К‑слајдшоу
|
|
||||||
Name[sr@ijekavian]=К‑слајдшоу
|
|
||||||
Name[sr@ijekavianlatin]=K‑slajdšou
|
|
||||||
Name[sr@latin]=K‑slajdšou
|
|
||||||
Name[sv]=Bildspel
|
|
||||||
Name[ta]=ஸ்லைடு காட்சி
|
|
||||||
Name[tg]=Намоиши слайд
|
|
||||||
Name[th]=แสดงภาพนิ่ง
|
|
||||||
Name[tr]=Slayt Gösterisi
|
|
||||||
Name[ug]=تام تەسۋىر كۆرسەت
|
|
||||||
Name[uk]=Слайди
|
|
||||||
Name[uz]=Slayd shou
|
|
||||||
Name[uz@cyrillic]=Слайд шоу
|
|
||||||
Name[vi]=Trình bày
|
|
||||||
Name[xh]=Isiboniso esihamba thambileyo
|
|
||||||
Name[x-test]=xxSlide Showxx
|
|
||||||
Name[zh_CN]=幻灯播放
|
|
||||||
Name[zh_TW]=幻燈片放映
|
|
||||||
|
|
||||||
[Desktop Action Setup]
|
|
||||||
Exec=kslideshow.kss -setup
|
|
||||||
Name=Setup...
|
|
||||||
Name[af]=Opstelling...
|
|
||||||
Name[ast]=Configuración...
|
|
||||||
Name[bg]=Настройки...
|
|
||||||
Name[br]=Kefluniadur ...
|
|
||||||
Name[bs]=Podesi...
|
|
||||||
Name[ca]=Arranjament...
|
|
||||||
Name[ca@valencia]=Arranjament...
|
|
||||||
Name[cs]=Nastavení...
|
|
||||||
Name[cy]=Gosod ...
|
|
||||||
Name[da]=Opsætning...
|
|
||||||
Name[de]=Einrichtung ...
|
|
||||||
Name[el]=Ρύθμιση...
|
|
||||||
Name[en_GB]=Setup...
|
|
||||||
Name[eo]=Agordo...
|
|
||||||
Name[es]=Configuración...
|
|
||||||
Name[et]=Seadistamine...
|
|
||||||
Name[eu]=Konfiguratu...
|
|
||||||
Name[fa]=برپایی...
|
|
||||||
Name[fi]=Asetukset…
|
|
||||||
Name[fr]=Configuration...
|
|
||||||
Name[fy]=Opset...
|
|
||||||
Name[ga]=Socrú...
|
|
||||||
Name[gl]=Configuración...
|
|
||||||
Name[he]=הגדרות...
|
|
||||||
Name[hne]=सेटअप...
|
|
||||||
Name[hr]=Postavke …
|
|
||||||
Name[hu]=Beállítás...
|
|
||||||
Name[is]=Stillingar...
|
|
||||||
Name[it]=Impostazioni...
|
|
||||||
Name[ja]=設定...
|
|
||||||
Name[kk]=Баптау...
|
|
||||||
Name[ko]=설정...
|
|
||||||
Name[lt]=Sąranka ...
|
|
||||||
Name[lv]=Iestatījumi...
|
|
||||||
Name[mai]=सेटअप...
|
|
||||||
Name[mk]=Поставување...
|
|
||||||
Name[ml]=ഒരുക്കം...
|
|
||||||
Name[mr]=संयोजना ...
|
|
||||||
Name[ms]=Setkan...
|
|
||||||
Name[nb]=Innstillinger …
|
|
||||||
Name[nds]=Instellen...
|
|
||||||
Name[ne]=सेटअप...
|
|
||||||
Name[nl]=Instellingen...
|
|
||||||
Name[nn]=Oppsett …
|
|
||||||
Name[pa]=ਸੈਟਅੱਪ...
|
|
||||||
Name[pl]=Ustawienia...
|
|
||||||
Name[pt]=Configurar...
|
|
||||||
Name[pt_BR]=Configurar...
|
|
||||||
Name[ro]=Configurare...
|
|
||||||
Name[ru]=Настройка...
|
|
||||||
Name[sk]=Nastavenie...
|
|
||||||
Name[sl]=Nastavi ...
|
|
||||||
Name[sq]=Instalimi...
|
|
||||||
Name[sr]=Подеси...
|
|
||||||
Name[sr@ijekavian]=Подеси...
|
|
||||||
Name[sr@ijekavianlatin]=Podesi...
|
|
||||||
Name[sr@latin]=Podesi...
|
|
||||||
Name[sv]=Inställningar...
|
|
||||||
Name[ta]=அமைப்பு...
|
|
||||||
Name[tg]=Барпосозӣ...
|
|
||||||
Name[th]=ตั้งค่า...
|
|
||||||
Name[tr]=Kurulum...
|
|
||||||
Name[ug]=ئورنات…
|
|
||||||
Name[uk]=Встановити...
|
|
||||||
Name[uz]=Oʻrnatish
|
|
||||||
Name[uz@cyrillic]=Ўрнатиш
|
|
||||||
Name[vi]=Thiết lập...
|
|
||||||
Name[xh]=Iyacwangciswa...
|
|
||||||
Name[x-test]=xxSetup...xx
|
|
||||||
Name[zh_CN]=设置...
|
|
||||||
Name[zh_TW]=設定...
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
|
|
||||||
[Desktop Action InWindow]
|
|
||||||
Exec=kslideshow.kss -window-id %w
|
|
||||||
Name=Display in Specified Window
|
|
||||||
Name[ast]=Amosar na ventana especificada
|
|
||||||
Name[bg]=Показване в избран прозорец
|
|
||||||
Name[br]=Diskwel er prenestr spisaet
|
|
||||||
Name[bs]=Prikaži u određenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra especificada
|
|
||||||
Name[ca@valencia]=Mostra a la finestra especificada
|
|
||||||
Name[cs]=Zobrazit v určeném okně
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Benodol
|
|
||||||
Name[da]=Visning i angivet vindue
|
|
||||||
Name[de]=In bestimmten Fenster anzeigen
|
|
||||||
Name[el]=Προβολή στο καθορισμένο παράθυρο
|
|
||||||
Name[en_GB]=Display in Specified Window
|
|
||||||
Name[eo]=Montri en indikita fenestro
|
|
||||||
Name[es]=Mostrar en la ventana especificada
|
|
||||||
Name[et]=Määratud aknas näitamine
|
|
||||||
Name[eu]=Bistaratu zehaztutako lehioan
|
|
||||||
Name[fa]=نمایش در پنجره مشخصشده
|
|
||||||
Name[fi]=Näytä määrätyssä ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre spécifiée
|
|
||||||
Name[fy]=Werjefte yn in definiearre finster
|
|
||||||
Name[ga]=Taispeáin san Fhuinneog Sonraithe
|
|
||||||
Name[gl]=Mostrar na xanela indicada
|
|
||||||
Name[he]=הצג בחלון המצוין
|
|
||||||
Name[hne]=निरधारित विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u određenom prozoru
|
|
||||||
Name[hu]=Megjelenítés a megadott ablakban
|
|
||||||
Name[is]=Birta í völdum glugga
|
|
||||||
Name[it]=Mostra nella finestra specificata
|
|
||||||
Name[ja]=指定したウィンドウで表示
|
|
||||||
Name[kk]=Келтірілген терезеде көрсетілсін
|
|
||||||
Name[ko]=지정한 창에 보이기
|
|
||||||
Name[lt]=Rodyti nurodytame lange
|
|
||||||
Name[lv]=Rādīt norādītajā logā
|
|
||||||
Name[mai]=निर्दिष्ट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во наведениот прозорец
|
|
||||||
Name[ml]=പ്രത്യേകം പറഞ്ഞിരിക്കുന്ന ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=निर्देशीत चौकटीत दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Yang Dinyatakan
|
|
||||||
Name[nb]=Vis i angitt vindu
|
|
||||||
Name[nds]=In utsöcht Finster wiesen
|
|
||||||
Name[ne]=निर्दिष्ट सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven In een opgegeven venster
|
|
||||||
Name[nn]=Vis i oppgjeve vindauge
|
|
||||||
Name[pa]=ਦੱਸੇ ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w zadanym oknie
|
|
||||||
Name[pt]=Mostrar na Janela Indicada
|
|
||||||
Name[pt_BR]=Exibir na janela indicada
|
|
||||||
Name[ro]=Afișează în fereastra specificată
|
|
||||||
Name[ru]=Показывать в указанном окне
|
|
||||||
Name[sk]=Zobraziť v zadanom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren e Specifikuar
|
|
||||||
Name[sr]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sv]=Visa i angivet fönster
|
|
||||||
Name[ta]=குறித்த சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи нишондода намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างที่กำหนด
|
|
||||||
Name[tr]=Belirtilen Pencerede Göster
|
|
||||||
Name[ug]=بەلگىلەنگەن كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити у вказаному вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Đã định
|
|
||||||
Name[x-test]=xxDisplay in Specified Windowxx
|
|
||||||
Name[zh_CN]=在指定的窗口中显示
|
|
||||||
Name[zh_TW]=在指定的視窗中顯示
|
|
||||||
NoDisplay=true
|
|
||||||
|
|
||||||
[Desktop Action Root]
|
|
||||||
Exec=kslideshow.kss -root
|
|
||||||
Name=Display in Root Window
|
|
||||||
Name[ast]=Amosar na ventana raíz
|
|
||||||
Name[bg]=Показване в главния прозорец
|
|
||||||
Name[br]=Diskwel er prenestr gwrizienn
|
|
||||||
Name[bs]=Prikaži u korijenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra arrel
|
|
||||||
Name[ca@valencia]=Mostra a la finestra arrel
|
|
||||||
Name[cs]=Zobrazit na pozadí plochy
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Wraidd
|
|
||||||
Name[da]=Visning i root-vindue
|
|
||||||
Name[de]=In Hintergrundfenster anzeigen
|
|
||||||
Name[el]=Προβολή στο βασικό παράθυρο
|
|
||||||
Name[en_GB]=Display in Root Window
|
|
||||||
Name[eo]=Montri en radika fenestro
|
|
||||||
Name[es]=Mostrar en la ventana raíz
|
|
||||||
Name[et]=Juuraknas näitamine
|
|
||||||
Name[eu]=Bistaratu erro lehioan
|
|
||||||
Name[fa]=نمایش در پنجره ریشه
|
|
||||||
Name[fi]=Näytä juuri-ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre racine
|
|
||||||
Name[fy]=Werjefte yn haadfinster
|
|
||||||
Name[ga]=Taispeáin sa Phríomhfhuinneog
|
|
||||||
Name[gl]=Mostrar na xanela raíz
|
|
||||||
Name[he]=הצג בחלון השורש
|
|
||||||
Name[hne]=रूट विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u ishodišnom prozoru
|
|
||||||
Name[hu]=Megjelenítés a gyökérablakban
|
|
||||||
Name[is]=Birta í rótarglugganum
|
|
||||||
Name[it]=Mostra sullo sfondo
|
|
||||||
Name[ja]=ルートウィンドウで表示
|
|
||||||
Name[kk]=Түбір терезесінде көрсетілсін
|
|
||||||
Name[ko]=전체 화면으로 보이기
|
|
||||||
Name[lt]=Rodyti root lange
|
|
||||||
Name[lv]=Rādīt saknes logā
|
|
||||||
Name[mai]=रूट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во коренскиот прозорец
|
|
||||||
Name[ml]=മൂല ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=रूट चौकट मध्ये दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Root
|
|
||||||
Name[nb]=Vis i root-vindu
|
|
||||||
Name[nds]=In Hööftfinster wiesen
|
|
||||||
Name[ne]=मूल सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven in hoofdvenster
|
|
||||||
Name[nn]=Vis i rotvindauget
|
|
||||||
Name[pa]=Root ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w oknie głównym
|
|
||||||
Name[pt]=Mostrar na Janela de Fundo
|
|
||||||
Name[pt_BR]=Exibir na janela raiz
|
|
||||||
Name[ro]=Afișează în fereastra rădăcină
|
|
||||||
Name[ru]=Показывать в корневом окне
|
|
||||||
Name[sk]=Zobraziť v koreňovom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren Bazë
|
|
||||||
Name[sr]=Прикажи у кореном прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у корјеном прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u korjenom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u korenom prozoru
|
|
||||||
Name[sv]=Visa i rotfönstret
|
|
||||||
Name[ta]=ஆரம்ப சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи решагӣ намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างราก
|
|
||||||
Name[tr]=Kök Pencerede Göster
|
|
||||||
Name[ug]=غول كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити в кореневому вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Gốc
|
|
||||||
Name[x-test]=xxDisplay in Root Windowxx
|
|
||||||
Name[zh_CN]=在根窗口中显示
|
|
||||||
Name[zh_TW]=在根視窗中顯示
|
|
||||||
NoDisplay=true
|
|
||||||
|
|
|
@ -1,296 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Exec=kvm.kss
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
Type=Service
|
|
||||||
X-KDE-ServiceTypes=ScreenSaver
|
|
||||||
Actions=Setup;InWindow;Root;
|
|
||||||
X-KDE-Category=Gadgets & Simulations
|
|
||||||
Name=Virtual Machine
|
|
||||||
Name[af]=Virtuele Masjien
|
|
||||||
Name[ast]=Máquina virtual
|
|
||||||
Name[bg]=Виртуална машина
|
|
||||||
Name[br]=Ardivink galloudel
|
|
||||||
Name[bs]=Virtualna mašina
|
|
||||||
Name[ca]=Màquina virtual
|
|
||||||
Name[ca@valencia]=Màquina virtual
|
|
||||||
Name[cs]=Virtuální stroj
|
|
||||||
Name[cy]=Peiriant Rhith
|
|
||||||
Name[da]=Virtuel maskine
|
|
||||||
Name[de]=Virtuelle Maschine
|
|
||||||
Name[el]=Εικονική μηχανή
|
|
||||||
Name[en_GB]=Virtual Machine
|
|
||||||
Name[eo]=Virtuala maŝino
|
|
||||||
Name[es]=Máquina virtual
|
|
||||||
Name[et]=Virtuaalne Masin
|
|
||||||
Name[eu]=Makina birtuala
|
|
||||||
Name[fa]=ماشین مجازی
|
|
||||||
Name[fi]=Virtuaalikone
|
|
||||||
Name[fr]=Machine virtuelle
|
|
||||||
Name[fy]=Firtuele masine
|
|
||||||
Name[ga]=Meaisín Fíorúil
|
|
||||||
Name[gl]=Máquina virtual
|
|
||||||
Name[he]=מכונה וירטואלית
|
|
||||||
Name[hne]=आभासी मसीन
|
|
||||||
Name[hu]=Virtuális gép
|
|
||||||
Name[is]=Sýndarvél
|
|
||||||
Name[it]=Macchina virtuale
|
|
||||||
Name[ja]=仮想マシン
|
|
||||||
Name[kk]=Виртуалды компьютер
|
|
||||||
Name[ko]=가상 머신
|
|
||||||
Name[lt]=Virtuali Mašina
|
|
||||||
Name[lv]=Virtuālā mašīna
|
|
||||||
Name[mk]=Виртуелна машина
|
|
||||||
Name[ml]=മായാ യന്ത്രം
|
|
||||||
Name[ms]=Mesin Maya
|
|
||||||
Name[nb]=Virtuell maskin
|
|
||||||
Name[nds]=Virtuell Maschien
|
|
||||||
Name[ne]=अवास्तविक मेशिन
|
|
||||||
Name[nl]=Virtuele machine
|
|
||||||
Name[nn]=Virtuell maskin
|
|
||||||
Name[pa]=ਵੁਰਚੁਅਲ ਮਸ਼ੀਨ
|
|
||||||
Name[pl]=Maszyna wirtualna
|
|
||||||
Name[pt]=Máquina Virtual
|
|
||||||
Name[pt_BR]=Máquina Virtual
|
|
||||||
Name[ro]=Mașină virtuală
|
|
||||||
Name[ru]=Виртуальная машина
|
|
||||||
Name[sk]=Virtuálny stroj
|
|
||||||
Name[sl]=Navidezni stroj
|
|
||||||
Name[sq]=Virtual Machine
|
|
||||||
Name[sr]=Виртуелна машина
|
|
||||||
Name[sr@ijekavian]=Виртуелна машина
|
|
||||||
Name[sr@ijekavianlatin]=Virtuelna mašina
|
|
||||||
Name[sr@latin]=Virtuelna mašina
|
|
||||||
Name[sv]=Virtuell maskin
|
|
||||||
Name[ta]=கற்பனை வாகனம்
|
|
||||||
Name[tg]=Мошини уфуқӣ
|
|
||||||
Name[th]=เครื่องจำลอง
|
|
||||||
Name[tr]=Sanal Makine
|
|
||||||
Name[ug]=مەۋھۇم كومپيۇتېر
|
|
||||||
Name[uk]=Віртуальна машина
|
|
||||||
Name[uz]=Virtual kompyuter
|
|
||||||
Name[uz@cyrillic]=Виртуал компьютер
|
|
||||||
Name[vi]=Máy Ảo
|
|
||||||
Name[xh]=Umatshini onesiqhamo
|
|
||||||
Name[x-test]=xxVirtual Machinexx
|
|
||||||
Name[zh_CN]=虚拟机
|
|
||||||
Name[zh_TW]=虛擬機器
|
|
||||||
|
|
||||||
[Desktop Action Setup]
|
|
||||||
Exec=kvm.kss -setup
|
|
||||||
Name=Setup...
|
|
||||||
Name[af]=Opstelling...
|
|
||||||
Name[ast]=Configuración...
|
|
||||||
Name[bg]=Настройки...
|
|
||||||
Name[br]=Kefluniadur ...
|
|
||||||
Name[bs]=Podesi...
|
|
||||||
Name[ca]=Arranjament...
|
|
||||||
Name[ca@valencia]=Arranjament...
|
|
||||||
Name[cs]=Nastavení...
|
|
||||||
Name[cy]=Gosod ...
|
|
||||||
Name[da]=Opsætning...
|
|
||||||
Name[de]=Einrichtung ...
|
|
||||||
Name[el]=Ρύθμιση...
|
|
||||||
Name[en_GB]=Setup...
|
|
||||||
Name[eo]=Agordo...
|
|
||||||
Name[es]=Configuración...
|
|
||||||
Name[et]=Seadistamine...
|
|
||||||
Name[eu]=Konfiguratu...
|
|
||||||
Name[fa]=برپایی...
|
|
||||||
Name[fi]=Asetukset…
|
|
||||||
Name[fr]=Configuration...
|
|
||||||
Name[fy]=Opset...
|
|
||||||
Name[ga]=Socrú...
|
|
||||||
Name[gl]=Configuración...
|
|
||||||
Name[he]=הגדרות...
|
|
||||||
Name[hne]=सेटअप...
|
|
||||||
Name[hr]=Postavke …
|
|
||||||
Name[hu]=Beállítás...
|
|
||||||
Name[is]=Stillingar...
|
|
||||||
Name[it]=Impostazioni...
|
|
||||||
Name[ja]=設定...
|
|
||||||
Name[kk]=Баптау...
|
|
||||||
Name[ko]=설정...
|
|
||||||
Name[lt]=Sąranka ...
|
|
||||||
Name[lv]=Iestatījumi...
|
|
||||||
Name[mai]=सेटअप...
|
|
||||||
Name[mk]=Поставување...
|
|
||||||
Name[ml]=ഒരുക്കം...
|
|
||||||
Name[mr]=संयोजना ...
|
|
||||||
Name[ms]=Setkan...
|
|
||||||
Name[nb]=Innstillinger …
|
|
||||||
Name[nds]=Instellen...
|
|
||||||
Name[ne]=सेटअप...
|
|
||||||
Name[nl]=Instellingen...
|
|
||||||
Name[nn]=Oppsett …
|
|
||||||
Name[pa]=ਸੈਟਅੱਪ...
|
|
||||||
Name[pl]=Ustawienia...
|
|
||||||
Name[pt]=Configurar...
|
|
||||||
Name[pt_BR]=Configurar...
|
|
||||||
Name[ro]=Configurare...
|
|
||||||
Name[ru]=Настройка...
|
|
||||||
Name[sk]=Nastavenie...
|
|
||||||
Name[sl]=Nastavi ...
|
|
||||||
Name[sq]=Instalimi...
|
|
||||||
Name[sr]=Подеси...
|
|
||||||
Name[sr@ijekavian]=Подеси...
|
|
||||||
Name[sr@ijekavianlatin]=Podesi...
|
|
||||||
Name[sr@latin]=Podesi...
|
|
||||||
Name[sv]=Inställningar...
|
|
||||||
Name[ta]=அமைப்பு...
|
|
||||||
Name[tg]=Барпосозӣ...
|
|
||||||
Name[th]=ตั้งค่า...
|
|
||||||
Name[tr]=Kurulum...
|
|
||||||
Name[ug]=ئورنات…
|
|
||||||
Name[uk]=Встановити...
|
|
||||||
Name[uz]=Oʻrnatish
|
|
||||||
Name[uz@cyrillic]=Ўрнатиш
|
|
||||||
Name[vi]=Thiết lập...
|
|
||||||
Name[xh]=Iyacwangciswa...
|
|
||||||
Name[x-test]=xxSetup...xx
|
|
||||||
Name[zh_CN]=设置...
|
|
||||||
Name[zh_TW]=設定...
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
|
|
||||||
[Desktop Action InWindow]
|
|
||||||
Exec=kvm.kss -window-id %w
|
|
||||||
Name=Display in Specified Window
|
|
||||||
Name[ast]=Amosar na ventana especificada
|
|
||||||
Name[bg]=Показване в избран прозорец
|
|
||||||
Name[br]=Diskwel er prenestr spisaet
|
|
||||||
Name[bs]=Prikaži u određenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra especificada
|
|
||||||
Name[ca@valencia]=Mostra a la finestra especificada
|
|
||||||
Name[cs]=Zobrazit v určeném okně
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Benodol
|
|
||||||
Name[da]=Visning i angivet vindue
|
|
||||||
Name[de]=In bestimmten Fenster anzeigen
|
|
||||||
Name[el]=Προβολή στο καθορισμένο παράθυρο
|
|
||||||
Name[en_GB]=Display in Specified Window
|
|
||||||
Name[eo]=Montri en indikita fenestro
|
|
||||||
Name[es]=Mostrar en la ventana especificada
|
|
||||||
Name[et]=Määratud aknas näitamine
|
|
||||||
Name[eu]=Bistaratu zehaztutako lehioan
|
|
||||||
Name[fa]=نمایش در پنجره مشخصشده
|
|
||||||
Name[fi]=Näytä määrätyssä ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre spécifiée
|
|
||||||
Name[fy]=Werjefte yn in definiearre finster
|
|
||||||
Name[ga]=Taispeáin san Fhuinneog Sonraithe
|
|
||||||
Name[gl]=Mostrar na xanela indicada
|
|
||||||
Name[he]=הצג בחלון המצוין
|
|
||||||
Name[hne]=निरधारित विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u određenom prozoru
|
|
||||||
Name[hu]=Megjelenítés a megadott ablakban
|
|
||||||
Name[is]=Birta í völdum glugga
|
|
||||||
Name[it]=Mostra nella finestra specificata
|
|
||||||
Name[ja]=指定したウィンドウで表示
|
|
||||||
Name[kk]=Келтірілген терезеде көрсетілсін
|
|
||||||
Name[ko]=지정한 창에 보이기
|
|
||||||
Name[lt]=Rodyti nurodytame lange
|
|
||||||
Name[lv]=Rādīt norādītajā logā
|
|
||||||
Name[mai]=निर्दिष्ट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во наведениот прозорец
|
|
||||||
Name[ml]=പ്രത്യേകം പറഞ്ഞിരിക്കുന്ന ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=निर्देशीत चौकटीत दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Yang Dinyatakan
|
|
||||||
Name[nb]=Vis i angitt vindu
|
|
||||||
Name[nds]=In utsöcht Finster wiesen
|
|
||||||
Name[ne]=निर्दिष्ट सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven In een opgegeven venster
|
|
||||||
Name[nn]=Vis i oppgjeve vindauge
|
|
||||||
Name[pa]=ਦੱਸੇ ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w zadanym oknie
|
|
||||||
Name[pt]=Mostrar na Janela Indicada
|
|
||||||
Name[pt_BR]=Exibir na janela indicada
|
|
||||||
Name[ro]=Afișează în fereastra specificată
|
|
||||||
Name[ru]=Показывать в указанном окне
|
|
||||||
Name[sk]=Zobraziť v zadanom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren e Specifikuar
|
|
||||||
Name[sr]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sv]=Visa i angivet fönster
|
|
||||||
Name[ta]=குறித்த சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи нишондода намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างที่กำหนด
|
|
||||||
Name[tr]=Belirtilen Pencerede Göster
|
|
||||||
Name[ug]=بەلگىلەنگەن كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити у вказаному вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Đã định
|
|
||||||
Name[x-test]=xxDisplay in Specified Windowxx
|
|
||||||
Name[zh_CN]=在指定的窗口中显示
|
|
||||||
Name[zh_TW]=在指定的視窗中顯示
|
|
||||||
NoDisplay=true
|
|
||||||
|
|
||||||
[Desktop Action Root]
|
|
||||||
Exec=kvm.kss -root
|
|
||||||
Name=Display in Root Window
|
|
||||||
Name[ast]=Amosar na ventana raíz
|
|
||||||
Name[bg]=Показване в главния прозорец
|
|
||||||
Name[br]=Diskwel er prenestr gwrizienn
|
|
||||||
Name[bs]=Prikaži u korijenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra arrel
|
|
||||||
Name[ca@valencia]=Mostra a la finestra arrel
|
|
||||||
Name[cs]=Zobrazit na pozadí plochy
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Wraidd
|
|
||||||
Name[da]=Visning i root-vindue
|
|
||||||
Name[de]=In Hintergrundfenster anzeigen
|
|
||||||
Name[el]=Προβολή στο βασικό παράθυρο
|
|
||||||
Name[en_GB]=Display in Root Window
|
|
||||||
Name[eo]=Montri en radika fenestro
|
|
||||||
Name[es]=Mostrar en la ventana raíz
|
|
||||||
Name[et]=Juuraknas näitamine
|
|
||||||
Name[eu]=Bistaratu erro lehioan
|
|
||||||
Name[fa]=نمایش در پنجره ریشه
|
|
||||||
Name[fi]=Näytä juuri-ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre racine
|
|
||||||
Name[fy]=Werjefte yn haadfinster
|
|
||||||
Name[ga]=Taispeáin sa Phríomhfhuinneog
|
|
||||||
Name[gl]=Mostrar na xanela raíz
|
|
||||||
Name[he]=הצג בחלון השורש
|
|
||||||
Name[hne]=रूट विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u ishodišnom prozoru
|
|
||||||
Name[hu]=Megjelenítés a gyökérablakban
|
|
||||||
Name[is]=Birta í rótarglugganum
|
|
||||||
Name[it]=Mostra sullo sfondo
|
|
||||||
Name[ja]=ルートウィンドウで表示
|
|
||||||
Name[kk]=Түбір терезесінде көрсетілсін
|
|
||||||
Name[ko]=전체 화면으로 보이기
|
|
||||||
Name[lt]=Rodyti root lange
|
|
||||||
Name[lv]=Rādīt saknes logā
|
|
||||||
Name[mai]=रूट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во коренскиот прозорец
|
|
||||||
Name[ml]=മൂല ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=रूट चौकट मध्ये दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Root
|
|
||||||
Name[nb]=Vis i root-vindu
|
|
||||||
Name[nds]=In Hööftfinster wiesen
|
|
||||||
Name[ne]=मूल सञ्झ्यालमा प्रदर्शन
|
|
||||||
Name[nl]=Weergeven in hoofdvenster
|
|
||||||
Name[nn]=Vis i rotvindauget
|
|
||||||
Name[pa]=Root ਝਰੋਖੇ ਵਿੱਚ ਵੇਖਾਓ
|
|
||||||
Name[pl]=Wyświetl w oknie głównym
|
|
||||||
Name[pt]=Mostrar na Janela de Fundo
|
|
||||||
Name[pt_BR]=Exibir na janela raiz
|
|
||||||
Name[ro]=Afișează în fereastra rădăcină
|
|
||||||
Name[ru]=Показывать в корневом окне
|
|
||||||
Name[sk]=Zobraziť v koreňovom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaq në Dritaren Bazë
|
|
||||||
Name[sr]=Прикажи у кореном прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у корјеном прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u korjenom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u korenom prozoru
|
|
||||||
Name[sv]=Visa i rotfönstret
|
|
||||||
Name[ta]=ஆரம்ப சாளரத்தில் காட்டு
|
|
||||||
Name[tg]=Дар тирезаи решагӣ намоиш намоед
|
|
||||||
Name[th]=แสดงในหน้าต่างราก
|
|
||||||
Name[tr]=Kök Pencerede Göster
|
|
||||||
Name[ug]=غول كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Відобразити в кореневому вікні
|
|
||||||
Name[vi]=Hiển thị trong Cửa sổ Gốc
|
|
||||||
Name[x-test]=xxDisplay in Root Windowxx
|
|
||||||
Name[zh_CN]=在根窗口中显示
|
|
||||||
Name[zh_TW]=在根視窗中顯示
|
|
||||||
NoDisplay=true
|
|
|
@ -1,3 +0,0 @@
|
||||||
These are native KDE screensavers using the libkscreensaver library.
|
|
||||||
If you are writing a screensaver for KDE use these as references rather
|
|
||||||
than the ported savers.
|
|
|
@ -1,4 +0,0 @@
|
||||||
File=asciiquarium.kcfg
|
|
||||||
ClassName=AASaverConfig
|
|
||||||
Singleton=true
|
|
||||||
Mutators=true
|
|
|
@ -1,15 +0,0 @@
|
||||||
set(kdeasciiquarium_SRCS
|
|
||||||
aasaver.cpp
|
|
||||||
frame.cpp
|
|
||||||
screen.cpp
|
|
||||||
sprite.cpp
|
|
||||||
settingswidget.ui
|
|
||||||
)
|
|
||||||
|
|
||||||
kde4_add_kcfg_files(kdeasciiquarium_SRCS AASaverConfig.kcfgc)
|
|
||||||
add_executable(kdeasciiquarium.kss ${kdeasciiquarium_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(kdeasciiquarium.kss ${KDE4_KDEUI_LIBS} kscreensaver)
|
|
||||||
install(TARGETS kdeasciiquarium.kss ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
||||||
|
|
||||||
install(FILES asciiquarium.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR}/ScreenSavers)
|
|
|
@ -1,3 +0,0 @@
|
||||||
#! /usr/bin/env bash
|
|
||||||
$EXTRACTRC *.ui *.kcfg >> rc.cpp
|
|
||||||
$XGETTEXT *.cpp -o $podir/kdeasciiquarium.pot
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,183 +0,0 @@
|
||||||
/*
|
|
||||||
* Asciiquarium - Native KDE Screensaver based on the Asciiquarium program
|
|
||||||
* (c) Kirk Baucom <kbaucom@schizoid.com>, which you can find at
|
|
||||||
* http://www.robobunny.com/projects/asciiquarium/
|
|
||||||
*
|
|
||||||
* Ported to KDE by Maksim Orlovich <maksim@kde.org> and
|
|
||||||
* Michael Pyne <michael.pyne@kdemail.net>.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2003 Kirk Baucom <kbaucom@schizoid.com>
|
|
||||||
* Copyright (c) 2005 Maksim Orlovich <maksim@kde.org>
|
|
||||||
* Copyright (c) 2005, 2008 Michael Pyne <michael.pyne@kdemail.net>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
|
||||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef AA_AASAVER_H
|
|
||||||
#define AA_AASAVER_H
|
|
||||||
|
|
||||||
#include <kscreensaver.h>
|
|
||||||
#include <KRandomSequence>
|
|
||||||
|
|
||||||
class Screen;
|
|
||||||
class Sprite;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The main class for the Asciiquarium screensaver.
|
|
||||||
*/
|
|
||||||
class AASaver: public KScreenSaver
|
|
||||||
{
|
|
||||||
/// Handles the animation and drawing.
|
|
||||||
Screen* screen;
|
|
||||||
|
|
||||||
/// Randomizes the sequence of fish, seaweeds, colors, etc.
|
|
||||||
KRandomSequence m_randomSequence;
|
|
||||||
|
|
||||||
/// Static singleton instance.
|
|
||||||
static AASaver *m_instance;
|
|
||||||
|
|
||||||
public:
|
|
||||||
/// Construct the screensaver with window id \p id.
|
|
||||||
AASaver(WId id);
|
|
||||||
|
|
||||||
static AASaver *instance();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a QString holding a color mask, created by choosing random colors
|
|
||||||
* to replace numbers in \p color_mask.
|
|
||||||
*/
|
|
||||||
QString randColor(QString color_mask);
|
|
||||||
|
|
||||||
double doubleRand(int max);
|
|
||||||
|
|
||||||
/// Adds the castle sprite to the screen.
|
|
||||||
void addCastle();
|
|
||||||
|
|
||||||
/// Adds the environment (sea, etc.) to the screen.
|
|
||||||
void addEnvironment();
|
|
||||||
|
|
||||||
/// Adds the seaweed to the screen.
|
|
||||||
void addAllSeaweed();
|
|
||||||
|
|
||||||
/// Adds the initial layout of fish to the sea, scaling the number of fish
|
|
||||||
/// based on the current screen size.
|
|
||||||
void addAllFish();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a seaweed to a random position of the sea bottom.
|
|
||||||
*
|
|
||||||
* @param screen The Screen to add into.
|
|
||||||
*/
|
|
||||||
void addSeaweed(Screen* screen);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a new fish sprite, which has not yet been added to a screen.
|
|
||||||
*
|
|
||||||
* @param screen The Screen to use when constructing the Sprite.
|
|
||||||
* @todo Combine with addFish().
|
|
||||||
*/
|
|
||||||
Sprite *newFish(Screen *screen);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a new fish sprite to \p screen.
|
|
||||||
*
|
|
||||||
* @param screen The Screen to add a fish to.
|
|
||||||
*/
|
|
||||||
void addFish(Screen *screen);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a new air bubble sprite to \p screen. The \p x, \p y, and \p z
|
|
||||||
* coordinates are all in logical coordinates.
|
|
||||||
*
|
|
||||||
* @param screen The Screen to add the bubble to.
|
|
||||||
* @param x The x position to start the bubble at.
|
|
||||||
* @param y The y position to start the bubble at.
|
|
||||||
* @param z The z position to start the bubble at.
|
|
||||||
*/
|
|
||||||
void addBubble(Screen* screen, int x, int y, int z);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a Nessie, the Loch Ness Monster sprite to \p screen.
|
|
||||||
*
|
|
||||||
* @param screen The Screen to add Nessie to.
|
|
||||||
*/
|
|
||||||
void addNessie(Screen* screen);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a big fish sprite to \p screen.
|
|
||||||
*
|
|
||||||
* @param screen The Screen to add the big fish to.
|
|
||||||
*/
|
|
||||||
void addBigFish(Screen* screen);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a whale sprite to \p screen.
|
|
||||||
*
|
|
||||||
* @param screen The Screen to add the whale to.
|
|
||||||
*/
|
|
||||||
void addWhale(Screen* screen);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a shark sprite to \p screen. The shark can kill() fish it comes in
|
|
||||||
* contact with (they will spawn more fish automatically).
|
|
||||||
*
|
|
||||||
* @param screen The Screen to add the shark to.
|
|
||||||
*/
|
|
||||||
void addShark(Screen* screen);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a submarine sprite to \p screen. The submarine can kill() fish it
|
|
||||||
* comes in contact with (they will spawn more fish automatically).
|
|
||||||
*
|
|
||||||
* @param screen The Screen to add the submarine to.
|
|
||||||
* @author Ryan Meldrum <ryjame@cox.net>
|
|
||||||
* @since KDE SC 4.6
|
|
||||||
*/
|
|
||||||
void addSubmarine(Screen* screen);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a ship sprite to \p screen.
|
|
||||||
*
|
|
||||||
* @param screen The Screen to add the ship to.
|
|
||||||
*/
|
|
||||||
void addShip(Screen* screen);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a random object from the set (Shark, Big Fish, Nessie, Whale, Ship, Sub)
|
|
||||||
* to the sea.
|
|
||||||
*
|
|
||||||
* @param screen The Screen to add to.
|
|
||||||
*/
|
|
||||||
void addRandom(Screen* screen);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reimplemented to update the widget when it gets dirty.
|
|
||||||
*/
|
|
||||||
virtual void paintEvent(QPaintEvent* pe);
|
|
||||||
};
|
|
||||||
|
|
||||||
class AASaverInterface : public KScreenSaverInterface
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual ~AASaverInterface();
|
|
||||||
|
|
||||||
virtual KAboutData *aboutData();
|
|
||||||
virtual KScreenSaver *create(WId id);
|
|
||||||
virtual QDialog *setup();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* AA_AASAVER_H */
|
|
||||||
|
|
||||||
// vim: set et ts=8 sw=4:
|
|
|
@ -1,232 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Name=Asciiquarium
|
|
||||||
Name[ast]=Asciiacuariu
|
|
||||||
Name[bg]=Текстов аквариум
|
|
||||||
Name[bs]=Asciiquarium
|
|
||||||
Name[ca]=Asciiquarium
|
|
||||||
Name[ca@valencia]=Asciiquarium
|
|
||||||
Name[cs]=ASCIIkvárium
|
|
||||||
Name[da]=Asciiquarium
|
|
||||||
Name[de]=Asciiquarium
|
|
||||||
Name[el]=Asciiquarium
|
|
||||||
Name[en_GB]=Asciiquarium
|
|
||||||
Name[es]=Acuario ascii
|
|
||||||
Name[et]=Asciiquarium
|
|
||||||
Name[eu]=Asciiquarium
|
|
||||||
Name[fi]=Asciiquarium
|
|
||||||
Name[fr]=Asciiquarium
|
|
||||||
Name[ga]=Asciiquarium
|
|
||||||
Name[gl]=Asciiquarium
|
|
||||||
Name[hne]=आस्कीक्वेरियम
|
|
||||||
Name[hu]=Asciiquarium
|
|
||||||
Name[is]=Asciiquarium
|
|
||||||
Name[it]=Asciiquario
|
|
||||||
Name[ja]=アスキー水族館
|
|
||||||
Name[kk]=Ascii-аквариум
|
|
||||||
Name[ko]=ASCII 수족관
|
|
||||||
Name[lt]=Asciikvariumas
|
|
||||||
Name[lv]=Asciikvārijs
|
|
||||||
Name[mk]=Ascii-аквариум
|
|
||||||
Name[ml]=ആസ്കിക്വേറിയം
|
|
||||||
Name[nb]=Asciikvarium
|
|
||||||
Name[nds]=Asciiquarium
|
|
||||||
Name[nl]=Asciiquarium
|
|
||||||
Name[nn]=Asciikvarium
|
|
||||||
Name[pl]=Asciiquarium
|
|
||||||
Name[pt]=Asciiquarium
|
|
||||||
Name[pt_BR]=Asciiquarium
|
|
||||||
Name[ro]=Asciicvariu
|
|
||||||
Name[ru]=Бумажный аквариум
|
|
||||||
Name[sk]=Asciiquarium
|
|
||||||
Name[sl]=Asciiquarium
|
|
||||||
Name[sq]=Asciiquarium
|
|
||||||
Name[sr]=Аскикваријум
|
|
||||||
Name[sr@ijekavian]=Аскикваријум
|
|
||||||
Name[sr@ijekavianlatin]=Asciiquarium
|
|
||||||
Name[sr@latin]=Asciiquarium
|
|
||||||
Name[sv]=Asciikvarium
|
|
||||||
Name[tr]=Asciivaryum
|
|
||||||
Name[uk]=Текстовий акваріум
|
|
||||||
Name[x-test]=xxAsciiquariumxx
|
|
||||||
Name[zh_CN]=Asciiquarium
|
|
||||||
Name[zh_TW]=Ascii 水族箱
|
|
||||||
Exec=kdeasciiquarium.kss -caption %c
|
|
||||||
Icon=preferences-desktop-screensaver
|
|
||||||
Type=Service
|
|
||||||
X-KDE-ServiceTypes=ScreenSaver
|
|
||||||
Actions=InWindow;Root;Setup;
|
|
||||||
|
|
||||||
[Desktop Action InWindow]
|
|
||||||
Name=Display in specified window
|
|
||||||
Name[ast]=Amosar na ventana especificada
|
|
||||||
Name[bg]=Показване в избран прозорец
|
|
||||||
Name[bs]=Prikaži u određenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra especificada
|
|
||||||
Name[ca@valencia]=Mostra a la finestra especificada
|
|
||||||
Name[cs]=Zobrazit v určeném okně
|
|
||||||
Name[da]=Vis i angivet vindue
|
|
||||||
Name[de]=In bestimmten Fenster anzeigen
|
|
||||||
Name[el]=Εμφάνιση σε καθορισμένο παράθυρο
|
|
||||||
Name[en_GB]=Display in specified window
|
|
||||||
Name[es]=Mostrar en la ventana especificada
|
|
||||||
Name[et]=Määratud aknas näitamine
|
|
||||||
Name[eu]=Bistaratu zehaztutako lehioan
|
|
||||||
Name[fi]=Näytä määräikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre spécifiée
|
|
||||||
Name[ga]=Taispeáin san fhuinneog sonraithe
|
|
||||||
Name[gl]=Mostrar na xanela indicada
|
|
||||||
Name[hne]=खास विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u određenom prozoru
|
|
||||||
Name[hu]=Megjelenítés a megadott ablakban
|
|
||||||
Name[is]=Birta í völdum glugga
|
|
||||||
Name[it]=Mostra nella finestra specificata
|
|
||||||
Name[ja]=指定したウィンドウに表示
|
|
||||||
Name[kk]=Келтірілген терезеде көрсетілсін
|
|
||||||
Name[ko]=지정한 창에 보이기
|
|
||||||
Name[lt]=Rodyti nurodytame lange
|
|
||||||
Name[lv]=Rādīt norādītajā logā
|
|
||||||
Name[mk]=Прикажи во наведениот прозорец
|
|
||||||
Name[ml]=പ്രത്യേകം പറഞ്ഞിരിക്കുന്ന ജാലകത്തില് പ്രദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=निर्देशीत चौकटीत दर्शवा
|
|
||||||
Name[nb]=Vis i angitt vindu
|
|
||||||
Name[nds]=In angeven Finster wiesen
|
|
||||||
Name[nl]=In opgegeven venster weergeven
|
|
||||||
Name[nn]=Vis i oppgjeve vindauge
|
|
||||||
Name[pa]=ਦੱਸੀ ਵਿੰਡੋ ਵਿੱਚ ਵੇਖੋ
|
|
||||||
Name[pl]=Wyświetl w zadanym oknie
|
|
||||||
Name[pt]=Mostrar na janela indicada
|
|
||||||
Name[pt_BR]=Exibir na janela indicada
|
|
||||||
Name[ro]=Afișează în fereastra specificată
|
|
||||||
Name[ru]=Показывать в указанном окне
|
|
||||||
Name[sk]=Zobraziť v zadanom okne
|
|
||||||
Name[sl]=Pokaži v določenem oknu
|
|
||||||
Name[sq]=Shfaqe në dritaren e specifikuar
|
|
||||||
Name[sr]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у задатом прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u zadatom prozoru
|
|
||||||
Name[sv]=Visa i angivet fönster
|
|
||||||
Name[tr]=Belirtilen pencerede göster
|
|
||||||
Name[ug]=بەلگىلەنگەن كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Показувати у визначеному вікні
|
|
||||||
Name[x-test]=xxDisplay in specified windowxx
|
|
||||||
Name[zh_CN]=在指定的窗口中显示
|
|
||||||
Name[zh_TW]=在指定的視窗中顯示
|
|
||||||
Exec=kdeasciiquarium.kss -window-id %w
|
|
||||||
NoDisplay=true
|
|
||||||
|
|
||||||
[Desktop Action Root]
|
|
||||||
Name=Display in root window
|
|
||||||
Name[ast]=Amosar na ventana raíz
|
|
||||||
Name[bg]=Показавне в главния прозорец
|
|
||||||
Name[bs]=Prikaži u korijenskom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra arrel
|
|
||||||
Name[ca@valencia]=Mostra a la finestra arrel
|
|
||||||
Name[cs]=Zobrazit na pozadí plochy
|
|
||||||
Name[da]=Vis i rod-vindue
|
|
||||||
Name[de]=In Hintergrundfenster anzeigen
|
|
||||||
Name[el]=Εμφάνιση στο ριζικό παράθυρο
|
|
||||||
Name[en_GB]=Display in root window
|
|
||||||
Name[es]=Mostrar en la ventana raíz
|
|
||||||
Name[et]=Juuraknas näitamine
|
|
||||||
Name[eu]=Bistaratu erroko lehioan
|
|
||||||
Name[fi]=Näytä juuri-ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre racine
|
|
||||||
Name[ga]=Taispeáin sa phríomhfhuinneog
|
|
||||||
Name[gl]=Mostrar na xanela raíz
|
|
||||||
Name[hne]=रूट विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u ishodišnom prozoru
|
|
||||||
Name[hu]=Megjelenítés a gyökérablakban
|
|
||||||
Name[is]=Birta í rótarglugganum
|
|
||||||
Name[it]=Mostra sullo sfondo
|
|
||||||
Name[ja]=ルートウィンドウに表示
|
|
||||||
Name[kk]=Түбір терезесінде көрсетілсін
|
|
||||||
Name[ko]=전체 화면으로 보이기
|
|
||||||
Name[lt]=Rodyti šakniniame lange
|
|
||||||
Name[lv]=Rādīt saknes logā
|
|
||||||
Name[mk]=Прикажи во коренскиот прозорец
|
|
||||||
Name[ml]=മൂല ജാലകത്തില് പ്ര്ദര്ശിപ്പിക്കുക
|
|
||||||
Name[mr]=रूट चौकट मध्ये दर्शवा
|
|
||||||
Name[nb]=Vis i root-vindu
|
|
||||||
Name[nds]=In Hööftfinster wiesen
|
|
||||||
Name[nl]=In hoofdvenster weergeven
|
|
||||||
Name[nn]=Vis i rotvindauget
|
|
||||||
Name[pa]=ਰੂਟ ਵਿੰਡੋ ਵਿੱਚ ਵੇਖੋ
|
|
||||||
Name[pl]=Wyświetl w oknie głównym
|
|
||||||
Name[pt]=Mostrar na janela de fundo
|
|
||||||
Name[pt_BR]=Exibir na janela raiz
|
|
||||||
Name[ro]=Afișează în fereastra rădăcină
|
|
||||||
Name[ru]=Показывать в корневом окне
|
|
||||||
Name[sk]=Zobraziť v koreňovom okne
|
|
||||||
Name[sl]=Pokaži v korenskem oknu
|
|
||||||
Name[sq]=Shfaqe në dritaren bazë
|
|
||||||
Name[sr]=Прикажи у кореном прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у корјеном прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u korjenom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u korenom prozoru
|
|
||||||
Name[sv]=Visa i rotfönstret
|
|
||||||
Name[tr]=Kök pencerede göster
|
|
||||||
Name[ug]=باش كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Показувати у кореневому вікні
|
|
||||||
Name[x-test]=xxDisplay in root windowxx
|
|
||||||
Name[zh_CN]=在根窗口中显示
|
|
||||||
Name[zh_TW]=在根視窗中顯示
|
|
||||||
Exec=kdeasciiquarium.kss -root
|
|
||||||
NoDisplay=true
|
|
||||||
|
|
||||||
[Desktop Action Setup]
|
|
||||||
Name=Display setup dialog
|
|
||||||
Name[ast]=Amosar el menú de configuración
|
|
||||||
Name[bg]=Прозорец за настройки
|
|
||||||
Name[bs]=Prikaži podešavajući dijalog
|
|
||||||
Name[ca]=Mostra el diàleg de configuració
|
|
||||||
Name[ca@valencia]=Mostra el diàleg de configuració
|
|
||||||
Name[cs]=Zobrazit dialog nastavení
|
|
||||||
Name[da]=Vis opsætningsdialog
|
|
||||||
Name[de]=Einrichtungsdialog anzeigen
|
|
||||||
Name[el]=Εμφάνιση διαλόγου ρύθμισης
|
|
||||||
Name[en_GB]=Display setup dialogue
|
|
||||||
Name[es]=Mostrar el diálogo de configuración
|
|
||||||
Name[et]=Seadistustedialoogi näitamine
|
|
||||||
Name[eu]=Bistaratu konfigurazioko elkarrizketa-koadroa
|
|
||||||
Name[fi]=Näytä asetusikkuna
|
|
||||||
Name[fr]=Afficher la boîte de dialogue de configuration
|
|
||||||
Name[ga]=Taispeáin dialóg shocraithe
|
|
||||||
Name[gl]=Mostrar o diálogo de configuración
|
|
||||||
Name[hne]=सेटअप गोठ देखाव
|
|
||||||
Name[hr]=Prikaži dijalog za postavke
|
|
||||||
Name[hu]=Beállítóablak
|
|
||||||
Name[is]=Sýna stillingaglugga
|
|
||||||
Name[it]=Mostra la finestra di configurazione
|
|
||||||
Name[ja]=表示設定ダイアログ
|
|
||||||
Name[kk]=Баптау диалогын көрсету
|
|
||||||
Name[ko]=설정 대화상자 보이기
|
|
||||||
Name[lt]=Ekrano nustatymų dialogas
|
|
||||||
Name[lv]=Rādīt konfigurācijas logu
|
|
||||||
Name[mk]=Прикажи дијалог за поставување
|
|
||||||
Name[ml]=ഒരുക്ക ഡയലോഗ് കാണിക്കുക
|
|
||||||
Name[nb]=Vis oppsettsdialog
|
|
||||||
Name[nds]=Instelldialoog wiesen
|
|
||||||
Name[nl]=Instellingendialoog weergeven
|
|
||||||
Name[nn]=Vis oppsettvindauge
|
|
||||||
Name[pa]=ਡਿਸਪਲੇਅ ਸੈਟਅੱਪ ਡਾਈਲਾਗ
|
|
||||||
Name[pl]=Wyświetl okno dialogowe
|
|
||||||
Name[pt]=Mostrar a janela de configuração
|
|
||||||
Name[pt_BR]=Exibe o diálogo de configurações
|
|
||||||
Name[ro]=Dialog de configurare a afișajului
|
|
||||||
Name[ru]=Показать диалог настройки
|
|
||||||
Name[sk]=Zobraziť dialóg nastavenia
|
|
||||||
Name[sl]=Prikaži okno za nastavljanje
|
|
||||||
Name[sq]=Shfaq dialogun e instalimit
|
|
||||||
Name[sr]=Прикажи дијалог за подешавање
|
|
||||||
Name[sr@ijekavian]=Прикажи дијалог за подешавање
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži dijalog za podešavanje
|
|
||||||
Name[sr@latin]=Prikaži dijalog za podešavanje
|
|
||||||
Name[sv]=Visa inställningsdialogruta
|
|
||||||
Name[tr]=Ekran ayarlama penceresi
|
|
||||||
Name[uk]=Показати діалогове вікно налаштування
|
|
||||||
Name[x-test]=xxDisplay setup dialogxx
|
|
||||||
Name[zh_CN]=显示安装对话框
|
|
||||||
Name[zh_TW]=顯示設定對話框
|
|
||||||
Exec=kdeasciiquarium.kss -setup
|
|
||||||
Icon=kscreensaver
|
|
|
@ -1,13 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
|
|
||||||
<kcfg>
|
|
||||||
<kcfgfile name="asciiquariumrc"/>
|
|
||||||
<group name="Settings">
|
|
||||||
<entry name="fishCount" type="Int">
|
|
||||||
<label>Number of fish to have in the sea.</label>
|
|
||||||
<default>20</default>
|
|
||||||
<whatsthis>You can use this value to select the number of fish that will be on screen at a given time.</whatsthis>
|
|
||||||
</entry>
|
|
||||||
</group>
|
|
||||||
</kcfg>
|
|
||||||
<!-- vim: set noet ts=4: -->
|
|
|
@ -1,208 +0,0 @@
|
||||||
/*
|
|
||||||
* Asciiquarium - Native KDE Screensaver based on the Asciiquarium program
|
|
||||||
* (c) Kirk Baucom <kbaucom@schizoid.com>, which you can find at
|
|
||||||
* http://www.robobunny.com/projects/asciiquarium/
|
|
||||||
*
|
|
||||||
* Ported to KDE by Maksim Orlovich <maksim@kde.org> and
|
|
||||||
* Michael Pyne <mpyne@kde.org>.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2003 Kirk Baucom <kbaucom@schizoid.com>
|
|
||||||
* Copyright (c) 2005 Maksim Orlovich <maksim@kde.org>
|
|
||||||
* Copyright (c) 2005, 2008, 2012 Michael Pyne <mpyne@kde.org>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
|
||||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "frame.h"
|
|
||||||
|
|
||||||
#include <kglobalsettings.h>
|
|
||||||
#include <kdebug.h>
|
|
||||||
|
|
||||||
#include <QtCore/QStringList>
|
|
||||||
#include <QtGui/QImage>
|
|
||||||
#include <QtGui/QFontMetrics>
|
|
||||||
#include <QtGui/QPainter>
|
|
||||||
|
|
||||||
void Frame::convertDataToPixmap(const Screen *screen)
|
|
||||||
{
|
|
||||||
if(!height() || !width()) {
|
|
||||||
// Assume we're not ready to go.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int w = screen->cellWidth(), h = screen->cellHeight();
|
|
||||||
QImage pix(width() * w, height() * h, QImage::Format_ARGB32_Premultiplied);
|
|
||||||
pix.fill(Qt::transparent);
|
|
||||||
|
|
||||||
QPainter p;
|
|
||||||
|
|
||||||
p.begin(&pix);
|
|
||||||
|
|
||||||
p.setCompositionMode(QPainter::CompositionMode_Source);
|
|
||||||
p.setRenderHint(QPainter::TextAntialiasing);
|
|
||||||
p.setFont(KGlobalSettings::fixedFont());
|
|
||||||
|
|
||||||
QFontMetrics fm(p.fontMetrics());
|
|
||||||
|
|
||||||
for(int j = 0; j < m_data.count(); ++j) {
|
|
||||||
QVector<Screen::Pixel> row = m_data[j];
|
|
||||||
if(row.isEmpty())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
int first, last;
|
|
||||||
for (first = 0; first < row.count() && row[first].letter == ' '; ++first)
|
|
||||||
;
|
|
||||||
|
|
||||||
last = row.count() - 1; // Assume the end is already stripped.
|
|
||||||
|
|
||||||
for(int i = first; i <= last; ++i) {
|
|
||||||
if(QLatin1Char( row[i].letter ) == m_transparentChar )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
QRect r(i * w, j * h, w, h);
|
|
||||||
|
|
||||||
p.setPen(row[i].color);
|
|
||||||
p.fillRect(r, Qt::black); // Completely fill since drawText won't even in Opaque.
|
|
||||||
p.drawText(r, Qt::AlignCenter, QString(QChar(row[i].letter, 0)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
p.end();
|
|
||||||
|
|
||||||
QImage eraseImage(pix.size(), QImage::Format_RGB32);
|
|
||||||
eraseImage.fill(qRgb(0, 0, 0));
|
|
||||||
|
|
||||||
// Since QPixmap::fill() seems broken on some nVidia drivers????
|
|
||||||
m_erasePixmap = QPixmap::fromImage(eraseImage);
|
|
||||||
m_pixmap = QPixmap::fromImage(pix);
|
|
||||||
|
|
||||||
// Clear m_data to save a wee bit of memory.
|
|
||||||
m_data.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
Frame::Frame (const QString& text, const QString& mask, const QRgb& defaultColor, QChar transparent)
|
|
||||||
{
|
|
||||||
//First, process the pixels.
|
|
||||||
|
|
||||||
QStringList rows = text.split(QLatin1Char( '\n' ));
|
|
||||||
m_height = rows.size();
|
|
||||||
m_width = 0;
|
|
||||||
m_transparentChar = transparent;
|
|
||||||
|
|
||||||
// curRow is deliberately not const& as we must modify it a bit in the loop. It does
|
|
||||||
// not alias strings in rows however otherwise we would have to manually make a copy.
|
|
||||||
foreach(QString curRow, rows) { //krazy:exclude=foreach
|
|
||||||
QVector<Screen::Pixel> row;
|
|
||||||
int strLen = curRow.length(); // make sure this is cached.
|
|
||||||
|
|
||||||
// ?? is changed to {} for trigraph purposes, change it back.
|
|
||||||
curRow.replace(QLatin1String( "{}" ), QLatin1String( "??" ));
|
|
||||||
|
|
||||||
for (int pos = 0; pos < strLen; ++pos)
|
|
||||||
{
|
|
||||||
Screen::Pixel p;
|
|
||||||
p.letter = curRow.at(pos).unicode();
|
|
||||||
p.color = defaultColor;
|
|
||||||
row.append(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_width = qMax(m_width, row.size());
|
|
||||||
m_data.append(row);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now, the colors.
|
|
||||||
QStringList cols = mask.split(QLatin1Char( '\n' ));
|
|
||||||
int y = 0;
|
|
||||||
|
|
||||||
foreach(const QString &curCol, cols) {
|
|
||||||
if (y >= m_data.size())
|
|
||||||
break;
|
|
||||||
|
|
||||||
for (int pos = 0; pos < curCol.length() && pos < m_data[y].size(); ++pos)
|
|
||||||
{
|
|
||||||
switch (curCol.at(pos).unicode())
|
|
||||||
{
|
|
||||||
//Colors stolen from konsole, TEWidget.cpp
|
|
||||||
case 'R':
|
|
||||||
m_data[y][pos].color = 0xFF5454;
|
|
||||||
break;
|
|
||||||
case 'r':
|
|
||||||
m_data[y][pos].color = 0xB21818;
|
|
||||||
break;
|
|
||||||
case 'C':
|
|
||||||
m_data[y][pos].color = 0x54FFFF;
|
|
||||||
break;
|
|
||||||
case 'c':
|
|
||||||
m_data[y][pos].color = 0x18B2B2;
|
|
||||||
break;
|
|
||||||
case 'Y':
|
|
||||||
m_data[y][pos].color = 0xFFFF54;
|
|
||||||
break;
|
|
||||||
case 'y':
|
|
||||||
m_data[y][pos].color = 0xB26818;
|
|
||||||
break;
|
|
||||||
case 'G':
|
|
||||||
m_data[y][pos].color = 0x54FF54;
|
|
||||||
break;
|
|
||||||
case 'g':
|
|
||||||
m_data[y][pos].color = 0x18B218;
|
|
||||||
break;
|
|
||||||
case 'B':
|
|
||||||
m_data[y][pos].color = 0x5454FF;
|
|
||||||
break;
|
|
||||||
case 'b':
|
|
||||||
m_data[y][pos].color = 0x1818B2;
|
|
||||||
break;
|
|
||||||
case 'M':
|
|
||||||
m_data[y][pos].color = 0xFF54FF;
|
|
||||||
break;
|
|
||||||
case 'm':
|
|
||||||
m_data[y][pos].color = 0xB218B2;
|
|
||||||
break;
|
|
||||||
case 'W':
|
|
||||||
m_data[y][pos].color = 0xFFFFFF;
|
|
||||||
break;
|
|
||||||
case 'w':
|
|
||||||
m_data[y][pos].color = 0xB2B2B2;
|
|
||||||
break;
|
|
||||||
case ' ':
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
kDebug() << "dunno about color code:" << curCol.at(pos);
|
|
||||||
m_data[y][pos].color = 0xFFFFFF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
++y;
|
|
||||||
} // foreach
|
|
||||||
}
|
|
||||||
|
|
||||||
void Frame::paint(Screen* scr, int x, int y)
|
|
||||||
{
|
|
||||||
if(m_pixmap.isNull())
|
|
||||||
convertDataToPixmap(scr);
|
|
||||||
|
|
||||||
scr->updateSpan(x, y, m_pixmap);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Frame::erase(Screen* scr, int x, int y)
|
|
||||||
{
|
|
||||||
if(m_erasePixmap.isNull())
|
|
||||||
convertDataToPixmap(scr);
|
|
||||||
|
|
||||||
scr->clearSpan(x, y, m_erasePixmap);
|
|
||||||
}
|
|
||||||
|
|
||||||
// vim: set et ts=8 sw=4:
|
|
|
@ -1,151 +0,0 @@
|
||||||
/*
|
|
||||||
* Asciiquarium - Native KDE Screensaver based on the Asciiquarium program
|
|
||||||
* (c) Kirk Baucom <kbaucom@schizoid.com>, which you can find at
|
|
||||||
* http://www.robobunny.com/projects/asciiquarium/
|
|
||||||
*
|
|
||||||
* Ported to KDE by Maksim Orlovich <maksim@kde.org> and
|
|
||||||
* Michael Pyne <michael.pyne@kdemail.net>.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2003 Kirk Baucom <kbaucom@schizoid.com>
|
|
||||||
* Copyright (c) 2005 Maksim Orlovich <maksim@kde.org>
|
|
||||||
* Copyright (c) 2005, 2008 Michael Pyne <michael.pyne@kdemail.net>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
|
||||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef AA_FRAME_H
|
|
||||||
#define AA_FRAME_H
|
|
||||||
|
|
||||||
#include <QtCore/QString>
|
|
||||||
#include <QtCore/QVector>
|
|
||||||
#include <QtGui/QPixmap>
|
|
||||||
|
|
||||||
#include "screen.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents a single frame of a sprite's animation.
|
|
||||||
*
|
|
||||||
* @see Sprite
|
|
||||||
*/
|
|
||||||
class Frame
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Two-dimensional array of Pixels, which represent the appearance of this
|
|
||||||
* frame. This is used to create m_pixmap and m_erasePixmap when they are
|
|
||||||
* needed.
|
|
||||||
*
|
|
||||||
* @see Pixel
|
|
||||||
*/
|
|
||||||
QVector<QVector<Screen::Pixel> > m_data;
|
|
||||||
|
|
||||||
/// Masked pixmap of the animation frame. Created by convertDataToPixmap().
|
|
||||||
QPixmap m_pixmap;
|
|
||||||
|
|
||||||
/// Masked pixmap used to clear frame. Created by convertDataToPixmap().
|
|
||||||
QPixmap m_erasePixmap;
|
|
||||||
|
|
||||||
/// Height of this frame of animation in logical coordinates.
|
|
||||||
int m_height;
|
|
||||||
|
|
||||||
/// Width of this frame of animation in logical coordinates.
|
|
||||||
int m_width;
|
|
||||||
|
|
||||||
/// Character to be used as a special 'transparent' character. Normally is
|
|
||||||
/// the '?' character.
|
|
||||||
QChar m_transparentChar;
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs an empty animation Frame. Do not insert this into a Sprite.
|
|
||||||
*/
|
|
||||||
Frame() : m_height(0), m_width(0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs an animation frame.
|
|
||||||
*
|
|
||||||
* @param text Newline-separated text used to construct the Pixel arrays.
|
|
||||||
* The lines do not have to be equal length, any extra needed
|
|
||||||
* characters will automatically be filled with transparency.
|
|
||||||
* Any whitespace at the beginning of a line is converted to
|
|
||||||
* transparency as well.
|
|
||||||
*
|
|
||||||
* @param mask Newline-separated text used to mask \p text's colors. This
|
|
||||||
* can be empty or null in which case no masking is performed.
|
|
||||||
* However, if present, there should be the same number of
|
|
||||||
* lines in \p mask as in \p text, although individual lines
|
|
||||||
* can be shorter or empty as convienient. You can use letters
|
|
||||||
* to stand for colors, e.g. 'r' will make the letter in \p
|
|
||||||
* text at the same position dark red.
|
|
||||||
*
|
|
||||||
* @param defaultColor The default color to apply to characters. This
|
|
||||||
* color is used for all characters in \p text that are
|
|
||||||
* not altered by \p mask.
|
|
||||||
*
|
|
||||||
* @param transparent The character to use to represent transparent areas
|
|
||||||
* in \p text. This can be useful when the
|
|
||||||
* auto-transparency feature can't detect transparent
|
|
||||||
* areas.
|
|
||||||
*/
|
|
||||||
Frame(const QString& text, const QString& mask, const QRgb& defaultColor, QChar transparent = QLatin1Char('?'));
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Paints this Frame into the given screen.
|
|
||||||
*
|
|
||||||
* @param scr The Screen to draw into.
|
|
||||||
* @param x The logical x coordinate of the left edge of the update region.
|
|
||||||
* @param y The logical y coordinate of the top edge of the update region.
|
|
||||||
*/
|
|
||||||
void paint(Screen* scr, int x, int y);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Erases this Frame from the given screen.
|
|
||||||
*
|
|
||||||
* @param scr The Screen to draw into.
|
|
||||||
* @param x The logical x coordinate of the left edge of the update region.
|
|
||||||
* @param y The logical y coordinate of the top edge of the update region.
|
|
||||||
*/
|
|
||||||
void erase(Screen* scr, int x, int y);
|
|
||||||
|
|
||||||
/// Returns the logical width of this frame.
|
|
||||||
int width() const
|
|
||||||
{
|
|
||||||
return m_width;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the logical height of this frame.
|
|
||||||
int height() const
|
|
||||||
{
|
|
||||||
return m_height;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function converts the Pixel data in m_data to setup m_pixmap
|
|
||||||
* and m_erasePixmap, which are not setup until this function is called.
|
|
||||||
*
|
|
||||||
* m_data is not valid after this call is performed to save memory.
|
|
||||||
*
|
|
||||||
* @param screen The Screen we will be drawing into later.
|
|
||||||
*/
|
|
||||||
void convertDataToPixmap(const Screen *screen);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// vim: set et ts=8 sw=4:
|
|
|
@ -1,245 +0,0 @@
|
||||||
/*
|
|
||||||
* Asciiquarium - Native KDE Screensaver based on the Asciiquarium program
|
|
||||||
* (c) Kirk Baucom <kbaucom@schizoid.com>, which you can find at
|
|
||||||
* http://www.robobunny.com/projects/asciiquarium/
|
|
||||||
*
|
|
||||||
* Ported to KDE by Maksim Orlovich <maksim@kde.org> and
|
|
||||||
* Michael Pyne <michael.pyne@kdemail.net>.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2003 Kirk Baucom <kbaucom@schizoid.com>
|
|
||||||
* Copyright (c) 2005 Maksim Orlovich <maksim@kde.org>
|
|
||||||
* Copyright (c) 2005, 2008 Michael Pyne <michael.pyne@kdemail.net>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
|
||||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "screen.h"
|
|
||||||
|
|
||||||
#include <QtCore/QTimer>
|
|
||||||
#include <QtCore/QList>
|
|
||||||
#include <QtGui/QColor>
|
|
||||||
#include <QtGui/QFontMetrics>
|
|
||||||
#include <QtGui/QPainter>
|
|
||||||
#include <QtGui/QPixmap>
|
|
||||||
#include <QtGui/QWidget>
|
|
||||||
|
|
||||||
#include <kglobalsettings.h>
|
|
||||||
|
|
||||||
#include "sprite.h"
|
|
||||||
#include "aasaver.h"
|
|
||||||
|
|
||||||
Screen::Screen(AASaver* widget): m_widget(widget), m_curPainter(0)
|
|
||||||
{
|
|
||||||
QFontMetrics fm(KGlobalSettings::fixedFont());
|
|
||||||
|
|
||||||
// Compute cell geometries.
|
|
||||||
m_cellW = fm.maxWidth();
|
|
||||||
m_cellH = fm.lineSpacing();
|
|
||||||
|
|
||||||
// Computer number of full cells that will fit.
|
|
||||||
m_width = widget->width() / m_cellW;
|
|
||||||
m_height = widget->height() / m_cellH;
|
|
||||||
|
|
||||||
// Calculate offset needed to evenly distribute excess screen space.
|
|
||||||
m_offX = (widget->width() - m_width * m_cellW) / 2;
|
|
||||||
m_offY = (widget->height() - m_height * m_cellH) / 2;
|
|
||||||
|
|
||||||
// Setup animation timer.
|
|
||||||
QTimer* timer = new QTimer(this);
|
|
||||||
connect(timer, SIGNAL(timeout()), m_widget, SLOT(update()));
|
|
||||||
|
|
||||||
timer->start(msPerTick());
|
|
||||||
}
|
|
||||||
|
|
||||||
int Screen::msPerTick() const
|
|
||||||
{
|
|
||||||
return 50;
|
|
||||||
}
|
|
||||||
|
|
||||||
Screen::~Screen()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void Screen::updateSpan(int x, int y, const QPixmap &updatePixmap)
|
|
||||||
{
|
|
||||||
if (y < 0 || y >= m_height)
|
|
||||||
return;
|
|
||||||
|
|
||||||
QPoint upperLeft(m_offX + x * m_cellW, m_offY + y * m_cellH);
|
|
||||||
m_curPainter->drawPixmap(upperLeft, updatePixmap);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Screen::clearSpan(int x, int y, const QPixmap &clearPixmap)
|
|
||||||
{
|
|
||||||
if (y < 0 || y >= m_height)
|
|
||||||
return;
|
|
||||||
|
|
||||||
QPoint upperLeft(m_offX + x * m_cellW, m_offY + y * m_cellH);
|
|
||||||
m_curPainter->fillRect(QRect(upperLeft, clearPixmap.size()), Qt::black);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Actually paints the region on the widget.
|
|
||||||
void Screen::paint(QPaintEvent *)
|
|
||||||
{
|
|
||||||
if(m_backBuffer.isNull()) {
|
|
||||||
m_backBuffer = QPixmap(m_widget->size());
|
|
||||||
m_backBuffer.fill(Qt::black);
|
|
||||||
}
|
|
||||||
|
|
||||||
{ // Artificial scoping for the QPainter
|
|
||||||
QPainter p(&m_backBuffer);
|
|
||||||
|
|
||||||
// XXX: This is a hack to allow updateSpan and clearSpan access to the
|
|
||||||
// current QPainter. Could use some re-architecting. This sequence
|
|
||||||
// draws onto the back buffer.
|
|
||||||
m_curPainter = &p;
|
|
||||||
doAnimate();
|
|
||||||
m_curPainter = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw onto the main widget now.
|
|
||||||
QPainter p(m_widget);
|
|
||||||
p.setCompositionMode(QPainter::CompositionMode_Source); // bitBlt ftw
|
|
||||||
p.drawPixmap(0, 0, m_backBuffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Utility type used to faciliate sorting of the Sprite list in order to
|
|
||||||
* implement the Painter's Algorithm when painting the back buffer.
|
|
||||||
*/
|
|
||||||
struct ZKey
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Logical depth of sprite. Now 0 is farthest away from the eyes, unlike
|
|
||||||
* with Sprite::depth().
|
|
||||||
*/
|
|
||||||
int z;
|
|
||||||
|
|
||||||
Sprite* addr;
|
|
||||||
|
|
||||||
ZKey(): z(0), addr(0)
|
|
||||||
{}
|
|
||||||
|
|
||||||
ZKey(Sprite* spr): z(1000 - spr->depth()), addr(spr)
|
|
||||||
{}
|
|
||||||
|
|
||||||
bool operator<(const ZKey& other) const
|
|
||||||
{
|
|
||||||
if (z < other.z) return true;
|
|
||||||
if (z > other.z) return false;
|
|
||||||
|
|
||||||
return addr < other.addr;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
void Screen::doAnimate()
|
|
||||||
{
|
|
||||||
//First, rebuild a new list of sprites, and build a dirty region
|
|
||||||
QRegion dirtyRegion;
|
|
||||||
|
|
||||||
QList<Sprite*> sprites;
|
|
||||||
QList<Sprite*> colliders;
|
|
||||||
|
|
||||||
// Look for sprites that can suffer a collision.
|
|
||||||
foreach(Sprite *sprite, m_sprites) {
|
|
||||||
if(sprite->canCollide())
|
|
||||||
colliders.append(sprite);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find collisions.
|
|
||||||
// FIXME: Use transparent regions for accuracy.
|
|
||||||
foreach(Sprite *collider, colliders) {
|
|
||||||
foreach(Sprite *sprite, m_sprites) {
|
|
||||||
// Can't collide with yourself...
|
|
||||||
if(sprite == collider)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if(collider->geom().intersects(sprite->geom()))
|
|
||||||
collider->collision(sprite);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Retain all live existing sprites
|
|
||||||
foreach(Sprite *sprite, m_sprites) {
|
|
||||||
QRect oldRect = sprite->geom();
|
|
||||||
|
|
||||||
if (!sprite->isKilled()) {
|
|
||||||
bool dirty = sprite->tickUpdate();
|
|
||||||
|
|
||||||
if (dirty)
|
|
||||||
dirtyRegion |= oldRect | sprite->geom();
|
|
||||||
|
|
||||||
if (!sprite->isKilled())
|
|
||||||
sprites.append(sprite);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sprite->isKilled()) //note:may be made true by updateTick!
|
|
||||||
{
|
|
||||||
dirtyRegion |= oldRect;
|
|
||||||
delete sprite;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Add new sprites.
|
|
||||||
foreach(Sprite *sprite, m_addedSprites) {
|
|
||||||
dirtyRegion |= sprite->geom();
|
|
||||||
sprites.append(sprite);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_addedSprites.clear();
|
|
||||||
m_sprites = sprites;
|
|
||||||
|
|
||||||
//Compute the list of sprites affected. Note that this is
|
|
||||||
//done iteratively until fixed point.
|
|
||||||
QList<Sprite*> paintSprites;
|
|
||||||
QList<Sprite*> remSprites;
|
|
||||||
|
|
||||||
bool changed;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
changed = false;
|
|
||||||
remSprites.clear();
|
|
||||||
|
|
||||||
foreach(Sprite *sprite, sprites) {
|
|
||||||
if (dirtyRegion.intersect(sprite->geom()).isEmpty())
|
|
||||||
remSprites.append(sprite); //not to be painted thus far
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//This sprite is to be painted
|
|
||||||
paintSprites.append(sprite);
|
|
||||||
|
|
||||||
//make sure we repaint everything overlapping it
|
|
||||||
dirtyRegion |= sprite->geom();
|
|
||||||
changed = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sprites = remSprites;
|
|
||||||
}
|
|
||||||
while (changed);
|
|
||||||
|
|
||||||
//Z-sort the items.
|
|
||||||
QMap<ZKey, Sprite* > sorted;
|
|
||||||
foreach(Sprite *sprite, paintSprites)
|
|
||||||
sorted[ZKey(sprite)] = sprite;
|
|
||||||
|
|
||||||
//Paint, in Z-order
|
|
||||||
foreach(Sprite *sprite, sorted)
|
|
||||||
sprite->paint();
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "moc_screen.cpp"
|
|
||||||
|
|
||||||
// vim: set et ts=8 sw=4:
|
|
|
@ -1,172 +0,0 @@
|
||||||
/*
|
|
||||||
* Asciiquarium - Native KDE Screensaver based on the Asciiquarium program
|
|
||||||
* (c) Kirk Baucom <kbaucom@schizoid.com>, which you can find at
|
|
||||||
* http://www.robobunny.com/projects/asciiquarium/
|
|
||||||
*
|
|
||||||
* Ported to KDE by Maksim Orlovich <maksim@kde.org> and
|
|
||||||
* Michael Pyne <michael.pyne@kdemail.net>.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2003 Kirk Baucom <kbaucom@schizoid.com>
|
|
||||||
* Copyright (c) 2005 Maksim Orlovich <maksim@kde.org>
|
|
||||||
* Copyright (c) 2005, 2008 Michael Pyne <michael.pyne@kdemail.net>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
|
||||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef AA_SCREEN_H
|
|
||||||
#define AA_SCREEN_H
|
|
||||||
|
|
||||||
#include <QObject>
|
|
||||||
#include <QList>
|
|
||||||
#include <QPixmap>
|
|
||||||
|
|
||||||
class Sprite;
|
|
||||||
class AASaver;
|
|
||||||
#include <QPaintEvent>
|
|
||||||
#include <QPainter>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is the main display class of Asciiquarium. We use a pseudo-terminal-ish
|
|
||||||
* type coordinate system, where although this is a full fledged GUI application,
|
|
||||||
* Sprites and most external functions deal with logical text position
|
|
||||||
* coordinates instead of GUI coordinates. (x, y) starts in the upper-left of
|
|
||||||
* the real screen at (0, 0), and continues on to (width - 1, height - 1).
|
|
||||||
*
|
|
||||||
* Use addSprite() to add new Sprites to the Screen after you have created them
|
|
||||||
* and added their Frames.
|
|
||||||
*/
|
|
||||||
class Screen: public QObject
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* Represents a logical character on the Screen.
|
|
||||||
*/
|
|
||||||
struct Pixel {
|
|
||||||
char letter; ///< Character to display in the cell.
|
|
||||||
QRgb color; ///< Color to use for the cell.
|
|
||||||
|
|
||||||
/// Default constructor.
|
|
||||||
Pixel(): letter(' '), color(0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private:
|
|
||||||
AASaver* m_widget; ///< Widget that we should paint on.
|
|
||||||
int m_width; ///< Number of logical columns in the screen.
|
|
||||||
int m_height; ///< Number of logical rows on the screen.
|
|
||||||
int m_offX; ///< Number of pixels on left side needed to center image.
|
|
||||||
int m_offY; ///< Number of pixels on top side needed to center image.
|
|
||||||
|
|
||||||
/** Pixmap cache of the image used to speed up rendering. All paints happen
|
|
||||||
* to the pixmap, which is then bitBlt()'ed to m_widget when the time comes
|
|
||||||
* to paint.
|
|
||||||
*/
|
|
||||||
QPixmap m_backBuffer;
|
|
||||||
QPainter *m_curPainter;
|
|
||||||
|
|
||||||
int m_cellW; ///< The GUI width of a character cell.
|
|
||||||
int m_cellH; ///< The GUI height of a character cell.
|
|
||||||
|
|
||||||
QList<Sprite*> m_sprites; ///< List of Sprites on screen.
|
|
||||||
QList<Sprite*> m_addedSprites; ///< List of Sprites to be added next frame.
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
/**
|
|
||||||
* Handles updating the screen buffer to draw the next frame.
|
|
||||||
*/
|
|
||||||
void doAnimate();
|
|
||||||
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
*
|
|
||||||
* @param widget The widget to draw on.
|
|
||||||
*/
|
|
||||||
Screen(AASaver* widget);
|
|
||||||
~Screen();
|
|
||||||
|
|
||||||
/// Returns the logical width of the screen.
|
|
||||||
int width() const
|
|
||||||
{
|
|
||||||
return m_width;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the logical height of the screen.
|
|
||||||
int height() const
|
|
||||||
{
|
|
||||||
return m_height;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the GUI width of a character cell.
|
|
||||||
int cellWidth() const
|
|
||||||
{
|
|
||||||
return m_cellW;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the GUI height of a character cell.
|
|
||||||
int cellHeight() const
|
|
||||||
{
|
|
||||||
return m_cellH;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a sprite to the internal sprite list.
|
|
||||||
*
|
|
||||||
* @param sprite The Sprite to add. It will show up in the next frame.
|
|
||||||
*/
|
|
||||||
void addSprite(Sprite* sprite)
|
|
||||||
{
|
|
||||||
m_addedSprites.append(sprite);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the number of milliseconds separating each animation tick.
|
|
||||||
int msPerTick() const;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the backbuffer, and asks the portion of the widget to be
|
|
||||||
* repainted.
|
|
||||||
*
|
|
||||||
* @param x The logical x coordinate of the left edge of the update area.
|
|
||||||
* @param y The logical y coordinate of the top edge of the update area.
|
|
||||||
* @param updatePixmap The pixmap to draw into the buffer, which should be
|
|
||||||
* masked to only draw non-transparent regions.
|
|
||||||
*/
|
|
||||||
void updateSpan(int x, int y, const QPixmap &updatePixmap);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clear the given portion of the backbuffer, asks for a repaint.
|
|
||||||
*
|
|
||||||
* @param x The logical x coordinate of the left edge of the update region.
|
|
||||||
* @param y The logical y coordinate of the top edge of the update region.
|
|
||||||
* @param clearPixmap the pixmap to use to clear the span, which should be
|
|
||||||
* the background color of the Screen, and masked to
|
|
||||||
* only draw the area that needs cleared.
|
|
||||||
*/
|
|
||||||
void clearSpan(int x, int y, const QPixmap &clearPixmap);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Actually paints the scene on the widget.
|
|
||||||
*
|
|
||||||
* @param pe The QPaintEvent given to the updating widget.
|
|
||||||
*/
|
|
||||||
void paint(QPaintEvent *pe);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// vim: set et ts=8 sw=4:
|
|
|
@ -1,59 +0,0 @@
|
||||||
<ui version="4.0" >
|
|
||||||
<class>SettingsWidget</class>
|
|
||||||
<widget class="QWidget" name="SettingsWidget" >
|
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>220</width>
|
|
||||||
<height>45</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle" >
|
|
||||||
<string>Asciiquarium Settings</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" >
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="textLabel1" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Number of Fish:</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="KIntSpinBox" name="kcfg_fishCount" >
|
|
||||||
<property name="toolTip" >
|
|
||||||
<string>Choose number of fish to show at once</string>
|
|
||||||
</property>
|
|
||||||
<property name="whatsThis" >
|
|
||||||
<string>This value controls the number of fish to show on screen at any given time.</string>
|
|
||||||
</property>
|
|
||||||
<property name="minimum" >
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum" >
|
|
||||||
<number>50</number>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep" >
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
<property name="value" >
|
|
||||||
<number>15</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>KIntSpinBox</class>
|
|
||||||
<extends>QSpinBox</extends>
|
|
||||||
<header>knuminput.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
|
@ -1,96 +0,0 @@
|
||||||
/*
|
|
||||||
* Asciiquarium - Native KDE Screensaver based on the Asciiquarium program
|
|
||||||
* (c) Kirk Baucom <kbaucom@schizoid.com>, which you can find at
|
|
||||||
* http://www.robobunny.com/projects/asciiquarium/
|
|
||||||
*
|
|
||||||
* Ported to KDE by Maksim Orlovich <maksim@kde.org> and
|
|
||||||
* Michael Pyne <michael.pyne@kdemail.net>.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2003 Kirk Baucom <kbaucom@schizoid.com>
|
|
||||||
* Copyright (c) 2005 Maksim Orlovich <maksim@kde.org>
|
|
||||||
* Copyright (c) 2005, 2008 Michael Pyne <michael.pyne@kdemail.net>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
|
||||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "sprite.h"
|
|
||||||
|
|
||||||
#include <QtCore/QRect>
|
|
||||||
|
|
||||||
Sprite::Sprite(Screen* screen, int x, int y, int z, int frameDelay):
|
|
||||||
m_screen(screen), m_currentFrame(0), m_x(x), m_y(y), m_z(z),
|
|
||||||
m_isKilled(false), m_killAfterLastFrame(false),
|
|
||||||
m_ticksSinceFrameChange(0), m_frameDelay(frameDelay)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void Sprite::addFrame(const Frame& frame)
|
|
||||||
{
|
|
||||||
m_frames.append(frame);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Sprite::erase()
|
|
||||||
{
|
|
||||||
m_frames[m_currentFrame].erase(m_screen, m_x, m_y);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Sprite::paint()
|
|
||||||
{
|
|
||||||
m_frames[m_currentFrame].paint(m_screen, m_x, m_y);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Sprite::timerTick()
|
|
||||||
{
|
|
||||||
++m_ticksSinceFrameChange;
|
|
||||||
if (m_ticksSinceFrameChange * m_screen->msPerTick() < m_frameDelay)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
//Ring! Ring!
|
|
||||||
m_ticksSinceFrameChange = 0;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Sprite::tickUpdate()
|
|
||||||
{
|
|
||||||
if (m_frames.size() == 1)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (!timerTick())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
erase();
|
|
||||||
|
|
||||||
++m_currentFrame;
|
|
||||||
if (m_currentFrame == m_frames.size())
|
|
||||||
{
|
|
||||||
m_currentFrame = 0;
|
|
||||||
|
|
||||||
if(m_killAfterLastFrame)
|
|
||||||
{
|
|
||||||
erase();
|
|
||||||
kill();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
QRect Sprite::geom() const
|
|
||||||
{
|
|
||||||
return QRect(m_x, m_y, m_frames[0].width(), m_frames[0].height());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// vim: set et ts=8 sw=4:
|
|
|
@ -1,209 +0,0 @@
|
||||||
/*
|
|
||||||
* Asciiquarium - Native KDE Screensaver based on the Asciiquarium program
|
|
||||||
* (c) Kirk Baucom <kbaucom@schizoid.com>, which you can find at
|
|
||||||
* http://www.robobunny.com/projects/asciiquarium/
|
|
||||||
*
|
|
||||||
* Ported to KDE by Maksim Orlovich <maksim@kde.org> and
|
|
||||||
* Michael Pyne <michael.pyne@kdemail.net>.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2003 Kirk Baucom <kbaucom@schizoid.com>
|
|
||||||
* Copyright (c) 2005 Maksim Orlovich <maksim@kde.org>
|
|
||||||
* Copyright (c) 2005, 2008 Michael Pyne <michael.pyne@kdemail.net>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
|
||||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef AA_SPRITE_H
|
|
||||||
#define AA_SPRITE_H
|
|
||||||
|
|
||||||
#include <QVector>
|
|
||||||
|
|
||||||
#include "frame.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This class represents a on-screen character of some sort. These make up
|
|
||||||
* the building blocks of the animation.
|
|
||||||
*
|
|
||||||
* You can use multiple frames of animation, but movement is not supported in
|
|
||||||
* this class, try MovingSprite. If you use multiple frames, use
|
|
||||||
* setFrameDelay to control the interval between frames, and use
|
|
||||||
* setDieAfterLastFrame to set whether the animation should loop or cause
|
|
||||||
* the Sprite to go away.
|
|
||||||
*
|
|
||||||
* Use kill() to get rid of a Sprite, do not delete it by yourself, as Screen
|
|
||||||
* will do that as needed.
|
|
||||||
*/
|
|
||||||
class Sprite
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
Screen* m_screen; ///< The Screen that we belong to.
|
|
||||||
int m_currentFrame; ///< The current frame of animation.
|
|
||||||
int m_x; ///< Our current logical x position.
|
|
||||||
int m_y; ///< Our current logical y position.
|
|
||||||
int m_z; ///< Our current depth.
|
|
||||||
|
|
||||||
QVector<Frame> m_frames; ///< Array of animation frames.
|
|
||||||
bool m_isKilled; ///< True if we've been killed.
|
|
||||||
bool m_killAfterLastFrame; ///< True if we should auto-kill after the last frame.
|
|
||||||
int m_ticksSinceFrameChange; ///< Number of timer ticks since we last changed frame.
|
|
||||||
int m_frameDelay; ///< Number of milliseconds to show a frame for.
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Increments the animation timer.
|
|
||||||
*
|
|
||||||
* @return true if time has elapsed past m_frameDelay since the last frame
|
|
||||||
* change.
|
|
||||||
*/
|
|
||||||
bool timerTick();
|
|
||||||
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* Construct a sprite without automatically adding it to \p screen.
|
|
||||||
*
|
|
||||||
* @param screen The Screen that the sprite belongs to.
|
|
||||||
* @param x The x column position for the left edge of this sprite.
|
|
||||||
* @param y The y row position for the upper line of this sprite.
|
|
||||||
* @param z The depth of the sprite (0 is closest to screen).
|
|
||||||
* @param frameDelay Amount of milliseconds to elapse between animation
|
|
||||||
* frames.
|
|
||||||
*/
|
|
||||||
Sprite(Screen* screen, int x, int y, int z, int frameDelay = 100);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Destuctor. Does nothing at this point, present to ensure a continuous
|
|
||||||
* line of virtual destructors.
|
|
||||||
*/
|
|
||||||
virtual ~Sprite()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return true if this sprite can be involved in a collision with another
|
|
||||||
* Sprite. The other sprite doesn't necessarily have to have this
|
|
||||||
* also set to true.
|
|
||||||
*/
|
|
||||||
virtual bool canCollide() const { return false; }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called when a collision occurs with *any* Sprite on-screen if canCollide()
|
|
||||||
* returns true.
|
|
||||||
*
|
|
||||||
* @param sprite The Sprite that a collision happened with. It is safe to
|
|
||||||
* kill() the Sprite, move it, etc.
|
|
||||||
*/
|
|
||||||
virtual void collision (Sprite *sprite)
|
|
||||||
{
|
|
||||||
Q_UNUSED(sprite); // Base class does nothing.
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Appends a frame of animation to the end of the current list.
|
|
||||||
*
|
|
||||||
* @param frame Frame of animation to add. It should be the same size as
|
|
||||||
* the other frames already in the list.
|
|
||||||
*/
|
|
||||||
void addFrame(const Frame& frame);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the amount of time to show a frame for.
|
|
||||||
*
|
|
||||||
* @param delay The frame delay, in milliseconds of time.
|
|
||||||
*/
|
|
||||||
void setFrameDelay(int delay)
|
|
||||||
{
|
|
||||||
m_frameDelay = delay;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets whether this Sprite should automatically call kill() after the
|
|
||||||
* last frame of animation has run.
|
|
||||||
*
|
|
||||||
* @param dieAfterLast If true, this Sprite will automatically call kill()
|
|
||||||
* after its last frame has elapsed.
|
|
||||||
*/
|
|
||||||
void setDieAfterLastFrame(bool dieAfterLast)
|
|
||||||
{
|
|
||||||
m_killAfterLastFrame = dieAfterLast;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return The Screen this Sprite belongs to.
|
|
||||||
*/
|
|
||||||
Screen *screen() const
|
|
||||||
{
|
|
||||||
return m_screen;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return true if this Sprite is dead. If true, it will probably soon be
|
|
||||||
* deleted by its Screen.
|
|
||||||
*/
|
|
||||||
bool isKilled() const
|
|
||||||
{
|
|
||||||
return m_isKilled;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return The depth of the Sprite. 0 is closest to the screen.
|
|
||||||
*/
|
|
||||||
int depth() const
|
|
||||||
{
|
|
||||||
return m_z;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return The rectangular geometry of this object in the Pixel coordinate
|
|
||||||
* system.
|
|
||||||
*/
|
|
||||||
QRect geom() const;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Erases this Sprite from its Screen, using the current animation frame to
|
|
||||||
* form the clear mask. This should be called *before* any change which
|
|
||||||
* will change the on-screen display of the object, such as motion or
|
|
||||||
* animation changes.
|
|
||||||
*/
|
|
||||||
void erase();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Draws this Sprite onto the Screen.
|
|
||||||
*/
|
|
||||||
void paint();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Kills this Sprite. The parent Screen will delete this Sprite on the next
|
|
||||||
* animation cycle.
|
|
||||||
*/
|
|
||||||
virtual void kill()
|
|
||||||
{
|
|
||||||
m_isKilled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//main animation hook. Should return true + erase if something changed
|
|
||||||
/**
|
|
||||||
* Called when the current frame expires. This function needs to perform
|
|
||||||
* any actions necessary to make sure that it is ready to be painted,
|
|
||||||
* including calling erase(). You do not need to call paint() from this
|
|
||||||
* function.
|
|
||||||
*
|
|
||||||
* @return true if the on-screen representation of this Sprite changed,
|
|
||||||
* false, otherwise.
|
|
||||||
*/
|
|
||||||
virtual bool tickUpdate();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// vim: set et ts=8 sw=4:
|
|
|
@ -1,558 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// kbanner - Basic screen saver for KDE
|
|
||||||
//
|
|
||||||
// Copyright (c) Martin R. Jones 1996
|
|
||||||
//
|
|
||||||
// layout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org>
|
|
||||||
// clock function and color cycling added 2000/01/09 by Alexander Neundorf <alexander.neundorf@rz.tu-ilmenau.de>
|
|
||||||
// 2001/03/04 Converted to use libkscreensaver by Martin R. Jones
|
|
||||||
// 2002/04/07 Added random vertical position of text,
|
|
||||||
// changed horizontal step size to reduce jerkyness,
|
|
||||||
// text will return to right margin immediately (and not be drawn half a screen width off-screen)
|
|
||||||
// Harald H.-J. Bongartz <harald@bongartz.org>
|
|
||||||
// 2003/09/06 Converted to use KDialog - Nadeem Hasan <nhasan@kde.org>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include <qlabel.h>
|
|
||||||
#include <qlineedit.h>
|
|
||||||
#include <qcombobox.h>
|
|
||||||
#include <qcheckbox.h>
|
|
||||||
#include <qgroupbox.h>
|
|
||||||
#include <qslider.h>
|
|
||||||
#include <qlayout.h>
|
|
||||||
#include <qdatetime.h>
|
|
||||||
#include <qfontdatabase.h>
|
|
||||||
#include <qpainter.h>
|
|
||||||
#include <qprocess.h>
|
|
||||||
#include <qdebug.h>
|
|
||||||
|
|
||||||
#include <kapplication.h>
|
|
||||||
#include <krandomsequence.h>
|
|
||||||
#include <kglobal.h>
|
|
||||||
#include <klocale.h>
|
|
||||||
#include <kconfig.h>
|
|
||||||
#include <kmessagebox.h>
|
|
||||||
#include <kcolorbutton.h>
|
|
||||||
#include <kfontcombobox.h>
|
|
||||||
|
|
||||||
#include "banner.h"
|
|
||||||
#include "moc_banner.cpp"
|
|
||||||
#include <QDesktopWidget>
|
|
||||||
|
|
||||||
// libkscreensaver interface
|
|
||||||
class KBannerSaverInterface : public KScreenSaverInterface
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual KAboutData* aboutData() {
|
|
||||||
return new KAboutData("kbanner.kss", "klock", ki18n("KBanner"), "2.2.0", ki18n("KBanner"));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
virtual KScreenSaver* create(WId id)
|
|
||||||
{
|
|
||||||
return new KBannerSaver(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual QDialog* setup()
|
|
||||||
{
|
|
||||||
return new KBannerSetup();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
KBannerSaverInterface kss;
|
|
||||||
return kScreenSaverMain( argc, argv, kss );
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
KBannerSetup::KBannerSetup(QWidget *parent)
|
|
||||||
: KDialog(parent), saver(0), ed(0), speed(50)
|
|
||||||
{
|
|
||||||
setButtons(Ok|Cancel|Help);
|
|
||||||
setDefaultButton(Ok);
|
|
||||||
setCaption(i18n("Setup Banner Screen Saver"));
|
|
||||||
setModal(true);
|
|
||||||
setButtonText(Help, i18n("A&bout"));
|
|
||||||
readSettings();
|
|
||||||
|
|
||||||
QWidget *main = new QWidget(this);
|
|
||||||
setMainWidget(main);
|
|
||||||
|
|
||||||
QLabel *label;
|
|
||||||
|
|
||||||
QVBoxLayout *tl = new QVBoxLayout(main);
|
|
||||||
QHBoxLayout *tl1 = new QHBoxLayout();
|
|
||||||
tl->addLayout(tl1);
|
|
||||||
QVBoxLayout *tl11 = new QVBoxLayout();
|
|
||||||
tl1->addLayout(tl11);
|
|
||||||
|
|
||||||
QGroupBox *group = new QGroupBox(i18n("Font"), main);
|
|
||||||
QVBoxLayout *vbox = new QVBoxLayout;
|
|
||||||
group->setLayout(vbox);
|
|
||||||
QGridLayout *gl = new QGridLayout();
|
|
||||||
vbox->addLayout(gl);
|
|
||||||
gl->setSpacing(spacingHint());
|
|
||||||
|
|
||||||
label = new QLabel(i18n("Family:"), group);
|
|
||||||
gl->addWidget(label, 1, 0);
|
|
||||||
|
|
||||||
KFontComboBox* comboFonts = new KFontComboBox(group);
|
|
||||||
comboFonts->setCurrentFont(fontFamily);
|
|
||||||
gl->addWidget(comboFonts, 1, 1);
|
|
||||||
connect(comboFonts, SIGNAL(currentFontChanged(QFont)), this, SLOT(slotFamily(QFont)));
|
|
||||||
|
|
||||||
label = new QLabel(i18n("Size:"), group);
|
|
||||||
gl->addWidget(label, 2, 0);
|
|
||||||
|
|
||||||
comboSizes = new QComboBox(group);
|
|
||||||
comboSizes->setEditable( true );
|
|
||||||
fillFontSizes();
|
|
||||||
gl->addWidget(comboSizes, 2, 1);
|
|
||||||
connect(comboSizes, SIGNAL(activated(int)), this, SLOT(slotSize(int)));
|
|
||||||
connect(comboSizes, SIGNAL(editTextChanged(QString)), this, SLOT(slotSizeEdit(QString)));
|
|
||||||
|
|
||||||
QCheckBox *cb = new QCheckBox(i18n("Bold"), group);
|
|
||||||
cb->setChecked( bold );
|
|
||||||
connect(cb, SIGNAL(toggled(bool)), this, SLOT(slotBold(bool)));
|
|
||||||
gl->addWidget(cb, 3, 0);
|
|
||||||
|
|
||||||
cb = new QCheckBox(i18n("Italic"), group);
|
|
||||||
cb->setChecked(italic);
|
|
||||||
gl->addWidget(cb, 3, 1);
|
|
||||||
connect(cb, SIGNAL(toggled(bool)), this, SLOT(slotItalic(bool)));
|
|
||||||
|
|
||||||
label = new QLabel( i18n("Color:"), group );
|
|
||||||
gl->addWidget(label, 4, 0);
|
|
||||||
|
|
||||||
colorPush = new KColorButton( fontColor, group );
|
|
||||||
gl->addWidget(colorPush, 4, 1);
|
|
||||||
connect(colorPush, SIGNAL(changed(QColor)), this, SLOT(slotColor(QColor)));
|
|
||||||
|
|
||||||
QCheckBox *cyclingColorCb = new QCheckBox(i18n("Cycling color"), group);
|
|
||||||
cyclingColorCb->setMinimumSize(cyclingColorCb->sizeHint());
|
|
||||||
gl->addWidget(cyclingColorCb, 5, 0,5,1);
|
|
||||||
connect(cyclingColorCb, SIGNAL(toggled(bool)), this, SLOT(slotCyclingColor(bool)));
|
|
||||||
cyclingColorCb->setChecked(cyclingColor);
|
|
||||||
|
|
||||||
preview = new QWidget(main);
|
|
||||||
preview->setFixedSize(220, 170);
|
|
||||||
{
|
|
||||||
QPalette palette;
|
|
||||||
palette.setColor(preview->backgroundRole(), Qt::black);
|
|
||||||
preview->setPalette(palette);
|
|
||||||
preview->setAutoFillBackground(true);
|
|
||||||
}
|
|
||||||
preview->show(); // otherwise saver does not get correct size
|
|
||||||
saver = new KBannerSaver( preview->winId() );
|
|
||||||
tl1->addWidget(preview);
|
|
||||||
|
|
||||||
tl11->addWidget(group);
|
|
||||||
|
|
||||||
label = new QLabel(i18n("Speed:"), main);
|
|
||||||
tl11->addStretch(1);
|
|
||||||
tl11->addWidget(label);
|
|
||||||
|
|
||||||
QSlider *sb = new QSlider(Qt::Horizontal, main);
|
|
||||||
sb->setMinimum(0);
|
|
||||||
sb->setMaximum(100);
|
|
||||||
sb->setPageStep(10);
|
|
||||||
sb->setValue(speed);
|
|
||||||
sb->setMinimumWidth( 180);
|
|
||||||
sb->setFixedHeight(20);
|
|
||||||
sb->setTickPosition(QSlider::TicksBelow);
|
|
||||||
sb->setTickInterval(10);
|
|
||||||
tl11->addWidget(sb);
|
|
||||||
connect(sb, SIGNAL(valueChanged(int)), this, SLOT(slotSpeed(int)));
|
|
||||||
|
|
||||||
QHBoxLayout *tl2 = new QHBoxLayout;
|
|
||||||
tl->addLayout(tl2);
|
|
||||||
|
|
||||||
label = new QLabel(i18n("Message:"), main);
|
|
||||||
tl2->addWidget(label);
|
|
||||||
|
|
||||||
ed = new QLineEdit(main);
|
|
||||||
tl2->addWidget(ed);
|
|
||||||
ed->setText(message);
|
|
||||||
connect(ed, SIGNAL(textChanged(QString)), SLOT(slotMessage(QString)));
|
|
||||||
|
|
||||||
QComboBox *typeCb = new QComboBox(main);
|
|
||||||
typeCb->addItem(i18n("Show message"));
|
|
||||||
typeCb->addItem(i18n("Show current time"));
|
|
||||||
typeCb->addItem(i18n("Show fortune"));
|
|
||||||
typeCb->setFixedSize(typeCb->sizeHint());
|
|
||||||
tl->addWidget(typeCb, 0, Qt::AlignLeft);
|
|
||||||
connect(typeCb, SIGNAL(currentIndexChanged(int)), this, SLOT(slotTypeChanged(int)));
|
|
||||||
if (showTime) {
|
|
||||||
typeCb->setCurrentIndex(1);
|
|
||||||
} else if (showFortune) {
|
|
||||||
typeCb->setCurrentIndex(2);
|
|
||||||
} else {
|
|
||||||
typeCb->setCurrentIndex(0);
|
|
||||||
}
|
|
||||||
connect(this, SIGNAL(okClicked()), this, SLOT(slotOk()));
|
|
||||||
connect(this, SIGNAL(helpClicked()), this, SLOT(slotHelp()));
|
|
||||||
tl->addStretch();
|
|
||||||
}
|
|
||||||
|
|
||||||
// read settings from config file
|
|
||||||
void KBannerSetup::readSettings()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
speed = config.readEntry("Speed", 50);
|
|
||||||
/*
|
|
||||||
if ( speed > 100 )
|
|
||||||
speed = 100;
|
|
||||||
else if ( speed < 50 )
|
|
||||||
speed = 50;
|
|
||||||
*/
|
|
||||||
|
|
||||||
message = config.readEntry("Message", "KDE");
|
|
||||||
showTime = config.readEntry("ShowTime", false);
|
|
||||||
showFortune = config.readEntry("ShowFortune", false);
|
|
||||||
fontFamily = config.readEntry("FontFamily", QApplication::font().family());
|
|
||||||
fontSize = config.readEntry("FontSize", 48);
|
|
||||||
fontColor.setNamedColor(config.readEntry("FontColor", "red"));
|
|
||||||
cyclingColor = config.readEntry("CyclingColor", false);
|
|
||||||
bold = config.readEntry("FontBold", false);
|
|
||||||
italic = config.readEntry("FontItalic", false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSetup::fillFontSizes()
|
|
||||||
{
|
|
||||||
bool block = comboSizes->signalsBlocked();
|
|
||||||
comboSizes->blockSignals( true );
|
|
||||||
comboSizes->clear();
|
|
||||||
int i = 0;
|
|
||||||
sizes = QFontDatabase().pointSizes(fontFamily);
|
|
||||||
sizes << 96 << 128 << 156 << 0;
|
|
||||||
int current = 0;
|
|
||||||
while (sizes[i]) {
|
|
||||||
QString num;
|
|
||||||
num.setNum(sizes[i]);
|
|
||||||
comboSizes->insertItem(i, num);
|
|
||||||
if (fontSize == sizes[i]) {
|
|
||||||
// fontsize equals one of the defined ones
|
|
||||||
current = i;
|
|
||||||
comboSizes->setCurrentIndex(current);
|
|
||||||
slotSize(current);
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
if (current == 0) {
|
|
||||||
// fontsize seems to be entered by hand
|
|
||||||
QString fsize;
|
|
||||||
fsize.setNum(fontSize);
|
|
||||||
comboSizes->setEditText(fsize);
|
|
||||||
slotSizeEdit(fsize);
|
|
||||||
}
|
|
||||||
comboSizes->blockSignals(block);
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSetup::slotFamily(const QFont &f)
|
|
||||||
{
|
|
||||||
fontFamily = f.family();
|
|
||||||
fillFontSizes(); // different font, different sizes
|
|
||||||
if (saver) {
|
|
||||||
saver->setFont(fontFamily, fontSize, fontColor, bold, italic);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSetup::slotSize(int indx)
|
|
||||||
{
|
|
||||||
fontSize = sizes[indx];
|
|
||||||
if (saver) {
|
|
||||||
saver->setFont(fontFamily, fontSize, fontColor, bold, italic);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSetup::slotSizeEdit(const QString &fs)
|
|
||||||
{
|
|
||||||
bool ok;
|
|
||||||
fontSize = fs.toInt(&ok, 10);
|
|
||||||
if (ok && saver) {
|
|
||||||
saver->setFont(fontFamily, fontSize, fontColor, bold, italic);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSetup::slotColor(const QColor &col)
|
|
||||||
{
|
|
||||||
fontColor = col;
|
|
||||||
if (saver) {
|
|
||||||
saver->setColor(fontColor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSetup::slotCyclingColor(bool on)
|
|
||||||
{
|
|
||||||
colorPush->setEnabled(!on);
|
|
||||||
cyclingColor = on;
|
|
||||||
|
|
||||||
if (saver) {
|
|
||||||
saver->setCyclingColor(on);
|
|
||||||
if (!on) {
|
|
||||||
saver->setColor(fontColor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSetup::slotBold(bool state)
|
|
||||||
{
|
|
||||||
bold = state;
|
|
||||||
if (saver) {
|
|
||||||
saver->setFont(fontFamily, fontSize, fontColor, bold, italic);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSetup::slotItalic(bool state)
|
|
||||||
{
|
|
||||||
italic = state;
|
|
||||||
if (saver) {
|
|
||||||
saver->setFont(fontFamily, fontSize, fontColor, bold, italic);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSetup::slotSpeed(int num)
|
|
||||||
{
|
|
||||||
speed = num;
|
|
||||||
if (saver) {
|
|
||||||
saver->setSpeed(speed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSetup::slotMessage(const QString &msg)
|
|
||||||
{
|
|
||||||
message = msg;
|
|
||||||
if (saver) {
|
|
||||||
saver->setMessage(message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSetup::slotTypeChanged(int type)
|
|
||||||
{
|
|
||||||
if (type == 1) {
|
|
||||||
ed->setEnabled(false);
|
|
||||||
showTime = true;
|
|
||||||
showFortune = false;
|
|
||||||
} else if (type == 2) {
|
|
||||||
ed->setEnabled(false);
|
|
||||||
showTime = false;
|
|
||||||
showFortune = true;
|
|
||||||
} else {
|
|
||||||
ed->setEnabled(true);
|
|
||||||
showTime = false;
|
|
||||||
showFortune = false;
|
|
||||||
}
|
|
||||||
if (saver) {
|
|
||||||
if (showTime) {
|
|
||||||
saver->setTimeDisplay();
|
|
||||||
} else if (showFortune) {
|
|
||||||
saver->setFortuneDisplay();
|
|
||||||
} else {
|
|
||||||
message = ed->text();
|
|
||||||
saver->setMessage(message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ok pressed - save settings and exit
|
|
||||||
void KBannerSetup::slotOk()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
config.writeEntry("Speed", speed);
|
|
||||||
config.writeEntry("Message", message);
|
|
||||||
config.writeEntry("ShowTime", showTime);
|
|
||||||
config.writeEntry("ShowFortune", showFortune);
|
|
||||||
config.writeEntry("FontFamily", fontFamily);
|
|
||||||
|
|
||||||
QString fsize;
|
|
||||||
if (fontSize == 0) {
|
|
||||||
// an non-number was entered in the font size combo
|
|
||||||
fontSize = 48;
|
|
||||||
}
|
|
||||||
fsize.setNum(fontSize);
|
|
||||||
config.writeEntry("FontSize", fsize);
|
|
||||||
|
|
||||||
QString colName;
|
|
||||||
colName.sprintf("#%02x%02x%02x", fontColor.red(), fontColor.green(), fontColor.blue());
|
|
||||||
config.writeEntry("FontColor", colName);
|
|
||||||
config.writeEntry("CyclingColor", cyclingColor);
|
|
||||||
config.writeEntry("FontBold", bold);
|
|
||||||
config.writeEntry("FontItalic", italic);
|
|
||||||
|
|
||||||
config.sync();
|
|
||||||
|
|
||||||
accept();
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSetup::slotHelp()
|
|
||||||
{
|
|
||||||
KMessageBox::about(this, i18n("Banner Version 2.2.1\n\nWritten by Martin R. Jones 1996\nmjones@kde.org\nExtended by Alexander Neundorf 2000\nalexander.neundorf@rz.tu-ilmenau.de\n"));
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
KBannerSaver::KBannerSaver(WId id)
|
|
||||||
: KScreenSaver(id),
|
|
||||||
needUpdate(false)
|
|
||||||
{
|
|
||||||
krnd = new KRandomSequence();
|
|
||||||
readSettings();
|
|
||||||
initialize();
|
|
||||||
timer.start( speed );
|
|
||||||
connect( &timer, SIGNAL(timeout()), SLOT(update()) );
|
|
||||||
|
|
||||||
setAttribute( Qt::WA_NoSystemBackground );
|
|
||||||
show();
|
|
||||||
}
|
|
||||||
|
|
||||||
KBannerSaver::~KBannerSaver()
|
|
||||||
{
|
|
||||||
timer.stop();
|
|
||||||
delete krnd;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSaver::setSpeed( int spd )
|
|
||||||
{
|
|
||||||
timer.stop();
|
|
||||||
int inv = 100 - spd;
|
|
||||||
speed = 1 + ((inv * inv) / 100);
|
|
||||||
timer.start( speed );
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSaver::setFont(const QString &family, int size, const QColor &color, bool b, bool i)
|
|
||||||
{
|
|
||||||
fontFamily = family;
|
|
||||||
fontSize = size;
|
|
||||||
fontColor = color;
|
|
||||||
bold = b;
|
|
||||||
italic = i;
|
|
||||||
|
|
||||||
initialize();
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSaver::setColor(const QColor &color)
|
|
||||||
{
|
|
||||||
fontColor = color;
|
|
||||||
cyclingColor = false;
|
|
||||||
needUpdate = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSaver::setCyclingColor(bool on)
|
|
||||||
{
|
|
||||||
cyclingColor = on;
|
|
||||||
needUpdate = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSaver::setMessage(const QString &msg)
|
|
||||||
{
|
|
||||||
showTime = false;
|
|
||||||
showFortune = false;
|
|
||||||
message = msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSaver::setTimeDisplay()
|
|
||||||
{
|
|
||||||
showTime = true;
|
|
||||||
showFortune = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBannerSaver::setFortuneDisplay()
|
|
||||||
{
|
|
||||||
showTime = false;
|
|
||||||
showFortune = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// read settings from config file
|
|
||||||
void KBannerSaver::readSettings()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
setSpeed(config.readEntry("Speed", 50));
|
|
||||||
|
|
||||||
message = config.readEntry("Message", "KDE");
|
|
||||||
showTime = config.readEntry("ShowTime", false);
|
|
||||||
showFortune = config.readEntry("ShowFortune", false);
|
|
||||||
fontFamily = config.readEntry("FontFamily", QApplication::font().family());
|
|
||||||
fontSize = config.readEntry("FontSize", 48);
|
|
||||||
fontColor.setNamedColor(config.readEntry("FontColor", "red"));
|
|
||||||
cyclingColor = config.readEntry("CyclingColor", false);
|
|
||||||
bold = config.readEntry("FontBold", false);
|
|
||||||
italic = config.readEntry("FontItalic", false);
|
|
||||||
|
|
||||||
if (cyclingColor) {
|
|
||||||
currentHue = 0;
|
|
||||||
fontColor.setHsv(0, SATURATION,VALUE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// initialize font
|
|
||||||
void KBannerSaver::initialize()
|
|
||||||
{
|
|
||||||
fsize = (fontSize * height() / QApplication::desktop()->height());
|
|
||||||
|
|
||||||
font = QFont(fontFamily, fsize, bold ? QFont::Bold : QFont::Normal, italic);
|
|
||||||
|
|
||||||
xpos = width();
|
|
||||||
ypos = fsize + (int) ((double)(height() - 3 * fsize) * krnd->getDouble());
|
|
||||||
step = 2 * width() / QApplication::desktop()->width(); // 6 -> 2 -hhjb-
|
|
||||||
if (step == 0) {
|
|
||||||
step = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static QString fortuneMessage;
|
|
||||||
|
|
||||||
// erase old text and draw in new position
|
|
||||||
void KBannerSaver::paintEvent(QPaintEvent *event)
|
|
||||||
{
|
|
||||||
Q_UNUSED(event)
|
|
||||||
|
|
||||||
if (cyclingColor) {
|
|
||||||
int hueStep = (speed / 10);
|
|
||||||
currentHue = ((currentHue + hueStep) % 360);
|
|
||||||
fontColor.setHsv(currentHue, SATURATION,VALUE);
|
|
||||||
}
|
|
||||||
if (showTime) {
|
|
||||||
QString new_message = KGlobal::locale()->formatTime(QTime::currentTime(), true);
|
|
||||||
if (new_message != message) {
|
|
||||||
needUpdate = true;
|
|
||||||
}
|
|
||||||
message = new_message;
|
|
||||||
} else if (showFortune) {
|
|
||||||
if (fortuneMessage.isEmpty()) {
|
|
||||||
QProcess fortuneProc(this);
|
|
||||||
fortuneProc.start("fortune");
|
|
||||||
fortuneProc.waitForStarted();
|
|
||||||
fortuneProc.waitForFinished();
|
|
||||||
fortuneMessage = fortuneProc.readAll();
|
|
||||||
}
|
|
||||||
if (message != fortuneMessage) {
|
|
||||||
needUpdate = true;
|
|
||||||
}
|
|
||||||
message = fortuneMessage;
|
|
||||||
}
|
|
||||||
|
|
||||||
xpos -= step;
|
|
||||||
|
|
||||||
if (needUpdate) {
|
|
||||||
messageWidth = QFontMetrics(font).boundingRect(message).width();
|
|
||||||
needUpdate = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
QPainter p(this);
|
|
||||||
p.fillRect(rect(), Qt::black);
|
|
||||||
|
|
||||||
if (xpos < -messageWidth) {
|
|
||||||
xpos = width();
|
|
||||||
ypos = (fsize + (int) ((double)(height() - 3 * fsize) * krnd->getDouble()));
|
|
||||||
}
|
|
||||||
|
|
||||||
p.setFont(font);
|
|
||||||
p.setPen(fontColor);
|
|
||||||
p.drawText(xpos, ypos, message);
|
|
||||||
}
|
|
|
@ -1,110 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// kbanner - Basic screen saver for KDE
|
|
||||||
//
|
|
||||||
// Copyright (c) Martin R. Jones 1996
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef BANNER_H
|
|
||||||
#define BANNER_H
|
|
||||||
|
|
||||||
#include <qtimer.h>
|
|
||||||
|
|
||||||
#include <kscreensaver.h>
|
|
||||||
#include <kdialog.h>
|
|
||||||
|
|
||||||
#define SATURATION 150
|
|
||||||
#define VALUE 255
|
|
||||||
|
|
||||||
#include <QLineEdit>
|
|
||||||
class KColorButton;
|
|
||||||
class KRandomSequence;
|
|
||||||
|
|
||||||
class KBannerSaver : public KScreenSaver
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
KBannerSaver(WId id);
|
|
||||||
virtual ~KBannerSaver();
|
|
||||||
|
|
||||||
void setSpeed(int spd);
|
|
||||||
void setFont(const QString &family, int size, const QColor &color, bool b, bool i);
|
|
||||||
void setMessage( const QString &msg);
|
|
||||||
void setTimeDisplay();
|
|
||||||
void setFortuneDisplay();
|
|
||||||
void setCyclingColor(bool on);
|
|
||||||
void setColor(const QColor &color);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void readSettings();
|
|
||||||
void initialize();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void paintEvent(QPaintEvent *event);
|
|
||||||
|
|
||||||
QFont font;
|
|
||||||
QTimer timer;
|
|
||||||
QString fontFamily;
|
|
||||||
int fontSize;
|
|
||||||
bool bold;
|
|
||||||
bool italic;
|
|
||||||
QColor fontColor;
|
|
||||||
bool cyclingColor;
|
|
||||||
int currentHue;
|
|
||||||
bool needUpdate;
|
|
||||||
QString message;
|
|
||||||
bool showTime;
|
|
||||||
bool showFortune;
|
|
||||||
int xpos, ypos, step, fsize;
|
|
||||||
KRandomSequence *krnd;
|
|
||||||
int speed;
|
|
||||||
int messageWidth;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class KBannerSetup : public KDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
KBannerSetup(QWidget *parent = NULL);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void readSettings();
|
|
||||||
void fillFontSizes();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotFamily(const QFont &);
|
|
||||||
void slotSize(int);
|
|
||||||
void slotSizeEdit(const QString &);
|
|
||||||
void slotColor(const QColor &);
|
|
||||||
void slotCyclingColor(bool on);
|
|
||||||
void slotBold(bool);
|
|
||||||
void slotItalic(bool);
|
|
||||||
void slotSpeed(int);
|
|
||||||
void slotMessage(const QString &);
|
|
||||||
void slotOk();
|
|
||||||
void slotHelp();
|
|
||||||
void slotTypeChanged(int type);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QWidget *preview;
|
|
||||||
KColorButton *colorPush;
|
|
||||||
KBannerSaver *saver;
|
|
||||||
QLineEdit *ed;
|
|
||||||
QComboBox* comboSizes;
|
|
||||||
|
|
||||||
QString message;
|
|
||||||
bool showTime;
|
|
||||||
bool showFortune;
|
|
||||||
QString fontFamily;
|
|
||||||
int fontSize;
|
|
||||||
QColor fontColor;
|
|
||||||
bool cyclingColor;
|
|
||||||
bool bold;
|
|
||||||
bool italic;
|
|
||||||
int speed;
|
|
||||||
QList<int> sizes;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,537 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// kblob - Basic screen saver for KDE
|
|
||||||
//
|
|
||||||
// Copyright (c) Tiaan Wessels, 1997
|
|
||||||
//
|
|
||||||
// To add new alg :
|
|
||||||
// - add blob_alg enum in blob.h before ALG_LAST
|
|
||||||
// - choose 2 letter prefix for alg and add vars needed to private vars
|
|
||||||
// in KBlobSaver in blob.h
|
|
||||||
// - add xxSetup and xxNextFrame method definitions in blob.h
|
|
||||||
// - implement methods in this file. xxSetup to init vars mentioned
|
|
||||||
// in step 2. xxNextFrame to advance blob painter ( calc tx,ty and
|
|
||||||
// use box() method to position painter
|
|
||||||
// - add descriptive string in alg_str array in this file before "Random"
|
|
||||||
// - add to Algs array in KBlobSaver constructor in this file
|
|
||||||
// - test by setup saver and choosing alg from list
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <limits.h>
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
#include <qcolor.h>
|
|
||||||
#include <qcolormap.h>
|
|
||||||
#include <qlabel.h>
|
|
||||||
#include <QListWidget>
|
|
||||||
#include <qlayout.h>
|
|
||||||
#include <qpainter.h>
|
|
||||||
#include <qpixmap.h>
|
|
||||||
#include <qimage.h>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QHBoxLayout>
|
|
||||||
|
|
||||||
#include <kapplication.h>
|
|
||||||
#include <kconfig.h>
|
|
||||||
#include <kmessagebox.h>
|
|
||||||
#include <knuminput.h>
|
|
||||||
#include <klocale.h>
|
|
||||||
#include <kglobal.h>
|
|
||||||
#include <krandomsequence.h>
|
|
||||||
|
|
||||||
#include "moc_blob.cpp"
|
|
||||||
#include "blob.h"
|
|
||||||
|
|
||||||
#define SMALLRAND(a) (int)(rnd->getLong(a)+1)
|
|
||||||
|
|
||||||
|
|
||||||
// libkscreensaver interface
|
|
||||||
class KBlobSaverInterface : public KScreenSaverInterface
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
virtual KAboutData* aboutData() {
|
|
||||||
return new KAboutData( "kblob.kss", "klock", ki18n( "KBlob" ), "2.2.0", ki18n( "KBlob" ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
virtual KScreenSaver* create( WId id )
|
|
||||||
{
|
|
||||||
return new KBlobSaver( id );
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual QDialog* setup()
|
|
||||||
{
|
|
||||||
return new KBlobSetup();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
int main( int argc, char *argv[] )
|
|
||||||
{
|
|
||||||
KBlobSaverInterface kss;
|
|
||||||
return kScreenSaverMain( argc, argv, kss );
|
|
||||||
}
|
|
||||||
|
|
||||||
static KRandomSequence *rnd = 0;
|
|
||||||
|
|
||||||
QString alg_str[5];
|
|
||||||
void initAlg()
|
|
||||||
{
|
|
||||||
alg_str[0] = i18n("Random Linear");
|
|
||||||
alg_str[1] = i18n("Horizontal Sine");
|
|
||||||
alg_str[2] = i18n("Circular Bounce");
|
|
||||||
alg_str[3] = i18n("Polar Coordinates");
|
|
||||||
alg_str[4] = i18n("Random");
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// the blob screensaver's code
|
|
||||||
|
|
||||||
KBlobSaver::KBlobSaver ( WId id)
|
|
||||||
: KScreenSaver( id )
|
|
||||||
{
|
|
||||||
setAttribute( Qt::WA_OpaquePaintEvent, true );
|
|
||||||
|
|
||||||
{
|
|
||||||
QPalette palette;
|
|
||||||
palette.setColor( backgroundRole(), Qt::black );
|
|
||||||
setPalette( palette );
|
|
||||||
setAutoFillBackground(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
rnd = new KRandomSequence();
|
|
||||||
initAlg();
|
|
||||||
QColor color;
|
|
||||||
float ramp = (256.0-64.0)/(float)RAMP;
|
|
||||||
|
|
||||||
// if 8-bit, create lookup table for color ramping further down
|
|
||||||
if (QPixmap::defaultDepth() == 8)
|
|
||||||
{
|
|
||||||
QColormap cmap = QColormap::instance();
|
|
||||||
memset(lookup, 0, 256*sizeof(uint));
|
|
||||||
int i;
|
|
||||||
for (i = 0; i < RAMP; i++)
|
|
||||||
{
|
|
||||||
color.setRgb(64+(int)(ramp*(float)i), 0, 0);
|
|
||||||
colors[i] = cmap.pixel(color);
|
|
||||||
}
|
|
||||||
memset(lookup, cmap.pixel(Qt::black), sizeof(uint)*256);
|
|
||||||
for (i = 0; i < RAMP-1; i++)
|
|
||||||
lookup[colors[i]] = colors[i+1];
|
|
||||||
lookup[cmap.pixel(Qt::black)] = lookup[colors[RAMP-1]] = colors[0];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// make special provision for preview mode
|
|
||||||
if (height() < 400)
|
|
||||||
{
|
|
||||||
if (QPixmap::defaultDepth() > 8 )
|
|
||||||
setColorInc(7);
|
|
||||||
else
|
|
||||||
setColorInc(4);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (QPixmap::defaultDepth() > 8 )
|
|
||||||
setColorInc(3);
|
|
||||||
else
|
|
||||||
setColorInc(2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// the dimensions of the blob painter
|
|
||||||
dim = height()/70+1;
|
|
||||||
|
|
||||||
// record starting time to know when to change frames
|
|
||||||
start = time(NULL);
|
|
||||||
|
|
||||||
// init some parameters used by all algorithms
|
|
||||||
xhalf = width()/2;
|
|
||||||
yhalf = height()/2;
|
|
||||||
|
|
||||||
// means a new algorithm should be set at entrance of timer
|
|
||||||
newalg = newalgp = 1;
|
|
||||||
|
|
||||||
// init algorithm space
|
|
||||||
Algs[0].Name = alg_str[0];
|
|
||||||
Algs[0].Init = &KBlobSaver::lnSetup;
|
|
||||||
Algs[0].NextFrame = &KBlobSaver::lnNextFrame;
|
|
||||||
|
|
||||||
Algs[1].Name = alg_str[1];
|
|
||||||
Algs[1].Init = &KBlobSaver::hsSetup;
|
|
||||||
Algs[1].NextFrame = &KBlobSaver::hsNextFrame;
|
|
||||||
|
|
||||||
Algs[2].Name = alg_str[2];
|
|
||||||
Algs[2].Init = &KBlobSaver::cbSetup;
|
|
||||||
Algs[2].NextFrame = &KBlobSaver::cbNextFrame;
|
|
||||||
|
|
||||||
Algs[3].Name = alg_str[3];
|
|
||||||
Algs[3].Init = &KBlobSaver::pcSetup;
|
|
||||||
Algs[3].NextFrame = &KBlobSaver::pcNextFrame;
|
|
||||||
|
|
||||||
// get setup from kde registry
|
|
||||||
readSettings();
|
|
||||||
|
|
||||||
// start timer which will update blob painter
|
|
||||||
timer.start(SPEED);
|
|
||||||
connect(&timer, SIGNAL(timeout()), SLOT(update()));
|
|
||||||
show();
|
|
||||||
}
|
|
||||||
|
|
||||||
KBlobSaver::~KBlobSaver()
|
|
||||||
{
|
|
||||||
timer.stop();
|
|
||||||
|
|
||||||
delete rnd; rnd = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlobSaver::setAlgorithm(int a )
|
|
||||||
{
|
|
||||||
newalg = newalgp = ((a == ALG_RANDOM) ? 1 : 2);
|
|
||||||
alg = a;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlobSaver::lnSetup()
|
|
||||||
{
|
|
||||||
// initialize the blob movement dictators with random vals
|
|
||||||
// incrementals on axis
|
|
||||||
ln_xinc = SMALLRAND(3);
|
|
||||||
ln_yinc = SMALLRAND(2);
|
|
||||||
|
|
||||||
// start position
|
|
||||||
tx = SMALLRAND(width()-dim-ln_xinc*2);
|
|
||||||
ty = SMALLRAND(height()-dim-ln_yinc*2);
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlobSaver::hsSetup()
|
|
||||||
{
|
|
||||||
hs_per = SMALLRAND(7);
|
|
||||||
hs_radians = 0.0;
|
|
||||||
hs_rinc = (hs_per*M_PI)/(hs_per*90*4);
|
|
||||||
hs_flip = 1.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlobSaver::cbSetup()
|
|
||||||
{
|
|
||||||
cb_radians = 0.0;
|
|
||||||
cb_rinc = (2.0*M_PI)/360.0;
|
|
||||||
cb_sradians = 0.0;
|
|
||||||
cb_deviate = SMALLRAND(height()/20)+(height()/15);
|
|
||||||
cb_radius = height()/2-cb_deviate*2-2*dim;
|
|
||||||
cb_devradinc = (rnd->getDouble()*10.0*2.0*M_PI)/360.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlobSaver::pcSetup()
|
|
||||||
{
|
|
||||||
pc_angle = 0.0;
|
|
||||||
pc_radius = 0.0;
|
|
||||||
pc_inc = (2.0*M_PI)/720.0;
|
|
||||||
pc_crot = 0.0;
|
|
||||||
pc_div = SMALLRAND(4)-1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// render next frame ( or change algorithms )
|
|
||||||
void KBlobSaver::paintEvent(QPaintEvent *)
|
|
||||||
{
|
|
||||||
time_t now = time(NULL);
|
|
||||||
|
|
||||||
// should algorithm be changed
|
|
||||||
if (now-start > showlen)
|
|
||||||
newalg = newalgp;
|
|
||||||
|
|
||||||
// set new algorithm
|
|
||||||
if (newalg)
|
|
||||||
{
|
|
||||||
QPainter p(this);
|
|
||||||
p.fillRect(rect(), p.background());
|
|
||||||
if (newalg == 1)
|
|
||||||
alg = SMALLRAND(ALG_LAST)-1;
|
|
||||||
(this->*Algs[alg].Init)();
|
|
||||||
newalg = 0;
|
|
||||||
start = time(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
// gen next fram for current algorithm
|
|
||||||
(this->*Algs[alg].NextFrame)();
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlobSaver::lnNextFrame()
|
|
||||||
{
|
|
||||||
int dir;
|
|
||||||
|
|
||||||
// depending on the algorithm to use, move the blob painter to
|
|
||||||
// a new location
|
|
||||||
// check for wall hit to change direction
|
|
||||||
if (tx+dim+ln_xinc > (int)width()-1 || tx+ln_xinc < 0)
|
|
||||||
{
|
|
||||||
if (ln_xinc > 0)
|
|
||||||
dir = -1;
|
|
||||||
else
|
|
||||||
dir = 1;
|
|
||||||
ln_xinc = SMALLRAND(3)*dir;
|
|
||||||
}
|
|
||||||
if (ty+dim+ln_yinc > (int)height()-1 || ty+ln_yinc < 0)
|
|
||||||
{
|
|
||||||
if (ln_yinc > 0)
|
|
||||||
dir = -1;
|
|
||||||
else
|
|
||||||
dir = 1;
|
|
||||||
ln_yinc = SMALLRAND(2)*dir;
|
|
||||||
}
|
|
||||||
|
|
||||||
// move box to new position
|
|
||||||
tx += ln_xinc;
|
|
||||||
ty += ln_yinc;
|
|
||||||
|
|
||||||
// draw new box
|
|
||||||
box(tx, ty);
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlobSaver::hsNextFrame()
|
|
||||||
{
|
|
||||||
static int xlen = width()-(4*dim);
|
|
||||||
static int ylen = height()-(4*dim);
|
|
||||||
|
|
||||||
// calc x as offset on angle line and y as vertical offset
|
|
||||||
// on interval -1..1 sine of angle
|
|
||||||
tx = (int)((hs_radians/(hs_per*M_PI))*(float)xlen);
|
|
||||||
ty = (int)((float)(ylen/4)*(hs_flip*sin(hs_radians)))+yhalf;
|
|
||||||
|
|
||||||
// draw new box
|
|
||||||
box(tx, ty);
|
|
||||||
|
|
||||||
// set new radians
|
|
||||||
hs_radians += hs_rinc;
|
|
||||||
if (hs_radians > hs_per*M_PI)
|
|
||||||
{
|
|
||||||
hs_rinc *= -1.0;
|
|
||||||
hs_radians += hs_rinc;
|
|
||||||
hs_flip *= -1.0;
|
|
||||||
}
|
|
||||||
else if (hs_radians < 0.0)
|
|
||||||
hsSetup();
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlobSaver::cbNextFrame()
|
|
||||||
{
|
|
||||||
int deviate;
|
|
||||||
|
|
||||||
// calculate deviation of circle main radius
|
|
||||||
deviate = (int)(sin(cb_sradians)*cb_deviate);
|
|
||||||
|
|
||||||
// calculate topleft of box as a circle with a sine perturbed radius
|
|
||||||
tx = (int)(cos(cb_radians)*(cb_radius+deviate))+xhalf;
|
|
||||||
ty = (int)(sin(cb_radians)*(cb_radius+deviate))+yhalf;
|
|
||||||
|
|
||||||
// draw the box
|
|
||||||
box(tx, ty);
|
|
||||||
|
|
||||||
// increase greater circle render angle
|
|
||||||
cb_radians += cb_rinc;
|
|
||||||
if (cb_radians > 2.0*M_PI)
|
|
||||||
cb_radians -= 2.0*M_PI;
|
|
||||||
|
|
||||||
// increase radius deviation offset on sine wave
|
|
||||||
cb_sradians += cb_devradinc;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlobSaver::pcNextFrame()
|
|
||||||
{
|
|
||||||
static float scale = (float)height()/3.0 - 4.0*dim;
|
|
||||||
|
|
||||||
// simple polar coordinate equation
|
|
||||||
if (pc_div < 1.0)
|
|
||||||
pc_radius = cos(2.0*pc_angle);
|
|
||||||
else
|
|
||||||
pc_radius = 1.0/pc_div + cos(2.0*pc_angle);
|
|
||||||
|
|
||||||
tx = (int)(scale*pc_radius*cos(pc_angle+pc_crot))+xhalf;
|
|
||||||
ty = (int)(scale*pc_radius*sin(pc_angle+pc_crot))+yhalf;
|
|
||||||
|
|
||||||
// advance blob painter
|
|
||||||
box(tx, ty);
|
|
||||||
|
|
||||||
// new movement parameters
|
|
||||||
pc_angle += pc_inc;
|
|
||||||
if (pc_angle > 2.0*M_PI)
|
|
||||||
{
|
|
||||||
pc_angle -= 2.0*M_PI;
|
|
||||||
pc_crot += M_PI/45.0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlobSaver::box ( int x, int y )
|
|
||||||
{
|
|
||||||
// for bad behaving algorithms that wants to cause an X trap
|
|
||||||
// confine to the valid region before using potentially fatal XGetImage
|
|
||||||
if ((x+dim) >= width())
|
|
||||||
x = width()-dim-1;
|
|
||||||
else if (x < 0)
|
|
||||||
x = 0;
|
|
||||||
if ((y+dim) > height())
|
|
||||||
y = height()-dim-1;
|
|
||||||
else if (y < 0)
|
|
||||||
y = 0;
|
|
||||||
|
|
||||||
// get the box region from the display to upgrade
|
|
||||||
QImage img = QPixmap::grabWindow(winId(), x, y, dim, dim).toImage();
|
|
||||||
|
|
||||||
// depending on the depth of the display, use either lookup table for
|
|
||||||
// next rgb val ( 8-bit ) or ramp the color directly for other displays
|
|
||||||
if ( img.depth() == 8)
|
|
||||||
{
|
|
||||||
// manipulate image by upgrading each pixel with 1 using a lookup
|
|
||||||
// table as the color allocation could have resulted in a spread out
|
|
||||||
// configuration of the color ramp
|
|
||||||
for (int j = 0; j < img.height(); j++)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < img.width(); i++)
|
|
||||||
{
|
|
||||||
img.scanLine(j)[i] = lookup[img.scanLine(j)[i]];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (int j = 0; j < img.height(); j++)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < img.width(); i++)
|
|
||||||
{
|
|
||||||
QRgb p = img.pixel( i, j );
|
|
||||||
p += (colorInc<<18);
|
|
||||||
img.setPixel( i, j, p );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// put the image back onto the screen
|
|
||||||
QPainter p(this);
|
|
||||||
p.drawImage( x, y, img );
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlobSaver::readSettings()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
// number of seconds to spend on a frame
|
|
||||||
showlen = config.readEntry("Showtime", 3*60);
|
|
||||||
|
|
||||||
// algorithm to use. if not set then use random
|
|
||||||
alg = config.readEntry("Algorithm", int(ALG_RANDOM));
|
|
||||||
if (alg == ALG_RANDOM)
|
|
||||||
newalg = 1;
|
|
||||||
else
|
|
||||||
newalg = 2;
|
|
||||||
newalgp = newalg;
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// dialog to setup screen saver parameters
|
|
||||||
//
|
|
||||||
KBlobSetup::KBlobSetup(QWidget *parent)
|
|
||||||
: KDialog( parent)
|
|
||||||
{
|
|
||||||
setCaption(i18n( "Setup Blob Screen Saver" ));
|
|
||||||
setButtons(Ok|Cancel|Help);
|
|
||||||
setDefaultButton(Ok);
|
|
||||||
setModal(true);
|
|
||||||
initAlg();
|
|
||||||
|
|
||||||
// get saver configuration from kde registry
|
|
||||||
readSettings();
|
|
||||||
|
|
||||||
setButtonText( Help, i18n( "A&bout" ) );
|
|
||||||
QWidget *main = new QWidget(this);
|
|
||||||
setMainWidget(main);
|
|
||||||
|
|
||||||
QHBoxLayout *tl = new QHBoxLayout( main );
|
|
||||||
//tl->setContentsMargins(0, 0, 0, 0);
|
|
||||||
tl->setSpacing(spacingHint());
|
|
||||||
|
|
||||||
QVBoxLayout *vbox = new QVBoxLayout;
|
|
||||||
tl->addLayout(vbox);
|
|
||||||
|
|
||||||
// seconds to generate on a frame
|
|
||||||
QLabel *label = new QLabel(i18n("Frame duration:"), main);
|
|
||||||
stime = new KIntNumInput( showtime, main );
|
|
||||||
stime->setSuffix( i18n( " sec" ) );
|
|
||||||
vbox->addWidget(label);
|
|
||||||
vbox->addWidget(stime);
|
|
||||||
|
|
||||||
// available algorithms
|
|
||||||
label = new QLabel(i18n("Algorithm:"), main);
|
|
||||||
algs = new QListWidget(main);
|
|
||||||
algs->setMinimumSize(150, 105);
|
|
||||||
for (int i = 0; i <= ALG_RANDOM; i++)
|
|
||||||
algs->addItem(alg_str[i]);
|
|
||||||
algs->setCurrentRow(alg);
|
|
||||||
vbox->addWidget(label);
|
|
||||||
vbox->addWidget(algs);
|
|
||||||
|
|
||||||
// preview window
|
|
||||||
QWidget *preview = new QWidget( main );
|
|
||||||
preview->setFixedSize(220, 170);
|
|
||||||
{
|
|
||||||
QPalette palette;
|
|
||||||
palette.setColor( preview->backgroundRole(), Qt::black );
|
|
||||||
preview->setPalette( palette );
|
|
||||||
}
|
|
||||||
preview->show();
|
|
||||||
tl->addWidget(preview);
|
|
||||||
saver = new KBlobSaver(preview->winId());
|
|
||||||
saver->setDimension(3);
|
|
||||||
if (QPixmap::defaultDepth() > 8)
|
|
||||||
saver->setColorInc(7);
|
|
||||||
else
|
|
||||||
saver->setColorInc(4);
|
|
||||||
|
|
||||||
tl->addStretch();
|
|
||||||
|
|
||||||
// so selecting an algorithm will start previewing that alg
|
|
||||||
connect(algs, SIGNAL(itemChanged(QListWidgetItem*)), this,
|
|
||||||
SLOT(setAlgorithm(QListWidgetItem*)));
|
|
||||||
connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
|
|
||||||
connect(this,SIGNAL(helpClicked()),this, SLOT(slotHelp()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlobSetup::setAlgorithm(QListWidgetItem* item)
|
|
||||||
{
|
|
||||||
if(!item)
|
|
||||||
return;
|
|
||||||
int pos = algs->currentRow();
|
|
||||||
saver->setAlgorithm(pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlobSetup::readSettings()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
// number of seconds to spend on a frame
|
|
||||||
showtime = config.readEntry("Showtime", 3*60);
|
|
||||||
|
|
||||||
// algorithm to use. if not set then use random
|
|
||||||
alg = config.readEntry("Algorithm", (int)ALG_LAST);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ok pressed - save settings and exit
|
|
||||||
void KBlobSetup::slotOk()
|
|
||||||
{
|
|
||||||
KConfigGroup config( KGlobal::config(), "Settings");
|
|
||||||
config.writeEntry("Showtime", stime->value());
|
|
||||||
config.writeEntry("Algorithm", algs->currentRow());
|
|
||||||
|
|
||||||
config.sync();
|
|
||||||
|
|
||||||
accept();
|
|
||||||
}
|
|
||||||
|
|
||||||
void KBlobSetup::slotHelp()
|
|
||||||
{
|
|
||||||
KMessageBox::about(this,
|
|
||||||
i18n("Blobsaver Version 0.1\n\nWritten by Tiaan Wessels 1997\ntiaan@netsys.co.za"));
|
|
||||||
if (saver)
|
|
||||||
setAlgorithm(algs->currentItem());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -1,117 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// kblob - Basic screen saver for KDE
|
|
||||||
//
|
|
||||||
// Copyright (c) Tiaan Wessels, 1997
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef BLOB_H
|
|
||||||
#define BLOB_H
|
|
||||||
|
|
||||||
#include <qtimer.h>
|
|
||||||
|
|
||||||
#include <kdialog.h>
|
|
||||||
#include <kscreensaver.h>
|
|
||||||
|
|
||||||
#include <QListWidgetItem>
|
|
||||||
|
|
||||||
#define RAMP 64
|
|
||||||
#define SPEED 10
|
|
||||||
|
|
||||||
enum blob_alg {
|
|
||||||
ALG_LINEAR,
|
|
||||||
ALG_HSINE,
|
|
||||||
ALG_CIRB,
|
|
||||||
ALG_POLARC,
|
|
||||||
ALG_LAST,
|
|
||||||
ALG_RANDOM = ALG_LAST };
|
|
||||||
|
|
||||||
class KBlobSaver : public KScreenSaver
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
KBlobSaver( WId id );
|
|
||||||
virtual ~KBlobSaver();
|
|
||||||
|
|
||||||
void setDimension(int d)
|
|
||||||
{ dim = d; }
|
|
||||||
void setShowlen(time_t s)
|
|
||||||
{ showlen = s; }
|
|
||||||
void setColorInc(int c)
|
|
||||||
{ colorInc = c; }
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void setAlgorithm(int pos);
|
|
||||||
|
|
||||||
public:
|
|
||||||
typedef void (KBlobSaver::*AlgFunc)();
|
|
||||||
struct KBSAlg
|
|
||||||
{
|
|
||||||
QString Name;
|
|
||||||
AlgFunc Init;
|
|
||||||
AlgFunc NextFrame;
|
|
||||||
};
|
|
||||||
private:
|
|
||||||
|
|
||||||
QTimer timer;
|
|
||||||
uint colors[RAMP];
|
|
||||||
uint lookup[256];
|
|
||||||
int colorInc;
|
|
||||||
int tx, ty;
|
|
||||||
int dim;
|
|
||||||
int xhalf, yhalf;
|
|
||||||
int alg, newalg, newalgp;
|
|
||||||
time_t showlen, start;
|
|
||||||
KBSAlg Algs[ALG_LAST];
|
|
||||||
int ln_xinc, ln_yinc;
|
|
||||||
float hs_radians, hs_rinc, hs_flip, hs_per;
|
|
||||||
float cb_radians, cb_rinc, cb_sradians, cb_radius, cb_devradinc;
|
|
||||||
float cb_deviate;
|
|
||||||
float pc_angle, pc_radius, pc_inc, pc_crot, pc_div;
|
|
||||||
|
|
||||||
void lnSetup();
|
|
||||||
void hsSetup();
|
|
||||||
void cbSetup();
|
|
||||||
void pcSetup();
|
|
||||||
|
|
||||||
void lnNextFrame();
|
|
||||||
void hsNextFrame();
|
|
||||||
void cbNextFrame();
|
|
||||||
void pcNextFrame();
|
|
||||||
|
|
||||||
void box(int, int);
|
|
||||||
void readSettings();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void paintEvent(QPaintEvent *event);
|
|
||||||
};
|
|
||||||
|
|
||||||
#include <QListWidget>
|
|
||||||
class KIntNumInput;
|
|
||||||
|
|
||||||
class KBlobSetup : public KDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
int showtime;
|
|
||||||
int alg;
|
|
||||||
QListWidget *algs;
|
|
||||||
KIntNumInput *stime;
|
|
||||||
|
|
||||||
public:
|
|
||||||
KBlobSetup( QWidget *parent = NULL );
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void readSettings();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotOk();
|
|
||||||
void slotHelp();
|
|
||||||
void setAlgorithm(QListWidgetItem* item);
|
|
||||||
private:
|
|
||||||
KBlobSaver *saver;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,519 +0,0 @@
|
||||||
// kclock - Clock screen saver for KDE
|
|
||||||
//
|
|
||||||
// Copyright (c) 2003, 2006, 2007, 2008 Melchior FRANZ <mfranz # kde : org>
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation; either version 2 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
#include <QCheckBox>
|
|
||||||
#include <QColor>
|
|
||||||
#include <QGridLayout>
|
|
||||||
#include <QGroupBox>
|
|
||||||
#include <QHBoxLayout>
|
|
||||||
#include <QImage>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QSlider>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QDateTime>
|
|
||||||
|
|
||||||
#include <KColorButton>
|
|
||||||
#include <KConfig>
|
|
||||||
#include <KGlobal>
|
|
||||||
#include <KHBox>
|
|
||||||
#include <KLocale>
|
|
||||||
#include <KMessageBox>
|
|
||||||
|
|
||||||
#include "kclock.h"
|
|
||||||
#include "moc_kclock.cpp"
|
|
||||||
|
|
||||||
|
|
||||||
const int COLOR_BUTTON_WIDTH = 80;
|
|
||||||
const int TIMER_INTERVAL = 100;
|
|
||||||
const int MAX_CLOCK_SIZE = 10;
|
|
||||||
const unsigned int DEFAULT_CLOCK_SIZE = 8;
|
|
||||||
const bool DEFAULT_KEEP_CENTERED = false;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class KClockSaverInterface : public KScreenSaverInterface {
|
|
||||||
public:
|
|
||||||
virtual KAboutData *aboutData() {
|
|
||||||
return new KAboutData("kclock.kss", "klock", ki18n("Clock"), "2.0", ki18n("Clock"));
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual KScreenSaver *create(WId id) {
|
|
||||||
return new KClockSaver(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual QDialog *setup() {
|
|
||||||
return new KClockSetup();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
KClockSaverInterface kss;
|
|
||||||
return kScreenSaverMain(argc, argv, kss);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
KClockSetup::KClockSetup(QWidget *parent) :
|
|
||||||
KDialog(parent),
|
|
||||||
_saver(0)
|
|
||||||
{
|
|
||||||
setCaption(i18n("Setup Clock Screen Saver"));
|
|
||||||
setModal(true);
|
|
||||||
setButtons(Ok|Cancel|Help);
|
|
||||||
setDefaultButton(Ok);
|
|
||||||
|
|
||||||
readSettings();
|
|
||||||
|
|
||||||
setButtonText(Help, i18n("A&bout"));
|
|
||||||
QWidget *main = new QWidget(this);
|
|
||||||
setMainWidget(main);
|
|
||||||
|
|
||||||
QVBoxLayout *top = new QVBoxLayout(main);
|
|
||||||
|
|
||||||
QHBoxLayout *hbox = new QHBoxLayout;
|
|
||||||
top->addLayout(hbox);
|
|
||||||
|
|
||||||
|
|
||||||
QGroupBox *colgroup = new QGroupBox(i18n("Colors"), main);
|
|
||||||
QGridLayout *grid = new QGridLayout();
|
|
||||||
|
|
||||||
QLabel *label;
|
|
||||||
KColorButton *colorButton;
|
|
||||||
|
|
||||||
label = new QLabel(i18n("&Hour-hand:"));
|
|
||||||
colorButton = new KColorButton(_hourColor);
|
|
||||||
colorButton->setFixedWidth(COLOR_BUTTON_WIDTH);
|
|
||||||
label->setBuddy(colorButton);
|
|
||||||
connect(colorButton, SIGNAL(changed(QColor)),
|
|
||||||
SLOT(slotHourColor(QColor)));
|
|
||||||
grid->addWidget(label, 1, 1);
|
|
||||||
grid->addWidget(colorButton, 1, 2);
|
|
||||||
|
|
||||||
label = new QLabel(i18n("&Minute-hand:"));
|
|
||||||
colorButton = new KColorButton(_minColor);
|
|
||||||
colorButton->setFixedWidth(COLOR_BUTTON_WIDTH);
|
|
||||||
label->setBuddy(colorButton);
|
|
||||||
connect(colorButton, SIGNAL(changed(QColor)),
|
|
||||||
SLOT(slotMinColor(QColor)));
|
|
||||||
grid->addWidget(label, 2, 1);
|
|
||||||
grid->addWidget(colorButton, 2, 2);
|
|
||||||
|
|
||||||
label = new QLabel(i18n("&Second-hand:"));
|
|
||||||
colorButton = new KColorButton(_secColor);
|
|
||||||
colorButton->setFixedWidth(COLOR_BUTTON_WIDTH);
|
|
||||||
label->setBuddy(colorButton);
|
|
||||||
connect(colorButton, SIGNAL(changed(QColor)),
|
|
||||||
SLOT(slotSecColor(QColor)));
|
|
||||||
grid->addWidget(label, 3, 1);
|
|
||||||
grid->addWidget(colorButton, 3, 2);
|
|
||||||
|
|
||||||
label = new QLabel(i18n("Scal&e:"));
|
|
||||||
colorButton = new KColorButton(_scaleColor);
|
|
||||||
colorButton->setFixedWidth(COLOR_BUTTON_WIDTH);
|
|
||||||
label->setBuddy(colorButton);
|
|
||||||
connect(colorButton, SIGNAL(changed(QColor)),
|
|
||||||
SLOT(slotScaleColor(QColor)));
|
|
||||||
grid->addWidget(label, 4, 1);
|
|
||||||
grid->addWidget(colorButton, 4, 2);
|
|
||||||
|
|
||||||
label = new QLabel(i18n("&Background:"));
|
|
||||||
colorButton = new KColorButton(_bgndColor);
|
|
||||||
colorButton->setFixedWidth(COLOR_BUTTON_WIDTH);
|
|
||||||
label->setBuddy(colorButton);
|
|
||||||
connect(colorButton, SIGNAL(changed(QColor)),
|
|
||||||
SLOT(slotBgndColor(QColor)));
|
|
||||||
grid->addWidget(label, 5, 1);
|
|
||||||
grid->addWidget(colorButton, 5, 2);
|
|
||||||
|
|
||||||
hbox->addWidget(colgroup);
|
|
||||||
colgroup->setLayout(grid);
|
|
||||||
|
|
||||||
|
|
||||||
QWidget *_preview = new QWidget(main);
|
|
||||||
_preview->setFixedSize(220, 165);
|
|
||||||
_preview->show();
|
|
||||||
_saver = new KClockSaver(_preview->winId());
|
|
||||||
hbox->addWidget(_preview);
|
|
||||||
|
|
||||||
label = new QLabel(i18n("Si&ze:"), main);
|
|
||||||
top->addWidget(label);
|
|
||||||
QSlider *qs = new QSlider(Qt::Horizontal);
|
|
||||||
label->setBuddy(qs);
|
|
||||||
qs->setRange(0, MAX_CLOCK_SIZE);
|
|
||||||
qs->setSliderPosition(_size);
|
|
||||||
qs->setTickInterval(1);
|
|
||||||
qs->setTickPosition(QSlider::TicksBelow);
|
|
||||||
connect(qs, SIGNAL(valueChanged(int)), this, SLOT(slotSliderMoved(int)));
|
|
||||||
top->addWidget(qs);
|
|
||||||
|
|
||||||
KHBox *qsscale = new KHBox(main);
|
|
||||||
label = new QLabel(i18n("Small"), qsscale);
|
|
||||||
label->setAlignment(Qt::AlignLeading);
|
|
||||||
label = new QLabel(i18n("Medium"), qsscale);
|
|
||||||
label->setAlignment(Qt::AlignHCenter);
|
|
||||||
label = new QLabel(i18n("Big"), qsscale);
|
|
||||||
label->setAlignment(Qt::AlignTrailing);
|
|
||||||
top->addWidget(qsscale);
|
|
||||||
|
|
||||||
QCheckBox *keepCentered = new QCheckBox(i18n("&Keep clock centered"), main);
|
|
||||||
keepCentered->setChecked(_keepCentered);
|
|
||||||
connect(keepCentered, SIGNAL(stateChanged(int)), SLOT(slotKeepCenteredChanged(int)));
|
|
||||||
top->addWidget(keepCentered);
|
|
||||||
top->addStretch();
|
|
||||||
|
|
||||||
connect(this, SIGNAL(okClicked()), this, SLOT(slotOk()));
|
|
||||||
connect(this, SIGNAL(helpClicked()), this, SLOT(slotHelp()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
KClockSetup::~KClockSetup()
|
|
||||||
{
|
|
||||||
delete _saver;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSetup::readSettings()
|
|
||||||
{
|
|
||||||
KConfigGroup settings(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
_keepCentered = settings.readEntry("KeepCentered", DEFAULT_KEEP_CENTERED);
|
|
||||||
_size = settings.readEntry("Size", DEFAULT_CLOCK_SIZE);
|
|
||||||
if (_size > MAX_CLOCK_SIZE)
|
|
||||||
_size = MAX_CLOCK_SIZE;
|
|
||||||
|
|
||||||
KConfigGroup colors(KGlobal::config(), "Colors");
|
|
||||||
QColor c = Qt::black;
|
|
||||||
_bgndColor = colors.readEntry("Background", c);
|
|
||||||
|
|
||||||
c = Qt::white;
|
|
||||||
_scaleColor = colors.readEntry("Scale", c);
|
|
||||||
_hourColor = colors.readEntry("HourHand", c);
|
|
||||||
_minColor = colors.readEntry("MinuteHand", c);
|
|
||||||
|
|
||||||
c = Qt::red;
|
|
||||||
_secColor = colors.readEntry("SecondHand", c);
|
|
||||||
|
|
||||||
if (_saver) {
|
|
||||||
_saver->setBgndColor(_bgndColor);
|
|
||||||
_saver->setScaleColor(_scaleColor);
|
|
||||||
_saver->setHourColor(_hourColor);
|
|
||||||
_saver->setMinColor(_minColor);
|
|
||||||
_saver->setSecColor(_secColor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSetup::slotOk()
|
|
||||||
{
|
|
||||||
KConfigGroup settings(KGlobal::config(), "Settings");
|
|
||||||
settings.writeEntry("Size", _size);
|
|
||||||
settings.writeEntry("KeepCentered", _keepCentered);
|
|
||||||
settings.sync();
|
|
||||||
|
|
||||||
KConfigGroup colors(KGlobal::config(), "Colors");
|
|
||||||
colors.writeEntry("Background", _bgndColor);
|
|
||||||
colors.writeEntry("Scale", _scaleColor);
|
|
||||||
colors.writeEntry("HourHand", _hourColor);
|
|
||||||
colors.writeEntry("MinuteHand", _minColor);
|
|
||||||
colors.writeEntry("SecondHand", _secColor);
|
|
||||||
colors.sync();
|
|
||||||
accept();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSetup::slotHelp()
|
|
||||||
{
|
|
||||||
KMessageBox::about(this, QLatin1String("<qt>") + i18n(
|
|
||||||
"Clock Screen Saver<br>"
|
|
||||||
"Version 2.0<br>"
|
|
||||||
"<nobr>Melchior FRANZ (c) 2003, 2006, 2007</nobr>") +
|
|
||||||
QLatin1String("<br><a href=\"mailto:mfranz@kde.org\">mfranz@kde.org</a>"
|
|
||||||
"</qt>"), QString(), KMessageBox::AllowLink);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSetup::slotBgndColor(const QColor &color)
|
|
||||||
{
|
|
||||||
_bgndColor = color;
|
|
||||||
if (_saver)
|
|
||||||
_saver->setBgndColor(_bgndColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSetup::slotScaleColor(const QColor &color)
|
|
||||||
{
|
|
||||||
_scaleColor = color;
|
|
||||||
if (_saver)
|
|
||||||
_saver->setScaleColor(_scaleColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSetup::slotHourColor(const QColor &color)
|
|
||||||
{
|
|
||||||
_hourColor = color;
|
|
||||||
if (_saver)
|
|
||||||
_saver->setHourColor(_hourColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSetup::slotMinColor(const QColor &color)
|
|
||||||
{
|
|
||||||
_minColor = color;
|
|
||||||
if (_saver)
|
|
||||||
_saver->setMinColor(_minColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSetup::slotSecColor(const QColor &color)
|
|
||||||
{
|
|
||||||
_secColor = color;
|
|
||||||
if (_saver)
|
|
||||||
_saver->setSecColor(_secColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSetup::slotSliderMoved(int v)
|
|
||||||
{
|
|
||||||
if (_saver)
|
|
||||||
_saver->resizeClock(_size = v);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSetup::slotKeepCenteredChanged(int c)
|
|
||||||
{
|
|
||||||
if (_saver)
|
|
||||||
_saver->setKeepCentered(_keepCentered = c);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
ClockPainter::ClockPainter(QPaintDevice *device, int diameter) :
|
|
||||||
QPainter(device)
|
|
||||||
{
|
|
||||||
setRenderHint(QPainter::Antialiasing);
|
|
||||||
translate(diameter / 2.0, diameter / 2.0);
|
|
||||||
scale(diameter / 2000.0, -diameter / 2000.0);
|
|
||||||
setPen(Qt::NoPen);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ClockPainter::drawTick(double angle, double from, double to, double width, const QColor &color, bool shadow)
|
|
||||||
{
|
|
||||||
save();
|
|
||||||
rotate(90.0 - angle);
|
|
||||||
|
|
||||||
if (shadow) {
|
|
||||||
width += 1.0;
|
|
||||||
setBrush(QColor(100, 100, 100));
|
|
||||||
} else {
|
|
||||||
setBrush(color);
|
|
||||||
}
|
|
||||||
drawRect(QRectF(from, -width / 2.0, to - from, width));
|
|
||||||
restore();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ClockPainter::drawDisc(double width, const QColor &color, bool shadow)
|
|
||||||
{
|
|
||||||
if (shadow) {
|
|
||||||
width += 1.0;
|
|
||||||
setBrush(QColor(100, 100, 100));
|
|
||||||
} else {
|
|
||||||
setBrush(color);
|
|
||||||
}
|
|
||||||
drawEllipse(QRectF(-width, -width, 2.0 * width, 2.0 * width));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ClockPainter::drawHand(double angle, double length, double width, const QColor &color, bool disc)
|
|
||||||
{
|
|
||||||
if (disc)
|
|
||||||
drawDisc(width * 1.3, color, true);
|
|
||||||
drawTick(angle, 0.0, length, width, color, true);
|
|
||||||
|
|
||||||
if (disc)
|
|
||||||
drawDisc(width * 1.3, color, false);
|
|
||||||
drawTick(angle, 0.0, length, width, color, false);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ClockPainter::drawScale(const QColor &color)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < 360; i += 6)
|
|
||||||
if (i % 30)
|
|
||||||
drawTick(i, 920.0, 980.0, 15.0, color);
|
|
||||||
else
|
|
||||||
drawTick(i, 825.0, 980.0, 40.0, color);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
KClockSaver::KClockSaver(WId id) :
|
|
||||||
KScreenSaver(id),
|
|
||||||
_timer(this),
|
|
||||||
_xstep(1),
|
|
||||||
_ystep(-1),
|
|
||||||
_hour(-1),
|
|
||||||
_minute(-1),
|
|
||||||
_second(-1)
|
|
||||||
{
|
|
||||||
setAttribute(Qt::WA_NoSystemBackground);
|
|
||||||
setMinimumSize(50, 50);
|
|
||||||
readSettings();
|
|
||||||
resizeClock(_size);
|
|
||||||
|
|
||||||
QPalette p = palette();
|
|
||||||
p.setColor(backgroundRole(), _bgndColor);
|
|
||||||
setPalette(p);
|
|
||||||
|
|
||||||
connect(&_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
|
|
||||||
show();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSaver::readSettings()
|
|
||||||
{
|
|
||||||
KConfigGroup settings(KGlobal::config(), "Settings");
|
|
||||||
_keepCentered = settings.readEntry("KeepCentered", DEFAULT_KEEP_CENTERED);
|
|
||||||
_size = settings.readEntry("Size", DEFAULT_CLOCK_SIZE);
|
|
||||||
if (_size > MAX_CLOCK_SIZE)
|
|
||||||
_size = MAX_CLOCK_SIZE;
|
|
||||||
|
|
||||||
KConfigGroup colors(KGlobal::config(), "Colors");
|
|
||||||
QColor c = Qt::black;
|
|
||||||
setBgndColor(colors.readEntry("Background", c));
|
|
||||||
|
|
||||||
c = Qt::white;
|
|
||||||
setScaleColor(colors.readEntry("Scale", c));
|
|
||||||
setHourColor(colors.readEntry("HourHand", c));
|
|
||||||
setMinColor(colors.readEntry("MinuteHand", c));
|
|
||||||
|
|
||||||
c = Qt::red;
|
|
||||||
setSecColor(colors.readEntry("SecondHand", c));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSaver::setKeepCentered(bool b)
|
|
||||||
{
|
|
||||||
_keepCentered = b;
|
|
||||||
if (b) {
|
|
||||||
_x = (width() - _diameter) / 2;
|
|
||||||
_y = (height() - _diameter) / 2;
|
|
||||||
}
|
|
||||||
update();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSaver::resizeClock(int size)
|
|
||||||
{
|
|
||||||
_size = size;
|
|
||||||
_diameter = qMin(width(), height()) * (_size + 4) / 14;
|
|
||||||
_x = (width() - _diameter) / 2;
|
|
||||||
_y = (height() - _diameter) / 2;
|
|
||||||
update();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSaver::resizeEvent(QResizeEvent *)
|
|
||||||
{
|
|
||||||
resizeClock(_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSaver::showEvent(QShowEvent *)
|
|
||||||
{
|
|
||||||
_second = -1;
|
|
||||||
slotTimeout();
|
|
||||||
_timer.start(TIMER_INTERVAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSaver::hideEvent(QHideEvent *)
|
|
||||||
{
|
|
||||||
_timer.stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSaver::slotTimeout()
|
|
||||||
{
|
|
||||||
QTime t = QTime::currentTime();
|
|
||||||
int s = t.second();
|
|
||||||
if (s == _second)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_second = _secColor != _bgndColor ? s : 0;
|
|
||||||
_hour = t.hour();
|
|
||||||
_minute = t.minute();
|
|
||||||
|
|
||||||
if (!_keepCentered) {
|
|
||||||
int i;
|
|
||||||
_x += _xstep;
|
|
||||||
if (_x <= 0)
|
|
||||||
_x = 0, _xstep = 1;
|
|
||||||
else if (_x >= (i = width() - _diameter))
|
|
||||||
_x = i, _xstep = -1;
|
|
||||||
|
|
||||||
_y += _ystep;
|
|
||||||
if (_y <= 0)
|
|
||||||
_y = 0, _ystep = 1;
|
|
||||||
else if (_y >= (i = height() - _diameter))
|
|
||||||
_y = i, _ystep = -1;
|
|
||||||
}
|
|
||||||
update();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KClockSaver::paintEvent(QPaintEvent *)
|
|
||||||
{
|
|
||||||
double hour_angle = _hour * 30.0 + _minute * .5 + _second / 120.0;
|
|
||||||
double minute_angle = _minute * 6.0 + _second * .1;
|
|
||||||
double second_angle = _second * 6.0;
|
|
||||||
|
|
||||||
QImage clock(_diameter, _diameter, QImage::Format_RGB32);
|
|
||||||
ClockPainter c(&clock, _diameter);
|
|
||||||
c.fillRect(-1000, -1000, 2000, 2000, _bgndColor);
|
|
||||||
|
|
||||||
if (_scaleColor != _bgndColor)
|
|
||||||
c.drawScale(_scaleColor);
|
|
||||||
if (_hourColor != _bgndColor)
|
|
||||||
c.drawHand(hour_angle, 600.0, 55.0, _hourColor, false);
|
|
||||||
if (_minColor != _bgndColor)
|
|
||||||
c.drawHand(minute_angle, 900.0, 40.0, _minColor);
|
|
||||||
if (_secColor != _bgndColor)
|
|
||||||
c.drawHand(second_angle, 900.0, 30.0, _secColor);
|
|
||||||
|
|
||||||
QPainter p(this);
|
|
||||||
p.drawImage(_x, _y, clock);
|
|
||||||
p.eraseRect(0, 0, _x, height()); // left ver
|
|
||||||
p.eraseRect(_x + _diameter, 0, width(), height()); // right ver
|
|
||||||
p.eraseRect(_x, 0, _diameter, _y); // top hor
|
|
||||||
p.eraseRect(_x, _y + _diameter, _diameter, height() - _y - _diameter); // bottom hor
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -1,118 +0,0 @@
|
||||||
// kclock - Clock screen saver for KDE
|
|
||||||
//
|
|
||||||
// Copyright (c) 2003, 2006, 2007, 2008 Melchior FRANZ <mfranz # kde : org>
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation; either version 2 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
#ifndef KCLOCK_H
|
|
||||||
#define KCLOCK_H
|
|
||||||
|
|
||||||
#include <QTimer>
|
|
||||||
#include <QPainter>
|
|
||||||
|
|
||||||
#include <KDialog>
|
|
||||||
#include <kscreensaver.h>
|
|
||||||
|
|
||||||
|
|
||||||
class KClockSaver;
|
|
||||||
|
|
||||||
|
|
||||||
class KClockSetup : public KDialog {
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
KClockSetup(QWidget *parent = 0);
|
|
||||||
~KClockSetup();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotOk();
|
|
||||||
void slotHelp();
|
|
||||||
|
|
||||||
void slotBgndColor(const QColor &);
|
|
||||||
void slotScaleColor(const QColor &);
|
|
||||||
void slotHourColor(const QColor &);
|
|
||||||
void slotMinColor(const QColor &);
|
|
||||||
void slotSecColor(const QColor &);
|
|
||||||
void slotSliderMoved(int);
|
|
||||||
void slotKeepCenteredChanged(int);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void readSettings();
|
|
||||||
KClockSaver *_saver;
|
|
||||||
|
|
||||||
QColor _bgndColor;
|
|
||||||
QColor _scaleColor;
|
|
||||||
QColor _hourColor;
|
|
||||||
QColor _minColor;
|
|
||||||
QColor _secColor;
|
|
||||||
|
|
||||||
int _size;
|
|
||||||
bool _keepCentered;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ClockPainter : public QPainter {
|
|
||||||
public:
|
|
||||||
ClockPainter(QPaintDevice *device, int diameter);
|
|
||||||
void drawTick(double angle, double from, double to, double width, const QColor &, bool shadow = false);
|
|
||||||
void drawDisc(double width, const QColor &, bool shadow = false);
|
|
||||||
void drawHand(double angle, double length, double width, const QColor &, bool disc = true);
|
|
||||||
void drawScale(const QColor &);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class KClockSaver : public KScreenSaver {
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
KClockSaver(WId id);
|
|
||||||
inline void setBgndColor(const QColor &c) { _second = -1; setPalette(QPalette(_bgndColor = c)); }
|
|
||||||
inline void setScaleColor(const QColor &c) { _second = -1; _scaleColor = c; }
|
|
||||||
inline void setHourColor(const QColor &c) { _second = -1; _hourColor = c; }
|
|
||||||
inline void setMinColor(const QColor &c) { _second = -1; _minColor = c; }
|
|
||||||
inline void setSecColor(const QColor &c) { _second = -1; _secColor = c; }
|
|
||||||
void setKeepCentered(bool b);
|
|
||||||
void resizeClock(int size);
|
|
||||||
void paintEvent(QPaintEvent *);
|
|
||||||
void resizeEvent(QResizeEvent *);
|
|
||||||
void showEvent(QShowEvent *);
|
|
||||||
void hideEvent(QHideEvent *);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotTimeout();
|
|
||||||
|
|
||||||
private:
|
|
||||||
void readSettings();
|
|
||||||
|
|
||||||
QTimer _timer;
|
|
||||||
QColor _bgndColor;
|
|
||||||
QColor _scaleColor;
|
|
||||||
QColor _hourColor;
|
|
||||||
QColor _minColor;
|
|
||||||
QColor _secColor;
|
|
||||||
bool _keepCentered;
|
|
||||||
int _size;
|
|
||||||
|
|
||||||
int _x;
|
|
||||||
int _y;
|
|
||||||
int _xstep;
|
|
||||||
int _ystep;
|
|
||||||
int _diameter;
|
|
||||||
int _hour;
|
|
||||||
int _minute;
|
|
||||||
int _second;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
Binary file not shown.
Before Width: | Height: | Size: 9.5 KiB |
|
@ -1,396 +0,0 @@
|
||||||
/*-
|
|
||||||
* kvm.cpp - The Vm screensaver for KDE
|
|
||||||
* Copyright (c) 2000 by Artur Rataj
|
|
||||||
* This file is distributed under the terms of the GNU General Public License
|
|
||||||
*
|
|
||||||
* This file is partially based on kmatrix screen saver -- original copyright follows:
|
|
||||||
* kmatrix.c - The Matrix screensaver for KDE
|
|
||||||
* by Eric Plante Copyright (c) 1999
|
|
||||||
* Distributed under the Gnu Public License
|
|
||||||
*
|
|
||||||
* Much of this code taken from xmatrix.c from xscreensaver;
|
|
||||||
* original copyright follows:
|
|
||||||
* xscreensaver, Copyright (c) 1999 Jamie Zawinski <jwz@jwz.org>
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
* documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
* the above copyright notice appear in all copies and that both that
|
|
||||||
* copyright notice and this permission notice appear in supporting
|
|
||||||
* documentation. No representations are made about the suitability of this
|
|
||||||
* software for any purpose. It is provided "as is" without express or
|
|
||||||
* implied warranty.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
// layout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org>
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
/* for AIX at least */
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#include <qcolor.h>
|
|
||||||
#include <qlabel.h>
|
|
||||||
#include <qlayout.h>
|
|
||||||
#include <qslider.h>
|
|
||||||
#include <qpainter.h>
|
|
||||||
#include <qbitmap.h>
|
|
||||||
|
|
||||||
#include <kapplication.h>
|
|
||||||
#include <kconfig.h>
|
|
||||||
#include <klocale.h>
|
|
||||||
#include <kglobal.h>
|
|
||||||
#include <kmessagebox.h>
|
|
||||||
|
|
||||||
#ifdef DEBUG_MEM
|
|
||||||
#include <mcheck.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "kvm.h"
|
|
||||||
|
|
||||||
#include "vm.xpm"
|
|
||||||
#include "vm.xbm"
|
|
||||||
|
|
||||||
#define CHAR_HEIGHT 22
|
|
||||||
|
|
||||||
|
|
||||||
// libkscreensaver interface
|
|
||||||
class kVmSaverInterface : public KScreenSaverInterface
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
virtual KAboutData* aboutData() {
|
|
||||||
return new KAboutData( "kvm.kss", "klock", ki18n( "Virtual Machine" ), "2.2.0", ki18n( "Virtual Machine" ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
virtual KScreenSaver* create( WId id )
|
|
||||||
{
|
|
||||||
return new kVmSaver( id );
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual QDialog* setup()
|
|
||||||
{
|
|
||||||
return new kVmSetup();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
int main( int argc, char *argv[] )
|
|
||||||
{
|
|
||||||
kVmSaverInterface kss;
|
|
||||||
return kScreenSaverMain( argc, argv, kss );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
load_images (m_state *state)
|
|
||||||
{
|
|
||||||
if ( QPixmap::defaultDepth() > 1 )
|
|
||||||
{
|
|
||||||
state->images = QPixmap( vm );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
state->images = QBitmap::fromData( QSize(vm_width, vm_height), vm_bits );
|
|
||||||
}
|
|
||||||
state->image_width = state->images.width();
|
|
||||||
state->image_height = state->images.height();
|
|
||||||
state->nglyphs = state->image_height / CHAR_HEIGHT;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static m_state *
|
|
||||||
init_pool ( QWidget *w )
|
|
||||||
{
|
|
||||||
m_state *state = new m_state;
|
|
||||||
state->w = w;
|
|
||||||
|
|
||||||
load_images (state);
|
|
||||||
|
|
||||||
state->char_width = state->image_width / 4;
|
|
||||||
state->char_height = CHAR_HEIGHT;
|
|
||||||
|
|
||||||
state->grid_width = w->width() / state->char_width;
|
|
||||||
state->grid_height = w->height() / state->char_height;
|
|
||||||
state->grid_margin_x = w->width()%state->char_width/2;
|
|
||||||
state->grid_margin_y = w->height()%state->char_height/2;
|
|
||||||
state->show_threads = 1;
|
|
||||||
vm_init_pool( &(state->pool), state->grid_width*state->grid_height,
|
|
||||||
THREAD_MAX_STACK_SIZE, MAX_THREADS_NUM );
|
|
||||||
//vm_enable_reverse( state->pool, 1 );
|
|
||||||
state->modified = new char[state->grid_height*state->grid_width];
|
|
||||||
for( int x = 0; x < state->grid_width*state->grid_height; ++x )
|
|
||||||
state->modified[x] = 1;
|
|
||||||
return state;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
draw_pool (m_state *state)
|
|
||||||
{
|
|
||||||
int x, y;
|
|
||||||
struct tvm_process* curr_thread;
|
|
||||||
|
|
||||||
if( state->show_threads ) {
|
|
||||||
curr_thread = state->pool->processes;
|
|
||||||
while( curr_thread ) {
|
|
||||||
state->modified[curr_thread->position] = 2;
|
|
||||||
curr_thread = curr_thread->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (y = 0; y < state->grid_height; y++)
|
|
||||||
for (x = 0; x < state->grid_width; x++) {
|
|
||||||
int index = state->grid_width * y + x;
|
|
||||||
if( state->modified[index] )
|
|
||||||
{
|
|
||||||
int op = state->pool->area[index];
|
|
||||||
int pos_y;
|
|
||||||
int pos_x = 0;
|
|
||||||
switch( op ) {
|
|
||||||
case VM_OP_STOP:
|
|
||||||
pos_y = 14;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case VM_OP_EXEC:
|
|
||||||
pos_y = 15;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case VM_OP_COPY:
|
|
||||||
pos_y = 12;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
pos_y = op - VM_OP_PUSH;
|
|
||||||
if( pos_y < 0 ) {
|
|
||||||
pos_y = -pos_y;
|
|
||||||
pos_x = 1;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if( state->show_threads ) {
|
|
||||||
if( state->modified[index] == 1 ) {
|
|
||||||
pos_x += 2;
|
|
||||||
QPainter p(state->w);
|
|
||||||
p.setPen( Qt::green );
|
|
||||||
p.setBrush( Qt::black );
|
|
||||||
p.drawPixmap( state->grid_margin_x + x*state->char_width,
|
|
||||||
state->grid_margin_y + y*state->char_height,
|
|
||||||
state->images, pos_x*state->char_width,
|
|
||||||
pos_y*state->char_height,
|
|
||||||
state->char_width, state->char_height );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--state->modified[index];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
kVmSaver::kVmSaver( WId id ) : KScreenSaver( id )
|
|
||||||
{
|
|
||||||
readSettings();
|
|
||||||
|
|
||||||
setSpeed( speed );
|
|
||||||
setRefreshTimeout( refreshTimeout );
|
|
||||||
|
|
||||||
refreshStep = 0;
|
|
||||||
|
|
||||||
pool_state = init_pool( this );
|
|
||||||
vm_default_initstate( time(0), &(pool_state->pool->vm_random_data) );
|
|
||||||
connect( &timer, SIGNAL(timeout()), SLOT(update()) );
|
|
||||||
timer.start( 100 - speed );
|
|
||||||
setAttribute( Qt::WA_NoSystemBackground );
|
|
||||||
cleared = false;
|
|
||||||
show();
|
|
||||||
}
|
|
||||||
|
|
||||||
kVmSaver::~kVmSaver()
|
|
||||||
{
|
|
||||||
timer.stop();
|
|
||||||
vm_done_pool( pool_state->pool );
|
|
||||||
delete[] pool_state->modified;
|
|
||||||
}
|
|
||||||
|
|
||||||
void kVmSaver::setSpeed( int spd )
|
|
||||||
{
|
|
||||||
speed = spd;
|
|
||||||
// timer.start( (100 - speed)*(100 - speed)*(100 - speed)/10000 );
|
|
||||||
timer.start( (100 - speed) );
|
|
||||||
}
|
|
||||||
void kVmSaver::setRefreshTimeout( const int refreshTimeout )
|
|
||||||
{
|
|
||||||
this->refreshTimeout = refreshTimeout;
|
|
||||||
}
|
|
||||||
|
|
||||||
void kVmSaver::readSettings()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
speed = config.readEntry( "Speed", 50 );
|
|
||||||
refreshTimeout = config.readEntry( "DisplayRefreshTimeout", 0 );
|
|
||||||
}
|
|
||||||
int kVmSaver::getRandom( const int max_value ) {
|
|
||||||
return (int)( vm_random(&(pool_state->pool->vm_random_data))*1.0*(max_value + 1.0)/
|
|
||||||
(VM_RAND_MAX + 1.0) );
|
|
||||||
// return (int)( qrand()*1.0*(max_value + 1.0)/
|
|
||||||
// (RAND_MAX + 1.0) );
|
|
||||||
}
|
|
||||||
void kVmSaver::modifyArea( const int op ) {
|
|
||||||
int position;
|
|
||||||
|
|
||||||
vm_modify( pool_state->pool, position =
|
|
||||||
getRandom(pool_state->pool->area_size - 1), op );
|
|
||||||
pool_state->modified[position] = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void kVmSaver::paintEvent(QPaintEvent *)
|
|
||||||
{
|
|
||||||
if (!cleared) {
|
|
||||||
cleared = true;
|
|
||||||
QPainter(this).fillRect(rect(), Qt::black);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
for( int i = 0; i < 1; ++i ) {
|
|
||||||
if( getRandom(2) == 0 )
|
|
||||||
modifyArea( VM_OP_PUSH + getRandom(11) - getRandom(11) );
|
|
||||||
if( getRandom(8) == 0 )
|
|
||||||
modifyArea( VM_OP_STOP );
|
|
||||||
if( getRandom(8) == 0 )
|
|
||||||
modifyArea( VM_OP_COPY );
|
|
||||||
if( getRandom(8) == 0 )
|
|
||||||
modifyArea( VM_OP_EXEC );
|
|
||||||
// if( getRandom(5) == 0 )
|
|
||||||
// modifyArea( VM_OP_WAIT );
|
|
||||||
}
|
|
||||||
if( getRandom(0) == 0 )
|
|
||||||
vm_exec( pool_state->pool, getRandom(pool_state->pool->area_size - 1), 0,
|
|
||||||
vm_get_reverse( pool_state->pool ) );
|
|
||||||
vm_iterate( pool_state->pool, pool_state->modified );
|
|
||||||
// if( refreshStep++ >= refreshTimeout*refreshTimeout*refreshTimeout ) {
|
|
||||||
if( refreshStep++ >= refreshTimeout ) {
|
|
||||||
draw_pool( pool_state );
|
|
||||||
refreshStep = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
kVmSetup::kVmSetup( QWidget *parent )
|
|
||||||
: KDialog( parent)
|
|
||||||
{
|
|
||||||
setCaption(i18n( "Setup Virtual Machine" ));
|
|
||||||
setButtons(Ok|Cancel|Help);
|
|
||||||
setDefaultButton(Ok);
|
|
||||||
setModal(true);
|
|
||||||
readSettings();
|
|
||||||
|
|
||||||
setButtonText( Help, i18n( "A&bout" ) );
|
|
||||||
QWidget *main = new QWidget(this);
|
|
||||||
setMainWidget(main);
|
|
||||||
|
|
||||||
QHBoxLayout *tl = new QHBoxLayout( main );
|
|
||||||
tl->setSpacing( spacingHint() );
|
|
||||||
QVBoxLayout *tl1 = new QVBoxLayout();
|
|
||||||
tl->addLayout(tl1);
|
|
||||||
|
|
||||||
QLabel *label = new QLabel( i18n("Virtual machine speed:"), main );
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
QSlider *slider = new QSlider( Qt::Horizontal, main );
|
|
||||||
slider->setMinimumSize( 120, 20 );
|
|
||||||
slider->setRange( 0, 100 );
|
|
||||||
slider->setSingleStep( 10 );
|
|
||||||
slider->setPageStep( 20 );
|
|
||||||
slider->setTickPosition( QSlider::TicksBelow );
|
|
||||||
slider->setTickInterval( 10 );
|
|
||||||
slider->setValue( speed );
|
|
||||||
connect( slider, SIGNAL(valueChanged(int)),
|
|
||||||
SLOT(slotSpeed(int)) );
|
|
||||||
tl1->addWidget(slider);
|
|
||||||
|
|
||||||
label = new QLabel( i18n("Display update speed:"), main );
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
slider = new QSlider( Qt::Horizontal, main );
|
|
||||||
slider->setMinimumSize( 120, 20 );
|
|
||||||
slider->setRange( 0, MAX_REFRESH_TIMEOUT );
|
|
||||||
slider->setSingleStep( MAX_REFRESH_TIMEOUT/10 );
|
|
||||||
slider->setPageStep( MAX_REFRESH_TIMEOUT/5 );
|
|
||||||
slider->setTickPosition( QSlider::TicksBelow );
|
|
||||||
slider->setTickInterval( MAX_REFRESH_TIMEOUT/10 );
|
|
||||||
slider->setValue( MAX_REFRESH_TIMEOUT - refreshTimeout );
|
|
||||||
connect( slider, SIGNAL(valueChanged(int)),
|
|
||||||
SLOT(slotRefreshTimeout(int)) );
|
|
||||||
tl1->addWidget(slider);
|
|
||||||
tl1->addStretch();
|
|
||||||
|
|
||||||
preview = new QWidget( main );
|
|
||||||
preview->setFixedSize( 220, 165 );
|
|
||||||
preview->show(); // otherwise saver does not get correct size
|
|
||||||
saver = new kVmSaver( preview->winId() );
|
|
||||||
tl->addWidget(preview);
|
|
||||||
connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
|
|
||||||
connect(this,SIGNAL(helpClicked()),this,SLOT(slotHelp()));
|
|
||||||
}
|
|
||||||
|
|
||||||
kVmSetup::~kVmSetup()
|
|
||||||
{
|
|
||||||
delete saver;
|
|
||||||
}
|
|
||||||
|
|
||||||
void kVmSetup::readSettings()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
speed = config.readEntry( "Speed", 50 );
|
|
||||||
if ( speed > 100 )
|
|
||||||
speed = 100;
|
|
||||||
else if ( speed < 0 )
|
|
||||||
speed = 0;
|
|
||||||
refreshTimeout = config.readEntry( "DisplayRefreshTimeout", 0 );
|
|
||||||
if ( refreshTimeout > MAX_REFRESH_TIMEOUT )
|
|
||||||
refreshTimeout = MAX_REFRESH_TIMEOUT;
|
|
||||||
else if ( refreshTimeout < 0 )
|
|
||||||
refreshTimeout = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void kVmSetup::slotSpeed( int num )
|
|
||||||
{
|
|
||||||
speed = num;
|
|
||||||
if ( saver )
|
|
||||||
saver->setSpeed( num );
|
|
||||||
}
|
|
||||||
void kVmSetup::slotRefreshTimeout( int num )
|
|
||||||
{
|
|
||||||
refreshTimeout = MAX_REFRESH_TIMEOUT - num;
|
|
||||||
if ( saver )
|
|
||||||
saver->setRefreshTimeout( refreshTimeout );
|
|
||||||
}
|
|
||||||
|
|
||||||
void kVmSetup::slotOk()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
QString sspeed;
|
|
||||||
sspeed.setNum( speed );
|
|
||||||
config.writeEntry( "Speed", sspeed );
|
|
||||||
sspeed.setNum( refreshTimeout );
|
|
||||||
config.writeEntry( "DisplayRefreshTimeout", sspeed );
|
|
||||||
|
|
||||||
config.sync();
|
|
||||||
accept();
|
|
||||||
}
|
|
||||||
|
|
||||||
void kVmSetup::slotHelp()
|
|
||||||
{
|
|
||||||
KMessageBox::about(this,
|
|
||||||
i18n("Virtual Machine Version 0.1\n\nCopyright (c) 2000 Artur Rataj <art@zeus.polsl.gliwice.pl>\n"),
|
|
||||||
i18n("About Virtual Machine")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "moc_kvm.cpp"
|
|
||||||
|
|
|
@ -1,95 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// kvm screensaver
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef KVM_H
|
|
||||||
#define KVM_H
|
|
||||||
|
|
||||||
#include <qtimer.h>
|
|
||||||
|
|
||||||
#include <kdialog.h>
|
|
||||||
#include <kscreensaver.h>
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include "vm.h"
|
|
||||||
#include "vm_random.h"
|
|
||||||
}
|
|
||||||
|
|
||||||
#define THREAD_MAX_STACK_SIZE 10
|
|
||||||
#define MAX_THREADS_NUM 20
|
|
||||||
|
|
||||||
#define MAX_REFRESH_TIMEOUT 40
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
QWidget *w;
|
|
||||||
int grid_width, grid_height;
|
|
||||||
int grid_margin_x;
|
|
||||||
int grid_margin_y;
|
|
||||||
int char_width, char_height;
|
|
||||||
bool insert_top_p, insert_bottom_p;
|
|
||||||
int density;
|
|
||||||
struct tvm_pool* pool;
|
|
||||||
char* modified;
|
|
||||||
int show_threads;
|
|
||||||
|
|
||||||
QPixmap images;
|
|
||||||
int image_width, image_height;
|
|
||||||
int nglyphs;
|
|
||||||
|
|
||||||
} m_state;
|
|
||||||
|
|
||||||
|
|
||||||
class kVmSaver : public KScreenSaver
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
kVmSaver( WId id );
|
|
||||||
virtual ~kVmSaver();
|
|
||||||
|
|
||||||
void setSpeed( int spd );
|
|
||||||
void setRefreshTimeout( const int refreshTimeout );
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void readSettings();
|
|
||||||
int getRandom( const int max_value );
|
|
||||||
void modifyArea( const int op );
|
|
||||||
void paintEvent(QPaintEvent *event);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
QTimer timer;
|
|
||||||
|
|
||||||
bool cleared;
|
|
||||||
int speed;
|
|
||||||
m_state* pool_state;
|
|
||||||
int refreshStep;
|
|
||||||
int refreshTimeout;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class kVmSetup : public KDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
kVmSetup( QWidget *parent = NULL );
|
|
||||||
~kVmSetup();
|
|
||||||
protected:
|
|
||||||
void readSettings();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotSpeed( int );
|
|
||||||
void slotRefreshTimeout( int num );
|
|
||||||
void slotOk();
|
|
||||||
void slotHelp();
|
|
||||||
|
|
||||||
private:
|
|
||||||
QWidget *preview;
|
|
||||||
kVmSaver *saver;
|
|
||||||
|
|
||||||
int speed;
|
|
||||||
int refreshTimeout;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,430 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// klines 0.1.1 - Basic screen saver for KDE
|
|
||||||
// by Dirk Staneker 1997
|
|
||||||
// based on kpolygon from Martin R. Jones 1996
|
|
||||||
// mailto:dirk.staneker@student.uni-tuebingen.de
|
|
||||||
//
|
|
||||||
// layout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org>
|
|
||||||
// 2001/03/04 Converted to libkscreensaver by Martin R. Jones
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <qcolor.h>
|
|
||||||
#include <qlabel.h>
|
|
||||||
#include <qslider.h>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QHBoxLayout>
|
|
||||||
#include <kconfig.h>
|
|
||||||
#include <kapplication.h>
|
|
||||||
#include <kmessagebox.h>
|
|
||||||
#include <kcolorbutton.h>
|
|
||||||
|
|
||||||
#include "kcolordialog.h"
|
|
||||||
#include "lines.h"
|
|
||||||
#include "moc_lines.cpp"
|
|
||||||
|
|
||||||
#include <qlayout.h>
|
|
||||||
#include <klocale.h>
|
|
||||||
#include <kglobal.h>
|
|
||||||
#include <qpainter.h>
|
|
||||||
|
|
||||||
#define MAXLENGTH 256
|
|
||||||
|
|
||||||
// libkscreensaver interface
|
|
||||||
class kLinesSaverInterface : public KScreenSaverInterface
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
virtual KAboutData* aboutData() {
|
|
||||||
return new KAboutData( "klines.kss", "klock", ki18n( "KLines" ), "2.2.0", ki18n( "KLines" ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
virtual KScreenSaver* create( WId id )
|
|
||||||
{
|
|
||||||
return new kLinesSaver( id );
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual QDialog* setup()
|
|
||||||
{
|
|
||||||
return new kLinesSetup();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
int main( int argc, char *argv[] )
|
|
||||||
{
|
|
||||||
kLinesSaverInterface kss;
|
|
||||||
return kScreenSaverMain( argc, argv, kss );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Methods of the Lines-class
|
|
||||||
Lines::Lines(int x){
|
|
||||||
uint i;
|
|
||||||
numLn=x;
|
|
||||||
offx1=12;
|
|
||||||
offy1=16;
|
|
||||||
offx2=9;
|
|
||||||
offy2=10;
|
|
||||||
start=new Ln;
|
|
||||||
end=start;
|
|
||||||
for(i=1; i<numLn; i++){
|
|
||||||
end->next=new Ln;
|
|
||||||
end=end->next;
|
|
||||||
}
|
|
||||||
end->next=start;
|
|
||||||
akt=start;
|
|
||||||
}
|
|
||||||
|
|
||||||
Lines::~Lines(){
|
|
||||||
uint i;
|
|
||||||
for(i=0; i<numLn; i++){
|
|
||||||
end=start->next;
|
|
||||||
delete start;
|
|
||||||
start=end;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void Lines::reset(){ akt=start; }
|
|
||||||
|
|
||||||
inline void Lines::getKoord(int& a, int& b, int& c, int& d){
|
|
||||||
a=akt->x1; b=akt->y1;
|
|
||||||
c=akt->x2; d=akt->y2;
|
|
||||||
akt=akt->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void Lines::setKoord(const int& a, const int& b, const int& c, const int& d){
|
|
||||||
akt->x1=a; akt->y1=b;
|
|
||||||
akt->x2=c; akt->y2=d;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void Lines::next(void){ akt=akt->next; }
|
|
||||||
|
|
||||||
void Lines::turn(const int& w, const int& h){
|
|
||||||
start->x1=end->x1+offx1;
|
|
||||||
start->y1=end->y1+offy1;
|
|
||||||
start->x2=end->x2+offx2;
|
|
||||||
start->y2=end->y2+offy2;
|
|
||||||
if(start->x1>=w) offx1=-8;
|
|
||||||
if(start->x1<=0) offx1=7;
|
|
||||||
if(start->y1>=h) offy1=-11;
|
|
||||||
if(start->y1<=0) offy1=13;
|
|
||||||
if(start->x2>=w) offx2=-17;
|
|
||||||
if(start->x2<=0) offx2=15;
|
|
||||||
if(start->y2>=h) offy2=-10;
|
|
||||||
if(start->y2<=0) offy2=13;
|
|
||||||
end->next=start;
|
|
||||||
start=start->next;
|
|
||||||
end=end->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// dialog to setup screen saver parameters
|
|
||||||
//
|
|
||||||
kLinesSetup::kLinesSetup(QWidget *parent)
|
|
||||||
: KDialog(parent)
|
|
||||||
, saver( 0 ), length( 10 ), speed( 50 )
|
|
||||||
{
|
|
||||||
setCaption(i18n( "Setup Lines Screen Saver" ));
|
|
||||||
setModal(true);
|
|
||||||
setButtons(Ok|Cancel|Help);
|
|
||||||
setDefaultButton(Ok);
|
|
||||||
|
|
||||||
readSettings();
|
|
||||||
|
|
||||||
setButtonText( Help, i18n( "A&bout" ) );
|
|
||||||
QWidget *main = new QWidget(this);
|
|
||||||
setMainWidget(main);
|
|
||||||
|
|
||||||
QHBoxLayout *tl = new QHBoxLayout(main);
|
|
||||||
tl->setSpacing( spacingHint() );
|
|
||||||
QVBoxLayout *tl1 = new QVBoxLayout;
|
|
||||||
tl->addLayout(tl1);
|
|
||||||
|
|
||||||
QLabel *label=new QLabel(i18n("Length:"), main);
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
QSlider *sb= new QSlider(Qt::Horizontal, main);
|
|
||||||
sb->setMinimum(1);
|
|
||||||
sb->setMaximum(MAXLENGTH + 1);
|
|
||||||
sb->setPageStep(16);
|
|
||||||
sb->setValue(length);
|
|
||||||
sb->setMinimumSize(120, 20);
|
|
||||||
sb->setTickPosition(QSlider::TicksBelow);
|
|
||||||
sb->setTickInterval(32);
|
|
||||||
connect(sb, SIGNAL(valueChanged(int)), SLOT(slotLength(int)));
|
|
||||||
tl1->addWidget(sb);
|
|
||||||
|
|
||||||
label=new QLabel(i18n("Speed:"), main);
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
sb = new QSlider(Qt::Horizontal, main);
|
|
||||||
sb->setMinimum(0);
|
|
||||||
sb->setMaximum(100);
|
|
||||||
sb->setPageStep(10);
|
|
||||||
sb->setValue(speed);
|
|
||||||
sb->setMinimumSize(120, 20);
|
|
||||||
sb->setTickPosition(QSlider::TicksBelow);
|
|
||||||
sb->setTickInterval(10);
|
|
||||||
connect( sb, SIGNAL(valueChanged(int)), SLOT(slotSpeed(int)) );
|
|
||||||
tl1->addWidget(sb);
|
|
||||||
|
|
||||||
label=new QLabel(i18n("Beginning:"), main);
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
colorPush0=new KColorButton(colstart, main);
|
|
||||||
connect(colorPush0, SIGNAL(changed(QColor)),
|
|
||||||
SLOT(slotColstart(QColor)));
|
|
||||||
tl1->addWidget(colorPush0);
|
|
||||||
|
|
||||||
label=new QLabel(i18n("Middle:"), main);
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
colorPush1=new KColorButton(colmid, main);
|
|
||||||
connect(colorPush1, SIGNAL(changed(QColor)),
|
|
||||||
SLOT(slotColmid(QColor)));
|
|
||||||
tl1->addWidget(colorPush1);
|
|
||||||
|
|
||||||
label=new QLabel(i18n("End:"), main);
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
colorPush2=new KColorButton(colend, main);
|
|
||||||
connect(colorPush2, SIGNAL(changed(QColor)),
|
|
||||||
SLOT(slotColend(QColor)));
|
|
||||||
tl1->addWidget(colorPush2);
|
|
||||||
tl1->addStretch();
|
|
||||||
|
|
||||||
preview = new QWidget( main );
|
|
||||||
preview->setFixedSize( 220, 170 );
|
|
||||||
{
|
|
||||||
QPalette palette;
|
|
||||||
palette.setColor( preview->backgroundRole(), Qt::black );
|
|
||||||
preview->setPalette( palette );
|
|
||||||
preview->setAutoFillBackground(true);
|
|
||||||
}
|
|
||||||
preview->show(); // otherwise saver does not get correct size
|
|
||||||
saver=new kLinesSaver(preview->winId());
|
|
||||||
tl->addWidget(preview);
|
|
||||||
connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
|
|
||||||
connect(this,SIGNAL(helpClicked()),this,SLOT(slotHelp()));
|
|
||||||
}
|
|
||||||
|
|
||||||
kLinesSetup::~kLinesSetup()
|
|
||||||
{
|
|
||||||
delete saver;
|
|
||||||
}
|
|
||||||
|
|
||||||
// read settings from config file
|
|
||||||
void kLinesSetup::readSettings(){
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
QString str;
|
|
||||||
|
|
||||||
length = config.readEntry("Length", length);
|
|
||||||
if(length>MAXLENGTH) length=MAXLENGTH;
|
|
||||||
else if(length<1) length=1;
|
|
||||||
|
|
||||||
speed = config.readEntry("Speed", speed);
|
|
||||||
if(speed>100) speed=100;
|
|
||||||
else if(speed<50) speed=50;
|
|
||||||
|
|
||||||
str=config.readEntry("StartColor");
|
|
||||||
if(!str.isNull()) colstart.setNamedColor(str);
|
|
||||||
else colstart=Qt::white;
|
|
||||||
str=config.readEntry("MidColor");
|
|
||||||
if(!str.isNull()) colmid.setNamedColor(str);
|
|
||||||
else colmid=Qt::blue;
|
|
||||||
str=config.readEntry("EndColor");
|
|
||||||
if(!str.isNull()) colend.setNamedColor(str);
|
|
||||||
else colend=Qt::black;
|
|
||||||
}
|
|
||||||
|
|
||||||
void kLinesSetup::slotLength(int len){
|
|
||||||
length=len;
|
|
||||||
if(saver) saver->setLines(length);
|
|
||||||
}
|
|
||||||
|
|
||||||
void kLinesSetup::slotSpeed(int num){
|
|
||||||
speed=num;
|
|
||||||
if(saver) saver->setSpeed(speed);
|
|
||||||
}
|
|
||||||
|
|
||||||
void kLinesSetup::slotColstart(const QColor &col){
|
|
||||||
colstart = col;
|
|
||||||
if(saver) saver->setColor(colstart, colmid, colend);
|
|
||||||
}
|
|
||||||
|
|
||||||
void kLinesSetup::slotColmid(const QColor &col){
|
|
||||||
colmid = col;
|
|
||||||
if(saver) saver->setColor(colstart, colmid, colend);
|
|
||||||
}
|
|
||||||
|
|
||||||
void kLinesSetup::slotColend(const QColor &col){
|
|
||||||
colend = col;
|
|
||||||
if(saver) saver->setColor(colstart, colmid, colend);
|
|
||||||
}
|
|
||||||
|
|
||||||
void kLinesSetup::slotHelp(){
|
|
||||||
KMessageBox::about(this,
|
|
||||||
i18n("Lines Version 2.2.0\n\n"
|
|
||||||
"Written by Dirk Staneker 1997\n"
|
|
||||||
"dirk.stanerker@student.uni-tuebingen.de"));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ok pressed - save settings and exit
|
|
||||||
void kLinesSetup::slotOk(){
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
QString slength;
|
|
||||||
slength.setNum(length);
|
|
||||||
config.writeEntry("Length", slength);
|
|
||||||
|
|
||||||
QString sspeed;
|
|
||||||
sspeed.setNum( speed );
|
|
||||||
config.writeEntry( "Speed", sspeed );
|
|
||||||
|
|
||||||
QString colName0, colName1, colName2;
|
|
||||||
colName0.sprintf("#%02x%02x%02x", colstart.red(),
|
|
||||||
colstart.green(), colstart.blue() );
|
|
||||||
config.writeEntry( "StartColor", colName0 );
|
|
||||||
|
|
||||||
colName1.sprintf("#%02x%02x%02x", colmid.red(),
|
|
||||||
colmid.green(), colmid.blue() );
|
|
||||||
config.writeEntry( "MidColor", colName1 );
|
|
||||||
|
|
||||||
colName2.sprintf("#%02x%02x%02x", colend.red(),
|
|
||||||
colend.green(), colend.blue() );
|
|
||||||
config.writeEntry( "EndColor", colName2 );
|
|
||||||
|
|
||||||
config.sync();
|
|
||||||
accept();
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
kLinesSaver::kLinesSaver( WId id ) : KScreenSaver( id ){
|
|
||||||
readSettings();
|
|
||||||
lines=new Lines(numLines);
|
|
||||||
initialiseColor();
|
|
||||||
initialiseLines();
|
|
||||||
timer.start(speed);
|
|
||||||
connect(&timer, SIGNAL(timeout()), SLOT(update()));
|
|
||||||
setAttribute( Qt::WA_NoSystemBackground );
|
|
||||||
cleared = false;
|
|
||||||
show();
|
|
||||||
}
|
|
||||||
|
|
||||||
kLinesSaver::~kLinesSaver(){
|
|
||||||
timer.stop();
|
|
||||||
delete lines;
|
|
||||||
}
|
|
||||||
|
|
||||||
// set lines properties
|
|
||||||
void kLinesSaver::setLines(int len){
|
|
||||||
timer.stop();
|
|
||||||
numLines=len;
|
|
||||||
initialiseLines();
|
|
||||||
initialiseColor();
|
|
||||||
timer.start(speed);
|
|
||||||
}
|
|
||||||
|
|
||||||
// set the speed
|
|
||||||
void kLinesSaver::setSpeed(int spd){
|
|
||||||
timer.stop();
|
|
||||||
speed=100-spd;
|
|
||||||
timer.start(speed);
|
|
||||||
}
|
|
||||||
|
|
||||||
void kLinesSaver::setColor(const QColor& cs, const QColor& cm, const QColor& ce){
|
|
||||||
colstart=cs;
|
|
||||||
colmid=cm;
|
|
||||||
colend=ce;
|
|
||||||
initialiseColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
// read configuration settings from config file
|
|
||||||
void kLinesSaver::readSettings(){
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
numLines=config.readEntry("Length", 10);
|
|
||||||
speed = 100- config.readEntry("Speed", 50);
|
|
||||||
if(numLines>MAXLENGTH) numLines=MAXLENGTH;
|
|
||||||
else if(numLines<1) numLines = 1;
|
|
||||||
|
|
||||||
colstart=config.readEntry("StartColor", QColor(Qt::white));
|
|
||||||
colmid=config.readEntry("MidColor", QColor(Qt::blue));
|
|
||||||
colend=config.readEntry("EndColor", QColor(Qt::black));
|
|
||||||
}
|
|
||||||
|
|
||||||
void kLinesSaver::paintEvent(QPaintEvent *)
|
|
||||||
{
|
|
||||||
uint i;
|
|
||||||
int x1,y1,x2,y2;
|
|
||||||
int col=0;
|
|
||||||
|
|
||||||
lines->reset();
|
|
||||||
|
|
||||||
QPainter p( this );
|
|
||||||
p.setPen( Qt::black );
|
|
||||||
|
|
||||||
if (!cleared) {
|
|
||||||
cleared = true;
|
|
||||||
p.fillRect(rect(), Qt::black);
|
|
||||||
}
|
|
||||||
|
|
||||||
for(i=0; i<numLines; i++){
|
|
||||||
lines->getKoord(x1,y1,x2,y2);
|
|
||||||
p.drawLine( x1, y1, x2, y2 );
|
|
||||||
p.setPen( colors[col] );
|
|
||||||
col=(int)(i*colscale);
|
|
||||||
if(col>63) col=0;
|
|
||||||
}
|
|
||||||
lines->turn(width(), height());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// initialise the lines
|
|
||||||
void kLinesSaver::initialiseLines(){
|
|
||||||
uint i;
|
|
||||||
int x1,y1,x2,y2;
|
|
||||||
delete lines;
|
|
||||||
lines=new Lines(numLines);
|
|
||||||
lines->reset();
|
|
||||||
x1=rnd.getLong(width());
|
|
||||||
y1=rnd.getLong(height());
|
|
||||||
x2=rnd.getLong(width());
|
|
||||||
y2=rnd.getLong(height());
|
|
||||||
for(i=0; i<numLines; i++){
|
|
||||||
lines->setKoord(x1,y1,x2,y2);
|
|
||||||
lines->next();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// create a color table of 64 colors
|
|
||||||
void kLinesSaver::initialiseColor(){
|
|
||||||
int i;
|
|
||||||
double mr, mg, mb;
|
|
||||||
double cr, cg, cb;
|
|
||||||
mr=(double)(colmid.red()-colstart.red())/32;
|
|
||||||
mg=(double)(colmid.green()-colstart.green())/32;
|
|
||||||
mb=(double)(colmid.blue()-colstart.blue())/32;
|
|
||||||
cr=colstart.red();
|
|
||||||
cg=colstart.green();
|
|
||||||
cb=colstart.blue();
|
|
||||||
for(i=0; i<32; i++){
|
|
||||||
colors[63-i].setRgb((int)(mr*i+cr), (int)(mg*i+cg), (int)(mb*i+cb));
|
|
||||||
}
|
|
||||||
mr=(double)(colend.red()-colmid.red())/32;
|
|
||||||
mg=(double)(colend.green()-colmid.green())/32;
|
|
||||||
mb=(double)(colend.blue()-colmid.blue())/32;
|
|
||||||
cr=colmid.red();
|
|
||||||
cg=colmid.green();
|
|
||||||
cb=colmid.blue();
|
|
||||||
for(i=0; i<32; i++){
|
|
||||||
colors[31-1].setRgb((int)(mr*i+cr), (int)(mg*i+cg), (int)(mb*i+cb));
|
|
||||||
}
|
|
||||||
colscale=64.0/(double)numLines;
|
|
||||||
}
|
|
|
@ -1,95 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// klines 0.1.1 - Basic screen saver for KDE
|
|
||||||
// by Dirk Staneker 1997
|
|
||||||
// based on kpolygon 0.3 by Martin R. Jones 1996
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef LINES_H
|
|
||||||
#define LINES_H
|
|
||||||
|
|
||||||
#include <qtimer.h>
|
|
||||||
|
|
||||||
#include <kdialog.h>
|
|
||||||
#include <krandomsequence.h>
|
|
||||||
#include <kscreensaver.h>
|
|
||||||
|
|
||||||
class KColorButton;
|
|
||||||
|
|
||||||
class Lines{
|
|
||||||
private:
|
|
||||||
struct Ln{
|
|
||||||
Ln* next;
|
|
||||||
int x1, y1, x2, y2;
|
|
||||||
};
|
|
||||||
Ln *start, *end, *akt;
|
|
||||||
int offx1, offy1, offx2, offy2;
|
|
||||||
uint numLn;
|
|
||||||
public:
|
|
||||||
Lines(int);
|
|
||||||
~Lines();
|
|
||||||
inline void reset();
|
|
||||||
inline void getKoord(int&, int&, int&, int&);
|
|
||||||
inline void setKoord(const int&, const int&, const int&, const int&);
|
|
||||||
inline void next(void);
|
|
||||||
void turn(const int&, const int&);
|
|
||||||
};
|
|
||||||
|
|
||||||
class kLinesSaver:public KScreenSaver{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
kLinesSaver( WId id );
|
|
||||||
virtual ~kLinesSaver();
|
|
||||||
|
|
||||||
void setLines(int len);
|
|
||||||
void setSpeed(int spd);
|
|
||||||
void setColor(const QColor&, const QColor&, const QColor&);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void readSettings();
|
|
||||||
void initialiseLines();
|
|
||||||
void initialiseColor();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void paintEvent(QPaintEvent *event);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
bool cleared;
|
|
||||||
KRandomSequence rnd;
|
|
||||||
QTimer timer;
|
|
||||||
unsigned numLines;
|
|
||||||
int speed;
|
|
||||||
QColor colors[64];
|
|
||||||
QColor colstart, colmid, colend;
|
|
||||||
double colscale;
|
|
||||||
Lines* lines;
|
|
||||||
};
|
|
||||||
|
|
||||||
class kLinesSetup : public KDialog{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
kLinesSetup(QWidget *parent=NULL);
|
|
||||||
~kLinesSetup();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void readSettings();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotLength(int);
|
|
||||||
void slotSpeed(int);
|
|
||||||
void slotColstart(const QColor &);
|
|
||||||
void slotColmid(const QColor &);
|
|
||||||
void slotColend(const QColor &);
|
|
||||||
void slotOk();
|
|
||||||
void slotHelp();
|
|
||||||
|
|
||||||
private:
|
|
||||||
KColorButton *colorPush0, *colorPush1, *colorPush2;
|
|
||||||
QWidget *preview;
|
|
||||||
kLinesSaver *saver;
|
|
||||||
int length, speed;
|
|
||||||
QColor colstart, colmid, colend;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,617 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// Lorenz - Lorenz Attractor screen saver
|
|
||||||
// Nicolas Brodu, brodu@kde.org, 2000
|
|
||||||
//
|
|
||||||
// Portions of code from kblankscrn and khop.
|
|
||||||
// See authors there.
|
|
||||||
//
|
|
||||||
// I release my code as GPL, but see the other headers and the README
|
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include <qpainter.h>
|
|
||||||
#include <qslider.h>
|
|
||||||
#include <qlayout.h>
|
|
||||||
#include <qcolor.h>
|
|
||||||
#include <qcolormap.h>
|
|
||||||
#include <qlabel.h>
|
|
||||||
|
|
||||||
#include <kapplication.h>
|
|
||||||
#include <klocale.h>
|
|
||||||
#include <kglobal.h>
|
|
||||||
#include <kconfig.h>
|
|
||||||
#include <kmessagebox.h>
|
|
||||||
#include <krandom.h>
|
|
||||||
|
|
||||||
#include "lorenz.h"
|
|
||||||
#include "moc_lorenz.cpp"
|
|
||||||
|
|
||||||
// libkscreensaver interface
|
|
||||||
class KLorenzSaverInterface : public KScreenSaverInterface
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
virtual KAboutData* aboutData() {
|
|
||||||
return new KAboutData( "klorenz.kss", "klock", ki18n( "KLorenz" ), "2.2.0", ki18n( "KLorenz" ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
virtual KScreenSaver* create( WId id )
|
|
||||||
{
|
|
||||||
return new KLorenzSaver( id );
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual QDialog* setup()
|
|
||||||
{
|
|
||||||
return new KLorenzSetup();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
int main( int argc, char *argv[] )
|
|
||||||
{
|
|
||||||
KLorenzSaverInterface kss;
|
|
||||||
return kScreenSaverMain( argc, argv, kss );
|
|
||||||
}
|
|
||||||
|
|
||||||
#define MINSPEED 1
|
|
||||||
#define MAXSPEED 1500
|
|
||||||
#define DEFSPEED 150
|
|
||||||
#define MINZROT -180
|
|
||||||
#define MAXZROT 180
|
|
||||||
#define DEFZROT 104 //100
|
|
||||||
#define MINYROT -180
|
|
||||||
#define MAXYROT 180
|
|
||||||
#define DEFYROT -19 //80
|
|
||||||
#define MINXROT -180
|
|
||||||
#define MAXXROT 180
|
|
||||||
#define DEFXROT 25 //20
|
|
||||||
#define MINEPOCH 1
|
|
||||||
#define MAXEPOCH 30000
|
|
||||||
#define DEFEPOCH 5800
|
|
||||||
#define MINCOLOR 1
|
|
||||||
#define MAXCOLOR 100
|
|
||||||
#define DEFCOLOR 20
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// dialog to setup screen saver parameters
|
|
||||||
//
|
|
||||||
KLorenzSetup::KLorenzSetup( QWidget *parent )
|
|
||||||
: KDialog( parent)
|
|
||||||
{
|
|
||||||
setCaption(i18n( "Setup Lorenz Attractor" ));
|
|
||||||
setButtons(Ok|Cancel|Default|Help);
|
|
||||||
setDefaultButton(Ok);
|
|
||||||
setModal(true);
|
|
||||||
readSettings();
|
|
||||||
|
|
||||||
setButtonText( Help, i18n( "A&bout" ) );
|
|
||||||
QWidget *main = new QWidget(this);
|
|
||||||
setMainWidget(main);
|
|
||||||
|
|
||||||
QHBoxLayout *tl = new QHBoxLayout( main );
|
|
||||||
tl->setSpacing( spacingHint() );
|
|
||||||
QVBoxLayout *tl1 = new QVBoxLayout;
|
|
||||||
tl->addLayout(tl1);
|
|
||||||
|
|
||||||
QLabel *label = new QLabel( i18n("Speed:"), main );
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
sps = new QSlider(Qt::Horizontal, main);
|
|
||||||
sps->setMinimum(MINSPEED);
|
|
||||||
sps->setMaximum(MAXSPEED);
|
|
||||||
sps->setPageStep(10);
|
|
||||||
sps->setValue(speed);
|
|
||||||
sps->setMinimumSize( 120, 20 );
|
|
||||||
sps->setTickPosition(QSlider::TicksBelow);
|
|
||||||
sps->setTickInterval(150);
|
|
||||||
connect( sps, SIGNAL(valueChanged(int)), SLOT(slotSpeed(int)) );
|
|
||||||
tl1->addWidget(sps);
|
|
||||||
|
|
||||||
label = new QLabel( i18n("Epoch:"), main );
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
eps = new QSlider(Qt::Horizontal, main);
|
|
||||||
eps->setMinimum(MINEPOCH);
|
|
||||||
eps->setMaximum(MAXEPOCH);
|
|
||||||
eps->setPageStep(100);
|
|
||||||
eps->setValue(epoch);
|
|
||||||
eps->setMinimumSize( 120, 20 );
|
|
||||||
eps->setTickPosition(QSlider::TicksBelow);
|
|
||||||
eps->setTickInterval(3000);
|
|
||||||
connect( eps, SIGNAL(valueChanged(int)), SLOT(slotEpoch(int)) );
|
|
||||||
tl1->addWidget(eps);
|
|
||||||
|
|
||||||
label = new QLabel( i18n("Color rate:"), main );
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
crs = new QSlider(Qt::Horizontal, main);
|
|
||||||
crs->setMinimum(MINCOLOR);
|
|
||||||
crs->setMaximum(MAXCOLOR);
|
|
||||||
crs->setPageStep(5);
|
|
||||||
crs->setValue(crate);
|
|
||||||
crs->setMinimumSize( 120, 20 );
|
|
||||||
crs->setTickPosition(QSlider::TicksBelow);
|
|
||||||
crs->setTickInterval(10);
|
|
||||||
connect( crs, SIGNAL(valueChanged(int)), SLOT(slotCRate(int)) );
|
|
||||||
tl1->addWidget(crs);
|
|
||||||
|
|
||||||
label = new QLabel( i18n("Rotation Z:"), main );
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
zrs = new QSlider(Qt::Horizontal, main);
|
|
||||||
zrs->setMinimum(MINZROT);
|
|
||||||
zrs->setMaximum(MAXZROT);
|
|
||||||
zrs->setPageStep(18);
|
|
||||||
zrs->setValue(zrot);
|
|
||||||
zrs->setMinimumSize( 120, 20 );
|
|
||||||
zrs->setTickPosition(QSlider::TicksBelow);
|
|
||||||
zrs->setTickInterval(36);
|
|
||||||
connect( zrs, SIGNAL(valueChanged(int)), SLOT(slotZRot(int)) );
|
|
||||||
tl1->addWidget(zrs);
|
|
||||||
|
|
||||||
label = new QLabel( i18n("Rotation Y:"), main );
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
yrs = new QSlider(Qt::Horizontal, main);
|
|
||||||
yrs->setMinimum(MINYROT);
|
|
||||||
yrs->setMaximum(MAXYROT);
|
|
||||||
yrs->setPageStep(18);
|
|
||||||
yrs->setValue(yrot);
|
|
||||||
yrs->setMinimumSize( 120, 20 );
|
|
||||||
yrs->setTickPosition(QSlider::TicksBelow);
|
|
||||||
yrs->setTickInterval(36);
|
|
||||||
connect( yrs, SIGNAL(valueChanged(int)), SLOT(slotYRot(int)) );
|
|
||||||
tl1->addWidget(yrs);
|
|
||||||
|
|
||||||
label = new QLabel( i18n("Rotation X:"), main );
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
xrs = new QSlider(Qt::Horizontal, main);
|
|
||||||
xrs->setMinimum(MINXROT);
|
|
||||||
xrs->setMaximum(MAXXROT);
|
|
||||||
xrs->setPageStep(18);
|
|
||||||
xrs->setValue(xrot);
|
|
||||||
xrs->setMinimumSize( 120, 20 );
|
|
||||||
xrs->setTickPosition(QSlider::TicksBelow);
|
|
||||||
xrs->setTickInterval(36);
|
|
||||||
connect( xrs, SIGNAL(valueChanged(int)), SLOT(slotXRot(int)) );
|
|
||||||
tl1->addWidget(xrs);
|
|
||||||
|
|
||||||
preview = new QWidget( main );
|
|
||||||
preview->setFixedSize( 220, 165 );
|
|
||||||
{
|
|
||||||
QPalette palette;
|
|
||||||
palette.setColor( preview->backgroundRole(), Qt::black );
|
|
||||||
preview->setPalette( palette );
|
|
||||||
preview->setAutoFillBackground(true);
|
|
||||||
}
|
|
||||||
preview->show(); // otherwise saver does not get correct size
|
|
||||||
saver = new KLorenzSaver( preview->winId() );
|
|
||||||
tl->addWidget(preview);
|
|
||||||
connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
|
|
||||||
connect(this,SIGNAL(helpClicked()),this,SLOT(slotHelp()));
|
|
||||||
connect(this,SIGNAL(defaultClicked()),this,SLOT(slotDefault()));
|
|
||||||
}
|
|
||||||
|
|
||||||
KLorenzSetup::~KLorenzSetup()
|
|
||||||
{
|
|
||||||
delete saver;
|
|
||||||
}
|
|
||||||
|
|
||||||
// read settings from config file
|
|
||||||
void KLorenzSetup::readSettings()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
speed = config.readEntry( "Speed", DEFSPEED );
|
|
||||||
epoch = config.readEntry( "Epoch", DEFEPOCH );
|
|
||||||
crate = config.readEntry( "Color Rate", DEFCOLOR );
|
|
||||||
zrot = config.readEntry( "ZRot", DEFZROT );
|
|
||||||
yrot = config.readEntry( "YRot", DEFZROT );
|
|
||||||
xrot = config.readEntry( "XRot", DEFZROT );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KLorenzSetup::slotSpeed(int num)
|
|
||||||
{
|
|
||||||
speed = num;
|
|
||||||
if (saver) saver->setSpeed(speed);
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLorenzSetup::slotEpoch(int num)
|
|
||||||
{
|
|
||||||
epoch = num;
|
|
||||||
if (saver) saver->setEpoch(epoch);
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLorenzSetup::slotCRate(int num)
|
|
||||||
{
|
|
||||||
crate = num;
|
|
||||||
if (saver) saver->setCRate(crate);
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLorenzSetup::slotZRot(int num)
|
|
||||||
{
|
|
||||||
zrot = num;
|
|
||||||
if (saver) {
|
|
||||||
saver->setZRot(zrot);
|
|
||||||
saver->updateMatrix();
|
|
||||||
saver->newEpoch();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLorenzSetup::slotYRot(int num)
|
|
||||||
{
|
|
||||||
yrot = num;
|
|
||||||
if (saver) {
|
|
||||||
saver->setYRot(yrot);
|
|
||||||
saver->updateMatrix();
|
|
||||||
saver->newEpoch();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLorenzSetup::slotXRot(int num)
|
|
||||||
{
|
|
||||||
xrot = num;
|
|
||||||
if (saver) {
|
|
||||||
saver->setXRot(xrot);
|
|
||||||
saver->updateMatrix();
|
|
||||||
saver->newEpoch();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLorenzSetup::slotHelp()
|
|
||||||
{
|
|
||||||
KMessageBox::about(this,i18n("Lorenz Attractor screen saver for KDE\n\nCopyright (c) 2000 Nicolas Brodu"));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ok pressed - save settings and exit
|
|
||||||
void KLorenzSetup::slotOk()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
config.writeEntry( "Speed", speed );
|
|
||||||
config.writeEntry( "Epoch", epoch );
|
|
||||||
config.writeEntry( "Color Rate", crate );
|
|
||||||
config.writeEntry( "ZRot", zrot );
|
|
||||||
config.writeEntry( "YRot", yrot );
|
|
||||||
config.writeEntry( "XRot", xrot );
|
|
||||||
|
|
||||||
config.sync();
|
|
||||||
|
|
||||||
accept();
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLorenzSetup::slotDefault()
|
|
||||||
{
|
|
||||||
speed = DEFSPEED;
|
|
||||||
epoch = DEFEPOCH;
|
|
||||||
crate = DEFCOLOR;
|
|
||||||
zrot = DEFZROT;
|
|
||||||
yrot = DEFYROT;
|
|
||||||
xrot = DEFXROT;
|
|
||||||
if (saver) {
|
|
||||||
saver->setSpeed(speed);
|
|
||||||
saver->setEpoch(epoch);
|
|
||||||
saver->setCRate(crate);
|
|
||||||
saver->setZRot(zrot);
|
|
||||||
saver->setYRot(yrot);
|
|
||||||
saver->setXRot(xrot);
|
|
||||||
saver->updateMatrix();
|
|
||||||
saver->newEpoch();
|
|
||||||
}
|
|
||||||
sps->setValue(speed);
|
|
||||||
eps->setValue(epoch);
|
|
||||||
crs->setValue(crate);
|
|
||||||
zrs->setValue(zrot);
|
|
||||||
yrs->setValue(yrot);
|
|
||||||
xrs->setValue(xrot);
|
|
||||||
|
|
||||||
/* // User can cancel, or save defaults?
|
|
||||||
|
|
||||||
KSharedConfig::Ptr config = KGlobal::config();
|
|
||||||
config.setGroup( "Settings" );
|
|
||||||
|
|
||||||
config.writeEntry( "Speed", speed );
|
|
||||||
config.writeEntry( "Epoch", epoch );
|
|
||||||
config.writeEntry( "Color Rate", crate );
|
|
||||||
config.writeEntry( "ZRot", zrot );
|
|
||||||
config.writeEntry( "YRot", yrot );
|
|
||||||
config.writeEntry( "XRot", xrot );
|
|
||||||
|
|
||||||
config.sync();
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef M_PI
|
|
||||||
#define M_PI 3.14159265358979323846
|
|
||||||
#endif
|
|
||||||
const double pi = M_PI;
|
|
||||||
|
|
||||||
// Homogeneous coordinate transform matrix
|
|
||||||
// I initially wrote it for a Java applet, it is inspired from a
|
|
||||||
// Matrix class in the JDK.
|
|
||||||
// Nicolas Brodu, 1998-2000
|
|
||||||
class Matrix3D
|
|
||||||
{
|
|
||||||
// All coefficients
|
|
||||||
double xx, xy, xz, xo;
|
|
||||||
double yx, yy, yz, yo;
|
|
||||||
double zx, zy, zz, zo;
|
|
||||||
// 0, 0, 0, 1 are implicit
|
|
||||||
public:
|
|
||||||
|
|
||||||
void unit()
|
|
||||||
{
|
|
||||||
xx=1.0; xy=0.0; xz=0.0; xo=0.0;
|
|
||||||
yx=0.0; yy=1.0; yz=0.0; yo=0.0;
|
|
||||||
zx=0.0; zy=0.0; zz=1.0; zo=0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Matrix3D ()
|
|
||||||
{
|
|
||||||
unit();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Translation
|
|
||||||
void translate(double x, double y, double z)
|
|
||||||
{
|
|
||||||
xo += x;
|
|
||||||
yo += y;
|
|
||||||
zo += z;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rotation, in degrees, around the Y axis
|
|
||||||
void rotY(double theta)
|
|
||||||
{
|
|
||||||
theta *= pi / 180;
|
|
||||||
double ct = cos(theta);
|
|
||||||
double st = sin(theta);
|
|
||||||
|
|
||||||
double Nxx = xx * ct + zx * st;
|
|
||||||
double Nxy = xy * ct + zy * st;
|
|
||||||
double Nxz = xz * ct + zz * st;
|
|
||||||
double Nxo = xo * ct + zo * st;
|
|
||||||
|
|
||||||
double Nzx = zx * ct - xx * st;
|
|
||||||
double Nzy = zy * ct - xy * st;
|
|
||||||
double Nzz = zz * ct - xz * st;
|
|
||||||
double Nzo = zo * ct - xo * st;
|
|
||||||
|
|
||||||
xo = Nxo;
|
|
||||||
xx = Nxx;
|
|
||||||
xy = Nxy;
|
|
||||||
xz = Nxz;
|
|
||||||
zo = Nzo;
|
|
||||||
zx = Nzx;
|
|
||||||
zy = Nzy;
|
|
||||||
zz = Nzz;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Rotation, in degrees, around the X axis
|
|
||||||
void rotX(double theta)
|
|
||||||
{
|
|
||||||
theta *= pi / 180;
|
|
||||||
double ct = cos(theta);
|
|
||||||
double st = sin(theta);
|
|
||||||
|
|
||||||
double Nyx = yx * ct + zx * st;
|
|
||||||
double Nyy = yy * ct + zy * st;
|
|
||||||
double Nyz = yz * ct + zz * st;
|
|
||||||
double Nyo = yo * ct + zo * st;
|
|
||||||
|
|
||||||
double Nzx = zx * ct - yx * st;
|
|
||||||
double Nzy = zy * ct - yy * st;
|
|
||||||
double Nzz = zz * ct - yz * st;
|
|
||||||
double Nzo = zo * ct - yo * st;
|
|
||||||
|
|
||||||
yo = Nyo;
|
|
||||||
yx = Nyx;
|
|
||||||
yy = Nyy;
|
|
||||||
yz = Nyz;
|
|
||||||
zo = Nzo;
|
|
||||||
zx = Nzx;
|
|
||||||
zy = Nzy;
|
|
||||||
zz = Nzz;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Rotation, in degrees, around the Z axis
|
|
||||||
void rotZ(double theta)
|
|
||||||
{
|
|
||||||
theta *= pi / 180;
|
|
||||||
double ct = cos(theta);
|
|
||||||
double st = sin(theta);
|
|
||||||
|
|
||||||
double Nyx = yx * ct + xx * st;
|
|
||||||
double Nyy = yy * ct + xy * st;
|
|
||||||
double Nyz = yz * ct + xz * st;
|
|
||||||
double Nyo = yo * ct + xo * st;
|
|
||||||
|
|
||||||
double Nxx = xx * ct - yx * st;
|
|
||||||
double Nxy = xy * ct - yy * st;
|
|
||||||
double Nxz = xz * ct - yz * st;
|
|
||||||
double Nxo = xo * ct - yo * st;
|
|
||||||
|
|
||||||
yo = Nyo;
|
|
||||||
yx = Nyx;
|
|
||||||
yy = Nyy;
|
|
||||||
yz = Nyz;
|
|
||||||
xo = Nxo;
|
|
||||||
xx = Nxx;
|
|
||||||
xy = Nxy;
|
|
||||||
xz = Nxz;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Multiply by a projection matrix, with camera f
|
|
||||||
// f 0 0 0 x f*x
|
|
||||||
// 0 f 0 0 * y = f*y
|
|
||||||
// 0 0 1 f z z+f
|
|
||||||
// 0 0 0 1 1 1
|
|
||||||
// So, it it easy to find the 2D coordinates after the transform
|
|
||||||
// u = f*x / (z+f)
|
|
||||||
// v = f*y / (z+f)
|
|
||||||
void proj(double f)
|
|
||||||
{
|
|
||||||
xx*=f;
|
|
||||||
xy*=f;
|
|
||||||
xz*=f;
|
|
||||||
xo*=f;
|
|
||||||
yx*=f;
|
|
||||||
yy*=f;
|
|
||||||
yz*=f;
|
|
||||||
yo*=f;
|
|
||||||
zo+=f;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply the transformation 3D => 2D
|
|
||||||
void transform(double x, double y, double z, double &u, double& v, double& w)
|
|
||||||
{
|
|
||||||
u = x * xx + y * xy + z * xz + xo;
|
|
||||||
v = x * yx + y * yy + z * yz + yo;
|
|
||||||
w = x * zx + y * zy + z * zz + zo;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
KLorenzSaver::KLorenzSaver( WId id ) : KScreenSaver( id )
|
|
||||||
{
|
|
||||||
readSettings();
|
|
||||||
|
|
||||||
// Create a transform matrix with the parameters
|
|
||||||
mat = new Matrix3D();
|
|
||||||
updateMatrix();
|
|
||||||
|
|
||||||
newEpoch();
|
|
||||||
|
|
||||||
timer.start( 10 );
|
|
||||||
connect( &timer, SIGNAL(timeout()), SLOT(update()) );
|
|
||||||
setAttribute( Qt::WA_NoSystemBackground );
|
|
||||||
show();
|
|
||||||
}
|
|
||||||
|
|
||||||
KLorenzSaver::~KLorenzSaver()
|
|
||||||
{
|
|
||||||
delete mat;
|
|
||||||
mat=0;
|
|
||||||
timer.stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
// read configuration settings from config file
|
|
||||||
void KLorenzSaver::readSettings()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
speed = config.readEntry( "Speed", DEFSPEED );
|
|
||||||
epoch = config.readEntry( "Epoch", DEFEPOCH );
|
|
||||||
zrot = config.readEntry( "ZRot", DEFZROT );
|
|
||||||
yrot = config.readEntry( "YRot", DEFZROT );
|
|
||||||
xrot = config.readEntry( "XRot", DEFZROT );
|
|
||||||
|
|
||||||
int crate_num = config.readEntry( "Color Rate", DEFCOLOR );
|
|
||||||
crate = (double)crate_num / (double)MAXCOLOR;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLorenzSaver::setSpeed(int num)
|
|
||||||
{
|
|
||||||
speed = num;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLorenzSaver::setEpoch(int num)
|
|
||||||
{
|
|
||||||
epoch = num;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLorenzSaver::setZRot(int num)
|
|
||||||
{
|
|
||||||
zrot = num;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLorenzSaver::setYRot(int num)
|
|
||||||
{
|
|
||||||
yrot = num;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLorenzSaver::setXRot(int num)
|
|
||||||
{
|
|
||||||
xrot = num;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLorenzSaver::setCRate(int num)
|
|
||||||
{
|
|
||||||
crate = (double)num / (double)MAXCOLOR;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLorenzSaver::updateMatrix()
|
|
||||||
{
|
|
||||||
// reset matrix
|
|
||||||
mat->unit();
|
|
||||||
// Remove the mean before the rotations...
|
|
||||||
mat->translate(-0.95413, -0.96740, -23.60065);
|
|
||||||
mat->rotZ(zrot);
|
|
||||||
mat->rotY(yrot);
|
|
||||||
mat->rotX(xrot);
|
|
||||||
mat->translate(0, 0, 100);
|
|
||||||
mat->proj(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void KLorenzSaver::newEpoch()
|
|
||||||
{
|
|
||||||
// Start at a random position, somewhere around the mean
|
|
||||||
x = 0.95-25.0+50.0*KRandom::random() / (RAND_MAX+1.0);
|
|
||||||
y = 0.97-25.0+50.0*KRandom::random() / (RAND_MAX+1.0);
|
|
||||||
z = 23.6-25.0+50.0*KRandom::random() / (RAND_MAX+1.0);
|
|
||||||
// start at some random 'time' as well to have different colors
|
|
||||||
t = 10000.0*KRandom::random() / (RAND_MAX+1.0);
|
|
||||||
e=0; // reset epoch counter
|
|
||||||
}
|
|
||||||
|
|
||||||
// Computes the derivatives using Lorenz equations
|
|
||||||
static void lorenz(double x, double y, double z, double& dx, double& dy, double& dz)
|
|
||||||
{
|
|
||||||
dx = 10*(y-x);
|
|
||||||
dy = 28*x - y - x*z;
|
|
||||||
dz = x*y - z*8.0/3.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use a simple Runge-Kutta formula to draw a few points
|
|
||||||
// No need to go beyond 2nd order for a screensaver!
|
|
||||||
void KLorenzSaver::paintEvent(QPaintEvent *)
|
|
||||||
{
|
|
||||||
double kx, ky, kz, dx, dy, dz;
|
|
||||||
const double h = 0.0001;
|
|
||||||
const double tqh = h * 3.0 / 4.0;
|
|
||||||
QPainter p(this);
|
|
||||||
|
|
||||||
if ( !e )
|
|
||||||
p.fillRect(rect(), Qt::black);
|
|
||||||
|
|
||||||
QColormap cmap = QColormap::instance();
|
|
||||||
for (int i=0; i<speed; i++) {
|
|
||||||
// Runge-Kutta formula
|
|
||||||
lorenz(x,y,z,dx,dy,dz);
|
|
||||||
lorenz(x + tqh*dx, y + tqh*dy, z + tqh*dz, kx, ky, kz);
|
|
||||||
x += h*(dx/3.0+2*kx/3.0);
|
|
||||||
y += h*(dy/3.0+2*ky/3.0);
|
|
||||||
z += h*(dz/3.0+2*kz/3.0);
|
|
||||||
// Apply transform
|
|
||||||
mat->transform(x,y,z,kx,ky,kz);
|
|
||||||
// Choose a color
|
|
||||||
p.setPen(
|
|
||||||
cmap.pixel(QColor((int)(sin(t*crate/pi)*127+128),
|
|
||||||
(int)(sin(t*crate/(pi-1))*127+128),
|
|
||||||
(int)(sin(t*crate/(pi-2))*127+128))) );
|
|
||||||
// Draw a point
|
|
||||||
p.drawPoint( (int)(kx*width()*1.5/kz)+(int)(width()/2),
|
|
||||||
(int)(ky*height()*1.5/kz)+(int)(height()/2));
|
|
||||||
t+=h;
|
|
||||||
}
|
|
||||||
if (++e>=epoch)
|
|
||||||
newEpoch();
|
|
||||||
}
|
|
|
@ -1,85 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// Lorenz - Lorenz Attractor screen saver
|
|
||||||
// Nicolas Brodu, brodu@kde.org, 2000
|
|
||||||
//
|
|
||||||
// Portions of code from kblankscrn and khop.
|
|
||||||
// See authors there.
|
|
||||||
//
|
|
||||||
// I release my code as GPL, but see the other headers and the README
|
|
||||||
|
|
||||||
#ifndef LORENZKSCRN_H
|
|
||||||
#define LORENZKSCRN_H
|
|
||||||
|
|
||||||
#include <qtimer.h>
|
|
||||||
#include <qcolor.h>
|
|
||||||
#include <kscreensaver.h>
|
|
||||||
#include <kdialog.h>
|
|
||||||
|
|
||||||
// See lorenz.cpp for this private class
|
|
||||||
class Matrix3D;
|
|
||||||
|
|
||||||
class KLorenzSaver : public KScreenSaver
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
KLorenzSaver( WId id );
|
|
||||||
virtual ~KLorenzSaver();
|
|
||||||
void setSpeed(int num);
|
|
||||||
void setEpoch(int num);
|
|
||||||
void setCRate(int num);
|
|
||||||
void setZRot(int num);
|
|
||||||
void setYRot(int num);
|
|
||||||
void setXRot(int num);
|
|
||||||
void updateMatrix();
|
|
||||||
void newEpoch();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void paintEvent(QPaintEvent *);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
QTimer timer;
|
|
||||||
|
|
||||||
private:
|
|
||||||
void readSettings();
|
|
||||||
|
|
||||||
private:
|
|
||||||
double x, y, z, t;
|
|
||||||
double speed, epoch, zrot, yrot, xrot, crate;
|
|
||||||
int e;
|
|
||||||
Matrix3D *mat;
|
|
||||||
};
|
|
||||||
|
|
||||||
#include <QSlider>
|
|
||||||
|
|
||||||
class KLorenzSetup : public KDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
KLorenzSetup(QWidget *parent = 0 );
|
|
||||||
~KLorenzSetup();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void readSettings();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotSpeed(int num);
|
|
||||||
void slotEpoch(int num);
|
|
||||||
void slotCRate(int num);
|
|
||||||
void slotZRot(int num);
|
|
||||||
void slotYRot(int num);
|
|
||||||
void slotXRot(int num);
|
|
||||||
|
|
||||||
void slotOk();
|
|
||||||
void slotHelp();
|
|
||||||
void slotDefault();
|
|
||||||
|
|
||||||
private:
|
|
||||||
QWidget *preview;
|
|
||||||
QSlider *sps, *eps, *zrs, *yrs, *xrs, *crs;
|
|
||||||
KLorenzSaver *saver;
|
|
||||||
int speed, epoch, zrot, yrot, xrot, crate;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,386 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// kpolygon - Basic screen saver for KDE
|
|
||||||
//
|
|
||||||
// Copyright (c) Martin R. Jones 1996
|
|
||||||
//
|
|
||||||
// layout management added 1998/04/19 by Mario Weilguni <mweilguni@kde.org>
|
|
||||||
// 2001/03/04 Converted to libkscreensaver by Martin R. Jones
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <qcolor.h>
|
|
||||||
#include <qlabel.h>
|
|
||||||
#include <qslider.h>
|
|
||||||
#include <qlayout.h>
|
|
||||||
#include <QPolygon>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QHBoxLayout>
|
|
||||||
#include <klocale.h>
|
|
||||||
#include <kconfig.h>
|
|
||||||
#include <kglobal.h>
|
|
||||||
#include <kmessagebox.h>
|
|
||||||
|
|
||||||
#include "polygon.h"
|
|
||||||
#include <qpainter.h>
|
|
||||||
|
|
||||||
#include "moc_polygon.cpp"
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXLENGTH 65
|
|
||||||
#define MAXVERTICES 19
|
|
||||||
|
|
||||||
// libkscreensaver interface
|
|
||||||
class KPolygonSaverInterface : public KScreenSaverInterface
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
virtual KAboutData* aboutData() {
|
|
||||||
return new KAboutData( "kpolygon.kss", "klock", ki18n( "KPolygon" ), "2.2.0", ki18n( "KPolygon" ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
virtual KScreenSaver* create( WId id )
|
|
||||||
{
|
|
||||||
return new kPolygonSaver( id );
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual QDialog* setup()
|
|
||||||
{
|
|
||||||
return new kPolygonSetup();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
int main( int argc, char *argv[] )
|
|
||||||
{
|
|
||||||
KPolygonSaverInterface kss;
|
|
||||||
return kScreenSaverMain( argc, argv, kss );
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// dialog to setup screen saver parameters
|
|
||||||
//
|
|
||||||
kPolygonSetup::kPolygonSetup( QWidget *parent )
|
|
||||||
: KDialog( parent)
|
|
||||||
, saver( 0 ), length( 10 ), vertices( 3 ),
|
|
||||||
speed( 50 )
|
|
||||||
{
|
|
||||||
setCaption(i18n( "Setup Polygon Screen Saver" ));
|
|
||||||
setButtons(Ok|Cancel|Help);
|
|
||||||
setDefaultButton(Ok);
|
|
||||||
setModal(true);
|
|
||||||
readSettings();
|
|
||||||
|
|
||||||
QWidget *main = new QWidget(this);
|
|
||||||
setMainWidget(main);
|
|
||||||
setButtonText( Help, i18n( "A&bout" ) );
|
|
||||||
|
|
||||||
QHBoxLayout *tl = new QHBoxLayout(main);
|
|
||||||
tl->setSpacing(spacingHint());
|
|
||||||
QVBoxLayout *tl1 = new QVBoxLayout;
|
|
||||||
tl->addLayout(tl1);
|
|
||||||
|
|
||||||
QLabel *label = new QLabel( i18n("Length:"), main );
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
QSlider *sb = new QSlider(Qt::Horizontal, main);
|
|
||||||
sb->setMinimum(1);
|
|
||||||
sb->setMaximum(MAXLENGTH);
|
|
||||||
sb->setPageStep(10);
|
|
||||||
sb->setValue(length);
|
|
||||||
sb->setMinimumSize( 90, 20 );
|
|
||||||
sb->setTickPosition(QSlider::TicksBelow);
|
|
||||||
sb->setTickInterval(10);
|
|
||||||
connect( sb, SIGNAL(valueChanged(int)), SLOT(slotLength(int)) );
|
|
||||||
tl1->addWidget(sb);
|
|
||||||
|
|
||||||
label = new QLabel( i18n("Vertices:"), main );
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
sb = new QSlider(Qt::Horizontal, main);
|
|
||||||
sb->setMinimum(3);
|
|
||||||
sb->setMaximum(MAXVERTICES);
|
|
||||||
sb->setPageStep(2);
|
|
||||||
sb->setValue(vertices);
|
|
||||||
sb->setMinimumSize( 90, 20 );
|
|
||||||
sb->setTickPosition(QSlider::TicksBelow);
|
|
||||||
sb->setTickInterval(2);
|
|
||||||
connect( sb, SIGNAL(valueChanged(int)), SLOT(slotVertices(int)) );
|
|
||||||
tl1->addWidget(sb);
|
|
||||||
|
|
||||||
label = new QLabel( i18n("Speed:"), main );
|
|
||||||
tl1->addWidget(label);
|
|
||||||
|
|
||||||
sb = new QSlider(Qt::Horizontal, main);
|
|
||||||
sb->setMinimum(0);
|
|
||||||
sb->setMaximum(100);
|
|
||||||
sb->setPageStep(10);
|
|
||||||
sb->setValue(speed);
|
|
||||||
sb->setMinimumSize( 90, 20 );
|
|
||||||
sb->setTickPosition(QSlider::TicksBelow);
|
|
||||||
sb->setTickInterval(10);
|
|
||||||
connect( sb, SIGNAL(valueChanged(int)), SLOT(slotSpeed(int)) );
|
|
||||||
tl1->addWidget(sb);
|
|
||||||
tl1->addStretch();
|
|
||||||
|
|
||||||
preview = new QWidget( main );
|
|
||||||
preview->setFixedSize( 220, 170 );
|
|
||||||
preview->show(); // otherwise saver does not get correct size
|
|
||||||
saver = new kPolygonSaver( preview->winId() );
|
|
||||||
tl->addWidget(preview);
|
|
||||||
connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
|
|
||||||
connect(this,SIGNAL(helpClicked()),this,SLOT(slotHelp()));
|
|
||||||
setMinimumSize( sizeHint() );
|
|
||||||
}
|
|
||||||
|
|
||||||
kPolygonSetup::~kPolygonSetup()
|
|
||||||
{
|
|
||||||
delete saver;
|
|
||||||
}
|
|
||||||
|
|
||||||
// read settings from config file
|
|
||||||
void kPolygonSetup::readSettings()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
length = config.readEntry( "Length", length );
|
|
||||||
if ( length > MAXLENGTH )
|
|
||||||
length = MAXLENGTH;
|
|
||||||
else if ( length < 1 )
|
|
||||||
length = 1;
|
|
||||||
|
|
||||||
vertices = config.readEntry( "Vertices", vertices );
|
|
||||||
if ( vertices > MAXVERTICES )
|
|
||||||
vertices = MAXVERTICES;
|
|
||||||
else if ( vertices < 3 )
|
|
||||||
vertices = 3;
|
|
||||||
|
|
||||||
speed = config.readEntry( "Speed", speed );
|
|
||||||
if ( speed > 100 )
|
|
||||||
speed = 100;
|
|
||||||
else if ( speed < 50 )
|
|
||||||
speed = 50;
|
|
||||||
}
|
|
||||||
|
|
||||||
void kPolygonSetup::slotLength( int len )
|
|
||||||
{
|
|
||||||
length = len;
|
|
||||||
if ( saver )
|
|
||||||
saver->setPolygon( length, vertices );
|
|
||||||
}
|
|
||||||
|
|
||||||
void kPolygonSetup::slotVertices( int num )
|
|
||||||
{
|
|
||||||
vertices = num;
|
|
||||||
if ( saver )
|
|
||||||
saver->setPolygon( length, vertices );
|
|
||||||
}
|
|
||||||
|
|
||||||
void kPolygonSetup::slotSpeed( int num )
|
|
||||||
{
|
|
||||||
speed = num;
|
|
||||||
if ( saver )
|
|
||||||
saver->setSpeed( speed );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ok pressed - save settings and exit
|
|
||||||
void kPolygonSetup::slotOk()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
QString slength;
|
|
||||||
slength.setNum( length );
|
|
||||||
config.writeEntry( "Length", slength );
|
|
||||||
|
|
||||||
QString svertices;
|
|
||||||
svertices.setNum( vertices );
|
|
||||||
config.writeEntry( "Vertices", svertices );
|
|
||||||
|
|
||||||
QString sspeed;
|
|
||||||
sspeed.setNum( speed );
|
|
||||||
config.writeEntry( "Speed", sspeed );
|
|
||||||
|
|
||||||
config.sync();
|
|
||||||
|
|
||||||
accept();
|
|
||||||
}
|
|
||||||
|
|
||||||
void kPolygonSetup::slotHelp()
|
|
||||||
{
|
|
||||||
KMessageBox::information(this,
|
|
||||||
i18n("Polygon Version 2.2.0\n\n"\
|
|
||||||
"Written by Martin R. Jones 1996\n"\
|
|
||||||
"mjones@kde.org"));
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
kPolygonSaver::kPolygonSaver( WId id ) : KScreenSaver( id )
|
|
||||||
{
|
|
||||||
readSettings();
|
|
||||||
|
|
||||||
directions.resize( numVertices );
|
|
||||||
|
|
||||||
initialiseColor();
|
|
||||||
initialisePolygons();
|
|
||||||
|
|
||||||
timer.start( speed );
|
|
||||||
connect( &timer, SIGNAL(timeout()), SLOT(update()) );
|
|
||||||
setAttribute( Qt::WA_NoSystemBackground );
|
|
||||||
cleared = false;
|
|
||||||
show();
|
|
||||||
}
|
|
||||||
|
|
||||||
kPolygonSaver::~kPolygonSaver()
|
|
||||||
{
|
|
||||||
timer.stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
// set polygon properties
|
|
||||||
void kPolygonSaver::setPolygon( int len, int ver )
|
|
||||||
{
|
|
||||||
timer.stop();
|
|
||||||
numLines = len;
|
|
||||||
numVertices = ver;
|
|
||||||
|
|
||||||
directions.resize( numVertices );
|
|
||||||
polygons.clear();
|
|
||||||
initialisePolygons();
|
|
||||||
|
|
||||||
timer.start( speed );
|
|
||||||
}
|
|
||||||
|
|
||||||
// set the speed
|
|
||||||
void kPolygonSaver::setSpeed( int spd )
|
|
||||||
{
|
|
||||||
timer.stop();
|
|
||||||
speed = 100-spd;
|
|
||||||
timer.start( speed );
|
|
||||||
}
|
|
||||||
|
|
||||||
// read configuration settings from config file
|
|
||||||
void kPolygonSaver::readSettings()
|
|
||||||
{
|
|
||||||
KConfigGroup config(KGlobal::config(), "Settings");
|
|
||||||
|
|
||||||
numLines = config.readEntry( "Length", 10 );
|
|
||||||
if ( numLines > 50 )
|
|
||||||
numLines = 50;
|
|
||||||
else if ( numLines < 1 )
|
|
||||||
numLines = 1;
|
|
||||||
|
|
||||||
numVertices = config.readEntry( "Vertices", 3 );
|
|
||||||
if ( numVertices > 20 )
|
|
||||||
numVertices = 20;
|
|
||||||
else if ( numVertices < 3 )
|
|
||||||
numVertices = 3;
|
|
||||||
|
|
||||||
speed = 100 - config.readEntry( "Speed", 50 );
|
|
||||||
}
|
|
||||||
|
|
||||||
// draw next polygon and erase tail
|
|
||||||
void kPolygonSaver::paintEvent(QPaintEvent *)
|
|
||||||
{
|
|
||||||
QPainter p( this );
|
|
||||||
if (!cleared) {
|
|
||||||
cleared = true;
|
|
||||||
p.fillRect(rect(), Qt::black);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( polygons.count() > numLines )
|
|
||||||
{
|
|
||||||
p.setPen( Qt::black );
|
|
||||||
p.drawPolyline( polygons.first() );
|
|
||||||
}
|
|
||||||
|
|
||||||
nextColor();
|
|
||||||
p.setPen( colors[currentColor] );
|
|
||||||
p.drawPolyline( polygons.last() );
|
|
||||||
|
|
||||||
if ( polygons.count() > numLines )
|
|
||||||
polygons.removeFirst();
|
|
||||||
|
|
||||||
polygons.append( QPolygon( polygons.last() ) );
|
|
||||||
moveVertices();
|
|
||||||
}
|
|
||||||
|
|
||||||
// initialise the polygon
|
|
||||||
void kPolygonSaver::initialisePolygons()
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
polygons.append( QPolygon( numVertices + 1 ) );
|
|
||||||
|
|
||||||
QPolygon &poly = polygons.last();
|
|
||||||
|
|
||||||
for ( i = 0; i < numVertices; i++ )
|
|
||||||
{
|
|
||||||
poly.setPoint( i, rnd.getLong(width()), rnd.getLong(height()) );
|
|
||||||
directions[i].setX( 16 - rnd.getLong(8) * 4 );
|
|
||||||
if ( directions[i].x() == 0 )
|
|
||||||
directions[i].setX( 1 );
|
|
||||||
directions[i].setY( 16 - rnd.getLong(8) * 4 );
|
|
||||||
if ( directions[i].y() == 0 )
|
|
||||||
directions[i].setY( 1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
poly.setPoint( i, poly.point(0) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// move polygon in current direction and change direction if a border is hit
|
|
||||||
void kPolygonSaver::moveVertices()
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
QPolygon &poly = polygons.last();
|
|
||||||
|
|
||||||
for ( i = 0; i < numVertices; i++ )
|
|
||||||
{
|
|
||||||
poly.setPoint( i, poly.point(i) + directions[i] );
|
|
||||||
if ( poly[i].x() >= (int)width() )
|
|
||||||
{
|
|
||||||
directions[i].setX( -(rnd.getLong(4) + 1) * 4 );
|
|
||||||
poly[i].setX( (int)width() );
|
|
||||||
}
|
|
||||||
else if ( poly[i].x() < 0 )
|
|
||||||
{
|
|
||||||
directions[i].setX( (rnd.getLong(4) + 1) * 4 );
|
|
||||||
poly[i].setX( 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( poly[i].y() >= (int)height() )
|
|
||||||
{
|
|
||||||
directions[i].setY( -(rnd.getLong(4) + 1) * 4 );
|
|
||||||
poly[i].setY( height() );
|
|
||||||
}
|
|
||||||
else if ( poly[i].y() < 0 )
|
|
||||||
{
|
|
||||||
directions[i].setY( (rnd.getLong(4) + 1) * 4 );
|
|
||||||
poly[i].setY( 0 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
poly.setPoint( i, poly.point(0) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// create a color table of 64 colors
|
|
||||||
void kPolygonSaver::initialiseColor()
|
|
||||||
{
|
|
||||||
for ( int i = 0; i < 64; i++ )
|
|
||||||
{
|
|
||||||
colors[i].setHsv( i * 360 / 64, 255, 255 );
|
|
||||||
}
|
|
||||||
|
|
||||||
currentColor = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// set foreground color to next in the table
|
|
||||||
void kPolygonSaver::nextColor()
|
|
||||||
{
|
|
||||||
currentColor++;
|
|
||||||
|
|
||||||
if ( currentColor > 63 )
|
|
||||||
currentColor = 0;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,81 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// kpolygon - Basic screen saver for KDE
|
|
||||||
//
|
|
||||||
// Copyright (c) Martin R. Jones 1996
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef POLYGON_H
|
|
||||||
#define POLYGON_H
|
|
||||||
|
|
||||||
#include <qtimer.h>
|
|
||||||
#include <QVector>
|
|
||||||
#include <QList>
|
|
||||||
|
|
||||||
#include <kdialog.h>
|
|
||||||
#include <kscreensaver.h>
|
|
||||||
#include <krandomsequence.h>
|
|
||||||
|
|
||||||
#include <QPolygon>
|
|
||||||
|
|
||||||
class kPolygonSaver : public KScreenSaver
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
kPolygonSaver( WId id );
|
|
||||||
virtual ~kPolygonSaver();
|
|
||||||
|
|
||||||
void setPolygon( int len, int ver );
|
|
||||||
void setSpeed( int spd );
|
|
||||||
|
|
||||||
private:
|
|
||||||
void readSettings();
|
|
||||||
void initialisePolygons();
|
|
||||||
void moveVertices();
|
|
||||||
void initialiseColor();
|
|
||||||
void nextColor();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void paintEvent(QPaintEvent *event);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
QTimer timer;
|
|
||||||
bool cleared;
|
|
||||||
int numLines;
|
|
||||||
int numVertices;
|
|
||||||
int speed;
|
|
||||||
QColor colors[64];
|
|
||||||
int currentColor;
|
|
||||||
QList<QPolygon> polygons;
|
|
||||||
QVector<QPoint> directions;
|
|
||||||
KRandomSequence rnd;
|
|
||||||
};
|
|
||||||
|
|
||||||
class kPolygonSetup : public KDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
kPolygonSetup( QWidget *parent = 0 );
|
|
||||||
~kPolygonSetup();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void readSettings();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotLength( int );
|
|
||||||
void slotVertices( int );
|
|
||||||
void slotSpeed( int );
|
|
||||||
void slotOk();
|
|
||||||
void slotHelp();
|
|
||||||
|
|
||||||
private:
|
|
||||||
QWidget *preview;
|
|
||||||
kPolygonSaver *saver;
|
|
||||||
|
|
||||||
int length;
|
|
||||||
int vertices;
|
|
||||||
int speed;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,148 +0,0 @@
|
||||||
// ----------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// kscience - screen saver for KDE
|
|
||||||
//
|
|
||||||
// copyright (c) Rene Beutler 1998
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef SCIENCE_H
|
|
||||||
#define SCIENCE_H
|
|
||||||
|
|
||||||
#include <qrect.h>
|
|
||||||
#include <qtimer.h>
|
|
||||||
#include <kdialog.h>
|
|
||||||
#include <kscreensaver.h>
|
|
||||||
|
|
||||||
#include <QSlider>
|
|
||||||
#include <QCheckBox>
|
|
||||||
|
|
||||||
#define MAX_MODES 6
|
|
||||||
|
|
||||||
typedef signed int T32bit;
|
|
||||||
|
|
||||||
class KScienceSaver;
|
|
||||||
|
|
||||||
class KPreviewWidget : public QWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
KPreviewWidget( QWidget *parent );
|
|
||||||
void paintEvent( QPaintEvent *event );
|
|
||||||
void notifySaver( KScienceSaver *s = 0 );
|
|
||||||
private:
|
|
||||||
KScienceSaver *saver;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct KScienceData;
|
|
||||||
|
|
||||||
class KScienceSaver : public KScreenSaver
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
KScienceSaver( WId id, bool setup=false, bool gP=false);
|
|
||||||
virtual ~KScienceSaver();
|
|
||||||
|
|
||||||
void do_refresh( const QRect & rect );
|
|
||||||
void setMode ( int mode );
|
|
||||||
void setMoveX ( signed int s );
|
|
||||||
void setMoveY ( signed int s );
|
|
||||||
void setMove ( bool s );
|
|
||||||
void setSize ( signed int s );
|
|
||||||
void setIntensity ( signed int s );
|
|
||||||
void setSpeed ( signed int s );
|
|
||||||
void setInverse ( bool b );
|
|
||||||
void setGravity ( bool b );
|
|
||||||
void setHideBG ( bool b );
|
|
||||||
|
|
||||||
void myAssert( bool term, const char *sMsg );
|
|
||||||
|
|
||||||
private:
|
|
||||||
void readSettings();
|
|
||||||
void initLens();
|
|
||||||
void initialize();
|
|
||||||
void releaseLens();
|
|
||||||
void (KScienceSaver::*applyLens)(int xs, int ys, int xd, int yd, int w, int h);
|
|
||||||
|
|
||||||
protected slots:
|
|
||||||
void slotTimeout();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void grabRootWindow();
|
|
||||||
void grabPreviewWidget();
|
|
||||||
void initWhirlLens();
|
|
||||||
void initSphereLens();
|
|
||||||
void initExponentialLens();
|
|
||||||
void initWaveLens();
|
|
||||||
void initCurvatureLens();
|
|
||||||
void blackPixel( int x, int y );
|
|
||||||
void blackPixelUndo( int x, int y);
|
|
||||||
void applyLens8bpp( int xs, int ys, int xd, int yd, int w, int h);
|
|
||||||
void applyLens16bpp(int xs, int ys, int xd, int yd, int w, int h);
|
|
||||||
void applyLens24bpp(int xs, int ys, int xd, int yd, int w, int h);
|
|
||||||
void applyLens32bpp(int xs, int ys, int xd, int yd, int w, int h);
|
|
||||||
QTimer timer;
|
|
||||||
bool moveOn;
|
|
||||||
bool setup;
|
|
||||||
bool grabPixmap;
|
|
||||||
int mode;
|
|
||||||
bool inverse[MAX_MODES];
|
|
||||||
bool gravity[MAX_MODES];
|
|
||||||
bool hideBG[MAX_MODES];
|
|
||||||
signed int size[MAX_MODES];
|
|
||||||
signed int moveX[MAX_MODES];
|
|
||||||
signed int moveY[MAX_MODES];
|
|
||||||
signed int speed[MAX_MODES];
|
|
||||||
signed int intensity[MAX_MODES];
|
|
||||||
int xcoord, ycoord;
|
|
||||||
double x, y, vx, vy;
|
|
||||||
signed int bpp, side;
|
|
||||||
int border, radius, diam, origin;
|
|
||||||
int imgnext;
|
|
||||||
char blackRestore[4];
|
|
||||||
KScienceData *d;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class KScienceSetup : public KDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
KScienceSetup(QWidget *parent=0);
|
|
||||||
~KScienceSetup();
|
|
||||||
protected:
|
|
||||||
void updateSettings();
|
|
||||||
void readSettings();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotMode( int );
|
|
||||||
void slotInverse();
|
|
||||||
void slotGravity();
|
|
||||||
void slotHideBG();
|
|
||||||
void slotMoveX( int );
|
|
||||||
void slotMoveY( int );
|
|
||||||
void slotSize( int );
|
|
||||||
void slotIntensity( int );
|
|
||||||
void slotSliderPressed();
|
|
||||||
void slotSliderReleased();
|
|
||||||
void slotSpeed( int );
|
|
||||||
void slotOk();
|
|
||||||
void slotHelp();
|
|
||||||
|
|
||||||
private:
|
|
||||||
KPreviewWidget *preview;
|
|
||||||
KScienceSaver *saver;
|
|
||||||
QSlider *slideSize, *slideSpeed, *slideIntensity;
|
|
||||||
QSlider *slideMoveX, *slideMoveY;
|
|
||||||
QCheckBox *checkInverse, *checkGravity, *checkHideBG;
|
|
||||||
|
|
||||||
int mode;
|
|
||||||
bool inverse [MAX_MODES];
|
|
||||||
bool gravity [MAX_MODES];
|
|
||||||
bool hideBG [MAX_MODES];
|
|
||||||
int moveX [MAX_MODES];
|
|
||||||
int moveY [MAX_MODES];
|
|
||||||
int size [MAX_MODES];
|
|
||||||
int intensity[MAX_MODES];
|
|
||||||
int speed [MAX_MODES];
|
|
||||||
};
|
|
||||||
#endif
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,151 +0,0 @@
|
||||||
/* Slide Show Screen Saver
|
|
||||||
* (C) 1999 Stefan Taferner <taferner@kde.org>
|
|
||||||
* (C) 2003 Sven Leiber <s.leiber@web.de>
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef SLIDESHOW_H
|
|
||||||
#define SLIDESHOW_H
|
|
||||||
|
|
||||||
#include <QTimer>
|
|
||||||
#include <QStringList>
|
|
||||||
#include <QPixmap>
|
|
||||||
#include <QImage>
|
|
||||||
|
|
||||||
#include <kscreensaver.h>
|
|
||||||
#include <kdialog.h>
|
|
||||||
|
|
||||||
#include "ui_slideshowcfg.h"
|
|
||||||
|
|
||||||
class SlideShowCfg : public QWidget, public Ui::SlideShowCfg
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
SlideShowCfg( QWidget *parent ) : QWidget( parent ) {
|
|
||||||
setupUi( parent );
|
|
||||||
cbSpacer1->changeSize(style()->pixelMetric(QStyle::PM_IndicatorWidth) +
|
|
||||||
style()->pixelMetric(QStyle::PM_CheckBoxLabelSpacing), 1,
|
|
||||||
QSizePolicy::Fixed, QSizePolicy::Minimum);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
class kSlideShowSaver: public KScreenSaver
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
kSlideShowSaver( WId id );
|
|
||||||
virtual ~kSlideShowSaver();
|
|
||||||
|
|
||||||
typedef int (kSlideShowSaver::*EffectMethod)(bool);
|
|
||||||
|
|
||||||
void readConfig();
|
|
||||||
|
|
||||||
void restart();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
/** Load list of images from directory */
|
|
||||||
virtual void loadDirectory();
|
|
||||||
|
|
||||||
/** Helper for loadDirectory() */
|
|
||||||
virtual void traverseDirectory(const QString &dirName);
|
|
||||||
|
|
||||||
/** Load next image from list. If the file cannot be read
|
|
||||||
it is automatically removed from the file list.
|
|
||||||
mImage contains the image after loading. */
|
|
||||||
virtual void loadNextImage();
|
|
||||||
|
|
||||||
/** Show next screen, completely, without transition. */
|
|
||||||
virtual void showNextScreen();
|
|
||||||
|
|
||||||
/** Set loaded image to next-screen buffer. */
|
|
||||||
virtual void createNextScreen();
|
|
||||||
|
|
||||||
/** Initialize next-screen buffer. */
|
|
||||||
virtual void initNextScreen();
|
|
||||||
|
|
||||||
/** Register effect methods in effect list. */
|
|
||||||
virtual void registerEffects();
|
|
||||||
|
|
||||||
/** Various effects. If adding one, do not forget to manually
|
|
||||||
add the effect to the list in the registerEffects() method. */
|
|
||||||
int effectHorizLines(bool doInit);
|
|
||||||
int effectVertLines(bool doInit);
|
|
||||||
int effectRandom(bool doInit);
|
|
||||||
int effectGrowing(bool doInit);
|
|
||||||
int effectChessboard(bool doInit);
|
|
||||||
int effectIncomingEdges(bool doInit);
|
|
||||||
int effectBlobs(bool doInit);
|
|
||||||
int effectCircleOut(bool doInit);
|
|
||||||
int effectSweep(bool doInit);
|
|
||||||
int effectMeltdown(bool doInit);
|
|
||||||
int effectSpiralIn(bool doInit);
|
|
||||||
int effectMultiCircleOut(bool doInit);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void paintEvent(QPaintEvent *);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
struct mScreenGeo {
|
|
||||||
mScreenGeo(int w, int h, int x, int y) : mW(w), mH(h), mXorg(x), mYorg(y) {};
|
|
||||||
int mW;
|
|
||||||
int mH;
|
|
||||||
int mXorg;
|
|
||||||
int mYorg;
|
|
||||||
};
|
|
||||||
QList<mScreenGeo> mGeoList;
|
|
||||||
bool mEffectRunning;
|
|
||||||
QTimer mTimer;
|
|
||||||
QStringList mFileList;
|
|
||||||
QStringList mRandomList;
|
|
||||||
int mFileIdx;
|
|
||||||
QImage mImage;
|
|
||||||
QPixmap mNextScreen;
|
|
||||||
EffectMethod* mEffectList;
|
|
||||||
EffectMethod mEffect;
|
|
||||||
int mNumEffects;
|
|
||||||
QString mImageName;
|
|
||||||
|
|
||||||
// config settings:
|
|
||||||
bool mShowRandom;
|
|
||||||
bool mZoomImages;
|
|
||||||
bool mPrintName;
|
|
||||||
bool mPrintPath;
|
|
||||||
bool mSubdirectory;
|
|
||||||
bool mRandomPosition;
|
|
||||||
bool mEffectsEnabled;
|
|
||||||
int mDelay;
|
|
||||||
QString mDirectory;
|
|
||||||
|
|
||||||
// values for state of various effects:
|
|
||||||
int mx, my, mw, mh, mdx, mdy, mix, miy, mi, mj, mSubType;
|
|
||||||
int mx0, my0, mx1, my1, mwait;
|
|
||||||
double mfx, mfy, mAlpha, mfd;
|
|
||||||
int* mIntArray;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
class kSlideShowSetup : public KDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
kSlideShowSetup(QWidget *parent=NULL);
|
|
||||||
~kSlideShowSetup();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void readSettings();
|
|
||||||
|
|
||||||
protected slots:
|
|
||||||
void slotOk();
|
|
||||||
void slotHelp();
|
|
||||||
void writeSettings();
|
|
||||||
void slotDirSelected(const QString &where);
|
|
||||||
void slotDirSelected(const KUrl &);
|
|
||||||
private:
|
|
||||||
kSlideShowSaver *mSaver;
|
|
||||||
SlideShowCfg *cfg;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*SLIDESHOW_H*/
|
|
||||||
|
|
|
@ -1,227 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>SlideShowCfg</class>
|
|
||||||
<widget class="QWidget" name="SlideShowCfg">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>456</width>
|
|
||||||
<height>325</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="0" column="0" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="mCbxZoom">
|
|
||||||
<property name="text">
|
|
||||||
<string>Resi&ze images</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2" rowspan="7" colspan="2">
|
|
||||||
<widget class="QFrame" name="mPreview">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Plain</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="mCbxRandom">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Random order</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="mCbxShowName">
|
|
||||||
<property name="text">
|
|
||||||
<string>Show &names</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0" colspan="2">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<item>
|
|
||||||
<spacer name="cbSpacer1">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>10</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="mCbxShowPath">
|
|
||||||
<property name="text">
|
|
||||||
<string>Show &full path</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="mCbxRandomPosition">
|
|
||||||
<property name="text">
|
|
||||||
<string>Random &position</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="textLabel1_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Delay:</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>mDelay</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="KIntSpinBox" name="mDelay">
|
|
||||||
<property name="specialValueText">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>240</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0" colspan="4">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="textLabel1">
|
|
||||||
<property name="text">
|
|
||||||
<string>I&mage folder:</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>mDirChooser</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="KUrlRequester" name="mDirChooser"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="0" colspan="3">
|
|
||||||
<widget class="QCheckBox" name="mCbxSubdirectory">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Include images from sub-folders</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="3">
|
|
||||||
<spacer name="spacer9">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>228</width>
|
|
||||||
<height>17</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<spacer name="spacer11">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>19</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>KIntSpinBox</class>
|
|
||||||
<extends>QSpinBox</extends>
|
|
||||||
<header>knuminput.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>KUrlRequester</class>
|
|
||||||
<extends>QFrame</extends>
|
|
||||||
<header>kurlrequester.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<includes>
|
|
||||||
<include location="local">klineedit.h</include>
|
|
||||||
<include location="local">kpushbutton.h</include>
|
|
||||||
</includes>
|
|
||||||
<resources/>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>mCbxZoom</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>mCbxRandomPosition</receiver>
|
|
||||||
<slot>setDisabled(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>20</x>
|
|
||||||
<y>20</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>mCbxShowName</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>mCbxShowPath</receiver>
|
|
||||||
<slot>setEnabled(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>50</x>
|
|
||||||
<y>65</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>75</x>
|
|
||||||
<y>91</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
|
@ -1,68 +0,0 @@
|
||||||
/*============================================================================
|
|
||||||
*
|
|
||||||
* Screensaver preview area helper class
|
|
||||||
*
|
|
||||||
* Copyright (C) 2004 Georg Drenkhahn, Georg.Drenkhahn@gmx.net
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify it under
|
|
||||||
* the terms of the GNU General Public License as published by the Free Software
|
|
||||||
* Foundation; either version 2 of the License or (at your option) version 3 or
|
|
||||||
* any later version accepted by the membership of KDE e.V. (or its successor
|
|
||||||
* approved by the membership of KDE e.V.), which shall act as a proxy defined
|
|
||||||
* in Section 14 of version 3 of the license.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
||||||
* details.
|
|
||||||
*
|
|
||||||
*===========================================================================*/
|
|
||||||
|
|
||||||
#ifndef SSPREVIEWAREA_H
|
|
||||||
#define SSPREVIEWAREA_H
|
|
||||||
|
|
||||||
#include <qwidget.h>
|
|
||||||
|
|
||||||
/** @brief Reimplementation of QWidget emitting a signal if resized.
|
|
||||||
*
|
|
||||||
* This class is equalt to QWidget except for the fact that the signal resized()
|
|
||||||
* is emitted if the widget gets resized. By this signaling mechanism it is
|
|
||||||
* possible to resize the embedded GL area object within the screen saver setup
|
|
||||||
* dialog.
|
|
||||||
*
|
|
||||||
* In the constructor of the dialog widget (KPendulumSetup::KPendulumSetup(),
|
|
||||||
* KRotationSetup::KRotationSetup()) the signal SsPreviewArea::resized() is
|
|
||||||
* connected with a slot of the screensaver class
|
|
||||||
* (KPendulumSaver::resizeGlArea(), KRotationSaver::resizeGlArea()). This slot
|
|
||||||
* function calls the reimplemented QGLWidget::resizeGL() method of the GL
|
|
||||||
* widgets (PendulumGLWidget::resizeGL(), RotationGLWidget::resizeGL()) which
|
|
||||||
* really resizes the GL scenery. */
|
|
||||||
class SsPreviewArea : public QWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
/** @brief Constructor for SsPreviewArea
|
|
||||||
* @param parent Pointer tp parent widget, forwarded to the QWidget
|
|
||||||
* constructor
|
|
||||||
*
|
|
||||||
* The constructor just calls QWidget::QWidget() with the given arguments.
|
|
||||||
*/
|
|
||||||
SsPreviewArea(QWidget* parent = NULL);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
/** @brief Called if widget gets resized.
|
|
||||||
* @param e Pointer to the corresponding QResizeEvent object containing the
|
|
||||||
* resize information
|
|
||||||
*
|
|
||||||
* Reimplemented event handler from QWidget. Only the signal resized() is
|
|
||||||
* emitted. */
|
|
||||||
virtual void resizeEvent(QResizeEvent* e);
|
|
||||||
|
|
||||||
signals:
|
|
||||||
/** @brief Signal which is emitted in the resizeEvent() method.
|
|
||||||
* @param e Pointer to the corresponding QResizeEvent object */
|
|
||||||
void resized(QResizeEvent* e);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,264 +0,0 @@
|
||||||
/*
|
|
||||||
* vm.c
|
|
||||||
*
|
|
||||||
* Copyright (c) 2000 Artur Rataj
|
|
||||||
* Distributed under the terms of the GNU General Public License
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "vm.h"
|
|
||||||
|
|
||||||
#define ERROR_VALUE INT_MAX
|
|
||||||
|
|
||||||
int vm_init_pool( struct tvm_pool** pool,
|
|
||||||
int area_size,
|
|
||||||
int max_stack_size,
|
|
||||||
int max_threads_num ) {
|
|
||||||
int position;
|
|
||||||
|
|
||||||
( *pool ) = (struct tvm_pool*)malloc( sizeof(struct tvm_pool) );
|
|
||||||
( *pool )->area_size = area_size;
|
|
||||||
( *pool )->area = (int*)malloc( (*pool)->area_size*sizeof(int) );
|
|
||||||
( *pool )->processes = NULL;
|
|
||||||
( *pool )->max_stack_size = max_stack_size;
|
|
||||||
( *pool )->max_threads_num = max_threads_num;
|
|
||||||
vm_enable_reverse( *pool, 0 );
|
|
||||||
for( position = 0; position < (*pool)->area_size; ++position )
|
|
||||||
( *pool )->area[position] = VM_OP_STOP;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void vm_done_pool( struct tvm_pool* pool ) {
|
|
||||||
struct tvm_process* curr_process;
|
|
||||||
free( pool->area );
|
|
||||||
curr_process = pool->processes;
|
|
||||||
while( curr_process ) {
|
|
||||||
struct tvm_process* tmp_process;
|
|
||||||
|
|
||||||
tmp_process = curr_process;
|
|
||||||
curr_process = curr_process->next;
|
|
||||||
free( tmp_process->stack );
|
|
||||||
free( tmp_process );
|
|
||||||
}
|
|
||||||
free( pool );
|
|
||||||
}
|
|
||||||
|
|
||||||
static int push( struct tvm_pool* pool,
|
|
||||||
struct tvm_process* process,
|
|
||||||
int value ) {
|
|
||||||
if( process->stack_top == pool->max_stack_size )
|
|
||||||
return ERROR_VALUE;
|
|
||||||
else
|
|
||||||
process->stack[process->stack_top++] = value;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int pop( struct tvm_pool* pool,
|
|
||||||
struct tvm_process* process ) {
|
|
||||||
if( process->stack_top == 0 )
|
|
||||||
return ERROR_VALUE;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return process->stack[--process->stack_top];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void vm_modify( struct tvm_pool* pool,
|
|
||||||
int position,
|
|
||||||
int op ) {
|
|
||||||
pool->area[position] = op;
|
|
||||||
}
|
|
||||||
|
|
||||||
void vm_exec( struct tvm_pool* pool,
|
|
||||||
int position,
|
|
||||||
int age,
|
|
||||||
int reverse ) {
|
|
||||||
struct tvm_process* new_process;
|
|
||||||
|
|
||||||
new_process = (struct tvm_process*)malloc( sizeof(struct tvm_process) );
|
|
||||||
new_process->position = position;
|
|
||||||
new_process->stack = (int*)malloc( pool->max_stack_size*sizeof(int) );
|
|
||||||
new_process->stack_top = 0;
|
|
||||||
new_process->age = age;
|
|
||||||
new_process->reverse = reverse;
|
|
||||||
new_process->next = pool->processes;
|
|
||||||
pool->processes = new_process;
|
|
||||||
}
|
|
||||||
|
|
||||||
void vm_enable_reverse( struct tvm_pool* pool,
|
|
||||||
const int enabled ) {
|
|
||||||
pool->reverse_enabled = enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
int vm_get_reverse( struct tvm_pool* pool ) {
|
|
||||||
if( pool->reverse_enabled )
|
|
||||||
return (int)( vm_random(&(pool->vm_random_data))*2.0/
|
|
||||||
( VM_RAND_MAX + 1.0 ) );
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void vm_iterate( struct tvm_pool* pool,
|
|
||||||
char* modified ) {
|
|
||||||
struct tvm_process* prev_process;
|
|
||||||
struct tvm_process* curr_process;
|
|
||||||
struct tvm_process* next_process;
|
|
||||||
int processes_num;
|
|
||||||
|
|
||||||
processes_num = 0;
|
|
||||||
prev_process = NULL;
|
|
||||||
curr_process = pool->processes;
|
|
||||||
while( curr_process ) {
|
|
||||||
int op;
|
|
||||||
int arg;
|
|
||||||
int arg_2;
|
|
||||||
int arg_3;
|
|
||||||
|
|
||||||
++curr_process->age;
|
|
||||||
next_process = curr_process->next;
|
|
||||||
op = pool->area[curr_process->position];
|
|
||||||
if( curr_process->reverse )
|
|
||||||
--curr_process->position;
|
|
||||||
else
|
|
||||||
++curr_process->position;
|
|
||||||
curr_process->position = ( curr_process->position + pool->area_size )%
|
|
||||||
pool->area_size;
|
|
||||||
switch( op ) {
|
|
||||||
case VM_OP_WAIT:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case VM_OP_STOP:
|
|
||||||
if( !prev_process )
|
|
||||||
pool->processes = curr_process->next;
|
|
||||||
else
|
|
||||||
prev_process->next = curr_process->next;
|
|
||||||
free( curr_process->stack );
|
|
||||||
free( curr_process );
|
|
||||||
curr_process = prev_process;
|
|
||||||
--processes_num;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case VM_OP_EXEC:
|
|
||||||
if( (arg = pop( pool, curr_process )) == ERROR_VALUE ) {
|
|
||||||
if( !prev_process )
|
|
||||||
pool->processes = curr_process->next;
|
|
||||||
else
|
|
||||||
prev_process->next = curr_process->next;
|
|
||||||
free( curr_process->stack );
|
|
||||||
free( curr_process );
|
|
||||||
curr_process = prev_process;
|
|
||||||
--processes_num;
|
|
||||||
} else {
|
|
||||||
arg = curr_process->position + arg;
|
|
||||||
if( arg < 0 )
|
|
||||||
arg += pool->area_size;
|
|
||||||
if( arg >= pool->area_size )
|
|
||||||
arg -= pool->area_size;
|
|
||||||
vm_exec( pool, arg, curr_process->age, vm_get_reverse(pool) );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case VM_OP_COPY:
|
|
||||||
if( (arg = pop( pool, curr_process )) == ERROR_VALUE ) {
|
|
||||||
if( !prev_process )
|
|
||||||
pool->processes = curr_process->next;
|
|
||||||
else
|
|
||||||
prev_process->next = curr_process->next;
|
|
||||||
free( curr_process->stack );
|
|
||||||
free( curr_process );
|
|
||||||
curr_process = prev_process;
|
|
||||||
--processes_num;
|
|
||||||
} else if( (arg_2 = pop( pool, curr_process )) == ERROR_VALUE ) {
|
|
||||||
if( !prev_process )
|
|
||||||
pool->processes = curr_process->next;
|
|
||||||
else
|
|
||||||
prev_process->next = curr_process->next;
|
|
||||||
free( curr_process->stack );
|
|
||||||
free( curr_process );
|
|
||||||
curr_process = prev_process;
|
|
||||||
--processes_num;
|
|
||||||
} else if( 1 && (arg_3 = pop( pool, curr_process )) == ERROR_VALUE ) {
|
|
||||||
if( !prev_process )
|
|
||||||
pool->processes = curr_process->next;
|
|
||||||
else
|
|
||||||
prev_process->next = curr_process->next;
|
|
||||||
free( curr_process->stack );
|
|
||||||
free( curr_process );
|
|
||||||
curr_process = prev_process;
|
|
||||||
--processes_num;
|
|
||||||
} else {
|
|
||||||
int count;
|
|
||||||
int direction;
|
|
||||||
|
|
||||||
arg = curr_process->position + arg;
|
|
||||||
if( arg < 0 )
|
|
||||||
arg += pool->area_size;
|
|
||||||
if( arg >= pool->area_size )
|
|
||||||
arg -= pool->area_size;
|
|
||||||
arg_2 = curr_process->position + arg_2;
|
|
||||||
if( arg_2 < 0 )
|
|
||||||
arg_2 += pool->area_size;
|
|
||||||
if( arg_2 >= pool->area_size )
|
|
||||||
arg_2 -= pool->area_size;
|
|
||||||
if( curr_process->reverse )
|
|
||||||
direction = -1;
|
|
||||||
else
|
|
||||||
direction = 1;
|
|
||||||
for( count = 0; count < arg_3; ++count ) {
|
|
||||||
int i, j;
|
|
||||||
int offset;
|
|
||||||
|
|
||||||
offset = count*direction + pool->area_size;
|
|
||||||
i = pool->area[( arg_2 + offset )%pool->area_size];
|
|
||||||
j = pool->area[( arg_2 + offset )%pool->area_size] = pool->area[( arg + offset )%pool->area_size];
|
|
||||||
if( modified && i != j )
|
|
||||||
modified[( arg_2 + offset )%pool->area_size] = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default: /* >= VM_OP_PUSH */
|
|
||||||
arg = op - VM_OP_PUSH;
|
|
||||||
if( push(pool, curr_process, arg) == ERROR_VALUE ) {
|
|
||||||
if( !prev_process )
|
|
||||||
pool->processes = curr_process->next;
|
|
||||||
else
|
|
||||||
prev_process->next = curr_process->next;
|
|
||||||
free( curr_process->stack );
|
|
||||||
free( curr_process );
|
|
||||||
curr_process = prev_process;
|
|
||||||
--processes_num;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
prev_process = curr_process;
|
|
||||||
curr_process = next_process;
|
|
||||||
++processes_num;
|
|
||||||
}
|
|
||||||
while( processes_num > pool->max_threads_num ) {
|
|
||||||
int process_num;
|
|
||||||
int curr_process_num;
|
|
||||||
|
|
||||||
process_num = (int)( vm_random(&(pool->vm_random_data))*1.0*processes_num/
|
|
||||||
( VM_RAND_MAX + 1.0 ) );
|
|
||||||
/*
|
|
||||||
process_num = (int)( rand()*1.0*processes_num/
|
|
||||||
( RAND_MAX + 1.0 ) );
|
|
||||||
*/
|
|
||||||
curr_process_num = 0;
|
|
||||||
curr_process = pool->processes;
|
|
||||||
prev_process = NULL;
|
|
||||||
while( curr_process_num != process_num ) {
|
|
||||||
prev_process = curr_process;
|
|
||||||
curr_process = curr_process->next;
|
|
||||||
++curr_process_num;
|
|
||||||
}
|
|
||||||
if( prev_process )
|
|
||||||
prev_process->next = curr_process->next;
|
|
||||||
else
|
|
||||||
pool->processes = curr_process->next;
|
|
||||||
free( curr_process->stack );
|
|
||||||
free( curr_process );
|
|
||||||
--processes_num;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
#ifndef __VM_H__
|
|
||||||
#define __VM_H__
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h> /* !!! */
|
|
||||||
#include <limits.h>
|
|
||||||
#include "vm_random.h"
|
|
||||||
|
|
||||||
#define VM_OP_STOP 1
|
|
||||||
#define VM_OP_COPY 2
|
|
||||||
#define VM_OP_EXEC 3
|
|
||||||
#define VM_OP_WAIT 4
|
|
||||||
#define VM_OP_PUSH (INT_MAX/2)
|
|
||||||
|
|
||||||
struct tvm_process {
|
|
||||||
int position;
|
|
||||||
int* stack;
|
|
||||||
int stack_top;
|
|
||||||
int age;
|
|
||||||
int reverse;
|
|
||||||
struct tvm_process* next;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct tvm_pool {
|
|
||||||
int* area;
|
|
||||||
int area_size;
|
|
||||||
struct tvm_process* processes;
|
|
||||||
int max_stack_size;
|
|
||||||
int max_threads_num;
|
|
||||||
int reverse_enabled;
|
|
||||||
struct vm_random_data vm_random_data;
|
|
||||||
};
|
|
||||||
|
|
||||||
int vm_init_pool( struct tvm_pool** pool,
|
|
||||||
int area_size,
|
|
||||||
int max_stack_size,
|
|
||||||
int max_threads_num );
|
|
||||||
void vm_modify( struct tvm_pool* pool,
|
|
||||||
int position,
|
|
||||||
int op );
|
|
||||||
void vm_exec( struct tvm_pool* pool,
|
|
||||||
int position,
|
|
||||||
int age,
|
|
||||||
int reverse );
|
|
||||||
void vm_enable_reverse( struct tvm_pool* pool,
|
|
||||||
const int enabled );
|
|
||||||
int vm_get_reverse( struct tvm_pool* pool );
|
|
||||||
void vm_iterate( struct tvm_pool* pool,
|
|
||||||
char* modified );
|
|
||||||
void vm_done_pool( struct tvm_pool* pool );
|
|
||||||
|
|
||||||
#endif /* !defined( __VM_H__ ) */
|
|
|
@ -1,191 +0,0 @@
|
||||||
/* Created with The GIMP */
|
|
||||||
#define vm_width 44
|
|
||||||
#define vm_height 374
|
|
||||||
static unsigned char vm_bits[] = {
|
|
||||||
0x6d, 0xdb, 0xf6, 0xff, 0xff, 0x0f, 0xdb, 0xb6, 0x55, 0xdb, 0xb6, 0x0d,
|
|
||||||
0x6d, 0x0b, 0xd0, 0xff, 0x07, 0x06, 0x5b, 0x1d, 0xd0, 0xdb, 0xee, 0x0c,
|
|
||||||
0xf6, 0xf6, 0x77, 0xff, 0xbf, 0x0f, 0x8d, 0x4a, 0xd4, 0xd6, 0xba, 0x0d,
|
|
||||||
0x05, 0x37, 0xe8, 0xd3, 0x4f, 0x0e, 0x27, 0x2c, 0xd1, 0x9a, 0xce, 0x0c,
|
|
||||||
0x62, 0x1a, 0xd3, 0xdd, 0xeb, 0x0c, 0x52, 0x94, 0xa2, 0x39, 0xcf, 0x09,
|
|
||||||
0x73, 0x9a, 0xd2, 0xde, 0xeb, 0x0e, 0xd2, 0x94, 0xd3, 0x39, 0xef, 0x09,
|
|
||||||
0x53, 0x8a, 0x62, 0xdd, 0xa5, 0x0e, 0x62, 0x1c, 0xe3, 0x9a, 0xef, 0x0c,
|
|
||||||
0x03, 0x16, 0xd0, 0xd5, 0x46, 0x0d, 0x0e, 0x75, 0xd8, 0xcb, 0x1f, 0x0d,
|
|
||||||
0xdb, 0xae, 0x6a, 0x77, 0xff, 0x07, 0xd6, 0xaa, 0xed, 0xfe, 0xb6, 0x0e,
|
|
||||||
0x5d, 0x5f, 0xdb, 0xf7, 0xff, 0x0f, 0x75, 0xf5, 0xd6, 0xbe, 0xb5, 0x0d,
|
|
||||||
0xab, 0x95, 0xfa, 0xeb, 0xff, 0x07, 0x7a, 0xb7, 0xab, 0x7f, 0xb7, 0x0e,
|
|
||||||
0xd7, 0x5a, 0xd5, 0xef, 0xfd, 0x0f, 0xad, 0x76, 0x77, 0xdd, 0xb7, 0x0d,
|
|
||||||
0xf5, 0x0d, 0xd0, 0x7f, 0x47, 0x0c, 0x57, 0x1b, 0xd0, 0xf7, 0x5e, 0x0d,
|
|
||||||
0x5a, 0xf5, 0xdb, 0xfe, 0xfb, 0x07, 0x6b, 0x97, 0xda, 0xad, 0xaf, 0x0e,
|
|
||||||
0x85, 0x1a, 0xf4, 0xe5, 0x56, 0x0f, 0x87, 0x36, 0xa8, 0xe9, 0x1f, 0x0d,
|
|
||||||
0x9a, 0xed, 0xec, 0xb7, 0x75, 0x0f, 0x16, 0x9b, 0xa8, 0xe7, 0x6f, 0x0d,
|
|
||||||
0x8d, 0x76, 0xdc, 0xb7, 0x3f, 0x0f, 0x9d, 0xd5, 0xd4, 0xe6, 0x76, 0x0d,
|
|
||||||
0x8b, 0xb6, 0xfc, 0xef, 0x5f, 0x0f, 0x9d, 0xad, 0xa4, 0xad, 0x5d, 0x0d,
|
|
||||||
0x03, 0x34, 0xd0, 0xa5, 0x17, 0x0d, 0x06, 0x14, 0xc0, 0x91, 0x5e, 0x08,
|
|
||||||
0xfd, 0xef, 0x7e, 0xff, 0xfb, 0x0f, 0xab, 0xaa, 0xe5, 0x77, 0xd7, 0x0f,
|
|
||||||
0x6a, 0x5d, 0xdd, 0xdf, 0x7f, 0x0d, 0xde, 0xd5, 0x55, 0xfd, 0xf6, 0x0f,
|
|
||||||
0x55, 0xb7, 0xf6, 0xef, 0xdf, 0x0a, 0xdb, 0xb6, 0xd6, 0x7d, 0xfb, 0x0f,
|
|
||||||
0xb6, 0xea, 0xda, 0xef, 0x6f, 0x07, 0xb6, 0xaf, 0xb6, 0xbd, 0xfd, 0x0e,
|
|
||||||
0x6d, 0x15, 0xd0, 0xef, 0x07, 0x0d, 0x5b, 0x1b, 0xd0, 0xfd, 0xae, 0x0c,
|
|
||||||
0x76, 0xed, 0xdb, 0xef, 0xfb, 0x07, 0x8d, 0x5b, 0x5a, 0x5b, 0x5f, 0x0f,
|
|
||||||
0x05, 0x16, 0xf0, 0xe5, 0x8b, 0x0e, 0x23, 0x14, 0xd1, 0x4c, 0x6f, 0x0c,
|
|
||||||
0x72, 0x9e, 0xd2, 0x9e, 0xb3, 0x0d, 0x56, 0xd4, 0xf2, 0xbd, 0xff, 0x0c,
|
|
||||||
0x1b, 0xbb, 0xd0, 0xc7, 0x36, 0x0d, 0x1b, 0xd6, 0x50, 0xdf, 0x7f, 0x0e,
|
|
||||||
0xc6, 0x35, 0xfe, 0xf1, 0x96, 0x0b, 0x42, 0x16, 0xc2, 0xab, 0xaf, 0x0d,
|
|
||||||
0x01, 0x0a, 0x70, 0x94, 0x45, 0x0e, 0x03, 0x1e, 0xd0, 0xa9, 0x4b, 0x0c,
|
|
||||||
0xfd, 0xd2, 0xeb, 0xfe, 0xff, 0x07, 0xab, 0x5e, 0xdd, 0x6f, 0xdd, 0x0e,
|
|
||||||
0xed, 0xb5, 0xd5, 0xfd, 0xf7, 0x0f, 0x5b, 0xab, 0xb6, 0x6f, 0xbf, 0x0d,
|
|
||||||
0xd6, 0x76, 0xdb, 0xfd, 0xed, 0x07, 0xb5, 0xd6, 0xd6, 0xdb, 0xdf, 0x0e,
|
|
||||||
0xef, 0x5a, 0xdd, 0x7f, 0xfb, 0x0f, 0xaa, 0xb7, 0xd5, 0xee, 0xbf, 0x0d,
|
|
||||||
0x5d, 0x15, 0xf0, 0x7b, 0x03, 0x0c, 0xeb, 0x16, 0x50, 0xff, 0xb7, 0x0d,
|
|
||||||
0x5d, 0xfb, 0xeb, 0x6b, 0xff, 0x0e, 0x55, 0x4b, 0x5c, 0xef, 0xad, 0x0d,
|
|
||||||
0x03, 0x1d, 0xf0, 0xd1, 0x4f, 0x0e, 0x22, 0x14, 0xd1, 0x9d, 0xd6, 0x0c,
|
|
||||||
0x57, 0x6e, 0xd3, 0xb6, 0xef, 0x0c, 0x3a, 0xda, 0xd0, 0x97, 0xbd, 0x0d,
|
|
||||||
0x07, 0x55, 0xe8, 0xeb, 0x2f, 0x06, 0x2d, 0x5e, 0x51, 0x97, 0xfd, 0x0c,
|
|
||||||
0x5d, 0xb4, 0xe2, 0x5f, 0xb7, 0x0d, 0x75, 0xea, 0xa3, 0x5d, 0xff, 0x09,
|
|
||||||
0x03, 0x1a, 0xd0, 0xd6, 0x25, 0x0e, 0x02, 0x16, 0xf0, 0x88, 0xa7, 0x0c,
|
|
||||||
0xef, 0xb5, 0xce, 0xf7, 0xdf, 0x0f, 0xad, 0xd6, 0xda, 0x7f, 0xbd, 0x0d,
|
|
||||||
0xb5, 0xad, 0x6d, 0xef, 0xf7, 0x07, 0xb7, 0x6d, 0xeb, 0xdd, 0xdf, 0x0e,
|
|
||||||
0xda, 0x5a, 0xdd, 0x7f, 0xfd, 0x0f, 0x56, 0xb7, 0xd5, 0xf6, 0xaf, 0x0d,
|
|
||||||
0xfb, 0x6a, 0xdb, 0xdf, 0xfd, 0x0e, 0x56, 0xdb, 0xda, 0xfd, 0xed, 0x0d,
|
|
||||||
0xb5, 0x0d, 0xd0, 0xb7, 0x07, 0x06, 0x6d, 0x1b, 0xd0, 0xfe, 0xdf, 0x0c,
|
|
||||||
0xdb, 0xf6, 0xdb, 0xb7, 0xf6, 0x0f, 0xb6, 0x95, 0xda, 0xfe, 0xbf, 0x0d,
|
|
||||||
0x0d, 0x7b, 0xe8, 0xc7, 0x36, 0x0f, 0x1b, 0xd6, 0xd8, 0xd6, 0x3f, 0x0c,
|
|
||||||
0x06, 0x2b, 0xe8, 0xd3, 0x56, 0x0f, 0x25, 0x3a, 0xa8, 0xcb, 0x5f, 0x0d,
|
|
||||||
0x23, 0x17, 0xe9, 0x6c, 0x4d, 0x0e, 0x23, 0x1a, 0xd9, 0xcd, 0x6b, 0x0d,
|
|
||||||
0x02, 0x0b, 0xd0, 0xd4, 0x27, 0x0d, 0x02, 0x1a, 0xd0, 0x92, 0x26, 0x0d,
|
|
||||||
0x2f, 0x76, 0xf0, 0xe7, 0x5f, 0x0e, 0x0a, 0x6a, 0xd0, 0x8e, 0x5d, 0x0c,
|
|
||||||
0xfd, 0xad, 0xd7, 0xfb, 0xff, 0x07, 0x95, 0xb5, 0xb6, 0xff, 0xb5, 0x0f,
|
|
||||||
0x7b, 0xd7, 0xda, 0xad, 0xff, 0x0e, 0x56, 0xbd, 0xb6, 0xff, 0xdb, 0x0d,
|
|
||||||
0x75, 0xeb, 0xea, 0x5d, 0xff, 0x07, 0xd7, 0xaa, 0xae, 0xfb, 0xb6, 0x0e,
|
|
||||||
0x5a, 0xd7, 0xf5, 0xff, 0xff, 0x0f, 0x76, 0x5d, 0xad, 0x6d, 0xab, 0x0d,
|
|
||||||
0xad, 0x15, 0xd0, 0xff, 0x17, 0x0c, 0x6d, 0x17, 0x70, 0xdb, 0xd6, 0x0d,
|
|
||||||
0xdb, 0xfa, 0xeb, 0xff, 0x7f, 0x07, 0xda, 0x96, 0xd6, 0xb6, 0xed, 0x0f,
|
|
||||||
0x03, 0x2a, 0xd0, 0xc9, 0x17, 0x0c, 0x05, 0x1a, 0xd0, 0xa9, 0x4e, 0x0d,
|
|
||||||
0xf3, 0x97, 0x6f, 0xfd, 0xeb, 0x0f, 0x02, 0x1a, 0xe8, 0xc5, 0x0f, 0x0d,
|
|
||||||
0x03, 0x16, 0xd0, 0xaa, 0xad, 0x0c, 0x76, 0xb4, 0xd3, 0x9d, 0xff, 0x09,
|
|
||||||
0x5b, 0x6e, 0xe1, 0xbf, 0x6a, 0x0d, 0x76, 0x58, 0x47, 0xb7, 0xff, 0x0d,
|
|
||||||
0x01, 0x86, 0xf0, 0xcc, 0x26, 0x0c, 0x03, 0x1d, 0xd0, 0xc9, 0x4d, 0x0d,
|
|
||||||
0xdd, 0x56, 0xed, 0xf7, 0xf7, 0x0f, 0xb5, 0x6d, 0xad, 0x7e, 0xbf, 0x0d,
|
|
||||||
0xd7, 0xda, 0xda, 0xf7, 0xed, 0x07, 0xbd, 0xab, 0xdb, 0xaf, 0xbf, 0x0e,
|
|
||||||
0x55, 0x5d, 0x75, 0xff, 0xed, 0x0f, 0xed, 0x75, 0xd7, 0xba, 0xff, 0x0d,
|
|
||||||
0x5b, 0xab, 0xda, 0xff, 0x5a, 0x0f, 0xb6, 0x6e, 0xdb, 0xed, 0xff, 0x0d,
|
|
||||||
0x6d, 0x1b, 0x70, 0xbf, 0x05, 0x06, 0x6b, 0x15, 0xd0, 0xf7, 0xaf, 0x0c,
|
|
||||||
0xae, 0xdb, 0xeb, 0xbe, 0xfb, 0x0f, 0x5a, 0xb6, 0xda, 0x6f, 0x7f, 0x0d,
|
|
||||||
0x05, 0x2a, 0xd0, 0xd2, 0x15, 0x0d, 0x47, 0x3e, 0xd0, 0xab, 0xaf, 0x0d,
|
|
||||||
0xb1, 0x85, 0xef, 0xfc, 0xeb, 0x0e, 0x83, 0x1d, 0xd8, 0x65, 0x97, 0x0d,
|
|
||||||
0x01, 0x0b, 0x68, 0xd4, 0x23, 0x0e, 0x23, 0x0a, 0xd1, 0x99, 0xe7, 0x0c,
|
|
||||||
0x38, 0x8e, 0x71, 0xde, 0xf6, 0x06, 0x63, 0x1a, 0xe3, 0x9c, 0xc7, 0x0c,
|
|
||||||
0x21, 0x16, 0xe8, 0xea, 0xad, 0x0e, 0x07, 0x35, 0xd8, 0xa3, 0x1f, 0x0d,
|
|
||||||
0xad, 0xd7, 0xea, 0xfe, 0xfa, 0x0f, 0xb5, 0xb6, 0xd6, 0xef, 0xb7, 0x0d,
|
|
||||||
0xdb, 0xda, 0x6d, 0x7b, 0xff, 0x07, 0xb6, 0xab, 0xda, 0xef, 0xad, 0x0e,
|
|
||||||
0x6d, 0xdd, 0x76, 0xff, 0xff, 0x0f, 0xab, 0xd5, 0xea, 0xb6, 0xb5, 0x0d,
|
|
||||||
0xdd, 0xae, 0xed, 0xff, 0xff, 0x07, 0xdb, 0xba, 0x55, 0xdb, 0xb6, 0x0e,
|
|
||||||
0xb6, 0x15, 0xd0, 0xff, 0x47, 0x0c, 0x6d, 0x17, 0x70, 0xdb, 0xae, 0x0d,
|
|
||||||
0xd5, 0xfa, 0xd7, 0xff, 0xff, 0x0e, 0xbd, 0x26, 0x6d, 0xdb, 0xda, 0x0d,
|
|
||||||
0x03, 0x1c, 0xe0, 0xa1, 0x27, 0x0a, 0x02, 0x2a, 0x50, 0x97, 0xcf, 0x0c,
|
|
||||||
0x77, 0x9a, 0xf3, 0x5d, 0xef, 0x0e, 0x6a, 0xb6, 0xa2, 0xbf, 0xdd, 0x0c,
|
|
||||||
0x17, 0x6a, 0xf1, 0xca, 0x7f, 0x0d, 0x7d, 0xae, 0xd1, 0x5f, 0xeb, 0x0e,
|
|
||||||
0x15, 0x5b, 0xe9, 0xef, 0x3f, 0x06, 0x37, 0x75, 0x59, 0x4d, 0xfb, 0x0e,
|
|
||||||
0x9a, 0xd6, 0xd4, 0xf7, 0x2f, 0x0f, 0x96, 0xad, 0xd8, 0xe7, 0x7d, 0x0d,
|
|
||||||
0x6d, 0xdb, 0x76, 0xbf, 0xff, 0x07, 0xdb, 0xb6, 0xd6, 0xfd, 0xd5, 0x0e,
|
|
||||||
0xb6, 0xd5, 0xed, 0xb7, 0xff, 0x0f, 0xad, 0xb6, 0xda, 0xfe, 0xae, 0x0d,
|
|
||||||
0x75, 0xdb, 0xd6, 0xdb, 0xfb, 0x07, 0x6f, 0xab, 0xb5, 0xff, 0xbf, 0x0e,
|
|
||||||
0xaa, 0x5d, 0xdb, 0xad, 0xf5, 0x0f, 0xba, 0xd5, 0xd6, 0xff, 0xbf, 0x0d,
|
|
||||||
0xd7, 0x0e, 0x70, 0xbb, 0x43, 0x0c, 0xb5, 0x1a, 0xd0, 0x77, 0x57, 0x0d,
|
|
||||||
0xef, 0xed, 0xeb, 0xfe, 0xff, 0x07, 0x0a, 0x5b, 0xdc, 0xd7, 0xad, 0x0e,
|
|
||||||
0x05, 0x15, 0xd0, 0x68, 0x8f, 0x0e, 0x23, 0x1e, 0xd1, 0x95, 0xad, 0x0c,
|
|
||||||
0x79, 0x94, 0xf2, 0xde, 0xf7, 0x0c, 0x43, 0x96, 0xd2, 0x59, 0xc7, 0x0d,
|
|
||||||
0x05, 0x2d, 0xd0, 0xca, 0x1d, 0x06, 0x05, 0x2a, 0xd8, 0xd3, 0x57, 0x0e,
|
|
||||||
0x73, 0x8e, 0xd3, 0x9c, 0xe7, 0x0c, 0x52, 0x9a, 0xd2, 0xbd, 0xee, 0x0d,
|
|
||||||
0x21, 0x16, 0x70, 0x95, 0xa3, 0x0c, 0x07, 0x2d, 0xd0, 0xd3, 0x1f, 0x0d,
|
|
||||||
0x55, 0xdb, 0x76, 0xef, 0xf7, 0x0f, 0xdd, 0x56, 0xd5, 0xbd, 0xbe, 0x0d,
|
|
||||||
0x6b, 0xdd, 0x76, 0xff, 0xeb, 0x07, 0xad, 0xd5, 0xd6, 0xdb, 0xbf, 0x0e,
|
|
||||||
0x7b, 0xbb, 0xed, 0x7e, 0xef, 0x0f, 0x56, 0xab, 0xda, 0xf7, 0xfd, 0x0d,
|
|
||||||
0x75, 0x6d, 0xeb, 0xde, 0x57, 0x0f, 0xd7, 0xdb, 0xda, 0xfd, 0xfe, 0x0d,
|
|
||||||
0x5a, 0x15, 0xe0, 0xb7, 0x07, 0x06, 0x76, 0x17, 0x50, 0xff, 0xb7, 0x0c,
|
|
||||||
0xad, 0xfa, 0xef, 0x6d, 0xfd, 0x0f, 0xcb, 0x27, 0xda, 0xfb, 0xaf, 0x0d,
|
|
||||||
0x05, 0x1a, 0xe8, 0xa4, 0x0b, 0x0f, 0x22, 0x96, 0xd0, 0x55, 0x77, 0x0c,
|
|
||||||
0x19, 0x8d, 0x69, 0xee, 0x73, 0x07, 0x71, 0x14, 0xe1, 0x9c, 0xe7, 0x0c,
|
|
||||||
0x03, 0x8e, 0xf0, 0xc6, 0x16, 0x0e, 0x05, 0x1a, 0xc0, 0x95, 0xaf, 0x0c,
|
|
||||||
0x2b, 0x6d, 0x79, 0xdb, 0xdd, 0x06, 0x3d, 0x5b, 0xd1, 0xdf, 0x7b, 0x0e,
|
|
||||||
0x01, 0x15, 0xd8, 0x62, 0x97, 0x0e, 0x43, 0x17, 0xda, 0xea, 0x97, 0x0d,
|
|
||||||
0xb5, 0xad, 0xf5, 0x7e, 0xeb, 0x0f, 0xad, 0xba, 0xd6, 0xed, 0xbf, 0x0d,
|
|
||||||
0x7b, 0x6b, 0xed, 0xbf, 0xff, 0x07, 0xd6, 0xd6, 0x55, 0x7b, 0xb5, 0x0e,
|
|
||||||
0xb5, 0xad, 0xee, 0xff, 0xff, 0x0f, 0x6d, 0xdb, 0x5a, 0xeb, 0xb6, 0x0d,
|
|
||||||
0xdb, 0xb6, 0xf5, 0xbf, 0xff, 0x07, 0xb6, 0xad, 0x56, 0xfb, 0xb5, 0x0e,
|
|
||||||
0x55, 0xdb, 0xed, 0xef, 0xff, 0x0f, 0xee, 0x16, 0xd0, 0xbe, 0x06, 0x0c,
|
|
||||||
0xb5, 0x1a, 0xf0, 0xf7, 0x57, 0x0d, 0xd7, 0xd6, 0xcf, 0xfe, 0xfe, 0x0f,
|
|
||||||
0xaa, 0x2d, 0xf8, 0xd5, 0xab, 0x0a, 0x03, 0x1b, 0xa0, 0xa5, 0x17, 0x0f,
|
|
||||||
0x06, 0x35, 0xd8, 0xd5, 0xaf, 0x06, 0x0d, 0x6e, 0xd0, 0xab, 0x3d, 0x0e,
|
|
||||||
0x25, 0x2a, 0x79, 0xdb, 0xd7, 0x0c, 0x67, 0x3a, 0xd3, 0x99, 0xce, 0x0d,
|
|
||||||
0x02, 0x14, 0xe0, 0xa2, 0x17, 0x04, 0x03, 0x14, 0xc0, 0x2d, 0x57, 0x09,
|
|
||||||
0x70, 0x08, 0x43, 0x5a, 0xea, 0x0a, 0x41, 0x08, 0xc2, 0x98, 0xc2, 0x01,
|
|
||||||
0xf7, 0x7b, 0xdb, 0xff, 0x7f, 0x0f, 0xad, 0x56, 0xdb, 0xf7, 0xef, 0x0f,
|
|
||||||
0xb5, 0x75, 0x75, 0x5f, 0xbd, 0x0e, 0xb7, 0x56, 0xd7, 0xfd, 0xf7, 0x0d,
|
|
||||||
0xea, 0xed, 0xda, 0xf7, 0xbe, 0x07, 0x5e, 0xab, 0xd6, 0xde, 0x77, 0x0f,
|
|
||||||
0xd5, 0x6e, 0xdd, 0xff, 0xfe, 0x0d, 0xb5, 0xda, 0xb5, 0xdb, 0xb7, 0x0f,
|
|
||||||
0xef, 0x56, 0xeb, 0x7e, 0xfb, 0x06, 0xd5, 0x1a, 0xd0, 0xf7, 0x07, 0x0c,
|
|
||||||
0xad, 0x0b, 0xd0, 0xde, 0xee, 0x0e, 0x7b, 0xfb, 0xf7, 0xfd, 0xdd, 0x0d,
|
|
||||||
0x05, 0x0d, 0xa8, 0xeb, 0xb7, 0x0e, 0x03, 0x1a, 0x60, 0x09, 0x87, 0x08,
|
|
||||||
0xa2, 0x14, 0xe5, 0xb5, 0x6f, 0x0d, 0xa7, 0x3c, 0xa5, 0x3b, 0xcd, 0x09,
|
|
||||||
0x46, 0x14, 0xe2, 0xac, 0x6f, 0x0d, 0x05, 0x34, 0xc0, 0x91, 0x4e, 0x08,
|
|
||||||
0xa5, 0x18, 0xc2, 0x6d, 0xab, 0x0b, 0xa7, 0x31, 0xce, 0x79, 0xce, 0x03,
|
|
||||||
0x02, 0x0c, 0xc0, 0x4a, 0x17, 0x0a, 0x02, 0x18, 0xc0, 0x49, 0x57, 0x0a,
|
|
||||||
0xfb, 0xf7, 0x7f, 0xff, 0xfd, 0x0f, 0x56, 0xad, 0xd4, 0xbf, 0xb7, 0x0d,
|
|
||||||
0xad, 0x55, 0xeb, 0xfa, 0xfd, 0x0f, 0x7b, 0x77, 0xdd, 0xdf, 0x6f, 0x0d,
|
|
||||||
0x55, 0xad, 0xeb, 0x76, 0xfb, 0x07, 0x6e, 0x6b, 0xd5, 0xff, 0x6f, 0x0f,
|
|
||||||
0xb5, 0xfd, 0xff, 0xb6, 0xff, 0x0f, 0xb6, 0xfd, 0xff, 0x7f, 0xff, 0x0f,
|
|
||||||
0x6d, 0xfb, 0x7f, 0xfb, 0xff, 0x0f, 0xdb, 0xfe, 0xff, 0x6f, 0xff, 0x0f,
|
|
||||||
0xb6, 0xfd, 0x7f, 0xfb, 0xff, 0x0f, 0x55, 0xfb, 0xff, 0x7f, 0xff, 0x0f,
|
|
||||||
0x07, 0x7e, 0x70, 0xa3, 0x1f, 0x0e, 0x05, 0x18, 0xe0, 0x25, 0x07, 0x08,
|
|
||||||
0x71, 0x9c, 0x63, 0x9c, 0xe7, 0x08, 0xd1, 0x8c, 0xe7, 0x3d, 0xe3, 0x09,
|
|
||||||
0x69, 0xcb, 0x7f, 0xfe, 0xf3, 0x0f, 0xd9, 0xce, 0xff, 0xec, 0xf3, 0x0f,
|
|
||||||
0xa9, 0xcd, 0x7f, 0xbf, 0xf3, 0x0f, 0x71, 0x8d, 0x6f, 0x7a, 0xe3, 0x0f,
|
|
||||||
0x01, 0x1c, 0xe0, 0x94, 0x47, 0x09, 0x07, 0x38, 0xe0, 0x23, 0x0f, 0x0c,
|
|
||||||
0xad, 0xff, 0xfc, 0xfd, 0x7f, 0x0f, 0x6d, 0xfd, 0xbf, 0xdf, 0xff, 0x0f,
|
|
||||||
0xb5, 0xfd, 0xff, 0x7d, 0xff, 0x0f, 0x6f, 0xfb, 0xff, 0xeb, 0xff, 0x0f,
|
|
||||||
0xda, 0xfe, 0x7f, 0x7f, 0xff, 0x0f, 0xab, 0xfd, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0x83, 0x1f, 0xfc, 0xe4, 0x57, 0x0f, 0x01, 0x0e, 0xf0, 0x80, 0x07, 0x0c,
|
|
||||||
0x03, 0x1c, 0xe0, 0x08, 0x47, 0x08, 0xe7, 0x1c, 0xe7, 0x3d, 0xef, 0x09,
|
|
||||||
0xe3, 0x9c, 0xe7, 0x38, 0xc7, 0x09, 0x03, 0x1e, 0xe0, 0x81, 0x0f, 0x0c,
|
|
||||||
0x03, 0x1f, 0xf8, 0xc1, 0x0f, 0x0e, 0xe3, 0x1f, 0xff, 0xfd, 0xef, 0x0f,
|
|
||||||
0x83, 0x1f, 0xfc, 0xe0, 0x07, 0x0f, 0x83, 0x1f, 0xfc, 0xe0, 0x07, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0x0f, 0x3f, 0xf8, 0xe3, 0x1f, 0x0f, 0x03, 0x1e, 0xf0, 0x81, 0x07, 0x0c,
|
|
||||||
0x73, 0x9e, 0xf3, 0x9c, 0xe7, 0x0c, 0x73, 0x9e, 0xf3, 0xbc, 0xe7, 0x0d,
|
|
||||||
0xc3, 0x1f, 0xfc, 0xf8, 0x87, 0x0f, 0x07, 0x3e, 0xf0, 0x81, 0x0f, 0x0c,
|
|
||||||
0x3f, 0xfe, 0xf1, 0x9f, 0x7f, 0x0c, 0x7b, 0x9c, 0xe3, 0xbe, 0xf7, 0x0d,
|
|
||||||
0x21, 0x0e, 0xf0, 0x88, 0x43, 0x0c, 0x03, 0x1e, 0xf0, 0xc0, 0x07, 0x0c,
|
|
||||||
0xdf, 0xff, 0xfc, 0xff, 0x7f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xb5, 0xfa, 0xff, 0xff, 0xff, 0x0f, 0x6e, 0xff, 0x7f, 0x55, 0xff, 0x0f,
|
|
||||||
0xd5, 0xfa, 0xff, 0xff, 0xff, 0x0f, 0xbb, 0xfe, 0xbf, 0x7b, 0xff, 0x0f,
|
|
||||||
0xd6, 0xfd, 0xff, 0xef, 0xff, 0x0f, 0xb5, 0xfa, 0x7f, 0x7d, 0xff, 0x0f,
|
|
||||||
0x55, 0x8e, 0xf3, 0xd7, 0xf7, 0x0e, 0x41, 0x0c, 0x61, 0x18, 0xc3, 0x08,
|
|
||||||
0x21, 0x1c, 0xf3, 0x9e, 0xc7, 0x0c, 0x27, 0x3a, 0xf0, 0x51, 0x0f, 0x0e,
|
|
||||||
0x8a, 0x7b, 0xb8, 0xe3, 0x1f, 0x0f, 0x0b, 0x7e, 0x7c, 0xaf, 0x1f, 0x0f,
|
|
||||||
0x06, 0x3b, 0xf8, 0xe1, 0x0e, 0x0e, 0x22, 0x1e, 0xf1, 0x9d, 0x4f, 0x0c,
|
|
||||||
0x21, 0x08, 0xa1, 0xa8, 0xc2, 0x08, 0x21, 0x08, 0x61, 0x1a, 0x43, 0x08,
|
|
||||||
0xdd, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x5b, 0xfd, 0xff, 0xeb, 0xff, 0x0f,
|
|
||||||
0x6a, 0xfb, 0xbf, 0xbf, 0xff, 0x0f, 0xdd, 0xfe, 0x7f, 0x7d, 0xff, 0x0f,
|
|
||||||
0xab, 0xfd, 0xff, 0xf7, 0xff, 0x0f, 0xba, 0xfa, 0xff, 0xbf, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x01, 0x0c, 0x60, 0x80, 0x03, 0x0c,
|
|
||||||
0x01, 0x0e, 0x70, 0x80, 0x03, 0x0c, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
|
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f };
|
|
|
@ -1,493 +0,0 @@
|
||||||
/* XPM */
|
|
||||||
static const char *vm[] = {
|
|
||||||
/* columns rows colors chars-per-pixel */
|
|
||||||
"44 374 113 2",
|
|
||||||
" c #005e00",
|
|
||||||
". c #003c63",
|
|
||||||
"X c #003b00",
|
|
||||||
"o c #00263e",
|
|
||||||
"O c #00b3ed",
|
|
||||||
"+ c #00c3ff",
|
|
||||||
"@ c #007095",
|
|
||||||
"# c #007ba0",
|
|
||||||
"$ c #0086b9",
|
|
||||||
"% c #0095cb",
|
|
||||||
"& c #005474",
|
|
||||||
"* c #005e80",
|
|
||||||
"= c #006d00",
|
|
||||||
"- c #008d00",
|
|
||||||
"; c #004a74",
|
|
||||||
": c #006997",
|
|
||||||
"> c #004500",
|
|
||||||
", c #005900",
|
|
||||||
"< c #002f49",
|
|
||||||
"1 c #00425f",
|
|
||||||
"2 c #00ec00",
|
|
||||||
"3 c #00dc00",
|
|
||||||
"4 c #009400",
|
|
||||||
"5 c #008a00",
|
|
||||||
"6 c #009c00",
|
|
||||||
"7 c #00cc00",
|
|
||||||
"8 c #0077a8",
|
|
||||||
"9 c #00a5dc",
|
|
||||||
"0 c #006200",
|
|
||||||
"q c #008000",
|
|
||||||
"w c #004b6a",
|
|
||||||
"e c #00688a",
|
|
||||||
"r c #00bc00",
|
|
||||||
"t c #007600",
|
|
||||||
"y c #007d00",
|
|
||||||
"u c #005985",
|
|
||||||
"i c #004f00",
|
|
||||||
"p c #003854",
|
|
||||||
"a c #00ac00",
|
|
||||||
"s c #006c00",
|
|
||||||
"d c #5d5e00",
|
|
||||||
"f c Gray0",
|
|
||||||
"g c #3b3b00",
|
|
||||||
"h c #6f7000",
|
|
||||||
"j c #b7b700",
|
|
||||||
"k c #c9c900",
|
|
||||||
"l c #a5a600",
|
|
||||||
"z c #939400",
|
|
||||||
"x c Gray11",
|
|
||||||
"c c #8d8d8d",
|
|
||||||
"v c #aaaaaa",
|
|
||||||
"b c #717171",
|
|
||||||
"n c #555555",
|
|
||||||
"m c #464600",
|
|
||||||
"M c #737300",
|
|
||||||
"N c #7e7e00",
|
|
||||||
"B c #686800",
|
|
||||||
"V c #5c5d00",
|
|
||||||
"C c Gray7",
|
|
||||||
"Z c Gray35",
|
|
||||||
"A c Gray42",
|
|
||||||
"S c Gray28",
|
|
||||||
"D c Gray21",
|
|
||||||
"F c Yellow",
|
|
||||||
"G c Gray100",
|
|
||||||
"H c #a0a000",
|
|
||||||
"J c #a0a0a0",
|
|
||||||
"K c #eded00",
|
|
||||||
"L c #818200",
|
|
||||||
"P c #e2e2e2",
|
|
||||||
"I c Gray22",
|
|
||||||
"U c #959500",
|
|
||||||
"Y c #515200",
|
|
||||||
"T c #8e8e8e",
|
|
||||||
"R c #232323",
|
|
||||||
"E c #dbdb00",
|
|
||||||
"W c #c6c6c6",
|
|
||||||
"Q c #8a8a00",
|
|
||||||
"! c #7c7c7c",
|
|
||||||
"~ c #2a2a2a",
|
|
||||||
"^ c #6a6a6a",
|
|
||||||
"/ c #808080",
|
|
||||||
"( c Gray25",
|
|
||||||
") c #1b1b1b",
|
|
||||||
"_ c #434343",
|
|
||||||
"` c #515151",
|
|
||||||
"' c #282828",
|
|
||||||
"] c #c0c0c0",
|
|
||||||
"[ c #797979",
|
|
||||||
"{ c #151515",
|
|
||||||
"} c Gray5",
|
|
||||||
"| c #959595",
|
|
||||||
" . c Gray37",
|
|
||||||
".. c #610000",
|
|
||||||
"X. c #3d0000",
|
|
||||||
"o. c #840000",
|
|
||||||
"O. c #960000",
|
|
||||||
"+. c #730000",
|
|
||||||
"@. c #530000",
|
|
||||||
"#. c #5e0000",
|
|
||||||
"$. c #480000",
|
|
||||||
"%. c #dc0000",
|
|
||||||
"&. c Red",
|
|
||||||
"*. c #ca0000",
|
|
||||||
"=. c #8a0000",
|
|
||||||
"-. c #a00000",
|
|
||||||
";. c #7f0000",
|
|
||||||
":. c #a70000",
|
|
||||||
">. c #ed0000",
|
|
||||||
",. c #690000",
|
|
||||||
"<. c #950000",
|
|
||||||
"1. c #b80000",
|
|
||||||
"2. c #740000",
|
|
||||||
/* pixels */
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . O + + + + + + . . X X X X X X X X X X X o o @ # # # # # # o o ",
|
|
||||||
" . . $ % % % % % % . . X X X X X X X X X X X o o & * * * * * * o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" = - - . . . . ; : : . . . . X X X X > , , X X X X o o o o < 1 1 o o o o ",
|
|
||||||
" - 2 2 2 3 = . . . : + + + O ; . . X X X , 4 4 4 5 > X X o o o 1 # # # @ < o o ",
|
|
||||||
" = 2 3 - 6 2 7 . . ; + O : 8 + 9 . . X X > 4 5 , 0 4 q X X o o < # @ 1 w # e o o ",
|
|
||||||
" 6 2 - r 2 = . . 8 + : . . % + ; . X X 0 4 , X X t 4 > X o o w # 1 o o * # < o ",
|
|
||||||
" r 2 - 2 - . . % + . . . : + : . X X t 4 X X X , 4 , X o o * # o o o 1 # 1 o ",
|
|
||||||
" r 2 - 2 - . . % + . . . : + : . X X t 4 X X X , 4 , X o o * # o o o 1 # 1 o ",
|
|
||||||
" r 2 - 2 - . . % + . . . : + : . X X t 4 X X X , 4 , X o o * # o o o 1 # 1 o ",
|
|
||||||
" r 2 - 2 - . . % + . . . : + : . X X t 4 X X X , 4 , X o o * # o o o 1 # 1 o ",
|
|
||||||
" 6 2 - r 2 = . . 8 + : . . % + ; . X X 0 4 , X X t 4 > X o o w # 1 o o * # < o ",
|
|
||||||
" = 2 3 - 6 2 7 . . ; + O : 8 + 9 . . X X > 4 5 , 0 4 q X X o o < # @ 1 w # e o o ",
|
|
||||||
" - 2 2 2 3 = . . . : + + + O ; . . X X X , 4 4 4 5 > X X o o o 1 # # # @ < o o ",
|
|
||||||
" = - - . . . . ; : : . . . . X X X X > , , X X X X o o o o < 1 1 o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . O + + + + + + . . X X X X X X X X X X X o o @ # # # # # # o o ",
|
|
||||||
" . . $ % % % % % % . . X X X X X X X X X X X o o & * * * * * * o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" y . . . . . . u . . . . X X X X X X i X X X X o o o o o o p o o o o ",
|
|
||||||
" = a r 2 2 . . ; $ % + + . . . . X X > s t 4 4 X X X X o o < & * # # o o o o ",
|
|
||||||
" y 2 3 3 2 . . u + O O + . . . . X X i 4 5 5 4 X X X X o o p # @ @ # o o o o ",
|
|
||||||
" r 2 . . . . . % + . . . . X X X X X t 4 X X X X o o o o o * # o o o o ",
|
|
||||||
" r 2 . . . . . % + . . . . X X X X X t 4 X X X X o o o o o * # o o o o ",
|
|
||||||
" r 2 . . . . . % + . . . . X X X X X t 4 X X X X o o o o o * # o o o o ",
|
|
||||||
" r 2 . . . . . % + . . . . X X X X X t 4 X X X X o o o o o * # o o o o ",
|
|
||||||
" r 2 . . . . . % + . . . . X X X X X t 4 X X X X o o o o o * # o o o o ",
|
|
||||||
" r 2 . . . . . % + . . . . X X X X X t 4 X X X X o o o o o * # o o o o ",
|
|
||||||
" = r r 3 2 r r - . . ; % % O + % % : . X X > t t 5 4 t t , X o o < * * @ # * * 1 o ",
|
|
||||||
" y 2 2 2 2 2 2 a . . u + + + + + + $ . X X i 4 4 4 4 4 4 s X o o p # # # # # # & o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . O + + + + + + . . X X X X X X X X X X X o o @ # # # # # # o o ",
|
|
||||||
" . . $ % % % % % % . . X X X X X X X X X X X o o & * * * * * * o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" y - y . . . . u : u . . . . X X X X i , i X X X X o o o o p 1 p o o o o ",
|
|
||||||
" = 7 2 2 2 7 = . . ; 9 + + + 9 ; . . X X > q 4 4 4 q > X X o o < e # # # e < o o ",
|
|
||||||
" 7 2 a - a 2 7 . . 9 + $ : $ + 9 . . X X q 4 s , s 4 q X X o o e # & 1 & # e o o ",
|
|
||||||
" 3 a r 2 . . O $ . . . % + . . X X 5 s X X X t 4 X X o o @ & o o o * # o o ",
|
|
||||||
" = 3 3 . . . . . . ; O O . . X X X X X X > 5 5 X X o o o o o o < @ @ o o ",
|
|
||||||
" = 3 2 - . . . . . ; O + : . . X X X X X > 5 4 , X X o o o o o < @ # 1 o o ",
|
|
||||||
" = 3 2 a . . . . ; O + $ . . . X X X X > 5 4 s X X X o o o o < @ # & o o o ",
|
|
||||||
" - 3 2 - . . . : O + : . . . . X X X , 5 4 , X X X X o o o 1 @ # 1 o o o o ",
|
|
||||||
" - 2 3 y - a . . : + O u . : $ . . X X , 4 5 i X , s X X o o 1 # @ p o 1 & o o ",
|
|
||||||
" - 2 2 7 r r 3 2 . : + + 9 % % O + . . X , 4 4 q t t 5 4 X X o 1 # # e * * @ # o o ",
|
|
||||||
" - 2 2 2 2 2 2 2 . : + + + + + + + . . X , 4 4 4 4 4 4 4 X X o 1 # # # # # # # o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . O + + + + + + . . X X X X X X X X X X X o o @ # # # # # # o o ",
|
|
||||||
" . . $ % % % % % % . . X X X X X X X X X X X o o & * * * * * * o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" y - - . . . . u : : . . . . X X X X i , , X X X X o o o o p 1 1 o o o o ",
|
|
||||||
" = 3 2 2 2 3 = . . ; O + + + O ; . . X X > 5 4 4 4 5 > X X o o < @ # # # @ < o o ",
|
|
||||||
" r 2 6 - 6 2 7 . . % + 8 : 8 + 9 . . X X t 4 0 , 0 4 q X X o o * # w 1 w # e o o ",
|
|
||||||
" = y r 2 . . ; u . . . % + . . X X > i X X X t 4 X X o o < p o o o * # o o ",
|
|
||||||
" = - 6 2 7 . . . . ; : 8 + 9 . . X X X X > , 0 4 q X X o o o o < 1 w # e o o ",
|
|
||||||
" r 2 2 2 = . . . . % + + + ; . . X X X X t 4 4 4 > X X o o o o * # # # < o o ",
|
|
||||||
" = - a 2 r . . . . ; : $ + % . . X X X X > , s 4 t X X o o o o < 1 & # * o o ",
|
|
||||||
" 6 2 y . . . . . . . 8 + u . X X X X X X X 0 4 i X o o o o o o o w # p o ",
|
|
||||||
" 6 2 - . . . . . . . 8 + : . X X X X X X X 0 4 , X o o o o o o o w # 1 o ",
|
|
||||||
" a 6 - - a 2 2 = . . $ 8 : : $ + + ; . X X s 0 , , s 4 4 > X o o & w 1 1 & # # < o ",
|
|
||||||
" 7 2 2 2 2 3 - . . 9 + + + + O : . . X X q 4 4 4 4 5 , X X o o e # # # # @ 1 o o ",
|
|
||||||
" y - - y . . . u : : u . . . . X X X i , , i X X X X o o o p 1 1 p o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . O + + + + + + . . X X X X X X X X X X X o o @ # # # # # # o o ",
|
|
||||||
" . . $ % % % % % % . . X X X X X X X X X X X o o & * * * * * * o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" 7 2 r . . . . . 9 + % . . . X X X X X q 4 t X X X o o o o o e # * o o o ",
|
|
||||||
" - 2 2 r . . . . : + + % . . . X X X X , 4 4 t X X X o o o o 1 # # * o o o ",
|
|
||||||
" 3 3 2 r . . . . O O + % . . . X X X X 5 5 4 t X X X o o o o @ @ # * o o o ",
|
|
||||||
" a 2 - 2 r . . . $ + : + % . . . X X X s 4 , 4 t X X X o o o & # 1 # * o o o ",
|
|
||||||
" = 2 7 2 r . . ; + 9 . + % . . . X X > 4 q X 4 t X X X o o < # e o # * o o o ",
|
|
||||||
" 7 2 y 2 r . . 9 + u . + % . . . X X q 4 i X 4 t X X X o o e # p o # * o o o ",
|
|
||||||
" y 2 3 r r 2 3 - . u + O % % + O : . . X i 4 5 t t 4 5 , X X o p # @ * * # @ 1 o o ",
|
|
||||||
" - 2 2 2 2 2 2 a . : + + + + + + $ . . X , 4 4 4 4 4 4 s X X o 1 # # # # # # & o o ",
|
|
||||||
" - r 2 3 - . . . . : % + O : . . X X X X , t 4 5 , X X o o o o 1 * # @ 1 o o ",
|
|
||||||
" a 2 2 2 a . . . . $ + + + $ . . X X X X s 4 4 4 s X X o o o o & # # # & o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . O + + + + + + . . X X X X X X X X X X X o o @ # # # # # # o o ",
|
|
||||||
" . . $ % % % % % % . . X X X X X X X X X X X o o & * * * * * * o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" - 2 2 2 2 2 a . . : + + + + + $ . . X X , 4 4 4 4 4 s X X o o 1 # # # # # & o o ",
|
|
||||||
" - 2 7 r r r - . . : + 9 % % % : . . X X , 4 q t t t , X X o o 1 # e * * * 1 o o ",
|
|
||||||
" - 2 - . . : + : . . . . . . X X , 4 , X X X X X X o o 1 # 1 o o o o o o ",
|
|
||||||
" - 2 7 2 2 a . . : + 9 + + $ . . . X X , 4 q 4 4 s X X X o o 1 # e # # & o o o ",
|
|
||||||
" - 2 3 r 7 2 r . . : + O % 9 + % . . X X , 4 5 t q 4 t X X o o 1 # @ * e # * o o ",
|
|
||||||
" - r 2 y . . . : . . . % + u . X X X , X X X t 4 i X o o o 1 o o o * # p o ",
|
|
||||||
" - 2 - . . . . . . . : + : . X X X X X X X , 4 , X o o o o o o o 1 # 1 o ",
|
|
||||||
" 6 2 - . . . . . . . 8 + : . X X X X X X X 0 4 , X o o o o o o o w # 1 o ",
|
|
||||||
" y 2 a - - a 2 3 . u + $ : : $ + O . . X i 4 s , , s 4 5 X X o p # & 1 1 & # @ o o ",
|
|
||||||
" = 7 2 2 2 2 3 = . ; 9 + + + + O ; . . X > q 4 4 4 4 5 > X X o < e # # # # @ < o o ",
|
|
||||||
" = - - y . . . ; : : u . . . . X X X > , , i X X X X o o o < 1 1 p o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . O + + + + + + . . X X X X X X X X X X X o o @ # # # # # # o o ",
|
|
||||||
" . . $ % % % % % % . . X X X X X X X X X X X o o & * * * * * * o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" = - - . . . . . ; : : . . . X X X X X > , , X X X o o o o o < 1 1 o o o ",
|
|
||||||
" = 7 2 2 2 a . . . ; 9 + + + $ . . X X X > q 4 4 4 s X X o o o < e # # # & o o ",
|
|
||||||
" = 3 2 r - a - . . ; O + % : $ : . . X X > 5 4 t , s , X X o o < @ # * 1 & 1 o o ",
|
|
||||||
" a 2 - . . $ + : . . . . . . X X s 4 , X X X X X X o o & # 1 o o o o o o ",
|
|
||||||
" 2 a 6 r 6 . . + $ 8 % 8 . . . . X X 4 s 0 t 0 X X X X o o # & w * w o o o o ",
|
|
||||||
" - 2 3 2 2 2 3 . : + O + + + O . . . X , 4 5 4 4 4 5 X X X o 1 # @ # # # @ o o o ",
|
|
||||||
" - 2 2 6 a 2 6 . : + + 8 . $ + 8 . . X , 4 4 0 X s 4 0 X X o 1 # # w o & # w o o ",
|
|
||||||
" - 2 7 2 r . : + 9 . . . + % . . X , 4 q X X X 4 t X X o 1 # e o o o # * o o ",
|
|
||||||
" 2 3 = 2 r . . + O . . ; + % . . X X 4 5 X X > 4 t X X o o # @ o o < # * o o ",
|
|
||||||
" r 2 r - r 2 y . . % + % : % + u . . X X t 4 t , t 4 i X X o o * # * 1 * # p o o ",
|
|
||||||
" = 7 2 2 2 r . . ; 9 + + + % . . . X X > q 4 4 4 t X X X o o < e # # # * o o o ",
|
|
||||||
" y - = . . . . u : ; . . . . X X X X i , > X X X X o o o o p 1 < o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . O + + + + + + . . X X X X X X X X X X X o o @ # # # # # # o o ",
|
|
||||||
" . . $ % % % % % % . . X X X X X X X X X X X o o & * * * * * * o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" - 2 2 2 2 2 2 - . . : + + + + + + : . X X , 4 4 4 4 4 4 , X o o 1 # # # # # # 1 o ",
|
|
||||||
" - 2 7 r r 7 2 . . : + 9 % % 9 + . . X X , 4 q t t q 4 X X o o 1 # e * * e # o o ",
|
|
||||||
" = r = r 3 . . ; % ; . . % O . . X X > t > X X t 5 X X o o < * < o o * @ o o ",
|
|
||||||
" 2 r . . . . . . . + % . . X X X X X X X 4 t X X o o o o o o o # * o o ",
|
|
||||||
" - 2 - . . . . . . : + : . . X X X X X X , 4 , X X o o o o o o 1 # 1 o o ",
|
|
||||||
" a 2 . . . . . . $ + . . . X X X X X X s 4 X X X o o o o o o & # o o o ",
|
|
||||||
" 3 7 . . . . . . O 9 . . . X X X X X X 5 q X X X o o o o o o @ e o o o ",
|
|
||||||
" y 2 6 . . . . . u + 8 . . . X X X X X i 4 0 X X X o o o o o p # w o o o ",
|
|
||||||
" a 2 = . . . . . $ + ; . . . X X X X X s 4 > X X X o o o o o & # < o o o ",
|
|
||||||
" a 3 . . . . . $ O . . . . X X X X X s 5 X X X X o o o o o & @ o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . O + + + + + + . . X X X X X X X X X X X o o @ # # # # # # o o ",
|
|
||||||
" . . $ % % % % % % . . X X X X X X X X X X X o o & * * * * * * o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" y - y . . . . u : u . . . . X X X X i , i X X X X o o o o p 1 p o o o o ",
|
|
||||||
" = 7 2 2 2 7 = . . ; 9 + + + 9 ; . . X X > q 4 4 4 q > X X o o < e # # # e < o o ",
|
|
||||||
" 7 2 a - a 2 7 . . 9 + $ : $ + 9 . . X X q 4 s , s 4 q X X o o e # & 1 & # e o o ",
|
|
||||||
" 2 r r 2 . . + % . . . % + . . X X 4 t X X X t 4 X X o o # * o o o * # o o ",
|
|
||||||
" 7 3 y y 3 7 . . 9 O u . u O 9 . . X X q 5 i X i 5 q X X o o e @ p o p @ e o o ",
|
|
||||||
" = 7 2 2 2 7 = . . ; 9 + + + 9 ; . . X X > q 4 4 4 q > X X o o < e # # # e < o o ",
|
|
||||||
" = 3 3 r 3 3 = . . ; O O % O O ; . . X X > 5 5 t 5 5 > X X o o < @ @ * @ @ < o o ",
|
|
||||||
" 3 3 3 7 . . O O . . . O 9 . . X X 5 5 X X X 5 q X X o o @ @ o o o @ e o o ",
|
|
||||||
" 2 r r 2 . . + % . . . % + . . X X 4 t X X X t 4 X X o o # * o o o * # o o ",
|
|
||||||
" 7 2 a - a 2 7 . . 9 + $ : $ + 9 . . X X q 4 s , s 4 q X X o o e # & 1 & # e o o ",
|
|
||||||
" = 3 2 2 2 3 = . . ; O + + + O ; . . X X > 5 4 4 4 5 > X X o o < @ # # # @ < o o ",
|
|
||||||
" y - y . . . . u : u . . . . X X X X i , i X X X X o o o o p 1 p o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . O + + + + + + . . X X X X X X X X X X X o o @ # # # # # # o o ",
|
|
||||||
" . . $ % % % % % % . . X X X X X X X X X X X o o & * * * * * * o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" = - - . . . ; : : . . . . . X X X > , , X X X X X o o o < 1 1 o o o o o ",
|
|
||||||
" - 2 2 2 3 - . . : + + + O : . . . X X , 4 4 4 5 , X X X o o 1 # # # @ 1 o o o ",
|
|
||||||
" 2 3 - 6 2 3 = . . + O : 8 + O ; . . X X 4 5 , 0 4 5 > X X o o # @ 1 w # @ < o o ",
|
|
||||||
" - 2 - a 2 - . : + : . . $ + : . . X , 4 , X X s 4 , X X o 1 # 1 o o & # 1 o o ",
|
|
||||||
" - 2 6 6 2 r . : + 8 . . 8 + % . . X , 4 0 X X 0 4 t X X o 1 # w o o w # * o o ",
|
|
||||||
" 3 3 - a 2 2 r . . O O : $ + + % . . X X 5 5 , s 4 4 t X X o o @ @ 1 & # # * o o ",
|
|
||||||
" - 2 2 2 r 2 r . . : + + + % + % . . X X , 4 4 4 t 4 t X X o o 1 # # # * # * o o ",
|
|
||||||
" = - y 6 2 - . . . ; : u 8 + : . . X X X > , i 0 4 , X X o o o < 1 p w # 1 o o ",
|
|
||||||
" = 3 3 . . . . . ; O O . . . X X X X X > 5 5 X X X o o o o o < @ @ o o o ",
|
|
||||||
" = r - a 2 2 - . ; % : $ + + : . . . X > t , s 4 4 , X X X o < * 1 & # # 1 o o o ",
|
|
||||||
" y 2 2 2 3 - . u + + + O : . . . . X i 4 4 4 5 , X X X X o p # # # @ 1 o o o o ",
|
|
||||||
" = - y . . ; : u . . . . . . X X > , i X X X X X X o o < 1 p o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . O + + + + + + . . X X X X X X X X X X X o o @ # # # # # # o o ",
|
|
||||||
" . . $ % % % % % % . . X X X X X X X X X X X o o & * * * * * * o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" = - - - - . . ; : : : : . . . . X X > , , , , X X X X o o < 1 1 1 1 o o o o ",
|
|
||||||
" 6 2 2 2 2 - . . 8 + + + + : . . . X X 0 4 4 4 4 , X X X o o w # # # # 1 o o o ",
|
|
||||||
" = - 7 2 2 7 . . ; : 9 + + 9 . . . X X > , q 4 4 q X X X o o < 1 e # # e o o o ",
|
|
||||||
" 3 3 7 2 = . . . . O O 9 + ; . . X X X X 5 5 q 4 > X X o o o o @ @ e # < o o ",
|
|
||||||
" - 2 6 y 2 a . . . : + 8 u + $ . . X X X , 4 0 i 4 s X X o o o 1 # w p # & o o ",
|
|
||||||
" 7 2 3 2 . . . 9 + . . O + . . X X X q 4 X X 5 4 X X o o o e # o o @ # o o ",
|
|
||||||
" y 2 2 2 2 2 2 6 . . u + + + + + + 8 . X X i 4 4 4 4 4 4 0 X o o p # # # # # # w o ",
|
|
||||||
" a 2 r r r r 2 7 . . $ + % % % % + 9 . X X s 4 t t t t 4 q X o o & # * * * * # e o ",
|
|
||||||
" a 2 2 r = a 3 2 r . $ + + % ; . $ O + % X s 4 4 t > X s 5 4 t o & # # * < o & @ # * ",
|
|
||||||
" 3 2 2 2 y 3 2 2 2 . O + + + u . O + + + X 5 4 4 4 i X 5 4 4 4 o @ # # # p o @ # # # ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . O + + + + + + . . X X X X X X X X X X X o o @ # # # # # # o o ",
|
|
||||||
" . . $ % % % % % % . . X X X X X X X X X X X o o & * * * * * * o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" y - - - - - . . u : : : : : . . . X X i , , , , , X X X o o p 1 1 1 1 1 o o o ",
|
|
||||||
" 2 2 2 2 2 2 3 - . . + + + + + + O : . X X 4 4 4 4 4 4 5 , X o o # # # # # # @ 1 o ",
|
|
||||||
" y 2 7 - - 6 2 3 . . u + 9 : : 8 + O . X X i 4 q , , 0 4 5 X o o p # e 1 1 w # @ o ",
|
|
||||||
" 2 r r 2 . . . + % . . . % + . X X X 4 t X X X t 4 X o o o # * o o o * # o ",
|
|
||||||
" 2 7 - - a 2 a . . . + 9 : : $ + $ . X X X 4 q , , s 4 s X o o o # e 1 1 & # & o ",
|
|
||||||
" 2 2 2 2 2 2 a . . . + + + + + + $ . X X X 4 4 4 4 4 4 s X o o o # # # # # # & o ",
|
|
||||||
" 2 7 - - - 7 2 6 . . . + 9 : : : 9 + 8 X X X 4 q , , , q 4 0 o o o # e 1 1 1 e # w ",
|
|
||||||
" 2 r 2 r . . . + % . . . . + % X X X 4 t X X X X 4 t o o o # * o o o o # * ",
|
|
||||||
" a 2 3 r r r 7 2 6 . . $ + O % % % 9 + 8 X X s 4 5 t t t q 4 0 o o & # @ * * * e # w ",
|
|
||||||
" 3 2 2 2 2 2 3 a . . O + + + + + O $ . X X 5 4 4 4 4 4 5 s X o o @ # # # # # @ & o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
" . . . . . . . . . . . X X X X X X X X X X X o o o o o o o o o o o ",
|
|
||||||
"d d d d d d d d d d d f f f f f f f f f f f g g g g g g g g g g g f f f f f f f f f f f ",
|
|
||||||
"d d d d d d d d d d d f f f f f f f f f f f g g g g g g g g g g g f f f f f f f f f f f ",
|
|
||||||
"d d d d d d d d d d d f f f f f f f f f f f g g g g g g g g g g g f f f f f f f f f f f ",
|
|
||||||
"d d d d d d d d d d d f f f f f f f f f f f g g g g g g g g g g g f f f f f f f f f f f ",
|
|
||||||
"d d d d d d d d d d d f f f f f f f f f f f g g g g g g g g g g g f f f f f f f f f f f ",
|
|
||||||
"d d d d d d d d d d d f f f f f f f f f f f g g g g g g g g g g g f f f f f f f f f f f ",
|
|
||||||
"d d d h j k k l z h d f f f x c v v b n x f g g g m M N N B V m g f f f C Z A A S D C f ",
|
|
||||||
"d d z F F F F F F k d f f n G G G G G G v f g g V H H H H H H N g f f D J J J J J J A f ",
|
|
||||||
"d h F K L d h j F k d f x G P I f x c G v f g m H U Y g m M H N g f C J T R f C Z J A f ",
|
|
||||||
"d l F l d d d d E j d f b G b f f f f W c f g B H B g g g g Q M g f S J S f f f f ! Z f ",
|
|
||||||
"d k F d d d d d d d d f v G f f f f f f f f g N H g g g g g g g g f A J f f f f f f f f ",
|
|
||||||
"d k F d d d d d d d d f v G f f f f f f f f g N H g g g g g g g g f A J f f f f f f f f ",
|
|
||||||
"d k F d d d d d d d d f v G f f f f f f f f g N H g g g g g g g g f A J f f f f f f f f ",
|
|
||||||
"d l F l d d d d h L d f b G b f f f f x I f g B H B g g g g m Y g f S J S f f f f C R f ",
|
|
||||||
"d d K F E z z l K F d f f P G W n n b P G f g g U H Q V V B U H g f f T J ! D D S T J f ",
|
|
||||||
"d d h k F F F F K z d f f x v G G G G P n f g g m N H H H H U V g f f C A J J J J T D f ",
|
|
||||||
"d d d d h z z L d d d f f f f x n n I f f f g g g g m V V Y g g g f f f f C D D R f f f ",
|
|
||||||
"d d d d d d d d d d d f f f f f f f f f f f g g g g g g g g g g g f f f f f f f f f f f ",
|
|
||||||
"d d d d d d d d d d d f f f f f f f f f f f g g g g g g g g g g g f f f f f f f f f f f ",
|
|
||||||
"d d d d d d d d d d d f f f f f f f f f f f g g g g g g g g g g g f f f f f f f f f f f ",
|
|
||||||
"d d d d d d d d d d d f f f f f f f f f f f g g g g g g g g g g g f f f f f f f f f f f ",
|
|
||||||
"d d d d d d d d d d d f f f f f f f f f f f g g g g g g g g g g g f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f n n n n n x f f f f f n n n n n x f f f f f D D D D D C f f f f f D D D D D C f f f ",
|
|
||||||
"f n G G G G G G v f f f n G G G G G G v f f f D J J J J J J A f f f D J J J J J J A f f ",
|
|
||||||
"f f c G c n n W G b f f f c G c n n W G b f f f Z J Z D D ! J S f f f Z J Z D D ! J S f ",
|
|
||||||
"f f n G n f f f G v f f f n G n f f f G v f f f D J D f f f J A f f f D J D f f f J A f ",
|
|
||||||
"f f n G n f f x G v f f f n G n f f x G v f f f D J D f f C J A f f f D J D f f C J A f ",
|
|
||||||
"f f n G W v v G G I f f f n G W v v G G I f f f D J ! A A J J R f f f D J ! A A J J R f ",
|
|
||||||
"f f n G G G G W I f f f f n G G G G W I f f f f D J J J J ! R f f f f D J J J J ! R f f ",
|
|
||||||
"f f n G n f f f f f f f f n G n f f f f f f f f D J D f f f f f f f f D J D f f f f f f ",
|
|
||||||
"f x W G W v c f f f f f x W G W v c f f f f f C ! J ! A Z f f f f f C ! J ! A Z f f f f ",
|
|
||||||
"f I G G G G P f f f f f I G G G G P f f f f f R J J J J T f f f f f R J J J J T f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f ~ ^ / / ( ~ f f f f f I c v v n I f f f f f ) _ ` ` ' ) f f f f f R Z A A D R f f ",
|
|
||||||
"f f ( ] ] ] ] ] ] f f f f n G G G G G G f f f f ' [ [ [ [ [ [ f f f f D J J J J J J f f ",
|
|
||||||
"f f v v ~ f { v ] f f f f P P I f x P G f f f f A A ) f } A [ f f f f T T R f C T J f f ",
|
|
||||||
"f f ] | f f f ( ^ f f f f G W f f f n c f f f f [ .f f f ' _ f f f f J ! f f f D Z f f ",
|
|
||||||
"f f | ] | ^ ( f f f f f f W G W c n f f f f f f .[ ._ ' f f f f f f ! J ! Z D f f f f ",
|
|
||||||
"f f f ^ v ] ] ] ^ f f f f f c P G G G c f f f f f _ A [ [ [ _ f f f f f Z T J J J Z f f ",
|
|
||||||
"f f f f f ~ n v ] ~ f f f f f f I b P G I f f f f f f ) D A [ ) f f f f f f R S T J R f ",
|
|
||||||
"f ~ ] ~ f f f ( ] ( f f I G I f f f n G n f f ) [ ) f f f ' [ ' f f R J R f f f D J D f ",
|
|
||||||
"f ( ] v n ( n v ] { f f n G P b n b P G x f f ' [ A D ' D A [ } f f D J T S D S T J C f ",
|
|
||||||
"f ~ ] v ] ] ] ] ( f f f I G P G G G G n f f f ) [ A [ [ [ [ ' f f f R J T J J J J D f f ",
|
|
||||||
"f f f f ~ ( ( f f f f f f f f I n n f f f f f f f f ) ' ' f f f f f f f f R D D f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"......................f f f f f f f f f f f X.X.X.X.X.X.X.X.X.X.X.f f f f f f f f f f f ",
|
|
||||||
"......................f f f f f f f f f f f X.X.X.X.X.X.X.X.X.X.X.f f f f f f f f f f f ",
|
|
||||||
"......................f f f f f f f f f f f X.X.X.X.X.X.X.X.X.X.X.f f f f f f f f f f f ",
|
|
||||||
"......................f f f f f f f f f f f X.X.X.X.X.X.X.X.X.X.X.f f f f f f f f f f f ",
|
|
||||||
"......................f f f f f f f f f f f X.X.X.X.X.X.X.X.X.X.X.f f f f f f f f f f f ",
|
|
||||||
"......................f f f f f f f f f f f X.X.X.X.X.X.X.X.X.X.X.f f f f f f f f f f f ",
|
|
||||||
"..o.O.O.+...+.O.O.o...f I n n x f x n n I f X.@.#.#.$.X.$.#.#.@.X.f R D D C f C D D R f ",
|
|
||||||
"..%.&.&.*...O.&.&.&...f W G G v f n G G G f X.=.-.-.;.X.#.-.-.-.X.f ! J J A f D J J J f ",
|
|
||||||
"..o.%.&.:...+.&.>.o...f I W G b f x G P I f X.@.=.-.,.X.$.-.<.@.X.f R ! J S f C J T R f ",
|
|
||||||
"....+.>.&.:.>.&.o.....f f x P G b P G I f f X.X.$.<.-.,.<.-.@.X.X.f f C T J S T J R f f ",
|
|
||||||
"......+.>.&.&.O.......f f f x P G G n f f f X.X.X.$.<.-.-.#.X.X.X.f f f C T J J D f f f ",
|
|
||||||
"........*.&.>.+.......f f f f v G P x f f f X.X.X.X.;.-.<.$.X.X.X.f f f f A J T C f f f ",
|
|
||||||
"......*.&.%.&.%.......f f f v G W G W f f f X.X.X.;.-.=.-.=.X.X.X.f f f A J ! J ! f f f ",
|
|
||||||
"....O.&.*...:.&.*.....f f n G v f b G v f f X.X.#.-.;.X.,.-.;.X.X.f f D J A f S J A f f ",
|
|
||||||
"..1.&.&.*...O.&.&.%.+.f c G G v f n G G W x X.2.-.-.;.X.#.-.-.=.$.f Z J J A f D J J ! C ",
|
|
||||||
"..>.&.&.>...1.&.&.&.o.f P G G P f c G G G I X.<.-.-.<.X.2.-.-.-.@.f T J J T f Z J J J R ",
|
|
||||||
"......................f f f f f f f f f f f X.X.X.X.X.X.X.X.X.X.X.f f f f f f f f f f f ",
|
|
||||||
"......................f f f f f f f f f f f X.X.X.X.X.X.X.X.X.X.X.f f f f f f f f f f f ",
|
|
||||||
"......................f f f f f f f f f f f X.X.X.X.X.X.X.X.X.X.X.f f f f f f f f f f f ",
|
|
||||||
"......................f f f f f f f f f f f X.X.X.X.X.X.X.X.X.X.X.f f f f f f f f f f f ",
|
|
||||||
"......................f f f f f f f f f f f X.X.X.X.X.X.X.X.X.X.X.f f f f f f f f f f f ",
|
|
||||||
"......................f f f f f f f f f f f X.X.X.X.X.X.X.X.X.X.X.f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f P G G G G G G G I f f P G G G G G G G I f f T J J J J J J J R f f T J J J J J J J R f ",
|
|
||||||
"f c v v v v v v v x f f c v v v v v v v x f f Z A A A A A A A C f f Z A A A A A A A C f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f ",
|
|
||||||
"f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f "
|
|
||||||
};
|
|
|
@ -1,379 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 1983 Regents of the University of California.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms are permitted
|
|
||||||
* provided that the above copyright notice and this paragraph are
|
|
||||||
* duplicated in all such forms and that any documentation,
|
|
||||||
* advertising materials, and other materials related to such
|
|
||||||
* distribution and use acknowledge that the software was developed
|
|
||||||
* by the University of California, Berkeley. The name of the
|
|
||||||
* University may not be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
|
||||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Please note that as of July 22, 1999, the licensees and distributors
|
|
||||||
* are no longer required to include the above mentioned acknowledgement
|
|
||||||
* within advertising materials. For full details see
|
|
||||||
* ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is derived from the Berkeley source:
|
|
||||||
* @(#)random.c 5.5 (Berkeley) 7/6/88
|
|
||||||
* It was reworked for the GNU C Library by Roland McGrath.
|
|
||||||
* Rewritten to be reentrant by Ulrich Drepper, 1995
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "vm_random.h"
|
|
||||||
|
|
||||||
/* An improved random number generation package. In addition to the standard
|
|
||||||
rand()/srand() like interface, this package also has a special state info
|
|
||||||
interface. The initstate() routine is called with a seed, an array of
|
|
||||||
bytes, and a count of how many bytes are being passed in; this array is
|
|
||||||
then initialized to contain information for random number generation with
|
|
||||||
that much state information. Good sizes for the amount of state
|
|
||||||
information are 32, 64, 128, and 256 bytes. The state can be switched by
|
|
||||||
calling the setstate() function with the same array as was initialized
|
|
||||||
with initstate(). By default, the package runs with 128 bytes of state
|
|
||||||
information and generates far better random numbers than a linear
|
|
||||||
congruential generator. If the amount of state information is less than
|
|
||||||
32 bytes, a simple linear congruential R.N.G. is used. Internally, the
|
|
||||||
state information is treated as an array of longs; the zeroth element of
|
|
||||||
the array is the type of R.N.G. being used (small integer); the remainder
|
|
||||||
of the array is the state information for the R.N.G. Thus, 32 bytes of
|
|
||||||
state information will give 7 longs worth of state information, which will
|
|
||||||
allow a degree seven polynomial. (Note: The zeroth word of state
|
|
||||||
information also has some other information stored in it; see setstate
|
|
||||||
for details). The random number generation technique is a linear feedback
|
|
||||||
shift register approach, employing trinomials (since there are fewer terms
|
|
||||||
to sum up that way). In this approach, the least significant bit of all
|
|
||||||
the numbers in the state table will act as a linear feedback shift register,
|
|
||||||
and will have period 2^deg - 1 (where deg is the degree of the polynomial
|
|
||||||
being used, assuming that the polynomial is irreducible and primitive).
|
|
||||||
The higher order bits will have longer periods, since their values are
|
|
||||||
also influenced by pseudo-random carries out of the lower bits. The
|
|
||||||
total period of the generator is approximately deg*(2**deg - 1); thus
|
|
||||||
doubling the amount of state information has a vast influence on the
|
|
||||||
period of the generator. Note: The deg*(2**deg - 1) is an approximation
|
|
||||||
only good for large deg, when the period of the shift register is the
|
|
||||||
dominant factor. With deg equal to seven, the period is actually much
|
|
||||||
longer than the 7*(2**7 - 1) predicted by this formula. */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* For each of the currently supported random number generators, we have a
|
|
||||||
break value on the amount of state information (you need at least this many
|
|
||||||
bytes of state info to support this random number generator), a degree for
|
|
||||||
the polynomial (actually a trinomial) that the R.N.G. is based on, and
|
|
||||||
separation between the two lower order coefficients of the trinomial. */
|
|
||||||
|
|
||||||
/* Linear congruential. */
|
|
||||||
#define TYPE_0 0
|
|
||||||
#define BREAK_0 8
|
|
||||||
#define DEG_0 0
|
|
||||||
#define SEP_0 0
|
|
||||||
|
|
||||||
/* x**7 + x**3 + 1. */
|
|
||||||
#define TYPE_1 1
|
|
||||||
#define BREAK_1 32
|
|
||||||
#define DEG_1 7
|
|
||||||
#define SEP_1 3
|
|
||||||
|
|
||||||
/* x**15 + x + 1. */
|
|
||||||
#define TYPE_2 2
|
|
||||||
#define BREAK_2 64
|
|
||||||
#define DEG_2 15
|
|
||||||
#define SEP_2 1
|
|
||||||
|
|
||||||
/* x**31 + x**3 + 1. */
|
|
||||||
#define TYPE_3 3
|
|
||||||
#define BREAK_3 128
|
|
||||||
#define DEG_3 31
|
|
||||||
#define SEP_3 3
|
|
||||||
|
|
||||||
/* x**63 + x + 1. */
|
|
||||||
#define TYPE_4 4
|
|
||||||
#define BREAK_4 256
|
|
||||||
#define DEG_4 63
|
|
||||||
#define SEP_4 1
|
|
||||||
|
|
||||||
|
|
||||||
/* Array versions of the above information to make code run faster.
|
|
||||||
Relies on fact that TYPE_i == i. */
|
|
||||||
|
|
||||||
#define MAX_TYPES 5 /* Max number of types above. */
|
|
||||||
|
|
||||||
struct vm_random_poly_info
|
|
||||||
{
|
|
||||||
int seps[MAX_TYPES];
|
|
||||||
int degrees[MAX_TYPES];
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct vm_random_poly_info vm_random_poly_info =
|
|
||||||
{
|
|
||||||
{ SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 },
|
|
||||||
{ DEG_0, DEG_1, DEG_2, DEG_3, DEG_4 }
|
|
||||||
};
|
|
||||||
|
|
||||||
static int32_t vm_randtbl[DEG_3 + 1] =
|
|
||||||
{
|
|
||||||
TYPE_3,
|
|
||||||
|
|
||||||
-1726662223, 379960547, 1735697613, 1040273694, 1313901226,
|
|
||||||
1627687941, -179304937, -2073333483, 1780058412, -1989503057,
|
|
||||||
-615974602, 344556628, 939512070, -1249116260, 1507946756,
|
|
||||||
-812545463, 154635395, 1388815473, -1926676823, 525320961,
|
|
||||||
-1009028674, 968117788, -123449607, 1284210865, 435012392,
|
|
||||||
-2017506339, -911064859, -370259173, 1132637927, 1398500161,
|
|
||||||
-205601318,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Initialize the random number generator based on the given seed. If the
|
|
||||||
type is the trivial no-state-information type, just remember the seed.
|
|
||||||
Otherwise, initializes state[] based on the given "seed" via a linear
|
|
||||||
congruential generator. Then, the pointers are set to known locations
|
|
||||||
that are exactly rand_sep places apart. Lastly, it cycles the state
|
|
||||||
information a given number of times to get rid of any initial dependencies
|
|
||||||
introduced by the L.C.R.N.G. Note that the initialization of randtbl[]
|
|
||||||
for default usage relies on values produced by this routine. */
|
|
||||||
int vm_srandom (unsigned int seed,
|
|
||||||
struct vm_random_data* buf)
|
|
||||||
{
|
|
||||||
int type;
|
|
||||||
int32_t *state;
|
|
||||||
long int i;
|
|
||||||
long int word;
|
|
||||||
int32_t *dst;
|
|
||||||
int kc;
|
|
||||||
|
|
||||||
if (buf == NULL)
|
|
||||||
goto fail;
|
|
||||||
type = buf->vm_rand_type;
|
|
||||||
if ((unsigned int) type >= MAX_TYPES)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
state = buf->state;
|
|
||||||
/* We must make sure the seed is not 0. Take arbitrarily 1 in this case. */
|
|
||||||
if (seed == 0)
|
|
||||||
seed = 1;
|
|
||||||
state[0] = seed;
|
|
||||||
if (type == TYPE_0)
|
|
||||||
goto done;
|
|
||||||
|
|
||||||
dst = state;
|
|
||||||
word = seed;
|
|
||||||
kc = buf->vm_rand_deg;
|
|
||||||
for (i = 1; i < kc; ++i)
|
|
||||||
{
|
|
||||||
/* This does:
|
|
||||||
state[i] = (16807 * state[i - 1]) % 2147483647;
|
|
||||||
but avoids overflowing 31 bits. */
|
|
||||||
long int hi = word / 127773;
|
|
||||||
long int lo = word % 127773;
|
|
||||||
word = 16807 * lo - 2836 * hi;
|
|
||||||
if (word < 0)
|
|
||||||
word += 2147483647;
|
|
||||||
*++dst = word;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf->fptr = &state[buf->vm_rand_sep];
|
|
||||||
buf->rptr = &state[0];
|
|
||||||
kc *= 10;
|
|
||||||
while (--kc >= 0)
|
|
||||||
{
|
|
||||||
vm_random (buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
done:
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
fail:
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialize the state information in the given array of N bytes for
|
|
||||||
future random number generation. Based on the number of bytes we
|
|
||||||
are given, and the break values for the different R.N.G.'s, we choose
|
|
||||||
the best (largest) one we can and set things up for it. srandom is
|
|
||||||
then called to initialize the state information. Note that on return
|
|
||||||
from srandom, we set state[-1] to be the type multiplexed with the current
|
|
||||||
value of the rear pointer; this is so successive calls to initstate won't
|
|
||||||
lose this information and will be able to restart with setstate.
|
|
||||||
Note: The first thing we do is save the current state, if any, just like
|
|
||||||
setstate so that it doesn't matter when initstate is called.
|
|
||||||
Returns a pointer to the old state. */
|
|
||||||
int vm_initstate (unsigned int seed,
|
|
||||||
void* arg_state,
|
|
||||||
size_t n,
|
|
||||||
struct vm_random_data* buf)
|
|
||||||
{
|
|
||||||
int type;
|
|
||||||
int degree;
|
|
||||||
int separation;
|
|
||||||
int32_t *state;
|
|
||||||
|
|
||||||
if (buf == NULL)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
if (n >= BREAK_3)
|
|
||||||
type = n < BREAK_4 ? TYPE_3 : TYPE_4;
|
|
||||||
else if (n < BREAK_1)
|
|
||||||
{
|
|
||||||
if (n < BREAK_0)
|
|
||||||
{
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
type = TYPE_0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
type = n < BREAK_2 ? TYPE_1 : TYPE_2;
|
|
||||||
|
|
||||||
degree = vm_random_poly_info.degrees[type];
|
|
||||||
separation = vm_random_poly_info.seps[type];
|
|
||||||
|
|
||||||
buf->vm_rand_type = type;
|
|
||||||
buf->vm_rand_sep = separation;
|
|
||||||
buf->vm_rand_deg = degree;
|
|
||||||
state = &((int32_t *) arg_state)[1]; /* First location. */
|
|
||||||
/* Must set END_PTR before srandom. */
|
|
||||||
buf->end_ptr = &state[degree];
|
|
||||||
|
|
||||||
buf->state = state;
|
|
||||||
|
|
||||||
vm_srandom (seed, buf);
|
|
||||||
|
|
||||||
state[-1] = TYPE_0;
|
|
||||||
if (type != TYPE_0)
|
|
||||||
state[-1] = (buf->rptr - state) * MAX_TYPES + type;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
fail:
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Restore the state from the given state array.
|
|
||||||
Note: It is important that we also remember the locations of the pointers
|
|
||||||
in the current state information, and restore the locations of the pointers
|
|
||||||
from the old state information. This is done by multiplexing the pointer
|
|
||||||
location into the zeroth word of the state information. Note that due
|
|
||||||
to the order in which things are done, it is OK to call setstate with the
|
|
||||||
same state as the current state
|
|
||||||
Returns a pointer to the old state information. */
|
|
||||||
int vm_setstate (void* arg_state,
|
|
||||||
struct vm_random_data* buf)
|
|
||||||
{
|
|
||||||
int32_t *new_state = (int32_t *) arg_state;
|
|
||||||
int type;
|
|
||||||
int old_type;
|
|
||||||
int32_t *old_state;
|
|
||||||
int degree;
|
|
||||||
int separation;
|
|
||||||
|
|
||||||
if (buf == NULL)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
old_type = buf->vm_rand_type;
|
|
||||||
old_state = buf->state;
|
|
||||||
if (old_type == TYPE_0)
|
|
||||||
old_state[-1] = TYPE_0;
|
|
||||||
else
|
|
||||||
old_state[-1] = (MAX_TYPES * (buf->rptr - old_state)) + old_type;
|
|
||||||
|
|
||||||
type = new_state[0] % MAX_TYPES;
|
|
||||||
if (type < TYPE_0 || type >= TYPE_4)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
buf->vm_rand_deg = degree = vm_random_poly_info.degrees[type];
|
|
||||||
buf->vm_rand_sep = separation = vm_random_poly_info.seps[type];
|
|
||||||
buf->vm_rand_type = type;
|
|
||||||
|
|
||||||
if (type != TYPE_0)
|
|
||||||
{
|
|
||||||
int rear = new_state[0] / MAX_TYPES;
|
|
||||||
buf->rptr = &new_state[rear];
|
|
||||||
buf->fptr = &new_state[(rear + separation) % degree];
|
|
||||||
}
|
|
||||||
buf->state = &new_state[1];
|
|
||||||
/* Set end_ptr too. */
|
|
||||||
buf->end_ptr = &new_state[degree];
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
fail:
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If we are using the trivial TYPE_0 R.N.G., just do the old linear
|
|
||||||
congruential bit. Otherwise, we do our fancy trinomial stuff, which is the
|
|
||||||
same in all the other cases due to all the global variables that have been
|
|
||||||
set up. The basic operation is to add the number at the rear pointer into
|
|
||||||
the one at the front pointer. Then both pointers are advanced to the next
|
|
||||||
location cyclically in the table. The value returned is the sum generated,
|
|
||||||
reduced to 31 bits by throwing away the "least random" low bit.
|
|
||||||
Note: The code takes advantage of the fact that both the front and
|
|
||||||
rear pointers can't wrap on the same call by not testing the rear
|
|
||||||
pointer if the front one has wrapped. Returns a 31-bit random number. */
|
|
||||||
|
|
||||||
int32_t vm_random (struct vm_random_data* buf)
|
|
||||||
{
|
|
||||||
int32_t *state;
|
|
||||||
int32_t result;
|
|
||||||
|
|
||||||
if (buf == NULL)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
state = buf->state;
|
|
||||||
|
|
||||||
if (buf->vm_rand_type == TYPE_0)
|
|
||||||
{
|
|
||||||
int32_t val = state[0];
|
|
||||||
val = ((state[0] * 1103515245) + 12345) & 0x7fffffff;
|
|
||||||
state[0] = val;
|
|
||||||
result = val;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int32_t *fptr = buf->fptr;
|
|
||||||
int32_t *rptr = buf->rptr;
|
|
||||||
int32_t *end_ptr = buf->end_ptr;
|
|
||||||
int32_t val;
|
|
||||||
|
|
||||||
val = *fptr += *rptr;
|
|
||||||
/* Chucking least random bit. */
|
|
||||||
result = (val >> 1) & 0x7fffffff;
|
|
||||||
++fptr;
|
|
||||||
if (fptr >= end_ptr)
|
|
||||||
{
|
|
||||||
fptr = state;
|
|
||||||
++rptr;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
++rptr;
|
|
||||||
if (rptr >= end_ptr)
|
|
||||||
rptr = state;
|
|
||||||
}
|
|
||||||
buf->fptr = fptr;
|
|
||||||
buf->rptr = rptr;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
|
|
||||||
fail:
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void vm_default_initstate( int seed,
|
|
||||||
struct vm_random_data* buf ) {
|
|
||||||
vm_initstate( seed,
|
|
||||||
vm_randtbl,
|
|
||||||
128,
|
|
||||||
buf );
|
|
||||||
}
|
|
|
@ -1,31 +0,0 @@
|
||||||
#ifndef __VM_RANDOM_H__
|
|
||||||
#define __VM_RANDOM_H__
|
|
||||||
|
|
||||||
#define VM_RAND_MAX 2147483647
|
|
||||||
|
|
||||||
#define int32_t int
|
|
||||||
|
|
||||||
struct vm_random_data
|
|
||||||
{
|
|
||||||
int32_t *fptr; /* Front pointer. */
|
|
||||||
int32_t *rptr; /* Rear pointer. */
|
|
||||||
int32_t *state; /* Array of state values. */
|
|
||||||
int vm_rand_type; /* Type of random number generator. */
|
|
||||||
int vm_rand_deg; /* Degree of random number generator. */
|
|
||||||
int vm_rand_sep; /* Distance between front and rear. */
|
|
||||||
int32_t *end_ptr; /* Pointer behind state table. */
|
|
||||||
};
|
|
||||||
|
|
||||||
int vm_initstate (unsigned int seed,
|
|
||||||
void* arg_state,
|
|
||||||
size_t n,
|
|
||||||
struct vm_random_data* buf);
|
|
||||||
int vm_setstate (void* arg_state,
|
|
||||||
struct vm_random_data* buf);
|
|
||||||
void vm_default_initstate( int seed,
|
|
||||||
struct vm_random_data* buf );
|
|
||||||
int vm_srandom (unsigned int seed,
|
|
||||||
struct vm_random_data* buf);
|
|
||||||
int32_t vm_random (struct vm_random_data* buf);
|
|
||||||
|
|
||||||
#endif /* !defined( __VM_RANDOM_H__ ) */
|
|
|
@ -1,24 +0,0 @@
|
||||||
|
|
||||||
include_directories( ${CMAKE_SOURCE_DIR}/kscreensaver/libkscreensaver )
|
|
||||||
|
|
||||||
|
|
||||||
########### next target ###############
|
|
||||||
|
|
||||||
set(krandom.kss_SRCS random.cpp)
|
|
||||||
|
|
||||||
|
|
||||||
add_executable(krandom.kss ${krandom.kss_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(krandom.kss ${KDE4_KDEUI_LIBS} m)
|
|
||||||
|
|
||||||
if (Q_WS_X11)
|
|
||||||
target_link_libraries(krandom.kss ${X11_X11_LIB})
|
|
||||||
endif (Q_WS_X11)
|
|
||||||
|
|
||||||
install(TARGETS krandom.kss ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
||||||
|
|
||||||
|
|
||||||
########### install files ###############
|
|
||||||
|
|
||||||
install( FILES krandom.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR}/ScreenSavers )
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
$XGETTEXT *.cpp *.h -o $podir/kscreensaver.pot
|
|
|
@ -1,371 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Exec=krandom.kss
|
|
||||||
Icon=kscreensaver
|
|
||||||
Type=Service
|
|
||||||
X-KDE-ServiceTypes=ScreenSaver
|
|
||||||
Actions=Setup;InWindow;Root;
|
|
||||||
Name=Random
|
|
||||||
Name[af]=Lukrake
|
|
||||||
Name[ar]=عشوائي
|
|
||||||
Name[ast]=Al debalu
|
|
||||||
Name[be]=Выпадковыя
|
|
||||||
Name[be@latin]=Vypadkova
|
|
||||||
Name[bg]=Произволен
|
|
||||||
Name[bn]=এলোমেলোভাবে
|
|
||||||
Name[bn_IN]=যথেচ্ছ
|
|
||||||
Name[br]=Dre zegouezh
|
|
||||||
Name[bs]=Nasumično
|
|
||||||
Name[ca]=Aleatori
|
|
||||||
Name[ca@valencia]=Aleatori
|
|
||||||
Name[cs]=Náhodný
|
|
||||||
Name[csb]=Przëtrôfkòwi
|
|
||||||
Name[cy]=Ar Hap
|
|
||||||
Name[da]=Tilfældig
|
|
||||||
Name[de]=Zufällig
|
|
||||||
Name[el]=Τυχαία
|
|
||||||
Name[en_GB]=Random
|
|
||||||
Name[eo]=Hazarda
|
|
||||||
Name[es]=Aleatorio
|
|
||||||
Name[et]=Juhuslik
|
|
||||||
Name[eu]=Ausazkoa
|
|
||||||
Name[fa]=تصادفی
|
|
||||||
Name[fi]=Satunnainen
|
|
||||||
Name[fr]=Aléatoire
|
|
||||||
Name[fy]=Samar in
|
|
||||||
Name[ga]=Randamach
|
|
||||||
Name[gl]=Aleatorio
|
|
||||||
Name[gu]=જેમ તેમ
|
|
||||||
Name[he]=אקראי
|
|
||||||
Name[hi]=बेतरतीब
|
|
||||||
Name[hne]=बेतरतीब
|
|
||||||
Name[hr]=Nasumice
|
|
||||||
Name[hsb]=Připad
|
|
||||||
Name[hu]=Véletlenszerű
|
|
||||||
Name[ia]=Casual
|
|
||||||
Name[id]=Acak
|
|
||||||
Name[is]=Slembið
|
|
||||||
Name[ja]=ランダム
|
|
||||||
Name[ka]=შემთხვევითი
|
|
||||||
Name[kk]=Кездейсоқ
|
|
||||||
Name[km]=ចៃដន្យ
|
|
||||||
Name[kn]=ಯಾದೃಚ್ಛಕ (ರಾಂಡಮ್)
|
|
||||||
Name[ko]=아무거나
|
|
||||||
Name[ku]=Çast Hatî
|
|
||||||
Name[lt]=Atsitiktinis
|
|
||||||
Name[lv]=Gadījuma
|
|
||||||
Name[mai]=क्रमहीन
|
|
||||||
Name[mk]=Случаен
|
|
||||||
Name[ml]=ഏതെങ്കിലുമൊന്നു്
|
|
||||||
Name[mr]=विनाक्रम
|
|
||||||
Name[ms]=Rawak
|
|
||||||
Name[nb]=Tilfeldig
|
|
||||||
Name[nds]=Tofall
|
|
||||||
Name[ne]=अनियमित
|
|
||||||
Name[nl]=Willekeurig
|
|
||||||
Name[nn]=Tilfeldig
|
|
||||||
Name[oc]=Aleatòri
|
|
||||||
Name[pa]=ਰਲਵਾਂ
|
|
||||||
Name[pl]=Losowy
|
|
||||||
Name[pt]=Aleatório
|
|
||||||
Name[pt_BR]=Aleatório
|
|
||||||
Name[ro]=Aleator
|
|
||||||
Name[ru]=Случайный
|
|
||||||
Name[se]=Sáhtodohko
|
|
||||||
Name[si]=අහඹු
|
|
||||||
Name[sk]=Náhodný
|
|
||||||
Name[sl]=Naključno
|
|
||||||
Name[sr]=Насумично
|
|
||||||
Name[sr@ijekavian]=Насумично
|
|
||||||
Name[sr@ijekavianlatin]=Nasumično
|
|
||||||
Name[sr@latin]=Nasumično
|
|
||||||
Name[sv]=Slumpmässig
|
|
||||||
Name[ta]=ஒழுங்கற்ற
|
|
||||||
Name[te]=యాధృశ్చికంగా
|
|
||||||
Name[tg]=Тасодуфӣ
|
|
||||||
Name[th]=สุ่ม
|
|
||||||
Name[tr]=Rastgele
|
|
||||||
Name[ug]=ئىختىيارىي
|
|
||||||
Name[uk]=Випадковий
|
|
||||||
Name[uz]=Tasodifiy
|
|
||||||
Name[uz@cyrillic]=Тасодифий
|
|
||||||
Name[vi]=Ngẫu nhiên
|
|
||||||
Name[wa]=A l' astcheyance
|
|
||||||
Name[xh]=Ngaphandle kwenjongo
|
|
||||||
Name[x-test]=xxRandomxx
|
|
||||||
Name[zh_CN]=随机
|
|
||||||
Name[zh_TW]=隨機
|
|
||||||
|
|
||||||
[Desktop Action Setup]
|
|
||||||
Exec=krandom.kss -setup
|
|
||||||
Name=Setup...
|
|
||||||
Name[af]=Opstelling...
|
|
||||||
Name[ar]=إعداد...
|
|
||||||
Name[ast]=Configuración...
|
|
||||||
Name[be]=Наставіць...
|
|
||||||
Name[be@latin]=Nałady...
|
|
||||||
Name[bg]=Настройки...
|
|
||||||
Name[bn]=সেট-আপ...
|
|
||||||
Name[bn_IN]=প্রস্তুতি...
|
|
||||||
Name[br]=Kefluniadur ...
|
|
||||||
Name[bs]=Podesi...
|
|
||||||
Name[ca]=Configuració...
|
|
||||||
Name[ca@valencia]=Configuració...
|
|
||||||
Name[cs]=Nastavení...
|
|
||||||
Name[csb]=Ùstôw...
|
|
||||||
Name[cy]=Gosod...
|
|
||||||
Name[da]=Opsætning...
|
|
||||||
Name[de]=Einrichtung ...
|
|
||||||
Name[el]=Ρύθμιση...
|
|
||||||
Name[en_GB]=Setup...
|
|
||||||
Name[eo]=Agordo...
|
|
||||||
Name[es]=Configuración...
|
|
||||||
Name[et]=Seadistused...
|
|
||||||
Name[eu]=Konfiguratu...
|
|
||||||
Name[fa]=برپایی...
|
|
||||||
Name[fi]=Asetukset…
|
|
||||||
Name[fr]=Configuration...
|
|
||||||
Name[fy]=Opset...
|
|
||||||
Name[ga]=Socrú...
|
|
||||||
Name[gl]=Configuración...
|
|
||||||
Name[gu]=ગોઠવણી...
|
|
||||||
Name[he]=הגדרות...
|
|
||||||
Name[hi]=सेटअप...
|
|
||||||
Name[hne]=सेटअप...
|
|
||||||
Name[hr]=Postavke…
|
|
||||||
Name[hsb]=Připrawić...
|
|
||||||
Name[hu]=Beállítás…
|
|
||||||
Name[ia]=Disposition ...
|
|
||||||
Name[id]=Pengaturan...
|
|
||||||
Name[is]=Stillingar...
|
|
||||||
Name[ja]=セットアップ...
|
|
||||||
Name[ka]=კონფიგურაცია...
|
|
||||||
Name[kk]=Баптау...
|
|
||||||
Name[km]=រៀបចំ...
|
|
||||||
Name[kn]=ಸಿದ್ಧತೆ...
|
|
||||||
Name[ko]=설정...
|
|
||||||
Name[ku]=Sazkirin...
|
|
||||||
Name[lt]=Nustatymas...
|
|
||||||
Name[lv]=Konfigurēt...
|
|
||||||
Name[mai]=सेटअप...
|
|
||||||
Name[mk]=Постави...
|
|
||||||
Name[ml]=സജ്ജീകരണം...
|
|
||||||
Name[mr]=व्यवस्था ...
|
|
||||||
Name[ms]=Tetapan...
|
|
||||||
Name[nb]=Oppsett …
|
|
||||||
Name[nds]=Instellen...
|
|
||||||
Name[ne]=सेटअप...
|
|
||||||
Name[nl]=Instellingen...
|
|
||||||
Name[nn]=Oppsett …
|
|
||||||
Name[pa]=ਸੈੱਟਅੱਪ...
|
|
||||||
Name[pl]=Ustawienia...
|
|
||||||
Name[pt]=Configurar...
|
|
||||||
Name[pt_BR]=Configurar...
|
|
||||||
Name[ro]=Opțiuni...
|
|
||||||
Name[ru]=Настроить...
|
|
||||||
Name[se]=Heiveheapmi …
|
|
||||||
Name[si]=සැකසුම්...
|
|
||||||
Name[sk]=Nastavenie...
|
|
||||||
Name[sl]=Nastavitve ...
|
|
||||||
Name[sr]=Подеси...
|
|
||||||
Name[sr@ijekavian]=Подеси...
|
|
||||||
Name[sr@ijekavianlatin]=Podesi...
|
|
||||||
Name[sr@latin]=Podesi...
|
|
||||||
Name[sv]=Inställningar...
|
|
||||||
Name[ta]=அமைப்பு...
|
|
||||||
Name[te]=అమర్పు...
|
|
||||||
Name[tg]=Танзимот...
|
|
||||||
Name[th]=ตั้งค่า...
|
|
||||||
Name[tr]=Kurulum...
|
|
||||||
Name[ug]=ئورنات…
|
|
||||||
Name[uk]=Встановити...
|
|
||||||
Name[uz]=Oʻrnatish
|
|
||||||
Name[uz@cyrillic]=Ўрнатиш
|
|
||||||
Name[vi]=Thiết lập...
|
|
||||||
Name[wa]=Apontyî...
|
|
||||||
Name[xh]=Iyacwangciswa...
|
|
||||||
Name[x-test]=xxSetup...xx
|
|
||||||
Name[zh_CN]=设置...
|
|
||||||
Name[zh_TW]=設定...
|
|
||||||
Icon=kscreensaver
|
|
||||||
|
|
||||||
[Desktop Action InWindow]
|
|
||||||
Exec=krandom.kss -window-id %w
|
|
||||||
Name=Display in Specified Window
|
|
||||||
Name[af]=Vertoon in gespesifiseerde venster
|
|
||||||
Name[ar]=اعرض في النافذة المحددة
|
|
||||||
Name[ast]=Amosar na ventana especificada
|
|
||||||
Name[be]=Паказваць у вызначаным акне
|
|
||||||
Name[be@latin]=Pakažy ŭ aznačanym aknie
|
|
||||||
Name[bg]=Показване в указан прозорец
|
|
||||||
Name[bn]=নির্দিষ্ট উইণ্ডোয় দেখাও
|
|
||||||
Name[bn_IN]=সুনির্দিষ্ট উইন্ডোর মধ্যে প্রদর্শন করা হবে
|
|
||||||
Name[br]=Diskwel er prenestr spisaet
|
|
||||||
Name[bs]=Prikaži u određenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra especificada
|
|
||||||
Name[ca@valencia]=Mostra a la finestra especificada
|
|
||||||
Name[cs]=Zobrazit v určeném okně
|
|
||||||
Name[csb]=Wëskrzëni w pòdónym òknie
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Benodol
|
|
||||||
Name[da]=Visning i angivet vindue
|
|
||||||
Name[de]=In angegebenem Fenster anzeigen
|
|
||||||
Name[el]=Προβολή στο καθορισμένο παράθυρο
|
|
||||||
Name[en_GB]=Display in Specified Window
|
|
||||||
Name[eo]=Montriĝi en indikita fenestro
|
|
||||||
Name[es]=Mostrar en la ventana especificada
|
|
||||||
Name[et]=Määratud aknas näitamine
|
|
||||||
Name[eu]=Bistaratu adierazitako leihoan
|
|
||||||
Name[fa]=نمایش در پنجره مشخصشده
|
|
||||||
Name[fi]=Näytä määrätyssä ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre spécifiée
|
|
||||||
Name[fy]=Werjefte yn in definiëare finster
|
|
||||||
Name[ga]=Taispeáin san Fhuinneog Sonraithe
|
|
||||||
Name[gl]=Mostrar na xanela especificada
|
|
||||||
Name[gu]=સ્પષ્ટ કરેલ વિન્ડોમાં બતાવો
|
|
||||||
Name[he]=הצגה בחלון המצויין
|
|
||||||
Name[hi]=निर्दिष्ट विंडो में प्रदर्शित करें
|
|
||||||
Name[hne]=खास विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u odabranom prozoru
|
|
||||||
Name[hsb]=W podatym woknje pokazać
|
|
||||||
Name[hu]=Megjelenítés egy megadott ablakban
|
|
||||||
Name[ia]=Monstra in le fenestra specificate
|
|
||||||
Name[id]=Tampilkan di Jendela yang Ditentukan
|
|
||||||
Name[is]=Birta í völdum glugga
|
|
||||||
Name[ja]=指定したウィンドウで表示
|
|
||||||
Name[ka]=მოცემულ ფანჯარაში ასახვა
|
|
||||||
Name[kk]=Келтірілген терезеде көрсету
|
|
||||||
Name[km]=បង្ហាញក្នុងបង្អួចដែលបានបញ្ជាក់
|
|
||||||
Name[kn]=ನಿರ್ದಿಷ್ಟಗೊಳಿಸಿದ ಕಿಟಕಿಯಲ್ಲಿ ಪ್ರದರ್ಶಿಸು
|
|
||||||
Name[ko]=지정한 창에 보이기
|
|
||||||
Name[lt]=Rodyti nurodytame lange
|
|
||||||
Name[lv]=Rādīt norādītajā logā
|
|
||||||
Name[mai]=निर्दिष्ट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во наведениот прозорец
|
|
||||||
Name[ml]=വ്യക്തമാക്കിയിട്ടുള്ള ജാലകത്തില് കാണിക്കുക
|
|
||||||
Name[mr]=निर्देशीत चौकटीत दर्शवा
|
|
||||||
Name[ms]=Paparan dalam Tetingkap Yang Dinyatakan
|
|
||||||
Name[nb]=Vis i det valgte vinduet
|
|
||||||
Name[nds]=In't utsöchte Finster wiesen
|
|
||||||
Name[ne]=निर्दिष्ट गरिएको सञ्झ्यालमा प्रदर्शन गर्नुहोस्
|
|
||||||
Name[nl]=In een gedefinieerd venster weergeven
|
|
||||||
Name[nn]=Vis i valt vindauge
|
|
||||||
Name[pa]=ਦਿੱਤੀ ਵਿੰਡੋ ਵਿੱਚ ਵੇਖੋ
|
|
||||||
Name[pl]=Wyświetl w podanym oknie
|
|
||||||
Name[pt]=Mostrar na Janela Indicada
|
|
||||||
Name[pt_BR]=Exibir na janela indicada
|
|
||||||
Name[ro]=Afișează în fereastra specificată
|
|
||||||
Name[ru]=Показать в указанном окне
|
|
||||||
Name[se]=Čájet meroštuvvon láses
|
|
||||||
Name[si]=නිවේශිත කවුළුවේ පෙන්වන්න
|
|
||||||
Name[sk]=Zobraziť v zadanom okne
|
|
||||||
Name[sl]=Prikaži v določenemu oknu
|
|
||||||
Name[sr]=Прикажи у одређеном прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у одређеном прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u određenom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u određenom prozoru
|
|
||||||
Name[sv]=Visa i angivet fönster
|
|
||||||
Name[ta]=குறிப்பிடப்பட்ட சாளரத்தில் காட்டு
|
|
||||||
Name[te]=తెలుపబడిన విండోనందు ప్రదర్శించుము
|
|
||||||
Name[tg]=Намоиш дар тирезаи муайяншуда
|
|
||||||
Name[th]=แสดงในหน้าต่างที่ระบุ
|
|
||||||
Name[tr]=Belirtilen Pencerede Göster
|
|
||||||
Name[ug]=بەلگىلەنگەن كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Показати у вказаному вікні
|
|
||||||
Name[uz]=Koʻrsatilgan oynada koʻrsatish
|
|
||||||
Name[uz@cyrillic]=Кўрсатилган ойнада кўрсатиш
|
|
||||||
Name[vi]=Hiển thị trong cửa sổ được chỉ định
|
|
||||||
Name[wa]=Håyner dins l' finiesse specifieye
|
|
||||||
Name[x-test]=xxDisplay in Specified Windowxx
|
|
||||||
Name[zh_CN]=在指定窗口中显示
|
|
||||||
Name[zh_TW]=在指定的視窗中顯示
|
|
||||||
NoDisplay=true
|
|
||||||
|
|
||||||
[Desktop Action Root]
|
|
||||||
Exec=krandom.kss -root
|
|
||||||
Name=Display in Root Window
|
|
||||||
Name[af]=Vertoon in root venster
|
|
||||||
Name[ar]=اعرض في نافذة الجذر
|
|
||||||
Name[ast]=Amosar na ventana raíz
|
|
||||||
Name[be]=Паказваць у галоўным акне
|
|
||||||
Name[be@latin]=Pakažy ŭ hałoŭnym aknie
|
|
||||||
Name[bg]=Показване в главния прозорец
|
|
||||||
Name[bn]=রুট উইণ্ডোয় দেখাও
|
|
||||||
Name[bn_IN]=Root উইন্ডোর মধ্যে প্রদর্শন করা হবে
|
|
||||||
Name[br]=Diskwel er prenestr gwrizienn
|
|
||||||
Name[bs]=Prikaži u korijenom prozoru
|
|
||||||
Name[ca]=Mostra a la finestra arrel
|
|
||||||
Name[ca@valencia]=Mostra a la finestra arrel
|
|
||||||
Name[cs]=Zobrazit na pozadí plochy
|
|
||||||
Name[csb]=Wëskrzëni w przédnym òknie
|
|
||||||
Name[cy]=Dangos mewn Ffenestr Wraidd
|
|
||||||
Name[da]=Visning i root-vindue
|
|
||||||
Name[de]=Im Basisfenster (Root Window) anzeigen
|
|
||||||
Name[el]=Προβολή στο βασικό παράθυρο
|
|
||||||
Name[en_GB]=Display in Root Window
|
|
||||||
Name[eo]=Montriĝi en radika fenestro
|
|
||||||
Name[es]=Mostrar en la ventana raíz
|
|
||||||
Name[et]=Juuraknas näitamine
|
|
||||||
Name[eu]=Bistaratu erroko leihoan
|
|
||||||
Name[fa]=نمایش در پنجره ریشه
|
|
||||||
Name[fi]=Näytä juuri-ikkunassa
|
|
||||||
Name[fr]=Affichage dans la fenêtre racine
|
|
||||||
Name[fy]=Werjefte yn haadfinster
|
|
||||||
Name[ga]=Taispeáin sa Phríomhfhuinneog
|
|
||||||
Name[gl]=Mostrar na xanela raíz
|
|
||||||
Name[gu]=રૂટ વિન્ડોમાં બતાવો
|
|
||||||
Name[he]=הצגה בחלון השורש
|
|
||||||
Name[hi]=रूट विंडो में प्रदर्शित करें
|
|
||||||
Name[hne]=रूट विंडो मं देखाव
|
|
||||||
Name[hr]=Prikaži u korijenskom prozoru
|
|
||||||
Name[hsb]=W zakładnym woknje pokazać
|
|
||||||
Name[hu]=Megjelenítés a gyökérablakban
|
|
||||||
Name[ia]=Monstra in le fenestra radice (Root)
|
|
||||||
Name[id]=Tampilkan di Jendela Root
|
|
||||||
Name[is]=Birta í bakgrunni skjáborðs
|
|
||||||
Name[ja]=ルートウィンドウで表示
|
|
||||||
Name[ka]=ძირეულ ფანჯარაში ასახვა
|
|
||||||
Name[kk]=Root терезесінде көрсету
|
|
||||||
Name[km]=បង្ហាញក្នុងបង្អួច Root
|
|
||||||
Name[kn]=ಆದ್ಯ (ರೂಟ್) ಕಿಟಕಿಯಲ್ಲಿ ಪ್ರದರ್ಶಿಸು
|
|
||||||
Name[ko]=전체 화면으로 보이기
|
|
||||||
Name[lt]=Rodyti root lange
|
|
||||||
Name[lv]=Rādīt saknes logā
|
|
||||||
Name[mai]=रूट विंडो मे प्रदर्शित करू
|
|
||||||
Name[mk]=Прикажи во кореновиот прозорец
|
|
||||||
Name[ml]=റൂട്ടിനുള്ള ജാലകത്തില് കാണിക്കുക
|
|
||||||
Name[mr]=रूट चौकट मध्ये दर्शवा
|
|
||||||
Name[ms]=Papar dalam Tetingkap Root
|
|
||||||
Name[nb]=Vis i rotvinduet
|
|
||||||
Name[nds]=In't Hööftfinster wiesen
|
|
||||||
Name[ne]=मूल सञ्झ्यालमा प्रदर्शन गर्नुहोस्
|
|
||||||
Name[nl]=In hoofdvenster weergeven
|
|
||||||
Name[nn]=Vis i rotvindauget
|
|
||||||
Name[pa]=ਰੂਟ (root) ਵਿੰਡੋ ਵਿੱਚ ਵੇਖੋ
|
|
||||||
Name[pl]=Wyświetl w oknie głównym
|
|
||||||
Name[pt]=Mostrar na Janela de Fundo
|
|
||||||
Name[pt_BR]=Exibir na janela raiz
|
|
||||||
Name[ro]=Afișează în fereastra rădăcină
|
|
||||||
Name[ru]=Показать в корневом окне
|
|
||||||
Name[se]=Čájet ruohtasláses
|
|
||||||
Name[si]=රූට් කවුළුවේ පෙන්වන්න
|
|
||||||
Name[sk]=Zobraziť v koreňovom okne
|
|
||||||
Name[sl]=Prikaži v korenskem oknu
|
|
||||||
Name[sr]=Прикажи у кореном прозору
|
|
||||||
Name[sr@ijekavian]=Прикажи у корјеном прозору
|
|
||||||
Name[sr@ijekavianlatin]=Prikaži u korjenom prozoru
|
|
||||||
Name[sr@latin]=Prikaži u korenom prozoru
|
|
||||||
Name[sv]=Visa i rotfönstret
|
|
||||||
Name[ta]=மூல சாளரத்தில் காட்டு
|
|
||||||
Name[te]=Root విండోనందు ప్రదర్శించుము
|
|
||||||
Name[tg]=Намоиш дар тирезаи Root
|
|
||||||
Name[th]=แสดงในหน้าต่างราก
|
|
||||||
Name[tr]=Kök Pencerede Göster
|
|
||||||
Name[ug]=غول كۆزنەكتە كۆرسەت
|
|
||||||
Name[uk]=Показати на тлі екрана
|
|
||||||
Name[uz]=Tub oynada koʻrsatish
|
|
||||||
Name[uz@cyrillic]=Туб ойнада кўрсатиш
|
|
||||||
Name[vi]=Hiển thị trong cửa sổ gốc
|
|
||||||
Name[wa]=Håyner el finiesse raecene (li fond do scribanne)
|
|
||||||
Name[x-test]=xxDisplay in Root Windowxx
|
|
||||||
Name[zh_CN]=在 Root 窗口中显示
|
|
||||||
Name[zh_TW]=在 Root 視窗中顯示
|
|
||||||
NoDisplay=true
|
|
|
@ -1,207 +0,0 @@
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// Screen savers for KDE
|
|
||||||
//
|
|
||||||
// Copyright (c) Martin R. Jones 1999
|
|
||||||
//
|
|
||||||
// This is an extremely simple program that starts a random screensaver.
|
|
||||||
//
|
|
||||||
|
|
||||||
#include <config-workspace.h>
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <QLayout>
|
|
||||||
#include <QCheckBox>
|
|
||||||
#include <QWidget>
|
|
||||||
#include <QGridLayout>
|
|
||||||
|
|
||||||
#include <kapplication.h>
|
|
||||||
#include <kstandarddirs.h>
|
|
||||||
#include <kglobal.h>
|
|
||||||
#include <klocale.h>
|
|
||||||
#include <kdesktopfile.h>
|
|
||||||
#include <krandomsequence.h>
|
|
||||||
#include <kdebug.h>
|
|
||||||
#include <kcmdlineargs.h>
|
|
||||||
#include <kdialog.h>
|
|
||||||
#include <kconfig.h>
|
|
||||||
#include <kservice.h>
|
|
||||||
#include <kdeversion.h>
|
|
||||||
#include <kmacroexpander.h>
|
|
||||||
#include <kshell.h>
|
|
||||||
#include "kscreensaver_vroot.h"
|
|
||||||
#include "random.h"
|
|
||||||
#ifdef Q_WS_X11
|
|
||||||
#include <QtGui/qx11info_x11.h>
|
|
||||||
#endif
|
|
||||||
#include <QFrame>
|
|
||||||
#include <kservicetypetrader.h>
|
|
||||||
#include <config-workspace.h>
|
|
||||||
|
|
||||||
void usage(char *name)
|
|
||||||
{
|
|
||||||
puts(i18n("Usage: %1 [-setup] [args]\n"
|
|
||||||
"Starts a random screen saver.\n"
|
|
||||||
"Any arguments (except -setup) are passed on to the screen saver.", name ).toLocal8Bit().data());
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char appName[] = "random";
|
|
||||||
|
|
||||||
static const char description[] = I18N_NOOP("Start a random KDE screen saver");
|
|
||||||
|
|
||||||
static QString exeFromActionGroup(const QList<KServiceAction>& actions, const char* name)
|
|
||||||
{
|
|
||||||
foreach(const KServiceAction& action, actions) {
|
|
||||||
if (action.name() == name) {
|
|
||||||
return action.exec();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return QString();
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
KCmdLineArgs::init(argc, argv, appName, "kscreensaver", ki18n("Random screen saver"),
|
|
||||||
KDE_VERSION_STRING, ki18n(description));
|
|
||||||
|
|
||||||
|
|
||||||
KCmdLineOptions options;
|
|
||||||
|
|
||||||
options.add("setup", ki18n("Setup screen saver"));
|
|
||||||
|
|
||||||
options.add("window-id wid", ki18n("Run in the specified XWindow"));
|
|
||||||
|
|
||||||
options.add("root", ki18n("Run in the root XWindow"));
|
|
||||||
|
|
||||||
KCmdLineArgs::addCmdLineOptions(options);
|
|
||||||
|
|
||||||
KApplication app;
|
|
||||||
|
|
||||||
WId windowId = 0;
|
|
||||||
|
|
||||||
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
|
|
||||||
|
|
||||||
if (args->isSet("setup")) {
|
|
||||||
KRandomSetup setup;
|
|
||||||
setup.exec();
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args->isSet("window-id")) {
|
|
||||||
windowId = args->getOption("window-id").toInt();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef Q_WS_X11
|
|
||||||
if (args->isSet("root")) {
|
|
||||||
QX11Info info;
|
|
||||||
windowId = RootWindow(QX11Info::display(), info.screen());
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
args->clear();
|
|
||||||
const KService::List lst = KServiceTypeTrader::self()->query( "ScreenSaver");
|
|
||||||
KService::List availableSavers;
|
|
||||||
|
|
||||||
KConfig type("krandom.kssrc", KConfig::NoGlobals);
|
|
||||||
const KConfigGroup configGroup = type.group("Settings");
|
|
||||||
const bool manipulatescreen = configGroup.readEntry("ManipulateScreen", false);
|
|
||||||
foreach( const KService::Ptr& service, lst ) {
|
|
||||||
//QString file = KStandardDirs::locate("services", service->entryPath());
|
|
||||||
//kDebug() << "Looking at " << file;
|
|
||||||
const QString saverType = service->property("X-KDE-Type").toString();
|
|
||||||
foreach (const QString &type, saverType.split(QLatin1Char(';'))) {
|
|
||||||
//kDebug() << "saverTypes is "<< type;
|
|
||||||
if (type == QLatin1String("ManipulateScreen")) {
|
|
||||||
if (!manipulatescreen) {
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
availableSavers.append(service);
|
|
||||||
fail: ;
|
|
||||||
}
|
|
||||||
|
|
||||||
KRandomSequence rnd;
|
|
||||||
const int indx = rnd.getLong(availableSavers.count());
|
|
||||||
const KService::Ptr service = availableSavers.at(indx);
|
|
||||||
const QList<KServiceAction> actions = service->actions();
|
|
||||||
|
|
||||||
QString cmd;
|
|
||||||
if (windowId) {
|
|
||||||
cmd = exeFromActionGroup(actions, "InWindow");
|
|
||||||
}
|
|
||||||
if (cmd.isEmpty() && windowId == 0) {
|
|
||||||
cmd = exeFromActionGroup(actions, "Root");
|
|
||||||
}
|
|
||||||
if (cmd.isEmpty()) {
|
|
||||||
cmd = service->exec();
|
|
||||||
}
|
|
||||||
|
|
||||||
QHash<QChar, QString> keyMap;
|
|
||||||
keyMap.insert('w', QString::number(windowId));
|
|
||||||
const QStringList words = KShell::splitArgs(KMacroExpander::expandMacrosShellQuote(cmd, keyMap));
|
|
||||||
if (!words.isEmpty()) {
|
|
||||||
QString exeFile = KStandardDirs::findExe(words.first());
|
|
||||||
if (!exeFile.isEmpty()) {
|
|
||||||
char **sargs = new char *[words.size() + 1];
|
|
||||||
int i = 0;
|
|
||||||
for (; i < words.size(); i++)
|
|
||||||
sargs[i] = qstrdup(words[i].toLocal8Bit().constData());
|
|
||||||
sargs[i] = 0;
|
|
||||||
|
|
||||||
execv(exeFile.toLocal8Bit(), sargs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we end up here then we couldn't start a saver.
|
|
||||||
// If we have been supplied a window id or root window then blank it.
|
|
||||||
#ifdef Q_WS_X11
|
|
||||||
QX11Info info;
|
|
||||||
Window win = windowId ? windowId : RootWindow(QX11Info::display(), info.screen());
|
|
||||||
XSetWindowBackground(QX11Info::display(), win,
|
|
||||||
BlackPixel(QX11Info::display(), info.screen()));
|
|
||||||
XClearWindow(QX11Info::display(), win);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
KRandomSetup::KRandomSetup( QWidget *parent, const char *name )
|
|
||||||
: KDialog( parent )
|
|
||||||
{
|
|
||||||
setObjectName( name );
|
|
||||||
setModal( true );
|
|
||||||
setCaption( i18n( "Setup Random Screen Saver" ) );
|
|
||||||
setButtons( Ok | Cancel );
|
|
||||||
|
|
||||||
QFrame *main = new QFrame( this );
|
|
||||||
setMainWidget( main );
|
|
||||||
QGridLayout *grid = new QGridLayout(main );
|
|
||||||
grid->setSpacing( spacingHint() );
|
|
||||||
|
|
||||||
manipulateScreen = new QCheckBox(i18n("Use screen savers that manipulate the screen"), main);
|
|
||||||
grid->addWidget(manipulateScreen, 0, 0);
|
|
||||||
|
|
||||||
setMinimumSize( sizeHint() );
|
|
||||||
|
|
||||||
KConfig config("krandom.kssrc", KConfig::NoGlobals);
|
|
||||||
const KConfigGroup configGroup = config.group("Settings");
|
|
||||||
manipulateScreen->setChecked(configGroup.readEntry("ManipulateScreen", true));
|
|
||||||
|
|
||||||
connect( this, SIGNAL(okClicked()), SLOT(slotOk()) );
|
|
||||||
}
|
|
||||||
|
|
||||||
void KRandomSetup::slotOk()
|
|
||||||
{
|
|
||||||
KConfig config("krandom.kssrc");
|
|
||||||
KConfigGroup configGroup = config.group("Settings");
|
|
||||||
configGroup.writeEntry("ManipulateScreen", manipulateScreen->isChecked());
|
|
||||||
|
|
||||||
accept();
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "moc_random.cpp"
|
|
|
@ -1,33 +0,0 @@
|
||||||
/*
|
|
||||||
Copyright (c) 2003 Chris Howells <howells@kde.org>
|
|
||||||
|
|
||||||
*************************************************************************
|
|
||||||
* *
|
|
||||||
* This program 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; version *
|
|
||||||
* 2 of the License. *
|
|
||||||
* *
|
|
||||||
*************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef RANDOM_H
|
|
||||||
#define RANDOM_H
|
|
||||||
|
|
||||||
#include <QWidget>
|
|
||||||
#include <QCheckBox>
|
|
||||||
|
|
||||||
class KRandomSetup : public KDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
KRandomSetup( QWidget *parent = NULL, const char *name = NULL );
|
|
||||||
|
|
||||||
private:
|
|
||||||
QCheckBox *manipulateScreen;
|
|
||||||
|
|
||||||
private Q_SLOTS:
|
|
||||||
void slotOk();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // RANDOM_H
|
|
167
kscreensaver/kscreensaver.cpp
Normal file
167
kscreensaver/kscreensaver.cpp
Normal file
|
@ -0,0 +1,167 @@
|
||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 2022 Ivailo Monev <xakepa10@gmail.com>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License version 2, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
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
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public License
|
||||||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "kscreensaver.h"
|
||||||
|
#include "screensaveradaptor.h"
|
||||||
|
|
||||||
|
#include <QCoreApplication>
|
||||||
|
#include <QProcess>
|
||||||
|
#include <kdebug.h>
|
||||||
|
#include <kidletime.h>
|
||||||
|
|
||||||
|
static const uint ChangeScreenSettings = 4;
|
||||||
|
|
||||||
|
// TODO: disable via config
|
||||||
|
// TODO: watch the xscreensaver state and emit ActiveChanged() signal
|
||||||
|
|
||||||
|
KScreenSaver::KScreenSaver(QObject *parent)
|
||||||
|
: QObject(parent),
|
||||||
|
m_inhibitionscounter(0)
|
||||||
|
{
|
||||||
|
(void)new ScreenSaverAdaptor(this);
|
||||||
|
|
||||||
|
QDBusConnection connection = QDBusConnection::sessionBus();
|
||||||
|
const bool object = connection.registerObject("/ScreenSaver", this);
|
||||||
|
if (object) {
|
||||||
|
const bool service = connection.registerService("org.freedesktop.ScreenSaver");
|
||||||
|
if (service) {
|
||||||
|
kDebug() << "kscreensaver is online";
|
||||||
|
} else {
|
||||||
|
kWarning() << "could not register object" << connection.lastError().message();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
kWarning() << "could not register object" << connection.lastError().message();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QProcess::startDetached(
|
||||||
|
QString::fromLatin1("xscreensaver"),
|
||||||
|
QStringList() << QString::fromLatin1("-nosplash")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool KScreenSaver::GetActive()
|
||||||
|
{
|
||||||
|
// qDebug() << Q_FUNC_INFO;
|
||||||
|
return (GetActiveTime() > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint KScreenSaver::GetActiveTime()
|
||||||
|
{
|
||||||
|
// qDebug() << Q_FUNC_INFO;
|
||||||
|
if (!m_activetimer.isValid()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return m_activetimer.elapsed();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint KScreenSaver::GetSessionIdleTime()
|
||||||
|
{
|
||||||
|
// qDebug() << Q_FUNC_INFO;
|
||||||
|
return KIdleTime::instance()->idleTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
void KScreenSaver::Lock()
|
||||||
|
{
|
||||||
|
// qDebug() << Q_FUNC_INFO;
|
||||||
|
const bool xscreensaverstatus = QProcess::execute(
|
||||||
|
QString::fromLatin1("xscreensaver-command"),
|
||||||
|
QStringList() << QString::fromLatin1("-lock")
|
||||||
|
);
|
||||||
|
if (xscreensaverstatus) {
|
||||||
|
m_activetimer.start();
|
||||||
|
} else {
|
||||||
|
kWarning() << "Could not lock";
|
||||||
|
m_activetimer.invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool KScreenSaver::SetActive(bool active)
|
||||||
|
{
|
||||||
|
// qDebug() << Q_FUNC_INFO << active;
|
||||||
|
bool xscreensaverstatus = false;
|
||||||
|
if (active) {
|
||||||
|
xscreensaverstatus = QProcess::execute(
|
||||||
|
QString::fromLatin1("xscreensaver-command"),
|
||||||
|
QStringList() << QString::fromLatin1("-activate")
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
xscreensaverstatus = QProcess::execute(
|
||||||
|
QString::fromLatin1("xscreensaver-command"),
|
||||||
|
QStringList() << QString::fromLatin1("-deactivate")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!xscreensaverstatus) {
|
||||||
|
kWarning() << "Could not set activity";
|
||||||
|
} else {
|
||||||
|
emit ActiveChanged(active);
|
||||||
|
}
|
||||||
|
return xscreensaverstatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
void KScreenSaver::SimulateUserActivity()
|
||||||
|
{
|
||||||
|
// qDebug() << Q_FUNC_INFO;
|
||||||
|
KIdleTime::instance()->simulateUserActivity();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint KScreenSaver::Inhibit(const QString &application_name, const QString &reason_for_inhibit)
|
||||||
|
{
|
||||||
|
// qDebug() << Q_FUNC_INFO << application_name << reason_for_inhibit;
|
||||||
|
m_inhibitionscounter++;
|
||||||
|
QDBusInterface policyAgent(
|
||||||
|
"org.kde.Solid.PowerManagement",
|
||||||
|
"/org/kde/Solid/PowerManagement/PolicyAgent",
|
||||||
|
"org.kde.Solid.PowerManagement.PolicyAgent",
|
||||||
|
QDBusConnection::sessionBus()
|
||||||
|
);
|
||||||
|
policyAgent.asyncCall("AddInhibition", ChangeScreenSettings, application_name, reason_for_inhibit);
|
||||||
|
return m_inhibitionscounter;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint KScreenSaver::Throttle(const QString &application_name, const QString &reason_for_inhibit)
|
||||||
|
{
|
||||||
|
// qDebug() << Q_FUNC_INFO << application_name << reason_for_inhibit;
|
||||||
|
// was not implemented before either
|
||||||
|
Q_UNUSED(application_name);
|
||||||
|
Q_UNUSED(reason_for_inhibit);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void KScreenSaver::UnInhibit(uint cookie)
|
||||||
|
{
|
||||||
|
// qDebug() << Q_FUNC_INFO << cookie;
|
||||||
|
if (m_inhibitions.contains(cookie)) {
|
||||||
|
QDBusInterface policyAgent(
|
||||||
|
"org.kde.Solid.PowerManagement",
|
||||||
|
"/org/kde/Solid/PowerManagement/PolicyAgent",
|
||||||
|
"org.kde.Solid.PowerManagement.PolicyAgent",
|
||||||
|
QDBusConnection::sessionBus()
|
||||||
|
);
|
||||||
|
policyAgent.asyncCall("ReleaseInhibition", cookie);
|
||||||
|
m_inhibitions.removeAll(cookie);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void KScreenSaver::UnThrottle(uint cookie)
|
||||||
|
{
|
||||||
|
// qDebug() << Q_FUNC_INFO << cookie;
|
||||||
|
// was not implemented before either
|
||||||
|
Q_UNUSED(cookie);
|
||||||
|
}
|
11
kscreensaver/kscreensaver.desktop
Normal file
11
kscreensaver/kscreensaver.desktop
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Icon=system-lock-screen
|
||||||
|
Name=Screen saver
|
||||||
|
Comment=Screen saver service
|
||||||
|
Type=Service
|
||||||
|
X-KDE-ServiceTypes=KDEDModule
|
||||||
|
X-KDE-Library=kscreensaver
|
||||||
|
X-KDE-DBus-ModuleName=kscreensaver
|
||||||
|
X-KDE-Kded-autoload=true
|
||||||
|
X-KDE-Kded-load-on-demand=false
|
||||||
|
OnlyShowIn=KDE;
|
55
kscreensaver/kscreensaver.h
Normal file
55
kscreensaver/kscreensaver.h
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
/* This file is part of the KDE project
|
||||||
|
Copyright (C) 2022 Ivailo Monev <xakepa10@gmail.com>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License version 2, as published by the Free Software Foundation.
|
||||||
|
|
||||||
|
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
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public License
|
||||||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef KSCREENSAVER_H
|
||||||
|
#define KSCREENSAVER_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QElapsedTimer>
|
||||||
|
|
||||||
|
class KScreenSaver : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
KScreenSaver(QObject *parent = nullptr);
|
||||||
|
|
||||||
|
public Q_SLOTS:
|
||||||
|
bool GetActive();
|
||||||
|
uint GetActiveTime();
|
||||||
|
uint GetSessionIdleTime();
|
||||||
|
|
||||||
|
void Lock();
|
||||||
|
bool SetActive(bool active);
|
||||||
|
|
||||||
|
void SimulateUserActivity();
|
||||||
|
|
||||||
|
uint Inhibit(const QString &application_name, const QString &reason_for_inhibit);
|
||||||
|
uint Throttle(const QString &application_name, const QString &reason_for_inhibit);
|
||||||
|
void UnInhibit(uint cookie);
|
||||||
|
void UnThrottle(uint cookie);
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
void ActiveChanged(bool active);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QElapsedTimer m_activetimer;
|
||||||
|
uint m_inhibitionscounter;
|
||||||
|
QList<uint> m_inhibitions;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // KSCREENSAVER_H
|
|
@ -1,40 +0,0 @@
|
||||||
########### next target ###############
|
|
||||||
|
|
||||||
set(kscreensaver_LIB_SRCS main.cpp kscreensaver.cpp)
|
|
||||||
|
|
||||||
add_library(kscreensaver SHARED ${kscreensaver_LIB_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(kscreensaver PUBLIC
|
|
||||||
${KDE4_KIO_LIBS}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(kscreensaver PRIVATE
|
|
||||||
${X11_X11_LIB}
|
|
||||||
)
|
|
||||||
|
|
||||||
set_target_properties(kscreensaver PROPERTIES
|
|
||||||
VERSION ${GENERIC_LIB_VERSION}
|
|
||||||
SOVERSION ${GENERIC_LIB_SOVERSION}
|
|
||||||
)
|
|
||||||
|
|
||||||
generate_export_header(kscreensaver)
|
|
||||||
|
|
||||||
install(
|
|
||||||
TARGETS kscreensaver
|
|
||||||
EXPORT kdeworkspaceLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}
|
|
||||||
)
|
|
||||||
install(
|
|
||||||
FILES screensaver.desktop
|
|
||||||
DESTINATION ${KDE4_SERVICETYPES_INSTALL_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
########### install files ###############
|
|
||||||
|
|
||||||
install(
|
|
||||||
FILES
|
|
||||||
kscreensaver.h
|
|
||||||
kscreensaver_vroot.h
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/kscreensaver_export.h
|
|
||||||
DESTINATION ${KDE4_INCLUDE_INSTALL_DIR}
|
|
||||||
COMPONENT Devel
|
|
||||||
)
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
$XGETTEXT *.cpp *.h -o $podir/libkscreensaver.pot
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue