1 #ifndef YACREADER_LIBRARY_ITEM_WIDGET_H
2 #define YACREADER_LIBRARY_ITEM_WIDGET_H
3 
4 #include <QWidget>
5 
6 class QLabel;
7 class QToolButton;
8 class QMouseEvent;
9 class QEvent;
10 
11 class YACReaderLibraryItemWidget : public QWidget
12 {
13     Q_OBJECT
14 
15 public:
16     YACReaderLibraryItemWidget(QString name, QString path, QWidget *parent = 0);
17     QString name;
18     QString path;
19 
20 signals:
21     void selected(QString, QString);
22     void showOptions();
23 
24 public slots:
25     void showUpDownButtons(bool show);
26 
27     //bool eventFilter(QObject *object, QEvent *event);
28     void select();
29     void deselect();
30     void setName(const QString &name);
31 
32 private:
33     QLabel *icon;
34     QLabel *nameLabel;
35 
36     QToolButton *options;
37     QToolButton *up;
38     QToolButton *down;
39 
40     bool isSelected;
41 };
42 
43 #endif // YACREADER_LIBRARY_ITEM_WIDGET_H
44