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

A view for displaying the journal. More...

#include <FdViewJournal.hpp>

Collaboration diagram for FdViewJournal:
Collaboration graph
[legend]

Public Slots

void dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
void setCurrentIndex (const QModelIndex &index)
void currentChanged (const QModelIndex &current, const QModelIndex &previous)
void selectionChanged (const QItemSelection &selected, const QItemSelection &deselected)
void lineEditDestroyed ()
void nextSearchResult ()

Public Member Functions

 FdViewJournal (FdSubWindow *parent)
void mouseReleaseEvent (QMouseEvent *event)
QModelIndex moveCursor (CursorAction cursorAction, Qt::KeyboardModifiers modifiers)
void keyboardSearch (const QString &search)
void editCurrentItem ()
void print (QPrinter &printer, QPainter &painter, const QRect &area)
QList< int > selectedRows () const
void setDockText () const
void writeSettings ()

Private Slots

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

Private Attributes

FdSubWindowmSubwindow
FdModelJournalmModel
FdDelegateJournalmDelegate
QTimer * mSearchTimer
QString mSearchText
QModelIndexList mSearchResults
int mCurrentResult
bool openEditor

Detailed Description

A view for displaying the journal.

This class is a user interface for FdModelJournal.

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 #JournalRole (call QObject::property("TabRole")).

Definition at line 45 of file FdViewJournal.hpp.

Constructor & Destructor Documentation

FdViewJournal::FdViewJournal ( FdSubWindow parent)
explicit

Definition at line 27 of file FdViewJournal.cpp.

Member Function Documentation

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

Definition at line 332 of file FdViewJournal.cpp.

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

Definition at line 304 of file FdViewJournal.cpp.

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

Definition at line 288 of file FdViewJournal.cpp.

void FdViewJournal::editCurrentItem ( )

Definition at line 118 of file FdViewJournal.cpp.

void FdViewJournal::keyboardSearch ( const QString &  search)

This function is reimplemented.

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

Definition at line 111 of file FdViewJournal.cpp.

void FdViewJournal::lineEditDestroyed ( )
slot

Definition at line 323 of file FdViewJournal.cpp.

void FdViewJournal::mouseReleaseEvent ( QMouseEvent *  event)

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

Definition at line 72 of file FdViewJournal.cpp.

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

Reimplemented. Pressing the tab key makes the cursor jumps from column to column. It the cursor reaches the last column of the last row, pressing the tab key creates a new empty row.

Definition at line 83 of file FdViewJournal.cpp.

void FdViewJournal::nextSearchResult ( )
slot

Definition at line 364 of file FdViewJournal.cpp.

void FdViewJournal::print ( QPrinter &  printer,
QPainter &  painter,
const QRect &  area 
)

Definition at line 124 of file FdViewJournal.cpp.

void FdViewJournal::searchTimeout ( )
privateslot

This slot is called when mSearchTimer times out. See FdModelJournal::entryByPartialLabel().

Definition at line 350 of file FdViewJournal.cpp.

QList< int > FdViewJournal::selectedRows ( ) const

Returns a list of int, each corresponding to a row number.

Definition at line 230 of file FdViewJournal.cpp.

void FdViewJournal::selectionChanged ( const QItemSelection &  selected,
const QItemSelection &  deselected 
)
slot

Definition at line 317 of file FdViewJournal.cpp.

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

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

Definition at line 298 of file FdViewJournal.cpp.

void FdViewJournal::setDockText ( ) const

Definition at line 242 of file FdViewJournal.cpp.

void FdViewJournal::writeSettings ( )

Definition at line 274 of file FdViewJournal.cpp.

Member Data Documentation

int FdViewJournal::mCurrentResult
private

Definition at line 63 of file FdViewJournal.hpp.

FdDelegateJournal* FdViewJournal::mDelegate
private

Definition at line 52 of file FdViewJournal.hpp.

FdModelJournal* FdViewJournal::mModel
private

Definition at line 51 of file FdViewJournal.hpp.

QModelIndexList FdViewJournal::mSearchResults
private

Definition at line 62 of file FdViewJournal.hpp.

QString FdViewJournal::mSearchText
private

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

Definition at line 61 of file FdViewJournal.hpp.

QTimer* FdViewJournal::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 FdViewJournal::searchTimeout().

Definition at line 57 of file FdViewJournal.hpp.

FdSubWindow* FdViewJournal::mSubwindow
private

Definition at line 50 of file FdViewJournal.hpp.

bool FdViewJournal::openEditor
private

Definition at line 64 of file FdViewJournal.hpp.


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