tdemonitordevice.h
00001 /* This file is part of the TDE libraries 00002 Copyright (C) 2012 Timothy Pearson <kb9vqf@pearsoncomputing.net> 00003 (C) 2013 Golubev Alexander <fatzer2@gmail.com> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License version 2 as published by the Free Software Foundation. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef _TDEMONITORDEVICE_H 00021 #define _TDEMONITORDEVICE_H 00022 00023 #include "tdegenericdevice.h" 00024 #include "tdehwcommontypes.h" 00025 00026 typedef TQPair<unsigned int, unsigned int> TDEResolutionPair; 00027 typedef TQValueList< TDEResolutionPair > TDEResolutionList; 00028 00029 class TDECORE_EXPORT TDEMonitorDevice : public TDEGenericDevice 00030 { 00031 public: 00036 TDEMonitorDevice(TDEGenericDeviceType::TDEGenericDeviceType dt, TQString dn=TQString::null); 00037 00041 ~TDEMonitorDevice(); 00042 00046 bool connected(); 00047 00051 bool enabled(); 00052 00056 TQByteArray edid(); 00057 00061 TDEResolutionList resolutions(); 00062 00066 TQString portType(); 00067 00071 TDEDisplayPowerLevel::TDEDisplayPowerLevel powerLevel(); 00072 00073 protected: 00078 void internalSetConnected(bool cn); 00079 00084 void internalSetEnabled(bool en); 00085 00090 void internalSetEdid(TQByteArray ed); 00091 00096 void internalSetResolutions(TDEResolutionList rs); 00097 00102 void internalSetPortType(TQString pt); 00103 00108 void internalSetPowerLevel(TDEDisplayPowerLevel::TDEDisplayPowerLevel pl); 00109 00110 private: 00111 bool m_connected; 00112 bool m_enabled; 00113 TQByteArray m_edid; 00114 TDEResolutionList m_resolutions; 00115 TQString m_portType; 00116 TDEDisplayPowerLevel::TDEDisplayPowerLevel m_powerLevel; 00117 00118 friend class TDEHardwareDevices; 00119 }; 00120 00121 00122 #endif // _TDEMONITORDEVICE_H