@ -102,7 +102,7 @@ public:
XRRScreenConfiguration * config ;
} ;
K DE_EXPORT RandRScreen : : RandRScreen ( int screenIndex )
T DE_EXPORT RandRScreen : : RandRScreen ( int screenIndex )
: d ( new RandRScreenPrivate ( ) )
, m_screen ( screenIndex )
, m_shownDialog ( NULL )
@ -111,12 +111,12 @@ KDE_EXPORT RandRScreen::RandRScreen(int screenIndex)
setOriginal ( ) ;
}
K DE_EXPORT RandRScreen : : ~ RandRScreen ( )
T DE_EXPORT RandRScreen : : ~ RandRScreen ( )
{
delete d ;
}
K DE_EXPORT void RandRScreen : : loadSettings ( )
T DE_EXPORT void RandRScreen : : loadSettings ( )
{
if ( d - > config ) {
XRRFreeScreenConfigInfo ( d - > config ) ;
@ -176,14 +176,14 @@ KDE_EXPORT void RandRScreen::loadSettings()
}
}
K DE_EXPORT void RandRScreen : : setOriginal ( )
T DE_EXPORT void RandRScreen : : setOriginal ( )
{
m_originalSize = m_currentSize ;
m_originalRotation = m_currentRotation ;
m_originalRefreshRate = m_currentRefreshRate ;
}
K DE_EXPORT bool RandRScreen : : applyProposed ( )
T DE_EXPORT bool RandRScreen : : applyProposed ( )
{
//kdDebug() << k_funcinfo << " size " << (SizeID)proposedSize() << ", rotation " << proposedRotation() << ", refresh " << refreshRateIndexToHz(proposedSize(), proposedRefreshRate()) << endl;
@ -227,7 +227,7 @@ KDE_EXPORT bool RandRScreen::applyProposed()
return false ;
}
K DE_EXPORT bool RandRScreen : : applyProposedAndConfirm ( )
T DE_EXPORT bool RandRScreen : : applyProposedAndConfirm ( )
{
if ( proposedChanged ( ) ) {
setOriginal ( ) ;
@ -246,7 +246,7 @@ KDE_EXPORT bool RandRScreen::applyProposedAndConfirm()
return true ;
}
K DE_EXPORT bool RandRScreen : : confirm ( )
T DE_EXPORT bool RandRScreen : : confirm ( )
{
// uncomment the line below and edit out the KTimerDialog stuff to get
// a version which works on today's tdelibs (no accept dialog is presented)
@ -280,19 +280,19 @@ KDE_EXPORT bool RandRScreen::confirm()
return acceptDialog . exec ( ) ;
}
K DE_EXPORT void RandRScreen : : shownDialogDestroyed ( )
T DE_EXPORT void RandRScreen : : shownDialogDestroyed ( )
{
m_shownDialog = NULL ;
disconnect ( kapp - > desktop ( ) , TQ_SIGNAL ( resized ( int ) ) , this , TQ_SLOT ( desktopResized ( ) ) ) ;
}
K DE_EXPORT void RandRScreen : : desktopResized ( )
T DE_EXPORT void RandRScreen : : desktopResized ( )
{
if ( m_shownDialog ! = NULL )
KDialog : : centerOnScreen ( m_shownDialog , m_screen ) ;
}
K DE_EXPORT TQString RandRScreen : : changedMessage ( ) const
T DE_EXPORT TQString RandRScreen : : changedMessage ( ) const
{
if ( currentRefreshRate ( ) = = - 1 )
return i18n ( " New configuration: \n Resolution: %1 x %2 \n Orientation: %3 " )
@ -307,24 +307,24 @@ KDE_EXPORT TQString RandRScreen::changedMessage() const
. arg ( currentRefreshRateDescription ( ) ) ;
}
K DE_EXPORT bool RandRScreen : : changedFromOriginal ( ) const
T DE_EXPORT bool RandRScreen : : changedFromOriginal ( ) const
{
return m_currentSize ! = m_originalSize | | m_currentRotation ! = m_originalRotation | | m_currentRefreshRate ! = m_originalRefreshRate ;
}
K DE_EXPORT void RandRScreen : : proposeOriginal ( )
T DE_EXPORT void RandRScreen : : proposeOriginal ( )
{
m_proposedSize = m_originalSize ;
m_proposedRotation = m_originalRotation ;
m_proposedRefreshRate = m_originalRefreshRate ;
}
K DE_EXPORT bool RandRScreen : : proposedChanged ( ) const
T DE_EXPORT bool RandRScreen : : proposedChanged ( ) const
{
return m_currentSize ! = m_proposedSize | | m_currentRotation ! = m_proposedRotation | | m_currentRefreshRate ! = m_proposedRefreshRate ;
}
K DE_EXPORT TQString RandRScreen : : rotationName ( int rotation , bool pastTense , bool capitalised )
T DE_EXPORT TQString RandRScreen : : rotationName ( int rotation , bool pastTense , bool capitalised )
{
if ( ! pastTense )
switch ( rotation ) {
@ -378,7 +378,7 @@ KDE_EXPORT TQString RandRScreen::rotationName(int rotation, bool pastTense, bool
}
}
K DE_EXPORT TQPixmap RandRScreen : : rotationIcon ( int rotation ) const
T DE_EXPORT TQPixmap RandRScreen : : rotationIcon ( int rotation ) const
{
// Adjust icons for current screen orientation
if ( ! ( m_currentRotation & RR_Rotate_0 ) & & rotation & ( RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270 ) ) {
@ -417,7 +417,7 @@ KDE_EXPORT TQPixmap RandRScreen::rotationIcon(int rotation) const
}
}
K DE_EXPORT TQString RandRScreen : : currentRotationDescription ( ) const
T DE_EXPORT TQString RandRScreen : : currentRotationDescription ( ) const
{
TQString ret = rotationName ( m_currentRotation & RotateMask ) ;
@ -433,7 +433,7 @@ KDE_EXPORT TQString RandRScreen::currentRotationDescription() const
return ret ;
}
K DE_EXPORT int RandRScreen : : rotationIndexToDegree ( int rotation ) const
T DE_EXPORT int RandRScreen : : rotationIndexToDegree ( int rotation ) const
{
switch ( rotation & RotateMask ) {
case RR_Rotate_90 :
@ -450,7 +450,7 @@ KDE_EXPORT int RandRScreen::rotationIndexToDegree(int rotation) const
}
}
K DE_EXPORT int RandRScreen : : rotationDegreeToIndex ( int degree ) const
T DE_EXPORT int RandRScreen : : rotationDegreeToIndex ( int degree ) const
{
switch ( degree ) {
case 90 :
@ -467,27 +467,27 @@ KDE_EXPORT int RandRScreen::rotationDegreeToIndex(int degree) const
}
}
K DE_EXPORT int RandRScreen : : currentPixelWidth ( ) const
T DE_EXPORT int RandRScreen : : currentPixelWidth ( ) const
{
return m_pixelSizes [ m_currentSize ] . width ( ) ;
}
K DE_EXPORT int RandRScreen : : currentPixelHeight ( ) const
T DE_EXPORT int RandRScreen : : currentPixelHeight ( ) const
{
return m_pixelSizes [ m_currentSize ] . height ( ) ;
}
K DE_EXPORT int RandRScreen : : currentMMWidth ( ) const
T DE_EXPORT int RandRScreen : : currentMMWidth ( ) const
{
return m_pixelSizes [ m_currentSize ] . width ( ) ;
}
K DE_EXPORT int RandRScreen : : currentMMHeight ( ) const
T DE_EXPORT int RandRScreen : : currentMMHeight ( ) const
{
return m_pixelSizes [ m_currentSize ] . height ( ) ;
}
K DE_EXPORT TQStringList RandRScreen : : refreshRates ( int size ) const
T DE_EXPORT TQStringList RandRScreen : : refreshRates ( int size ) const
{
int nrates ;
TQStringList ret ;
@ -514,22 +514,22 @@ KDE_EXPORT TQStringList RandRScreen::refreshRates(int size) const
return ret ;
}
K DE_EXPORT TQString RandRScreen : : refreshRateDirectDescription ( int rate ) const
T DE_EXPORT TQString RandRScreen : : refreshRateDirectDescription ( int rate ) const
{
return i18n ( " Refresh rate in Hertz (Hz) " , " % 1 Hz " ).arg(rate) ;
}
K DE_EXPORT TQString RandRScreen : : refreshRateIndirectDescription ( int size , int index ) const
T DE_EXPORT TQString RandRScreen : : refreshRateIndirectDescription ( int size , int index ) const
{
return i18n ( " Refresh rate in Hertz (Hz) " , " % 1 Hz " ).arg(refreshRateIndexToHz(size, index)) ;
}
K DE_EXPORT TQString RandRScreen : : refreshRateDescription ( int size , int index ) const
T DE_EXPORT TQString RandRScreen : : refreshRateDescription ( int size , int index ) const
{
return refreshRates ( size ) [ index ] ;
}
K DE_EXPORT bool RandRScreen : : proposeRefreshRate ( int index )
T DE_EXPORT bool RandRScreen : : proposeRefreshRate ( int index )
{
if ( index > = 0 & & ( int ) refreshRates ( proposedSize ( ) ) . count ( ) > index ) {
m_proposedRefreshRate = index ;
@ -539,22 +539,22 @@ KDE_EXPORT bool RandRScreen::proposeRefreshRate(int index)
return false ;
}
K DE_EXPORT int RandRScreen : : currentRefreshRate ( ) const
T DE_EXPORT int RandRScreen : : currentRefreshRate ( ) const
{
return m_currentRefreshRate ;
}
K DE_EXPORT TQString RandRScreen : : currentRefreshRateDescription ( ) const
T DE_EXPORT TQString RandRScreen : : currentRefreshRateDescription ( ) const
{
return refreshRateIndirectDescription ( m_currentSize , m_currentRefreshRate ) ;
}
K DE_EXPORT int RandRScreen : : proposedRefreshRate ( ) const
T DE_EXPORT int RandRScreen : : proposedRefreshRate ( ) const
{
return m_proposedRefreshRate ;
}
K DE_EXPORT int RandRScreen : : refreshRateHzToIndex ( int size , int hz ) const
T DE_EXPORT int RandRScreen : : refreshRateHzToIndex ( int size , int hz ) const
{
int nrates ;
short * rates = XRRRates ( tqt_xdisplay ( ) , m_screen , ( SizeID ) size , & nrates ) ;
@ -570,7 +570,7 @@ KDE_EXPORT int RandRScreen::refreshRateHzToIndex(int size, int hz) const
return - 1 ;
}
K DE_EXPORT int RandRScreen : : refreshRateIndexToHz ( int size , int index ) const
T DE_EXPORT int RandRScreen : : refreshRateIndexToHz ( int size , int index ) const
{
int nrates ;
short * rates = XRRRates ( tqt_xdisplay ( ) , m_screen , ( SizeID ) size , & nrates ) ;
@ -585,22 +585,22 @@ KDE_EXPORT int RandRScreen::refreshRateIndexToHz(int size, int index) const
return rates [ index ] ;
}
K DE_EXPORT int RandRScreen : : numSizes ( ) const
T DE_EXPORT int RandRScreen : : numSizes ( ) const
{
return m_pixelSizes . count ( ) ;
}
K DE_EXPORT const TQSize & RandRScreen : : pixelSize ( int index ) const
T DE_EXPORT const TQSize & RandRScreen : : pixelSize ( int index ) const
{
return m_pixelSizes [ index ] ;
}
K DE_EXPORT const TQSize & RandRScreen : : mmSize ( int index ) const
T DE_EXPORT const TQSize & RandRScreen : : mmSize ( int index ) const
{
return m_mmSizes [ index ] ;
}
K DE_EXPORT int RandRScreen : : sizeIndex ( TQSize pixelSize ) const
T DE_EXPORT int RandRScreen : : sizeIndex ( TQSize pixelSize ) const
{
for ( uint i = 0 ; i < m_pixelSizes . count ( ) ; i + + )
if ( m_pixelSizes [ i ] = = pixelSize )
@ -609,37 +609,37 @@ KDE_EXPORT int RandRScreen::sizeIndex(TQSize pixelSize) const
return - 1 ;
}
K DE_EXPORT int RandRScreen : : rotations ( ) const
T DE_EXPORT int RandRScreen : : rotations ( ) const
{
return m_rotations ;
}
K DE_EXPORT int RandRScreen : : currentRotation ( ) const
T DE_EXPORT int RandRScreen : : currentRotation ( ) const
{
return m_currentRotation ;
}
K DE_EXPORT int RandRScreen : : currentSize ( ) const
T DE_EXPORT int RandRScreen : : currentSize ( ) const
{
return m_currentSize ;
}
K DE_EXPORT int RandRScreen : : proposedRotation ( ) const
T DE_EXPORT int RandRScreen : : proposedRotation ( ) const
{
return m_proposedRotation ;
}
K DE_EXPORT void RandRScreen : : proposeRotation ( int newRotation )
T DE_EXPORT void RandRScreen : : proposeRotation ( int newRotation )
{
m_proposedRotation = newRotation & OrientationMask ;
}
K DE_EXPORT int RandRScreen : : proposedSize ( ) const
T DE_EXPORT int RandRScreen : : proposedSize ( ) const
{
return m_proposedSize ;
}
K DE_EXPORT bool RandRScreen : : proposeSize ( int newSize )
T DE_EXPORT bool RandRScreen : : proposeSize ( int newSize )
{
if ( ( int ) m_pixelSizes . count ( ) > newSize ) {
m_proposedSize = newSize ;
@ -649,7 +649,7 @@ KDE_EXPORT bool RandRScreen::proposeSize(int newSize)
return false ;
}
K DE_EXPORT void RandRScreen : : load ( TDEConfig & config )
T DE_EXPORT void RandRScreen : : load ( TDEConfig & config )
{
config . setGroup ( TQString ( " Screen%1 " ) . arg ( m_screen ) ) ;
@ -659,7 +659,7 @@ KDE_EXPORT void RandRScreen::load(TDEConfig& config)
proposeRotation ( rotationDegreeToIndex ( config . readNumEntry ( " rotation " , 0 ) ) + ( config . readBoolEntry ( " reflectX " ) ? ReflectX : 0 ) + ( config . readBoolEntry ( " reflectY " ) ? ReflectY : 0 ) ) ;
}
K DE_EXPORT void RandRScreen : : save ( TDEConfig & config ) const
T DE_EXPORT void RandRScreen : : save ( TDEConfig & config ) const
{
config . setGroup ( TQString ( " Screen%1 " ) . arg ( m_screen ) ) ;
config . writeEntry ( " width " , currentPixelWidth ( ) ) ;
@ -670,7 +670,7 @@ KDE_EXPORT void RandRScreen::save(TDEConfig& config) const
config . writeEntry ( " reflectY " , ( bool ) ( currentRotation ( ) & ReflectMask ) = = ReflectY ) ;
}
K DE_EXPORT RandRDisplay : : RandRDisplay ( )
T DE_EXPORT RandRDisplay : : RandRDisplay ( )
: m_valid ( true )
{
// Check extension
@ -713,76 +713,76 @@ KDE_EXPORT RandRDisplay::RandRDisplay()
setCurrentScreen ( TQApplication : : desktop ( ) - > primaryScreen ( ) ) ;
}
K DE_EXPORT bool RandRDisplay : : isValid ( ) const
T DE_EXPORT bool RandRDisplay : : isValid ( ) const
{
return m_valid ;
}
K DE_EXPORT const TQString & RandRDisplay : : errorCode ( ) const
T DE_EXPORT const TQString & RandRDisplay : : errorCode ( ) const
{
return m_errorCode ;
}
K DE_EXPORT int RandRDisplay : : eventBase ( ) const
T DE_EXPORT int RandRDisplay : : eventBase ( ) const
{
return m_eventBase ;
}
K DE_EXPORT int RandRDisplay : : screenChangeNotifyEvent ( ) const
T DE_EXPORT int RandRDisplay : : screenChangeNotifyEvent ( ) const
{
return m_eventBase + RRScreenChangeNotify ;
}
K DE_EXPORT int RandRDisplay : : errorBase ( ) const
T DE_EXPORT int RandRDisplay : : errorBase ( ) const
{
return m_errorBase ;
}
K DE_EXPORT const TQString & RandRDisplay : : version ( ) const
T DE_EXPORT const TQString & RandRDisplay : : version ( ) const
{
return m_version ;
}
K DE_EXPORT void RandRDisplay : : setCurrentScreen ( int index )
T DE_EXPORT void RandRDisplay : : setCurrentScreen ( int index )
{
m_currentScreenIndex = index ;
m_currentScreen = m_screens . at ( m_currentScreenIndex ) ;
Q_ASSERT ( m_currentScreen ) ;
}
K DE_EXPORT int RandRDisplay : : screenIndexOfWidget ( TQWidget * widget )
T DE_EXPORT int RandRDisplay : : screenIndexOfWidget ( TQWidget * widget )
{
int ret = TQApplication : : desktop ( ) - > screenNumber ( widget ) ;
return ret ! = - 1 ? ret : TQApplication : : desktop ( ) - > primaryScreen ( ) ;
}
K DE_EXPORT int RandRDisplay : : currentScreenIndex ( ) const
T DE_EXPORT int RandRDisplay : : currentScreenIndex ( ) const
{
return m_currentScreenIndex ;
}
K DE_EXPORT void RandRDisplay : : refresh ( )
T DE_EXPORT void RandRDisplay : : refresh ( )
{
for ( RandRScreen * s = m_screens . first ( ) ; s ; s = m_screens . next ( ) )
s - > loadSettings ( ) ;
}
K DE_EXPORT int RandRDisplay : : numScreens ( ) const
T DE_EXPORT int RandRDisplay : : numScreens ( ) const
{
return m_numScreens ;
}
K DE_EXPORT RandRScreen * RandRDisplay : : screen ( int index )
T DE_EXPORT RandRScreen * RandRDisplay : : screen ( int index )
{
return m_screens . at ( index ) ;
}
K DE_EXPORT RandRScreen * RandRDisplay : : currentScreen ( )
T DE_EXPORT RandRScreen * RandRDisplay : : currentScreen ( )
{
return m_currentScreen ;
}
K DE_EXPORT bool RandRDisplay : : loadDisplay ( TDEConfig & config , bool loadScreens )
T DE_EXPORT bool RandRDisplay : : loadDisplay ( TDEConfig & config , bool loadScreens )
{
if ( loadScreens )
for ( RandRScreen * s = m_screens . first ( ) ; s ; s = m_screens . next ( ) )
@ -791,19 +791,19 @@ KDE_EXPORT bool RandRDisplay::loadDisplay(TDEConfig& config, bool loadScreens)
return applyOnStartup ( config ) ;
}
K DE_EXPORT bool RandRDisplay : : applyOnStartup ( TDEConfig & config )
T DE_EXPORT bool RandRDisplay : : applyOnStartup ( TDEConfig & config )
{
config . setGroup ( " Display " ) ;
return config . readBoolEntry ( " ApplyOnStartup " , false ) ;
}
K DE_EXPORT bool RandRDisplay : : syncTrayApp ( TDEConfig & config )
T DE_EXPORT bool RandRDisplay : : syncTrayApp ( TDEConfig & config )
{
config . setGroup ( " Display " ) ;
return config . readBoolEntry ( " SyncTrayApp " , false ) ;
}
K DE_EXPORT void RandRDisplay : : saveDisplay ( TDEConfig & config , bool applyOnStartup , bool syncTrayApp )
T DE_EXPORT void RandRDisplay : : saveDisplay ( TDEConfig & config , bool applyOnStartup , bool syncTrayApp )
{
Q_ASSERT ( ! config . isReadOnly ( ) ) ;
@ -815,7 +815,7 @@ KDE_EXPORT void RandRDisplay::saveDisplay(TDEConfig& config, bool applyOnStartup
s - > save ( config ) ;
}
K DE_EXPORT void RandRDisplay : : applyProposed ( bool confirm )
T DE_EXPORT void RandRDisplay : : applyProposed ( bool confirm )
{
for ( int screenIndex = 0 ; screenIndex < numScreens ( ) ; screenIndex + + ) {
if ( screen ( screenIndex ) - > proposedChanged ( ) ) {
@ -827,7 +827,7 @@ KDE_EXPORT void RandRDisplay::applyProposed(bool confirm)
}
}
K DE_EXPORT bool RandRDisplay : : showTestConfigurationDialog ( )
T DE_EXPORT bool RandRDisplay : : showTestConfigurationDialog ( )
{
RandRScreen * firstScreen = screen ( 0 ) ;
if ( firstScreen ) {
@ -838,7 +838,7 @@ KDE_EXPORT bool RandRDisplay::showTestConfigurationDialog()
}
}
K DE_EXPORT bool RandRScreen : : showTestConfigurationDialog ( )
T DE_EXPORT bool RandRScreen : : showTestConfigurationDialog ( )
{
// uncomment the line below and edit out the KTimerDialog stuff to get
// a version which works on today's tdelibs (no accept dialog is presented)
@ -872,7 +872,7 @@ KDE_EXPORT bool RandRScreen::showTestConfigurationDialog()
return acceptDialog . exec ( ) ;
}
K DE_EXPORT int RandRScreen : : pixelCount ( int index ) const
T DE_EXPORT int RandRScreen : : pixelCount ( int index ) const
{
TQSize sz = pixelSize ( index ) ;
return sz . width ( ) * sz . height ( ) ;