From 62949e0a61c1340c38a696a7652fde623c36b0ae Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 1 May 2024 21:32:16 +0900 Subject: Replace KDE_[NO_]EXPORT with TDE_[NO_]EXPORT Signed-off-by: Michele Calgaro (cherry picked from commit bba3128085abe1a32cca43d9fb8ac02c2a29bf6b) --- tderandr/randr.cpp | 134 ++++++++++++++++++++++++++--------------------------- 1 file changed, 67 insertions(+), 67 deletions(-) (limited to 'tderandr') diff --git a/tderandr/randr.cpp b/tderandr/randr.cpp index 412e4d195..0a234b518 100644 --- a/tderandr/randr.cpp +++ b/tderandr/randr.cpp @@ -102,7 +102,7 @@ public: XRRScreenConfiguration* config; }; -KDE_EXPORT RandRScreen::RandRScreen(int screenIndex) +TDE_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(); } -KDE_EXPORT RandRScreen::~RandRScreen() +TDE_EXPORT RandRScreen::~RandRScreen() { delete d; } -KDE_EXPORT void RandRScreen::loadSettings() +TDE_EXPORT void RandRScreen::loadSettings() { if (d->config) { XRRFreeScreenConfigInfo(d->config); @@ -176,14 +176,14 @@ KDE_EXPORT void RandRScreen::loadSettings() } } -KDE_EXPORT void RandRScreen::setOriginal() +TDE_EXPORT void RandRScreen::setOriginal() { m_originalSize = m_currentSize; m_originalRotation = m_currentRotation; m_originalRefreshRate = m_currentRefreshRate; } -KDE_EXPORT bool RandRScreen::applyProposed() +TDE_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; } -KDE_EXPORT bool RandRScreen::applyProposedAndConfirm() +TDE_EXPORT bool RandRScreen::applyProposedAndConfirm() { if (proposedChanged()) { setOriginal(); @@ -246,7 +246,7 @@ KDE_EXPORT bool RandRScreen::applyProposedAndConfirm() return true; } -KDE_EXPORT bool RandRScreen::confirm() +TDE_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(); } -KDE_EXPORT void RandRScreen::shownDialogDestroyed() +TDE_EXPORT void RandRScreen::shownDialogDestroyed() { m_shownDialog = NULL; disconnect( kapp->desktop(), TQ_SIGNAL( resized(int)), this, TQ_SLOT( desktopResized())); } -KDE_EXPORT void RandRScreen::desktopResized() +TDE_EXPORT void RandRScreen::desktopResized() { if( m_shownDialog != NULL ) KDialog::centerOnScreen(m_shownDialog, m_screen); } -KDE_EXPORT TQString RandRScreen::changedMessage() const +TDE_EXPORT TQString RandRScreen::changedMessage() const { if (currentRefreshRate() == -1) return i18n("New configuration:\nResolution: %1 x %2\nOrientation: %3") @@ -307,24 +307,24 @@ KDE_EXPORT TQString RandRScreen::changedMessage() const .arg(currentRefreshRateDescription()); } -KDE_EXPORT bool RandRScreen::changedFromOriginal() const +TDE_EXPORT bool RandRScreen::changedFromOriginal() const { return m_currentSize != m_originalSize || m_currentRotation != m_originalRotation || m_currentRefreshRate != m_originalRefreshRate; } -KDE_EXPORT void RandRScreen::proposeOriginal() +TDE_EXPORT void RandRScreen::proposeOriginal() { m_proposedSize = m_originalSize; m_proposedRotation = m_originalRotation; m_proposedRefreshRate = m_originalRefreshRate; } -KDE_EXPORT bool RandRScreen::proposedChanged() const +TDE_EXPORT bool RandRScreen::proposedChanged() const { return m_currentSize != m_proposedSize || m_currentRotation != m_proposedRotation || m_currentRefreshRate != m_proposedRefreshRate; } -KDE_EXPORT TQString RandRScreen::rotationName(int rotation, bool pastTense, bool capitalised) +TDE_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 } } -KDE_EXPORT TQPixmap RandRScreen::rotationIcon(int rotation) const +TDE_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 } } -KDE_EXPORT TQString RandRScreen::currentRotationDescription() const +TDE_EXPORT TQString RandRScreen::currentRotationDescription() const { TQString ret = rotationName(m_currentRotation & RotateMask); @@ -433,7 +433,7 @@ KDE_EXPORT TQString RandRScreen::currentRotationDescription() const return ret; } -KDE_EXPORT int RandRScreen::rotationIndexToDegree(int rotation) const +TDE_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 } } -KDE_EXPORT int RandRScreen::rotationDegreeToIndex(int degree) const +TDE_EXPORT int RandRScreen::rotationDegreeToIndex(int degree) const { switch (degree) { case 90: @@ -467,27 +467,27 @@ KDE_EXPORT int RandRScreen::rotationDegreeToIndex(int degree) const } } -KDE_EXPORT int RandRScreen::currentPixelWidth() const +TDE_EXPORT int RandRScreen::currentPixelWidth() const { return m_pixelSizes[m_currentSize].width(); } -KDE_EXPORT int RandRScreen::currentPixelHeight() const +TDE_EXPORT int RandRScreen::currentPixelHeight() const { return m_pixelSizes[m_currentSize].height(); } -KDE_EXPORT int RandRScreen::currentMMWidth() const +TDE_EXPORT int RandRScreen::currentMMWidth() const { return m_pixelSizes[m_currentSize].width(); } -KDE_EXPORT int RandRScreen::currentMMHeight() const +TDE_EXPORT int RandRScreen::currentMMHeight() const { return m_pixelSizes[m_currentSize].height(); } -KDE_EXPORT TQStringList RandRScreen::refreshRates(int size) const +TDE_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; } -KDE_EXPORT TQString RandRScreen::refreshRateDirectDescription(int rate) const +TDE_EXPORT TQString RandRScreen::refreshRateDirectDescription(int rate) const { return i18n("Refresh rate in Hertz (Hz)", "%1 Hz").arg(rate); } -KDE_EXPORT TQString RandRScreen::refreshRateIndirectDescription(int size, int index) const +TDE_EXPORT TQString RandRScreen::refreshRateIndirectDescription(int size, int index) const { return i18n("Refresh rate in Hertz (Hz)", "%1 Hz").arg(refreshRateIndexToHz(size, index)); } -KDE_EXPORT TQString RandRScreen::refreshRateDescription(int size, int index) const +TDE_EXPORT TQString RandRScreen::refreshRateDescription(int size, int index) const { return refreshRates(size)[index]; } -KDE_EXPORT bool RandRScreen::proposeRefreshRate(int index) +TDE_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; } -KDE_EXPORT int RandRScreen::currentRefreshRate() const +TDE_EXPORT int RandRScreen::currentRefreshRate() const { return m_currentRefreshRate; } -KDE_EXPORT TQString RandRScreen::currentRefreshRateDescription() const +TDE_EXPORT TQString RandRScreen::currentRefreshRateDescription() const { return refreshRateIndirectDescription(m_currentSize, m_currentRefreshRate); } -KDE_EXPORT int RandRScreen::proposedRefreshRate() const +TDE_EXPORT int RandRScreen::proposedRefreshRate() const { return m_proposedRefreshRate; } -KDE_EXPORT int RandRScreen::refreshRateHzToIndex(int size, int hz) const +TDE_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; } -KDE_EXPORT int RandRScreen::refreshRateIndexToHz(int size, int index) const +TDE_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]; } -KDE_EXPORT int RandRScreen::numSizes() const +TDE_EXPORT int RandRScreen::numSizes() const { return m_pixelSizes.count(); } -KDE_EXPORT const TQSize& RandRScreen::pixelSize(int index) const +TDE_EXPORT const TQSize& RandRScreen::pixelSize(int index) const { return m_pixelSizes[index]; } -KDE_EXPORT const TQSize& RandRScreen::mmSize(int index) const +TDE_EXPORT const TQSize& RandRScreen::mmSize(int index) const { return m_mmSizes[index]; } -KDE_EXPORT int RandRScreen::sizeIndex(TQSize pixelSize) const +TDE_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; } -KDE_EXPORT int RandRScreen::rotations() const +TDE_EXPORT int RandRScreen::rotations() const { return m_rotations; } -KDE_EXPORT int RandRScreen::currentRotation() const +TDE_EXPORT int RandRScreen::currentRotation() const { return m_currentRotation; } -KDE_EXPORT int RandRScreen::currentSize() const +TDE_EXPORT int RandRScreen::currentSize() const { return m_currentSize; } -KDE_EXPORT int RandRScreen::proposedRotation() const +TDE_EXPORT int RandRScreen::proposedRotation() const { return m_proposedRotation; } -KDE_EXPORT void RandRScreen::proposeRotation(int newRotation) +TDE_EXPORT void RandRScreen::proposeRotation(int newRotation) { m_proposedRotation = newRotation & OrientationMask; } -KDE_EXPORT int RandRScreen::proposedSize() const +TDE_EXPORT int RandRScreen::proposedSize() const { return m_proposedSize; } -KDE_EXPORT bool RandRScreen::proposeSize(int newSize) +TDE_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; } -KDE_EXPORT void RandRScreen::load(TDEConfig& config) +TDE_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)); } -KDE_EXPORT void RandRScreen::save(TDEConfig& config) const +TDE_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); } -KDE_EXPORT RandRDisplay::RandRDisplay() +TDE_EXPORT RandRDisplay::RandRDisplay() : m_valid(true) { // Check extension @@ -713,76 +713,76 @@ KDE_EXPORT RandRDisplay::RandRDisplay() setCurrentScreen(TQApplication::desktop()->primaryScreen()); } -KDE_EXPORT bool RandRDisplay::isValid() const +TDE_EXPORT bool RandRDisplay::isValid() const { return m_valid; } -KDE_EXPORT const TQString& RandRDisplay::errorCode() const +TDE_EXPORT const TQString& RandRDisplay::errorCode() const { return m_errorCode; } -KDE_EXPORT int RandRDisplay::eventBase() const +TDE_EXPORT int RandRDisplay::eventBase() const { return m_eventBase; } -KDE_EXPORT int RandRDisplay::screenChangeNotifyEvent() const +TDE_EXPORT int RandRDisplay::screenChangeNotifyEvent() const { return m_eventBase + RRScreenChangeNotify; } -KDE_EXPORT int RandRDisplay::errorBase() const +TDE_EXPORT int RandRDisplay::errorBase() const { return m_errorBase; } -KDE_EXPORT const TQString& RandRDisplay::version() const +TDE_EXPORT const TQString& RandRDisplay::version() const { return m_version; } -KDE_EXPORT void RandRDisplay::setCurrentScreen(int index) +TDE_EXPORT void RandRDisplay::setCurrentScreen(int index) { m_currentScreenIndex = index; m_currentScreen = m_screens.at(m_currentScreenIndex); Q_ASSERT(m_currentScreen); } -KDE_EXPORT int RandRDisplay::screenIndexOfWidget(TQWidget* widget) +TDE_EXPORT int RandRDisplay::screenIndexOfWidget(TQWidget* widget) { int ret = TQApplication::desktop()->screenNumber(widget); return ret != -1 ? ret : TQApplication::desktop()->primaryScreen(); } -KDE_EXPORT int RandRDisplay::currentScreenIndex() const +TDE_EXPORT int RandRDisplay::currentScreenIndex() const { return m_currentScreenIndex; } -KDE_EXPORT void RandRDisplay::refresh() +TDE_EXPORT void RandRDisplay::refresh() { for (RandRScreen* s = m_screens.first(); s; s = m_screens.next()) s->loadSettings(); } -KDE_EXPORT int RandRDisplay::numScreens() const +TDE_EXPORT int RandRDisplay::numScreens() const { return m_numScreens; } -KDE_EXPORT RandRScreen* RandRDisplay::screen(int index) +TDE_EXPORT RandRScreen* RandRDisplay::screen(int index) { return m_screens.at(index); } -KDE_EXPORT RandRScreen* RandRDisplay::currentScreen() +TDE_EXPORT RandRScreen* RandRDisplay::currentScreen() { return m_currentScreen; } -KDE_EXPORT bool RandRDisplay::loadDisplay(TDEConfig& config, bool loadScreens) +TDE_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); } -KDE_EXPORT bool RandRDisplay::applyOnStartup(TDEConfig& config) +TDE_EXPORT bool RandRDisplay::applyOnStartup(TDEConfig& config) { config.setGroup("Display"); return config.readBoolEntry("ApplyOnStartup", false); } -KDE_EXPORT bool RandRDisplay::syncTrayApp(TDEConfig& config) +TDE_EXPORT bool RandRDisplay::syncTrayApp(TDEConfig& config) { config.setGroup("Display"); return config.readBoolEntry("SyncTrayApp", false); } -KDE_EXPORT void RandRDisplay::saveDisplay(TDEConfig& config, bool applyOnStartup, bool syncTrayApp) +TDE_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); } -KDE_EXPORT void RandRDisplay::applyProposed(bool confirm) +TDE_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) } } -KDE_EXPORT bool RandRDisplay::showTestConfigurationDialog() +TDE_EXPORT bool RandRDisplay::showTestConfigurationDialog() { RandRScreen* firstScreen = screen(0); if (firstScreen) { @@ -838,7 +838,7 @@ KDE_EXPORT bool RandRDisplay::showTestConfigurationDialog() } } -KDE_EXPORT bool RandRScreen::showTestConfigurationDialog() +TDE_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(); } -KDE_EXPORT int RandRScreen::pixelCount( int index ) const +TDE_EXPORT int RandRScreen::pixelCount( int index ) const { TQSize sz = pixelSize(index); return sz.width() * sz.height(); -- cgit v1.2.1