UltraScan III
List of all members | Public Member Functions | Private Slots | Private Attributes
US_LongMessageBox Class Reference

Simple QMessageBox-like dialog for long messages. More...

#include "us_long_messagebox.h"

Inheritance diagram for US_LongMessageBox:
Inheritance graph
[legend]
Collaboration diagram for US_LongMessageBox:
Collaboration graph
[legend]

Public Member Functions

 US_LongMessageBox (const QString &, const QString &, QWidget *=0, Qt::WindowFlags=0)
 Constructor with title and message text. More...
 
void setTitle (const QString &)
 Set or Reset the dialog title. More...
 
void setText (const QString &)
 Set or Reset the dialog message text (plain) More...
 
void setHtml (const QString &)
 Set or Reset the dialog message text (rich) More...
 
void adjustSize ()
 Adjust the dialog size (after changing fonts, for example) More...
 
- Public Member Functions inherited from US_WidgetsDialog
 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)
 

Private Slots

void close_diag ()
 

Private Attributes

QTextEdit * textbox
 

Additional Inherited Members

- Public Attributes inherited from US_WidgetsDialog
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...
 

Detailed Description

Simple QMessageBox-like dialog for long messages.

This class performs the same function as QMessageBox by displaying a message in a dialog with only the text and an "OK" button. Unlike QMessageBox in Qt4, this dialog can be resized to fit its text. It actually adjusts its size, both at construction or when new text is loaded. There is also a public adjustSize() method which can be used if the font is changed.

Definition at line 16 of file us_long_messagebox.h.

Constructor & Destructor Documentation

US_LongMessageBox::US_LongMessageBox ( const QString &  title,
const QString &  message,
QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)

Constructor with title and message text.

Parameters
titleDialog title string
messageDialog text to display
parentParent widget
fWindow flags

Definition at line 8 of file us_long_messagebox.cpp.

Member Function Documentation

void US_LongMessageBox::adjustSize ( )

Adjust the dialog size (after changing fonts, for example)

Definition at line 70 of file us_long_messagebox.cpp.

void US_LongMessageBox::close_diag ( void  )
privateslot

Definition at line 64 of file us_long_messagebox.cpp.

void US_LongMessageBox::setHtml ( const QString &  message)

Set or Reset the dialog message text (rich)

Parameters
messageDialog message string

Definition at line 56 of file us_long_messagebox.cpp.

void US_LongMessageBox::setText ( const QString &  message)

Set or Reset the dialog message text (plain)

Parameters
messageDialog message string

Definition at line 49 of file us_long_messagebox.cpp.

void US_LongMessageBox::setTitle ( const QString &  title)

Set or Reset the dialog title.

Parameters
titleDialog title string

Definition at line 43 of file us_long_messagebox.cpp.

Member Data Documentation

QTextEdit* US_LongMessageBox::textbox
private

Definition at line 45 of file us_long_messagebox.h.


The documentation for this class was generated from the following files: