Files
Sourcetrail/src/lib_gui/qt/element/QtBookmarkCategory.h
T
mlangkabel dfc6d88432 build: search headers in all source directories
* removed paths in include directives
* changed cmake to provide necessary header search paths
* changed name of version.h to productVersion.h due to name conflict
2018-09-18 19:00:18 +02:00

56 lines
1.0 KiB
C++

#ifndef QT_BOOKMARK_CATEGORY_H
#define QT_BOOKMARK_CATEGORY_H
#include <QFrame>
#include "BookmarkController.h"
#include "ControllerProxy.h"
#include "types.h"
class QLabel;
class QPushButton;
class QTreeWidgetItem;
class QtBookmarkCategory
: public QFrame
{
Q_OBJECT
public:
QtBookmarkCategory(ControllerProxy<BookmarkController>* controllerProxy);
~QtBookmarkCategory();
void setName(const std::wstring& name);
std::wstring getName() const;
void setId(const Id id);
Id getId() const;
void setTreeWidgetItem(QTreeWidgetItem* treeItem);
void updateArrow();
public slots:
void expandClicked();
protected:
virtual void enterEvent(QEvent *event);
virtual void leaveEvent(QEvent *event);
private slots:
void deleteClicked();
private:
ControllerProxy<BookmarkController>* m_controllerProxy;
QLabel* m_name;
Id m_id;
QPushButton* m_expandButton;
QPushButton* m_deleteButton;
QTreeWidgetItem* m_treeItem; // store a pointer to the 'parent' tree item to enable the custom expand button
};
#endif // QT_BOOKMARK_CATEGORY_H