-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
executable file
·117 lines (94 loc) · 2.73 KB
/
mainwindow.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// checksum 0x9a77 version 0x20001
/*
This file was generated by the Mobile Qt Application wizard of Qt Creator.
MainWindow is a convenience class containing mobile device specific code
such as screen orientation handling.
It is recommended not to modify this file, since newer versions of Qt Creator
may offer an updated version of it.
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtGui/QMainWindow>
#include "common.h"
#include "networkaccess.h"
#include "wlitrack.h"
#include "ui_contextview.h"
#include "settingsdialog.h"
#include "abstractmenuwidget.h"
#include "verticalmenuwidget.h"
#include "horizontalmenuwidget.h"
#include <QKeyEvent>
#include <QListWidgetItem>
#include <QPropertyAnimation>
#include <QInputDialog>
#include <QMessageBox>
#include <QSlider>
#include <QScrollArea>
#include "commondebug.h"
#include "currentsongwidget.h"
namespace Ui {
class MainWindow;
}
enum ListType {Album,Artist,Track,File};
enum StatusFieldShown {StatusField_Title,StatusField_Artist,StatusField_Album,StatusField_SongInfo,NR_StatusFieldShown};
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
enum ScreenOrientation {
ScreenOrientationLockPortrait,
ScreenOrientationLockLandscape,
ScreenOrientationAuto
};
explicit MainWindow(QWidget *parent = 0);
virtual ~MainWindow();
void setOrientation(ScreenOrientation orientation);
void showExpanded();
void keyPressEvent(QKeyEvent *);
private:
Ui::MainWindow *ui;
Ui_ContextView *contextview;
CurrentSongWidget *currentsongview;
NetworkAccess *netaccess;
QSlider *volumeslider;
quint8 currentstatusfield;
QString listselection;
QString hostname;
QString password;
QMenu *viewmenu;
QScrollArea *menuscroller;
QAction *connectacion;
quint16 port;
AbstractMenuWidget *menuwidget;
void writeSettings();
void loadSettings();
void closeEvent(QCloseEvent *);
void updateVolumeSlider(quint8 volume);
QList<serverprofile> connectionprofiles;
SettingsDialog *settingsdialogobject;
bool searchDefaultServer();
quint8 laststate;
public slots:
void disconnected();
void applySettings(QList<serverprofile>);
void discardSettings();
protected slots:
void updateStatusLabel(status_struct tempstruct);
void showAbout();
void toggleVolumeSlider();
void changeServerVolume(int volume);
void tryConnect();
void tryDisconnect();
void openSettings();
void showFiles();
void setMaximised(bool);
void showMenu();
void hideMenu();
void showCurrentSongInfo();
void hideCurrentSongInfo();
void connected();
protected:
void focusInEvent(QFocusEvent *event);
bool event(QEvent *e);
};
#endif // MAINWINDOW_H