aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm/OPWidget.h
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2016-12-14 21:52:08 +0000
committerWeblate <noreply@weblate.org>2016-12-14 21:52:08 +0000
commitf274dd0526568b50e113baa85fcb26a87575eed9 (patch)
treecabcdb147e5dbf2cbe4c321c5ad59963c40c3e89 /src-qt5/desktop-utils/lumina-fm/OPWidget.h
parentTranslated using Weblate (lumina_CONFIG@sl (generated)) (diff)
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-f274dd0526568b50e113baa85fcb26a87575eed9.tar.gz
lumina-f274dd0526568b50e113baa85fcb26a87575eed9.tar.bz2
lumina-f274dd0526568b50e113baa85fcb26a87575eed9.zip
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/OPWidget.h')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/OPWidget.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/OPWidget.h b/src-qt5/desktop-utils/lumina-fm/OPWidget.h
new file mode 100644
index 00000000..4fdb7db8
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-fm/OPWidget.h
@@ -0,0 +1,64 @@
+//===========================================
+// Lumina-DE source code
+// Copyright (c) 2016, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+// This is the system tray icon for queueing/running file operations
+//===========================================
+#ifndef _LUMINA_FILE_MANAGER_FILE_OP_OPWIDGET_H
+#define _LUMINA_FILE_MANAGER_FILE_OP_OPWIDGET_H
+
+#include "FODialog.h"
+#include "ScrollDialog.h"
+
+#include <QWidgetAction>
+
+namespace Ui{
+ class OPWidget;
+};
+
+class OPWidget : public QWidget{
+ Q_OBJECT
+public:
+ OPWidget(QWidget *parent = 0);
+ ~OPWidget();
+
+ QWidgetAction* widgetAction(); //for loading the widget into a menu
+
+ void setupOperation(QString optype, QStringList oldF, QStringList newF);
+
+ bool isDone();
+
+ //Status reporting after worker finishes
+ bool hasErrors();
+ float duration(); //in seconds
+ QString finalStat(); //Final status message
+
+public slots:
+ void startOperation();
+
+private:
+ Ui::OPWidget *ui;
+ ScrollDialog *dlg;
+ //Main Objects
+ QWidgetAction *WA;
+ FOWorker *worker;
+ QThread *workthread;
+ //Bookkeeping items for statistics and such
+ qint64 starttime, endtime; //in ms
+ QStringList Errors;
+ QString tract; //translated action
+
+private slots:
+ void closeWidget();
+ void showErrors();
+ void opFinished(QStringList); //errors
+ void opUpdate(int, int, QString, QString); //current, total, old file, new file
+
+signals:
+ void starting(QString);
+ void finished(QString);
+ void closed(QString);
+};
+#endif
bgstack15