Cleanup formatting

This commit is contained in:
Gary Talent 2021-07-29 02:47:40 -05:00
parent db22459f46
commit a6ecc22d78
5 changed files with 25 additions and 24 deletions

View File

@ -12,7 +12,8 @@
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
QApplication::setApplicationName(QObject::tr("Slide Controller 9000"));
MainWindow w;
w.show();
return a.exec();
return QApplication::exec();
}

View File

@ -18,17 +18,17 @@
class MainWindow: public QMainWindow {
Q_OBJECT
private:
OBSClient m_obsClient;
private:
OBSClient m_obsClient;
OpenLPClient m_openlpClient;
bool m_openLpConnected = false;
bool m_obsConnected = false;
public:
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow() override = default;
private slots:
private slots:
void openLpConnectionInit();
void openLpConnectionLost();

View File

@ -16,16 +16,16 @@
class OBSClient: public QObject {
Q_OBJECT
private:
const QString BaseUrl = QString("http://") + SlideHost + ":9302";
private:
const QString BaseUrl = QString("http://") + SlideHost + ":9302";
QNetworkAccessManager *m_nam = new QNetworkAccessManager(this);
QNetworkAccessManager *m_pollingNam = new QNetworkAccessManager(this);
QTimer m_pollTimer;
public:
public:
explicit OBSClient(QObject *parent = nullptr);
public slots:
public slots:
void setScene(QString scene);
void showSlides();
@ -34,7 +34,7 @@ class OBSClient: public QObject {
void setSlidesVisible(int state);
private:
private:
void get(QString url);
void poll();

View File

@ -18,12 +18,12 @@
class OpenLPClient: public QObject {
Q_OBJECT
private:
struct Song {
private:
struct Song {
QString name;
QString id;
};
const QString BaseUrl = QString("http://") + SlideHost + ":4316";
const QString BaseUrl = QString("http://") + SlideHost + ":4316";
QNetworkAccessManager *m_nam = new QNetworkAccessManager(this);
QNetworkAccessManager *m_pollingNam = new QNetworkAccessManager(this);
QNetworkAccessManager *m_songListNam = new QNetworkAccessManager(this);
@ -33,10 +33,10 @@ class OpenLPClient: public QObject {
int m_currentServiceId = -1;
QString m_currentSongId;
public:
public:
explicit OpenLPClient(QObject *parent = nullptr);
public slots:
public slots:
void nextSlide();
void prevSlide();
@ -53,14 +53,14 @@ class OpenLPClient: public QObject {
void changeSlide(int slide);
private:
private:
void get(QString url);
void requestSongList();
void requestSlideList();
private slots:
private slots:
void poll();
void handleGeneralResponse(QNetworkReply *reply);
@ -71,7 +71,7 @@ class OpenLPClient: public QObject {
void handleSlideListResponse(QNetworkReply *reply);
signals:
signals:
void pollUpdate(QString songId, int slideNum);
void pollFailed();

View File

@ -11,15 +11,15 @@
class SlideView: public QWidget {
Q_OBJECT
private:
class QTableWidget *m_slideTable = nullptr;
private:
class QTableWidget *m_slideTable = nullptr;
class QComboBox *m_songSelector = nullptr;
QString m_currentSong;
int m_currentSlide = -1;
public:
public:
explicit SlideView(QWidget *parent = nullptr);
public slots:
public slots:
void pollUpdate(QString songId, int slideNum);
void songListUpdate(QStringList songList);
@ -28,10 +28,10 @@ class SlideView: public QWidget {
void reset();
private slots:
private slots:
void changeSong(int song);
signals:
signals:
void songChanged(int);
void slideChanged(int);