aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-screenshot
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2016-12-14 21:54:31 +0000
committerWeblate <noreply@weblate.org>2016-12-14 21:54:31 +0000
commitb965af1625a4296f8ff6d3a1663cae23b73d334f (patch)
tree459685dd1da8c75f67772762aa062d80dfc148f0 /src-qt5/desktop-utils/lumina-screenshot
parentTranslated using Weblate (lumina_DESKTOP@fr (generated)) (diff)
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-b965af1625a4296f8ff6d3a1663cae23b73d334f.tar.gz
lumina-b965af1625a4296f8ff6d3a1663cae23b73d334f.tar.bz2
lumina-b965af1625a4296f8ff6d3a1663cae23b73d334f.zip
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/desktop-utils/lumina-screenshot')
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/ImageEditor.cpp31
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/ImageEditor.h5
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp50
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/MainUI.h9
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/MainUI.ui83
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_de.ts56
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_el.ts56
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_it.ts58
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro11
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/main.cpp7
10 files changed, 242 insertions, 124 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 13a8096e..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
@@ -1,15 +1,15 @@
-<?xml version='1.0' encoding='utf-8'?>
+<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="de">
<context>
<name>ImageEditor</name>
<message>
- <location filename="../ImageEditor.cpp" line="14"></location>
+ <location filename="../ImageEditor.cpp" line="14"/>
<source>Zoom In</source>
<translation>Vergrößern</translation>
</message>
<message>
- <location filename="../ImageEditor.cpp" line="15"></location>
+ <location filename="../ImageEditor.cpp" line="15"/>
<source>Zoom Out</source>
<translation>Verkleinern</translation>
</message>
@@ -17,115 +17,115 @@
<context>
<name>MainUI</name>
<message>
- <location filename="../MainUI.ui" line="14"></location>
- <location filename="../MainUI.ui" line="162"></location>
- <location filename="../MainUI.ui" line="295"></location>
+ <location filename="../MainUI.ui" line="14"/>
+ <location filename="../MainUI.ui" line="162"/>
+ <location filename="../MainUI.ui" line="295"/>
<source>Take Screenshot</source>
<translation>Bildschirmfoto erstellen</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="37"></location>
+ <location filename="../MainUI.ui" line="37"/>
<source>New Screenshot</source>
<translation>Neues Bildschirmfoto</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="43"></location>
+ <location filename="../MainUI.ui" line="43"/>
<source>Settings</source>
<translation>Einstellungen</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="124"></location>
+ <location filename="../MainUI.ui" line="124"/>
<source>Include Borders</source>
<translation>Rahmen inkludieren</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="149"></location>
+ <location filename="../MainUI.ui" line="149"/>
<source> Seconds</source>
<translation> Sekunden</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="152"></location>
+ <location filename="../MainUI.ui" line="152"/>
<source>Delay </source>
<translation>Verzögerung </translation>
</message>
<message>
- <location filename="../MainUI.ui" line="172"></location>
+ <location filename="../MainUI.ui" line="172"/>
<source>View/Edit</source>
<translation>Ansicht/Bearbeiten</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="212"></location>
- <location filename="../MainUI.ui" line="306"></location>
+ <location filename="../MainUI.ui" line="212"/>
+ <location filename="../MainUI.ui" line="306"/>
<source>Save As</source>
<translation>Speichern unter</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="222"></location>
+ <location filename="../MainUI.ui" line="222"/>
<source>Launch Editor</source>
<translation>Editor starten</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="245"></location>
+ <location filename="../MainUI.ui" line="245"/>
<source>Crop</source>
<translation>Zuschneiden</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="255"></location>
+ <location filename="../MainUI.ui" line="255"/>
<source>Resize</source>
<translation>Größe ändern</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="282"></location>
+ <location filename="../MainUI.ui" line="282"/>
<source>File</source>
<translation>Datei</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="298"></location>
+ <location filename="../MainUI.ui" line="298"/>
<source>Ctrl+N</source>
<translation>Strg+N</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="322"></location>
+ <location filename="../MainUI.ui" line="322"/>
<source>Close</source>
<translation>Schließen</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="325"></location>
+ <location filename="../MainUI.ui" line="325"/>
<source>Esc</source>
<translation>Esc</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="67"></location>
+ <location filename="../MainUI.ui" line="67"/>
<source>Entire Session</source>
<translation>Vollständige Sitzung</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="81"></location>
+ <location filename="../MainUI.ui" line="81"/>
<source>Single Window</source>
<translation>Einzelnes Fenster</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="74"></location>
+ <location filename="../MainUI.ui" line="74"/>
<source>Single Screen</source>
<translation>Einzelner Bildschirm</translation>
</message>
<message>
- <location filename="../MainUI.cpp" line="77"></location>
+ <location filename="../MainUI.cpp" line="77"/>
<source>Save Screenshot</source>
<translation>Bildschirmfoto speichern</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="309"></location>
+ <location filename="../MainUI.ui" line="309"/>
<source>Ctrl+S</source>
<translation>Strg+S</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="317"></location>
+ <location filename="../MainUI.ui" line="317"/>
<source>Quick Save</source>
<translation>Schnellspeichern</translation>
</message>
<message>
- <location filename="../MainUI.cpp" line="77"></location>
+ <location filename="../MainUI.cpp" line="77"/>
<source>PNG Files (*.png);;AllFiles (*)</source>
<translation>PNG-Dateien (*.png);;Alle Dateien (*)</translation>
</message>
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 dc049e22..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,15 +1,15 @@
-<?xml version='1.0' encoding='utf-8'?>
+<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="l-screenshot_el">
<context>
<name>ImageEditor</name>
<message>
- <location filename="../ImageEditor.cpp" line="14"></location>
+ <location filename="../ImageEditor.cpp" line="14"/>
<source>Zoom In</source>
<translation>Μεγένθυση</translation>
</message>
<message>
- <location filename="../ImageEditor.cpp" line="15"></location>
+ <location filename="../ImageEditor.cpp" line="15"/>
<source>Zoom Out</source>
<translation>Σμίκρυνση</translation>
</message>
@@ -17,115 +17,115 @@
<context>
<name>MainUI</name>
<message>
- <location filename="../MainUI.ui" line="14"></location>
- <location filename="../MainUI.ui" line="162"></location>
- <location filename="../MainUI.ui" line="295"></location>
+ <location filename="../MainUI.ui" line="14"/>
+ <location filename="../MainUI.ui" line="162"/>
+ <location filename="../MainUI.ui" line="295"/>
<source>Take Screenshot</source>
<translation>Πάρτε στιγμιότυπο οθόνης</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="37"></location>
+ <location filename="../MainUI.ui" line="37"/>
<source>New Screenshot</source>
<translation>Νέο Στιγμιότυπο οθόνης</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="43"></location>
+ <location filename="../MainUI.ui" line="43"/>
<source>Settings</source>
<translation>Ρυθμίσεις</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="124"></location>
+ <location filename="../MainUI.ui" line="124"/>
<source>Include Borders</source>
<translation>Συμπερίληψη περιθωρίων</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="149"></location>
+ <location filename="../MainUI.ui" line="149"/>
<source> Seconds</source>
<translation> Δευτερόλεπτα</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="152"></location>
+ <location filename="../MainUI.ui" line="152"/>
<source>Delay </source>
<translation>Καθυστέρηση </translation>
</message>
<message>
- <location filename="../MainUI.ui" line="172"></location>
+ <location filename="../MainUI.ui" line="172"/>
<source>View/Edit</source>
<translation>Προβολή/Επεξεργασία</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="212"></location>
- <location filename="../MainUI.ui" line="306"></location>
+ <location filename="../MainUI.ui" line="212"/>
+ <location filename="../MainUI.ui" line="306"/>
<source>Save As</source>
<translation>Αποθήκευση Ως</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="222"></location>
+ <location filename="../MainUI.ui" line="222"/>
<source>Launch Editor</source>
<translation>Εκκίνηση Επεξεργαστή</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="245"></location>
+ <location filename="../MainUI.ui" line="245"/>
<source>Crop</source>
<translation>Περικοπή</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="255"></location>
+ <location filename="../MainUI.ui" line="255"/>
<source>Resize</source>
<translation>Αλλαγή μεγέθους</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="282"></location>
+ <location filename="../MainUI.ui" line="282"/>
<source>File</source>
<translation>Αρχείο</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="298"></location>
+ <location filename="../MainUI.ui" line="298"/>
<source>Ctrl+N</source>
<translation>Ctrl+N</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="322"></location>
+ <location filename="../MainUI.ui" line="322"/>
<source>Close</source>
<translation>Κλείσιμο</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="325"></location>
+ <location filename="../MainUI.ui" line="325"/>
<source>Esc</source>
<translation>Esc</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="67"></location>
+ <location filename="../MainUI.ui" line="67"/>
<source>Entire Session</source>
<translation>Ολόκληρη την Συνεδρία</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="81"></location>
+ <location filename="../MainUI.ui" line="81"/>
<source>Single Window</source>
<translation>Μόνο αυτό το παράθυρο</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="74"></location>
+ <location filename="../MainUI.ui" line="74"/>
<source>Single Screen</source>
<translation>Μόνο αυτή την οθόνη</translation>
</message>
<message>
- <location filename="../MainUI.cpp" line="77"></location>
+ <location filename="../MainUI.cpp" line="77"/>
<source>Save Screenshot</source>
<translation>Αποθήκευση Στιγμιοτύπου Οθόνης</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="309"></location>
+ <location filename="../MainUI.ui" line="309"/>
<source>Ctrl+S</source>
<translation>Ctrl+S</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="317"></location>
+ <location filename="../MainUI.ui" line="317"/>
<source>Quick Save</source>
<translation>Γρήγορη Αποθήκευση</translation>
</message>
<message>
- <location filename="../MainUI.cpp" line="77"></location>
+ <location filename="../MainUI.cpp" line="77"/>
<source>PNG Files (*.png);;AllFiles (*)</source>
<translation>Αρχεία PNG (*.png);;ΌλαΤαΑρχεία (*)</translation>
</message>
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 615c77b4..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
@@ -1,15 +1,15 @@
-<?xml version='1.0' encoding='utf-8'?>
+<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="it">
<context>
<name>ImageEditor</name>
<message>
- <location filename="../ImageEditor.cpp" line="14"></location>
+ <location filename="../ImageEditor.cpp" line="14"/>
<source>Zoom In</source>
<translation>Zuma in</translation>
</message>
<message>
- <location filename="../ImageEditor.cpp" line="15"></location>
+ <location filename="../ImageEditor.cpp" line="15"/>
<source>Zoom Out</source>
<translation>Zuma Fuori</translation>
</message>
@@ -17,115 +17,115 @@
<context>
<name>MainUI</name>
<message>
- <location filename="../MainUI.ui" line="14"></location>
- <location filename="../MainUI.ui" line="162"></location>
- <location filename="../MainUI.ui" line="295"></location>
+ <location filename="../MainUI.ui" line="14"/>
+ <location filename="../MainUI.ui" line="162"/>
+ <location filename="../MainUI.ui" line="295"/>
<source>Take Screenshot</source>
<translation>Cattura schermata</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="37"></location>
+ <location filename="../MainUI.ui" line="37"/>
<source>New Screenshot</source>
<translation>Nuova Schermata</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="43"></location>
+ <location filename="../MainUI.ui" line="43"/>
<source>Settings</source>
<translation>Impostazioni</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="124"></location>
+ <location filename="../MainUI.ui" line="124"/>
<source>Include Borders</source>
<translation>Includi il bordo</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="149"></location>
+ <location filename="../MainUI.ui" line="149"/>
<source> Seconds</source>
<translation> Secondi</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="152"></location>
+ <location filename="../MainUI.ui" line="152"/>
<source>Delay </source>
<translation>Ritardo </translation>
</message>
<message>
- <location filename="../MainUI.ui" line="172"></location>
+ <location filename="../MainUI.ui" line="172"/>
<source>View/Edit</source>
<translation>Visualizza/Edita</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="212"></location>
- <location filename="../MainUI.ui" line="306"></location>
+ <location filename="../MainUI.ui" line="212"/>
+ <location filename="../MainUI.ui" line="306"/>
<source>Save As</source>
<translation>Salva Come</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="222"></location>
+ <location filename="../MainUI.ui" line="222"/>
<source>Launch Editor</source>
- <translation>Avvia l'Editor</translation>
+ <translation>Avvia l&apos;Editor</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="245"></location>
+ <location filename="../MainUI.ui" line="245"/>
<source>Crop</source>
<translation>Ritaglia</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="255"></location>
+ <location filename="../MainUI.ui" line="255"/>
<source>Resize</source>
<translation>Ridimensiona</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="282"></location>
+ <location filename="../MainUI.ui" line="282"/>
<source>File</source>
<translation>File</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="298"></location>
+ <location filename="../MainUI.ui" line="298"/>
<source>Ctrl+N</source>
<translation>Ctrl+N</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="322"></location>
+ <location filename="../MainUI.ui" line="322"/>
<source>Close</source>
<translation>Chiudi</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="325"></location>
+ <location filename="../MainUI.ui" line="325"/>
<source>Esc</source>
<translation>Esc</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="67"></location>
+ <location filename="../MainUI.ui" line="67"/>
<source>Entire Session</source>
<translation>Sessione Intera</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="81"></location>
+ <location filename="../MainUI.ui" line="81"/>
<source>Single Window</source>
<translation>Finestra Singola</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="74"></location>
+ <location filename="../MainUI.ui" line="74"/>
<source>Single Screen</source>
<translation>Singola Finestra</translation>
</message>
<message>
- <location filename="../MainUI.cpp" line="77"></location>
+ <location filename="../MainUI.cpp" line="77"/>
<source>Save Screenshot</source>
<translation>Salva schermata</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="309"></location>
+ <location filename="../MainUI.ui" line="309"/>
<source>Ctrl+S</source>
<translation>Ctrl+S</translation>
</message>
<message>
- <location filename="../MainUI.ui" line="317"></location>
+ <location filename="../MainUI.ui" line="317"/>
<source>Quick Save</source>
<translation>Salvataggio Rapido</translation>
</message>
<message>
- <location filename="../MainUI.cpp" line="77"></location>
+ <location filename="../MainUI.cpp" line="77"/>
<source>PNG Files (*.png);;AllFiles (*)</source>
<translation>File PNG (*.png);;AllFiles (*)</translation>
</message>
diff --git a/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro b/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro
index a85b234c..cb2b9713 100644
--- a/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro
+++ b/src-qt5/desktop-utils/lumina-screenshot/lumina-screenshot.pro
@@ -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 27e1f2ff..7ba9d2d5 100644
--- a/src-qt5/desktop-utils/lumina-screenshot/main.cpp
+++ b/src-qt5/desktop-utils/lumina-screenshot/main.cpp
@@ -6,19 +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();
LSingleApplication a(argc, argv, "l-screenshot");
- LuminaThemeEngine theme(&a);
+ //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();
bgstack15