aboutsummaryrefslogtreecommitdiff
path: root/autotests/kconfig_compiler/test_signal.h.ref
blob: 8da42c8053fa459591acfbe6d2f75039eaa38f9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
// This file is generated by kconfig_compiler_kf5 from test_signal.kcfg.
// All changes you do to this file will be lost.
#ifndef TESTSIGNAL_H
#define TESTSIGNAL_H

#include <kconfigskeleton.h>
#include <QCoreApplication>
#include <QDebug>

class TestSignal : public KConfigSkeleton
{
  Q_OBJECT
  public:

    static TestSignal *self();
    ~TestSignal();

    /**
      Set Current emoticon theme.
    */
    static
    void setEmoticonTheme( const QString & v )
    {
      if (v != self()->mEmoticonTheme && !self()->isImmutable( QStringLiteral( "emoticonTheme" ) )) {
        self()->mEmoticonTheme = v;
        self()->mSettingsChanged |= signalEmoticonSettingsChanged;
      }
    }

    /**
      Get Current emoticon theme.
    */
    static
    QString emoticonTheme()
    {
      return self()->mEmoticonTheme;
    }

    /**
      Set Enable emoticon support in Kopete.
    */
    static
    void setUseEmoticon( bool v )
    {
      if (v != self()->mUseEmoticon && !self()->isImmutable( QStringLiteral( "useEmoticon" ) )) {
        self()->mUseEmoticon = v;
        self()->mSettingsChanged |= signalEmoticonSettingsChanged;
      }
    }

    /**
      Get Enable emoticon support in Kopete.
    */
    static
    bool useEmoticon()
    {
      return self()->mUseEmoticon;
    }

    /**
      Set Use strict mode in emoticon parsing.
    */
    static
    void setEmoticonRequireSpace( bool v )
    {
      if (v != self()->mEmoticonRequireSpace && !self()->isImmutable( QStringLiteral( "emoticonRequireSpace" ) )) {
        self()->mEmoticonRequireSpace = v;
        self()->mSettingsChanged |= signalEmoticonSettingsChanged;
      }
    }

    /**
      Get Use strict mode in emoticon parsing.
    */
    static
    bool emoticonRequireSpace()
    {
      return self()->mEmoticonRequireSpace;
    }

    /**
      Set Absolute path to a directory containing a Adium/Kopete chat window style.
    */
    static
    void setStylePath( const QString & v )
    {
      if (v != self()->mStylePath && !self()->isImmutable( QStringLiteral( "stylePath" ) )) {
        self()->mStylePath = v;
        self()->mSettingsChanged |= signalStyleChanged;
      }
    }

    /**
      Get Absolute path to a directory containing a Adium/Kopete chat window style.
    */
    static
    QString stylePath()
    {
      return self()->mStylePath;
    }

    /**
      Set Relative path to a CSS variant for the current style.
    */
    static
    void setStyleCSSVariant( const QString & v )
    {
      if (!self()->isImmutable( QStringLiteral( "StyleCSSVariant" ) ))
        self()->mStyleCSSVariant = v;
    }

    /**
      Get Relative path to a CSS variant for the current style.
    */
    static
    QString styleCSSVariant()
    {
      return self()->mStyleCSSVariant;
    }


    enum {
      signalEmoticonSettingsChanged = 0x1,
      signalStyleChanged = 0x2
    };

  Q_SIGNALS:
    void emoticonSettingsChanged();

    /**
      Tell when a complete style change.
    */
    void styleChanged(const QString & stylePath, const QString & StyleCSSVariant);

  private:
    void itemChanged(quint64 flags);

  protected:
    TestSignal();
    friend class TestSignalHelper;

    bool usrSave() Q_DECL_OVERRIDE;

    // Appearance
    QString mEmoticonTheme;
    bool mUseEmoticon;
    bool mEmoticonRequireSpace;
    QString mStylePath;
    QString mStyleCSSVariant;

  private:
    uint mSettingsChanged;
};

#endif