~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kwin/clients/oxygen/config/oxygenconfig.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef oxygen_config_h
 
2
#define oxygen_config_h
 
3
 
 
4
//////////////////////////////////////////////////////////////////////////////
 
5
// config.h
 
6
// -------------------
 
7
//
 
8
// Copyright (c) 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr>
 
9
// Copyright (C) 2008 Lubos Lunak <l.lunak@kde.org>
 
10
//
 
11
// Based on the Quartz configuration module,
 
12
//     Copyright (c) 2001 Karol Szwed <gallium@kde.org>
 
13
//
 
14
// Permission is hereby granted, free of charge, to any person obtaining a copy
 
15
// of this software and associated documentation files (the "Software"), to
 
16
// deal in the Software without restriction, including without limitation the
 
17
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 
18
// sell copies of the Software, and to permit persons to whom the Software is
 
19
// furnished to do so, subject to the following conditions:
 
20
//
 
21
// The above copyright notice and this permission notice shall be included in
 
22
// all copies or substantial portions of the Software.
 
23
//
 
24
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
25
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
26
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 
27
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
28
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 
29
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 
30
// IN THE SOFTWARE.
 
31
//////////////////////////////////////////////////////////////////////////////
 
32
 
 
33
#include <KConfig>
 
34
#include <QtGui/QPalette>
 
35
 
 
36
#include "oxygenconfigurationui.h"
 
37
#include "../oxygenexceptionlist.h"
 
38
 
 
39
namespace Oxygen {
 
40
 
 
41
  class Configuration;
 
42
  class ShadowConfiguration;
 
43
 
 
44
  // oxygen configuration object
 
45
  class Config: public QObject
 
46
  {
 
47
 
 
48
    Q_OBJECT
 
49
 
 
50
    public:
 
51
 
 
52
    //! constructor
 
53
    Config( KConfig* conf, QWidget* parent );
 
54
 
 
55
    //! destructor
 
56
    ~Config();
 
57
 
 
58
    signals:
 
59
 
 
60
    //! emmited whenever configuration is changed
 
61
    void changed();
 
62
 
 
63
    //! emmited whenever configuration is changed
 
64
    void changed( bool );
 
65
 
 
66
    public slots:
 
67
 
 
68
    //! load configuration
 
69
    void load( const KConfigGroup& );
 
70
 
 
71
    //! save configuration
 
72
    void save( KConfigGroup& );
 
73
 
 
74
    //! restore defaults
 
75
    void defaults( void );
 
76
 
 
77
    //! toggle expert mode
 
78
    void toggleExpertMode( bool );
 
79
 
 
80
    private slots:
 
81
 
 
82
    //! update change state
 
83
    void updateChanged( void );
 
84
 
 
85
    private:
 
86
 
 
87
    //! load configuration
 
88
    void loadConfiguration( const Configuration& );
 
89
 
 
90
    //! load configuration
 
91
    void loadShadowConfiguration( QPalette::ColorGroup, const ShadowConfiguration& );
 
92
 
 
93
    //! load configuration
 
94
    void saveShadowConfiguration( QPalette::ColorGroup, const ShadowConfigurationUi& ) const;
 
95
 
 
96
    //! returns true if shadow configuration changed
 
97
    bool shadowConfigurationChanged( const ShadowConfiguration&, const ShadowConfigurationUi& ) const;
 
98
 
 
99
    //! returns true if exception list is changed
 
100
    bool exceptionListChanged( void ) const;
 
101
 
 
102
    //! user interface
 
103
    ConfigurationUi *ui;
 
104
 
 
105
    //! kconfiguration object
 
106
    KConfig *_configuration;
 
107
 
 
108
  };
 
109
 
 
110
} //namespace Oxygen
 
111
 
 
112
#endif