UltraScan III
List of all members | Public Types | Signals | Public Member Functions | Public Attributes | Private Slots | Private Member Functions | Private Attributes
US_Editor Class Reference

Class for text edit/display. More...

#include "us_editor.h"

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

Public Types

enum  { LOAD, DEFAULT }
 

Signals

void US_EditorLoadComplete (QString)
 Signal that file load is complete (passes name of file loaded). More...
 

Public Member Functions

 US_Editor (int, bool=false, const QString &="Data Files (*.dat)", QWidget *=0, Qt::WindowFlags=0)
 Text editor main window. More...
 

Public Attributes

QTextEdit * e
 class's text editor component More...
 

Private Slots

void load (void)
 
void save (void)
 
void saveAs (void)
 
void print (void)
 
void clear (void)
 
void update_font (void)
 

Private Member Functions

void saveFile (void)
 

Private Attributes

QFont currentFont
 
QString filename
 
QString file_extension
 
QString file_directory
 
QMenuBar * edMenuBar
 

Detailed Description

Class for text edit/display.

Class for edit and/or display of text in a main window. The text may be editable or read-only. The window may be flagged to have text file load and save menu items (and actions) or not. If text files may be loaded, a file extension for the open file dialog may be specified.

Definition at line 13 of file us_editor.h.

Member Enumeration Documentation

anonymous enum
Enumerator
LOAD 
DEFAULT 

Definition at line 28 of file us_editor.h.

Constructor & Destructor Documentation

US_Editor::US_Editor ( int  menu,
bool  readonly = false,
const QString &  extension = "Data Files (*.dat)",
QWidget *  parent = 0,
Qt::WindowFlags  flags = 0 
)

Text editor main window.

Parameters
menuMenu types flag (LOAD for load,save actions added).
readonlyFlag if read-only or not.
extensionFile extension for open file dialog.
parentParent widget.
flagsStandard main window flags.

Definition at line 5 of file us_editor.cpp.

Member Function Documentation

void US_Editor::clear ( void  )
inlineprivateslot

Definition at line 51 of file us_editor.h.

void US_Editor::load ( void  )
privateslot

Definition at line 97 of file us_editor.cpp.

void US_Editor::print ( void  )
privateslot

Definition at line 182 of file us_editor.cpp.

void US_Editor::save ( void  )
privateslot

Definition at line 130 of file us_editor.cpp.

void US_Editor::saveAs ( void  )
privateslot

Definition at line 138 of file us_editor.cpp.

void US_Editor::saveFile ( void  )
private

Definition at line 151 of file us_editor.cpp.

void US_Editor::update_font ( void  )
privateslot

Definition at line 170 of file us_editor.cpp.

void US_Editor::US_EditorLoadComplete ( QString  )
signal

Signal that file load is complete (passes name of file loaded).

Member Data Documentation

QFont US_Editor::currentFont
private

Definition at line 38 of file us_editor.h.

QTextEdit* US_Editor::e

class's text editor component

Definition at line 30 of file us_editor.h.

QMenuBar* US_Editor::edMenuBar
private

Definition at line 42 of file us_editor.h.

QString US_Editor::file_directory
private

Definition at line 41 of file us_editor.h.

QString US_Editor::file_extension
private

Definition at line 40 of file us_editor.h.

QString US_Editor::filename
private

Definition at line 39 of file us_editor.h.


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