~feng-kylin/youker-assistant/youker-assistant

« back to all changes in this revision

Viewing changes to setting/fontwidget.h

  • Committer: kobe
  • Date: 2015-02-13 07:37:10 UTC
  • Revision ID: xiangli@ubuntukylin.com-20150213073710-0jyp02ilyi5njj10
Qt Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef FONTWIDGET_H
 
2
#define FONTWIDGET_H
 
3
 
 
4
#include <QWidget>
 
5
#include <QLabel>
 
6
#include <QPushButton>
 
7
#include <QHBoxLayout>
 
8
#include <QComboBox>
 
9
#include <QSplitter>
 
10
#include <QDoubleSpinBox>
 
11
class SessionDispatcher;
 
12
class MainWindow;
 
13
 
 
14
class FontWidget : public QWidget
 
15
{
 
16
    Q_OBJECT
 
17
public:
 
18
    explicit FontWidget(QWidget *parent = 0, SessionDispatcher *proxy = 0, MainWindow *window = 0);
 
19
    ~FontWidget();
 
20
    void setLanguage();
 
21
    void initConnect();
 
22
    void initData();
 
23
 
 
24
//signals:
 
25
//    void showSettingMainWidget();
 
26
 
 
27
public slots:
 
28
    void setDefaultFont();
 
29
    void setDesktopFont();
 
30
    void setMonospaceFont();
 
31
    void setDocumentFont();
 
32
    void setTitlebarFont();
 
33
    void setScalingValue(double value);
 
34
    void setFontHinting(QString selected);
 
35
    void setFontAntialiasing(QString selected);
 
36
    void resetDefaultFont(QString cur_font);
 
37
    void resetDesktopFont(QString cur_font);
 
38
    void resetMonospaceFont(QString cur_font);
 
39
    void resetDocumentFont(QString cur_font);
 
40
    void resetTitlebarFont(QString cur_font);
 
41
 
 
42
private:
 
43
    SessionDispatcher *sessionproxy;
 
44
    MainWindow *parentWindow;
 
45
//    QSplitter *splitter;
 
46
//    QWidget * top_widget;
 
47
//    QWidget * bottom_widget;
 
48
 
 
49
//    QPushButton *back_btn;
 
50
//    QLabel *title_label;
 
51
//    QLabel *description_label;
 
52
 
 
53
    QLabel *default_font_label;
 
54
    QLabel *desktop_font_label;
 
55
    QLabel *monospace_font_label;
 
56
    QLabel *document_font_label;
 
57
    QLabel *titlebar_font_label;
 
58
    QLabel *scaling_label;
 
59
    QLabel *hinting_label;
 
60
    QLabel *antialiasing_label;
 
61
    QPushButton *default_font_btn;
 
62
    QPushButton *desktop_font_btn;
 
63
    QPushButton *monospace_font_btn;
 
64
    QPushButton *document_font_btn;
 
65
    QPushButton *titlebar_font_btn;
 
66
    QDoubleSpinBox *scaling_slider;
 
67
    QComboBox *hinting_combo;
 
68
    QComboBox *antialiasing_combo;
 
69
 
 
70
    QString current_font;
 
71
    QString desktop_font;
 
72
    QString monospace_font;
 
73
    QString document_font;
 
74
    QString titlebar_font;
 
75
};
 
76
 
 
77
#endif // FONTWIDGET_H