hydrogen 1.2.3
FileBrowser.h
Go to the documentation of this file.
1/*
2 * Hydrogen
3 * Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4 * Copyright(c) 2008-2024 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
5 *
6 * http://www.hydrogen-music.org
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY, without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see https://www.gnu.org/licenses
20 *
21 */
22
23#ifndef FILE_BROWSER_H
24#define FILE_BROWSER_H
25
26
27#include <core/Object.h>
28
29#include <QtGui>
30#include <QtWidgets>
31
33class FileBrowser : public QWidget, private H2Core::Object<FileBrowser>
34{
36 Q_OBJECT
37 public:
38 explicit FileBrowser( QWidget* pParent );
40
41 private slots:
42 void on_fileList_ItemChanged( QListWidgetItem * current, QListWidgetItem * previous );
43 void on_fileList_ItemActivated( QListWidgetItem* );
44
45 void on_dirList_ItemActivated( QListWidgetItem* );
46 void on_upBtnClicked();
47 void on_playBtnClicked();
48
49 private:
51 QPushButton* m_pUpBtn;
52 QLabel *m_pFileInfo;
53 QListWidget *m_pDirList;
54 QListWidget *m_pFileList;
56
57
58 void loadDirectoryTree( const QString& basedir );
59 void updateFileInfo( QString sFilename, unsigned nSampleRate, unsigned nBytes );
60
61};
62
63
64#endif
#define H2_OBJECT(name)
Definition Object.h:224
QLabel * m_pDirectoryLabel
Definition FileBrowser.h:50
void on_fileList_ItemChanged(QListWidgetItem *current, QListWidgetItem *previous)
QListWidget * m_pFileList
Definition FileBrowser.h:54
void on_fileList_ItemActivated(QListWidgetItem *)
void on_playBtnClicked()
QPushButton * m_pUpBtn
Definition FileBrowser.h:51
QLabel * m_pFileInfo
Definition FileBrowser.h:52
void on_dirList_ItemActivated(QListWidgetItem *)
void loadDirectoryTree(const QString &basedir)
QListWidget * m_pDirList
Definition FileBrowser.h:53
void on_upBtnClicked()
QDir m_directory
Definition FileBrowser.h:55
FileBrowser(QWidget *pParent)
void updateFileInfo(QString sFilename, unsigned nSampleRate, unsigned nBytes)