source: src-qt4/pc-softwaremanager/mainUI.h @ e6fddc0

releng/10.0.2releng/10.0.3
Last change on this file since e6fddc0 was e6fddc0, checked in by Ken Moore <ken@…>, 6 months ago

Add the ability for the AppCafe? to set a system flag when the status of available PBI updates changes (using the new SystemFlag? class in libpcbsd).

  • Property mode set to 100644
File size: 3.8 KB
Line 
1#ifndef _APPCAFE_MAINUI_H
2#define _APPCAFE_MAINUI_H
3
4
5#ifndef PREFIX
6#define PREFIX QString("/usr/local")
7#endif
8
9/* QT4 */
10#include <QDebug>
11#include <QDialog>
12#include <QMenu>
13#include <QMainWindow>
14#include <QMessageBox>
15#include <QTimer>
16#include <QHBoxLayout>
17#include <QVBoxLayout>
18#include <QTreeWidgetItem>
19#include <QScrollArea>
20#include <QScrollBar>
21#include <QFileDialog>
22#include <QCloseEvent>
23#include <QDesktopServices>
24#include <QUrl>
25
26/* LibPCBSD Includes */
27#include <pcbsd-sysFlags.h>
28
29/* Local Includes */
30#include "pbiBackend.h"
31#include "extras.h"
32#include "largeItemWidget.h"
33#include "smallItemWidget.h"
34
35namespace Ui {
36    class MainUI;
37}
38
39class MainUI : public QMainWindow
40{
41        Q_OBJECT
42
43public:
44   explicit MainUI(QWidget* parent = 0);
45   void ProgramInit();
46   void setWardenMode(QString dir,QString ip); //call before ProgramInit
47
48public slots:
49    void slotSingleInstance();
50   
51protected:
52    void closeEvent(QCloseEvent *event);
53
54private slots:
55  //MENU OPTIONS
56  void on_actionImport_PBI_List_triggered();
57  void on_actionExport_PBI_List_triggered();
58  void on_actionQuit_triggered();
59  void on_actionAppCafe_Settings_triggered();
60  void on_actionInstall_From_File_triggered();
61  //INSTALLED TAB
62  void slotRefreshInstallTab();
63  void slotCheckSelectedItems();
64  void slotPBIStatusUpdate(QString);
65  void on_tool_install_details_clicked();
66  void on_tool_install_back_clicked();
67  void on_tool_install_gotobrowserpage_clicked();
68  void on_tool_install_toggleall_clicked();
69  void on_tree_install_apps_itemSelectionChanged();
70  void on_tree_install_apps_itemDoubleClicked(QTreeWidgetItem *item);
71  void on_check_install_autoupdate_clicked();
72  void on_tool_install_update_clicked();
73  void on_tool_install_remove_clicked();
74  void on_tool_install_cancel_clicked();
75  void on_tool_install_maintainer_clicked();
76  void slotInstalledAppRightClicked(const QPoint &);
77  void contextMenuFinished();
78  void slotActionAddDesktop();
79  void slotActionRemoveDesktop();
80  void slotActionAddPath();
81  void slotActionRemovePath();
82  void slotActionAddPathAll();
83  void slotActionAddMenu();
84  void slotActionRemoveMenu();
85  void slotActionAddMenuAll();
86  void slotActionAddMime();
87  void slotActionRemoveMime();
88  void slotActionAddMimeAll();
89  void slotActionUpdate();
90  void slotActionRemove();
91  void slotActionCancel();
92  void slotStartApp(QAction*);
93  void slotUpdateSelectedPBI();
94  void updateInstallDetails(QString appID);
95  //BROWSER TAB
96  void slotDisableBrowser(bool shownotification = TRUE);
97  void slotEnableBrowser();
98  void slotUpdateBrowserHome();
99  void slotGoToHome();
100  void slotGoToCatBrowser();
101  void slotGoToCategory(QString);
102  void slotGoToApp(QString);
103  void slotUpdateAppDownloadButton();
104  void slotGoToSearch();
105  void slotShowSimilarApps(QStringList);
106  void slotShowSearchResults(QStringList, QStringList);
107  void on_tabWidget_currentChanged();
108  void on_tool_browse_home_clicked();
109  void on_tool_browse_cat_clicked();
110  void on_tool_browse_app_clicked();
111  void on_line_browse_searchbar_textChanged();
112  void on_tool_bapp_download_clicked();
113  void on_group_br_home_newapps_toggled(bool);
114  void on_group_bapp_similar_toggled(bool);
115  //OTHER
116  void slotDisplayError(QString,QString,QStringList);
117 
118private:
119  Ui::MainUI *ui;
120  QString wardenDir, wardenIP, defaultIcon;
121  PBIBackend *PBI;
122  //INSTALLED TAB
123  int updatesAvailable;
124  QMenu *actionMenu, *appBinMenu, *shortcutMenu, *sDeskMenu, *sMenuMenu, *sMimeMenu, *contextActionMenu;
125  QString cDetails;
126  void initializeInstalledTab();
127  void formatInstalledItemDisplay(QTreeWidgetItem *item);
128  QStringList getCheckedItems();
129  //BROWSER TAB
130  QTimer *searchTimer;
131  QString cCat, cApp;
132  void initializeBrowserTab();
133  //OTHER
134  QLabel *statusLabel;
135  void clearScrollArea(QScrollArea*);
136  void slotDisplayStats();
137   
138} ;
139
140#endif
141
Note: See TracBrowser for help on using the repository browser.