source: src-qt4/pc-pkgmanager/mainWin.h @ b4350b9

9.1-release9.2-releasereleng/10.0releng/10.0.1
Last change on this file since b4350b9 was b4350b9, checked in by Kris Moore <kris@…>, 12 months ago

Change how we call the conflict message box, add a placeholder for additional text about the conflicting packages, so we can make a better choice as to remove it or not

  • Property mode set to 100644
File size: 2.8 KB
Line 
1#ifndef MAINWIN_H
2#define MAINWIN_H
3
4#include <QDialog>
5#include <QFile>
6#include <QMenu>
7#include <QMessageBox>
8#include <QProcess>
9#include <QProgressDialog>
10#include <QSocketNotifier>
11#include <QStringList>
12#include <QTextStream>
13#include <QTimer>
14
15#include <pcbsd-utils.h>
16#include <pcbsd-ui.h>
17#include "ui_mainWin.h"
18#include "../config.h"
19
20/* Change this to switch the default patch tmpdir */
21const QString PATCHTMPDIR_DEFAULT( PREFIX + "/tmp" );
22#define SYSTRIGGER "/tmp/.sysupdatetraytrigger"
23
24class mainWin : public QMainWindow, private Ui::mainWin
25{
26        Q_OBJECT
27
28public:
29        mainWin() : QMainWindow()
30        {
31          setupUi(this);
32        }
33
34    QMap <QString, QString> codeMap;
35
36public slots:
37    void ProgramInit(QString);
38    void slotSingleInstance();
39
40private slots:
41   
42    // Generic pkgng handlers
43    void slotReadPkgOutput();
44    void slotPkgDone();
45
46    // Meta-Packages
47    void slotFinishLoadingMetaPkgs();
48    void slotGetPackageDataOutput();
49    void slotApplyClicked();
50
51    // Package updates
52    void slotRescanPkgsClicked();
53    void slotUpdatePkgsClicked();
54    void slotApplyMetaChanges();
55    void slotDeskPkgsChanged(QTreeWidgetItem *aItem, int __unused);
56    void slotMetaRightClick();
57    void slotMetaViewPkgs();
58
59    // UI Stuff
60    void slotViewChanged();
61    void slotCloseClicked();
62
63private:
64    // Generic pkg process handlers
65    void prepPkgProcess();
66    void startPkgProcess();
67    QList<QStringList> pkgCmdList;
68    bool pkgHasFailed;
69    QString getConflictDetailText();
70
71    // Updates
72    void doUpdates();
73    bool sanityCheck();
74
75    int curUpdate;
76    int curUpdateIndex;
77    int totUpdate;
78    bool dPackages;
79    bool uPackages;
80    QProcess *uProc;
81    QList<QStringList> listUpdates;
82    QString wDir, wIP;
83    QString lastError;
84    QSocketNotifier *eSock;
85
86
87    // Meta-Packages
88    void initMetaWidget();
89    void populateMetaPkgs();
90    void addTreeItems(QString parent);
91    bool isMetaPkgInstalled(QString mPkg);
92    void checkMPKGUpdates();
93    void parseTmpMetaList();
94    void saveMetaPkgs();
95    void startMetaChanges();
96    bool haveAMetaDesktop();
97    bool haveMetaPkgChanges();
98    QString getAddPkgs();
99    QString getDelPkgs();
100    bool allChildrenPkgsChecked(QString parent);
101    bool allChildrenPkgsUnchecked(QString parent);
102    void checkAllChildrenPkgs(QString parent);
103    void uncheckAllChildrenPkgs(QString parent);
104    QString getLineFromCommandOutput( QString cmd );
105
106    QList<QStringList> metaPkgList;
107    QStringList tmpMetaPkgList;
108    QString addPkgs;
109    QString delPkgs;
110    QString pkgSource;
111    QString curFileText;
112    QProcess *getMetaProc;
113    QString chrootArg1;
114    QString chrootArg2;
115    QString ConflictList;
116    bool canceled;
117    QMenu *popup;
118    dialogInfo *dIB;
119    QActionGroup *viewGroup;
120
121signals:
122
123} ;
124#endif // MAINWIN_H
125
Note: See TracBrowser for help on using the repository browser.