source: src-qt4/EasyPBI/mainGUI.h @ 0c42827

releng/10.0.1releng/10.0.2
Last change on this file since 0c42827 was 0c42827, checked in by Ken Moore <ken@…>, 5 months ago

Update EasyPBI to 2.3:
Changes Include:
Add ability to build from ports directly again.
Add legacy port-build options to the GUI.
Add item to show current package compile-time options.
Add ability to create a new module from either ports/packages.
Fix a bug in the default wrapper script for 10.x PBI's (container path is /usr/local/ now when running)

  • Property mode set to 100644
File size: 3.4 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 "backend.h"
20#include "config.h"
21#include "PBIModule.h"
22#include "ModuleUtils.h"
23#include "pkgSelect.h"
24
25namespace Ui {
26    class MainGUI;
27}
28
29class MainGUI : public QMainWindow
30{
31    Q_OBJECT
32
33public:
34    explicit MainGUI(QWidget *parent = 0);
35    ~MainGUI();
36
37    void loadModule(QString confFile);
38
39private slots:
40    //general purpose functions
41    void slotSingleInstance();
42    void refreshGUI(QString);
43    //menubar functions
44    void on_actionExit_triggered();
45    void on_actionNew_Module_triggered();
46    void on_actionLoad_Module_triggered();
47    void on_actionPreferences_triggered();
48    void on_actionPackage_Module_triggered();
49    void on_actionRefresh_Module_triggered();
50    void on_actionFreeBSD_Ports_triggered();
51    void on_actionPBI_Modules_triggered();
52    void on_actionAbout_EasyPBI_triggered();
53    //editor functions
54    void updateConfigVisibility();
55    void slotModTabChanged(int);
56    //pbi.conf functions
57    void on_push_change_makeport_clicked();
58    void on_tool_addportafter_clicked();
59    void on_tool_rmportafter_clicked();
60    void on_tool_config_addportbefore_clicked();
61    void on_tool_config_rmportbefore_clicked();
62    void on_push_config_save_clicked();
63    void slotOptionChanged(QString tmp="");
64    void slotSetRepoType(QAction* act);
65    void slotSetRepoCat(QAction* act);
66    void slotSetPortOpt(QAction* act);
67    //resources functions
68    void slotResourceChanged();
69    void on_push_resources_add_clicked();
70    void on_push_resources_remove_clicked();
71    void on_push_resources_mkwrapper_clicked();
72    void slotResourceScriptSaved();
73    void slotResourceScriptChanged();
74    //XDG functions
75    void slotXdgTypeChanged();
76    void slotXdgFileChanged();
77    void slotAddMenuCat(QAction*);
78    void slotAddBin(QAction*);
79    void on_push_xdg_remove_clicked();
80    void on_push_xdg_savechanges_clicked();
81    void on_push_xdg_savenew_clicked();
82    void on_push_xdg_clearentry_clicked();
83    void slotXDGOptionChanged(QString tmp="");
84    //Scripts functions
85    void slotScriptChanged(int);
86    void on_push_scripts_create_clicked();
87    void on_push_scripts_remove_clicked();
88    void on_push_scripts_save_clicked();
89    void slotScriptModified();
90    //External-Links functions
91    void on_push_el_add_clicked();
92    void on_push_el_remove_clicked();
93    void slotELSetFile(QAction*);
94    void slotELSetType(QAction*);
95    //PBI Build functions
96    void on_push_build_start_clicked();
97    void on_push_build_stop_clicked();
98    void on_push_build_save_clicked();
99    void slotUpdatePBIBuild();
100    void slotPBIbuildFinished(int,QProcess::ExitStatus);
101    void slotKillPBIBuild();
102    void slotBuildError(QProcess::ProcessError);
103
104
105private:
106    Ui::MainGUI *ui;
107    PBIModule MODULE;
108    Config *settings;
109    QLineEdit *line_module;
110    QMenu menu_elOpts, menu_validMenuCats, menu_validRepoCats, menu_validRepoTypes, menu_portopts;
111    bool XDGUPDATING;
112    QString lastModuleDir;
113
114    QString PBI_BUILDING_NOW;
115    bool PBI_BUILD_TERMINATED;
116    QProcess *p;
117
118    void SetupDefaults();
119    void checkMime();
120    QString getPortPackage();
121
122};
123
124#endif // MAINGUI_H
Note: See TracBrowser for help on using the repository browser.