Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

MainWindow Class Reference

The main window. More...

#include <mainwindow.h>

Inheritance diagram for MainWindow:
Inheritance graph
[legend]
Collaboration diagram for MainWindow:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void handle_signal (int signo)
 MainWindow (unsigned int timeout, bool fsecurity) throw (YAPET::UI::UIException)
void resize () throw (YAPET::UI::UIException)
void run (std::string fn)
void run () throw (YAPET::UI::UIException)
virtual ~MainWindow ()

Protected Member Functions

void addNewRecord ()
void bottomRightWinContent () throw (YAPET::UI::UIException)
void changePassword () throw (YAPET::UI::UIException)
void closeFile ()
void createFile (std::string &filename) throw (YAPET::UI::UIException)
void createWindow () throw (YAPET::UI::UIException)
void deleteSelectedRecord () throw (YAPET::UI::UIException)
void editSelectedRecord ()
void lockScreen () const throw (YAPET::UI::UIException)
void openFile (std::string filename) throw (YAPET::UI::UIException)
void printTitle () throw (YAPET::UI::UIException)
bool quit ()
void refresh () throw (YAPET::UI::UIException)
void saveFile ()
void searchNext ()
void searchTerm ()
void setSortOrder ()
void topRightWinContent () throw (YAPET::UI::UIException)

Private Member Functions

 MainWindow (const MainWindow &)
const MainWindowoperator= (const MainWindow &)

Private Attributes

WINDOW * bottomrightwin
YAPET::Filefile
YAPET::Keykey
unsigned int locktimeout
YAPET::UI::ListWidget
< YAPET::PartDec > * 
recordlist
bool records_changed
StatusBar statusbar
WINDOW * toprightwin
bool usefsecurity

Detailed Description

This is the main window class which shows the main menu in top right window, some information in the lower right window and the passwords stored in the file currently open in the left window.

It handles the menu key strokes and provides a screen locking function which is called after a certain number of seconds using the BaseWindow::setTimeout() method.

Definition at line 59 of file mainwindow.h.


Constructor & Destructor Documentation

MainWindow::MainWindow ( const MainWindow  )  [inline, private]

Definition at line 74 of file mainwindow.h.

MainWindow::MainWindow ( unsigned int  timeout,
bool  fsecurity 
) throw (YAPET::UI::UIException)

Definition at line 1095 of file mainwindow.cc.

MainWindow::~MainWindow (  )  [virtual]

Definition at line 1110 of file mainwindow.cc.

References bottomrightwin, file, key, recordlist, and toprightwin.


Member Function Documentation

void MainWindow::addNewRecord (  )  [protected]
void MainWindow::bottomRightWinContent (  )  throw (YAPET::UI::UIException) [protected]

Definition at line 256 of file mainwindow.cc.

References bottomrightwin, file, YAPET::File::getFileVersion(), YAPET::File::getMasterPWSet(), key, locktimeout, StatusBar::putMsg(), recordlist, records_changed, YAPET::UI::ListWidget< T >::size(), statusbar, usefsecurity, and YAPET::YAPETException::what().

Referenced by createWindow(), refresh(), and saveFile().

Here is the call graph for this function:

Here is the caller graph for this function:

void MainWindow::changePassword (  )  throw (YAPET::UI::UIException) [protected]
void MainWindow::closeFile (  )  [protected]

Definition at line 602 of file mainwindow.cc.

References file, YAPET::UI::ListWidget< T >::getList(), key, recordlist, and records_changed.

Here is the call graph for this function:

void MainWindow::createFile ( std::string &  filename  )  throw (YAPET::UI::UIException) [protected]

Definition at line 418 of file mainwindow.cc.

References PasswordDialog::getKey(), NEW_PW, YAPET::UI::MessageBox::run(), PasswordDialog::run(), and YAPET::YAPETException::what().

Here is the call graph for this function:

void MainWindow::createWindow (  )  throw (YAPET::UI::UIException) [protected]

Definition at line 309 of file mainwindow.cc.

References bottomrightwin, bottomRightWinContent(), box(), YAPET::UI::DEFAULT, YAPET::UI::BaseWindow::maxX(), YAPET::UI::BaseWindow::maxY(), printTitle(), recordlist, YAPET::UI::Colors::setcolor(), toprightwin, and topRightWinContent().

Referenced by resize().

Here is the call graph for this function:

Here is the caller graph for this function:

