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

« back to all changes in this revision

Viewing changes to kcontrol/randr/randrconfig.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
/*
 
2
 * Copyright (c) 2007 Gustavo Pichorim Boiko <gustavo.boiko@kdemail.net>
 
3
 * Copyright (c) 2007 Harry Bock <hbock@providence.edu>
 
4
 * 
 
5
 *  This program is free software; you can redistribute it and/or modify
 
6
 *  it under the terms of the GNU General Public License as published by
 
7
 *  the Free Software Foundation; either version 2 of the License, or
 
8
 *  (at your option) any later version.
 
9
 *
 
10
 *  This program is distributed in the hope that it will be useful,
 
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *  GNU General Public License for more details.
 
14
 *
 
15
 *  You should have received a copy of the GNU General Public License
 
16
 *  along with this program; if not, write to the Free Software
 
17
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
18
 */
 
19
 
 
20
#ifndef __RANDRCONFIG_H__
 
21
#define __RANDRCONFIG_H__
 
22
 
 
23
#include "ui_randrconfigbase.h"
 
24
#include "randr.h"
 
25
#include "outputconfig.h"
 
26
 
 
27
#include <QWidget>
 
28
#include <QTimer>
 
29
 
 
30
class QGraphicsScene;
 
31
class SettingsContainer;
 
32
class CollapsibleWidget;
 
33
class RandRDisplay;
 
34
class OutputGraphicsItem;
 
35
class LayoutManager;
 
36
 
 
37
class RandRConfig : public QWidget, public Ui::RandRConfigBase
 
38
{
 
39
        Q_OBJECT
 
40
public:
 
41
        RandRConfig(QWidget *parent, RandRDisplay *display);
 
42
        virtual ~RandRConfig();
 
43
 
 
44
        void load(void);
 
45
        void save(void);
 
46
        void defaults(void);
 
47
 
 
48
        void apply();
 
49
        void update();
 
50
 
 
51
public slots:
 
52
        void slotUpdateView();
 
53
        void slotDelayedUpdateView();
 
54
 
 
55
protected slots:
 
56
        void slotChanged(void);
 
57
        void slotAdjustOutput(OutputGraphicsItem *o);
 
58
        void identifyOutputs();
 
59
        void clearIndicators();
 
60
        void saveStartup();
 
61
        void disableStartup();
 
62
 
 
63
signals:
 
64
        void changed(bool change);
 
65
 
 
66
protected:
 
67
        virtual bool eventFilter(QObject *obj, QEvent *event);
 
68
        
 
69
private:
 
70
        void insufficientVirtualSize();
 
71
        RandRDisplay *m_display;
 
72
        bool m_changed;
 
73
        bool m_firstLoad;
 
74
        
 
75
        SettingsContainer *m_container;
 
76
        QList<CollapsibleWidget*> m_outputList;
 
77
        QGraphicsScene *m_scene;
 
78
        LayoutManager *m_layoutManager;
 
79
        QList<QWidget*> m_indicators;
 
80
        QTimer identifyTimer;
 
81
        OutputConfigList m_configs;
 
82
        QTimer compressUpdateViewTimer;
 
83
};
 
84
 
 
85
 
 
86
#endif