diff options
Diffstat (limited to 'src-qt5/desktop-utils/lumina-screenshot')
11 files changed, 190 insertions, 71 deletions
diff --git a/src-qt5/desktop-utils/lumina-screenshot/ImageEditor.cpp b/src-qt5/desktop-utils/lumina-screenshot/ImageEditor.cpp index 7516f204..fa5a7318 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/ImageEditor.cpp +++ b/src-qt5/desktop-utils/lumina-screenshot/ImageEditor.cpp @@ -27,6 +27,7 @@ void ImageEditor::LoadImage(QImage img){ this->update(); //trigger paint event selRect = QRect(); emit selectionChanged(false); + emit scaleFactorChanged(getScaleFactor()*100); } void ImageEditor::setDefaultSize(QSize sz){ @@ -53,24 +54,37 @@ QImage ImageEditor::image(){ return fullIMG; } +int ImageEditor::getScalingValue(){ + return (getScaleFactor() *100); +} + // === PRIVATE SLOTS === void ImageEditor::showMenu(){ contextMenu->popup(QCursor::pos()); } // === PUBLIC SLOTS === +void ImageEditor::setScaling(int perc){ + qreal sf = ((qreal) perc)/100.0; + if(sf<0.05){ sf = 0.05; } //5% minimum + else if(sf>2){ sf = 2.0; } //200% maximum + rescaleImage(sf); +} + void ImageEditor::scaleUp(int val){ qreal sf = getScaleFactor(); sf+= ((qreal) val)/100.0; if(sf>2){ sf = 2.0; } rescaleImage(sf); + emit scaleFactorChanged(sf*100); } void ImageEditor::scaleDown(int val){ qreal sf = getScaleFactor(); sf-= ((qreal) val)/100.0; - if(sf<0.1){ sf = 0.1; } + if(sf<0.05){ sf = 0.05; } rescaleImage(sf); + emit scaleFactorChanged(sf*100); } void ImageEditor::cropImage(){ @@ -81,6 +95,7 @@ void ImageEditor::cropImage(){ scaledIMG = fullIMG.scaled( defaultSize, Qt::KeepAspectRatio,Qt::SmoothTransformation); selRect = QRect(); emit selectionChanged(false); + emit scaleFactorChanged(getScaleFactor()*100); this->update(); //trigger paint event } @@ -94,28 +109,34 @@ void ImageEditor::resizeImage(){ void ImageEditor::mousePressEvent(QMouseEvent *ev){ selRect = QRect(); //reset it emit selectionChanged(false); - selPoint = ev->pos(); //widget-relative coords + if(scaledIMG.rect().contains(ev->pos())){ + selPoint = ev->pos(); //widget-relative coords + }else{ + selPoint = QPoint(); + } } void ImageEditor::mouseMoveEvent(QMouseEvent *ev){ - if( !this->geometry().contains(ev->pos()) ){ selRect = QRect(); } + if( selPoint.isNull() ){ return; } else if(selPoint.x() < ev->pos().x()){ if(selPoint.y() < ev->pos().y()){ //init point is upper-left corner - selRect = QRect(selPoint, ev->pos()); + selRect = QRect(selPoint, ev->pos()).intersected(scaledIMG.rect()); }else{ //init point is lower-left corner selRect.setBottomLeft(selPoint); selRect.setTopRight(ev->pos()); + selRect = selRect.intersected(scaledIMG.rect()); } }else{ if(selPoint.y() < ev->pos().y()){ //init point is upper-right corner selRect.setBottomLeft(ev->pos()); selRect.setTopRight(selPoint); + selRect = selRect.intersected(scaledIMG.rect()); }else{ //init point is lower-right corner - selRect = QRect(ev->pos(), selPoint); + selRect = QRect(ev->pos(), selPoint).intersected(scaledIMG.rect()); } } this->update(); diff --git a/src-qt5/desktop-utils/lumina-screenshot/ImageEditor.h b/src-qt5/desktop-utils/lumina-screenshot/ImageEditor.h index 58a16e56..869c49fc 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/ImageEditor.h +++ b/src-qt5/desktop-utils/lumina-screenshot/ImageEditor.h @@ -28,6 +28,8 @@ public: bool hasSelection(); QImage image(); + int getScalingValue(); + private: QImage fullIMG, scaledIMG; //Note: the aspect ratio between the two images must be preserved!! QSize defaultSize; //for loading new images @@ -53,6 +55,7 @@ private slots: void showMenu(); public slots: + void setScaling(int perc); //10% <--> 200% range is valid void scaleUp(int val = 10); //10% change by default void scaleDown(int val = 10); //10% change by default @@ -67,6 +70,6 @@ protected: signals: void selectionChanged(bool); //true if there is a selection - + void scaleFactorChanged(int); }; #endif diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp index 83940c93..ac17ee3e 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp @@ -8,6 +8,8 @@ #include "ui_MainUI.h" #include <LuminaX11.h> +#include <QMessageBox> + MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ ui->setupUi(this); //load the designer file @@ -17,13 +19,16 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ ui->scrollArea->setWidget(IMG); ui->tabWidget->setCurrentWidget(ui->tab_view); ppath = QDir::homePath(); - + ui->label_zoom_percent->setMinimumWidth( ui->label_zoom_percent->fontMetrics().width("200%") ); setupIcons(); ui->spin_monitor->setMaximum(QApplication::desktop()->screenCount()); if(ui->spin_monitor->maximum()<2){ ui->spin_monitor->setEnabled(false); ui->radio_monitor->setEnabled(false); } + scaleTimer = new QTimer(this); + scaleTimer->setSingleShot(true); + scaleTimer->setInterval(200); //~1/5 second //Setup the connections connect(ui->tool_save, SIGNAL(clicked()), this, SLOT(saveScreenshot()) ); @@ -35,6 +40,9 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ connect(ui->actionTake_Screenshot, SIGNAL(triggered()), this, SLOT(startScreenshot()) ); connect(ui->tool_crop, SIGNAL(clicked()), IMG, SLOT(cropImage()) ); connect(IMG, SIGNAL(selectionChanged(bool)), this, SLOT(imgselchanged(bool)) ); + connect(IMG, SIGNAL(scaleFactorChanged(int)), this, SLOT(imgScalingChanged(int)) ); + connect(ui->slider_zoom, SIGNAL(valueChanged(int)), this, SLOT(sliderChanged()) ); + connect(scaleTimer, SIGNAL(timeout()), this, SLOT(imgScalingChanged()) ); settings = new QSettings("lumina-desktop", "lumina-screenshot",this); if(settings->value("screenshot-target", "window").toString() == "window") { @@ -48,6 +56,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ this->show(); IMG->setDefaultSize(ui->scrollArea->maximumViewportSize()); IMG->LoadImage( QApplication::screens().at(0)->grabWindow(QApplication::desktop()->winId()).toImage() ); //initial screenshot + lastScreenShot = QDateTime::currentDateTime(); //ui->label_screenshot->setPixmap( cpic.scaled(ui->label_screenshot->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation) ); } @@ -69,26 +78,36 @@ void MainUI::setupIcons(){ //ui->actionEdit->setIcon( LXDG::findIcon("applications-graphics","") ); } +void MainUI::showSaveError(QString path){ + QMessageBox::warning(this, tr("Could not save screenshot"), tr("The screenshot could not be saved. Please check directory permissions or pick a different directory")+"\n\n"+path); +} //============== // PRIVATE SLOTS //============== void MainUI::saveScreenshot(){ if(mousegrabbed){ return; } - QString filepath = QFileDialog::getSaveFileName(this, tr("Save Screenshot"), ppath, tr("PNG Files (*.png);;AllFiles (*)") ); + QString filepath = QFileDialog::getSaveFileName(this, tr("Save Screenshot"), ppath+"/"+QString( "Screenshot-%1.png" ).arg( lastScreenShot.toString("yyyy-MM-dd-hh-mm-ss")), tr("PNG Files (*.png);;AllFiles (*)") ); if(filepath.isEmpty()){ return; } if(!filepath.endsWith(".png")){ filepath.append(".png"); } - IMG->image().save(filepath, "png"); - ppath = filepath; + if( !IMG->image().save(filepath, "png") ){ + showSaveError(filepath); + }else{ + ppath = filepath.section("/",0,-2); //just the directory + } } + void MainUI::quicksave(){ if(mousegrabbed){ return; } QString savedir = QDir::homePath()+"/"; if(QFile::exists(savedir + "Pictures/")){ savedir.append("Pictures/"); } else if(QFile::exists(savedir + "Images/")){ savedir.append("Images/"); } - QString path = savedir + QString( "Screenshot-%1.png" ).arg( QDateTime::currentDateTime().toString("yyyy-MM-dd-hh-mm-ss") ); - IMG->image().save(path, "png"); - QProcess::startDetached("lumina-open \""+path+"\""); + QString path = savedir + QString( "Screenshot-%1.png" ).arg( lastScreenShot.toString("yyyy-MM-dd-hh-mm-ss") ); + if(IMG->image().save(path, "png") ){ + QProcess::startDetached("lumina-open \""+path+"\""); + }else{ + showSaveError(path); + } } void MainUI::startScreenshot(){ @@ -104,6 +123,22 @@ void MainUI::imgselchanged(bool hassel){ ui->tool_resize->setEnabled(hassel); } +void MainUI::imgScalingChanged(int percent){ + //qDebug() << "Scale Changed:" << percent; + if(percent<0){ + //Changed by user interaction + IMG->setScaling(ui->slider_zoom->value()); + }else{ + ui->slider_zoom->setValue(percent); + } + ui->label_zoom_percent->setText( QString::number(ui->slider_zoom->value())+"%"); +} + +void MainUI::sliderChanged(){ + ui->label_zoom_percent->setText( QString::number(ui->slider_zoom->value())+"%"); + scaleTimer->start(); +} + bool MainUI::getWindow(){ //Use this function to set cwin cwin = 0; @@ -145,6 +180,7 @@ void MainUI::getPixmap(){ this->show(); this->setGeometry(lastgeom); ui->tabWidget->setCurrentWidget(ui->tab_view); //view it right now + lastScreenShot = QDateTime::currentDateTime(); //Now display the pixmap on the label as well IMG->LoadImage( cpic.toImage() ); } diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.h b/src-qt5/desktop-utils/lumina-screenshot/MainUI.h index 853fb194..bb1b61df 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.h +++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.h @@ -20,7 +20,7 @@ #include <QScreen> #include <LuminaXDG.h> -#include <LuminaUtils.h> +#include <LUtils.h> #include <LuminaX11.h> #include "ImageEditor.h" @@ -46,9 +46,13 @@ private: WId cwin; //current window to screenshot QSettings *settings; LXCB *XCB; //Library access to window subsystems + QTimer *scaleTimer; //Image Editor widget ImageEditor *IMG; + QDateTime lastScreenShot; + + void showSaveError(QString path); private slots: //Button Slots @@ -61,6 +65,9 @@ private slots: void startScreenshot(); void imgselchanged(bool hassel); + void imgScalingChanged(int percent = -1); + void sliderChanged(); + //Utility functions to perform a screenshot bool getWindow(); //set the "cwin" variable as appropriate void getPixmap(); //set the "cpic" variable to the new screenshot diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.ui b/src-qt5/desktop-utils/lumina-screenshot/MainUI.ui index db1c0cee..22b99b72 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.ui +++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.ui @@ -11,7 +11,7 @@ </rect> </property> <property name="windowTitle"> - <string>Take Screenshot</string> + <string>Lumina Screenshot</string> </property> <widget class="QWidget" name="centralwidget"> <layout class="QVBoxLayout" name="verticalLayout"> @@ -188,21 +188,70 @@ <number>1</number> </property> <item> - <widget class="QScrollArea" name="scrollArea"> - <property name="widgetResizable"> - <bool>true</bool> - </property> - <widget class="QWidget" name="scrollAreaWidgetContents"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>341</width> - <height>171</height> - </rect> - </property> - </widget> - </widget> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <item> + <widget class="QLabel" name="label_zoom_percent"> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="text"> + <string notr="true"/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QSlider" name="slider_zoom"> + <property name="minimum"> + <number>5</number> + </property> + <property name="maximum"> + <number>200</number> + </property> + <property name="singleStep"> + <number>5</number> + </property> + <property name="value"> + <number>100</number> + </property> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="tickPosition"> + <enum>QSlider::TicksBothSides</enum> + </property> + <property name="tickInterval"> + <number>20</number> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QScrollArea" name="scrollArea"> + <property name="widgetResizable"> + <bool>true</bool> + </property> + <widget class="QWidget" name="scrollAreaWidgetContents"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>306</width> + <height>173</height> + </rect> + </property> + </widget> + </widget> + </item> + </layout> </item> <item> <layout class="QHBoxLayout" name="horizontalLayout_2"> @@ -274,7 +323,7 @@ <x>0</x> <y>0</y> <width>349</width> - <height>23</height> + <height>22</height> </rect> </property> <widget class="QMenu" name="menuFile"> diff --git a/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_de.ts b/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_de.ts index efda8a4c..83fe5eaf 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_de.ts +++ b/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_de.ts @@ -97,17 +97,17 @@ <message> <location filename="../MainUI.ui" line="67"/> <source>Entire Session</source> - <translation>vollständige Session</translation> + <translation>Vollständige Sitzung</translation> </message> <message> <location filename="../MainUI.ui" line="81"/> <source>Single Window</source> - <translation>einzelnes Fenster</translation> + <translation>Einzelnes Fenster</translation> </message> <message> <location filename="../MainUI.ui" line="74"/> <source>Single Screen</source> - <translation>einzelner Bildschirm</translation> + <translation>Einzelner Bildschirm</translation> </message> <message> <location filename="../MainUI.cpp" line="77"/> diff --git a/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_el.ts b/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_el.ts index bf8e086e..7bbc8d1e 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_el.ts +++ b/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_el.ts @@ -1,17 +1,17 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.1"> +<TS version="2.1" language="l-screenshot_el"> <context> <name>ImageEditor</name> <message> <location filename="../ImageEditor.cpp" line="14"/> <source>Zoom In</source> - <translation type="unfinished"></translation> + <translation>Μεγένθυση</translation> </message> <message> <location filename="../ImageEditor.cpp" line="15"/> <source>Zoom Out</source> - <translation type="unfinished"></translation> + <translation>Σμίκρυνση</translation> </message> </context> <context> @@ -21,113 +21,113 @@ <location filename="../MainUI.ui" line="162"/> <location filename="../MainUI.ui" line="295"/> <source>Take Screenshot</source> - <translation type="unfinished"></translation> + <translation>Πάρτε στιγμιότυπο οθόνης</translation> </message> <message> <location filename="../MainUI.ui" line="37"/> <source>New Screenshot</source> - <translation type="unfinished"></translation> + <translation>Νέο Στιγμιότυπο οθόνης</translation> </message> <message> <location filename="../MainUI.ui" line="43"/> <source>Settings</source> - <translation type="unfinished"></translation> + <translation>Ρυθμίσεις</translation> </message> <message> <location filename="../MainUI.ui" line="124"/> <source>Include Borders</source> - <translation type="unfinished"></translation> + <translation>Συμπερίληψη περιθωρίων</translation> </message> <message> <location filename="../MainUI.ui" line="149"/> <source> Seconds</source> - <translation type="unfinished"></translation> + <translation> Δευτερόλεπτα</translation> </message> <message> <location filename="../MainUI.ui" line="152"/> <source>Delay </source> - <translation type="unfinished"></translation> + <translation>Καθυστέρηση </translation> </message> <message> <location filename="../MainUI.ui" line="172"/> <source>View/Edit</source> - <translation type="unfinished"></translation> + <translation>Προβολή/Επεξεργασία</translation> </message> <message> <location filename="../MainUI.ui" line="212"/> <location filename="../MainUI.ui" line="306"/> <source>Save As</source> - <translation type="unfinished"></translation> + <translation>Αποθήκευση Ως</translation> </message> <message> <location filename="../MainUI.ui" line="222"/> <source>Launch Editor</source> - <translation type="unfinished"></translation> + <translation>Εκκίνηση Επεξεργαστή</translation> </message> <message> <location filename="../MainUI.ui" line="245"/> <source>Crop</source> - <translation type="unfinished"></translation> + <translation>Περικοπή</translation> </message> <message> <location filename="../MainUI.ui" line="255"/> <source>Resize</source> - <translation type="unfinished"></translation> + <translation>Αλλαγή μεγέθους</translation> </message> <message> <location filename="../MainUI.ui" line="282"/> <source>File</source> - <translation type="unfinished"></translation> + <translation>Αρχείο</translation> </message> <message> <location filename="../MainUI.ui" line="298"/> <source>Ctrl+N</source> - <translation type="unfinished"></translation> + <translation>Ctrl+N</translation> </message> <message> <location filename="../MainUI.ui" line="322"/> <source>Close</source> - <translation type="unfinished"></translation> + <translation>Κλείσιμο</translation> </message> <message> <location filename="../MainUI.ui" line="325"/> <source>Esc</source> - <translation type="unfinished"></translation> + <translation>Esc</translation> </message> <message> <location filename="../MainUI.ui" line="67"/> <source>Entire Session</source> - <translation type="unfinished"></translation> + <translation>Ολόκληρη την Συνεδρία</translation> </message> <message> <location filename="../MainUI.ui" line="81"/> <source>Single Window</source> - <translation type="unfinished"></translation> + <translation>Μόνο αυτό το παράθυρο</translation> </message> <message> <location filename="../MainUI.ui" line="74"/> <source>Single Screen</source> - <translation type="unfinished"></translation> + <translation>Μόνο αυτή την οθόνη</translation> </message> <message> <location filename="../MainUI.cpp" line="77"/> <source>Save Screenshot</source> - <translation type="unfinished"></translation> + <translation>Αποθήκευση Στιγμιοτύπου Οθόνης</translation> </message> <message> <location filename="../MainUI.ui" line="309"/> <source>Ctrl+S</source> - <translation type="unfinished"></translation> + <translation>Ctrl+S</translation> </message> <message> <location filename="../MainUI.ui" line="317"/> <source>Quick Save</source> - <translation type="unfinished"></translation> + <translation>Γρήγορη Αποθήκευση</translation> </message> <message> <location filename="../MainUI.cpp" line="77"/> <source>PNG Files (*.png);;AllFiles (*)</source> - <translation type="unfinished"></translation> + <translation>Αρχεία PNG (*.png);;ΌλαΤαΑρχεία (*)</translation> </message> </context> </TS> diff --git a/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_it.ts b/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_it.ts index 080f9b96..3ed38c74 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_it.ts +++ b/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_it.ts @@ -46,7 +46,7 @@ <message> <location filename="../MainUI.ui" line="152"/> <source>Delay </source> - <translation>Ritardo</translation> + <translation>Ritardo </translation> </message> <message> <location filename="../MainUI.ui" line="172"/> diff --git a/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.desktop b/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.desktop index b1c386fc..c4678265 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.desktop +++ b/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -Exec=lumina-screenshot +Exec=lumina-screenshot -new-instance Icon=camera-web Terminal=false Type=Application diff --git a/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro b/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro index 6f47f61f..cb2b9713 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro +++ b/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro @@ -1,6 +1,6 @@ include("$${PWD}/../../OS-detect.pri") -QT += core gui +QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets x11extras @@ -9,6 +9,13 @@ target.path = $${L_BINDIR} TEMPLATE = app +#include all the special classes from the Lumina tree +include(../../core/libLumina/LUtils.pri) #includes LUtils +include(../../core/libLumina/LuminaXDG.pri) +include(../../core/libLumina/LuminaSingleApplication.pri) +include(../../core/libLumina/LuminaThemes.pri) +include(../../core/libLumina/LuminaX11.pri) + SOURCES += main.cpp \ MainUI.cpp \ ImageEditor.cpp @@ -18,10 +25,6 @@ HEADERS += MainUI.h \ FORMS += MainUI.ui -LIBS += -lLuminaUtils - -DEPENDPATH += ../libLumina - TRANSLATIONS = i18n/l-screenshot_af.ts \ i18n/l-screenshot_ar.ts \ i18n/l-screenshot_az.ts \ diff --git a/src-qt5/desktop-utils/lumina-screenshot/main.cpp b/src-qt5/desktop-utils/lumina-screenshot/main.cpp index aee374b0..7ba9d2d5 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/main.cpp +++ b/src-qt5/desktop-utils/lumina-screenshot/main.cpp @@ -6,18 +6,18 @@ #include "MainUI.h" #include <LuminaOS.h> #include <LuminaThemes.h> -#include <LuminaUtils.h> +#include <LUtils.h> +#include <LuminaSingleApplication.h> int main(int argc, char ** argv) { LTHEME::LoadCustomEnvSettings(); - QApplication a(argc, argv); - LuminaThemeEngine theme(&a); + LSingleApplication a(argc, argv, "l-screenshot"); + //LuminaThemeEngine theme(&a); a.setApplicationName("Take Screenshot"); - LUtils::LoadTranslation(&a, "l-screenshot"); MainUI w; - QObject::connect(&theme,SIGNAL(updateIcons()), &w, SLOT(setupIcons()) ); + //QObject::connect(&theme,SIGNAL(updateIcons()), &w, SLOT(setupIcons()) ); w.show(); return a.exec(); |