source: src-qt4/pc-controlpanel/mainwnd.h @ ffbf59c

releng/10.0.1releng/10.0.2
Last change on this file since ffbf59c was ffbf59c, checked in by yurkis <yurkis@…>, 6 months ago

Reworked pc controlpanel for using libpcbsd-utils for DE detection

  • Property mode set to 100644
File size: 3.4 KB
Line 
1/**************************************************************************
2*   Copyright (C) 2011 by Yuri Momotyuk                                   *
3*   yurkis@gmail.com                                                      *
4*                                                                         *
5*   Permission is hereby granted, free of charge, to any person obtaining *
6*   a copy of this software and associated documentation files (the       *
7*   "Software"), to deal in the Software without restriction, including   *
8*   without limitation the rights to use, copy, modify, merge, publish,   *
9*   distribute, sublicense, and/or sell copies of the Software, and to    *
10*   permit persons to whom the Software is furnished to do so, subject to *
11*   the following conditions:                                             *
12*                                                                         *
13*   The above copyright notice and this permission notice shall be        *
14*   included in all copies or substantial portions of the Software.       *
15*                                                                         *
16*   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
17*   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
18*   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*
19*   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
20*   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
21*   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
22*   OTHER DEALINGS IN THE SOFTWARE.                                       *
23***************************************************************************/
24
25#ifndef MAINWND_H
26#define MAINWND_H
27
28#include <QMainWindow>
29#include <QFileSystemWatcher>
30#include <QMutex>
31
32#include "grouplist.h"
33
34namespace Ui {
35    class MainWnd;
36}
37
38class MainWnd : public QMainWindow
39{
40    Q_OBJECT
41
42public:
43    explicit MainWnd(QWidget *parent = 0);
44    ~MainWnd();
45
46public slots:
47    void slotSingleInstance();
48
49protected:
50    void changeEvent(QEvent *e);
51
52private:
53    Ui::MainWnd *ui;
54
55        QGroupList* SoftwareList;
56        QGroupList* SystemList;
57        QGroupList* NetworkingList;
58        QGroupList* ToolsList;
59        QGroupList* HardwareList;
60    QGroupList* DEList;
61
62    QFileSystemWatcher mDirWatcher;
63
64        void setupGroups();
65        void setupGroup(QGroupList** List, QWidget* Parrent);
66        void fillGroups();
67        void setupDEChooser();
68
69        bool checkUserGroup(QString groupName);
70
71        //CDEList mDEList;
72        QMenu* DEChoiseMenu;
73
74        QVector<QString> mvEnabledDE;
75        pcbsd::DesktopEnvironmentInfo   mCurrentDE;
76        bool             misDisplayDEName;
77
78        bool             misWheelGroup;
79        bool             misOperatorGroup;
80
81        QMutex          mRefreshMutex;
82
83private slots:
84        void on_actionUnsupported_triggered();
85        void on_actionXFCE_triggered();
86        void on_actionEnlightenment_triggered();
87        void on_actionMate_triggered();
88        void on_actionCinnamon_triggered();
89        void on_actionGnome_triggered();
90        void on_actionLXDE_triggered();
91        void on_actionKDE_triggered();
92        void on_actionAll_triggered();         
93        void on_toolButton_2_clicked();
94        void on_lineEdit_textChanged( QString );
95        void on_itemActivated ( QListWidgetItem* item );
96
97        void onDirectoryChanged(const QString & path);
98    };
99
100#endif // MAINWND_H
Note: See TracBrowser for help on using the repository browser.