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

9.1-release9.2-releaseenter/10releng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1releng/10.1.1releng/10.1.2releng/10.2
Last change on this file since 98b904e was 98b904e, checked in by Kris Moore <kris@…>, 2 years ago

Fix a bug preventing us from running a fresh package update check
after doing an update

  • Property mode set to 100644
File size: 2.7 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    void slotCloseClicked();
42   
43    // Generic pkgng handlers
44    void slotReadPkgOutput();
45    void slotPkgDone();
46
47    // Meta-Packages
48    void slotFinishLoadingMetaPkgs();
49    void slotGetPackageDataOutput();
50    void slotApplyClicked();
51
52    // Package updates
53    void slotRescanPkgsClicked();
54    void slotUpdatePkgsClicked();
55    void slotApplyMetaChanges();
56    void slotDeskPkgsChanged(QTreeWidgetItem *aItem, int __unused);
57    void slotMetaRightClick();
58    void slotMetaViewPkgs();
59
60private:
61    // Generic pkg process handlers
62    void prepPkgProcess();
63    void startPkgProcess();
64    QList<QStringList> pkgCmdList;
65    bool pkgHasFailed;
66
67    // Updates
68    void doUpdates();
69    bool sanityCheck();
70
71    int curUpdate;
72    int curUpdateIndex;
73    int totUpdate;
74    bool dPackages;
75    bool uPackages;
76    QProcess *uProc;
77    QList<QStringList> listUpdates;
78    QString wDir, wIP;
79    QString lastError;
80    QSocketNotifier *eSock;
81
82
83    // Meta-Packages
84    void initMetaWidget();
85    void populateMetaPkgs();
86    void addTreeItems(QString parent);
87    bool isMetaPkgInstalled(QString mPkg);
88    void checkMPKGUpdates();
89    void parseTmpMetaList();
90    void saveMetaPkgs();
91    void startMetaChanges();
92    bool haveAMetaDesktop();
93    bool haveMetaPkgChanges();
94    QString getAddPkgs();
95    QString getDelPkgs();
96    bool allChildrenPkgsChecked(QString parent);
97    bool allChildrenPkgsUnchecked(QString parent);
98    void checkAllChildrenPkgs(QString parent);
99    void uncheckAllChildrenPkgs(QString parent);
100    QString getLineFromCommandOutput( QString cmd );
101
102    QList<QStringList> metaPkgList;
103    QStringList tmpMetaPkgList;
104    QString addPkgs;
105    QString delPkgs;
106    QString pkgSource;
107    QString curFileText;
108    QProcess *getMetaProc;
109    QString chrootArg1;
110    QString chrootArg2;
111    QString ConflictList;
112    bool canceled;
113    QMenu *popup;
114    dialogInfo *dIB;
115
116signals:
117
118} ;
119#endif // MAINWIN_H
120
Note: See TracBrowser for help on using the repository browser.