?? dialog.h
字號:
#ifndef DIALOG_H
#define DIALOG_H
#include <QDialog>
#include <QTcpSocket>
#include <QtSql>
#include <QSqlDatabase>
#include <QTextEdit>
#include <QTime>
#include <QDate>
class QDialogButtonBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QTcpSocket;
class QTextEdit;
class QSqlDatabase;
class QSqlQuery;
class QTime;
class QDate;
class Dialog : public QDialog
{
Q_OBJECT
public:
Dialog(QWidget *parent = 0);
void getip();
void writeData(QByteArray);
private:
//圖形界面
QLabel *serverLabel;
QLabel *ipInfoLabel;
QLabel *sqlipLabel;
QLabel *databaseLabel;
QLabel *sqluserLabel;
QLabel *sqlpassLabel;
QLabel *startdateLabel;
QLabel *starttimeLabel;
QComboBox *ComboBox;
QLineEdit *ipInfoLineEdit;
QLineEdit *sqlipLineEdit;
QLineEdit *databaseLineEdit;
QLineEdit *sqluserLineEdit;
QLineEdit *sqlpassLineEdit;
QLineEdit *startdateLineEdit;
QLineEdit *starttimeLineEdit;
QPushButton *beginButton;
QPushButton *quitButton;
QDialogButtonBox *buttonBox;
QTextEdit display;
//存儲服務器信息
int port;
QString host;
QSqlDatabase db;
QTcpSocket *tcpSocket;
public slots:
//從套接字讀數據,并存于數據庫中
void readFortune();
//創建數據庫連接,開始定時
void begin();
};
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -