FreeDebks  1.0.3
 All Classes Files Functions Variables Friends Pages
Public Slots | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
FdMainWindow Class Reference

#include <FdMainWindow.hpp>

Collaboration diagram for FdMainWindow:
Collaboration graph
[legend]

Public Slots

void addSubWindow (FdSubWindow *subwindow)
void on_actionSaveAs_triggered ()

Public Member Functions

 FdMainWindow (QWidget *parent=0)
void enableSaveAction (bool value=true)
void enableRemoveAction (bool value=true)
void enableShowAccountAction (bool value=true)
void enableShowEntryAction (bool value=true)
QList< QAction * > getContextMenuActionsEdit () const
QList< QAction * > getContextMenuActionsCoa () const
QList< QAction * > getContextMenuActionsJournal () const
QList< QAction * > getContextMenuActionsResults () const
QList< QAction * > getContextMenuActionsAccount () const
void setDockText (QString text="")
void activeTabChanged (TabRole role=TabRole(0), QAction *redo=new QAction(0), QAction *undo=new QAction(0), bool windowModified=false)
void subwindowAboutToClose ()

Static Public Member Functions

static FdMainWindowinstance ()

Protected Member Functions

void closeEvent (QCloseEvent *event)

Private Slots

void on_actionNew_triggered ()
void on_actionOpen_triggered ()
void open (QString filePath)
void openRecentFile ()
void on_actionSave_triggered ()
void on_actionPrint_triggered ()
bool on_actionClose_triggered ()
void on_actionQuit_triggered ()
void on_actionAddLine_triggered ()
void on_actionRemoveSelected_triggered ()
void on_actionCopy_triggered ()
void on_actionFindNext_triggered ()
void on_actionRecomputeAll_triggered ()
void on_actionEditProperties_triggered ()
void on_actionCreateNewYear_triggered ()
void on_actionCopyPreviousLine_triggered ()
void on_actionOrderByDate_triggered ()
void on_actionShowAccount_triggered ()
void on_actionShowEntry_triggered ()
void on_actionHelp_triggered ()
void on_actionAbout_triggered ()

Private Member Functions

QAction * createOpenRecentFileAction (QString file)
void updateOpenRecentFileActions (QString file)

Private Attributes

TabRole mActiveTab
QList< QAction * > mRecentOpenedFiles
QList< QAction * > mContextMenuActionsEdit
QList< QAction * > mContextMenuActionsCoa
QList< QAction * > mContextMenuActionsJournal
QList< QAction * > mContextMenuActionsResults
QList< QAction * > mContextMenuActionsAccount

Static Private Attributes

static FdMainWindowself = 0

Detailed Description

Definition at line 38 of file FdMainWindow.hpp.

Constructor & Destructor Documentation

FdMainWindow::FdMainWindow ( QWidget *  parent = 0)

Creates all actions for use with tabs (FdModelCoa, FdModelJournal, FdModelResults).

Definition at line 33 of file FdMainWindow.cpp.

Member Function Documentation

void FdMainWindow::activeTabChanged ( TabRole  role = TabRole(0),
QAction *  undo = new QAction(0),
QAction *  redo = new QAction(0),
bool  windowModified = false 
)

Called by FdSubWindow::newActiveTab().

Definition at line 453 of file FdMainWindow.cpp.

void FdMainWindow::addSubWindow ( FdSubWindow subwindow)
slot

Adds a new FdSubWindow subwindow instance to the mdiArea.

Catches FdDialogBookkeepingProperties::accepted() signal.

Definition at line 444 of file FdMainWindow.cpp.

void FdMainWindow::closeEvent ( QCloseEvent *  event)
protected

Handles the close event on the window. It will first try to close each subwindow and then accept the event.

Definition at line 199 of file FdMainWindow.cpp.

QAction * FdMainWindow::createOpenRecentFileAction ( QString  file)
private

Definition at line 231 of file FdMainWindow.cpp.

void FdMainWindow::enableRemoveAction ( bool  value = true)

Definition at line 145 of file FdMainWindow.cpp.

void FdMainWindow::enableSaveAction ( bool  value = true)

Definition at line 140 of file FdMainWindow.cpp.

void FdMainWindow::enableShowAccountAction ( bool  value = true)

Definition at line 150 of file FdMainWindow.cpp.

void FdMainWindow::enableShowEntryAction ( bool  value = true)

Definition at line 155 of file FdMainWindow.cpp.

QList< QAction * > FdMainWindow::getContextMenuActionsAccount ( ) const

Definition at line 180 of file FdMainWindow.cpp.

QList< QAction * > FdMainWindow::getContextMenuActionsCoa ( ) const

Definition at line 165 of file FdMainWindow.cpp.

QList< QAction * > FdMainWindow::getContextMenuActionsEdit ( ) const

Definition at line 160 of file FdMainWindow.cpp.

QList< QAction * > FdMainWindow::getContextMenuActionsJournal ( ) const

Definition at line 170 of file FdMainWindow.cpp.

QList< QAction * > FdMainWindow::getContextMenuActionsResults ( ) const

Definition at line 175 of file FdMainWindow.cpp.

static FdMainWindow* FdMainWindow::instance ( )
inlinestatic

