-
Notifications
You must be signed in to change notification settings - Fork 26
/
factory.h
executable file
·44 lines (44 loc) · 2.09 KB
/
factory.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef FACTORY_H
#define FACTORY_H
#include <QWidget>
#include <QMainWindow>
#include <QLabel>
#include <QPushButton>
#include <QToolButton>
#include <QLineEdit>
#include <QProgressBar>
#include <QSpinBox>
#include <QComboBox>
#include <QMediaPlayer>
#include <QMediaPlaylist>
#include <QTimer>
#include <QStyleFactory>
#include <QString>
#include <QHostAddress>
#include <QTcpSocket>
class Factory
{
public:
QLabel* CreateQLabel(QWidget *pos, int x, int y, int w, int h,
QString Text="", QString StyleSheet=DefaultStyleSheet, QFont Font=DefaultFont, Qt::Alignment s=Qt::AlignCenter);
QLabel* CreateQLabel(QMainWindow*pos,int x, int y, int w, int h,
QString Text="",QString StyleSheet=DefaultStyleSheet,QFont Font=DefaultFont,Qt::Alignment s=Qt::AlignCenter);
QLabel* CreateQLabel(QWidget* pos,QString Text="",QString StyleSheet=DefaultStyleSheet,QFont Font=DefaultFont);
QPushButton* CreateQPushButton(QWidget*pos,int x, int y, int w, int h,
QString Text="",QString StyleSheet=DefaultStyleSheet,QFont Font=DefaultFont);
QPushButton* CreateQPushButton(QMainWindow*pos,int x, int y, int w, int h,
QString Text="",QString StyleSheet=DefaultStyleSheet,QFont Font=DefaultFont);
QPushButton* CreateQPushButton(QWidget* pos,QString Text="",QString StyleSheet=DefaultStyleSheet);
QProgressBar* CreateQProgressBar(QWidget*pos,int x, int y, int w, int h,bool TextVisible);
QMediaPlayer *CreateQMediaPlayer(QWidget*pos,QUrl url,int v);
QMediaPlaylist* CreateQMediaPlaylist(QWidget* pos);
QSpinBox* CreateQSpinBox(QWidget*pos,QString StyleSheet);
QComboBox* CreateQComboBox(QWidget* pos,int index);
QLineEdit* CreateQLineEdit(QMainWindow*pos,int x, int y, int w,int h,QString StyleSheet,QFont Font);
QTcpSocket* CreateQTcpSocket(QString ServerIp, int ServerPort);
QToolButton* CreateQToolButton(QString text,int w,int h,QString url,bool Enable);
private:
static QString DefaultStyleSheet;
static QFont DefaultFont;
};
#endif // FACTORY_H