Set up widgets the UltraScan way. More...
#include "us_widgets_dialog.h"
Public Member Functions | |
US_WidgetsDialog (QWidget *, Qt::WindowFlags) | |
QLabel * | us_label (const QString &, int=0, int=QFont::Bold) |
QLabel * | us_textlabel (const QString &, int=-1, int=QFont::Bold) |
QLabel * | us_banner (const QString &, int=0, int=QFont::Bold) |
QPushButton * | us_pushbutton (const QString &, bool=true, int=0) |
QTextEdit * | us_textedit (void) |
QLineEdit * | us_lineedit (const QString &=0, int=0, bool=false) |
void | us_setReadOnly (QLineEdit *, bool=true) |
void | us_setReadOnly (QTextEdit *, bool=true) |
QListWidget * | us_listwidget (int=0) |
QGridLayout * | us_checkbox (const QString &, QCheckBox *&, bool=false) |
QGridLayout * | us_radiobutton (const QString &text, QRadioButton *&rb, bool state=false) |
QProgressBar * | us_progressBar (int, int, int=0) |
QComboBox * | us_comboBox (void) |
QLCDNumber * | us_lcd (int, int=0) |
QwtCounter * | us_counter (int, double, double, double=0.0) |
QwtPlot * | us_plot (const QString &, const QString &=QString(), const QString &=QString()) |
QwtPlotGrid * | us_grid (QwtPlot *) |
QwtPlotCurve * | us_curve (QwtPlot *, const QString &) |
QwtPlotPicker * | us_picker (QwtPlot *) |
QTabWidget * | us_tabwidget (int=0, int=QFont::Bold) |
Public Attributes | |
US_Global | g |
Connect to global memory and make the values accessible. More... | |
QPalette | vlgray |
Very light gray palette for read-only line edits. More... | |
Set up widgets the UltraScan way.
This class is designed to be the parent class to almost all UltraScan windows. It allows easy creation of widgets and applies the appropriate palette and font acording to the user's settings (or the UltraScan default). Depending on the widget, other parameters may be set.
Definition at line 23 of file us_widgets_dialog.h.
US_WidgetsDialog::US_WidgetsDialog | ( | QWidget * | w, |
Qt::WindowFlags | f | ||
) |
w | - Parent widget, normally not specified |
f | - Window flags, normally not specified |
Definition at line 6 of file us_widgets_dialog.cpp.
QLabel * US_WidgetsDialog::us_banner | ( | const QString & | labelString, |
int | fontAdjust = 0 , |
||
int | weight = QFont::Bold |
||
) |
Same as us_label except:
Definition at line 56 of file us_widgets_dialog.cpp.
QGridLayout * US_WidgetsDialog::us_checkbox | ( | const QString & | text, |
QCheckBox *& | cb, | ||
bool | state = false |
||
) |
text | - Text to set with checkbox |
state | - checked – true or false |
cb | - reference to a pointer of the checkbox
|
Definition at line 167 of file us_widgets_dialog.cpp.
QComboBox * US_WidgetsDialog::us_comboBox | ( | void | ) |
Definition at line 250 of file us_widgets_dialog.cpp.
QwtCounter * US_WidgetsDialog::us_counter | ( | int | buttons, |
double | low, | ||
double | high, | ||
double | value = 0.0 |
||
) |
buttons | - Number of buttons to use ( 1 to 3 ) |
low | - Lower bound of progress |
high | - Upper bound of progress |
value | - Initial value to set
|
Definition at line 278 of file us_widgets_dialog.cpp.
QwtPlotCurve * US_WidgetsDialog::us_curve | ( | QwtPlot * | plot, |
const QString & | title | ||
) |
plot* | - Pointer to plot |
title | - Title of the curve
|
Definition at line 351 of file us_widgets_dialog.cpp.
QwtPlotGrid * US_WidgetsDialog::us_grid | ( | QwtPlot * | plot | ) |
plot* | - Pointer to plot
|
Definition at line 340 of file us_widgets_dialog.cpp.
QLabel * US_WidgetsDialog::us_label | ( | const QString & | labelString, |
int | fontAdjust = 0 , |
||
int | weight = QFont::Bold |
||
) |
labelString | - contents of label |
fontAdjust | - adjustment to default point size |
weight | - QFont::{Light,Normal,DemiBold,Bold,Black}
|
Definition at line 24 of file us_widgets_dialog.cpp.
QLCDNumber * US_WidgetsDialog::us_lcd | ( | int | digits, |
int | value = 0 |
||
) |
Create an LCD style disply
digits | - Number of digits to display |
value | - Initial value to set
|
Definition at line 263 of file us_widgets_dialog.cpp.
QLineEdit * US_WidgetsDialog::us_lineedit | ( | const QString & | text = 0 , |
int | fontAdjust = 0 , |
||
bool | readonly = false |
||
) |
text | - starting text in line edit box |
fontAdjust | - adjustment to default point size |
readonly | - ReadOnly flag, default uses editColor() |
Definition at line 106 of file us_widgets_dialog.cpp.
QListWidget * US_WidgetsDialog::us_listwidget | ( | int | fontAdjust = 0 | ) |
fontAdjust | - adjustment to default font size
|
Definition at line 154 of file us_widgets_dialog.cpp.
QwtPlotPicker * US_WidgetsDialog::us_picker | ( | QwtPlot * | plot | ) |
plot* | - Pointer to plot
|
Definition at line 362 of file us_widgets_dialog.cpp.
QwtPlot * US_WidgetsDialog::us_plot | ( | const QString & | title, |
const QString & | x_axis = QString() , |
||
const QString & | y_axis = QString() |
||
) |
title | - Plot Title |
x_axis | - Bottom Axis Title |
y_axis | - Left Axis Title
|
Definition at line 322 of file us_widgets_dialog.cpp.
QProgressBar * US_WidgetsDialog::us_progressBar | ( | int | low, |
int | high, | ||
int | value = 0 |
||
) |
low | - Lower bound of progress |
high | - Upper bound of progress |
value | - Initial value between low and high
|
Definition at line 231 of file us_widgets_dialog.cpp.
QPushButton * US_WidgetsDialog::us_pushbutton | ( | const QString & | labelString, |
bool | enabled = true , |
||
int | fontAdjust = 0 |
||
) |
labelString | - text in pushbutton |
enabled | |
fontAdjust | - adjustment to default font size
|
Definition at line 72 of file us_widgets_dialog.cpp.
QGridLayout * US_WidgetsDialog::us_radiobutton | ( | const QString & | text, |
QRadioButton *& | rb, | ||
bool | state = false |
||
) |
Create a radiobutton with a specifice palette (normal) and indentation of the button
text | - Text to set with radiobutton |
rb | - pointer to the radio button |
state | - Checked ( true or false )
|
Definition at line 199 of file us_widgets_dialog.cpp.
void US_WidgetsDialog::us_setReadOnly | ( | QLineEdit * | le, |
bool | readonly = true |
||
) |
le | - line edit for which to reset ReadOnly flag/color |
readonly | - ReadOnly flag, default uses vlgray |
Definition at line 124 of file us_widgets_dialog.cpp.
void US_WidgetsDialog::us_setReadOnly | ( | QTextEdit * | te, |
bool | readonly = true |
||
) |
te | - text edit for which to reset ReadOnly flag/color |
readonly | - ReadOnly flag, default uses vlgray |
Definition at line 139 of file us_widgets_dialog.cpp.
QTabWidget * US_WidgetsDialog::us_tabwidget | ( | int | fontAdjust = 0 , |
int | weight = QFont::Bold |
||
) |
fontAdjust | - adjustment to default font size |
weight | - QFont::{Light,Normal,DemiBold,Bold,Black}
|
Definition at line 379 of file us_widgets_dialog.cpp.
QTextEdit * US_WidgetsDialog::us_textedit | ( | void | ) |
Definition at line 89 of file us_widgets_dialog.cpp.
QLabel * US_WidgetsDialog::us_textlabel | ( | const QString & | labelString, |
int | fontAdjust = -1 , |
||
int | weight = QFont::Bold |
||
) |
Same as us_label except:
Definition at line 45 of file us_widgets_dialog.cpp.
US_Global US_WidgetsDialog::g |
Connect to global memory and make the values accessible.
Definition at line 31 of file us_widgets_dialog.h.
QPalette US_WidgetsDialog::vlgray |
Very light gray palette for read-only line edits.
Definition at line 34 of file us_widgets_dialog.h.