Add notification when uploading images

This commit is contained in:
lupoDharkael
2017-05-16 23:40:27 +02:00
parent 784bae45ce
commit 8f22cb1854
4 changed files with 11 additions and 0 deletions

View File

@@ -355,6 +355,7 @@ void CaptureWidget::uploadScreenshot() {
s.uploadToImgur(am, getExtendedSelection());
}
hide();
Q_EMIT newMessage("Uploading image...");
}
void CaptureWidget::undo() {

View File

@@ -44,6 +44,9 @@ public:
void redefineButtons();
signals:
void newMessage(QString);
private slots:
void saveScreenshot();
void copyScreenshot();

View File

@@ -101,6 +101,8 @@ void Controller::initDefaults() {
void Controller::slotPrintHotkey() {
if (!m_captureWindow) {
m_captureWindow = new CaptureWidget();
connect(m_captureWindow, &CaptureWidget::newMessage,
this, &Controller::showMessage);
}
}
@@ -117,3 +119,7 @@ void Controller::openInfoWindow() {
m_infoWindow = new InfoWindow();
}
}
void Controller::showMessage(QString msg) {
m_trayIcon->showMessage("Flameshot Info", msg);
}

View File

@@ -38,6 +38,7 @@ private slots:
void slotPrintHotkey();
void openConfigWindow();
void openInfoWindow();
void showMessage(QString);
private:
void createActions();