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

« back to all changes in this revision

Viewing changes to kwin/clients/oxygen/config/oxygenexceptionlistwidget.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 oxygenexceptionlistwidget_h
 
2
#define oxygenexceptionlistwidget_h
 
3
//////////////////////////////////////////////////////////////////////////////
 
4
// oxygenexceptionlistwidget.h
 
5
// -------------------
 
6
//
 
7
// Copyright (c) 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr>
 
8
//
 
9
// Permission is hereby granted, free of charge, to any person obtaining a copy
 
10
// of this software and associated documentation files (the "Software"), to
 
11
// deal in the Software without restriction, including without limitation the
 
12
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 
13
// sell copies of the Software, and to permit persons to whom the Software is
 
14
// furnished to do so, subject to the following conditions:
 
15
//
 
16
// The above copyright notice and this permission notice shall be included in
 
17
// all copies or substantial portions of the Software.
 
18
//
 
19
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
20
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
21
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 
22
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
23
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 
24
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 
25
// IN THE SOFTWARE.
 
26
//////////////////////////////////////////////////////////////////////////////
 
27
 
 
28
#include "ui_oxygenexceptionlistwidget.h"
 
29
#include "oxygenexceptionmodel.h"
 
30
#include "../oxygenexceptionlist.h"
 
31
 
 
32
//! QDialog used to commit selected files
 
33
namespace Oxygen
 
34
{
 
35
 
 
36
    class ExceptionListWidget: public QWidget
 
37
    {
 
38
 
 
39
        //! Qt meta object
 
40
        Q_OBJECT
 
41
 
 
42
        public:
 
43
 
 
44
        //! constructor
 
45
        explicit ExceptionListWidget( QWidget* = 0, Configuration defaultConfiguration = Configuration() );
 
46
 
 
47
        //! set exceptions
 
48
        void setExceptions( const ExceptionList& );
 
49
 
 
50
        //! get exceptions
 
51
        ExceptionList exceptions( void ) const;
 
52
 
 
53
        signals:
 
54
 
 
55
        //! emitted when list is changed
 
56
        void changed( void );
 
57
 
 
58
        protected:
 
59
 
 
60
        //! model
 
61
        const ExceptionModel& model() const
 
62
        { return _model; }
 
63
 
 
64
        //! model
 
65
        ExceptionModel& model()
 
66
        { return _model; }
 
67
 
 
68
        protected slots:
 
69
 
 
70
        //! update button states
 
71
        virtual void updateButtons( void );
 
72
 
 
73
        //! add
 
74
        virtual void add( void );
 
75
 
 
76
        //! edit
 
77
        virtual void edit( void );
 
78
 
 
79
        //! remove
 
80
        virtual void remove( void );
 
81
 
 
82
        //! toggle
 
83
        virtual void toggle( const QModelIndex& );
 
84
 
 
85
        //! move up
 
86
        virtual void up( void );
 
87
 
 
88
        //! move down
 
89
        virtual void down( void );
 
90
 
 
91
        private:
 
92
 
 
93
        //! resize columns
 
94
        void resizeColumns( void ) const;
 
95
 
 
96
        //! check exception
 
97
        bool checkException( Exception& );
 
98
 
 
99
        //! default configuration
 
100
        Configuration _defaultConfiguration;
 
101
 
 
102
        //! model
 
103
        ExceptionModel _model;
 
104
 
 
105
        //! ui
 
106
        Ui_OxygenExceptionListWidget ui;
 
107
 
 
108
    };
 
109
 
 
110
}
 
111
 
 
112
#endif