/* * Copyright (c) 2007 Gustavo Pichorim Boiko * Copyright (c) 2007 Harry Bock * * 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 #include #include #include class SettingsContainer; class CollapsibleWidget; class RandRDisplay; class OutputGraphicsItem; class LayoutManager; class OutputConfig; typedef QList 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 m_outputList; QGraphicsScene *m_scene; LayoutManager *m_layoutManager; QList m_indicators; QTimer identifyTimer; OutputConfigList m_configs; QTimer compressUpdateViewTimer; }; #endif // __RANDRCONFIG_H__