Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TableViewerWindow Class Reference

The main window widget of the application. More...

#include </home/clem/local/src/opie/noncore/apps/tableviewer/tableviewer.h>

Collaboration diagram for TableViewerWindow:

Collaboration graph
[legend]
List of all members.

Public Slots

void selectDocument ()
void newDocument ()
void saveDocument ()
void setDocument (const QString &)
void openDocument (const DocLnk &)
void firstItem ()
void lastItem ()
void nextItem ()
void previousItem ()
void listViewSlot ()
void browseViewSlot ()
void filterViewSlot ()
void editItemSlot ()
void newItemSlot ()
void deleteItemSlot ()
void editKeysSlot ()
void searchOnKey (int, TVVariant)
void setPrimaryKey (int)

Public Member Functions

 TableViewerWindow (QWidget *parent=0, const char *name=0, WFlags f=0)
 ~TableViewerWindow ()

Static Public Member Functions

static QString appName ()

Private Types

enum  UserState {
  BrowseState = 0, ListState, FilterState, EditState,
  FileState
}

Private Member Functions

void applyFilter ()

Private Attributes

bool dirty
QMenuBar * menu
QToolBar * navigation
TVListViewlistView
TVBrowseViewbrowseView
TVFilterViewfilterView
TVEditVieweditView
FileSelectorfileSelector
DocLnk doc
QWidgetStack * cw
DBStoreds
TableState ts
UserState current_view

Detailed Description

The main window widget of the application.

This is the main widget of the table viewer application. It is the co-ordination point.

Definition at line 39 of file tableviewer.h.


Member Enumeration Documentation

enum TableViewerWindow::UserState [private]
 

Enumeration values:
BrowseState 
ListState 
FilterState 
EditState 
FileState 

Definition at line 100 of file tableviewer.h.


Constructor & Destructor Documentation

TableViewerWindow::TableViewerWindow QWidget *  parent = 0,
const char *  name = 0,
WFlags  f = 0
 

Constructs a new TableViewerWindow

Definition at line 55 of file tableviewer.cpp.

References BrowseState, browseView, browseViewSlot(), _TableState::current_column, current_view, cw, deleteItemSlot(), dirty, doc, ds, editItemSlot(), editKeysSlot(), FALSE, fileSelector, FileState, FilterState, filterView, filterViewSlot(), firstItem(), DBStore::getKeys(), _TableState::kRep, lastItem(), ListState, listView, listViewSlot(), Opie::Core::OResource::loadPixmap(), navigation, newDocument(), newItemSlot(), nextItem(), QString::null, openDocument(), previousItem(), qApp, searchOnKey(), selectDocument(), FileSelector::setCloseVisible(), AppLnk::setName(), FileSelector::setNewVisible(), setPrimaryKey(), AppLnk::setType(), Opie::Core::OResource::SmallIcon, tr, and ts.

TableViewerWindow::~TableViewerWindow  ) 
 

Destroys the TableViewerWindow

Definition at line 172 of file tableviewer.cpp.

References dirty, and saveDocument().


Member Function Documentation

void TableViewerWindow::applyFilter  )  [private]
 

Definition at line 342 of file tableviewer.cpp.

References TVListView::addItem(), TVListView::clearItems(), d, ds, filterView, TVListView::first(), DBStore::first(), DBStore::getCurrentData(), listView, DBStore::next(), TVFilterView::passesFilter(), and TVListView::rebuildData().

Referenced by browseViewSlot(), deleteItemSlot(), listViewSlot(), and newItemSlot().

static QString TableViewerWindow::appName  )  [inline, static]
 

Definition at line 43 of file tableviewer.h.

References QString::fromLatin1().

void TableViewerWindow::browseViewSlot  )  [slot]
 

Raises the Browse View. This is a mode change for the application.

Definition at line 361 of file tableviewer.cpp.

References applyFilter(), BrowseState, browseView, _TableState::current_elem, current_view, cw, FilterState, TVListView::getCurrentData(), listView, TVBrowseView::rebuildData(), and ts.

Referenced by TableViewerWindow().

void TableViewerWindow::deleteItemSlot  )  [slot]
 

Definition at line 408 of file tableviewer.cpp.

References applyFilter(), browseView, _TableState::current_elem, dirty, ds, listView, TVBrowseView::rebuildData(), TVListView::rebuildData(), DBStore::removeItem(), TVListView::removeItem(), TRUE, and ts.

Referenced by TableViewerWindow().

void TableViewerWindow::editItemSlot  )  [slot]
 

Definition at line 385 of file tableviewer.cpp.

References browseView, _TableState::current_elem, dirty, listView, TVEditView::openEditItemDialog(), TVBrowseView::rebuildData(), TVListView::rebuildData(), TRUE, and ts.

