SceneSwitcher/lib/utils/list-editor.hpp
WarmUpTill 3bc15e585c Switch QPushButton to QToolButton
This will be more consistent with the widget styles used throughout OBS
and solves a few layout issues
2024-06-20 21:41:28 +02:00

35 lines
608 B
C++

#pragma once
#include "export-symbol-helper.hpp"
#include "list-controls.hpp"
#include <QListWidget>
#include <QLayout>
namespace advss {
class ADVSS_EXPORT ListEditor : public QWidget {
Q_OBJECT
public:
ListEditor(QWidget *parent = nullptr, bool reorder = true);
protected:
void showEvent(QShowEvent *);
private slots:
virtual void Add() = 0;
virtual void Remove() = 0;
virtual void Up(){};
virtual void Down(){};
virtual void Clicked(QListWidgetItem *) {}
protected:
void UpdateListSize();
QListWidget *_list;
ListControls *_controls;
QVBoxLayout *_mainLayout;
};
} // namespace advss