2 * Copyright 2008 Aike J Sommer <dev@aikesommer.name>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2,
7 * or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef KEPHAL_OUTPUTSCREENS_H
22 #define KEPHAL_OUTPUTSCREENS_H
25 #include "kephal/screens.h"
26 #include "../simplescreen.h"
27 #include "kephal/outputs.h"
32 class OutputScreen
: public SimpleScreen
{
35 OutputScreen(QObject
* parent
);
37 void add(Output
* output
);
38 void remove(Output
* output
);
40 QList
<Output
*> outputs();
43 QList
<Output
*> m_outputs
;
47 class OutputScreens
: public Screens
{
50 OutputScreens(QObject
* parent
);
51 virtual QList
<Screen
*> screens();
54 virtual void prepareScreens(QMap
<int, OutputScreen
*> & screens
);
55 void rebuildScreens();
56 void triggerRebuildScreens(); // Triggers a rebuild aftera short delay; requests are coalesced.
58 void timerEvent(QTimerEvent
*event
);
61 void outputActivated(Kephal::Output
* o
);
62 void outputDeactivated(Kephal::Output
* o
);
63 void outputResized(Kephal::Output
* o
, QSize oldSize
, QSize newSize
);
64 void outputMoved(Kephal::Output
* o
, QPoint oldPosition
, QPoint newPosition
);
71 QMap
<int, OutputScreen
*> m_screens
;
80 #endif // KEPHAL_OUTPUTSCREENS_H