diff options
Diffstat (limited to 'lumina-xconfig')
67 files changed, 836 insertions, 0 deletions
diff --git a/lumina-xconfig/MainUI.cpp b/lumina-xconfig/MainUI.cpp new file mode 100644 index 00000000..a4131649 --- /dev/null +++ b/lumina-xconfig/MainUI.cpp @@ -0,0 +1,191 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2015, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "MainUI.h" +#include "ui_MainUI.h" + +#include <LuminaXDG.h> +#include <LuminaUtils.h> + +#include <QTimer> + +MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ + ui->setupUi(this); + loadIcons(); + //Fill the location list with the valid entries + ui->combo_location->clear(); + ui->combo_location->addItem(tr("Right Of"), "--right-of"); + ui->combo_location->addItem(tr("Left Of"), "--left-of"); + + connect(ui->push_close, SIGNAL(clicked()), this, SLOT(close()) ); + connect(ui->push_rescan, SIGNAL(clicked()), this, SLOT(UpdateScreens()) ); + connect(ui->push_activate, SIGNAL(clicked()), this, SLOT(ActivateScreen()) ); + connect(ui->tool_deactivate, SIGNAL(clicked()), this, SLOT(DeactivateScreen()) ); + connect(ui->tool_moveleft, SIGNAL(clicked()), this, SLOT(MoveScreenLeft()) ); + connect(ui->tool_moveright, SIGNAL(clicked()), this, SLOT(MoveScreenRight()) ); + connect(ui->list_screens, SIGNAL(itemSelectionChanged()),this, SLOT(ScreenSelected()) ); + QTimer::singleShot(0, this, SLOT(UpdateScreens()) ); +} + +MainUI::~MainUI(){ + +} + +void MainUI::loadIcons(){ + this->setWindowIcon( LXDG::findIcon("preferences-system-windows-actions","") ); + ui->tool_deactivate->setIcon( LXDG::findIcon("list-remove","") ); + ui->tool_moveleft->setIcon( LXDG::findIcon("arrow-left","") ); + ui->tool_moveright->setIcon( LXDG::findIcon("arrow-right","") ); + ui->push_activate->setIcon( LXDG::findIcon("list-add","") ); + ui->push_rescan->setIcon( LXDG::findIcon("view-refresh","") ); + ui->push_close->setIcon( LXDG::findIcon("window-close","") ); +} + +void MainUI::UpdateScreens(){ + //First probe the server for current screens + SCREENS.clear(); + QStringList info = LUtils::getCmdOutput("xrandr -q"); + ScreenInfo cscreen; + for(int i=0; i<info.length(); i++){ + if(info[i].contains("connected") ){ + //qDebug() << "xrandr info:" << info[i]; + if(!cscreen.ID.isEmpty()){ + SCREENS << cscreen; //current screen finished - save it into the array + cscreen = ScreenInfo(); //Now create a new structure + } + QString dev = info[i].section(" ",0,0); //device ID + QString devres = info[i].section("(",0,0).split(" ",QString::SkipEmptyParts).last(); + qDebug() << " - ID:" <<dev; + //qDebug() << " - Res:" << devres; + if( !devres.contains("x") || !devres.contains("+") ){ devres.clear(); } + //qDebug() << " - Res (modified):" << devres; + if(info[i].contains(" disconnected ") && !devres.isEmpty() ){ + //Disable this device and restart (disconnected, but still attached to the X server) + DeactivateScreen(dev); + UpdateScreens(); + return; + }else if( !devres.isEmpty() ){ + //Device that is connected and attached (has a resolution) + qDebug() << "Create new Screen entry:" << dev << devres; + cscreen.ID = dev; + //Note: devres format: "<width>x<height>+<xoffset>+<yoffset>" + cscreen.geom.setRect( devres.section("+",-2,-2).toInt(), devres.section("+",-1,-1).toInt(), devres.section("x",0,0).toInt(), devres.section("+",0,0).section("x",1,1).toInt() ); + + }else if(info[i].contains(" connected ")){ + //Device that is connected, but not attached + qDebug() << "Create new Screen entry:" << dev << "none"; + cscreen.ID = dev; + cscreen.order = -2; //flag this right now as a non-active screen + } + }else if( !cscreen.ID.isEmpty() && info[i].section("\t",0,0,QString::SectionSkipEmpty).contains("x")){ + //available resolution for a device + cscreen.resList << info[i].section("\t",0,0,QString::SectionSkipEmpty); + } + } + if(!cscreen.ID.isEmpty()){ SCREENS << cscreen; } //make sure to add the last screen to the array + + //Now go through the screens and arrange them in order from left->right in the UI + bool found = true; + int xoffset = 0; //start at 0 + int cnum = 0; + ui->list_screens->clear(); + while(found){ + found = false; //make sure to break out if a screen is not found + for(int i=0; i<SCREENS.length(); i++){ + if(SCREENS[i].order != -1){} //already evaluated - skip it + else if(SCREENS[i].geom.x()==xoffset){ + found = true; //make sure to look for the next one + xoffset = xoffset+SCREENS[i].geom.width(); //next number to look for + SCREENS[i].order = cnum; //assign the currrent order to it + cnum++; //get ready for the next one + QListWidgetItem *it = new QListWidgetItem(); + it->setTextAlignment(Qt::AlignCenter); + it->setText( SCREENS[i].ID+"\n ("+QString::number(SCREENS[i].geom.width())+"x"+QString::number(SCREENS[i].geom.height())+") " ); + it->setWhatsThis(SCREENS[i].ID); + ui->list_screens->addItem(it); + } + } + } + + //Now update the available/current screens in the UI + ui->combo_availscreens->clear(); + ui->combo_cscreens->clear(); + for(int i=0; i<SCREENS.length(); i++){ + if(SCREENS[i].order<0){ + ui->combo_availscreens->addItem(SCREENS[i].ID); + }else{ + ui->combo_cscreens->addItem(SCREENS[i].ID); + } + } + ui->group_avail->setVisible( ui->combo_availscreens->count()>0 ); + ScreenSelected(); //update buttons +} + +void MainUI::ScreenSelected(){ + QListWidgetItem *item = ui->list_screens->currentItem(); + if(item==0){ + //nothing selected + ui->tool_deactivate->setEnabled(false); + ui->tool_moveleft->setEnabled(false); + ui->tool_moveright->setEnabled(false); + }else{ + //Item selected + ui->tool_deactivate->setEnabled(ui->list_screens->count()>1); + ui->tool_moveleft->setEnabled(ui->list_screens->row(item) > 0); + ui->tool_moveright->setEnabled(ui->list_screens->row(item) < (ui->list_screens->count()-1)); + } +} + +void MainUI::MoveScreenLeft(){ + QListWidgetItem *item = ui->list_screens->currentItem(); + if(item==0){ return; } //no selection + //Get the current ID + QString CID = item->whatsThis(); + //Now get the ID of the one on the left + item = ui->list_screens->item( ui->list_screens->row(item)-1 ); + if(item == 0){ return; } //no item on the left (can't go left) + QString LID = item->whatsThis(); //left ID + //Now run the command + LUtils::runCmd("xrandr", QStringList() << "--output" << CID << "--left-of" << LID << "--auto"); + QTimer::singleShot(500, this, SLOT(UpdateScreens()) ); +} + +void MainUI::MoveScreenRight(){ + QListWidgetItem *item = ui->list_screens->currentItem(); + if(item==0){ return; } //no selection + //Get the current ID + QString CID = item->whatsThis(); + //Now get the ID of the one on the left + item = ui->list_screens->item( ui->list_screens->row(item)+1 ); + if(item == 0){ return; } //no item on the right (can't go right) + QString RID = item->whatsThis(); //right ID + //Now run the command + LUtils::runCmd("xrandr", QStringList() << "--output" << CID << "--right-of" << RID << "--auto"); + QTimer::singleShot(500, this, SLOT(UpdateScreens()) ); +} + +void MainUI::DeactivateScreen(QString device){ + if(device.isEmpty()){ + //Get the currently selected device + QListWidgetItem *item = ui->list_screens->currentItem(); + if(item==0){ return; } //no selection + //Get the current ID + device = item->whatsThis(); + } + if(device.isEmpty()){ return; } //nothing found + LUtils::runCmd("xrandr", QStringList() << "--output" << device << "--off"); + QTimer::singleShot(500, this, SLOT(UpdateScreens()) ); +} + +void MainUI::ActivateScreen(){ + //Assemble the command; + QString ID = ui->combo_availscreens->currentText(); + QString DID = ui->combo_cscreens->currentText(); + QString loc = ui->combo_location->currentData().toString(); + if(ID.isEmpty() || DID.isEmpty() || loc.isEmpty()){ return; } //invalid inputs + LUtils::runCmd("xrandr", QStringList() << "--output" << ID << loc << DID <<"--auto"); + QTimer::singleShot(500, this, SLOT(UpdateScreens()) ); +} diff --git a/lumina-xconfig/MainUI.h b/lumina-xconfig/MainUI.h new file mode 100644 index 00000000..d7b9f2ea --- /dev/null +++ b/lumina-xconfig/MainUI.h @@ -0,0 +1,57 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2015, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#ifndef _LUMINA_SCREEN_CONFIG_DIALOG_H +#define _LUMINA_SCREEN_CONFIG_DIALOG_H + +#include <QMainWindow> +#include <QRect> +#include <QString> +#include <QList> + +class ScreenInfo{ + public: + QString ID; + QRect geom; //screen geometry + int order; //left to right + QStringList resList; + ScreenInfo(){ + order = -1; //initial value is invalid + } + ~ScreenInfo(){} +}; + +namespace Ui{ + class MainUI; +}; + +class MainUI : public QMainWindow{ + Q_OBJECT +public: + MainUI(); + ~MainUI(); + +public slots: + void slotSingleInstance(){ + this->raise(); + this->show(); + } + void loadIcons(); + +private: + Ui::MainUI *ui; + QList<ScreenInfo> SCREENS; + +private slots: + void UpdateScreens(); + void ScreenSelected(); + void MoveScreenLeft(); + void MoveScreenRight(); + void DeactivateScreen(QString device = ""); + void ActivateScreen(); +}; + +#endif diff --git a/lumina-xconfig/MainUI.ui b/lumina-xconfig/MainUI.ui new file mode 100644 index 00000000..81717180 --- /dev/null +++ b/lumina-xconfig/MainUI.ui @@ -0,0 +1,193 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>MainUI</class> + <widget class="QMainWindow" name="MainUI"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>424</width> + <height>255</height> + </rect> + </property> + <property name="windowTitle"> + <string>MainWindow</string> + </property> + <widget class="QWidget" name="centralwidget"> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <widget class="QListWidget" name="list_screens"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>100</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>100</height> + </size> + </property> + <property name="flow"> + <enum>QListView::LeftToRight</enum> + </property> + <property name="viewMode"> + <enum>QListView::ListMode</enum> + </property> + <property name="uniformItemSizes"> + <bool>true</bool> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + <property name="selectionRectVisible"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <item> + <widget class="QToolButton" name="tool_deactivate"> + <property name="text"> + <string>...</string> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QToolButton" name="tool_moveleft"> + <property name="text"> + <string>...</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="tool_moveright"> + <property name="text"> + <string>...</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QGroupBox" name="group_avail"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Available Screens</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QComboBox" name="combo_availscreens"> + <property name="toolTip"> + <string>Screen which is not in user</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QComboBox" name="combo_location"> + <property name="toolTip"> + <string>Location to insert the screen</string> + </property> + </widget> + </item> + <item row="0" column="2"> + <widget class="QComboBox" name="combo_cscreens"> + <property name="toolTip"> + <string>Current screens</string> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QPushButton" name="push_activate"> + <property name="text"> + <string>Activate Screen</string> + </property> + </widget> + </item> + </layout> + </widget> + </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>40</height> + </size> + </property> + </spacer> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QPushButton" name="push_rescan"> + <property name="text"> + <string>Refresh Screens</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="push_close"> + <property name="text"> + <string>Close</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </widget> + <resources/> + <connections/> +</ui> diff --git a/lumina-xconfig/i18n/lumina-xconfig_af.ts b/lumina-xconfig/i18n/lumina-xconfig_af.ts new file mode 100644 index 00000000..6b7e234b --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_af.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="af_ZA"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_ar.ts b/lumina-xconfig/i18n/lumina-xconfig_ar.ts new file mode 100644 index 00000000..2e9eabf9 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_ar.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ar_EG"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_az.ts b/lumina-xconfig/i18n/lumina-xconfig_az.ts new file mode 100644 index 00000000..a0d853de --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_az.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="az_AZ"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_bg.ts b/lumina-xconfig/i18n/lumina-xconfig_bg.ts new file mode 100644 index 00000000..5e12aa5d --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_bg.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="bg_BG"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_bn.ts b/lumina-xconfig/i18n/lumina-xconfig_bn.ts new file mode 100644 index 00000000..996a21c8 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_bn.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="bn_BD"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_bs.ts b/lumina-xconfig/i18n/lumina-xconfig_bs.ts new file mode 100644 index 00000000..36253ae1 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_bs.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="bs_BA"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_ca.ts b/lumina-xconfig/i18n/lumina-xconfig_ca.ts new file mode 100644 index 00000000..94254056 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_ca.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ca_ES"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_cs.ts b/lumina-xconfig/i18n/lumina-xconfig_cs.ts new file mode 100644 index 00000000..80227e30 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_cs.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="cs_CZ"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_cy.ts b/lumina-xconfig/i18n/lumina-xconfig_cy.ts new file mode 100644 index 00000000..05487897 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_cy.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="cy_GB"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_da.ts b/lumina-xconfig/i18n/lumina-xconfig_da.ts new file mode 100644 index 00000000..f9fe4071 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_da.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="da_DK"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_de.ts b/lumina-xconfig/i18n/lumina-xconfig_de.ts new file mode 100644 index 00000000..1552582e --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_de.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="de_DE"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_el.ts b/lumina-xconfig/i18n/lumina-xconfig_el.ts new file mode 100644 index 00000000..d1fe6269 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_el.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="el_GR"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_en_GB.ts b/lumina-xconfig/i18n/lumina-xconfig_en_GB.ts new file mode 100644 index 00000000..942967a2 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_en_GB.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="en_GB"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_en_ZA.ts b/lumina-xconfig/i18n/lumina-xconfig_en_ZA.ts new file mode 100644 index 00000000..28ecea6e --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_en_ZA.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="en_ZA"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_es.ts b/lumina-xconfig/i18n/lumina-xconfig_es.ts new file mode 100644 index 00000000..04ecad3c --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_es.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="es_ES"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_et.ts b/lumina-xconfig/i18n/lumina-xconfig_et.ts new file mode 100644 index 00000000..8c9ea560 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_et.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="et_EE"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_eu.ts b/lumina-xconfig/i18n/lumina-xconfig_eu.ts new file mode 100644 index 00000000..43af96eb --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_eu.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="eu_ES"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_fa.ts b/lumina-xconfig/i18n/lumina-xconfig_fa.ts new file mode 100644 index 00000000..ec6d1a4e --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_fa.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="fa_IR"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_fi.ts b/lumina-xconfig/i18n/lumina-xconfig_fi.ts new file mode 100644 index 00000000..afaf9e44 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_fi.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="fi_FI"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_fr.ts b/lumina-xconfig/i18n/lumina-xconfig_fr.ts new file mode 100644 index 00000000..983be725 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_fr.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="fr_FR"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_fr_CA.ts b/lumina-xconfig/i18n/lumina-xconfig_fr_CA.ts new file mode 100644 index 00000000..7f4cf455 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_fr_CA.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="fr_CA"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_gl.ts b/lumina-xconfig/i18n/lumina-xconfig_gl.ts new file mode 100644 index 00000000..c67947fa --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_gl.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="gl_ES"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_he.ts b/lumina-xconfig/i18n/lumina-xconfig_he.ts new file mode 100644 index 00000000..71aaf886 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_he.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="he_IL"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_hi.ts b/lumina-xconfig/i18n/lumina-xconfig_hi.ts new file mode 100644 index 00000000..b5486bbb --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_hi.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="hi_IN"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_hr.ts b/lumina-xconfig/i18n/lumina-xconfig_hr.ts new file mode 100644 index 00000000..e182599b --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_hr.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="hr_HR"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_hu.ts b/lumina-xconfig/i18n/lumina-xconfig_hu.ts new file mode 100644 index 00000000..24721702 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_hu.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="hu_HU"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_id.ts b/lumina-xconfig/i18n/lumina-xconfig_id.ts new file mode 100644 index 00000000..5898f681 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_id.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="id_ID"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_is.ts b/lumina-xconfig/i18n/lumina-xconfig_is.ts new file mode 100644 index 00000000..c1800c9d --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_is.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="is_IS"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_it.ts b/lumina-xconfig/i18n/lumina-xconfig_it.ts new file mode 100644 index 00000000..61c04918 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_it.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="it_IT"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_ja.ts b/lumina-xconfig/i18n/lumina-xconfig_ja.ts new file mode 100644 index 00000000..0b5611e8 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_ja.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ja_JP"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_ka.ts b/lumina-xconfig/i18n/lumina-xconfig_ka.ts new file mode 100644 index 00000000..f1af1936 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_ka.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ka_GE"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_ko.ts b/lumina-xconfig/i18n/lumina-xconfig_ko.ts new file mode 100644 index 00000000..7d70aed2 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_ko.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ko_KR"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_lt.ts b/lumina-xconfig/i18n/lumina-xconfig_lt.ts new file mode 100644 index 00000000..4c461882 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_lt.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="lt_LT"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_lv.ts b/lumina-xconfig/i18n/lumina-xconfig_lv.ts new file mode 100644 index 00000000..8169c3ce --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_lv.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="lv_LV"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_mk.ts b/lumina-xconfig/i18n/lumina-xconfig_mk.ts new file mode 100644 index 00000000..c56764ee --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_mk.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="mk_MK"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_mn.ts b/lumina-xconfig/i18n/lumina-xconfig_mn.ts new file mode 100644 index 00000000..844219c9 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_mn.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="mn_MN"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_ms.ts b/lumina-xconfig/i18n/lumina-xconfig_ms.ts new file mode 100644 index 00000000..330af06c --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_ms.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ms_MY"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_mt.ts b/lumina-xconfig/i18n/lumina-xconfig_mt.ts new file mode 100644 index 00000000..5ef11dcc --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_mt.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="mt_MT"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_nb.ts b/lumina-xconfig/i18n/lumina-xconfig_nb.ts new file mode 100644 index 00000000..90a410ec --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_nb.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="nb_NO"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_nl.ts b/lumina-xconfig/i18n/lumina-xconfig_nl.ts new file mode 100644 index 00000000..9e739505 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_nl.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="nl_NL"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_pa.ts b/lumina-xconfig/i18n/lumina-xconfig_pa.ts new file mode 100644 index 00000000..6845fd1a --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_pa.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="pa_IN"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_pl.ts b/lumina-xconfig/i18n/lumina-xconfig_pl.ts new file mode 100644 index 00000000..fb60fbb0 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_pl.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="pl_PL"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_pt.ts b/lumina-xconfig/i18n/lumina-xconfig_pt.ts new file mode 100644 index 00000000..b3cbf875 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_pt.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="pt_BR"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_pt_BR.ts b/lumina-xconfig/i18n/lumina-xconfig_pt_BR.ts new file mode 100644 index 00000000..b3cbf875 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_pt_BR.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="pt_BR"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_ro.ts b/lumina-xconfig/i18n/lumina-xconfig_ro.ts new file mode 100644 index 00000000..73c6d1cd --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_ro.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ro_RO"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_ru.ts b/lumina-xconfig/i18n/lumina-xconfig_ru.ts new file mode 100644 index 00000000..f62cf2e1 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_ru.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ru_RU"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_sk.ts b/lumina-xconfig/i18n/lumina-xconfig_sk.ts new file mode 100644 index 00000000..899d9f46 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_sk.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="sk_SK"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_sl.ts b/lumina-xconfig/i18n/lumina-xconfig_sl.ts new file mode 100644 index 00000000..7f39524d --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_sl.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="sl_SI"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_sr.ts b/lumina-xconfig/i18n/lumina-xconfig_sr.ts new file mode 100644 index 00000000..1d02152a --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_sr.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="sr_RS"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_sv.ts b/lumina-xconfig/i18n/lumina-xconfig_sv.ts new file mode 100644 index 00000000..9a84441f --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_sv.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="sv_SE"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_sw.ts b/lumina-xconfig/i18n/lumina-xconfig_sw.ts new file mode 100644 index 00000000..0b71f0ef --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_sw.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="sw_TZ"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_ta.ts b/lumina-xconfig/i18n/lumina-xconfig_ta.ts new file mode 100644 index 00000000..134d2bbb --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_ta.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ta_IN"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_tg.ts b/lumina-xconfig/i18n/lumina-xconfig_tg.ts new file mode 100644 index 00000000..268fac8b --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_tg.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="tg_TJ"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_th.ts b/lumina-xconfig/i18n/lumina-xconfig_th.ts new file mode 100644 index 00000000..c6cff8e0 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_th.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="th_TH"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_tr.ts b/lumina-xconfig/i18n/lumina-xconfig_tr.ts new file mode 100644 index 00000000..86089945 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_tr.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="tr_TR"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_uk.ts b/lumina-xconfig/i18n/lumina-xconfig_uk.ts new file mode 100644 index 00000000..df16936b --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_uk.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="uk_UA"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_uz.ts b/lumina-xconfig/i18n/lumina-xconfig_uz.ts new file mode 100644 index 00000000..f1a84854 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_uz.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="uz_UZ"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_vi.ts b/lumina-xconfig/i18n/lumina-xconfig_vi.ts new file mode 100644 index 00000000..c3b761e4 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_vi.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="vi_VN"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_zh_CN.ts b/lumina-xconfig/i18n/lumina-xconfig_zh_CN.ts new file mode 100644 index 00000000..e5ca8aa9 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_zh_CN.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="zh_CN"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_zh_HK.ts b/lumina-xconfig/i18n/lumina-xconfig_zh_HK.ts new file mode 100644 index 00000000..1e2ff180 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_zh_HK.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="zh_HK"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_zh_TW.ts b/lumina-xconfig/i18n/lumina-xconfig_zh_TW.ts new file mode 100644 index 00000000..4b703e33 --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_zh_TW.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="zh_TW"> +</TS> diff --git a/lumina-xconfig/i18n/lumina-xconfig_zu.ts b/lumina-xconfig/i18n/lumina-xconfig_zu.ts new file mode 100644 index 00000000..6c7991fb --- /dev/null +++ b/lumina-xconfig/i18n/lumina-xconfig_zu.ts @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="zu_ZA"> +</TS> diff --git a/lumina-xconfig/lumina-xconfig.pro b/lumina-xconfig/lumina-xconfig.pro new file mode 100644 index 00000000..9b15459b --- /dev/null +++ b/lumina-xconfig/lumina-xconfig.pro @@ -0,0 +1,106 @@ + +QT += core gui +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets network + +TARGET = lumina-xconfig +isEmpty(PREFIX) { + PREFIX = /usr/local +} +target.path = $$PREFIX/bin + +isEmpty(LIBPREFIX) { + LIBPREFIX = $$PREFIX/lib +} + +TEMPLATE = app + +SOURCES += main.cpp \ + mainUI.cpp + +HEADERS += mainUI.h + +FORMS += mainUI.ui + +# RESOURCES+= lumina-config.qrc + +INCLUDEPATH += ../libLumina $$PREFIX/include + +LIBS += -L../libLumina -L$$LIBPREFIX -lLuminaUtils + +isEmpty(QT5LIBDIR) { + QT5LIBDIR = $$PREFIX/lib/qt5 +} + +LRELEASE = $$QT5LIBDIR/bin/lrelease + + +QMAKE_LIBDIR = ../libLumina +DEPENDPATH += ../libLumina + +TRANSLATIONS = i18n/lumina-xconfig_af.ts \ + i18n/lumina-xconfig_ar.ts \ + i18n/lumina-xconfig_az.ts \ + i18n/lumina-xconfig_bg.ts \ + i18n/lumina-xconfig_bn.ts \ + i18n/lumina-xconfig_bs.ts \ + i18n/lumina-xconfig_ca.ts \ + i18n/lumina-xconfig_cs.ts \ + i18n/lumina-xconfig_cy.ts \ + i18n/lumina-xconfig_da.ts \ + i18n/lumina-xconfig_de.ts \ + i18n/lumina-xconfig_el.ts \ + i18n/lumina-xconfig_en_GB.ts \ + i18n/lumina-xconfig_en_ZA.ts \ + i18n/lumina-xconfig_es.ts \ + i18n/lumina-xconfig_et.ts \ + i18n/lumina-xconfig_eu.ts \ + i18n/lumina-xconfig_fa.ts \ + i18n/lumina-xconfig_fi.ts \ + i18n/lumina-xconfig_fr.ts \ + i18n/lumina-xconfig_fr_CA.ts \ + i18n/lumina-xconfig_gl.ts \ + i18n/lumina-xconfig_he.ts \ + i18n/lumina-xconfig_hi.ts \ + i18n/lumina-xconfig_hr.ts \ + i18n/lumina-xconfig_hu.ts \ + i18n/lumina-xconfig_id.ts \ + i18n/lumina-xconfig_is.ts \ + i18n/lumina-xconfig_it.ts \ + i18n/lumina-xconfig_ja.ts \ + i18n/lumina-xconfig_ka.ts \ + i18n/lumina-xconfig_ko.ts \ + i18n/lumina-xconfig_lt.ts \ + i18n/lumina-xconfig_lv.ts \ + i18n/lumina-xconfig_mk.ts \ + i18n/lumina-xconfig_mn.ts \ + i18n/lumina-xconfig_ms.ts \ + i18n/lumina-xconfig_mt.ts \ + i18n/lumina-xconfig_nb.ts \ + i18n/lumina-xconfig_nl.ts \ + i18n/lumina-xconfig_pa.ts \ + i18n/lumina-xconfig_pl.ts \ + i18n/lumina-xconfig_pt.ts \ + i18n/lumina-xconfig_pt_BR.ts \ + i18n/lumina-xconfig_ro.ts \ + i18n/lumina-xconfig_ru.ts \ + i18n/lumina-xconfig_sk.ts \ + i18n/lumina-xconfig_sl.ts \ + i18n/lumina-xconfig_sr.ts \ + i18n/lumina-xconfig_sv.ts \ + i18n/lumina-xconfig_sw.ts \ + i18n/lumina-xconfig_ta.ts \ + i18n/lumina-xconfig_tg.ts \ + i18n/lumina-xconfig_th.ts \ + i18n/lumina-xconfig_tr.ts \ + i18n/lumina-xconfig_uk.ts \ + i18n/lumina-xconfig_uz.ts \ + i18n/lumina-xconfig_vi.ts \ + i18n/lumina-xconfig_zh_CN.ts \ + i18n/lumina-xconfig_zh_HK.ts \ + i18n/lumina-xconfig_zh_TW.ts \ + i18n/lumina-xconfig_zu.ts + +dotrans.path=$$PREFIX/share/Lumina-DE/i18n/ +dotrans.extra=cd i18n && $${LRELEASE} -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)$$PREFIX/share/Lumina-DE/i18n/ + +INSTALLS += target dotrans diff --git a/lumina-xconfig/main.cpp b/lumina-xconfig/main.cpp new file mode 100644 index 00000000..de8de504 --- /dev/null +++ b/lumina-xconfig/main.cpp @@ -0,0 +1,41 @@ +#include <QApplication> +#include <QDebug> +#include <QFile> +#include <QStringList> + +#include "MainUI.h" +#include <LuminaOS.h> +#include <LuminaThemes.h> +#include <LuminaUtils.h> +#include <LuminaSingleApplication.h> + +int main(int argc, char ** argv) +{ + /*QStringList in; + for(int i=1; i<argc; i++){ //skip the first arg (app binary) + QString path = argv[i]; + if(path=="."){ + //Insert the current working directory + in << QDir::currentPath(); + }else{ + if(!path.startsWith("/")){ path.prepend(QDir::currentPath()+"/"); } + in << path; + } + } + if(in.isEmpty()){ in << QDir::homePath(); }*/ + + LSingleApplication a(argc, argv, "lumina-xconfig"); //loads translations inside constructor + if( !a.isPrimaryProcess()){ return 0; } + //qDebug() << "Loaded QApplication"; + a.setApplicationName("Lumina Screen Configuration"); + LuminaThemeEngine themes(&a); + + //Start the UI + MainUI w; + QObject::connect(&a, SIGNAL(InputsAvailable(QStringList)), &w, SLOT(slotSingleInstance()) ); + QObject::connect(&themes, SIGNAL(updateIcons()), &w, SLOT(loadIcons()) ); + w.show(); + + int retCode = a.exec(); + return retCode; +} |