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

A dialog to create and manage bookkeeping properties. More...

#include <FdDialogBkgProperties.hpp>

Collaboration diagram for FdDialogBkgProperties:
Collaboration graph
[legend]

Signals

void accepted (FdSubWindow *subwindow)

Public Member Functions

 FdDialogBkgProperties (QWidget *parent, FdMainWindow *main)
 FdDialogBkgProperties (QWidget *parent, FdSubWindow *subwindow)

Private Slots

void on_buttonBox_accepted ()
void on_buttonBox_clicked (QAbstractButton *button)
void on_buttonBrowse_clicked ()

Private Member Functions

void init ()
bool checkDates () const
void getInputFields ()
void setInputFields ()

Private Attributes

FdSubWindowmSubwindow
FdMainWindowmMainWindow

Detailed Description

A dialog to create and manage bookkeeping properties.

This class is a QDialog widget, helping user to create or edit a bookkeeping (FdSubWindow) instance. There are two constructors :

Definition at line 33 of file FdDialogBkgProperties.hpp.

Constructor & Destructor Documentation

FdDialogBkgProperties::FdDialogBkgProperties ( QWidget *  parent,
FdMainWindow main 
)
explicit

Called to create a new bookkeeping. It creates a new FdSubWindow instance. It destroys it if the user clicks on Cancel.

Definition at line 28 of file FdDialogBkgProperties.cpp.

FdDialogBkgProperties::FdDialogBkgProperties ( QWidget *  parent,
FdSubWindow subwindow 
)

Called to modify an existing bookkeeping, contained in subwindow.

Definition at line 43 of file FdDialogBkgProperties.cpp.

Member Function Documentation

void FdDialogBkgProperties::accepted ( FdSubWindow subwindow)
signal

Emitted after completion of fields, on user request.

Emitted through the on_buttonBox_accepted() slot and caught by FdMainWindow::addSubWindow().

bool FdDialogBkgProperties::checkDates ( ) const
private

Returns false if :

  • the initial date isn't previous to the final date
  • an entry is previous to the initial date
  • an entry is later than the final date

It returns true otherwise.

Definition at line 63 of file FdDialogBkgProperties.cpp.

void FdDialogBkgProperties::getInputFields ( )
private

Fills the input fields of the dialog box, getting values from mSubwindow.

Definition at line 77 of file FdDialogBkgProperties.cpp.

void FdDialogBkgProperties::init ( )
private

Definition at line 50 of file FdDialogBkgProperties.cpp.

void FdDialogBkgProperties::on_buttonBox_accepted ( )
privateslot

Catches QDialogButtonBox::accepted() signal.

Paints the background of field inLabel in red if it has not been completed.

Paints the background of field inInitialDate and inFinaleDate if dates are incoherent.

Sets value and close the dialog box.

Definition at line 122 of file FdDialogBkgProperties.cpp.

void FdDialogBkgProperties::on_buttonBox_clicked ( QAbstractButton *  button)
privateslot

On clicking the reset button in the QDialogButtonBox, the signal QDialogButtonBox::clicked() is emitted. This slot catches the QAbstractButton and extracts its role using QDialogButtonBox::buttonRole(). If the role corresponds to the reset role, the slot resets the fields to their initial value.

Definition at line 147 of file FdDialogBkgProperties.cpp.

void FdDialogBkgProperties::on_buttonBrowse_clicked ( )
privateslot

Definition at line 154 of file FdDialogBkgProperties.cpp.

void FdDialogBkgProperties::setInputFields ( )
private

Sets values to mSubwindow.

Definition at line 101 of file FdDialogBkgProperties.cpp.

Member Data Documentation

FdMainWindow* FdDialogBkgProperties::mMainWindow
private

Definition at line 42 of file FdDialogBkgProperties.hpp.

FdSubWindow* FdDialogBkgProperties::mSubwindow
private

Pointer to the FdSubWindow containing the bookkeeping properties.

Definition at line 41 of file FdDialogBkgProperties.hpp.


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