From 188efd21b0255be16813438ad593d098526a6745 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 15 Sep 2016 07:44:58 -0400 Subject: Add in the new Git Cloning Wizard. Now fully finished yet, but almost there. --- src-qt5/desktop-utils/lumina-fm/gitWizard.h | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src-qt5/desktop-utils/lumina-fm/gitWizard.h (limited to 'src-qt5/desktop-utils/lumina-fm/gitWizard.h') diff --git a/src-qt5/desktop-utils/lumina-fm/gitWizard.h b/src-qt5/desktop-utils/lumina-fm/gitWizard.h new file mode 100644 index 00000000..a95ecb2b --- /dev/null +++ b/src-qt5/desktop-utils/lumina-fm/gitWizard.h @@ -0,0 +1,43 @@ +//=========================================== +// 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 dialog for cloning a git repository +//=========================================== +#ifndef _LUMINA_FM_GIT_DIALOG_H +#define _LUMINA_FM_GIT_DIALOG_H + +#include +#include +#include + +namespace Ui{ + class GitWizard; +}; + +class GitWizard : public QWizard{ + Q_OBJECT +public: + GitWizard(QWidget *parent = 0); + ~GitWizard(); + + //Input values; + void setWorkingDir(QString path); + +private: + Ui::GitWizard *ui; + QString inDir; + + QString assembleURL(); + void showDownload(QProcess *P); + +private slots: + //Page Change slots + void pageChanged(int newpage); //called when the "next" button is clicked + void finished(int); //called when the "finish" button is clicked + +}; + +#endif -- cgit From 4e8537a11832f00b58334e805e2b9aede0fcd0ff Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 15 Sep 2016 14:04:02 -0400 Subject: Get the Git clone functionality all functional. The last thing missing is a graphical dialog showing the status of the download. --- src-qt5/desktop-utils/lumina-fm/gitWizard.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-fm/gitWizard.h') diff --git a/src-qt5/desktop-utils/lumina-fm/gitWizard.h b/src-qt5/desktop-utils/lumina-fm/gitWizard.h index a95ecb2b..e68ac82d 100644 --- a/src-qt5/desktop-utils/lumina-fm/gitWizard.h +++ b/src-qt5/desktop-utils/lumina-fm/gitWizard.h @@ -11,7 +11,8 @@ #include #include -#include + +#include "gitCompat.h" namespace Ui{ class GitWizard; @@ -31,13 +32,16 @@ private: QString inDir; QString assembleURL(); - void showDownload(QProcess *P); + void showDownload(GitProcess *P); private slots: //Page Change slots void pageChanged(int newpage); //called when the "next" button is clicked void finished(int); //called when the "finish" button is clicked + //Page validation slots + void validateRepo(); //for page_repo + void validateType(); //for page_type }; #endif -- cgit From 9f79342ab366a74a26b2957e88af265e90658025 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 15 Sep 2016 14:47:06 -0400 Subject: Get the progress reporting all setup for the git clone. Now it is all set and ready for use! --- src-qt5/desktop-utils/lumina-fm/gitWizard.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-fm/gitWizard.h') diff --git a/src-qt5/desktop-utils/lumina-fm/gitWizard.h b/src-qt5/desktop-utils/lumina-fm/gitWizard.h index e68ac82d..4a6ec2bc 100644 --- a/src-qt5/desktop-utils/lumina-fm/gitWizard.h +++ b/src-qt5/desktop-utils/lumina-fm/gitWizard.h @@ -11,6 +11,7 @@ #include #include +#include #include "gitCompat.h" @@ -30,18 +31,37 @@ public: private: Ui::GitWizard *ui; QString inDir; + GitProcess *proc; QString assembleURL(); - void showDownload(GitProcess *P); + //void showDownload(GitProcess *P); private slots: //Page Change slots void pageChanged(int newpage); //called when the "next" button is clicked - void finished(int); //called when the "finish" button is clicked + //void finished(int); //called when the "finish" button is clicked //Page validation slots void validateRepo(); //for page_repo void validateType(); //for page_type + + //process output + void readProc(); + void procFinished(int retcode); + +protected: + void closeEvent(QCloseEvent *ev){ + //Make sure the process is not running first + if(proc!=0 && proc->state()!=QProcess::NotRunning){ + ev->ignore(); + if(QMessageBox::Yes == QMessageBox::question(this, tr("Stop Download?"), tr("Kill the current download?") ) ){ + proc->kill(); + } + }else{ + QWizard::closeEvent(ev); + this->deleteLater(); //we need to clean this up completely + } + } }; #endif -- cgit