Cherry-picking upstream release 0.11.0.

* Synced debian foo with experimental
* Bumped Standards to 3.9.8, no changes needed
* Bumped compat to 10
* Removed --parallel from rules, standard compat 10
* Bumped minimum version debhelper (>= 10)
* Bumped minimum version liblxqt0-dev (>= 0.11.0)
* Bumped minimum version liblxqt-globalkeys0-dev (>= 0.11.0),
* Bumped minimum version liblxqt-globalkeys-ui0-dev (>= 0.11.0),
* Bumped minimum version libsysstat-qt5-0-dev (>= 0.3.2)
* Added build-dependency libqt5svg5-dev
* Added build-dependency libqtxdg-dev (>= 2.0.0)
* Added build-dependency libqt5xdgiconloader-dev (>= 2.0.0)
* Added Recommends lxqt-panel-l10n
* Fixed VCS fields, point to the right branch
* Fixed copyrights Format field to https
* Bumped years in copyrights
* Added translation control to rules
* Added hardening options
* Set CMAKE_BUILD_TYPE=RelWithDebInfo
* Exported LC_ALL=C.UTF-8, make builds reproducible
ubuntu/bionic debian/0.11.0-2
Alf Gaida 8 years ago
parent 2cce941f69
commit 7c5b13d1f4

1
.gitignore vendored

@ -1,3 +1,4 @@
build
*.kdev4
CMakeLists.txt.user
*/translations/lxqt-panel

@ -4,7 +4,7 @@ Upstream Authors:
Copyright:
Copyright (c) 2010-2012 Razor team
Copyright (c) 2012-2014 LXQt team
Copyright (c) 2012-2016 LXQt team
License: GPL-2 and LGPL-2.1+
License: LGPL-2.1+
The full text of the licenses can be found in the 'COPYING' file.

File diff suppressed because it is too large Load Diff

