#include <mainwindow.h>
Public Member Functions | |
void | handle_signal (int signo) |
MainWindow () throw (YAPETUI::UIException) | |
void | resize () throw (YAPETUI::UIException) |
void | run (std::string fn) |
void | run () throw (YAPETUI::UIException) |
virtual | ~MainWindow () |
Protected Member Functions | |
void | addNewRecord () |
void | bottomRightWinContent () throw (YAPETUI::UIException) |
void | changePassword () throw (YAPETUI::UIException) |
void | closeFile () |
void | createFile (std::string &filename) throw (YAPETUI::UIException) |
void | createWindow () throw (YAPETUI::UIException) |
void | deleteSelectedRecord () throw (YAPETUI::UIException) |
void | editSelectedRecord () |
void | lockScreen () const throw (YAPETUI::UIException) |
void | openFile (std::string filename) throw (YAPETUI::UIException) |
void | printTitle () throw (YAPETUI::UIException) |
bool | quit () |
void | refresh () throw (YAPETUI::UIException) |
void | saveFile () |
void | topRightWinContent () throw (YAPETUI::UIException) |
Private Member Functions | |
MainWindow (const MainWindow &) | |
const MainWindow & | operator= (const MainWindow &) |
Private Attributes | |
WINDOW * | bottomrightwin |
YAPET::File * | file |
YAPET::Key * | key |
YAPETUI::ListWidget < YAPET::PartDec > * | recordlist |
bool | records_changed |
StatusBar | statusbar |
WINDOW * | toprightwin |
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 58 of file mainwindow.h.
MainWindow::MainWindow | ( | const MainWindow & | ) | [inline, private] |
Definition at line 69 of file mainwindow.h.
MainWindow::MainWindow | ( | ) | throw (YAPETUI::UIException) |
MainWindow::~MainWindow | ( | ) | [virtual] |
Definition at line 827 of file mainwindow.cc.
References bottomrightwin, file, key, recordlist, and toprightwin.
void MainWindow::addNewRecord | ( | ) | [protected] |
Definition at line 506 of file mainwindow.cc.
References PasswordRecord::entryChanged(), file, PasswordRecord::getEncEntry(), YAPETUI::ListWidget< T >::getList(), key, StatusBar::putMsg(), recordlist, records_changed, refresh(), YAPETUI::MessageBox::run(), PasswordRecord::run(), and statusbar.
Referenced by run().
void MainWindow::bottomRightWinContent | ( | ) | throw (YAPETUI::UIException) [protected] |
Definition at line 192 of file mainwindow.cc.
References bottomrightwin, file, YAPET::File::getMasterPWSet(), key, StatusBar::putMsg(), recordlist, YAPETUI::ListWidget< T >::size(), YAPET::Key::size(), statusbar, and YAPET::YAPETException::what().
Referenced by createWindow(), and refresh().
void MainWindow::changePassword | ( | ) | throw (YAPETUI::UIException) [protected] |
Definition at line 720 of file mainwindow.cc.
References YAPETUI::ANSWER_OK, file, YAPETUI::DialogBox::getAnswer(), YAPET::File::getFilename(), PasswordDialog::getKey(), key, NEW_PW, StatusBar::putMsg(), YAPET::File::read(), recordlist, records_changed, refresh(), YAPETUI::MessageBox::run(), PasswordDialog::run(), YAPETUI::DialogBox::run(), saveFile(), YAPETUI::ListWidget< T >::setList(), YAPET::File::setNewKey(), statusbar, and YAPET::YAPETException::what().
Referenced by run().
void MainWindow::closeFile | ( | ) | [protected] |
Definition at line 489 of file mainwindow.cc.
References file, YAPETUI::ListWidget< T >::getList(), key, recordlist, and records_changed.
Referenced by createFile(), and openFile().
void MainWindow::createFile | ( | std::string & | filename | ) | throw (YAPETUI::UIException) [protected] |
Definition at line 327 of file mainwindow.cc.
References closeFile(), file, PasswordDialog::getKey(), key, NEW_PW, StatusBar::putMsg(), records_changed, YAPETUI::MessageBox::run(), PasswordDialog::run(), statusbar, and YAPET::YAPETException::what().
Referenced by openFile().
void MainWindow::createWindow | ( | ) | throw (YAPETUI::UIException) [protected] |
Definition at line 222 of file mainwindow.cc.
References bottomrightwin, bottomRightWinContent(), box(), YAPETUI::DEFAULT, YAPETUI::BaseWindow::maxX(), YAPETUI::BaseWindow::maxY(), printTitle(), recordlist, YAPETUI::Colors::setcolor(), toprightwin, and topRightWinContent().
Referenced by MainWindow(), and resize().
void MainWindow::deleteSelectedRecord | ( | ) | throw (YAPETUI::UIException) [protected] |
Definition at line 590 of file mainwindow.cc.
References YAPETUI::ANSWER_OK, YAPETUI::ListWidget< T >::deleteSelectedItem(), YAPETUI::DialogBox::getAnswer(), StatusBar::putMsg(), recordlist, records_changed, refresh(), YAPETUI::ListWidget< T >::refresh(), YAPETUI::MessageBox::run(), YAPETUI::DialogBox::run(), and statusbar.
Referenced by run().
void MainWindow::editSelectedRecord | ( | ) | [protected] |
Definition at line 547 of file mainwindow.cc.
References PasswordRecord::entryChanged(), file, PasswordRecord::getEncEntry(), YAPETUI::ListWidget< T >::getSelectedItem(), key, StatusBar::putMsg(), recordlist, records_changed, refresh(), YAPETUI::ListWidget< T >::replaceCurrentItem(), YAPETUI::MessageBox::run(), PasswordRecord::run(), YAPETUI::ListWidget< T >::size(), and statusbar.
Referenced by run().
void MainWindow::handle_signal | ( | int | signo | ) |
Definition at line 971 of file mainwindow.cc.
References lockScreen(), refresh(), and YAPETUI::BaseWindow::refreshAll().
Referenced by Alarm::process().
void MainWindow::lockScreen | ( | ) | const throw (YAPETUI::UIException) [protected] |
Definition at line 648 of file mainwindow.cc.
References EXISTING_PW, file, YAPET::File::getFilename(), PasswordDialog::getKey(), key, YAPETUI::BaseWindow::resizeAll(), YAPETUI::MessageBox::run(), and PasswordDialog::run().
Referenced by handle_signal(), and run().
void MainWindow::openFile | ( | std::string | filename | ) | throw (YAPETUI::UIException) [protected] |
Definition at line 370 of file mainwindow.cc.
References YAPETUI::ANSWER_OK, closeFile(), createFile(), EXISTING_PW, file, YAPETUI::DialogBox::getAnswer(), PasswordDialog::getKey(), key, StatusBar::putMsg(), YAPET::File::read(), recordlist, refresh(), PasswordDialog::run(), YAPETUI::MessageBox::run(), YAPETUI::DialogBox::run(), YAPETUI::ListWidget< T >::setList(), statusbar, and YAPET::YAPETException::what().
Referenced by run().
const MainWindow& MainWindow::operator= | ( | const MainWindow & | ) | [inline, private] |
Definition at line 70 of file mainwindow.h.
void MainWindow::printTitle | ( | ) | throw (YAPETUI::UIException) [protected] |
Definition at line 136 of file mainwindow.cc.
References YAPETUI::DEFAULT, YAPETUI::BaseWindow::maxX(), and YAPETUI::Colors::setcolor().
Referenced by createWindow(), and refresh().
bool MainWindow::quit | ( | ) | [protected] |
Definition at line 623 of file mainwindow.cc.
References YAPETUI::ANSWER_OK, YAPETUI::DialogBox::getAnswer(), StatusBar::putMsg(), records_changed, refresh(), YAPETUI::DialogBox::run(), saveFile(), and statusbar.
Referenced by run().
void MainWindow::refresh | ( | ) | throw (YAPETUI::UIException) [protected, virtual] |
Implements YAPETUI::BaseWindow.
Definition at line 295 of file mainwindow.cc.
References bottomrightwin, bottomRightWinContent(), box(), printTitle(), recordlist, StatusBar::refresh(), YAPETUI::ListWidget< T >::refresh(), statusbar, toprightwin, and topRightWinContent().
Referenced by addNewRecord(), changePassword(), deleteSelectedRecord(), editSelectedRecord(), handle_signal(), openFile(), quit(), and run().
void MainWindow::resize | ( | ) | throw (YAPETUI::UIException) [virtual] |
Implements YAPETUI::BaseWindow.
Definition at line 276 of file mainwindow.cc.
References bottomrightwin, createWindow(), YAPETUI::BaseWindow::maxX(), YAPETUI::BaseWindow::maxY(), recordlist, YAPETUI::ListWidget< T >::resize(), and toprightwin.
void MainWindow::run | ( | std::string | fn | ) |
Definition at line 945 of file mainwindow.cc.
References file, key, openFile(), StatusBar::putMsg(), refresh(), run(), and statusbar.
void MainWindow::run | ( | ) | throw (YAPETUI::UIException) |
Definition at line 842 of file mainwindow.cc.
References addNewRecord(), changePassword(), deleteSelectedRecord(), editSelectedRecord(), file, YAPETUI::ListWidget< T >::focus(), YAPET::File::getFilename(), FileOpen::getFilepath(), FileOpen::isCanceled(), key, KEY_REFRESH, lockScreen(), openFile(), StatusBar::putMsg(), quit(), recordlist, refresh(), YAPETUI::BaseWindow::refreshAll(), YAPETUI::BaseWindow::resizeAll(), FileOpen::run(), saveFile(), YAPETUI::BaseWindow::setTimeout(), statusbar, and YAPETUI::BaseWindow::suspendTimeout().
void MainWindow::saveFile | ( | ) | [protected] |
Definition at line 468 of file mainwindow.cc.
References file, YAPET::File::getFilename(), YAPETUI::ListWidget< T >::getList(), key, StatusBar::putMsg(), recordlist, records_changed, YAPETUI::MessageBox::run(), YAPET::File::save(), statusbar, and YAPET::YAPETException::what().
Referenced by changePassword(), quit(), and run().
void MainWindow::topRightWinContent | ( | ) | throw (YAPETUI::UIException) [protected] |
Definition at line 150 of file mainwindow.cc.
References KeyDesc::desc, KeyDesc::key, toprightwin, KeyDesc::x, and KeyDesc::y.
Referenced by createWindow(), and refresh().
WINDOW* MainWindow::bottomrightwin [private] |
Definition at line 61 of file mainwindow.h.
Referenced by bottomRightWinContent(), createWindow(), refresh(), resize(), and ~MainWindow().
YAPET::File* MainWindow::file [private] |
Definition at line 67 of file mainwindow.h.
Referenced by addNewRecord(), bottomRightWinContent(), changePassword(), closeFile(), createFile(), editSelectedRecord(), lockScreen(), openFile(), run(), saveFile(), and ~MainWindow().
YAPET::Key* MainWindow::key [private] |
Definition at line 66 of file mainwindow.h.
Referenced by addNewRecord(), bottomRightWinContent(), changePassword(), closeFile(), createFile(), editSelectedRecord(), lockScreen(), openFile(), run(), saveFile(), and ~MainWindow().
YAPETUI::ListWidget<YAPET::PartDec>* MainWindow::recordlist [private] |
Definition at line 62 of file mainwindow.h.
Referenced by addNewRecord(), bottomRightWinContent(), changePassword(), closeFile(), createWindow(), deleteSelectedRecord(), editSelectedRecord(), openFile(), refresh(), resize(), run(), saveFile(), and ~MainWindow().
bool MainWindow::records_changed [private] |
Definition at line 64 of file mainwindow.h.
Referenced by addNewRecord(), changePassword(), closeFile(), createFile(), deleteSelectedRecord(), editSelectedRecord(), quit(), and saveFile().
StatusBar MainWindow::statusbar [private] |
Definition at line 63 of file mainwindow.h.
Referenced by addNewRecord(), bottomRightWinContent(), changePassword(), createFile(), deleteSelectedRecord(), editSelectedRecord(), openFile(), quit(), refresh(), run(), and saveFile().
WINDOW* MainWindow::toprightwin [private] |
Definition at line 60 of file mainwindow.h.
Referenced by createWindow(), refresh(), resize(), topRightWinContent(), and ~MainWindow().