Definition at line 58 of file FdMainWindow.hpp.

void FdMainWindow::on_actionAbout_triggered ( )
privateslot

Definition at line 430 of file FdMainWindow.cpp.

void FdMainWindow::on_actionAddLine_triggered ( )
privateslot

Catches user calls to the add line action (used by coa, journal and results).

Gets the activated FdSubWindow, calling QMdiArea::currentSubWindow() method and calls FdSubWindow::addLine().

Definition at line 341 of file FdMainWindow.cpp.

bool FdMainWindow::on_actionClose_triggered ( )
privateslot

Definition at line 328 of file FdMainWindow.cpp.

void FdMainWindow::on_actionCopy_triggered ( )
privateslot

Definition at line 352 of file FdMainWindow.cpp.

void FdMainWindow::on_actionCopyPreviousLine_triggered ( )
privateslot

Definition at line 390 of file FdMainWindow.cpp.

void FdMainWindow::on_actionCreateNewYear_triggered ( )
privateslot

Creates a new bookkeeping based on the current data, reporting bookkeeping properties, accounts balance and results.

Definition at line 379 of file FdMainWindow.cpp.

void FdMainWindow::on_actionEditProperties_triggered ( )
privateslot

Creates a dialog box (FdDialogBkgProperties) to edit the properties of the current bookkeeping.

Definition at line 370 of file FdMainWindow.cpp.

void FdMainWindow::on_actionFindNext_triggered ( )
privateslot

Definition at line 357 of file FdMainWindow.cpp.

void FdMainWindow::on_actionHelp_triggered ( )
privateslot

Definition at line 414 of file FdMainWindow.cpp.

void FdMainWindow::on_actionNew_triggered ( )
privateslot

Opens a dialogbox (a FdDialogBkgProperties instance) to create a new bookkeeping on user request.

Connects FdDialogBkgProperties::newBkgCreated() signal to the addSubWindow() slot of this class.

Definition at line 266 of file FdMainWindow.cpp.

void FdMainWindow::on_actionOpen_triggered ( )
privateslot

Definition at line 274 of file FdMainWindow.cpp.

void FdMainWindow::on_actionOrderByDate_triggered ( )
privateslot

Catches user calls to the order by date action (used by journal).

Definition at line 398 of file FdMainWindow.cpp.

void FdMainWindow::on_actionPrint_triggered ( )
privateslot

Definition at line 323 of file FdMainWindow.cpp.

void FdMainWindow::on_actionQuit_triggered ( )
privateslot

Definition at line 333 of file FdMainWindow.cpp.

void FdMainWindow::on_actionRecomputeAll_triggered ( )
privateslot

Definition at line 362 of file FdMainWindow.cpp.

void FdMainWindow::on_actionRemoveSelected_triggered ( )
privateslot

Definition at line 347 of file FdMainWindow.cpp.

void FdMainWindow::on_actionSave_triggered ( )
privateslot

Gets the activated FdSubWindow, calling QMdiArea::currentSubWindow() method and calls FdSubWindow::save().

Definition at line 305 of file FdMainWindow.cpp.

void FdMainWindow::on_actionSaveAs_triggered ( )
slot

Definition at line 311 of file FdMainWindow.cpp.

void FdMainWindow::on_actionShowAccount_triggered ( )
privateslot

Definition at line 404 of file FdMainWindow.cpp.

void FdMainWindow::on_actionShowEntry_triggered ( )
privateslot

Definition at line 409 of file FdMainWindow.cpp.

void FdMainWindow::open ( QString  filePath)
privateslot

Definition at line 282 of file FdMainWindow.cpp.

void FdMainWindow::openRecentFile ( )
privateslot

Definition at line 298 of file FdMainWindow.cpp.

void FdMainWindow::setDockText ( QString  text = "")

Sets the content of the dock widget to text

Definition at line 188 of file FdMainWindow.cpp.

void FdMainWindow::subwindowAboutToClose ( )

Deactives windows actions, case all windows are closed.

Definition at line 539 of file FdMainWindow.cpp.

void FdMainWindow::updateOpenRecentFileActions ( QString  file)
private

Definition at line 240 of file FdMainWindow.cpp.

Member Data Documentation

TabRole FdMainWindow::mActiveTab
private

Definition at line 44 of file FdMainWindow.hpp.

QList<QAction*> FdMainWindow::mContextMenuActionsAccount
private

Definition at line 50 of file FdMainWindow.hpp.

QList<QAction*> FdMainWindow::mContextMenuActionsCoa
private

Definition at line 47 of file FdMainWindow.hpp.

QList<QAction*> FdMainWindow::mContextMenuActionsEdit
private

Definition at line 46 of file FdMainWindow.hpp.

QList<QAction*> FdMainWindow::mContextMenuActionsJournal
private

Definition at line 48 of file FdMainWindow.hpp.

QList<QAction*> FdMainWindow::mContextMenuActionsResults
private

Definition at line 49 of file FdMainWindow.hpp.

QList<QAction*> FdMainWindow::mRecentOpenedFiles
private

Definition at line 45 of file FdMainWindow.hpp.

FdMainWindow * FdMainWindow::self = 0
staticprivate

Definition at line 43 of file FdMainWindow.hpp.


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