aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/SettingsMenu.cpp
diff options
context:
space:
mode:
authorKris Moore <kris@pcbsd.org>2014-09-04 11:42:13 -0400
committerKris Moore <kris@pcbsd.org>2014-09-04 11:42:13 -0400
commit71737f70949bd25f9aa8bc4e7d03039ba83c6cb1 (patch)
treeab29e864d1ae59d10cc6875af9541e3ad306b2fb /lumina-desktop/SettingsMenu.cpp
parentInitial commit (diff)
downloadlumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.tar.gz
lumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.tar.bz2
lumina-71737f70949bd25f9aa8bc4e7d03039ba83c6cb1.zip
Initial import of the lumina code from pcbsd git repo
Diffstat (limited to 'lumina-desktop/SettingsMenu.cpp')
-rw-r--r--lumina-desktop/SettingsMenu.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/lumina-desktop/SettingsMenu.cpp b/lumina-desktop/SettingsMenu.cpp
new file mode 100644
index 00000000..1ff5fe92
--- /dev/null
+++ b/lumina-desktop/SettingsMenu.cpp
@@ -0,0 +1,39 @@
+//===========================================
+// Lumina-DE source code
+// Copyright (c) 2014, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+#include "SettingsMenu.h"
+#include "LSession.h"
+
+SettingsMenu::SettingsMenu() : QMenu(){
+ this->setTitle( tr("Desktop Settings") );
+ this->setIcon( LXDG::findIcon("configure","") );
+ connect(this, SIGNAL(triggered(QAction*)), this, SLOT(runApp(QAction*)) );
+ //Now setup the possible configuration options
+ QAction *act = new QAction(LXDG::findIcon("preferences-desktop-screensaver",""), tr("Screensaver"), this);
+ act->setWhatsThis("xscreensaver-demo");
+ this->addAction(act);
+ act = new QAction( LXDG::findIcon("preferences-desktop",""), tr("Desktop"), this);
+ act->setWhatsThis("lumina-config");
+ this->addAction(act);
+ #ifdef __FreeBSD__
+ if(QFile::exists("/usr/local/bin/qtconfig-qt4")){
+ #endif
+ #ifdef __linux__
+ if(QFile::exists("/usr/bin/qtconfig-qt4")){
+ #endif
+ act = new QAction( LXDG::findIcon("preferences-desktop-theme",""), tr("Window Theme"), this);
+ act->setWhatsThis("qtconfig-qt4");
+ this->addAction(act);
+ }
+}
+
+SettingsMenu::~SettingsMenu(){
+
+}
+
+void SettingsMenu::runApp(QAction* act){
+ LSession::LaunchApplication(act->whatsThis());
+}
bgstack15