aboutsummaryrefslogtreecommitdiff
path: root/lumina-screenshot
diff options
context:
space:
mode:
authorq5sys <jt@obs-sec.com>2016-03-25 03:01:40 -0400
committerq5sys <jt@obs-sec.com>2016-03-25 03:01:40 -0400
commitd110efb5e12c8301d4b6c420d7a59e0d7ee0673b (patch)
tree67252e7f3386b9efc8bbbda80443c3cfd17a89bf /lumina-screenshot
parentUpdate MainUI.h (diff)
downloadlumina-d110efb5e12c8301d4b6c420d7a59e0d7ee0673b.tar.gz
lumina-d110efb5e12c8301d4b6c420d7a59e0d7ee0673b.tar.bz2
lumina-d110efb5e12c8301d4b6c420d7a59e0d7ee0673b.zip
Update MainUI.cpp
added quicksave
Diffstat (limited to 'lumina-screenshot')
-rw-r--r--lumina-screenshot/MainUI.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/lumina-screenshot/MainUI.cpp b/lumina-screenshot/MainUI.cpp
index cd33666b..cd6e87e4 100644
--- a/lumina-screenshot/MainUI.cpp
+++ b/lumina-screenshot/MainUI.cpp
@@ -27,9 +27,11 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
//Setup the connections
connect(ui->actionSave, SIGNAL(triggered()), this, SLOT(saveScreenshot()) );
+ connect(ui->actionquicksave, SIGNAL(triggered()), this, SLOT(quicksave()) );
connect(ui->actionQuit, SIGNAL(triggered()), this, SLOT(closeApplication()) );
connect(ui->actionNew, SIGNAL(triggered()), this, SLOT(startScreenshot()) );
+
QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
settings = new QSettings("LuminaDE", "lumina-screenshot",this);
@@ -49,10 +51,11 @@ MainUI::~MainUI(){}
void MainUI::setupIcons(){
//Setup the icons
- this->setWindowIcon( LXDG::findIcon("camera-web","") );
ui->actionSave->setIcon( LXDG::findIcon("document-save","") );
+ ui->actionquicksave->setIcon( LXDG::findIcon("document-save","") );
ui->actionQuit->setIcon( LXDG::findIcon("application-exit","") );
ui->actionNew->setIcon( LXDG::findIcon("camera-web","") );
+
}
//==============
@@ -65,6 +68,17 @@ void MainUI::saveScreenshot(){
cpic.save(filepath, "png");
ppath = filepath;
}
+void MainUI::quicksave(){
+ QString savedir = QDir::homePath() + "/Pictures/";
+ QDate date = QDate::currentDate();
+ QString dateString = date.toString();
+ QTime time = QTime::currentTime();
+ QString timeString = time.toString();
+ QString path = savedir + QString("Screenshot-[%1 - %2].png").arg(dateString).arg(timeString);
+ cpic.save(path, "png");
+}
+
+
void MainUI::startScreenshot(){
if( !getWindow() ){ return; }
bgstack15