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

« back to all changes in this revision

Viewing changes to kstyles/oxygen/config/oxygenstyleconfig.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 oxygenstyleconfig_h
 
2
#define oxygenstyleconfig_h
 
3
/*
 
4
Copyright (c) 2010 Hugo Pereira Da Costa <hugo@oxygen-icons.org>
 
5
Copyright (C) 2003 Sandro Giessl <ceebx@users.sourceforge.net>
 
6
 
 
7
based on the Keramik configuration dialog:
 
8
Copyright (c) 2003 Maksim Orlovich <maksim.orlovich@kdemail.net>
 
9
 
 
10
Permission is hereby granted, free of charge, to any person obtaining a
 
11
copy of this software and associated documentation files (the "Software"),
 
12
to deal in the Software without restriction, including without limitation
 
13
the rights to use, copy, modify, merge, publish, distribute, sublicense,
 
14
and/or sell copies of the Software, and to permit persons to whom the
 
15
Software is furnished to do so, subject to the following conditions:
 
16
 
 
17
The above copyright notice and this permission notice shall be included in
 
18
all copies or substantial portions of the Software.
 
19
 
 
20
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
21
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
22
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 
23
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
24
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 
25
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 
26
DEALINGS IN THE SOFTWARE.
 
27
 
 
28
*/
 
29
 
 
30
#include "ui_oxygenstyleconfig.h"
 
31
 
 
32
namespace Oxygen
 
33
{
 
34
    class AnimationConfigWidget;
 
35
 
 
36
    class StyleConfig: public QWidget, Ui::OxygenStyleConfig
 
37
    {
 
38
 
 
39
        Q_OBJECT
 
40
 
 
41
        public:
 
42
 
 
43
        //! constructor
 
44
        StyleConfig(QWidget* parent);
 
45
 
 
46
        //! destructor
 
47
        virtual ~StyleConfig( void )
 
48
        {}
 
49
 
 
50
        Q_SIGNALS:
 
51
 
 
52
        //! emmited whenever one option is changed.
 
53
        void changed(bool);
 
54
 
 
55
        public Q_SLOTS:
 
56
 
 
57
        //! save current state
 
58
        void save( void );
 
59
 
 
60
        //! restore all default values
 
61
        void defaults( void );
 
62
 
 
63
        //Everything below this is internal.
 
64
 
 
65
        //! reset to saved configuration
 
66
        void reset( void );
 
67
 
 
68
        //! toggle expert mode
 
69
        virtual void toggleExpertMode( bool );
 
70
 
 
71
        //! event
 
72
        virtual void showEvent( QShowEvent* );
 
73
 
 
74
        protected Q_SLOTS:
 
75
 
 
76
        //! update layout
 
77
        /*! needed in expert mode to accommodate with animations config widget size changes */
 
78
        void updateLayout( void );
 
79
 
 
80
        //! update modified state when option is checked/unchecked
 
81
        void updateChanged( void );
 
82
 
 
83
        //! update options enable state based on selected drag mode
 
84
        void windowDragModeChanged( int );
 
85
 
 
86
        protected:
 
87
 
 
88
        //! load setup from config data
 
89
        void load( void );
 
90
 
 
91
        int menuMode( void ) const;
 
92
        int tabStyle( void ) const;
 
93
        int windowDragMode( void ) const;
 
94
        int triangularExpanderSize( void ) const;
 
95
 
 
96
        private:
 
97
 
 
98
        bool _expertMode;
 
99
 
 
100
        //! animation config (expert mode only)
 
101
        AnimationConfigWidget* _animationConfigWidget;
 
102
 
 
103
    };
 
104
 
 
105
}
 
106
#endif