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

enter/10releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1releng/10.1.1releng/10.1.2
Last change on this file since 2916111d was 2916111d, checked in by Ken Moore <ken@…>, 15 months ago

Update the AppCafe? Installed tab to take advantage of the new info available for 10.x PBI's.
Changes Include:
1) Move currently installed app info to a seperate page, that can be opened by either double-clicking on an installed application or clicking the "details" button at the bottom of the main page.
2) Update the "actions" button to be actively enabled/disabled depending on whether any items are currently checked.
3) Add ability to start composing an email (in the DE's default email client) to the port maintainer for an installed PBI. This email template also includes all the important info regarding the PBI in question (build date, architecture, FreeBSD version, version number).
4) Fix a bug with setting/unsetting the "auto-update" status for a PBI.
5) Clean up application descriptions a bit better now (affects both installed and browser tabs).

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