Initial commit
[tietoopcom] / include / TocUi / tocsettingswidget.h
1 /** \file TocSettingsWidget.h
2  * \brief Declaration of TocSettingsWidget class
3  * 
4  * Tieto Open Communicator - Client for the Telepathy communications framework.
5  * Copyright (c) 2010, Tieto Corporation
6  *
7  * All rights reserved.
8  * Redistribution and use in source and binary forms, with or without modification,
9  * are permitted provided that the following conditions are met:
10  *
11  *      Redistributions of source code must retain the above copyright notice,
12  *      this list of conditions and the following disclaimer.
13  *      Redistributions in binary form must reproduce the above copyright notice,
14  *      this list of conditions and the following disclaimer in the documentation
15  *      and/or other materials provided with the distribution.
16  *      Neither the name of the Tieto Corporation nor the names of its contributors 
17  *      may be used to endorse or promote products derived from this software without
18  *      specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23  * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  * 
30  */
31
32 #ifndef TOCSETTINGSWIDGET_H
33 #define TOCSETTINGSWIDGET_H
34
35 #include <QWidget>
36 #include "defs.h"
37
38 class QSignalMapper;
39 class QPushButton;
40 class QFrame;
41
42 QT_BEGIN_NAMESPACE
43
44 /** \brief TocSettingsWidget class
45  * 
46  * Widged used to display available configuration windows and
47  * to choose between them.
48  */
49 class TocSettingsWidget : public QWidget
50 {
51         Q_OBJECT
52
53 public:
54
55         /**
56          * Public Constructor
57          */
58         TocSettingsWidget( QWidget * parent = 0, Qt::WindowFlags flags = 0 );
59
60         /**
61          * Destructor
62          */
63         ~TocSettingsWidget();
64
65 signals:
66
67         /** \brief Emited when user selects settings subsection
68          * 
69          * ViewType is casted to int because TocSettingsWidget
70          * uses a QSignalMapper for convenience.
71          * 
72          * @param viewType ViewType casted to int of the selected settings
73          */
74         void triggered(/*ViewType*/int viewType);
75
76 private: // Methods
77
78         /** \brief Sets style sheets for each widget
79          * 
80          * Used to overload style sheet properties that could come from main style sheet,
81          * to forbid corruption of the application layout from the external style sheets. 
82          */
83         void setupStyles();
84
85 private: // Members
86
87         QSignalMapper*                          signalMapper;   /// QSignalMapper used for convenience
88         QPushButton*                            generalButton;  /// General Settings button
89         QPushButton*                            accountButton;  /// Account Settings button
90         QPushButton*                            backButton;             /// Back button
91         QPushButton*                            themesButton;   /// Themes Settings button
92         QFrame*                                         settingsFrame;  /// Background frame of window
93 };
94
95 QT_END_NAMESPACE
96
97 #endif // TOCSETTINGSWIDGET_H