mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -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.
36 lines
762 B
C++
36 lines
762 B
C++
#pragma once
|
|
#include "export-symbol-helper.hpp"
|
|
|
|
#include <QPlainTextEdit>
|
|
|
|
namespace advss {
|
|
|
|
class ResizingPlainTextEdit : public QPlainTextEdit {
|
|
Q_OBJECT
|
|
public:
|
|
ResizingPlainTextEdit(QWidget *parent, const int scrollAt = 10,
|
|
const int minLines = 3,
|
|
const int paddingLines = 2);
|
|
virtual ~ResizingPlainTextEdit(){};
|
|
EXPORT int maxLength();
|
|
EXPORT void setMaxLength(int maxLength);
|
|
|
|
protected:
|
|
bool eventFilter(QObject *obj, QEvent *event) override;
|
|
|
|
private slots:
|
|
void ResizeTexteditArea();
|
|
void PreventExceedingMaxLength();
|
|
|
|
private:
|
|
void AddHeightForScrollBar(bool addHeight);
|
|
|
|
const int _scrollAt;
|
|
const int _minLines;
|
|
const int _paddingLines;
|
|
int _maxLength = -1;
|
|
int _hScrollBarAddedHeight = 0;
|
|
};
|
|
|
|
} // namespace advss
|