From 725ca9791ec516f1bb0c5a37ec17fbedd888d928 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 13 Oct 2016 13:10:34 -0400 Subject: Another large update to lumina-fm: Have all file operations performed in the background, and show up within a new system tray icon *if* the operation lasts longer than 1 second (automatic cleanup for short ops). --- src-qt5/desktop-utils/lumina-fm/OPWidget.h | 59 ++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src-qt5/desktop-utils/lumina-fm/OPWidget.h (limited to 'src-qt5/desktop-utils/lumina-fm/OPWidget.h') 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..600df4b7 --- /dev/null +++ b/src-qt5/desktop-utils/lumina-fm/OPWidget.h @@ -0,0 +1,59 @@ +//=========================================== +// 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" +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; + //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 -- cgit From 36df3d58e25beb06f16fdf821f18fe8a4bcce2ae Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 20 Oct 2016 12:05:22 -0400 Subject: Finish up the last couple buttons/actions related to the new Tray UI. 1) If closing the main window while an operation is running, hide it instead until the file operation is finished - then close. 2) Fix the icon on the show errors button 3) Hook up the show errors button to show a scroll dialog with the errors. --- src-qt5/desktop-utils/lumina-fm/OPWidget.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src-qt5/desktop-utils/lumina-fm/OPWidget.h') diff --git a/src-qt5/desktop-utils/lumina-fm/OPWidget.h b/src-qt5/desktop-utils/lumina-fm/OPWidget.h index 600df4b7..13fb3cb3 100644 --- a/src-qt5/desktop-utils/lumina-fm/OPWidget.h +++ b/src-qt5/desktop-utils/lumina-fm/OPWidget.h @@ -10,6 +10,7 @@ #define _LUMINA_FILE_MANAGER_FILE_OP_OPWIDGET_H #include "FODialog.h" +#include "ScrollDialog.h" namespace Ui{ class OPWidget; }; @@ -36,6 +37,7 @@ public slots: private: Ui::OPWidget *ui; + ScrollDialog *dlg; //Main Objects QWidgetAction *WA; FOWorker *worker; -- cgit From 7ab900e41f5f15adccd573d459a80fe60cf6a044 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 7 Nov 2016 13:52:20 -0500 Subject: LARGE UPDATE: 1) Dismantle the Lumina library completely. 2) Setup lots of small subproject files (.pri) for the individual classes within the old library. 3) Move all the Lumina binaries to use the new subproject files 4) Split up the LuminaUtils class/files into LUtils and LDesktopUtils (generic utilities, and desktop-specific utilities) --- src-qt5/desktop-utils/lumina-fm/OPWidget.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src-qt5/desktop-utils/lumina-fm/OPWidget.h') diff --git a/src-qt5/desktop-utils/lumina-fm/OPWidget.h b/src-qt5/desktop-utils/lumina-fm/OPWidget.h index 13fb3cb3..4fdb7db8 100644 --- a/src-qt5/desktop-utils/lumina-fm/OPWidget.h +++ b/src-qt5/desktop-utils/lumina-fm/OPWidget.h @@ -11,6 +11,9 @@ #include "FODialog.h" #include "ScrollDialog.h" + +#include + namespace Ui{ class OPWidget; }; -- cgit