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

A view for displaying the chart of accounts. More...

#include <FdViewCoa.hpp>

Collaboration diagram for FdViewCoa:
Collaboration graph
[legend]

Public Slots

void edit (const QModelIndex &index)
void dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
void setCurrentIndex (const QModelIndex &index)
void currentChanged (const QModelIndex &current, const QModelIndex &previous)
void nextSearchResult ()

Public Member Functions

 FdViewCoa (FdSubWindow *parent)
void mouseReleaseEvent (QMouseEvent *event)
QModelIndex moveCursor (CursorAction cursorAction, Qt::KeyboardModifiers modifiers)
void keyboardSearch (const QString &search)
int print (QPrinter &printer, QPainter &painter, const QRect &area, QRect &remainingArea)
int print (QPrinter &printer, QPainter &painter, const QRect &area, QRect &remainingArea, QFont font, int rowHeight, int tabulation, int widthLabel, int widthAmount, FdItemCoa_p parent, int pageNumber=0, int level=0)
QModelIndexList selectedItems () const
void writeSettings ()

Private Slots

void contextMenu (const QPoint &position)
void searchTimeout ()

Private Attributes

FdSubWindowmSubwindow
FdModelCoamModel
FdDelegateCoamDelegate
QTimer * mSearchTimer
QString mSearchText
QModelIndexList mSearchResults
int mCurrentResult

Detailed Description

A view for displaying the chart of accounts.

This class is a user interface for FdModelCoa.

This object is used within a FdSubWindow and is the QWidget given to one tab. It is possible to identify its type in all situations, since there is a dynamic property "TabRole" set for this QObject to #CoaRole (call QObject::property("TabRole")).

Definition at line 39 of file FdViewCoa.hpp.

Constructor & Destructor Documentation

FdViewCoa::FdViewCoa ( FdSubWindow parent)
explicit

Definition at line 26 of file FdViewCoa.cpp.

Member Function Documentation

void FdViewCoa::contextMenu ( const QPoint &  position)
privateslot

Definition at line 346 of file FdViewCoa.cpp.

void FdViewCoa::currentChanged ( const QModelIndex &  current,
const QModelIndex &  previous 
)
slot

Definition at line 334 of file FdViewCoa.cpp.

void FdViewCoa::dataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
)
slot

Definition at line 318 of file FdViewCoa.cpp.

void FdViewCoa::edit ( const QModelIndex &  index)
slot

Definition at line 312 of file FdViewCoa.cpp.

void FdViewCoa::keyboardSearch ( const QString &  search)

This function is reimplemented.

It will store search text in mSearchText till the allocated search time is out. Then, FdViewCoa::searchTimeout() is called.

Definition at line 135 of file FdViewCoa.cpp.

void FdViewCoa::mouseReleaseEvent ( QMouseEvent *  event)

Reimplemented. When the users click on a blanck area of the view, selection is cleared.

Definition at line 66 of file FdViewCoa.cpp.

QModelIndex FdViewCoa::moveCursor ( CursorAction  cursorAction,
Qt::KeyboardModifiers  modifiers 
)

Reimplemented. Pressing tab key makes the cursor move column by column.

Definition at line 77 of file FdViewCoa.cpp.

void FdViewCoa::nextSearchResult ( )
slot

Definition at line 378 of file FdViewCoa.cpp.

int FdViewCoa::print ( QPrinter &  printer,
QPainter &  painter,
const QRect &  area,
QRect &  remainingArea 
)

Definition at line 142 of file FdViewCoa.cpp.

int FdViewCoa::print ( QPrinter &  printer,
QPainter &  painter,
const QRect &  area,
QRect &  remainingArea,
QFont  font,
int  rowHeight,
int  tabulation,
int  widthLabel,
int  widthAmount,
FdItemCoa_p  parent,
int  pageNumber = 0,
int  level = 0 
)

Definition at line 165 of file FdViewCoa.cpp.

void FdViewCoa::searchTimeout ( )
privateslot

This slot is called when mSearchTimer times out. See FdModelCoa::itemByPartialText().

Definition at line 364 of file FdViewCoa.cpp.

QModelIndexList FdViewCoa::selectedItems ( ) const

Returns a list of selected items. This function will not return at the same time a child's and parent's (up to the top) index.

Definition at line 272 of file FdViewCoa.cpp.

void FdViewCoa::setCurrentIndex ( const QModelIndex &  index)
slot

Reimplemented. Defines the new index index to be the current index, but clears selection first.

Definition at line 328 of file FdViewCoa.cpp.

void FdViewCoa::writeSettings ( )

Definition at line 300 of file FdViewCoa.cpp.

Member Data Documentation

int FdViewCoa::mCurrentResult
private

Definition at line 57 of file FdViewCoa.hpp.

FdDelegateCoa* FdViewCoa::mDelegate
private

Definition at line 46 of file FdViewCoa.hpp.

FdModelCoa* FdViewCoa::mModel
private

Definition at line 45 of file FdViewCoa.hpp.

QModelIndexList FdViewCoa::mSearchResults
private

Definition at line 56 of file FdViewCoa.hpp.

QString FdViewCoa::mSearchText
private

This string holds the search text. It it reseted after mSearchTimer times out.

Definition at line 55 of file FdViewCoa.hpp.

QTimer* FdViewCoa::mSearchTimer
private

This timer is used in keyboardsearch. No search will happen until search time (see QApplication::keyboardInputInterval()) is out. This timer QTimer::timeout() signal is connected to FdViewCoa::searchTimeout().

Definition at line 51 of file FdViewCoa.hpp.

FdSubWindow* FdViewCoa::mSubwindow
private

Definition at line 44 of file FdViewCoa.hpp.


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