source: src-qt4/PCDM/src/pcdm-gui.h @ d9b0b9e8

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2
Last change on this file since d9b0b9e8 was d9b0b9e8, checked in by Ken Moore <ken@…>, 13 months ago

Add in a "simple" option for the PCDM desktop switcher.
Change the DESKTOP_ORIENTATION value to "simple" to use a small QComboBox on the toolbar for selecting a desktop environment instead of using the full selector

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/* PCDM Login Manager:
2*  Written by Ken Moore (ken@pcbsd.org) 2012/2013
3*  Copyright(c) 2013 by the PC-BSD Project
4*  Available under the 3-clause BSD license
5*/
6
7#ifndef PCDMGUI_H
8#define PCDMGUI_H
9
10#include <QtGui/QWidget>
11#include <QMessageBox>
12#include <QFile>
13#include <QGraphicsScene>
14#include <QMainWindow>
15#include <QToolBar>
16#include <QToolButton>
17#include <QMenu>
18#include <QLabel>
19#include <QComboBox>
20#include <QPushButton>
21#include <QLineEdit>
22#include <QGridLayout>
23#include <QSpacerItem>
24#include <QProcessEnvironment>
25
26#include "pcdm-backend.h"
27#include "themeStruct.h"
28#include "fancySwitcher.h"
29#include "dialogKeyboard.h"
30#include "dialogLocale.h"
31#include "loginWidget.h"
32
33#define TMPLANGFILE QString("/tmp/.PCDMLang")
34
35class PCDMgui : public QMainWindow
36{
37    Q_OBJECT
38
39public:
40    PCDMgui();
41    ~PCDMgui();
42    void changeLang(QString code);
43    void progInit();
44
45private slots:
46    void slotStartLogin(QString,QString);
47    void slotLoginSuccess();
48    void slotLoginFailure();
49    void slotUserChanged(QString);
50    void slotUserSelected(QString);
51    void slotRestartComputer();
52    void slotShutdownComputer();
53    void slotClosePCDM();
54    void slotChangeLocale();
55    void slotChangeKeyboardLayout();
56    void slotPushVirtKeyboard();    // Start xvkbd
57    void slotLocaleChanged(QString);
58
59private:
60    //Objects
61    LoginWidget* loginW;
62    widgetKeyboard* wKey;
63    widgetLocale* wLoc;
64    QToolBar* toolbar;
65    QAction *virtkeyboardButton, *localeButton, *keyboardButton;
66    QToolButton *systemButton;
67    QMenu* systemMenu;
68    FancySwitcher* deSwitcher; // full switcher
69    QComboBox* sdeSwitcher; //simple switcher
70    bool simpleDESwitcher;
71   
72    QProcess* vkbd;
73    ThemeStruct* currentTheme;
74
75    QTranslator* m_translator;
76    QString translationDir, lastUser, lastDE;
77   
78    QString hostname;
79    //Functions
80    void createGUIfromTheme();
81    void retranslateUi();
82    void loadTheme();
83    void loadLastUser();
84    void loadLastDE(QString);
85    void saveLastLogin(QString, QString);
86
87signals:
88    void xLoginAttempt(QString, QString, QString, QString);
89
90};
91
92#endif // PCDMGUI_H
Note: See TracBrowser for help on using the repository browser.