diff options
author | Weblate <noreply@weblate.org> | 2016-09-16 19:38:14 +0000 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2016-09-16 19:38:14 +0000 |
commit | 8be77a80c4430b85dae569923c3efc6ed2384472 (patch) | |
tree | a972234c061667fcd01fb2d76220567af1abe34f /src-qt5/desktop-utils/lumina-fm/gitWizard.h | |
parent | Translated using Weblate (lumina_DESKTOP@fa (generated)) (diff) | |
parent | Add syntax highlighting for "shell" files (.sh) (diff) | |
download | lumina-8be77a80c4430b85dae569923c3efc6ed2384472.tar.gz lumina-8be77a80c4430b85dae569923c3efc6ed2384472.tar.bz2 lumina-8be77a80c4430b85dae569923c3efc6ed2384472.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/gitWizard.h')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/gitWizard.h | 67 |
1 files changed, 67 insertions, 0 deletions
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..4a6ec2bc --- /dev/null +++ b/src-qt5/desktop-utils/lumina-fm/gitWizard.h @@ -0,0 +1,67 @@ +//=========================================== +// 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 <QWizard> +#include <QString> +#include <QMessageBox> + +#include "gitCompat.h" + +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; + GitProcess *proc; + + QString assembleURL(); + //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 + + //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 |