added new view for empty folders in YACReaderLibrary that shows a list with all the subfolders

TODO ?use a special case for the root folder?
This commit is contained in:
Luis Ángel San Martín
2014-07-09 17:38:12 +02:00
parent 9f53ae6efc
commit 1b2f33d0c6
14 changed files with 322 additions and 122 deletions

View File

@ -0,0 +1,32 @@
#ifndef EMPTY_FOLDER_WIDGET_H
#define EMPTY_FOLDER_WIDGET_H
#include <QWidget>
#include <QModelIndex>
class QLabel;
class QListView;
class QStringListModel;
class EmptyFolderWidget : public QWidget
{
Q_OBJECT
public:
explicit EmptyFolderWidget(QWidget *parent = 0);
void setSubfolders(const QModelIndex & mi, const QStringList & foldersNames);
signals:
void subfolderSelected(QModelIndex, int);
public slots:
void onItemClicked(const QModelIndex & mi);
protected:
QLabel * iconLabel;
QLabel * titleLabel;
QListView * foldersView;
QModelIndex parent;
QStringListModel * subfoldersModel;
void paintEvent(QPaintEvent *);
};
#endif // EMPTY_FOLDER_WIDGET_H