2 * Copyright (c) 2007 Gustavo Pichorim Boiko <gustavo.boiko@kdemail.net>
3 * Copyright (c) 2007 Harry Bock <hbock@providence.edu>
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.
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.
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.
20 #ifndef __OUTPUTCONFIG_H__
21 #define __OUTPUTCONFIG_H__
24 #include <QTextStream>
25 #include "ui_outputconfigbase.h"
27 #include "randroutput.h"
30 class OutputGraphicsItem
;
32 class OutputConfig
: public QWidget
, public Ui::OutputConfigBase
36 OutputConfig(QWidget
*parent
, RandROutput
*output
, OutputGraphicsItem
*item
);
39 /** Enumeration describing two related outputs (i.e. VGA LeftOf TMDS) */
48 // NOTE: I'd love to have used Above and Below but Xlib already defines them
49 // and that confuses GCC.
51 QPoint
position(void) const;
52 QSize
resolution(void) const;
53 float refreshRate(void) const;
54 int rotation(void) const;
56 static QString
positionName(Relation position
);
57 RandROutput
*output(void) const;
59 bool hasPendingChanges(void) const;
65 void setConfigDirty(void);
67 void updatePositionList(void);
68 void updateRotationList(void);
69 void updateSizeList(void);
70 void updateRateList(void);
71 void updateRateList(int resolutionIndex
);
73 void positionComboChanged(int item
);
74 void outputChanged(RROutput output
, int changed
);
86 RandROutput
*m_output
;
87 OutputGraphicsItem
*m_item
;