Qmmp
uifactory.h
1 /***************************************************************************
2  * Copyright (C) 2011-2019 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 #include "qmmpui_export.h"
24 
25 class QObject;
26 class QDialog;
27 class QString;
28 class QWidget;
29 class Control;
30 class General;
31 
34 class QMMPUI_EXPORT UiProperties
35 {
36 public:
41  {
42  hasAbout = false;
43  }
44  QString name;
45  QString shortName;
46  bool hasAbout;
47 };
51 class UiFactory
52 {
53 public:
57  virtual ~UiFactory() {}
61  virtual UiProperties properties() const = 0;
65  virtual QObject *create() = 0;
70  virtual void showAbout(QWidget *parent) = 0;
74  virtual QString translation() const = 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:34
virtual void showAbout(QWidget *parent)=0
virtual UiProperties properties() const =0
QString name
Definition: uifactory.h:44
UiProperties()
Definition: uifactory.h:40
User interface plugin interface.
Definition: uifactory.h:51
virtual ~UiFactory()
Definition: uifactory.h:57
QString shortName
Definition: uifactory.h:45
virtual QString translation() const =0
Helper class to store user interface plugin properies.
Definition: uifactory.h:34
virtual QObject * create()=0
bool hasAbout
Definition: uifactory.h:46