source: src-qt4/EasyPBI/mainGUI.h @ cc7dbf3

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2
Last change on this file since cc7dbf3 was cc7dbf3, checked in by Ken Moore <ken@…>, 12 months ago

Couple improvements to EasyPBI:
1) Allow the user to bypass the warning about an invalid FreeBSD port when adding to make port before/after (no bypass for creating a new module)
2) Make EasyPBI re-generate the scripts directory if it is missing and you try to save a script file to a module

  • Property mode set to 100644
File size: 3.2 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_actionExit_triggered();
42    void on_actionNew_Module_triggered();
43    void on_actionLoad_Module_triggered();
44    void on_actionPreferences_triggered();
45    void on_actionPackage_Module_triggered();
46    void on_actionRefresh_Module_triggered();
47    void on_actionFreeBSD_Ports_triggered();
48    void on_actionPBI_Modules_triggered();
49    void on_actionAbout_EasyPBI_triggered();
50    //editor functions
51    void slotModTabChanged(int);
52    //pbi.conf functions
53    void on_push_change_makeport_clicked();
54    void on_push_change_progdir_clicked();
55    void slotAddMakeOption(QAction*);
56    void on_push_addportbefore_clicked();
57    void on_push_rmportbefore_clicked();
58    void on_push_addportafter_clicked();
59    void on_push_rmportafter_clicked();
60    void on_push_config_save_clicked();
61    void slotOptionChanged(QString tmp="");
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    void slotResourceScriptChanged();
69    //XDG functions
70    void slotXdgTypeChanged();
71    void slotXdgFileChanged();
72    void slotAddMenuCat(QAction*);
73    void slotAddBin(QAction*);
74    void on_push_xdg_remove_clicked();
75    void on_push_xdg_savechanges_clicked();
76    void on_push_xdg_savenew_clicked();
77    void on_push_xdg_clearentry_clicked();
78    void slotXDGOptionChanged(QString tmp="");
79    //Scripts functions
80    void slotScriptChanged(int);
81    void on_push_scripts_create_clicked();
82    void on_push_scripts_remove_clicked();
83    void on_push_scripts_save_clicked();
84    void slotScriptModified();
85    //External-Links functions
86    void on_push_el_add_clicked();
87    void on_push_el_remove_clicked();
88    void slotELSetFile(QAction*);
89    void slotELSetType(QAction*);
90    //PBI Build functions
91    void on_push_build_start_clicked();
92    void on_push_build_stop_clicked();
93    void on_push_build_save_clicked();
94    void slotUpdatePBIBuild();
95    void slotPBIbuildFinished(int,QProcess::ExitStatus);
96    void slotKillPBIBuild();
97    void slotBuildError(QProcess::ProcessError);
98
99
100private:
101    Ui::MainGUI *ui;
102    ModBuild *currentModule;
103    Config *settings;
104    QLineEdit *line_module;
105    QRadioButton *radio_module_port, *radio_module_local;
106    QMenu menu_addOpt, menu_elOpts, menu_validMenuCats, menu_bins, menu_el_bins;
107
108    QString PBI_BUILDING_NOW;
109    bool PBI_BUILD_TERMINATED;
110    QProcess *p;
111
112    void SetupDefaults();
113    bool isValidPort(QString, bool allowOverride = FALSE);
114    void checkMime();
115
116};
117
118#endif // MAINGUI_H
Note: See TracBrowser for help on using the repository browser.