@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
project(lxqt-panel)
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
option(PULL_TRANSLATIONS "Pull translations" ON)
option(WITH_SCREENSAVER_FALLBACK "Include support for converting the deprecated 'screensaver' plugin to 'quicklaunch'. This requires the lxqt-leave (lxqt-session) to be installed in runtime." ON)
# additional cmake files
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
@ -34,8 +36,6 @@ if (CMAKE_COMPILER_IS_GNUCXX)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-no-undefined")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
#########################################################################
add_definitions (-Wall)
@ -63,7 +63,10 @@ include(LXQtTranslate)
# Warning: This must be before add_subdirectory(panel). Move with caution.
set(PLUGIN_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/lxqt-panel")
add_definitions(-DPLUGIN_DIR=\"${PLUGIN_DIR}\")
add_definitions(
-DPLUGIN_DIR=\"${PLUGIN_DIR}\"
-DQT_USE_QSTRINGBUILDER
)
message(STATUS "Panel plugins location: ${PLUGIN_DIR}")
#########################################################################
@ -96,14 +99,11 @@ setByDefault(CPULOAD_PLUGIN Yes)
if(CPULOAD_PLUGIN)
find_library(STATGRAB_LIB statgrab)
if(NOT(${STATGRAB_LIB} MATCHES "NOTFOUND"))
list(APPEND ENABLED_PLUGINS "Cpu Load")
add_subdirectory(plugin-cpuload)
else()
message(STATUS "")
message(STATUS "CPU Load plugin requires libstatgrab")
message(STATUS "")
if(NOT STATGRAB_LIB)
message(FATAL_ERROR "CPU Load plugin requires libstatgrab")
endif()
list(APPEND ENABLED_PLUGINS "Cpu Load")
add_subdirectory(plugin-cpuload)
endif()
setByDefault(DIRECTORYMENU_PLUGIN Yes)
@ -154,24 +154,15 @@ if(QUICKLAUNCH_PLUGIN)
add_subdirectory(plugin-quicklaunch)
endif()
setByDefault(SCREENSAVER_PLUGIN Yes)
if(SCREENSAVER_PLUGIN)
list(APPEND ENABLED_PLUGINS "Screensaver")
add_subdirectory(plugin-screensaver)
endif()
setByDefault(SENSORS_PLUGIN Yes)
if(SENSORS_PLUGIN)
find_library(SENSORS_LIB sensors)
if(NOT(${SENSORS_LIB} MATCHES "NOTFOUND"))
list(APPEND ENABLED_PLUGINS "Sensors")
add_subdirectory(plugin-sensors)
else()
message(STATUS "")
message(STATUS "Sensors plugin requires lm_sensors")
message(STATUS "")
if(NOT SENSORS_LIB)
message(FATAL_ERROR "Sensors plugin requires lm_sensors")
endif()
list(APPEND ENABLED_PLUGINS "Sensors")
add_subdirectory(plugin-sensors)
endif()
setByDefault(SHOWDESKTOP_PLUGIN Yes)
@ -186,14 +177,11 @@ setByDefault(NETWORKMONITOR_PLUGIN Yes)
if(NETWORKMONITOR_PLUGIN)
find_library(STATGRAB_LIB statgrab)
if(NOT(${STATGRAB_LIB} MATCHES "NOTFOUND"))
list(APPEND ENABLED_PLUGINS "Network Monitor")
add_subdirectory(plugin-networkmonitor)
else()
message(STATUS "")
message(STATUS "Network Monitor plugin requires libstatgrab")
message(STATUS "")
if(NOT STATGRAB_LIB)
message(FATAL_ERROR "Network Monitor plugin requires libstatgrab")
endif()
list(APPEND ENABLED_PLUGINS "Network Monitor")
add_subdirectory(plugin-networkmonitor)
endif()
setByDefault(SYSSTAT_PLUGIN Yes)
@ -232,27 +220,25 @@ setByDefault(VOLUME_USE_ALSA Yes)
if(VOLUME_PLUGIN)
if (VOLUME_USE_PULSEAUDIO)
find_package(PulseAudio)
if (NOT PULSEAUDIO_FOUND)
message(FATAL_ERROR "PulseAudio not found, but required (VOLUME_USE_PULSEAUDIO) for Volume plugin!")
endif ()
endif(VOLUME_USE_PULSEAUDIO)
if(VOLUME_USE_ALSA)
find_package(ALSA)
if (NOT ALSA_FOUND)
message(FATAL_ERROR "ALSA not found, but required (VOLUME_USE_ALSA) for Volume plugin!")
endif ()
endif()
if(PULSEAUDIO_FOUND OR ALSA_FOUND)
list(APPEND ENABLED_PLUGINS "Volume")
message(STATUS "")
message(STATUS "Volume plugin will be built")
message(STATUS " ALSA: ${ALSA_FOUND}")
message(STATUS " PulseAudio: ${PULSEAUDIO_FOUND}")
message(STATUS "")
add_subdirectory(plugin-volume)
else()
message(STATUS "")
message(STATUS "Volume plugin requires pulseaudio or alsa")
message(STATUS " ALSA: ${ALSA_FOUND}")
message(STATUS " PulseAudio: ${PULSEAUDIO_FOUND}")
message(STATUS "")
endif()
list(APPEND ENABLED_PLUGINS "Volume")
message(STATUS "")
message(STATUS "Volume plugin will be built")
message(STATUS " ALSA: ${ALSA_FOUND}")
message(STATUS " PulseAudio: ${PULSEAUDIO_FOUND}")
message(STATUS "")
add_subdirectory(plugin-volume)
endif()
setByDefault(WORLDCLOCK_PLUGIN Yes)

@ -0,0 +1,61 @@
# lxqt-panel
## Overview
`lxqt-panel` represents the taskbar of LXQt.
The elements available in lxqt-panel are called "plugin" technically. This applies e. g. to the source code where they reside in directories `./plugin-<plugin>` like `plugin-mainmenu`. In contrast to this they are called "widgets" by the configuration GUI so far. Also, a more descriptive term is used to refer to distinct plugins within the GUI. E. g. the aforementioned `plugin-mainmenu` is called "Application menu" that way.
Configuration dialogue "Add Plugins", see [below](https://github.com/pmattern/lxqt-panel/tree/readme#customizing), is listing all available plugins plus a short description and hence provides an overview of the available ones.
Notes on some of the plugins, sorted by terms used within the GUI in alphabetical order, technical term in parenthesis:
#### Date & time (plugin-clock) / World clock (plugin-worldclock)
Both provide clock and calendar functionality. plugin-worldclock can display various time zones in addition but lacks a tooltip displaying current date und time upon hovering.
These plugins will probably be merged into one, see https://github.com/lxde/lxqt/issues/312.
#### Quick launch (plugin-quicklaunch)
A plugin to launch applications from the panel. By default it is empty and displays a message "Drop application icons here". Applications need to be available in panel's main menu and can be included into plugin-quicklaunch by drag & drop.
#### Status Notifier Plugin (plugin-statusnotifier) / System Tray (plugin-tray)
Both provide a notification area within the panel, that is an area where arbitrary applications can place informational icons. This is frequently used e. g. by chat or mail clients to inform about incoming messages or tools configuring the network to inform about connections. (So it's some kind of counterpart to the desktop notifications displayed by [lxqt-notificationd](https://github.com/lxde/lxqt-notificationd)).
The difference between the two plugins is a technical one. **plugin-tray** is implementing the so-called [System Tray Protocol](https://www.freedesktop.org/wiki/Specifications/systemtray-spec). It's a specification that has been around for years but has some serious technical limitations and in particular won't work under Wayland. **plugin-statusnotifier** on the other hand is implementing the so-called [StatusNotifierItem (SNI)](https://www.freedesktop.org/wiki/Specifications/StatusNotifierItem) specification which can be considered a successor of the System Tray Protocol.
Both plugins are maintained in parallel as not all relevant applications are compatible with SNI so far. In particular both Qt 4 and all GTK applications need some kind of wrapper to deal with it. Both plugins can be used in parallel without any issue, applications supporting both specifications will normally chose to display their icons in plugin-statusnotifier.
#### Volume control (plugin-volume)
As indicated by the name, a volume control. Technically Alsa, OSS and PulseAudio can be used as backend. The plugin itself is providing a control to adjust the main volume only but it allows for launching specific UIs of the backend in use like e. g. [pavucontrol-qt](https://github.com/lxde/pavucontrol-qt) to adjust PulseAudio.
## Installation
### Compiling source code
The runtime dependencies are libxcomposite, libdbusmenu-qt5, KGuiAddons, KWindowSystem, Solid, menu-cache, lxmenu-data, [liblxqt](https://github.com/lxde/liblxqt) and [lxqt-globalkeys](https://github.com/lxde/lxqt-globalkeys).
Several plugins or features thereof are optional and need additional runtime dependencies. Namely these are (plugin / feature in parenthesis) Alsa library (Alsa support in plugin-volume), PulseAudio client library (PulseAudio support in plugin-volume), lm-sensors (plugin-sensors), libstatgrab (plugin-cpuload, plugin-networkmonitor), [libsysstat](https://github.com/lxde/libsysstat) (plugin-sysstat). All of them are enabled by default and have to be disabled by CMake variables as required, see below.
In addition CMake is a mandatory build dependency. Git is optionally needed to pull latest VCS checkouts. The localization files were outsourced to repository [lxqt-l10n](https://github.com/lxde/lxqt-l10n) so the corresponding dependencies are needed, too. Please refer to this repository's `README.md` for further information.
Code configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX` has to be set to `/usr` on most operating systems, depending on the way library paths are dealt with on 64bit systems variables like CMAKE_INSTALL_LIBDIR may have to be set as well.
By default all available plugins and features thereof are built and CMake fails when dependencies aren't met. Building particular plugins can be disabled by boolean CMake variables `<plugin>_PLUGIN` where the plugin is referred by its technical term like e. g. in `SYSSTAT_PLUGIN`. Alsa and PulseAudio support in plugin-volume can be disabled by boolean CMake variables `VOLUME_USE_ALSA` and `VOLUME_USE_PULSEAUDIO`.
To build run `make`, to install `make install` which accepts variable `DESTDIR` as usual.
### Binary packages
Official binary packages are provided by all major Linux distributions like Arch Linux, Debian (as of Debian stretch only), Fedora and openSUSE. Just use your package manager to search for string `lxqt-panel`.
## Configuration, Usage
### Launching
The panel is run as a daemon-like [LXQt Module](https://github.com/lxde/lxqt-session#lxqt-modules) the launch of which can be adjusted in section "Basic Settings" of configuration dialogue [LXQt Session Settings](https://github.com/lxde/lxqt-session#lxqt-session-settings) of [lxqt-session](https://github.com/lxde/lxqt-session).
### Customizing
To customize the panel itself there's a context menu, that is a menu opened by right-clicking the pointer device. It is comprising sections "\<plugin\>" and "Panel" which allow for configuring the plugin the pointer is currently over and the panel as a whole respectively.
In section "Panel" topics "Configure Panel" and "Manage Widgets" open different panes of a dialogue "Configure Panel" which allow for configuring the panel as a whole and the various plugins respectively.
Pane "Widgets" allows for configuring and removing all plugins currently included in lxqt-panel. The plus sign opens another dialogue "Add plugins" which is used to add plugins. It comes with a list of all plugins plus some short descriptions and can hence serve as overview what plugins are available.
Sometimes right-clicking over particular plugins may bring up a context menu dealing with the respective plugin's functionality *only* which means the plugin in question cannot be configured the usual way. This affects e. g. plugin-quicklaunch as soon as items were added (the context menu is limited to topics dealing with the items included in plugin-quicklaunch).
Currently there are two ways to deal with this. Some themes like e. g. `Frost` come with handles at the plugins' left end providing the regular context menu. Also, it can be assumed at least one plugin is included in the panel that's always featuring the regular context menu like e. g. plugin-mainmenu. Either way pane "Widgets" of "Configure Panel" can be accessed and used to configure the particular plugin.

@ -17,6 +17,16 @@ MACRO (BUILD_LXQT_PLUGIN NAME)
${NAME}
INSTALL_DIR
${LXQT_TRANSLATIONS_DIR}/${PROGRAM}/${NAME}
PULL_TRANSLATIONS
${PULL_TRANSLATIONS}
CLEAN_TRANSLATIONS
${CLEAN_TRANSLATIONS}
TRANSLATIONS_REPO
${TRANSLATIONS_REPO}
TRANSLATIONS_REFSPEC
${TRANSLATIONS_REFSPEC}
REPO_SUBDIR
"${PROGRAM}/plugin-${NAME}"
)
#lxqt_translate_to(QM_FILES ${CMAKE_INSTALL_FULL_DATAROOTDIR}/lxqt/${PROGRAM}/${PROJECT_NAME})

2
debian/.gitignore vendored

@ -1,7 +1,7 @@
/*.debhelper
/*.log
/*.substvars
/debhelper-build-stamp
/files
/lxqt-panel/
/lxqt-panel-dbg/

26
debian/changelog vendored

@ -1,3 +1,29 @@
lxqt-panel (0.11.0-2) unstable; urgency=medium
* Cherry-picking upstream release 0.11.0.
* Synced debian foo with experimental
* Bumped Standards to 3.9.8, no changes needed
* Bumped compat to 10
* Removed --parallel from rules, standard compat 10
* Bumped minimum version debhelper (>= 10)
* Bumped minimum version liblxqt0-dev (>= 0.11.0)
* Bumped minimum version liblxqt-globalkeys0-dev (>= 0.11.0),
* Bumped minimum version liblxqt-globalkeys-ui0-dev (>= 0.11.0),
* Bumped minimum version libsysstat-qt5-0-dev (>= 0.3.2)
* Added build-dependency libqt5svg5-dev
* Added build-dependency libqtxdg-dev (>= 2.0.0)
* Added build-dependency libqt5xdgiconloader-dev (>= 2.0.0)
* Added Recommends lxqt-panel-l10n
* Fixed VCS fields, point to the right branch
* Fixed copyrights Format field to https
* Bumped years in copyrights
* Added translation control to rules
* Added hardening options
* Set CMAKE_BUILD_TYPE=RelWithDebInfo
* Exported LC_ALL=C.UTF-8, make builds reproducible
-- Alf Gaida <agaida@siduction.org> Tue, 18 Oct 2016 22:10:42 +0200
lxqt-panel (0.10.0-8) unstable; urgency=medium
[ Ralf Jung ]

2
debian/compat vendored

@ -1 +1 @@
9
10

19
debian/control vendored

@ -5,24 +5,26 @@ Uploaders: Alf Gaida <agaida@siduction.org>,
Andrew Lee (李健秋) <ajqlee@debian.org>
Section: x11
Priority: optional
Build-Depends: cmake (>= 3.0.2),
debhelper (>= 9),
Build-Depends: debhelper (>= 10),
cmake (>= 3.0.2),
libasound2-dev,
libdbusmenu-qt5-dev,
libglib2.0-dev,
libicu-dev,
liblxqt0-dev (>= 0.10.0),
liblxqt-globalkeys0-dev,
liblxqt-globalkeys-ui0-dev,
libkf5windowsystem-dev,
libkf5solid-dev,
liblxqt0-dev (>= 0.11.0),
liblxqt-globalkeys0-dev (>= 0.11.0),
liblxqt-globalkeys-ui0-dev (>= 0.11.0),
libmenu-cache-dev,
libpulse-dev,
libqt5svg5-dev,
libqt5x11extras5-dev,
libqt5xdg-dev (>= 1.3.0),
libqt5xdg-dev (>= 2.0.0),
libqt5xdgiconloader-dev (>= 2.0.0),
libsensors4-dev [!hurd-any],
libstatgrab-dev [linux-any],
libsysstat-qt5-0-dev (>= 0.3.0),
libsysstat-qt5-0-dev (>= 0.3.2),
libx11-dev,
libxcomposite-dev,
libxcb-util0-dev,
@ -35,7 +37,7 @@ Build-Depends: cmake (>= 3.0.2),
pkg-config,
qttools5-dev,
qttools5-dev-tools
Standards-Version: 3.9.7
Standards-Version: 3.9.8
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-lxqt/lxqt-panel.git/?h=debian/sid
Vcs-Git: https://anonscm.debian.org/git/pkg-lxqt/lxqt-panel.git
Homepage: https://github.com/lxde/lxqt-panel
@ -45,6 +47,7 @@ Architecture: any
Depends: ${misc:Depends},
${shlibs:Depends},
lxmenu-data
Recommends: lxqt-panel-l10n
Description: LXQt desktop panel
The LXQt desktop panel
.

7
debian/copyright vendored

@ -1,14 +1,14 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: lxqt-panel
Source: https://github.com/lxde/lxqt-panel
Files: *
Copyright: 2012-2015 LXQt team
Copyright: 2012-2016 LXQt team
2010-2012 Razor team
License: LGPL-2.1+
Files: debian/*
Copyright: 2014-2015 Alf Gaida <agaida@siduction.org>
Copyright: 2014-2016 Alf Gaida <agaida@siduction.org>
2015 Andrew Lee (李健秋) <ajqlee@debian.org>
License: LGPL-2.1+
@ -25,4 +25,3 @@ License: LGPL-2.1+
.
On Debian systems, the complete text of the GNU Lesser General
Public License version 2.1 can be found in "/usr/share/common-licenses/LGPL-2.1".

1
debian/docs vendored

@ -1 +1,2 @@
AUTHORS
README.md

16
debian/rules vendored

@ -1,7 +1,9 @@
#!/usr/bin/make -f
#export DH_VERBOSE=1
# export DH_VERBOSE=1
export LC_ALL=C.UTF-8
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
@ -10,12 +12,16 @@ ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
endif
ifeq ($(DEB_HOST_ARCH_OS), hurd)
NOT_LINUX := -DCPULOAD_PLUGIN=NO -DNETWORKMONITOR_PLUGIN=NO -DVOLUME_PLUGIN=NO -DSENSORS_PLUGIN=NO
NOT_LINUX := -DCPULOAD_PLUGIN=NO -DNETWORKMONITOR_PLUGIN=NO -DVOLUME_PLUGIN=NO -DSENSORS_PLUGIN=NO
endif
%:
dh ${@} --buildsystem cmake \
--parallel
dh ${@} --buildsystem cmake
override_dh_auto_configure:
dh_auto_configure -- -DDOM_PLUGIN=YES $(NOT_LINUX)
dh_auto_configure --\
-DPULL_TRANSLATIONS=OFF\
-DUPDATE_TRANSLATIONS=OFF\
-DDOM_PLUGIN=YES\
-DCMAKE_BUILD_TYPE=RelWithDebInfo\
$(NOT_LINUX)

@ -1,63 +1,50 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.22 (GNU/Linux)
mQINBFJevCYBEACx+Hvy+Vsuf+V5jeLUnzjAmHoy8DfTeGWr3ts30IapLHrfi0+U
WpzNnISO77yTr4VNboVZH+GHM/rnPfieODfB4ZW6CZLlInMSKUXcgQsEqXpyBZhA
Ib/SPy2bOfHly1uRJes0uRDsH5+v/hD74sByfnjQlrvI68O6wvGZmDFMNNPVO8+/
OWBSBNkBuVrrZOMSPsLwQGJ4UtUQ4whburaPJG4VZJc5DLbzJGbEuACc0IAEYJS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g7KJNRjme+6GjqQfk=
=h7ww
-----END PGP PUBLIC KEY BLOCK-----

4
debian/watch vendored

@ -1,3 +1,3 @@
version=3
version=4
opts="pgpsigurlmangle=s/$/.asc/" \
https://github.com/lxde/lxqt-panel/releases .*/([\d\.]+).tar.gz
https://github.com/lxde/lxqt-panel/releases .*/lxqt-panel-([\d\.]+).tar.xz

@ -2,10 +2,13 @@ set(PROJECT lxqt-panel)
set(PRIV_HEADERS
panelpluginsmodel.h
windownotifier.h
lxqtpanel.h
lxqtpanelapplication.h
lxqtpanelapplication_p.h
lxqtpanellayout.h
plugin.h
pluginsettings_p.h
lxqtpanellimits.h
popupmenu.h
pluginmoveprocessor.h
@ -19,6 +22,7 @@ set(PRIV_HEADERS
# using LXQt namespace in the public headers.
set(PUB_HEADERS
lxqtpanelglobals.h
pluginsettings.h
ilxqtpanelplugin.h
ilxqtpanel.h
)
@ -26,10 +30,12 @@ set(PUB_HEADERS
set(SOURCES
main.cpp
panelpluginsmodel.cpp
windownotifier.cpp
lxqtpanel.cpp
lxqtpanelapplication.cpp
lxqtpanellayout.cpp
plugin.cpp
pluginsettings.cpp
popupmenu.cpp
pluginmoveprocessor.cpp
lxqtpanelpluginconfigdialog.cpp
@ -58,6 +64,11 @@ add_definitions(-DCOMPILE_LXQT_PANEL)
set(PLUGIN_DESKTOPS_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/lxqt/${PROJECT}")
add_definitions(-DPLUGIN_DESKTOPS_DIR=\"${PLUGIN_DESKTOPS_DIR}\")
if (WITH_SCREENSAVER_FALLBACK)
message(STATUS "Building with conversion of deprecated 'screensaver' plugin")
add_definitions(-DWITH_SCREENSAVER_FALLBACK "-DLXQT_LOCK_DESKTOP=\"${CMAKE_INSTALL_FULL_DATAROOTDIR}/applications/lxqt-lockscreen.desktop\"")
endif ()
project(${PROJECT})
set(QTX_LIBRARIES Qt5::Widgets Qt5::Xml Qt5::DBus)
@ -73,6 +84,16 @@ lxqt_translate_ts(QM_FILES SOURCES
${UI}
INSTALL_DIR
"${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}"
PULL_TRANSLATIONS
${PULL_TRANSLATIONS}
CLEAN_TRANSLATIONS
${CLEAN_TRANSLATIONS}
TRANSLATIONS_REPO
${TRANSLATIONS_REPO}
TRANSLATIONS_REFSPEC
${TRANSLATIONS_REFSPEC}
REPO_SUBDIR
"${PROJECT_NAME}/panel"
)
lxqt_app_translation_loader(SOURCES ${PROJECT_NAME})
@ -95,3 +116,8 @@ target_link_libraries(${PROJECT}
install(TARGETS ${PROJECT} RUNTIME DESTINATION bin)
install(FILES ${CONFIG_FILES} DESTINATION ${LXQT_ETC_XDG_DIR}/lxqt)
install(FILES ${PUB_HEADERS} DESTINATION include/lxqt)
install(FILES
man/lxqt-panel.1
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
COMPONENT Runtime
)

@ -75,6 +75,8 @@ ConfigPanelWidget::ConfigPanelWidget(LXQtPanel *panel, QWidget *parent) :
mOldHidable = mPanel->hidable();
mOldAnimation = mPanel->animationTime();
ui->spinBox_panelSize->setMinimum(PANEL_MINIMUM_SIZE);
ui->spinBox_panelSize->setMaximum(PANEL_MAXIMUM_SIZE);
@ -98,6 +100,7 @@ ConfigPanelWidget::ConfigPanelWidget(LXQtPanel *panel, QWidget *parent) :
connect(ui->comboBox_alignment, SIGNAL(activated(int)), this, SLOT(editChanged()));
connect(ui->comboBox_position, SIGNAL(activated(int)), this, SLOT(positionChanged()));
connect(ui->checkBox_hidable, SIGNAL(toggled(bool)), this, SLOT(editChanged()));
connect(ui->spinBox_animation, SIGNAL(valueChanged(int)), this, SLOT(editChanged()));
connect(ui->checkBox_customFontColor, SIGNAL(toggled(bool)), this, SLOT(editChanged()));
connect(ui->pushButton_customFontColor, SIGNAL(clicked(bool)), this, SLOT(pickFontColor()));
@ -106,7 +109,7 @@ ConfigPanelWidget::ConfigPanelWidget(LXQtPanel *panel, QWidget *parent) :
connect(ui->checkBox_customBgImage, SIGNAL(toggled(bool)), this, SLOT(editChanged()));
connect(ui->lineEdit_customBgImage, SIGNAL(textChanged(QString)), this, SLOT(editChanged()));
connect(ui->pushButton_customBgImage, SIGNAL(clicked(bool)), this, SLOT(pickBackgroundImage()));
connect(ui->slider_opacity, SIGNAL(sliderReleased()), this, SLOT(editChanged()));
connect(ui->slider_opacity, &QSlider::valueChanged, this, &ConfigPanelWidget::editChanged);
}
@ -123,6 +126,8 @@ void ConfigPanelWidget::reset()
ui->checkBox_hidable->setChecked(mOldHidable);
ui->spinBox_animation->setValue(mOldAnimation);
fillComboBox_alignment();
ui->comboBox_alignment->setCurrentIndex(mOldAlignment + 1);
@ -255,6 +260,7 @@ void ConfigPanelWidget::editChanged()
mPanel->setAlignment(align, true);
mPanel->setPosition(mScreenNum, mPosition, true);
mPanel->setHidable(ui->checkBox_hidable->isChecked(), true);
mPanel->setAnimationTime(ui->spinBox_animation->value(), true);
mPanel->setFontColor(ui->checkBox_customFontColor->isChecked() ? mFontColor : QColor(), true);
if (ui->checkBox_customBgColor->isChecked())

@ -89,6 +89,7 @@ private:
LXQtPanel::Alignment mOldAlignment;
ILXQtPanel::Position mOldPosition;
bool mOldHidable;
int mOldAnimation;
int mOldScreenNum;
QColor mOldFontColor;
QColor mOldBackgroundColor;

@ -202,92 +202,103 @@
<string>Alignment &amp;&amp; position</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="4" column="0">
<item row="1" column="0">
<widget class="QCheckBox" name="checkBox_hidable">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Auto-hide</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QSpinBox" name="spinBox_animation">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Zero means no animation</string>
</property>
<property name="suffix">
<string> ms</string>
</property>
<property name="maximum">
<number>500</number>
</property>
<property name="singleStep">
<number>50</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_position">
<property name="text">
<string>Position:</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="3">
<widget class="QComboBox" name="comboBox_position"/>
<item row="1" column="2">
<widget class="QLabel" name="label_animation">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Zero means no animation</string>
</property>
<property name="text">
<string>Animation duration:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="0" column="0">
<widget class="QLabel" name="label_alignment">
<property name="text">
<string>Alignment:</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="3">
<widget class="QWidget" name="widget_7" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
<item row="1" column="1">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>5</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" colspan="3">
<widget class="QComboBox" name="comboBox_alignment">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Left</string>
</property>
<property name="rightMargin">
<number>0</number>
</item>
<item>
<property name="text">
<string>Center</string>
</property>
<property name="bottomMargin">
<number>0</number>
</item>
<item>
<property name="text">
<string>Right</string>
</property>
<item>
<widget class="QComboBox" name="comboBox_alignment">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Left</string>
</property>
</item>
<item>
<property name="text">
<string>Center</string>
</property>
</item>
<item>
<property name="text">
<string>Right</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>15</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_hidable">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Auto-hide</string>
</property>
</widget>
</item>
</layout>
</item>
</widget>
</item>
<item row="2" column="1" colspan="3">
<widget class="QComboBox" name="comboBox_position"/>
</item>
</layout>
</widget>
</item>
@ -614,6 +625,48 @@
<signal>toggled(bool)</signal>
<receiver>compositingL</receiver>
<slot>setEnabled(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>checkBox_hidable</sender>
<signal>toggled(bool)</signal>
<receiver>label_animation</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>59</x>
<y>198</y>
</hint>
<hint type="destinationlabel">
<x>211</x>
<y>198</y>
</hint>
</hints>
</connection>
<connection>
<sender>checkBox_hidable</sender>
<signal>toggled(bool)</signal>
<receiver>spinBox_animation</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>59</x>
<y>198</y>
</hint>
<hint type="destinationlabel">
<x>319</x>
<y>198</y>
</hint>
</hints>
</connection>
</connections>
</ui>

@ -55,17 +55,16 @@ ConfigPluginsWidget::ConfigPluginsWidget(LXQtPanel *panel, QWidget* parent) :
resetButtons();
connect(ui->listView_plugins, &QListView::activated, plugins, &PanelPluginsModel::onActivatedIndex);
connect(ui->listView_plugins->selectionModel(), &QItemSelectionModel::selectionChanged,
this, &ConfigPluginsWidget::resetButtons);
connect(ui->pushButton_moveUp, &QToolButton::clicked, plugins, &PanelPluginsModel::onMovePluginUp);
connect(ui->pushButton_moveDown, &QToolButton::clicked, plugins, &PanelPluginsModel::onMovePluginDown);
connect(ui->pushButton_moveUp, &QToolButton::clicked, [this, plugins] { plugins->onMovePluginUp(ui->listView_plugins->currentIndex()); });
connect(ui->pushButton_moveDown, &QToolButton::clicked, [this, plugins] { plugins->onMovePluginDown(ui->listView_plugins->currentIndex()); });
connect(ui->pushButton_addPlugin, &QPushButton::clicked, this, &ConfigPluginsWidget::showAddPluginDialog);
connect(ui->pushButton_removePlugin, &QToolButton::clicked, plugins, &PanelPluginsModel::onRemovePlugin);
connect(ui->pushButton_removePlugin, &QToolButton::clicked, [this, plugins] { plugins->onRemovePlugin(ui->listView_plugins->currentIndex()); });
connect(ui->pushButton_pluginConfig, &QToolButton::clicked, plugins, &PanelPluginsModel::onConfigurePlugin);
connect(ui->pushButton_pluginConfig, &QToolButton::clicked, [this, plugins] { plugins->onConfigurePlugin(ui->listView_plugins->currentIndex()); });
connect(plugins, &PanelPluginsModel::pluginAdded, this, &ConfigPluginsWidget::resetButtons);
connect(plugins, &PanelPluginsModel::pluginRemoved, this, &ConfigPluginsWidget::resetButtons);

@ -32,6 +32,7 @@
#include "lxqtpanelglobals.h"
class ILXQtPanelPlugin;
class QWidget;
/**
**/
@ -39,41 +40,76 @@ class LXQT_PANEL_API ILXQtPanel
{
public:
/**
Specifies the position of the panel on screen.
**/
* @brief Specifies the position of the panel on screen.
*/
enum Position{
PositionBottom, //! The bottom side of the screen.
PositionTop, //! The top side of the screen.
PositionLeft, //! The left side of the screen.
PositionRight //! The right side of the screen.
PositionBottom, //!< The bottom side of the screen.
PositionTop, //!< The top side of the screen.
PositionLeft, //!< The left side of the screen.
PositionRight //!< The right side of the screen.
};
/**
This property holds position of the panel.
Possible values for this property are described by the Position enum
**/
* @brief Returns the position of the panel. Possible values for the
* return value are described by the Position enum.
*/
virtual Position position() const = 0;
/**
* @brief Returns the edge length of the icons that are shown on the panel
* in pixels. The icons are square.
*/
virtual int iconSize() const = 0;
/**
* @brief Returns the number of lines/rows of this panel.
*/
virtual int lineCount() const = 0;
/**
Helper functions for eazy direction checking.
Retuns true if panel on the top or bottom of the screen; otherwise returns false.
**/
* @brief Helper function for convenient direction/alignment checking.
* @return True if the panel is on the top or the bottom of the
* screen; otherwise returns false.
*/
bool isHorizontal() const { return position() == PositionBottom || position() == PositionTop; }
/**
Returns global screen coordinates of the panel. You no need to use mapToGlobal.
**/
* @brief Helper method that returns the global screen coordinates of the
* panel, so you do not need to use QWidget::mapToGlobal() by yourself.
* @return The QRect where the panel is located in global screen
* coordinates.
*/
virtual QRect globalGometry() const = 0;
/**
Helper functions for calculating global screen position of some popup window with windowSize size.
If you need to show some popup window, you can use it, to get global screen position for the new window.
**/
* @brief Helper method for calculating the global screen position of a
* popup window with size windowSize.
* @param absolutePos Contains the global screen coordinates where the
* popup should be appear, i.e. the point where the user has clicked.
* @param windowSize The size that the window will occupy.
* @return The global screen position where the popup window can be shown.
*/
virtual QRect calculatePopupWindowPos(const QPoint &absolutePos, const QSize &windowSize) const = 0;
/**
* @brief Helper method for calculating the global screen position of a
* popup window with size windowSize. The parameter plugin should be a
* plugin
* @param plugin Plugin that the popup window will belong to. The position
* will be calculated according to the position of the plugin in the panel.
* @param windowSize The size that the window will occupy.
* @return The global screen position where the popup window can be shown.
*/
virtual QRect calculatePopupWindowPos(const ILXQtPanelPlugin *plugin, const QSize &windowSize) const = 0;
/*!
* \brief By calling this function, a plugin (or any other object) notifies the panel
* about showing a (standalone) window/menu -> the panel needs this to avoid "hiding" in case any
* standalone window is shown. The widget/window must be shown later than this notification call because
* the panel needs to observe its show/hide/close events.
*
* \param w the window that will be shown
*
*/
virtual void willShowWindow(QWidget * w) = 0;
};
#endif // ILXQTPANEL_H

@ -30,9 +30,6 @@
#define ILXQTPANELPLUGIN_H
#include <QtPlugin>
#include <qwindowdefs.h> // For XEvent
#include <QSettings>
#include <LXQt/PluginInfo>
#include "ilxqtpanel.h"
#include "lxqtpanelglobals.h"
@ -40,7 +37,7 @@
LXQt panel plugins are standalone sharedlibraries
(*.so) located in PLUGIN_DIR (define provided by CMakeLists.txt).
Plugin for the panel is a library written on C++. One more necessary thing
Plugin for the panel is a library written in C++. One more necessary thing
is a .desktop file describing this plugin. The same may be additional files,
like translations. Themselves plugins will be installed to
/usr/local/lib/lxqt-panel or /usr/lib/lxqt-panel (dependent on cmake option
@ -50,11 +47,16 @@ like translations. Themselves plugins will be installed to
**/
class QDialog;
class PluginSettings;
namespace LXQt
{
class PluginInfo;
}
struct LXQT_PANEL_API ILXQtPanelPluginStartupInfo
{
ILXQtPanel *lxqtPanel;
QSettings *settings;
PluginSettings *settings;
const LXQt::PluginInfo *desktopFile;
};
@ -64,23 +66,20 @@ All plugins *must* be inherited from this one.
This class provides some basic API and inherited/implemented
plugins GUIs will be responsible on the functionality itself.
See <a href=https://github.com/LXDE-Qt/lxde-qt/wiki/How-to-write-the-panel-plugin>
How to write the panel plugin</a> for more information about how to make your plugins.
**/
class LXQT_PANEL_API ILXQtPanelPlugin
{
public:
/**
This enum describes the properties of an plugin.
This enum describes the properties of a plugin.
**/
enum Flag {
NoFlags = 0, ///< It does not have any properties set.
PreferRightAlignment = 1, /**< The plugin is prefer right alignment (for example the clock plugin);
otherwise plugin prefer left (like main menu).
PreferRightAlignment = 1, /**< The plugin prefers right alignment (for example the clock plugin);
otherwise the plugin prefers left alignment (like main menu).
This flag is used only at the first start, later positions of all
plugins saved in a config, and this saved information is used. */
plugins are saved in a config, and this saved information is used. */
HaveConfigDialog = 2, ///< The plugin have a configuration dialog.
SingleInstance = 4, ///< The plugin allows only one instance to run.
NeedsHandle = 8 ///< The plugin needs a handle for the context menu
@ -99,8 +98,8 @@ public:
};
/**
Constructs a ILXQtPanelPlugin object with the given startupInfo. You do not have to worry
about the startupInfo parameters, ILXQtPanelPlugin process the parameters yourself.
Constructs an ILXQtPanelPlugin object with the given startupInfo. You do not have to worry
about the startupInfo parameters, ILXQtPanelPlugin processes the parameters itself.
**/
ILXQtPanelPlugin(const ILXQtPanelPluginStartupInfo &startupInfo):
mSettings(startupInfo.settings),
@ -121,20 +120,20 @@ public:
/**
Returns the string that is used in the theme QSS file.
If you retuns "WorldClock" string, theme author may write something like `#WorldClock { border: 1px solid red; }`
to set custom border for the your plugin.
If you return "WorldClock" string, theme author may write something like `#WorldClock { border: 1px solid red; }`
to set a custom border for your plugin.
**/
virtual QString themeId() const = 0;
/**
From users point of view plugin is a some visual widget on the panel. This function retuns pointer to it.
This method called only once, so you are free to return pointer on class member, or create widget on the fly.
From the user's point of view, your plugin is some visual widget on the panel. This function returns a pointer to it.
This method is called only once, so you are free to return the pointer on a class member, or create the widget on the fly.
**/
virtual QWidget *widget() = 0;
/**
Returns the plugin settings dialog. Reimplement this function if your plugin has it.
The panel does not take ownership of the dialog, it would probably a good idea to set Qt::WA_DeleteOnClose
The panel does not take ownership of the dialog, it is probably a good idea to set Qt::WA_DeleteOnClose
attribute for the dialog.
The default implementation returns 0, no dialog;
@ -174,7 +173,7 @@ public:
ILXQtPanel *panel() const { return mPanel; }
QSettings *settings() const { return mSettings; }
PluginSettings *settings() const { return mSettings; }
const LXQt::PluginInfo *desktopFile() const { return mDesktopFile; }
/**
@ -186,11 +185,21 @@ public:
return mPanel->calculatePopupWindowPos(this, windowSize);
}
/*!
* \brief By calling this function plugin notifies the panel about showing a (standalone) window/menu.
*
* \param w the shown window
*
*/
inline void willShowWindow(QWidget * w)
{
mPanel->willShowWindow(w);
}
virtual bool isSeparate() const { return false; }
virtual bool isExpandable() const { return false; }
private:
QSettings *mSettings;
PluginSettings *mSettings;
ILXQtPanel *mPanel;
const LXQt::PluginInfo *mDesktopFile;
};
@ -198,7 +207,7 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(ILXQtPanelPlugin::Flags)
/**
Every plugin must has the loader. You shoul only reimplement instance() method, and return your plugin.
Every plugin must have the ILXQtPanelPluginLibrary loader. You should only reimplement the instance() method which should return your plugin.
Example:
@code
class LXQtClockPluginLibrary: public QObject, public ILXQtPanelPluginLibrary

@ -35,6 +35,7 @@
#include "popupmenu.h"
#include "plugin.h"
#include "panelpluginsmodel.h"
#include "windownotifier.h"
#include <LXQt/PluginInfo>
#include <QScreen>
@ -44,6 +45,7 @@
#include <QString>
#include <QDesktopWidget>
#include <QMenu>
#include <QMessageBox>
#include <XdgIcon>
#include <XdgDirs>
@ -71,6 +73,8 @@
#define CFG_KEY_OPACITY "opacity"
#define CFG_KEY_PLUGINS "plugins"
#define CFG_KEY_HIDABLE "hidable"
#define CFG_KEY_ANIMATION "animation-duration"
#define CFG_KEY_LOCKPANEL "lockPanel"
/************************************************
Returns the Position by the string.
@ -116,6 +120,7 @@ LXQtPanel::LXQtPanel(const QString &configGroup, LXQt::Settings *settings, QWidg
mSettings(settings),
mConfigGroup(configGroup),
mPlugins{nullptr},
mStandaloneWindows{new WindowNotifier},
mPanelSize(0),
mIconSize(0),
mLineCount(0),
@ -125,8 +130,17 @@ LXQtPanel::LXQtPanel(const QString &configGroup, LXQt::Settings *settings, QWidg
mScreenNum(0), //whatever (avoid conditional on uninitialized value)
mActualScreenNum(0),
mHidable(false),
mHidden(false)
mHidden(false),
mAnimationTime(0),
mAnimation(nullptr),
mLockPanel(false)
{
//You can find information about the flags and widget attributes in your
//Qt documentation or at http://doc.qt.io/qt-5/qt.html
//Qt::FramelessWindowHint = Produces a borderless window. The user cannot
//move or resize a borderless window via the window system. On X11, ...
//Qt::WindowStaysOnTopHint = Informs the window system that the window
//should stay on top of all other windows. Note that on ...
Qt::WindowFlags flags = Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint;
// NOTE: by PCMan:
@ -142,18 +156,23 @@ LXQtPanel::LXQtPanel(const QString &configGroup, LXQt::Settings *settings, QWidg
flags |= Qt::WindowDoesNotAcceptFocus;
setWindowFlags(flags);
//Adds _NET_WM_WINDOW_TYPE_DOCK to the window's _NET_WM_WINDOW_TYPE X11 window property. See http://standards.freedesktop.org/wm-spec/ for more details.
setAttribute(Qt::WA_X11NetWmWindowTypeDock);
//Enables tooltips for inactive windows.
setAttribute(Qt::WA_AlwaysShowToolTips);
//Indicates that the widget should have a translucent background, i.e., any non-opaque regions of the widgets will be translucent because the widget will have an alpha channel. Setting this ...
setAttribute(Qt::WA_TranslucentBackground);
//Allows data from drag and drop operations to be dropped onto the widget (see QWidget::setAcceptDrops()).
setAttribute(Qt::WA_AcceptDrops);
setWindowTitle("LXQt Panel");
setObjectName(QString("LXQtPanel %1").arg(configGroup));
//LXQtPanel (inherits QFrame) -> lav (QGridLayout) -> LXQtPanelWidget (QFrame) -> LXQtPanelLayout
LXQtPanelWidget = new QFrame(this);
LXQtPanelWidget->setObjectName("BackgroundWidget");
QGridLayout* lav = new QGridLayout();
lav->setMargin(0);
lav->setContentsMargins(0, 0, 0, 0);
setLayout(lav);
this->layout()->addWidget(LXQtPanelWidget);
@ -170,23 +189,34 @@ LXQtPanel::LXQtPanel(const QString &configGroup, LXQt::Settings *settings, QWidg
mHideTimer.setInterval(PANEL_HIDE_DELAY);
connect(&mHideTimer, SIGNAL(timeout()), this, SLOT(hidePanelWork()));
connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), this, SLOT(realign()));
connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), this, SLOT(ensureVisible()));
connect(QApplication::desktop(), &QDesktopWidget::resized, this, &LXQtPanel::ensureVisible);
connect(QApplication::desktop(), &QDesktopWidget::screenCountChanged, this, &LXQtPanel::ensureVisible);
// connecting to QDesktopWidget::workAreaResized shouldn't be necessary,
// as we've already connceted to QDesktopWidget::resized, but it actually
// is. Read mode on https://github.com/lxde/lxqt-panel/pull/310
connect(QApplication::desktop(), &QDesktopWidget::workAreaResized,
this, &LXQtPanel::ensureVisible);
connect(LXQt::Settings::globalSettings(), SIGNAL(settingsChanged()), this, SLOT(update()));
connect(lxqtApp, SIGNAL(themeChanged()), this, SLOT(realign()));
connect(mStandaloneWindows.data(), &WindowNotifier::firstShown, [this] { showPanel(true); });
connect(mStandaloneWindows.data(), &WindowNotifier::lastHidden, this, &LXQtPanel::hidePanel);
readSettings();
// the old position might be on a visible screen
ensureVisible();
loadPlugins();
show();
// show it the first first time, despite setting
// show it the first time, despite setting
if (mHidable)
{
showPanel();
QTimer::singleShot(PANEL_HIDE_FIRST_TIME, this, SLOT(hidePanel()));
showPanel(false);
QTimer::singleShot(PANEL_HIDE_FIRST_TIME, this, SLOT(hidePanel()));
}
}
@ -203,6 +233,8 @@ void LXQtPanel::readSettings()
mHidable = mSettings->value(CFG_KEY_HIDABLE, mHidable).toBool();
mHidden = mHidable;
mAnimationTime = mSettings->value(CFG_KEY_ANIMATION, mAnimationTime).toInt();
// By default we are using size & count from theme.
setPanelSize(mSettings->value(CFG_KEY_PANELSIZE, PANEL_DEFAULT_SIZE).toInt(), false);
setIconSize(mSettings->value(CFG_KEY_ICONSIZE, PANEL_DEFAULT_ICON_SIZE).toInt(), false);
@ -232,6 +264,8 @@ void LXQtPanel::readSettings()
if (!image.isEmpty())
setBackgroundImage(image, false);
mLockPanel = mSettings->value(CFG_KEY_LOCKPANEL, false).toBool();
mSettings->endGroup();
}
@ -271,6 +305,9 @@ void LXQtPanel::saveSettings(bool later)
mSettings->setValue(CFG_KEY_OPACITY, mOpacity);
mSettings->setValue(CFG_KEY_HIDABLE, mHidable);
mSettings->setValue(CFG_KEY_ANIMATION, mAnimationTime);
mSettings->setValue(CFG_KEY_LOCKPANEL, mLockPanel);
mSettings->endGroup();
}
@ -282,12 +319,12 @@ void LXQtPanel::saveSettings(bool later)
void LXQtPanel::ensureVisible()
{
if (!canPlacedOn(mScreenNum, mPosition))
setPosition(findAvailableScreen(mPosition), mPosition, true);
setPosition(findAvailableScreen(mPosition), mPosition, false);
else
mActualScreenNum = mScreenNum;
// the screen size might be changed, let's update the reserved screen space.
updateWmStrut();
// the screen size might be changed
realign();
}
@ -297,6 +334,8 @@ void LXQtPanel::ensureVisible()
LXQtPanel::~LXQtPanel()
{
mLayout->setEnabled(false);
delete mAnimation;
delete mConfigDialog.data();
// do not save settings because of "user deleted panel" functionality saveSettings();
}
@ -352,7 +391,7 @@ int LXQtPanel::getReserveDimension()
return mHidable ? PANEL_HIDE_SIZE : qMax(PANEL_MINIMUM_SIZE, mPanelSize);
}
void LXQtPanel::setPanelGeometry()
void LXQtPanel::setPanelGeometry(bool animate)
{
const QRect currentScreen = QApplication::desktop()->screenGeometry(mActualScreenNum);
QRect rect;