itom 2.0.0
D:/git-itom/sources/itom/Qitom/ui/dialogPipManager.h
00001 /* ********************************************************************
00002     itom software
00003     URL: http://www.uni-stuttgart.de/ito
00004     Copyright (C) 2015, Institut für Technische Optik (ITO),
00005     Universität Stuttgart, Germany
00006 
00007     This file is part of itom.
00008   
00009     itom is free software; you can redistribute it and/or modify it
00010     under the terms of the GNU Library General Public Licence as published by
00011     the Free Software Foundation; either version 2 of the Licence, or (at
00012     your option) any later version.
00013 
00014     itom is distributed in the hope that it will be useful, but
00015     WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library
00017     General Public Licence for more details.
00018 
00019     You should have received a copy of the GNU Library General Public License
00020     along with itom. If not, see <http://www.gnu.org/licenses/>.
00021 *********************************************************************** */
00022 
00023 #ifndef DIALOGPIPMANAGER_H
00024 #define DIALOGPIPMANAGER_H
00025 
00026 #include "../../common/addInInterface.h"
00027 #include "../../common/sharedStructures.h"
00028 
00029 #include "../models/pipManager.h"
00030 
00031 #include <qdialog.h>
00032 #include <qvector.h>
00033 #include <qevent.h>
00034 
00035 #include "ui_dialogPipManager.h"
00036 
00037 namespace ito {
00038 
00039 class DialogPipManager : public QDialog 
00040 {
00041     Q_OBJECT
00042 
00043 public:
00044     DialogPipManager(QWidget *parent = NULL, bool standalone = false);
00045     ~DialogPipManager();
00046 
00047 protected:
00048     void closeEvent(QCloseEvent *e);
00049     PipGeneralOptions createOptions() const;
00050 
00051     void installOrUpdatePackage();
00052 
00053 private:
00054     PipManager *m_pPipManager;
00055     Ui::DialogPipManager ui;
00056     QString logHtml;
00057     PipManager::Task m_currentTask;
00058     int m_lastLogEntry; //-1: nothing yet, 0: standard text, 1: error text
00059     bool m_outputSilent;
00060     bool m_standalone;
00061 
00062 private slots:
00063     void pipVersion(const QString &version);
00064     void outputReceived(const QString &text, bool success);
00065     void pipRequestStarted(const PipManager::Task &task, const QString &text, bool outputSilent);
00066     void pipRequestFinished(const PipManager::Task &task, const QString &text, bool success);
00067     void on_btnReload_clicked();
00068     void on_btnCheckForUpdates_clicked();
00069     void on_btnInstall_clicked();
00070     void on_btnUninstall_clicked();
00071     void on_btnUpdate_clicked();
00072     void on_btnSudoUninstall_clicked();
00073     void treeViewSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
00074 };
00075 
00076 } //end namespace ito
00077 
00078 #endif
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends