hydrogen 1.2.3
SoundLibraryImportDialog.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 SOUND_LIBRARY_IMPORT_DIALOG_H
24#define SOUND_LIBRARY_IMPORT_DIALOG_H
25
26
27#include "ui_SoundLibraryImportDialog_UI.h"
28#include <QNetworkReply>
29#include "../EventListener.h"
30
31#include <core/Object.h>
34
38
39class SoundLibraryImportDialog : public QDialog,
40 public Ui_SoundLibraryImportDialog_UI,
41 public H2Core::Object<SoundLibraryImportDialog>,
42 public EventListener
43{
45 Q_OBJECT
46 public:
47 SoundLibraryImportDialog( QWidget* pParent, bool bOnlineImport );
49
50 virtual void soundLibraryChangedEvent() override;
51
52 signals:
53
54 private slots:
60
62
63 void soundLibraryItemChanged( QTreeWidgetItem*, QTreeWidgetItem* );
65
66
67
68 private:
69 std::vector<H2Core::SoundLibraryInfo> m_soundLibraryList;
70
71 QTreeWidgetItem* m_pDrumkitsItem;
72 QTreeWidgetItem* m_pSongItem;
73 QTreeWidgetItem* m_pPatternItem;
74
76 void writeCachedData(const QString& fileName, const QString& data);
77 void writeCachedImage( const QString& imageFile, QPixmap& pixmap );
78 void clearImageCache();
79 QString readCachedImage( const QString& imageFile );
80 QString readCachedData(const QString& fileName);
81 QString getCachedFilename();
82 QString getCachedImageFilename();
86 void showImage( QPixmap pixmap );
87 void loadImage( QString img );
88
89};
90
91#endif
#define H2_OBJECT(name)
Definition Object.h:224
This class holds information about a soundlibrary.
This dialog is used to import a SoundLibrary file from a local file or via HTTP.
std::vector< H2Core::SoundLibraryInfo > m_soundLibraryList
bool isSoundLibraryItemAlreadyInstalled(H2Core::SoundLibraryInfo sInfo)
Is the SoundLibrary already installed?
void writeCachedData(const QString &fileName, const QString &data)
QString readCachedData(const QString &fileName)
QString readCachedImage(const QString &imageFile)
virtual void soundLibraryChangedEvent() override
void soundLibraryItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)
void on_UpdateListBtn_clicked()
Download and update the drumkit list.
void writeCachedImage(const QString &imageFile, QPixmap &pixmap)
SoundLibraryImportDialog(QWidget *pParent, bool bOnlineImport)
void on_EditListBtn_clicked()
Edit the server list.