summaryrefslogtreecommitdiffstats
path: root/kshowmail/kcmconfigs/configdisplay.h
blob: 1404681d81df0ddd964e680f56f8d72284ce8752 (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
157
158
159
160
161
162
163
164
165
166
167
168
169
//
// C++ Interface: configdisplay
//
// Description:
//
//
// Author: Ulrich Weigelt <ulrich.weigelt@gmx.de>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef CONFIGDISPLAY_H
#define CONFIGDISPLAY_H

//TQt headers
#include <ntqlayout.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqtooltip.h>

//KDE headers
#include <tdecmodule.h>
#include <tdeconfig.h>
#include <kgenericfactory.h>
#include <tdeapplication.h>

//KShowmail headers
#include <../constants.h>


/**
 * @brief Part of the setup dialog (KShowMailApp::SetupDialog) to configure the display.
 * @author Ulrich Weigelt <ulrich.weigelt@gmx.de>
 */
class ConfigDisplay : public TDECModule
{
Q_OBJECT

  public:
    /**
     * Generic Constructor
     */
    ConfigDisplay( TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList() );

    /**
     * Destructor
     */
    ~ConfigDisplay();

    /**
     * Overloaded method of TDECModule.
     * Sets the user interface elements to reflect the current settings stored in the
     * config file.
     */
    virtual void load();

    /**
     * Overloaded method of TDECModule.
     * Sets the user interface elements to default values.
     * This method is called when the user clicks the "Default" button.
     */
    virtual void defaults();

    /**
     * Overloaded method of TDECModule.
     * Stores the config information as shown in the user interface in the
     * config file.
     * Is called when the user clicks "Apply" or "Ok".
     */
    virtual void save();

  private:

    /**
     * Connector to the configuration file
     */
    TDEConfig* config;

    /**
     * Check box to switch on/off the "Active" column in the account list.
     */
    TQCheckBox* chkAccountlistActive;

    /**
     * Check box to switch on/off the "Account" column in the account list.
     */
    TQCheckBox* chkAccountlistAccount;

    /**
     * Check box to switch on/off the "Server" column in the account list.
     */
    TQCheckBox* chkAccountlistServer;

    /**
     * Check box to switch on/off the "User" column in the account list.
     */
    TQCheckBox* chkAccountlistUser;

    /**
     * Check box to switch on/off the "Messages" column in the account list.
     */
    TQCheckBox* chkAccountlistMessages;

    /**
     * Check box to switch on/off the "Size" column in the account list.
     */
    TQCheckBox* chkAccountlistSize;

    /**
     * Check box to switch on/off the "Number" column in the message list.
     */
    TQCheckBox* chkMessagelistNumber;

    /**
     * Check box to switch on/off the "Account" column in the message list.
     */
    TQCheckBox* chkMessagelistAccount;

    /**
     * Check box to switch on/off the "From" column in the message list.
     */
    TQCheckBox* chkMessagelistFrom;

    /**
     * Check box to switch on/off the "To" column in the message list.
     */
    TQCheckBox* chkMessagelistTo;

    /**
     * Check box to switch on/off the "Subject" column in the message list.
     */
    TQCheckBox* chkMessagelistSubject;

    /**
     * Check box to switch on/off the "Date" column in the message list.
     */
    TQCheckBox* chkMessagelistDate;

    /**
     * Check box to switch on/off the "Size" column in the message list.
     */
    TQCheckBox* chkMessagelistSize;

    /**
     * Check box to switch on/off the "Content" column in the message list.
     */
    TQCheckBox* chkMessagelistContent;

    /**
     * Check box to switch on/off the "State" column in the message list.
     */
    TQCheckBox* chkMessagelistState;

    /**
     * Check box to switch on/off HTML in the message view.
     */
    TQCheckBox* chkAllowHTML;

  public slots:

    /**
     * Connected with the configuration items.
     * Calls the slot changed() of TDECModule to notify the dialog about the change.
     */
    void slotChanged();
};

#endif