kde-workspace/kcontrol/randr/randrconfig.h
Ivailo Monev 2b9066142a generic: adjust to Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-19 23:50:19 +03:00

87 lines
2.3 KiB
C++

/*
* Copyright (c) 2007 Gustavo Pichorim Boiko <gustavo.boiko@kdemail.net>
* Copyright (c) 2007 Harry Bock <hbock@providence.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __RANDRCONFIG_H__
#define __RANDRCONFIG_H__
#include "ui_randrconfigbase.h"
#include "randr.h"
#include <QWidget>
#include <QTimer>
#include <QGraphicsScene>
#include <KHBox>
class SettingsContainer;
class CollapsibleWidget;
class RandRDisplay;
class OutputGraphicsItem;
class LayoutManager;
class OutputConfig;
typedef QList<OutputConfig*> OutputConfigList;
class RandRConfig : public QWidget, public Ui::RandRConfigBase
{
Q_OBJECT
public:
RandRConfig(QWidget *parent, RandRDisplay *display);
virtual ~RandRConfig();
void load(void);
void save(void);
void defaults(void);
void apply();
void update();
public slots:
void slotUpdateView();
void slotDelayedUpdateView();
void updatePrimaryDisplay();
protected slots:
void slotAdjustOutput(OutputGraphicsItem *o);
void identifyOutputs();
void clearIndicators();
void saveStartup();
void disableStartup();
void unifiedOutputChanged(bool checked);
void outputConnectedChanged(bool);
signals:
void changed(bool change=true);
protected:
virtual bool eventFilter(QObject *obj, QEvent *event);
private:
RandRDisplay *m_display;
SettingsContainer *m_container;
QList<CollapsibleWidget*> m_outputList;
QGraphicsScene *m_scene;
LayoutManager *m_layoutManager;
QList<KHBox*> m_indicators;
QTimer identifyTimer;
OutputConfigList m_configs;
QTimer compressUpdateViewTimer;
};
#endif // __RANDRCONFIG_H__