Files
yacreader/custom_widgets/yacreader_library_item_widget.h
2026-02-19 18:06:32 +01:00

51 lines
965 B
C++

#ifndef YACREADER_LIBRARY_ITEM_WIDGET_H
#define YACREADER_LIBRARY_ITEM_WIDGET_H
#include <QWidget>
#include <QPixmap>
#include "themable.h"
class QLabel;
class QToolButton;
class QMouseEvent;
class QEvent;
class YACReaderLibraryItemWidget : public QWidget, protected Themable
{
Q_OBJECT
public:
YACReaderLibraryItemWidget(QString name, QString path, QWidget *parent = 0);
QString name;
QString path;
signals:
void selected(QString, QString);
void showOptions();
public slots:
void showUpDownButtons(bool show);
// bool eventFilter(QObject *object, QEvent *event);
void select();
void deselect();
void setName(const QString &name);
private:
QLabel *icon;
QLabel *nameLabel;
QLabel *optionsIconLabel;
QToolButton *options;
QToolButton *up;
QToolButton *down;
bool isSelected;
protected:
void applyTheme(const Theme &theme) override;
};
#endif // YACREADER_LIBRARY_ITEM_WIDGET_H