Referenced by TableViewerWindow().

void TableViewerWindow::editKeysSlot  )  [slot]
 

Definition at line 425 of file tableviewer.cpp.

References TVListView::addItem(), browseView, TVListView::clearItems(), _TableState::current_column, d, dirty, ds, filterView, DBStore::first(), DBStore::getCurrentData(), _TableState::kRep, listView, DBStore::next(), TVKeyEdit::openEditKeysDialog(), TVFilterView::rebuildKeys(), TVListView::rebuildKeys(), TVBrowseView::rebuildKeys(), TVFilterView::reset(), TVListView::reset(), TVBrowseView::reset(), DBStore::setKeys(), TRUE, and ts.

Referenced by newDocument(), and TableViewerWindow().

void TableViewerWindow::filterViewSlot  )  [slot]
 

Raises the List View. This is a mode change for the application.

Definition at line 376 of file tableviewer.cpp.

References current_view, cw, and FilterState.

Referenced by TableViewerWindow().

void TableViewerWindow::firstItem  )  [slot]
 

Moves to the first item of the current table

Definition at line 294 of file tableviewer.cpp.

References browseView, _TableState::current_elem, TVListView::first(), TVListView::getCurrentData(), listView, TVBrowseView::rebuildData(), and ts.

Referenced by TableViewerWindow().

void TableViewerWindow::lastItem  )  [slot]
 

Moves to the lat item of the current table

Definition at line 304 of file tableviewer.cpp.

References browseView, _TableState::current_elem, TVListView::getCurrentData(), TVListView::last(), listView, TVBrowseView::rebuildData(), and ts.

Referenced by TableViewerWindow().

void TableViewerWindow::listViewSlot  )  [slot]
 

Raises the List View. This is a mode change for the application.

Definition at line 334 of file tableviewer.cpp.

References applyFilter(), current_view, cw, FilterState, and ListState.

Referenced by TableViewerWindow().

void TableViewerWindow::newDocument  )  [slot]
 

Definition at line 206 of file tableviewer.cpp.

References KeyList::addKey(), BrowseState, browseView, _TableState::current_column, current_view, cw, dirty, doc, ds, editKeysSlot(), FALSE, filterView, DBStore::getKeys(), _TableState::kRep, listView, TVFilterView::reset(), TVListView::reset(), TVBrowseView::reset(), AppLnk::setName(), AppLnk::setType(), TVVariant::String, and ts.

Referenced by TableViewerWindow().

void TableViewerWindow::newItemSlot  )  [slot]
 

Definition at line 394 of file tableviewer.cpp.

References DBStore::addItem(), applyFilter(), browseView, d, dirty, ds, listView, TVEditView::openEditItemDialog(), TVBrowseView::rebuildData(), TVListView::rebuildData(), TRUE, and ts.

Referenced by TableViewerWindow().

void TableViewerWindow::nextItem  )  [slot]
 

Moves to the next item of the current table

Definition at line 314 of file tableviewer.cpp.

References browseView, _TableState::current_elem, TVListView::getCurrentData(), listView, TVListView::next(), TVBrowseView::rebuildData(), and ts.

Referenced by TableViewerWindow().

void TableViewerWindow::openDocument const DocLnk  )  [slot]
 

Definition at line 237 of file tableviewer.cpp.

References TVListView::addItem(), BrowseState, browseView, TVListView::clearItems(), _TableState::current_column, _TableState::current_elem, current_view, cw, d, dirty, doc, ds, FALSE, filterView, TVListView::first(), DBStore::first(), TVListView::getCurrentData(), DBStore::getCurrentData(), DBStore::getKeys(), DBStore::getName(), AppLnk::isValid(), _TableState::kRep, listView, DBStore::next(), oendl, FileManager::openFile(), DBStore::openSource(), owarn, TVListView::rebuildData(), TVBrowseView::rebuildData(), TVFilterView::rebuildKeys(), TVListView::rebuildKeys(), TVBrowseView::rebuildKeys(), TVFilterView::reset(), TVListView::reset(), TVBrowseView::reset(), tr, ts, and AppLnk::type().

Referenced by setDocument(), and TableViewerWindow().

void TableViewerWindow::previousItem  )  [slot]
 

Moves to the previous item of the current table

Definition at line 324 of file tableviewer.cpp.

References browseView, _TableState::current_elem, TVListView::getCurrentData(), listView, TVListView::previous(), TVBrowseView::rebuildData(), and ts.

Referenced by TableViewerWindow().

void TableViewerWindow::saveDocument  )  [slot]
 

Definition at line 190 of file tableviewer.cpp.

