File: gammactrl.h

package info (click to toggle)
kgamma 4%3A4.8.4-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 268 kB
  • sloc: cpp: 1,038; makefile: 1; sh: 1
file content (76 lines) | stat: -rw-r--r-- 2,429 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/***************************************************************************
                          gammactrl.h  -  description
                             -------------------
    begin                : Sun Oct 7 2001
    copyright            : (C) 2001 by Michael v.Ostheim
    email                : MvOstheim@web.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 <khbox.h>
#include <qslider.h>

class QString;
class DisplayNumber;
class XVidExtWrap;

class GammaCtrl : public KHBox  {

  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