source: src-qt4/EasyPBI/mainGUI.h @ 56d14dd

9.1-release9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since 56d14dd was 56d14dd, checked in by Ken Moore <ken@…>, 17 months ago

Give EasyPBI the ability to set desktop/menu entries as requiring root (using pc-su), add a menu button to re-load the current module, and fix a couple bugs with the xdg entry binary (used to crash if you gave it a path like "bin/app").

  • Property mode set to 100644
File size: 3.1 KB
Line 
1#ifndef MAINGUI_H
2#define MAINGUI_H
3
4#include <QMainWindow>
5#include <QFileDialog>
6#include <QInputDialog>
7#include <QMessageBox>
8#include <QString>
9#include <QDir>
10#include <QProcess>
11#include <QTimer>
12#include <QDateTime>
13#include <QRadioButton>
14#include <QMenu>
15#include <QFileDialog>
16#include <QTreeWidget>
17#include <QTreeWidgetItem>
18
19#include "modBuild.h"
20#include "backend.h"
21#include "config.h"
22
23namespace Ui {
24    class MainGUI;
25}
26
27class MainGUI : public QMainWindow
28{
29    Q_OBJECT
30
31public:
32    explicit MainGUI(QWidget *parent = 0);
33    ~MainGUI();
34
35
36private slots:
37    //general purpose functions
38    void slotSingleInstance();
39    void refreshGUI(QString);
40    //menubar functions
41    void on_actionGet_Ports_triggered();
42    void on_actionExit_triggered();
43    void on_actionNew_Module_triggered();
44    void on_actionLoad_Module_triggered();
45    void on_actionPreferences_triggered();
46    void on_actionPackage_Module_triggered();
47    void on_actionRefresh_Module_triggered();
48    void on_actionFreeBSD_Ports_triggered();
49    void on_actionPBI_Modules_triggered();
50    void on_actionAbout_EasyPBI_triggered();
51    //editor functions
52    void slotModTabChanged(int);
53    //pbi.conf functions
54    void on_push_change_makeport_clicked();
55    void on_push_change_progdir_clicked();
56    void slotAddMakeOption(QAction*);
57    void on_push_addportbefore_clicked();
58    void on_push_rmportbefore_clicked();
59    void on_push_addportafter_clicked();
60    void on_push_rmportafter_clicked();
61    void on_push_config_save_clicked();
62    //resources functions
63    void slotResourceChanged();
64    void on_push_resources_add_clicked();
65    void on_push_resources_remove_clicked();
66    void on_push_resources_mkwrapper_clicked();
67    void slotResourceScriptSaved();
68    //XDG functions
69    void slotXdgTypeChanged();
70    void slotXdgFileChanged();
71    void slotAddMenuCat(QAction*);
72    void slotAddBin(QAction*);
73    void on_push_xdg_remove_clicked();
74    void on_push_xdg_savechanges_clicked();
75    void on_push_xdg_savenew_clicked();
76    void on_push_xdg_clearentry_clicked();
77    //Scripts functions
78    void slotScriptChanged(int);
79    void on_push_scripts_create_clicked();
80    void on_push_scripts_remove_clicked();
81    void on_push_scripts_save_clicked();
82    //External-Links functions
83    void on_push_el_add_clicked();
84    void on_push_el_remove_clicked();
85    void slotELSetFile(QAction*);
86    void slotELSetType(QAction*);
87    //PBI Build functions
88    void on_push_build_start_clicked();
89    void on_push_build_stop_clicked();
90    void on_push_build_save_clicked();
91    void slotUpdatePBIBuild();
92    void slotPBIbuildFinished(int,QProcess::ExitStatus);
93    void slotKillPBIBuild();
94    void slotBuildError(QProcess::ProcessError);
95
96
97private:
98    Ui::MainGUI *ui;
99    ModBuild *currentModule;
100    Config *settings;
101    QLineEdit *line_module;
102    QRadioButton *radio_module_port, *radio_module_local;
103    QMenu menu_addOpt, menu_elOpts, menu_validMenuCats, menu_bins, menu_el_bins;
104
105    QString PBI_BUILDING_NOW;
106    bool PBI_BUILD_TERMINATED;
107    QProcess *p;
108
109    void SetupDefaults();
110    bool isValidPort(QString);
111    void checkMime();
112
113};
114
115#endif // MAINGUI_H
Note: See TracBrowser for help on using the repository browser.