KdeInitInterface
git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@115 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
34
src/plugins/interfaces/IKdeInit.h
Normal file
34
src/plugins/interfaces/IKdeInit.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2005-2006 by Tarek Saidi *
|
||||
* tarek.saidi@arcor.de *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QApplication>
|
||||
|
||||
#ifndef _I_KDE_INIT_H_
|
||||
#define _I_KDE_INIT_H_
|
||||
|
||||
class IKdeInit{
|
||||
public:
|
||||
virtual ~IKdeInit(){}
|
||||
virtual QApplication* getMainAppObject(int argc, char** argv)=0;
|
||||
};
|
||||
Q_DECLARE_INTERFACE(IKdeInit,"org.KeePassX.KdeInitInterface/1.0")
|
||||
|
||||
#endif
|
||||
@@ -17,7 +17,7 @@
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <kapplication.h>
|
||||
#include <kfiledialog.h>
|
||||
#include "keepassx-kde.h"
|
||||
|
||||
@@ -34,4 +34,9 @@ QStringList KdePlugin::openExistingFilesDialog(QWidget* parent,QString title,QSt
|
||||
return QStringList();
|
||||
}
|
||||
|
||||
QString KdePlugin::saveFileDialog(QWidget* parent,QString title,QString dir,QStringList Filters,bool OverWriteWarn){return QString();}
|
||||
QString KdePlugin::saveFileDialog(QWidget* parent,QString title,QString dir,QStringList Filters,bool OverWriteWarn){return QString();}
|
||||
|
||||
QApplication* KdePlugin::getMainAppObject(int argc, char** argv){
|
||||
|
||||
|
||||
}
|
||||
@@ -21,11 +21,13 @@
|
||||
#include <QtPlugin>
|
||||
#include <QObject>
|
||||
#include "../interfaces/IFileDialog.h"
|
||||
#include "../interfaces/IKdeInit.h"
|
||||
|
||||
|
||||
class KdePlugin:public QObject,public IFileDialog{
|
||||
class KdePlugin:public QObject,public IFileDialog,public IKdeInit{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(IFileDialog)
|
||||
Q_INTERFACES(IKdeInit)
|
||||
public:
|
||||
virtual QString openExistingFileDialog(QWidget* parent,QString title,QString dir,
|
||||
QStringList Filters);
|
||||
@@ -33,5 +35,6 @@ class KdePlugin:public QObject,public IFileDialog{
|
||||
QStringList Filters);
|
||||
virtual QString saveFileDialog(QWidget* parent,QString title,QString dir,
|
||||
QStringList Filters,bool ShowOverwriteWarning=true);
|
||||
virtual QApplication* getMainAppObject(int argc, char** argv);
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user