BALL::VIEW::TestFramework Class Reference
[Modular Widgets]

#include <BALL/VIEW/WIDGETS/testFramework.h>

Inheritance diagram for BALL::VIEW::TestFramework:
QWidget BALL::VIEW::ModularWidget BALL::Embeddable BALL::VIEW::ConnectionObject

List of all members.


Classes

class  MyEventThread
class  MyMouseEvent

Public Slots

void startTest ()
void stopTest ()
void runTest ()
void abortTest ()
void saveFile ()
void loadFile ()
virtual bool eventFilter (QObject *, QEvent *e)
virtual void timeOut ()
void switchRecordMove ()

Public Member Functions

 TestFramework (QWidget *parent=0, const char *name=0)
virtual ~TestFramework ()
virtual void initializeWidget (MainControl &main_control)
void setFilename (const String &filename)
void checkMenu (MainControl &main_control)
virtual bool canHandle (const String &fileformat) const
virtual bool openFile (const String &filename)

Protected Member Functions

virtual bool event (QEvent *e)
void storeEvent (QEvent &e)
void processEvent_ ()

Protected Attributes

QAction * start_recording
QAction * stop_recording
QAction * run_test
QAction * abort_test
QAction * save_file
QAction * load_file
QAction * switch_move
QAction * action_
File outfile_
File infile_
String filename_
Timer timer_
Timer runtime_
list< Stringlines_
QWidgetwidget_
QWidgetlast_widget_
float time_
bool event_busy_
Index x_
Index y_
int modifiers_
int type_
int our_type_
int button_
int buttons_
bool test_running_
bool recording_
String last_event_string_
String last_names_
String shortcut_
String python_line_
String expected_result_
MyEventThread thread_
Size errors_
QEventlast_event_
bool is_command_line_
float max_run_time_
Position line_nr_

Friends

class MyEventThread

Detailed Description

Class for recording mouse and keyboard inputs, storing them in a line based file and replaying them. This can be used to

This widget will create it's own menu with the name ''Macros''. The ''Pause'' key can be used to stop the recording or pause the replay of a macro. If a mouse key is pressed in replay mode this will also cause a pause.

The file format is line based and its fields are separated with the degree sign (°). The first field consists of only one letter and defines the line's meaning:

The last two lines are only processed if a test is opened through a command line argument. Then comes the time in secs to wait before performing the action.


Constructor & Destructor Documentation

BALL::VIEW::TestFramework::TestFramework ( QWidget parent = 0,
const char *  name = 0 
)
virtual BALL::VIEW::TestFramework::~TestFramework (  )  [virtual]

Member Function Documentation

void BALL::VIEW::TestFramework::abortTest (  )  [slot]
virtual bool BALL::VIEW::TestFramework::canHandle ( const String  )  const [virtual]

Test if this ModularWidget can handle a given file format

Parameters:
fileform short string with the file extension (e.g. PDB)
See also:

openFile

MainControl::openFile

Reimplemented from BALL::VIEW::ModularWidget.

void BALL::VIEW::TestFramework::checkMenu ( MainControl main_control  )  [virtual]

Menu checking method. This method is called MainControl::checkMenus before a popup menu is shown. It should be used to update the state of menu entries (e.g. disable or enable entries).

Parameters:
main_control the MainControl object whose menus should be checked

Reimplemented from BALL::VIEW::ModularWidget.

virtual bool BALL::VIEW::TestFramework::event ( QEvent e  )  [protected, virtual]
virtual bool BALL::VIEW::TestFramework::eventFilter ( QObject ,
QEvent e 
) [virtual, slot]
virtual void BALL::VIEW::TestFramework::initializeWidget ( MainControl main_control  )  [virtual]

Initialize the widget. This method is called automatically immediately before the main application is started. It should add the widget's menu entries and connections (if required). This method will be called by MainControl::show.

Parameters:
main_control the MainControl object to be initialized with this ModularWidget
See also:
finalizeWidget()

Reimplemented from BALL::VIEW::ModularWidget.

void BALL::VIEW::TestFramework::loadFile (  )  [slot]
virtual bool BALL::VIEW::TestFramework::openFile ( const String  )  [virtual]

Tell this ModularWidget to open a given file.

See also:

canHandle

MainControl::openFile

Reimplemented from BALL::VIEW::ModularWidget.

void BALL::VIEW::TestFramework::processEvent_ (  )  [protected]
void BALL::VIEW::TestFramework::runTest (  )  [slot]
void BALL::VIEW::TestFramework::saveFile (  )  [slot]
void BALL::VIEW::TestFramework::setFilename ( const String filename  ) 
void BALL::VIEW::TestFramework::startTest (  )  [slot]
void BALL::VIEW::TestFramework::stopTest (  )  [slot]
void BALL::VIEW::TestFramework::storeEvent ( QEvent e  )  [protected]
void BALL::VIEW::TestFramework::switchRecordMove (  )  [slot]
virtual void BALL::VIEW::TestFramework::timeOut (  )  [virtual, slot]

Friends And Related Function Documentation

friend class MyEventThread [friend]

Member Data Documentation

QAction* BALL::VIEW::TestFramework::action_ [protected]
QAction * BALL::VIEW::TestFramework::load_file [protected]
QAction * BALL::VIEW::TestFramework::run_test [protected]
QAction * BALL::VIEW::TestFramework::save_file [protected]