1 /***************************************************************************
2 * Copyright (C) 2005-2008 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 ***************************************************************************/
24 enum tKeyType {PASSWORD=0,KEYFILE=1,BOTH=2};
31 bool operator<(const Translation& t1, const Translation& t2);
33 #define CSTR(x)(QTextCodec::codecForLocale()->fromUnicode(x).constData())
35 const QIcon& getIcon(const QString& name);
36 const QPixmap* getPixmap(const QString& name);
37 void createBanner(QPixmap* Pixmap, const QPixmap* IconAlpha,const QString& Text,int Width);
38 void createBanner(QPixmap* Pixmap, const QPixmap* IconAlpha,const QString& Text,int Width,
39 QColor Color1, QColor Color2, QColor TextColor);
40 void openBrowser(const QString& UrlString);
41 void openBrowser(IEntryHandle* entry);
42 void showErrMsg(const QString& msg,QWidget* parent=NULL);
43 QString decodeFileError(QFile::FileError Code);
44 QString makePathRelative(const QString& Abs,const QString& Cur);
45 QString getImageFile(const QString& name);
46 bool createKeyFile(const QString& filename,QString* err, int length=32, bool Hex=true);
47 bool lockPage(void* addr, int len);
48 bool unlockPage(void* addr, int len);
49 bool syncFile(QFile* file);
50 void installTranslator();
51 bool isTranslationActive();
52 QList<Translation> getAllTranslations();
55 #define CSIDL_APPDATA 0x001a // <username>\Application Data
57 QString qtWindowsConfigPath(int type);