23 #include <tqstringlist.h> 24 #include <tqptrlist.h> 26 #include <tdecmodule.h> 27 #include <tdeconfig.h> 30 class RandRScreenPrivate;
32 class TDERANDR_EXPORT HotPlugRule {
42 virtual ~HotPlugRule();
46 TQValueList< int > states;
50 typedef TQValueList< HotPlugRule > HotPlugRulesList;
52 class TDERANDR_EXPORT SingleScreenData {
55 virtual ~SingleScreenData();
58 TQString screenUniqueName;
59 TQString screenFriendlyName;
60 bool generic_screen_detected;
61 bool screen_connected;
63 TQStringList resolutions;
64 TQStringList refresh_rates;
65 TQStringList color_depths;
66 TQStringList rotations;
68 int current_resolution_index;
69 int current_refresh_rate_index;
70 int current_color_depth_index;
76 int current_rotation_index;
77 int current_orientation_mask;
80 bool supports_transformations;
84 int absolute_x_position;
85 int absolute_y_position;
86 int current_x_pixel_count;
87 int current_y_pixel_count;
91 unsigned int dpms_standby_delay;
92 unsigned int dpms_suspend_delay;
93 unsigned int dpms_off_delay;
96 class RandRScreen :
public TQObject
111 OrientationMask = 63,
115 RandRScreen(
int screenIndex);
121 bool applyProposed();
126 bool applyProposedAndConfirm();
130 bool showTestConfigurationDialog();
133 TQString changedMessage()
const;
135 bool changedFromOriginal()
const;
136 void proposeOriginal();
138 bool proposedChanged()
const;
140 static TQString rotationName(
int rotation,
bool pastTense =
false,
bool capitalised =
true);
141 TQPixmap rotationIcon(
int rotation)
const;
142 TQString currentRotationDescription()
const;
144 int rotationIndexToDegree(
int rotation)
const;
145 int rotationDegreeToIndex(
int degree)
const;
150 TQStringList refreshRates(
int size)
const;
152 TQString refreshRateDirectDescription(
int rate)
const;
153 TQString refreshRateIndirectDescription(
int size,
int index)
const;
154 TQString refreshRateDescription(
int size,
int index)
const;
156 int currentRefreshRate()
const;
157 TQString currentRefreshRateDescription()
const;
160 int refreshRateHzToIndex(
int size,
int hz)
const;
161 int refreshRateIndexToHz(
int size,
int index)
const;
166 int numSizes()
const;
167 const TQSize& pixelSize(
int index)
const;
168 const TQSize& mmSize(
int index)
const;
169 int pixelCount(
int index)
const;
177 int sizeIndex(TQSize pixelSize)
const;
179 int rotations()
const;
184 int currentPixelWidth()
const;
185 int currentPixelHeight()
const;
186 int currentMMWidth()
const;
187 int currentMMHeight()
const;
189 int currentRotation()
const;
190 int currentSize()
const;
195 int proposedSize()
const;
196 bool proposeSize(
int newSize);
198 int proposedRotation()
const;
199 void proposeRotation(
int newRotation);
201 int proposedRefreshRate()
const;
209 bool proposeRefreshRate(
int index);
218 RandRScreenPrivate* d;
222 TQValueList<TQSize> m_pixelSizes;
223 TQValueList<TQSize> m_mmSizes;
226 int m_originalRotation;
228 int m_originalRefreshRate;
230 int m_currentRotation;
232 int m_currentRefreshRate;
234 int m_proposedRotation;
236 int m_proposedRefreshRate;
241 void desktopResized();
242 void shownDialogDestroyed();
245 typedef TQPtrList<RandRScreen> ScreenList;
252 bool isValid()
const;
253 const TQString& errorCode()
const;
254 const TQString&
version()
const;
256 int eventBase()
const;
257 int screenChangeNotifyEvent()
const;
258 int errorBase()
const;
260 int screenIndexOfWidget(TQWidget* widget);
262 int numScreens()
const;
263 RandRScreen* screen(
int index);
265 void setCurrentScreen(
int index);
266 int currentScreenIndex()
const;
267 RandRScreen* currentScreen();
278 bool loadDisplay(
TDEConfig& config,
bool loadScreens =
true);
279 void saveDisplay(
TDEConfig& config,
bool applyOnStartup,
bool syncTrayApp);
281 static bool applyOnStartup(
TDEConfig& config);
282 static bool syncTrayApp(
TDEConfig& config);
284 void applyProposed(
bool confirm =
true);
286 bool showTestConfigurationDialog();
290 int m_currentScreenIndex;
291 RandRScreen* m_currentScreen;
292 ScreenList m_screens;
const TDEShortcut & save()
Provides a dialog that is only available for a specified amount of time, and reports the time remaini...