The main part of the gui that manages all dialogs and menus.
More...
#include <MainGUI.h>
|
| MainGUI (lib_manager::LibManager *theManager) |
| The constructor initializes the library manager. More...
|
|
virtual | ~MainGUI () |
| A destructor. More...
|
|
virtual void | addGenericMenuAction (const std::string &path, int action, MenuInterface *menu, int qtKey=0, const std::string &icon="", bool toolbar=0, int checkable=0) |
| Adds a menu/menu item with its corresponding action. More...
|
|
virtual void | setMenuActionSelected (const std::string &path, bool checked) |
| Set the selection state of an menu action. More...
|
|
virtual void | setBackgroundImage (const std::string &path="") |
| Sets an image as a central widget in the main window. More...
|
|
MyQMainWindow * | mainWindow_p (void) |
| Returns a pointer to the main window. More...
|
|
void | show (void) |
| Shows the main window with a predefined geometry. More...
|
|
void | dock (bool checked) |
| Docks/undocks all widgets in the main window. More...
|
|
bool | getDocking () const |
| Returns if docking mode is currently enabled. More...
|
|
void | setWindowTitle (const std::string &title) |
|
int | getLibVersion () const |
| Returns the current version of the library. More...
|
|
const std::string | getLibName () const |
| Returns the name of the library. More...
|
|
| CREATE_MODULE_INFO () |
|
Public Member Functions inherited from mars::main_gui::GuiInterface |
| GuiInterface (lib_manager::LibManager *theManager) |
| The constructor initializes the library manager. More...
|
|
virtual | ~GuiInterface () |
| A destructor. More...
|
|
virtual void | addDockWidget (void *window, int priority=0, int area=0, bool possibleCentralWidget=false)=0 |
| Makes a widget dockable in the main window. More...
|
|
virtual void | removeDockWidget (void *window, int priority=0)=0 |
| Removes a widget from the dockables. More...
|
|
| LibInterface (LibManager *theManager) |
|
virtual | ~LibInterface (void) |
|
ModuleInfo | getModuleInfo () const |
|
virtual void | newLibLoaded (const std::string &libName) |
|
virtual void | createModuleInfo (void) |
|
The main part of the gui that manages all dialogs and menus.
- See also
- GuiInterface
Definition at line 69 of file MainGUI.h.
◆ MainGUI()
The constructor initializes the library manager.
Definition at line 44 of file MainGUI.cpp.
◆ ~MainGUI()
mars::main_gui::MainGUI::~MainGUI |
( |
void |
| ) |
|
|
virtual |
◆ aboutQt
void mars::main_gui::MainGUI::aboutQt |
( |
| ) |
const |
|
slot |
Shows the standard qt about dialog.
Definition at line 311 of file MainGUI.cpp.
◆ addDockWidget
void mars::main_gui::MainGUI::addDockWidget |
( |
void * |
window, |
|
|
int |
p = 0 , |
|
|
int |
a = 0 , |
|
|
bool |
possibleCentralWidget = false |
|
) |
| |
|
slot |
Makes a widget dockable in the main window.
- See also
- GuiInterface::addDockWidget(void*, int, int)
Definition at line 289 of file MainGUI.cpp.
◆ addGenericMenuAction()
void mars::main_gui::MainGUI::addGenericMenuAction |
( |
const std::string & |
path, |
|
|
int |
action, |
|
|
MenuInterface * |
menu, |
|
|
int |
qtKey = 0 , |
|
|
const std::string & |
icon = "" , |
|
|
bool |
toolbar = 0 , |
|
|
int |
checkable = 0 |
|
) |
| |
|
virtual |
Adds a menu/menu item with its corresponding action.
- See also
- GuiInterface::addGenericMenuAction(string, int, MenuInterface*, int, string, bool, int)
Implements mars::main_gui::GuiInterface.
Definition at line 108 of file MainGUI.cpp.
◆ CREATE_MODULE_INFO()
mars::main_gui::MainGUI::CREATE_MODULE_INFO |
( |
| ) |
|
◆ dock()
void mars::main_gui::MainGUI::dock |
( |
bool |
checked | ) |
|
|
virtual |
◆ genericAction
void mars::main_gui::MainGUI::genericAction |
( |
bool |
checked = false | ) |
|
|
slot |
Called when a menu item is selected.
Calls the corresponding MenuInterface instance with the selected action.
- Parameters
-
checked | Indicates if the menu item is checked or not. |
Definition at line 95 of file MainGUI.cpp.
◆ getDocking()
bool mars::main_gui::MainGUI::getDocking |
( |
| ) |
const |
|
inlinevirtual |
◆ getLibName()
const std::string mars::main_gui::MainGUI::getLibName |
( |
| ) |
const |
|
virtual |
◆ getLibVersion()
int mars::main_gui::MainGUI::getLibVersion |
( |
| ) |
const |
|
virtual |
◆ mainWindow_p()
Returns a pointer to the main window.
Definition at line 285 of file MainGUI.cpp.
◆ removeDockWidget
void mars::main_gui::MainGUI::removeDockWidget |
( |
void * |
window, |
|
|
int |
p = 0 |
|
) |
| |
|
slot |
◆ setBackgroundImage()
void mars::main_gui::MainGUI::setBackgroundImage |
( |
const std::string & |
path = "" | ) |
|
|
virtual |
◆ setMenuActionSelected()
void mars::main_gui::MainGUI::setMenuActionSelected |
( |
const std::string & |
path, |
|
|
bool |
checked |
|
) |
| |
|
virtual |
◆ setWindowTitle()
void mars::main_gui::MainGUI::setWindowTitle |
( |
const std::string & |
title | ) |
|
|
virtual |
◆ show()
void mars::main_gui::MainGUI::show |
( |
void |
| ) |
|
|
virtual |
◆ actionAboutQt
QAction* mars::main_gui::MainGUI::actionAboutQt |
|
private |
Holds the pointer to the aboutQt action.
Definition at line 187 of file MainGUI.h.
◆ allow_toolbar
bool mars::main_gui::MainGUI::allow_toolbar |
|
private |
Indicates if a toolbar is to be shown or not.
Definition at line 192 of file MainGUI.h.
◆ genericMenus
std::vector<genericMenu> mars::main_gui::MainGUI::genericMenus |
|
private |
◆ helpMenu
QMenu* mars::main_gui::MainGUI::helpMenu |
|
private |
Holds the pointer to the helpMenu.
Definition at line 182 of file MainGUI.h.
◆ mainWindow
Holds the main window instance.
Definition at line 167 of file MainGUI.h.
◆ mdiArea
Holds the mdi area instance.
Definition at line 172 of file MainGUI.h.
◆ menuBar
QMenuBar* mars::main_gui::MainGUI::menuBar |
|
private |
Holds the menu bar instance.
Definition at line 177 of file MainGUI.h.
◆ v_qmenu
std::vector<menuStruct> mars::main_gui::MainGUI::v_qmenu |
|
private |
The documentation for this class was generated from the following files:
- /Developer/bob-learning-dev/simulation/mars/common/gui/main_gui/src/MainGUI.h
- /Developer/bob-learning-dev/simulation/mars/common/gui/main_gui/src/MainGUI.cpp