From ed5ecf7ea7a482b4649e66ecb35fbc60af680684 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 25 Apr 2016 13:08:12 -0400 Subject: Rearrange the Lumina source tree quite a bit: Now the utilites are arranged by category (core, core-utils, desktop-utils), so all the -utils may be excluded by a package system (or turned into separate packages) as needed. --- .../lumina-desktop/panel-plugins/spacer/LSpacer.h | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src-qt5/core/lumina-desktop/panel-plugins/spacer/LSpacer.h (limited to 'src-qt5/core/lumina-desktop/panel-plugins/spacer') diff --git a/src-qt5/core/lumina-desktop/panel-plugins/spacer/LSpacer.h b/src-qt5/core/lumina-desktop/panel-plugins/spacer/LSpacer.h new file mode 100644 index 00000000..1e60c519 --- /dev/null +++ b/src-qt5/core/lumina-desktop/panel-plugins/spacer/LSpacer.h @@ -0,0 +1,34 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2014, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +// This class is a generic invisible spacer for the panel +//=========================================== +#ifndef _LUMINA_DESKTOP_PANEL_PLUGIN_SPACER_H +#define _LUMINA_DESKTOP_PANEL_PLUGIN_SPACER_H + +#include "../LPPlugin.h" + +class LSpacerPlugin : public LPPlugin{ + Q_OBJECT +public: + LSpacerPlugin(QWidget *parent=0, QString id="spacer", bool horizontal=true) : LPPlugin(parent, id, horizontal){ + if(horizontal){ this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); } + else{ this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); } + } + ~LSpacerPlugin(){} + +public slots: + void OrientationChange(){ + if(this->layout()->direction()==QBoxLayout::LeftToRight){ //horizontal + this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); + }else{ //vertical + this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); + } + } +}; + + +#endif \ No newline at end of file -- cgit