summaryrefslogtreecommitdiffstats
path: root/kgamma/kcmkgamma
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /kgamma/kcmkgamma
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz
tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kgamma/kcmkgamma')
-rw-r--r--kgamma/kcmkgamma/displaynumber.cpp10
-rw-r--r--kgamma/kcmkgamma/displaynumber.h3
-rw-r--r--kgamma/kcmkgamma/gammactrl.cpp6
-rw-r--r--kgamma/kcmkgamma/gammactrl.h3
-rw-r--r--kgamma/kcmkgamma/kgamma.cpp34
-rw-r--r--kgamma/kcmkgamma/kgamma.h3
6 files changed, 31 insertions, 28 deletions
diff --git a/kgamma/kcmkgamma/displaynumber.cpp b/kgamma/kcmkgamma/displaynumber.cpp
index b3486e38..1bc0473b 100644
--- a/kgamma/kcmkgamma/displaynumber.cpp
+++ b/kgamma/kcmkgamma/displaynumber.cpp
@@ -20,16 +20,16 @@
#include "displaynumber.h"
-DisplayNumber::DisplayNumber(TQWidget *parent, int digits, \
- int prec, const char *name) : TQLabel(parent,name) {
+DisplayNumber::DisplayNumber(TQWidget *tqparent, int digits, \
+ int prec, const char *name) : TQLabel(tqparent,name) {
setPrecision(prec);
setWidth(digits);
setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
- setBackgroundMode(Qt::PaletteBase);
- setAlignment(Qt::AlignCenter);
- setFocusPolicy(NoFocus);
+ setBackgroundMode(TQt::PaletteBase);
+ tqsetAlignment(TQt::AlignCenter);
+ setFocusPolicy(TQ_NoFocus);
}
DisplayNumber::~DisplayNumber(){
diff --git a/kgamma/kcmkgamma/displaynumber.h b/kgamma/kcmkgamma/displaynumber.h
index d5662fae..19e41de6 100644
--- a/kgamma/kcmkgamma/displaynumber.h
+++ b/kgamma/kcmkgamma/displaynumber.h
@@ -26,8 +26,9 @@
class DisplayNumber : public TQLabel {
Q_OBJECT
+ TQ_OBJECT
public:
- DisplayNumber(TQWidget *parent=0, int digits=0, int prec=0, const char *name=0);
+ DisplayNumber(TQWidget *tqparent=0, int digits=0, int prec=0, const char *name=0);
~DisplayNumber();
void setFont( const TQFont & f );
void setNum(double num);
diff --git a/kgamma/kcmkgamma/gammactrl.cpp b/kgamma/kcmkgamma/gammactrl.cpp
index 3871a18d..efedeefa 100644
--- a/kgamma/kcmkgamma/gammactrl.cpp
+++ b/kgamma/kcmkgamma/gammactrl.cpp
@@ -26,9 +26,9 @@
#include "displaynumber.h"
#include "gammactrl.moc"
-GammaCtrl::GammaCtrl(TQWidget *parent, XVidExtWrap *xvid, int channel, \
+GammaCtrl::GammaCtrl(TQWidget *tqparent, XVidExtWrap *xvid, int channel, \
const TQString& mingamma, const TQString& maxgamma, const TQString& setgamma, \
- const char *name) : TQHBox(parent, name)
+ const char *name) : TQHBox(tqparent, name)
{
int maxslider = (int)( ( maxgamma.toDouble() - mingamma.toDouble() \
+ 0.0005 ) * 20 );
@@ -47,7 +47,7 @@ GammaCtrl::GammaCtrl(TQWidget *parent, XVidExtWrap *xvid, int channel, \
setSpacing(KDialog::spacingHint());
- slider = new TQSlider(Horizontal, this);
+ slider = new TQSlider(Qt::Horizontal, this);
slider->setFixedHeight(24);
slider->setTickmarks(TQSlider::Below);
slider->setRange(0, maxslider);
diff --git a/kgamma/kcmkgamma/gammactrl.h b/kgamma/kcmkgamma/gammactrl.h
index 97a1ab9e..75dfa775 100644
--- a/kgamma/kcmkgamma/gammactrl.h
+++ b/kgamma/kcmkgamma/gammactrl.h
@@ -31,9 +31,10 @@ class XVidExtWrap;
class GammaCtrl : public TQHBox {
Q_OBJECT
+ TQ_OBJECT
public:
/** construktor */
- GammaCtrl(TQWidget *parent=0, XVidExtWrap *xvid=0, int channel=0, \
+ GammaCtrl(TQWidget *tqparent=0, XVidExtWrap *xvid=0, int channel=0, \
const TQString& mingamma="0.40", const TQString& maxgamma="3.50", \
const TQString& setgamma="1.00", const char *name=0 );
/** destruktor */
diff --git a/kgamma/kcmkgamma/kgamma.cpp b/kgamma/kcmkgamma/kgamma.cpp
index ebcfb737..961a617e 100644
--- a/kgamma/kcmkgamma/kgamma.cpp
+++ b/kgamma/kcmkgamma/kgamma.cpp
@@ -55,8 +55,8 @@ extern "C"
}
}
-KGamma::KGamma(TQWidget *parent, const char *name, const TQStringList&)
- :KCModule(parent,name)
+KGamma::KGamma(TQWidget *tqparent, const char *name, const TQStringList&)
+ :KCModule(tqparent,name)
{
bool ok;
GammaCorrection = true;
@@ -157,37 +157,37 @@ void KGamma::setupUI() {
pic1->setMinimumSize(530, 171);
pic1->setBackgroundPixmap(background);
pic1->setPixmap(TQPixmap(locate("data", "kgamma/pics/greyscale.png")));
- pic1->setAlignment(AlignCenter);
+ pic1->tqsetAlignment(AlignCenter);
stack->addWidget( pic1, 0 );
TQLabel *pic2 = new TQLabel(stack);
pic2->setBackgroundPixmap(background);
pic2->setPixmap(TQPixmap(locate("data", "kgamma/pics/rgbscale.png")));
- pic2->setAlignment(AlignCenter);
+ pic2->tqsetAlignment(AlignCenter);
stack->addWidget( pic2, 1 );
TQLabel *pic3 = new TQLabel(stack);
pic3->setBackgroundPixmap(background);
pic3->setPixmap(TQPixmap(locate("data", "kgamma/pics/cmyscale.png")));
- pic3->setAlignment(AlignCenter);
+ pic3->tqsetAlignment(AlignCenter);
stack->addWidget( pic3, 2 );
TQLabel *pic4 = new TQLabel(stack);
pic4->setBackgroundPixmap(background);
pic4->setPixmap(TQPixmap(locate("data", "kgamma/pics/darkgrey.png")));
- pic4->setAlignment(AlignCenter);
+ pic4->tqsetAlignment(AlignCenter);
stack->addWidget( pic4, 3 );
TQLabel *pic5 = new TQLabel(stack);
pic5->setBackgroundPixmap(background);
pic5->setPixmap(TQPixmap(locate("data", "kgamma/pics/midgrey.png")));
- pic5->setAlignment(AlignCenter);
+ pic5->tqsetAlignment(AlignCenter);
stack->addWidget( pic5, 4 );
TQLabel *pic6 = new TQLabel(stack);
pic6->setBackgroundPixmap(background);
pic6->setPixmap(TQPixmap(locate("data", "kgamma/pics/lightgrey.png")));
- pic6->setAlignment(AlignCenter);
+ pic6->tqsetAlignment(AlignCenter);
stack->addWidget( pic6, 5 );
topLayout->addWidget(stack, 10);
@@ -241,10 +241,10 @@ void KGamma::setupUI() {
grid->setSpacing(8);
grid->addMultiCellWidget(frame1, 0, 2, 0, 3);
grid->addMultiCellWidget(frame2, 4, 8, 0, 3);
- grid->addWidget(gammalabel, 1, 1, Qt::AlignRight);
- grid->addWidget(redlabel, 5, 1, Qt::AlignRight);
- grid->addWidget(greenlabel, 6, 1, Qt::AlignRight);
- grid->addWidget(bluelabel, 7, 1, Qt::AlignRight);
+ grid->addWidget(gammalabel, 1, 1, TQt::AlignRight);
+ grid->addWidget(redlabel, 5, 1, TQt::AlignRight);
+ grid->addWidget(greenlabel, 6, 1, TQt::AlignRight);
+ grid->addWidget(bluelabel, 7, 1, TQt::AlignRight);
grid->addWidget(gctrl, 1, 2);
grid->addWidget(rgctrl, 5, 2);
grid->addWidget(ggctrl, 6, 2);
@@ -264,7 +264,7 @@ void KGamma::setupUI() {
screenselect = new TQComboBox( options );
for ( int i = 0; i < ScreenCount; i++ )
- screenselect->insertItem( i18n("Screen %1").arg(i+1) );
+ screenselect->insertItem( i18n("Screen %1").tqarg(i+1) );
screenselect->setCurrentItem(currentScreen);
connect(screenselect, TQT_SIGNAL(activated(int)), TQT_SLOT(changeScreen(int)));
@@ -279,7 +279,7 @@ void KGamma::setupUI() {
TQLabel *error = new TQLabel(this);
error->setText(i18n("Gamma correction is not supported by your"
" graphics hardware or driver."));
- error->setAlignment(AlignCenter);
+ error->tqsetAlignment(AlignCenter);
topLayout->addWidget(error);
}
}
@@ -351,7 +351,7 @@ void KGamma::save() {
if ( !xf86cfgbox->isChecked() ) { //write gamma settings to the users config
for (int i = 0; i < ScreenCount; i++) {
- config->setGroup( TQString("Screen %1").arg(i) );
+ config->setGroup( TQString("Screen %1").tqarg(i) );
config->writeEntry("rgamma", rgamma[i]);
config->writeEntry("ggamma", ggamma[i]);
config->writeEntry("bgamma", bgamma[i]);
@@ -405,7 +405,7 @@ bool KGamma::loadUserSettings() {
KConfig *config = new KConfig("kgammarc");
for (int i = 0; i < ScreenCount; i++) {
- config->setGroup(TQString( "Screen %1" ).arg(i) );
+ config->setGroup(TQString( "Screen %1" ).tqarg(i) );
rgamma[i] = config->readEntry("rgamma");
ggamma[i] = config->readEntry("ggamma");
bgamma[i] = config->readEntry("bgamma");
@@ -610,7 +610,7 @@ extern "C"
for (int i = 0; i < xv._ScreenCount(); i++) {
xv.setScreen(i);
- config->setGroup( TQString("Screen %1").arg(i) );
+ config->setGroup( TQString("Screen %1").tqarg(i) );
if ((rgamma = config->readEntry("rgamma").toFloat()))
xv.setGamma(XVidExtWrap::Red, rgamma);
diff --git a/kgamma/kcmkgamma/kgamma.h b/kgamma/kcmkgamma/kgamma.h
index 9af24905..51175ecd 100644
--- a/kgamma/kcmkgamma/kgamma.h
+++ b/kgamma/kcmkgamma/kgamma.h
@@ -28,8 +28,9 @@ class KProcess;
class KGamma: public KCModule
{
Q_OBJECT
+ TQ_OBJECT
public:
- KGamma(TQWidget *parent, const char *name, const TQStringList&);
+ KGamma(TQWidget *tqparent, const char *name, const TQStringList&);
virtual ~KGamma();
void load();