1 /***************************************************************************
2 * Copyright (C) 2005 by Tarek Saidi *
3 * tarek.saidi@arcor.de *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; version 2 of the License. *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
18 ***************************************************************************/
23 #include "mainwindow.h"
25 QString findPlugin(const QString& filename);
27 void initAppPaths(int argc, char **argv);
32 bool parse(const QStringList& argv);
33 bool preparse(int argc,char** argv);
34 static void printHelp();
35 QString error() {return Error;}
36 QString file() {return File;}
37 QString configLocation() {return ConfigLocation;}
38 QString language() {return Language;}
39 bool startMinimized() {return StartMinimized;}
40 bool startLocked() {return StartLocked;}
41 bool help() {return Help;}
42 void setFile(const QString& filename) {File = filename;};
46 QString ConfigLocation;
53 class EventListener : public QObject {
58 EventListener() { pMainWindow = NULL; };
59 inline QString file() { return pFile; };
60 inline void setMainWin(KeepassMainWindow* mainWin) {
61 pMainWindow = mainWin;
66 KeepassMainWindow* pMainWindow;
70 bool eventFilter(QObject*, QEvent* event);