diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 47d455dd55be855e4cc691c32f687f723d9247ee (patch) | |
tree | 52e236aaa2576bdb3840ebede26619692fed6d7d /kgamma/kcmkgamma/gammactrl.h | |
download | tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kgamma/kcmkgamma/gammactrl.h')
-rw-r--r-- | kgamma/kcmkgamma/gammactrl.h | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/kgamma/kcmkgamma/gammactrl.h b/kgamma/kcmkgamma/gammactrl.h new file mode 100644 index 00000000..0d6ea890 --- /dev/null +++ b/kgamma/kcmkgamma/gammactrl.h @@ -0,0 +1,76 @@ +/*************************************************************************** + gammactrl.h - description + ------------------- + begin : Sun Oct 7 2001 + copyright : (C) 2001 by Michael v.Ostheim + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +/**A horizontal slider and a text field for the gamma value. + *@author Michael v.Ostheim + */ + +#ifndef GAMMACTRL_H +#define GAMMACTRL_H + +#include <qhbox.h> +#include <qslider.h> + +class QString; +class DisplayNumber; +class XVidExtWrap; + +class GammaCtrl : public QHBox { + + Q_OBJECT + public: + /** construktor */ + GammaCtrl(QWidget *parent=0, XVidExtWrap *xvid=0, int channel=0, \ + const QString& mingamma="0.40", const QString& maxgamma="3.50", \ + const QString& setgamma="1.00", const char *name=0 ); + /** destruktor */ + ~GammaCtrl(); + /** Return the current gamma value with precision prec */ + QString gamma(int); + /** Set gamma, slider and textfield */ + void setGamma(const QString&); + /** Set slider and textfield */ + void setControl(const QString&); + /** Disable the slider */ + void disableSlider() { slider->setDisabled(true);}; + + private: + QString mgamma; + QSlider *slider; + DisplayNumber *textfield; + bool suspended, changed; + int gchannel, oldpos; + double ming; + XVidExtWrap *xv; + + public slots: + /** Disable textfield */ + void suspend(); + + protected slots: + /** Set slider and textfield */ + void setCtrl(int); + /** Set gamma and textfield */ + void setGamma(int); + /** Change status of GammaCtrl when pressed */ + void pressed(); + + signals: + /** Gamma change signal */ + void gammaChanged(int); +}; + +#endif |