/***************************************************************************
* *
* copyright (C) 2003 by Michael Buesch *
* email: fsdeveloper@yahoo.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License version 2 *
* as published by the Free Software Foundation. *
* *
***************************************************************************/
#ifndef PWG_H
#define PWG_H
//#ifdef HAVE_CONFIG_H
#include <config.h>
//#endif
#include <kapp.h>
#include <kconfig.h>
#include <qwidget.h>
#include "mainwnd.h"
#include "genpw.h"
#include "pwgtray.h"
#define PWG_CONFIG_FILE "pwgrc"
/** PwG is the base class of the project */
class PwG : public mainwnd
{
Q_OBJECT
public:
/** construtor */
PwG(QWidget* parent=0, const char *name=0);
/** destructor */
~PwG();
public slots:
/** generate password now button pressed */
void genNowButton_slot();
/** quit button pressed */
void quitButton_slot();
/** about button clicked */
void aboutButton_slot();
/** a new password is available from "generate" */
void newPwAvailable_slot(string pw);
/** one checkbox of the "charset-checkboxes" has changed state */
void charsetChanged_slot();
/** options button clicked */
void optionsButton_slot();
/** pushes the progress-bar */
void pushProgressBar_slot(int totalSteps, int progress);
/** enable/disable UI */
void enableInterface(bool enable = true);
/** select filter button pressed */
void selectFilterButton_slot();
/** blink filter-status-led from green to red and back */
void blinkFilterLed_slot();
/** if connected to rejected-signal of GenPw, this can inform the user about */
void handleRejectedChar_slot(char);
/** generating HOWTO button pressed */
void genHowtoButton_slot();
/** undock button in tray icon pressed */
void trayUndockButton_slot();
protected slots:
/** timer timeout for blinking filter-led */
void timeoutFilterLed_slot();
protected:
/** GenPw object */
GenPw *generate;
/** System tray */
PwGtray *tray;
/** config file */
KConfig *confFile;
/** true if the filter-led is blinking at the moment (timeout is running) */
bool filterLedBlinking;
protected:
/** checks if charset selection doesn't collide with filter selection */
bool checkFilterCollision();
};
#endif
syntax highlighted by Code2HTML, v. 0.9.1