Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

SimulatorDlgImpl Class Reference

Simulator dialog. More...

#include <SimulatorDlgImpl.h>

Inheritance diagram for SimulatorDlgImpl::

List of all members.

Public Types

enum  simstate { Off, Busy, Finished }
 State of the machine.


Public Slots

void closeSim ()
 Close the simulator. More...

void send ()
 User has clicked the Send button.

void reset ()
 User has clicked the Reset button.

void inputsChanged (const QString &)
 Is invoked when the text in the inputs field changes. More...

void button0Pressed ()
 Button 0 was pressed.

void button1Pressed ()
 Button 1 was pressed.

void button2Pressed ()
 Button 2 was pressed.

void button3Pressed ()
 Button 3 was pressed.

void button4Pressed ()
 Button 4 was pressed.

void button5Pressed ()
 Button 5 was pressed.

void button6Pressed ()
 Button 6 was pressed.

void button7Pressed ()
 Button 7 was pressed.

void button8Pressed ()
 Button 8 was pressed.

void button9Pressed ()
 Button 9 was pressed.

void button10Pressed ()
 Button 10 was pressed.

void button11Pressed ()
 Button 11 was pressed.

void button12Pressed ()
 Button 12 was pressed.

void button13Pressed ()
 Button 13 was pressed.

void button14Pressed ()
 Button 14 was pressed.

void button15Pressed ()
 Button 15 was pressed.

void iBinPressed ()
 Called when the 'Binary' button for the inputs is pressed.

void iHexPressed ()
 Called when the 'Hexadecimal' button for the inputs is pressed.

void iASCIIPressed ()
 Called when the 'ASCII' button for the inputs is pressed.

void oBinPressed ()
 Called when the 'Binary' button for the outputs is pressed.

void oHexPressed ()
 Called when the 'Hexadecimal' button for the outputs is pressed.

void oASCIIPressed ()
 Called when the 'ASCII' button for the outputs is pressed.

void clockPressed ()
 Called when the 'clock' button is pressed.

void selectFirst ()
 Selects the contents of the 'inputs' field and sets the focus.

void returnPressedInputs ()
 Called when return is pressed in the 'inputs' field.


Signals

void inputSent ()
 Emited when the input needs to be sent to the machine.

void closing ()
 Emited when the dialog is about to close.

void resetPressed ()
 Emited when reset is pressed.


Public Methods

 SimulatorDlgImpl (QWidget *parent=0, const char *name=0, bool modal=FALSE, WFlags fl=0)
 Constructs a SimulatorDlgImpl which is a child of 'parent', with the name 'name' and widget flags set to 'f'. More...

 ~SimulatorDlgImpl ()
 Destroys the object and frees any allocated resources.

void enable0 (bool e)
 Enables button for bit 0 if e is TRUE otherwise disables it.

void enable1 (bool e)
 Enables button for bit 1 if e is TRUE otherwise disables it.

void enable2 (bool e)
 Enables button for bit 2 if e is TRUE otherwise disables it.

void enable3 (bool e)
 Enables button for bit 3 if e is TRUE otherwise disables it.

void enable4 (bool e)
 Enables button for bit 4 if e is TRUE otherwise disables it.

void enable5 (bool e)
 Enables button for bit 5 if e is TRUE otherwise disables it.

void enable6 (bool e)
 Enables button for bit 6 if e is TRUE otherwise disables it.

void enable7 (bool e)
 Enables button for bit 7 if e is TRUE otherwise disables it.

void enable8 (bool e)
 Enables button for bit 8 if e is TRUE otherwise disables it.

void enable9 (bool e)
 Enables button for bit 9 if e is TRUE otherwise disables it.

void enable10 (bool e)
 Enables button for bit 10 if e is TRUE otherwise disables it.

void enable11 (bool e)
 Enables button for bit 11 if e is TRUE otherwise disables it.

void enable12 (bool e)
 Enables button for bit 12 if e is TRUE otherwise disables it.

void enable13 (bool e)
 Enables button for bit 13 if e is TRUE otherwise disables it.

void enable14 (bool e)
 Enables button for bit 14 if e is TRUE otherwise disables it.

void enable15 (bool e)
 Enables button for bit 15 if e is TRUE otherwise disables it.

void enableFrequency (bool e)
 Enables buttons for Frequency if e is TRUE otherwise disables them.

void enableSend (bool e)
 Enables 'Send' button if e is TRUE otherwise disables it.

QString getInputs ()
 Returns the string of the inputs field.

void setInputs (QString s)
 Sets the input string.

void setStateName (QString n)
 Sets the state name.

void setStateCode (QString c)
 Sets the state code.

void setOutputs (QString o)
 Sets the output string.

bool isIBinChecked ()
 Returns TRUE if Binary is checked for the inputs otherwise FALSE.

bool isIHexChecked ()
 Returns TRUE if Hexadecimal is checked for the inputs otherwise FALSE.

bool isIASCIIChecked ()
 Returns TRUE if ASCII is checked for the inputs otherwise FALSE.

bool isOBinChecked ()
 Returns TRUE if Binary is checked for the outputs otherwise FALSE.

bool isOHexChecked ()
 Returns TRUE if Hexadecimal is checked for the outputs otherwise FALSE.

bool isOASCIIChecked ()
 Returns TRUE if ASCII is checked for the outputs otherwise FALSE.

bool isClockOn ()
 Returns TRUE if 'clock' is pressed, otherwise FALSE.

void setState (int)
 Sets the state of the machine to s. More...

void resetButtons ()
 Sets all button states to Off.

void stopTimer ()
 Stops the timer for the clock.

void init ()
 Initialises the dialog.


Private Methods

void closeEvent (QCloseEvent *)
 Is invoked when the user closes the window. More...

void updateInputsStr ()
 Updates the string in the inputs field according to the state of the buttons.


Private Attributes

MainWindowmain
 Pointer to the main window.

QTimer * timer
 Timer.

QPixmap * redlight
 Red light pixmap.

QPixmap * greenlight
 Green light pixmap.

QPixmap * greylight
 greylight pixmap.


Detailed Description

Simulator dialog.


Constructor & Destructor Documentation

SimulatorDlgImpl::SimulatorDlgImpl QWidget * parent = 0,
const char * name = 0,
bool modal = FALSE,
WFlags fl = 0
 

Constructs a SimulatorDlgImpl which is a child of 'parent', with the name 'name' and widget flags set to 'f'.

The dialog will by default be modeless, unless you set 'modal' to TRUE to construct a modal dialog.


Member Function Documentation

void SimulatorDlgImpl::closeEvent QCloseEvent * e [private]
 

Is invoked when the user closes the window.

Emits the closing signal and hides the dialog.

void SimulatorDlgImpl::closeSim [slot]
 

Close the simulator.

Emits the closing signal and hides the dialog. Is invoked when the users clicks the Close button.

void SimulatorDlgImpl::inputsChanged const QString & in [slot]
 

Is invoked when the text in the inputs field changes.

The buttons for the bits 0-15 are changed according to the string in.

void SimulatorDlgImpl::setState int s
 

Sets the state of the machine to s.

Parameters:
s   State of the machine
  • Busy: Machine hasn't reached an end state (red light)
  • Finished: Machine has reached an end state (green light)
  • Otherwise undefined (grey light)


The documentation for this class was generated from the following files:
Generated at Fri Apr 11 22:37:17 2003 for Qfsm by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001