mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-22 01:44:49 -05:00
The "core" macro conditions and actions have been extracted out to the "base" plugin. The library now mostly contains functionality which is required across all plugins and (e.g. definitions for macro segments). The goal is to reduce the complexity and cross-dependencies and group the source files in a better way. This should relsove the "library limit of 65535 objects exceeded" build issue occuring in some Windows build environments.
63 lines
1.2 KiB
C++
63 lines
1.2 KiB
C++
#pragma once
|
|
#include "variable-string.hpp"
|
|
#include "obs-module-helper.hpp"
|
|
|
|
#include <obs-data.h>
|
|
|
|
#include <QPushButton>
|
|
#include <QListWidget>
|
|
#include <QStringList>
|
|
|
|
namespace advss {
|
|
|
|
class StringList : public QList<StringVariable> {
|
|
public:
|
|
bool Save(obs_data_t *obj, const char *name,
|
|
const char *elementName = "string") const;
|
|
bool Load(obs_data_t *obj, const char *name,
|
|
const char *elementName = "string");
|
|
|
|
friend class StringListEdit;
|
|
};
|
|
|
|
class StringListEdit : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
StringListEdit(QWidget *parent, const QString &addString = "",
|
|
const QString &addStringDescription = "",
|
|
int maxStringSize = 170, bool allowEmtpy = false);
|
|
void SetStringList(const StringList &);
|
|
void SetMaxStringSize(int);
|
|
|
|
protected:
|
|
void showEvent(QShowEvent *);
|
|
|
|
private slots:
|
|
void Add();
|
|
void Remove();
|
|
void Up();
|
|
void Down();
|
|
void Clicked(QListWidgetItem *);
|
|
signals:
|
|
void StringListChanged(const StringList &);
|
|
|
|
private:
|
|
void SetListSize();
|
|
|
|
StringList _stringList;
|
|
|
|
QListWidget *_list;
|
|
QPushButton *_add;
|
|
QPushButton *_remove;
|
|
QPushButton *_up;
|
|
QPushButton *_down;
|
|
|
|
QString _addString;
|
|
QString _addStringDescription;
|
|
int _maxStringSize = 170;
|
|
bool _allowEmpty = false;
|
|
};
|
|
|
|
} // namespace advss
|