void MainWindow::deleteSelectedRecord (  )  throw (YAPET::UI::UIException) [protected]
void MainWindow::editSelectedRecord (  )  [protected]
void MainWindow::handle_signal ( int  signo  ) 

Definition at line 1329 of file mainwindow.cc.

References lockScreen(), refresh(), and YAPET::UI::BaseWindow::refreshAll().

Referenced by Alarm::process().

Here is the call graph for this function:

Here is the caller graph for this function:

void MainWindow::lockScreen (  )  const throw (YAPET::UI::UIException) [protected]
void MainWindow::openFile ( std::string  filename  )  throw (YAPET::UI::UIException) [protected]

Definition at line 463 of file mainwindow.cc.

References YAPET::UI::ANSWER_OK, EXISTING_PW, YAPET::UI::DialogBox::getAnswer(), PasswordDialog::getKey(), refresh(), PasswordDialog::run(), YAPET::UI::MessageBox::run(), YAPET::UI::DialogBox::run(), and YAPET::YAPETException::what().

Referenced by run().

Here is the call graph for this function:

Here is the caller graph for this function:

const MainWindow& MainWindow::operator= ( const MainWindow  )  [inline, private]

Definition at line 75 of file mainwindow.h.

void MainWindow::printTitle (  )  throw (YAPET::UI::UIException) [protected]

Definition at line 173 of file mainwindow.cc.

References YAPET::UI::DEFAULT, file, YAPET::File::getFilename(), YAPET::UI::BaseWindow::maxX(), YAPET::UI::Colors::setcolor(), and setTerminalTitle().

Referenced by createWindow(), and refresh().

Here is the call graph for this function:

Here is the caller graph for this function:

bool MainWindow::quit (  )  [protected]

Definition at line 856 of file mainwindow.cc.

References YAPET::UI::ANSWER_OK, YAPET::UI::DialogBox::getAnswer(), StatusBar::putMsg(), records_changed, refresh(), YAPET::UI::DialogBox::run(), saveFile(), and statusbar.

Referenced by run().

Here is the call graph for this function:

Here is the caller graph for this function:

void MainWindow::refresh (  )  throw (YAPET::UI::UIException) [protected, virtual]
void MainWindow::resize (  )  throw (YAPET::UI::UIException) [virtual]
void MainWindow::run ( std::string  fn  ) 

Definition at line 1300 of file mainwindow.cc.

References file, key, openFile(), StatusBar::putMsg(), refresh(), run(), and statusbar.

Here is the call graph for this function:

void MainWindow::run (  )  throw (YAPET::UI::UIException)
void MainWindow::saveFile (  )  [protected]
void MainWindow::searchNext (  )  [protected]

Definition at line 842 of file mainwindow.cc.

References file, key, StatusBar::putMsg(), recordlist, YAPET::UI::ListWidget< T >::searchNext(), YAPET::UI::ListWidget< T >::size(), and statusbar.

Referenced by run().

Here is the call graph for this function:

Here is the caller graph for this function:

void MainWindow::searchTerm (  )  [protected]
void MainWindow::setSortOrder (  )  [protected]

Definition at line 764 of file mainwindow.cc.

References YAPET::UI::ListWidget< T >::getSortOrder(), StatusBar::putMsg(), recordlist, YAPET::UI::ListWidget< T >::refresh(), YAPET::UI::MessageBox::run(), YAPET::UI::ListWidget< T >::setSortOrder(), and statusbar.

Referenced by run().

Here is the call graph for this function:

Here is the caller graph for this function:

void MainWindow::topRightWinContent (  )  throw (YAPET::UI::UIException) [protected]

Definition at line 211 of file mainwindow.cc.

References KeyDesc::desc, KeyDesc::key, toprightwin, KeyDesc::x, and KeyDesc::y.

Referenced by createWindow(), and refresh().

Here is the caller graph for this function:


Member Data Documentation

WINDOW* MainWindow::bottomrightwin [private]

Definition at line 62 of file mainwindow.h.

Referenced by bottomRightWinContent(), createWindow(), refresh(), resize(), saveFile(), and ~MainWindow().

unsigned int MainWindow::locktimeout [private]

Definition at line 70 of file mainwindow.h.

Referenced by bottomRightWinContent(), and run().

WINDOW* MainWindow::toprightwin [private]

Definition at line 61 of file mainwindow.h.

Referenced by createWindow(), refresh(), resize(), topRightWinContent(), and ~MainWindow().

bool MainWindow::usefsecurity [private]

Definition at line 72 of file mainwindow.h.

Referenced by bottomRightWinContent().


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