Public Types | Public Slots | Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
snMainWindow Class Reference

Class for the main window widget. More...

#include <snMainWindow.h>

Inheritance diagram for snMainWindow:

Public Types

enum  SimStatusType { NoConfig, Ready, Running, Stopped }
 Defines the status of the current simulation. After configuration file was loaded: NoConfig -> Ready After start button was pressed: Ready -> Running After stop button was pressed or simulation finished: Running -> Stopped. More...
 

Public Slots

void logDeb (const QString &, int d)
 loggs a message with a certain debugging level More...
 
void log (const QString &)
 loggs a message More...
 
void logErr (const QString &)
 loggs an error More...
 
void reqplot ()
 is periodically called by a timer to update the display More...
 
void updateSimProgressBar ()
 updates the simulation progress bar in the main window More...
 
void startSimu ()
 loggs start the simulation More...
 
void setDebugLevel (int)
 set debugging level. Messages with a debugging level smaller or equal to this value will be shown More...
 

Public Member Functions

 snMainWindow (bool pquit_when_finished)
 
virtual ~snMainWindow ()
 
void loadFile (QString filename)
 Load configuration file. More...
 
SimStatusType getSimStatus ()
 Returns the current simulation status. More...
 

Protected Member Functions

void closeEvent (QCloseEvent *event)
 

Private Slots

bool openFile ()
 
void stopSimu ()
 
void exitProg ()
 
void about ()
 

Private Member Functions

void createActions ()
 
void createToolBars ()
 
void createMenus ()
 
void createStatusBar ()
 
bool okToContinue ()
 
void setSimStatus (SimStatusType t)
 

Private Attributes

bool quit_when_finished
 if parameter -s is given on command line, SNACS will exit after simulation is done. More...
 
QFile logfile_handle
 
QAction * openAction
 
QAction * startAction
 
QAction * stopAction
 
QAction * exitAction
 
QAction * aboutAction
 
QMenu * fileMenu
 
QMenu * helpMenu
 
QToolBar * ToolBar
 
QToolBar * ConfigBar
 
QTextEdit * Log
 
QLabel * StatusLabel
 
QSpinBox * DebugSpin
 
int DebugLevel
 
QTime * SimTime
 
QProgressBar * SimProgress
 
QTimer * SimProgressBarTimer
 
QLineEdit * LRealTimeValue
 
QLineEdit * LRunTimeValue
 
QLineEdit * LSimTimeValue
 
SimStatusType SimStatus
 
SNSignal Sig
 parameters that are common to every snBlock More...
 
ProcessingParameters SigProc
 parameters that can be changed by every snBlock More...
 
unsigned int PlotUpdateInterval
 
QTimer * timer
 
std::vector< snWidget * > * snWs
 contains pointers to all widgets More...
 
std::vector< ConcBuf * > * ConcBufs
 pointers to all ConcBuffers More...
 
std::vector< snBlock * > * snBlocks
 vector of base class pointers for all snBlocks More...
 

Detailed Description

Class for the main window widget.

Member Enumeration Documentation

Defines the status of the current simulation. After configuration file was loaded: NoConfig -> Ready After start button was pressed: Ready -> Running After stop button was pressed or simulation finished: Running -> Stopped.

Enumerator
NoConfig 
Ready 
Running 
Stopped 

Constructor & Destructor Documentation

snMainWindow::snMainWindow ( bool  pquit_when_finished)
snMainWindow::~snMainWindow ( )
virtual

Member Function Documentation

void snMainWindow::about ( )
privateslot
void snMainWindow::closeEvent ( QCloseEvent *  event)
protected
void snMainWindow::createActions ( )
private
void snMainWindow::createMenus ( )
private
void snMainWindow::createStatusBar ( )
private
void snMainWindow::createToolBars ( )
private
void snMainWindow::exitProg ( )
privateslot
snMainWindow::SimStatusType snMainWindow::getSimStatus ( )

Returns the current simulation status.

void snMainWindow::loadFile ( QString  filename)

Load configuration file.

Parameters
<QStringfilename> filename
void snMainWindow::log ( const QString &  s)
slot

loggs a message

void snMainWindow::logDeb ( const QString &  s,
int  d 
)
slot

loggs a message with a certain debugging level

void snMainWindow::logErr ( const QString &  s)
slot

loggs an error

bool snMainWindow::okToContinue ( )
private
bool snMainWindow::openFile ( )
privateslot
void snMainWindow::reqplot ( )
slot

is periodically called by a timer to update the display

void snMainWindow::setDebugLevel ( int  d)
slot

set debugging level. Messages with a debugging level smaller or equal to this value will be shown

void snMainWindow::setSimStatus ( SimStatusType  t)
private
void snMainWindow::startSimu ( )
slot

loggs start the simulation

void snMainWindow::stopSimu ( )
privateslot
void snMainWindow::updateSimProgressBar ( )
slot

updates the simulation progress bar in the main window

Member Data Documentation

QAction * snMainWindow::aboutAction
private
std::vector<ConcBuf *>* snMainWindow::ConcBufs
private

pointers to all ConcBuffers

QToolBar * snMainWindow::ConfigBar
private
int snMainWindow::DebugLevel
private
QSpinBox* snMainWindow::DebugSpin
private
QAction * snMainWindow::exitAction
private
QMenu* snMainWindow::fileMenu
private
QMenu * snMainWindow::helpMenu
private
QTextEdit* snMainWindow::Log
private
QFile snMainWindow::logfile_handle
private
QLineEdit* snMainWindow::LRealTimeValue
private
QLineEdit* snMainWindow::LRunTimeValue
private
QLineEdit* snMainWindow::LSimTimeValue
private
QAction* snMainWindow::openAction
private
unsigned int snMainWindow::PlotUpdateInterval
private
bool snMainWindow::quit_when_finished
private

if parameter -s is given on command line, SNACS will exit after simulation is done.

SNSignal snMainWindow::Sig
private

parameters that are common to every snBlock

ProcessingParameters snMainWindow::SigProc
private

parameters that can be changed by every snBlock

QProgressBar* snMainWindow::SimProgress
private
QTimer* snMainWindow::SimProgressBarTimer
private
SimStatusType snMainWindow::SimStatus
private
QTime* snMainWindow::SimTime
private
std::vector<snBlock *>* snMainWindow::snBlocks
private

vector of base class pointers for all snBlocks

std::vector<snWidget *>* snMainWindow::snWs
private

contains pointers to all widgets

QAction * snMainWindow::startAction
private
QLabel* snMainWindow::StatusLabel
private
QAction * snMainWindow::stopAction
private
QTimer* snMainWindow::timer
private
QToolBar* snMainWindow::ToolBar
private

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