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

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

Clean up the AppCafe? browser home page - now just have a toolbutton to browser categories, and instead put recommended applications on the home page (new defaultrecommendations.txt resource). These recommendations can be automatically updated later if we add that ability for the repo to include an additional file with this information.

  • Property mode set to 100644
File size: 3.6 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 slotActionAddDesktop();
74  void slotActionRemoveDesktop();
75  void slotActionAddPath();
76  void slotActionRemovePath();
77  void slotActionAddPathAll();
78  void slotActionAddMenu();
79  void slotActionRemoveMenu();
80  void slotActionAddMenuAll();
81  void slotActionAddMime();
82  void slotActionRemoveMime();
83  void slotActionAddMimeAll();
84  void slotActionUpdate();
85  void slotActionRemove();
86  void slotActionCancel();
87  void slotStartApp(QAction*);
88  void slotUpdateSelectedPBI();
89  void updateInstallDetails(QString appID);
90  //BROWSER TAB
91  void slotDisableBrowser(bool shownotification = TRUE);
92  void slotEnableBrowser();
93  void slotUpdateBrowserHome();
94  void slotGoToHome();
95  void slotGoToCategory(QString);
96  void slotGoToCatClicked(QAction* act);
97  void slotGoToApp(QString);
98  void slotUpdateAppDownloadButton();
99  void slotGoToSearch();
100  void slotShowSimilarApps(QStringList);
101  void slotShowSearchResults(QStringList, QStringList);
102  void on_tabWidget_currentChanged();
103  void on_tool_browse_home_clicked();
104  void on_tool_browse_cat_clicked();
105  void on_tool_browse_app_clicked();
106  void on_line_browse_searchbar_textChanged();
107  void on_tool_bapp_download_clicked();
108  void on_group_br_home_newapps_toggled(bool);
109  void on_group_bapp_similar_toggled(bool);
110  //OTHER
111  void slotDisplayError(QString,QString,QStringList);
112 
113private:
114  Ui::MainUI *ui;
115  QString wardenDir, wardenIP, defaultIcon;
116  PBIBackend *PBI;
117  //INSTALLED TAB
118  QMenu *actionMenu, *appBinMenu, *shortcutMenu, *sDeskMenu, *sMenuMenu, *sMimeMenu;
119  QString cDetails;
120  void initializeInstalledTab();
121  void formatInstalledItemDisplay(QTreeWidgetItem *item);
122  QStringList getCheckedItems();
123  //BROWSER TAB
124  QTimer *searchTimer;
125  QString cCat, cApp;
126  void initializeBrowserTab();
127  //OTHER
128  QLabel *statusLabel;
129  void clearScrollArea(QScrollArea*);
130  void slotDisplayStats();
131   
132} ;
133
134#endif
135
Note: See TracBrowser for help on using the repository browser.