-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
129 lines (117 loc) · 3.23 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
118
119
120
121
122
123
124
125
126
127
128
129
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
//debug
//#include <iostream>
//#include <string>
//debug
#include <QMainWindow>
#include <QtGlobal>
#include <QLineEdit>
#include <QSystemTrayIcon>
#include <QButtonGroup>
#include <QPushButton>
#include <QComboBox>
#include <QLabel>
#include <QFile>
#include <QList>
#include <phonon/audiooutput.h>
#include <phonon/seekslider.h>
#include <phonon/mediaobject.h>
#include <phonon/volumeslider.h>
#include <phonon/backendcapabilities.h>
////nce
//#include <phonon/effect.h>
//#include <phonon/effectparameter.h>
//#include <phonon/effectwidget.h>
//#include <phonon/videowidget.h>
//#include <QtGui/QWidget>
//#include <QtGui/QApplication>
//#include <QtCore/QTimerEvent>
//#include <QtGui/QShowEvent>
//#include <QtGui/QIcon>
//#include <QtCore/QBasicTimer>
//#include <QtGui/QAction>
////nce
#define LISTFILE "kiloMusicList.txt"
#define UNSELECT "<δѡÔñ>"
#define DEFAULTTITLE "ǧºÕ×È(KiloHz)²¥·ÅÆ÷"
QT_BEGIN_NAMESPACE
class QAction;
class QTableWidget;
class QLCDNumber;
QT_END_NAMESPACE
class MediaPlayer;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow();
QSize sizeHint() const {
return QSize(417,370);
}
private slots:
void addFiles();
void about();
void stateChanged(Phonon::State newState, Phonon::State oldState);
void metaStateChanged(Phonon::State newState, Phonon::State oldState);
void changePausedState(void);
void tick(qint64 time);
void sourceChanged(const Phonon::MediaSource &source);
void aboutToFinish();
void tableClicked(int row,int column);
void goToNextMusic();
void goToPrevMusic();
void goToCurrentMusic();
void turnUp();
void turnDown();
void selectionChanged();
void deleteCurrentItem();
void clearAll();
void setShowMsgState();
void searchMusic(QString str);
void searchNext();
void showWin(QSystemTrayIcon::ActivationReason reason);
private:
void setupActions();
void setupMenus();
void setupUi();
void setupTrayIcon();
void loadList();
void addItemToTable(QString fileName);
void changeMusic(bool next);
void showMusicMsg();
void turnItemUp(bool up);
void writeList();
int searchTable(int begin,int end,QString str);
Phonon::SeekSlider *seekSlider;
Phonon::MediaObject *mediaObject;
Phonon::MediaObject *metaInfoResolver;
Phonon::AudioOutput *audioOutput;
Phonon::VolumeSlider *volumeSlider;
QList<Phonon::MediaSource> sources;
QAction *pauseAction;
QAction *stopAction;
QAction *nextAction;
QAction *prevAction;
QAction *addFilesAction;
QAction *exitAction;
QAction *aboutAction;
QAction *aboutQtAction;
QAction *deleteFileAction;
QAction *clearAllAction;
QAction *goUpAction;
QAction *goDownAction;
QAction *showWindowAction;
QAction *setShowMsgAction;
QLabel *musicInfo;
QLCDNumber *timeLcd;
QTableWidget *musicTable;
QAction *goToCurrentAction;
QComboBox *plyModeBox;
QSystemTrayIcon *trayIcon;
QMenu *trayIconMenu;
QLineEdit *searchLine;
QPushButton *searchNextButton;
bool showMsg;
};
#endif