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

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

Add a custom context menu to the AppCafe? installed PBI list that is dynamically created for that particular application.

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