Files
oak-editor/app/widget/nodetreeview/nodetreeview.h
T
itsmattkc 75d4cd899b use hardcoded namespace
The macro defined namespaces confused the hell out of lupdate and more or less broke translations permanently. Looks like the only way we can do it is to have a hardcoded namespace, which goes against my instinct, but honestly how likely is it that we'll change the namespace anyway (I guess forks might want to do it, but that's their problem ;) )
2020-11-17 20:24:42 +11:00

63 lines
1.0 KiB
C++

#ifndef NODETREEVIEW_H
#define NODETREEVIEW_H
#include <QTreeWidget>
#include "node/node.h"
namespace olive {
class NodeTreeView : public QTreeWidget
{
Q_OBJECT
public:
NodeTreeView(QWidget *parent = nullptr);
bool IsNodeEnabled(Node* n) const;
bool IsInputEnabled(NodeInput* i) const;
void SetOnlyShowKeyframable(bool e)
{
only_show_keyframable_ = e;
}
public slots:
void SetNodes(const QVector<Node *> &nodes);
signals:
void NodeEnableChanged(Node* n, bool e);
void InputEnableChanged(NodeInput* i, bool e);
protected:
virtual void changeEvent(QEvent* e) override;
private:
void Retranslate();
enum ItemType {
kItemTypeNode,
kItemTypeInput
};
static const int kItemType = Qt::UserRole;
static const int kItemPointer = Qt::UserRole + 1;
QVector<Node*> nodes_;
QVector<Node*> disabled_nodes_;
QVector<NodeInput*> disabled_inputs_;
bool only_show_keyframable_;
private slots:
void ItemCheckStateChanged(QTreeWidgetItem* item, int column);
};
}
#endif // NODETREEVIEW_H