References dirty, doc, ds, FALSE, oendl, owarn, FileManager::saveFile(), DBStore::saveSource(), and AppLnk::type().

Referenced by selectDocument(), and ~TableViewerWindow().

void TableViewerWindow::searchOnKey int  i,
TVVariant  v
[slot]
 

A Slot that allows for widgets above to indicate a search should be done on a specified key index for a specified value

Definition at line 463 of file tableviewer.cpp.

References browseView, _TableState::current_elem, TVListView::findItem(), TVListView::getCurrentData(), listView, TVBrowseView::rebuildData(), and ts.

Referenced by TableViewerWindow().

void TableViewerWindow::selectDocument  )  [slot]
 

Opens a file dialog and loads the file specified by the dialog

Definition at line 181 of file tableviewer.cpp.

References current_view, cw, dirty, fileSelector, FileState, FileSelector::reread(), and saveDocument().

Referenced by TableViewerWindow().

void TableViewerWindow::setDocument const QString  )  [slot]
 

Definition at line 232 of file tableviewer.cpp.

References openDocument(), and TRUE.

void TableViewerWindow::setPrimaryKey int   )  [slot]
 

Definition at line 470 of file tableviewer.cpp.

References browseView, _TableState::current_column, listView, TVBrowseView::rebuildData(), TVListView::rebuildData(), and ts.

Referenced by TableViewerWindow().


Member Data Documentation

TVBrowseView* TableViewerWindow::browseView [private]
 

Definition at line 89 of file tableviewer.h.

Referenced by browseViewSlot(), deleteItemSlot(), editItemSlot(), editKeysSlot(), firstItem(), lastItem(), newDocument(), newItemSlot(), nextItem(), openDocument(), previousItem(), searchOnKey(), setPrimaryKey(), and TableViewerWindow().

UserState TableViewerWindow::current_view [private]
 

Definition at line 108 of file tableviewer.h.

Referenced by browseViewSlot(), filterViewSlot(), listViewSlot(), newDocument(), openDocument(), selectDocument(), and TableViewerWindow().

QWidgetStack* TableViewerWindow::cw [private]
 

Definition at line 96 of file tableviewer.h.

Referenced by browseViewSlot(), filterViewSlot(), listViewSlot(), newDocument(), openDocument(), selectDocument(), and TableViewerWindow().

bool TableViewerWindow::dirty [private]
 

Definition at line 83 of file tableviewer.h.

Referenced by deleteItemSlot(), editItemSlot(), editKeysSlot(), newDocument(), newItemSlot(), openDocument(), saveDocument(), selectDocument(), TableViewerWindow(), and ~TableViewerWindow().

DocLnk TableViewerWindow::doc [private]
 

Definition at line 94 of file tableviewer.h.

Referenced by newDocument(), openDocument(), saveDocument(), and TableViewerWindow().

DBStore* TableViewerWindow::ds [private]
 

Definition at line 97 of file tableviewer.h.

Referenced by applyFilter(), deleteItemSlot(), editKeysSlot(), newDocument(), newItemSlot(), openDocument(), saveDocument(), and TableViewerWindow().

TVEditView* TableViewerWindow::editView [private]
 

Definition at line 91 of file tableviewer.h.

FileSelector* TableViewerWindow::fileSelector [private]
 

Definition at line 92 of file tableviewer.h.

Referenced by selectDocument(), and TableViewerWindow().

TVFilterView* TableViewerWindow::filterView [private]
 

Definition at line 90 of file tableviewer.h.

Referenced by applyFilter(), editKeysSlot(), newDocument(), openDocument(), and TableViewerWindow().

TVListView* TableViewerWindow::listView [private]
 

Definition at line 88 of file tableviewer.h.

Referenced by applyFilter(), browseViewSlot(), deleteItemSlot(), editItemSlot(), editKeysSlot(), firstItem(), lastItem(), newDocument(), newItemSlot(), nextItem(), openDocument(), previousItem(), searchOnKey(), setPrimaryKey(), and TableViewerWindow().

QMenuBar* TableViewerWindow::menu [private]
 

Definition at line 85 of file tableviewer.h.

QToolBar* TableViewerWindow::navigation [private]
 

Definition at line 86 of file tableviewer.h.

Referenced by TableViewerWindow().

TableState TableViewerWindow::ts [private]
 

Definition at line 98 of file tableviewer.h.

Referenced by browseViewSlot(), deleteItemSlot(), editItemSlot(), editKeysSlot(), firstItem(), lastItem(), newDocument(), newItemSlot(), nextItem(), openDocument(), previousItem(), searchOnKey(), setPrimaryKey(), and TableViewerWindow().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:53:05 2005 for OPIE by  doxygen 1.4.2