File: sliderctrl.h

package info (click to toggle)
cutesdr 1.20-4
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 2,848 kB
  • sloc: cpp: 18,902; makefile: 21; sh: 5
file content (48 lines) | stat: -rw-r--r-- 1,304 bytes parent folder | download | duplicates (4)
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
//////////////////////////////////////////////////////////////////////
// sliderctrl.h: interface for the CSliderCtrl class.
//
// History:
//	2010-09-15  Initial creation MSW
//	2011-03-27  Initial release
/////////////////////////////////////////////////////////////////////
#ifndef SLIDERCTRL_H
#define SLIDERCTRL_H

#include <QWidget>
#include "ui_sliderctrl.h"

class CSliderCtrl : public QFrame
{
    Q_OBJECT
public:
	explicit CSliderCtrl(QWidget *parent = 0);
	~CSliderCtrl();
	//map slider functions to control
	void SetValue(int val){ui.horizontalSlider->setValue(val);}
	void setRange(int min, int max){ui.horizontalSlider->setRange(min,max);}
	void setTickInterval(int ti){ui.horizontalSlider->setTickInterval(ti);}
	void setPageStep(int ps){ui.horizontalSlider->setPageStep(ps);}
	void setSingleStep(int ss){ui.horizontalSlider->setSingleStep(ss);}

	void SetName(QString Name){ui.labelName->setText(Name);}
	void SetPrefix(QString Prefix){m_Prefix = Prefix;}
	void SetSuffix(QString Suffix){m_Suffix = Suffix;}

signals:
	void sliderValChanged(int);

public slots:

private slots:
	void valueChanged(int);

protected:

private:
	void DisplayValue(int val);
	Ui::sliderctrl ui;
	QString m_Suffix;
	QString m_Prefix;
};

#endif // SLIDERCTRL_H