summaryrefslogtreecommitdiffstats
path: root/krandr
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-02 02:14:46 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-02 02:14:46 -0600
commit90a4df90811f0f978ae768939d8567f737e4c553 (patch)
tree057a536138b44495fc3aa26050c159fc6d3ef2ae /krandr
parent4fb897b216c41c13f128c71bcc66f60e2dc601c4 (diff)
downloadtdelibs-90a4df90811f0f978ae768939d8567f737e4c553.tar.gz
tdelibs-90a4df90811f0f978ae768939d8567f737e4c553.zip
Rename additional global functions and variables for tqt3
Diffstat (limited to 'krandr')
-rw-r--r--krandr/libkrandr.cc18
-rw-r--r--krandr/randr.cpp32
2 files changed, 25 insertions, 25 deletions
diff --git a/krandr/libkrandr.cc b/krandr/libkrandr.cc
index b4f21e5fe..633411041 100644
--- a/krandr/libkrandr.cc
+++ b/krandr/libkrandr.cc
@@ -138,7 +138,7 @@ TQString KRandrSimpleAPI::applyIccFile(TQString screenName, TQString fileName) {
if (isValid() == true) {
screenNumber = -1;
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
if (randr_screen_info == NULL) {
return "";
@@ -203,7 +203,7 @@ TQString KRandrSimpleAPI::applyIccFile(TQString screenName, TQString fileName) {
if (isValid() == true) {
screenNumber = -1;
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
if (randr_screen_info == NULL) {
return "";
@@ -272,7 +272,7 @@ TQString KRandrSimpleAPI::applyIccConfiguration(TQString profileName, TQString k
// Find all screens
if (isValid() == true) {
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
if (randr_screen_info == NULL) {
return "";
@@ -597,7 +597,7 @@ bool KRandrSimpleAPI::applySystemwideDisplayConfiguration(TQPtrList<SingleScreen
TQString command;
command = "xrandr";
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
for (i = 0; i < screenInfoArray.count(); i++) {
screendata = screenInfoArray.at(i);
@@ -658,7 +658,7 @@ bool KRandrSimpleAPI::applySystemwideDisplayConfiguration(TQPtrList<SingleScreen
}
}
#else
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
// Turn off all displays
for (i = 0; i < screenInfoArray.count(); i++) {
@@ -899,7 +899,7 @@ void KRandrSimpleAPI::applySystemwideDisplayGamma(TQPtrList<SingleScreenData> sc
SingleScreenData *screendata;
if (isValid() == true) {
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
for (i = 0; i < screenInfoArray.count(); i++) {
screendata = screenInfoArray.at(i);
@@ -951,7 +951,7 @@ void KRandrSimpleAPI::applySystemwideDisplayDPMS(TQPtrList<SingleScreenData> scr
SingleScreenData *screendata;
if (isValid() == true) {
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
for (i = 0; i < screenInfoArray.count(); i++) {
screendata = screenInfoArray.at(i);
@@ -1006,7 +1006,7 @@ TQPtrList<SingleScreenData> KRandrSimpleAPI::readCurrentDisplayConfiguration() {
int numberOfScreens = 0;
if (isValid() == true) {
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
for (i = 0; i < randr_screen_info->n_output; i++) {
output_info = randr_screen_info->outputs[i]->info;
@@ -1129,7 +1129,7 @@ TQPtrList<SingleScreenData> KRandrSimpleAPI::readCurrentDisplayConfiguration() {
screendata->supports_transformations = (cur_screen->rotations() != RandRScreen::Rotate0);
// Determine if this display is primary and/or extended
- RROutput primaryoutput = XRRGetOutputPrimary(qt_xdisplay(), DefaultRootWindow(qt_xdisplay()));
+ RROutput primaryoutput = XRRGetOutputPrimary(tqt_xdisplay(), DefaultRootWindow(tqt_xdisplay()));
if (primaryoutput == randr_screen_info->outputs[i]->id)
screendata->is_primary = false;
else
diff --git a/krandr/randr.cpp b/krandr/randr.cpp
index eb71a818a..3a8e77169 100644
--- a/krandr/randr.cpp
+++ b/krandr/randr.cpp
@@ -72,7 +72,7 @@ KDE_EXPORT void RandRScreen::loadSettings()
if (d->config)
XRRFreeScreenConfigInfo(d->config);
- d->config = XRRGetScreenInfo(qt_xdisplay(), RootWindow(qt_xdisplay(), m_screen));
+ d->config = XRRGetScreenInfo(tqt_xdisplay(), RootWindow(tqt_xdisplay(), m_screen));
Rotation rotation;
if (d->config) {
@@ -89,17 +89,17 @@ KDE_EXPORT void RandRScreen::loadSettings()
if (d->config) {
int numSizes;
- XRRScreenSize* sizes = XRRSizes(qt_xdisplay(), m_screen, &numSizes);
+ XRRScreenSize* sizes = XRRSizes(tqt_xdisplay(), m_screen, &numSizes);
for (int i = 0; i < numSizes; i++) {
m_pixelSizes.append(TQSize(sizes[i].width, sizes[i].height));
m_mmSizes.append(TQSize(sizes[i].mwidth, sizes[i].mheight));
}
- m_rotations = XRRRotations(qt_xdisplay(), m_screen, &rotation);
+ m_rotations = XRRRotations(tqt_xdisplay(), m_screen, &rotation);
}
else {
// Great, now we have to go after the information manually. Ughh.
- ScreenInfo *screeninfo = internal_read_screen_info(qt_xdisplay());
+ ScreenInfo *screeninfo = internal_read_screen_info(tqt_xdisplay());
XRROutputInfo *output_info = screeninfo->outputs[m_screen]->info;
CrtcInfo *current_crtc = screeninfo->outputs[m_screen]->cur_crtc;
int numSizes = screeninfo->res->nmode;
@@ -138,24 +138,24 @@ KDE_EXPORT bool RandRScreen::applyProposed()
Status status;
if (!d->config) {
- d->config = XRRGetScreenInfo(qt_xdisplay(), RootWindow(qt_xdisplay(), m_screen));
+ d->config = XRRGetScreenInfo(tqt_xdisplay(), RootWindow(tqt_xdisplay(), m_screen));
Q_ASSERT(d->config);
}
if (d->config) {
if (proposedRefreshRate() < 0)
- status = XRRSetScreenConfig(qt_xdisplay(), d->config, DefaultRootWindow(qt_xdisplay()), (SizeID)proposedSize(), (Rotation)proposedRotation(), CurrentTime);
+ status = XRRSetScreenConfig(tqt_xdisplay(), d->config, DefaultRootWindow(tqt_xdisplay()), (SizeID)proposedSize(), (Rotation)proposedRotation(), CurrentTime);
else {
if( refreshRateIndexToHz(proposedSize(), proposedRefreshRate()) <= 0 ) {
m_proposedRefreshRate = 0;
}
- status = XRRSetScreenConfigAndRate(qt_xdisplay(), d->config, DefaultRootWindow(qt_xdisplay()), (SizeID)proposedSize(), (Rotation)proposedRotation(), refreshRateIndexToHz(proposedSize(), proposedRefreshRate()), CurrentTime);
+ status = XRRSetScreenConfigAndRate(tqt_xdisplay(), d->config, DefaultRootWindow(tqt_xdisplay()), (SizeID)proposedSize(), (Rotation)proposedRotation(), refreshRateIndexToHz(proposedSize(), proposedRefreshRate()), CurrentTime);
}
}
else {
// Great, now we have to set the information manually. Ughh.
// FIXME--this does not work!
- ScreenInfo *screeninfo = internal_read_screen_info(qt_xdisplay());
+ ScreenInfo *screeninfo = internal_read_screen_info(tqt_xdisplay());
screeninfo->cur_width = (*m_pixelSizes.at(proposedSize())).width();
screeninfo->cur_height = (*m_pixelSizes.at(proposedSize())).height();
internal_main_low_apply(screeninfo);
@@ -441,14 +441,14 @@ KDE_EXPORT TQStringList RandRScreen::refreshRates(int size) const
TQStringList ret;
if (d->config) {
- short* rates = XRRRates(qt_xdisplay(), m_screen, (SizeID)size, &nrates);
+ short* rates = XRRRates(tqt_xdisplay(), m_screen, (SizeID)size, &nrates);
for (int i = 0; i < nrates; i++)
ret << refreshRateDirectDescription(rates[i]);
}
else {
// Great, now we have to go after the information manually. Ughh.
- ScreenInfo *screeninfo = internal_read_screen_info(qt_xdisplay());
+ ScreenInfo *screeninfo = internal_read_screen_info(tqt_xdisplay());
int numSizes = screeninfo->res->nmode;
for (int i = 0; i < numSizes; i++) {
int refresh_rate = ((screeninfo->res->modes[i].dotClock*1.0)/((screeninfo->res->modes[i].hTotal)*(screeninfo->res->modes[i].vTotal)*1.0));
@@ -505,7 +505,7 @@ KDE_EXPORT int RandRScreen::proposedRefreshRate() const
KDE_EXPORT int RandRScreen::refreshRateHzToIndex(int size, int hz) const
{
int nrates;
- short* rates = XRRRates(qt_xdisplay(), m_screen, (SizeID)size, &nrates);
+ short* rates = XRRRates(tqt_xdisplay(), m_screen, (SizeID)size, &nrates);
for (int i = 0; i < nrates; i++)
if (hz == rates[i])
@@ -521,7 +521,7 @@ KDE_EXPORT int RandRScreen::refreshRateHzToIndex(int size, int hz) const
KDE_EXPORT int RandRScreen::refreshRateIndexToHz(int size, int index) const
{
int nrates;
- short* rates = XRRRates(qt_xdisplay(), m_screen, (SizeID)size, &nrates);
+ short* rates = XRRRates(tqt_xdisplay(), m_screen, (SizeID)size, &nrates);
if (nrates == 0 || index < 0)
return 0;
@@ -622,7 +622,7 @@ KDE_EXPORT RandRDisplay::RandRDisplay()
: m_valid(true)
{
// Check extension
- Status s = XRRQueryExtension(qt_xdisplay(), &m_eventBase, &m_errorBase);
+ Status s = XRRQueryExtension(tqt_xdisplay(), &m_eventBase, &m_errorBase);
if (!s) {
m_errorCode = TQString("%1, base %1").arg(s).arg(m_errorBase);
m_valid = false;
@@ -644,14 +644,14 @@ KDE_EXPORT RandRDisplay::RandRDisplay()
}
int major_version, minor_version;
- XRRQueryVersion(qt_xdisplay(), &major_version, &minor_version);
+ XRRQueryVersion(tqt_xdisplay(), &major_version, &minor_version);
m_version = TQString("X Resize and Rotate extension version %1.%1").arg(major_version).arg(minor_version);
- m_numScreens = ScreenCount(qt_xdisplay());
+ m_numScreens = ScreenCount(tqt_xdisplay());
// This assumption is WRONG with Xinerama
- // Q_ASSERT(TQApplication::desktop()->numScreens() == ScreenCount(qt_xdisplay()));
+ // Q_ASSERT(TQApplication::desktop()->numScreens() == ScreenCount(tqt_xdisplay()));
m_screens.setAutoDelete(true);
for (int i = 0; i < m_numScreens; i++) {