1
#ifndef oxygenconfigdialog_h
2
#define oxygenconfigdialog_h
4
//////////////////////////////////////////////////////////////////////////////
5
// oxygenconfigdialog.h
6
// oxygen configuration dialog
9
// Copyright (c) 2010 Hugo Pereira Da Costa <hugo@oxygen-icons.org>
11
// Permission is hereby granted, free of charge, to any person obtaining a copy
12
// of this software and associated documentation files (the "Software"), to
13
// deal in the Software without restriction, including without limitation the
14
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15
// sell copies of the Software, and to permit persons to whom the Software is
16
// furnished to do so, subject to the following conditions:
18
// The above copyright notice and this permission notice shall be included in
19
// all copies or substantial portions of the Software.
21
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
28
//////////////////////////////////////////////////////////////////////////////
31
#include <KPageWidget>
36
class ConfigDialog: public KDialog
43
explicit ConfigDialog( QWidget* parent = 0 );
46
virtual ~ConfigDialog( void )
51
//! restore default configuration
52
void pluginDefault( void );
54
//! reset local changes
55
void pluginReset( const KConfigGroup& );
57
//! save local changes
58
void pluginSave( KConfigGroup& );
61
void pluginToggleExpertMode( bool );
65
//! restore default configuration
66
virtual void defaults( void );
68
//! reset local changes
69
virtual void reset( void );
71
//! save local changes
72
virtual void save( void );
76
// update decoration changed state
77
void updateStyleChanged( bool state = true )
78
{ _styleChanged = state; }
80
// update decoration changed state
81
void updateDecorationChanged( bool state = true )
82
{ _decorationChanged = state; }
84
// handle configuration modifications
85
virtual void updateChanged( void );
87
// update window title based on selected page
88
virtual void updateWindowTitle( KPageWidgetItem* = 0 );
92
//! true if configuration changed
93
bool changed( void ) const
94
{ return _styleChanged || _decorationChanged; }
96
//! load style config widget from plugin
97
KPageWidgetItem* loadStyleConfig( void );
99
//! load decoration config widget from plugin
100
KPageWidgetItem* loadDecorationConfig( void );
103
KPageWidget* pageWidget_;
105
//! style plugin widget
106
QObject *_stylePluginObject;
108
//! decoration plugin widget
109
QObject *_decorationPluginObject;
112
bool _decorationChanged;