Qmmp
uifactory.h
1 /***************************************************************************
2  * Copyright (C) 2011 by Ilya Kotov *
3  * forkotov02@ya.ru *
4  * *
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; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 #ifndef UIFACTORY_H
21 #define UIFACTORY_H
22 
23 class QObject;
24 class QTranslator;
25 class QDialog;
26 class QString;
27 class QWidget;
28 class Control;
29 class General;
30 
34 {
35 public:
40  {
41  hasAbout = false;
42  }
43  QString name;
44  QString shortName;
45  bool hasAbout;
46 };
50 class UiFactory
51 {
52 public:
56  virtual ~UiFactory() {}
60  virtual const UiProperties properties() const = 0;
64  virtual QObject *create() = 0;
69  virtual void showAbout(QWidget *parent) = 0;
74  virtual QTranslator *createTranslator(QObject *parent) = 0;
75 };
76 
77 Q_DECLARE_INTERFACE(UiFactory, "UiFactory/1.0")
78 #endif
The General class provides simple access to general plugins.
Definition: general.h:33
QString name
Definition: uifactory.h:43
UiProperties()
Definition: uifactory.h:39
User interface plugin interface.
Definition: uifactory.h:50
virtual ~UiFactory()
Definition: uifactory.h:56
QString shortName
Definition: uifactory.h:44
Helper class to store user interface plugin properies.
Definition: uifactory.h:33
bool hasAbout
Definition: uifactory.h:45