itom
Loading...
Searching...
No Matches
dialogPipManager.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom.
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 itom is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17 General Public Licence for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with itom. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************** */
22
23#pragma once
24
25#include "../../common/addInInterface.h"
26#include "../../common/sharedStructures.h"
27
28#include "../models/pipManager.h"
29
30#include <qdialog.h>
31#include <qvector.h>
32#include <qevent.h>
33#include <qcolor.h>
34
35#include "ui_dialogPipManager.h"
36
37namespace ito {
38
39class DialogPipManager : public QDialog
40{
41 Q_OBJECT
42
43 Q_PROPERTY(QColor colorMessage READ colorMessage WRITE setColorMessage DESIGNABLE true);
44 Q_PROPERTY(QColor colorError READ colorError WRITE setColorError DESIGNABLE true);
45
46public:
47 DialogPipManager(QWidget *parent = NULL, bool standalone = false);
49
50 QColor colorMessage() { return m_colorMessage; }
51 void setColorMessage(const QColor &color);
52
53 QColor colorError() { return m_colorError; }
54 void setColorError(const QColor &color);
55
56protected:
57 void closeEvent(QCloseEvent *e);
58 PipGeneralOptions createOptions() const;
59
60 void installOrUpdatePackage(bool update = false);
61 QString exportPackageTableToString() const;
62
63private:
64 PipManager *m_pPipManager;
65 Ui::DialogPipManager ui;
66 QString m_logHtml;
67 PipManager::Task m_currentTask;
68 int m_lastLogEntry; //-1: nothing yet, 0: standard text, 1: error text
69 bool m_outputSilent;
70 bool m_standalone;
71 QColor m_colorMessage;
72 QColor m_colorError;
73
74 static QString invisiblePwStr;
75
76
77
78private slots:
79 void pipVersion(const QString &version);
80 void outputReceived(const QString &text, bool success);
81 void pipRequestStarted(const PipManager::Task &task, const QString &text, bool outputSilent);
82 void pipRequestFinished(const PipManager::Task &task, const QString &text, bool success);
83 void on_btnReload_clicked();
84 void on_btnCheckForUpdates_clicked();
85 void on_btnInstall_clicked();
86 void on_btnUninstall_clicked();
87 void on_btnUpdate_clicked();
88 void on_btnSudoUninstall_clicked();
89 void on_btnVerifyInstalledPackages_clicked();
90 void on_btnCancelFetchDetails_clicked();
91 void treeViewSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
92 void tableCustomContextMenuRequested(const QPoint &pos);
93 void exportTableToClipboard();
94 void exportTableToCsv();
95 void pipFetchDetailsProgress(int totalNumberOfUnfetchedDetails, int recentlyFetchedDetails, bool finished);
96};
97
98} //end namespace ito
Definition dialogPipManager.h:40
Definition pipManager.h:86
Definition apiFunctionsGraph.cpp:40
Definition pipManager.h:54