You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.1 KiB
C++

#ifndef CMAINWINDOW_H
#define CMAINWINDOW_H
#include "cdatabase.h"
#include "calbum.h"
#include "ctrack.h"
#include <QMainWindow>
#include <QStandardItemModel>
#include <QItemSelection>
#include <QTreeView>
namespace Ui
{
class cMainWindow;
}
class cMainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit cMainWindow(QWidget *parent = 0);
~cMainWindow();
private:
Ui::cMainWindow* ui;
cDatabase* m_lpDB;
QStandardItemModel* m_lpMusicListModel;
bool m_bProcessing;
cAlbumList m_albumList;
void addFile(const QString& szFile);
void addPath(const QString& szPath);
void loadDB();
void displayDB();
QStandardItem* newItem(const QString& szText, qint32 type, const QVariant &data, Qt::Alignment align = Qt::AlignLeft, bool bold = false, bool italic = false, const QColor& foreground = QColor(), const QColor& background = QColor());
protected:
void initSettings();
private slots:
void onCustomContextMenuRequested(const QPoint &pos);
void onDoubleClicked(const QModelIndex &index);
void onPressed(const QModelIndex &index);
};
#endif // CMAINWINDOW_H