Kooky
cMainWindow Class Reference

This is the class that implements the main window. More...

#include <cmainwindow.h>

+ Inheritance diagram for cMainWindow:
+ Collaboration diagram for cMainWindow:

Public Member Functions

 cMainWindow (QWidget *parent=0)
 Constructor. More...
 
 ~cMainWindow ()
 Destructor. More...
 
QList< cPlugin * > pluginList ()
 Returns the list of loaded plugins. More...
 

Private Slots

void pluginImportTriggered ()
 Testing of import trigger raised by import plugins. More...
 
void pluginExportTriggered ()
 Testing of export trigger raised by export plugins. More...
 
void pluginDBTriggered ()
 Testing of database trigger raised by database connector plugins. More...
 
void on_m_lpMenu_File_Exit_triggered ()
 Menu entry "File -> Exit" triggered. More...
 
void on_m_lpMenu_Tools_Options_triggered ()
 Menu entry "Tools -> Options" triggered. More...
 
void onIngredientsListCustomContextMenu (const QPoint &point)
 Custom contest menu of ingredients list has been requested. More...
 
void onIngredientsListNew ()
 New ingredient has been requested. More...
 
void onIngredientsListImport ()
 Import of ingredient has been requested. More...
 
void onIngredientsListDelete ()
 Delete of ingredient has been requested. More...
 
void onIngredientsListEdit ()
 Edit of ingredient has been requested. More...
 

Private Member Functions

void init ()
 Initialized main windows. More...
 
void initDefaultSettings ()
 Initializes default settings for Kooky. More...
 
void loadPlugins (const QString &szPluginDir)
 Loads plugins in the given path. More...
 
cPluginplugin (QAction *lpAction)
 Finds a plugin with the given action. More...
 

Private Attributes

Ui::cMainWindow * ui
 
QList< cPlugin * > m_pluginList
 
QStandardItemModel * m_lpIngredientsListModel
 
QAction * m_lpIngredientsListNew
 
QAction * m_lpIngredientsListImport
 
QAction * m_lpIngredientsListDelete
 
QAction * m_lpIngredientsListEdit
 
QMenu * m_lpIngredientsListMenu
 

Detailed Description

This class implements the main window and main functionality of Kooky.

Author
Herwig Birke
Version
1.0
Date
2016/02/09

Constructor & Destructor Documentation

cMainWindow::cMainWindow ( QWidget *  parent = 0)
explicit
Parameters
parent

References init().

+ Here is the call graph for this function:

cMainWindow::~cMainWindow ( )

Member Function Documentation

void cMainWindow::initDefaultSettings ( )
private

Referenced by init().

+ Here is the caller graph for this function:

void cMainWindow::loadPlugins ( const QString &  szPluginDir)
private
Parameters
szPluginDirPath to plugins

References cPlugin::isValid(), m_pluginList, pluginDBTriggered(), pluginExportTriggered(), pluginImportTriggered(), cPlugin::pluginName(), cPlugin::setAction(), and ui.

Referenced by init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cMainWindow::on_m_lpMenu_File_Exit_triggered ( )
privateslot
void cMainWindow::on_m_lpMenu_Tools_Options_triggered ( )
privateslot
void cMainWindow::onIngredientsListCustomContextMenu ( const QPoint &  point)
privateslot
Parameters
pointCurrent position of mouse cursor.

References m_lpIngredientsListDelete, m_lpIngredientsListEdit, m_lpIngredientsListMenu, m_lpIngredientsListNew, and ui.

Referenced by init().

+ Here is the caller graph for this function:

void cMainWindow::onIngredientsListDelete ( )
privateslot

Referenced by init().

+ Here is the caller graph for this function:

void cMainWindow::onIngredientsListEdit ( )
privateslot

Referenced by init().

+ Here is the caller graph for this function:

void cMainWindow::onIngredientsListImport ( )
privateslot

References m_pluginList, and cImportIngredientDialog::setPluginList().

Referenced by init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cMainWindow::onIngredientsListNew ( )
privateslot

Referenced by init().

+ Here is the caller graph for this function:

cPlugin * cMainWindow::plugin ( QAction *  lpAction)
private
Parameters
lpActionAction of the plugin.
Returns
cPlugin Plugin corresponding to the action, NULL if not found.

References m_pluginList.

Referenced by pluginDBTriggered().

+ Here is the caller graph for this function:

void cMainWindow::pluginDBTriggered ( )
privateslot

References cInterface::config(), cPlugin::dbInterface(), cDBInterface::init(), plugin(), cInterface::pluginName(), and cPlugin::pluginName().

Referenced by loadPlugins().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cMainWindow::pluginExportTriggered ( )
privateslot

Referenced by loadPlugins().

+ Here is the caller graph for this function:

void cMainWindow::pluginImportTriggered ( )
privateslot

Referenced by loadPlugins().

+ Here is the caller graph for this function:

QList< cPlugin * > cMainWindow::pluginList ( )
Returns
QList<cPlugin *> List of loaded plugins.

References m_pluginList.

Referenced by cOptions::cOptions().

+ Here is the caller graph for this function:

Member Data Documentation

QAction* cMainWindow::m_lpIngredientsListDelete
private

"Delee Ingredient" Action for ingredients context menu

Referenced by init(), onIngredientsListCustomContextMenu(), and ~cMainWindow().

QAction* cMainWindow::m_lpIngredientsListEdit
private

"Edit Ingredient" Action for ingredients context menu

Referenced by init(), onIngredientsListCustomContextMenu(), and ~cMainWindow().

QAction* cMainWindow::m_lpIngredientsListImport
private

"Import Ingredient" Action for ingredients context menu

Referenced by init().

QMenu* cMainWindow::m_lpIngredientsListMenu
private

Context menu for ingredients list

Referenced by init(), and onIngredientsListCustomContextMenu().

QStandardItemModel* cMainWindow::m_lpIngredientsListModel
private

standard item model for ingredients list

Referenced by init().

QAction* cMainWindow::m_lpIngredientsListNew
private

"New Ingredient" Action for ingredients context menu

Referenced by init(), onIngredientsListCustomContextMenu(), and ~cMainWindow().

QList<cPlugin*> cMainWindow::m_pluginList
private

List of loaded plugins

Referenced by loadPlugins(), onIngredientsListImport(), plugin(), and pluginList().

Ui::cMainWindow* cMainWindow::ui
private

the main window GUI

Referenced by init(), loadPlugins(), onIngredientsListCustomContextMenu(), and ~cMainWindow().


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