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

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1releng/10.1.1
Last change on this file since 1d2d46af was 1d2d46af, checked in by Ken Moore <ken@…>, 19 months ago

Completely redo the simple desktop switcher option. It now puts it in the login widget underneath the password prompt. Also clean up the default theme a bit to accomodate these changes.

  • Property mode set to 100644
File size: 2.0 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    bool simpleDESwitcher;
70   
71    QProcess* vkbd;
72    ThemeStruct* currentTheme;
73
74    QTranslator* m_translator;
75    QString translationDir, lastUser, lastDE;
76   
77    QString hostname;
78    //Functions
79    void createGUIfromTheme();
80    void retranslateUi();
81    void loadTheme();
82    void loadLastUser();
83    void loadLastDE(QString);
84    void saveLastLogin(QString, QString);
85
86signals:
87    void xLoginAttempt(QString, QString, QString, QString);
88
89};
90
91#endif // PCDMGUI_H
Note: See TracBrowser for help on using the repository browser.