23#include <tqstringlist.h> 
   26#include <tdecmodule.h> 
   29#define ROTATION_0_DEGREES_INDEX 0 
   30#define ROTATION_90_DEGREES_INDEX 1 
   31#define ROTATION_180_DEGREES_INDEX 2 
   32#define ROTATION_270_DEGREES_INDEX 3 
   35class RandRScreenPrivate;
 
   37class TDERANDR_EXPORT HotPlugRule {
 
   47        virtual ~HotPlugRule();
 
   51        TQValueList< int > states;
 
   55typedef TQValueList< HotPlugRule > HotPlugRulesList;
 
   57class TDERANDR_EXPORT SingleScreenData {
 
   60        virtual ~SingleScreenData();
 
   63        TQString screenUniqueName;
 
   64        TQString screenFriendlyName;
 
   65        bool generic_screen_detected;
 
   66        bool screen_connected;
 
   68        TQStringList resolutions;
 
   69        TQStringList refresh_rates;
 
   70        TQStringList color_depths;
 
   71        TQStringList rotations;
 
   73        int current_resolution_index;
 
   74        int current_refresh_rate_index;
 
   75        int current_color_depth_index;
 
   81        int current_rotation_index;
 
   82        int current_orientation_mask;
 
   85        bool supports_transformations;
 
   89        int absolute_x_position;
 
   90        int absolute_y_position;
 
   91        int current_x_pixel_count;
 
   92        int current_y_pixel_count;
 
   96        unsigned int dpms_standby_delay;
 
   97        unsigned int dpms_suspend_delay;
 
   98        unsigned int dpms_off_delay;
 
  101class RandRScreen : 
public TQObject
 
  116        OrientationMask = 63,
 
  120    RandRScreen(
int screenIndex);
 
  126    bool        applyProposed();
 
  131    bool        applyProposedAndConfirm();
 
  135    bool        showTestConfigurationDialog();
 
  138    TQString        changedMessage() 
const;
 
  140    bool        changedFromOriginal() 
const;
 
  141    void        proposeOriginal();
 
  143    bool        proposedChanged() 
const;
 
  145    static TQString rotationName(
int rotation, 
bool pastTense = 
false, 
bool capitalised = 
true);
 
  146    TQPixmap            rotationIcon(
int rotation) 
const;
 
  147    TQString            currentRotationDescription() 
const;
 
  149    int             rotationIndexToDegree(
int rotation) 
const;
 
  150    int             rotationDegreeToIndex(
int degree) 
const;
 
  155    TQStringList refreshRates(
int size) 
const;
 
  157    TQString        refreshRateDirectDescription(
int rate) 
const;
 
  158    TQString        refreshRateIndirectDescription(
int size, 
int index) 
const;
 
  159    TQString        refreshRateDescription(
int size, 
int index) 
const;
 
  161    int         currentRefreshRate() 
const;
 
  162    TQString        currentRefreshRateDescription() 
const;
 
  165    int         refreshRateHzToIndex(
int size, 
int hz) 
const;
 
  166    int         refreshRateIndexToHz(
int size, 
int index) 
const;
 
  171    int             numSizes() 
const;
 
  172    const TQSize&   pixelSize(
int index) 
const;
 
  173    const TQSize&   mmSize(
int index) 
const;
 
  174    int             pixelCount(
int index) 
const;
 
  182    int             sizeIndex(TQSize pixelSize) 
const;
 
  184    int         rotations() 
const;
 
  189    int         currentPixelWidth() 
const;
 
  190    int         currentPixelHeight() 
const;
 
  191    int         currentMMWidth() 
const;
 
  192    int         currentMMHeight() 
const;
 
  194    int         currentRotation() 
const;
 
  195    int         currentSize() 
const;
 
  200    int         proposedSize() 
const;
 
  201    bool        proposeSize(
int newSize);
 
  203    int         proposedRotation() 
const;
 
  204    void        proposeRotation(
int newRotation);
 
  206    int         proposedRefreshRate() 
const;
 
  214    bool        proposeRefreshRate(
int index);
 
  223    RandRScreenPrivate* d;
 
  227    TQValueList<TQSize> m_pixelSizes;
 
  228    TQValueList<TQSize> m_mmSizes;
 
  231    int         m_originalRotation;
 
  233    int         m_originalRefreshRate;
 
  235    int         m_currentRotation;
 
  237    int         m_currentRefreshRate;
 
  239    int         m_proposedRotation;
 
  241    int         m_proposedRefreshRate;
 
  246    void        desktopResized();
 
  247    void        shownDialogDestroyed();
 
  250typedef TQPtrList<RandRScreen> ScreenList;
 
  257    bool            isValid() 
const;
 
  258    const TQString& errorCode() 
const;
 
  259    const TQString& 
version() 
const;
 
  261    int     eventBase() 
const;
 
  262    int     screenChangeNotifyEvent() 
const;
 
  263    int     errorBase() 
const;
 
  265    int     screenIndexOfWidget(TQWidget* widget);
 
  267    int             numScreens() 
const;
 
  268    RandRScreen*    screen(
int index);
 
  270    void            setCurrentScreen(
int index);
 
  271    int             currentScreenIndex() 
const;
 
  272    RandRScreen*    currentScreen();
 
  283    bool    loadDisplay(
TDEConfig& config, 
bool loadScreens = 
true);
 
  284    void    saveDisplay(
TDEConfig& config, 
bool applyOnStartup, 
bool syncTrayApp);
 
  286    static bool     applyOnStartup(
TDEConfig& config);
 
  287    static bool     syncTrayApp(
TDEConfig& config);
 
  289    void    applyProposed(
bool confirm = 
true);
 
  291    bool showTestConfigurationDialog();
 
  295    int             m_currentScreenIndex;
 
  296    RandRScreen*    m_currentScreen;
 
  297    ScreenList      m_screens;
 
  300    TQString            m_errorCode;
 
Provides a dialog that is only available for a specified amount of time, and reports the time remaini...
const TDEShortcut & save()