MainWindow Class Reference

The main window of our gui that encapsulates and holds references to everything else. More...

#include <MainWindow.h>

List of all members.

Public Slots

void about ()
 Called when the "about" button is pressed.
void addBotName (const QString &text)
 Called when the bot's name changes.
void addBotText (const QString &text)
 Called when there is new text to add from the bot.
void aimlDoneLoading ()
 Called when AIML is done loading.
void aimlLoading ()
 Called when AIML is loading.
void input ()
 Called when the user inputs something.
void newFile ()
 Called when the "new file" button is pressed.
void openDir ()
 Called when the "open directory" button is pressed.
void openFile ()
 Called when the "open file" button is pressed.
bool save ()
 Called when the "save" button is pressed.
bool saveAs ()
 Called when the "save as" button is pressed.

Signals

void aimlClear ()
 Emitted when the AIML engine should be destroyed.
void aimlDirectoryToOpen (const QString &dirName)
 Emitted when the user selects a directory to open.
void aimlFileToOpen (const QString &fileName)
 Emitted when the user selects a AIML file to open.
void userTextEntered (const QString &text)
 Emitted when the user enters text into the text box.

Public Member Functions

 MainWindow ()
 Default constructor to initialize The gui.

Private Member Functions

void createActions ()
 Creates the action items in the GUI.
void createMenus ()
 Creates the menu items in the GUI.
void createStatusBar ()
 Creates the GUI status at the bottom of the GUI.
void createToolBars ()
 Creates the Tool bars in the GUI.
bool saveFile (const QString &fileName)
 Saves the bot output to the file.
void setCurrentFile (const QString &fileName)
 Sets the current file to save to when the user presses the "save" button.
void setupConnections ()
 Sets up the QT connections to the AIML engine thread.
void setupInitialProperties ()
 Sets up intiial GUI properties.
void setupLayout ()
 Setup the layout so when resizing happens it does so with grace with the widgets all moving around together in a choherient way.
QString strippedName (const QString &fullFileName)
 Strips the file name.

Private Attributes

QAction * m_aboutAct
 The GUI "about" Action item.
AIMLEngineThread m_AIMLEngineThread
 The AIML Engine thread.
QString m_botName
 Name of the bot.
CustomTextEditm_botOutputField
 The output field where the bot/AIML engine sends text to.
QString m_curFile
 Current file we are saving our output to when the user selects the "Save" button.
QAction * m_exitAct
 The GUI "exit" item.
QMenu * m_fileMenu
 The GUI "file" Menu item.
QToolBar * m_fileToolBar
 The GUI file tool bar.
QMenu * m_helpMenu
 The GUI "help" Menu item.
QAction * m_newAct
 The GUI "new" item.
QPushButton * m_okButton
 The GUI "OK" button.
QAction * m_openAct
 The GUI "open File" Action item.
QAction * m_openDirAct
 The GUI "open Directory" Action item.
QAction * m_saveAct
 The GUI "save" item.
QAction * m_saveAsAct
 The GUI "save as" item.
QLineEdit * m_userInputField
 The GUI input field the user inputs to the bot.


Detailed Description

The main window of our gui that encapsulates and holds references to everything else.


Constructor & Destructor Documentation

MainWindow  ) 
 

Default constructor to initialize The gui.


Member Function Documentation

void about  )  [slot]
 

Called when the "about" button is pressed.

void addBotName const QString &  text  )  [slot]
 

Called when the bot's name changes.

Parameters:
text the name of the bot.

void addBotText const QString &  text  )  [slot]
 

Called when there is new text to add from the bot.

Parameters:
text The text from the bot

void aimlClear  )  [signal]
 

Emitted when the AIML engine should be destroyed.

void aimlDirectoryToOpen const QString &  dirName  )  [signal]
 

Emitted when the user selects a directory to open.

Parameters:
dirName The Name of the directory for the AIML engine to open

void aimlDoneLoading  )  [slot]
 

Called when AIML is done loading.

void aimlFileToOpen const QString &  fileName  )  [signal]
 

Emitted when the user selects a AIML file to open.

Parameters:
fileName The AIML file the user selected to open

void aimlLoading  )  [slot]
 

Called when AIML is loading.

void createActions  )  [private]
 

Creates the action items in the GUI.

void createMenus  )  [private]
 

Creates the menu items in the GUI.

void createStatusBar  )  [private]
 

Creates the GUI status at the bottom of the GUI.

void createToolBars  )  [private]
 

Creates the Tool bars in the GUI.

void input  )  [slot]
 

Called when the user inputs something.

void newFile  )  [slot]
 

Called when the "new file" button is pressed.

void openDir  )  [slot]
 

Called when the "open directory" button is pressed.

void openFile  )  [slot]
 

Called when the "open file" button is pressed.

bool save  )  [slot]
 

Called when the "save" button is pressed.

bool saveAs  )  [slot]
 

Called when the "save as" button is pressed.

bool saveFile const QString &  fileName  )  [private]
 

Saves the bot output to the file.

Parameters:
fileName the file to save the bot output to

void setCurrentFile const QString &  fileName  )  [private]
 

Sets the current file to save to when the user presses the "save" button.

Parameters:
fileName the name of the file to set the current file to

void setupConnections  )  [private]
 

Sets up the QT connections to the AIML engine thread.

void setupInitialProperties  )  [private]
 

Sets up intiial GUI properties.

void setupLayout  )  [private]
 

Setup the layout so when resizing happens it does so with grace with the widgets all moving around together in a choherient way.

QString strippedName const QString &  fullFileName  )  [private]
 

Strips the file name.

Parameters:
fullFileName The file name to strip

void userTextEntered const QString &  text  )  [signal]
 

Emitted when the user enters text into the text box.

Parameters:
text The text the user entered.


Member Data Documentation

QAction* m_aboutAct [private]
 

The GUI "about" Action item.

AIMLEngineThread m_AIMLEngineThread [private]
 

The AIML Engine thread.

This is used to offload the work of the AIML from the GUI and keeps the GUI repsonsive by putting all the AIML engine workload in a seperate thread.

QString m_botName [private]
 

Name of the bot.

CustomTextEdit* m_botOutputField [private]
 

The output field where the bot/AIML engine sends text to.

QString m_curFile [private]
 

Current file we are saving our output to when the user selects the "Save" button.

QAction* m_exitAct [private]
 

The GUI "exit" item.

QMenu* m_fileMenu [private]
 

The GUI "file" Menu item.

QToolBar* m_fileToolBar [private]
 

The GUI file tool bar.

QMenu* m_helpMenu [private]
 

The GUI "help" Menu item.

QAction* m_newAct [private]
 

The GUI "new" item.

QPushButton* m_okButton [private]
 

The GUI "OK" button.

QAction* m_openAct [private]
 

The GUI "open File" Action item.

QAction* m_openDirAct [private]
 

The GUI "open Directory" Action item.

QAction* m_saveAct [private]
 

The GUI "save" item.

QAction* m_saveAsAct [private]
 

The GUI "save as" item.

QLineEdit* m_userInputField [private]
 

The GUI input field the user inputs to the bot.


The documentation for this class was generated from the following files:
Generated on Wed Jul 26 21:39:13 2006 for RebeccaAIML by  doxygen 1.4.5