mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-07 09:05:57 -05:00
Reduce text edit areas size of file, filter, source, transform segments
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#pragma once
|
||||
#include <QSpinBox>
|
||||
#include <QPlainTextEdit>
|
||||
#include "macro-action-edit.hpp"
|
||||
#include "file-selection.hpp"
|
||||
#include "resizing-text-edit.hpp"
|
||||
|
||||
#include <QSpinBox>
|
||||
|
||||
enum class FileAction {
|
||||
WRITE,
|
||||
@@ -57,7 +58,7 @@ signals:
|
||||
|
||||
protected:
|
||||
FileSelection *_filePath;
|
||||
QPlainTextEdit *_text;
|
||||
ResizingPlainTextEdit *_text;
|
||||
QComboBox *_actions;
|
||||
std::shared_ptr<MacroActionFile> _entryData;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
#include <QSpinBox>
|
||||
#include <QPlainTextEdit>
|
||||
#include "macro-action-edit.hpp"
|
||||
#include "resizing-text-edit.hpp"
|
||||
|
||||
#include <QSpinBox>
|
||||
|
||||
enum class FilterAction {
|
||||
ENABLE,
|
||||
@@ -63,7 +64,7 @@ protected:
|
||||
QComboBox *_filters;
|
||||
QComboBox *_actions;
|
||||
QPushButton *_getSettings;
|
||||
QPlainTextEdit *_settings;
|
||||
ResizingPlainTextEdit *_settings;
|
||||
std::shared_ptr<MacroActionFilter> _entryData;
|
||||
|
||||
private:
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#include "macro-action-edit.hpp"
|
||||
#include "scene-selection.hpp"
|
||||
#include "scene-item-selection.hpp"
|
||||
#include "resizing-text-edit.hpp"
|
||||
|
||||
#include <QSpinBox>
|
||||
#include <QPlainTextEdit>
|
||||
|
||||
class MacroActionSceneTransform : public MacroAction {
|
||||
public:
|
||||
@@ -61,7 +61,7 @@ protected:
|
||||
SceneSelectionWidget *_scenes;
|
||||
SceneItemSelectionWidget *_sources;
|
||||
QPushButton *_getSettings;
|
||||
QPlainTextEdit *_settings;
|
||||
ResizingPlainTextEdit *_settings;
|
||||
std::shared_ptr<MacroActionSceneTransform> _entryData;
|
||||
|
||||
private:
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
#include "macro-action-edit.hpp"
|
||||
#include "resizing-text-edit.hpp"
|
||||
|
||||
#include <QSpinBox>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QPlainTextEdit>
|
||||
|
||||
enum class SourceAction {
|
||||
ENABLE,
|
||||
@@ -63,7 +63,7 @@ protected:
|
||||
QComboBox *_sources;
|
||||
QComboBox *_actions;
|
||||
QPushButton *_getSettings;
|
||||
QPlainTextEdit *_settings;
|
||||
ResizingPlainTextEdit *_settings;
|
||||
QLabel *_warning;
|
||||
std::shared_ptr<MacroActionSource> _entryData;
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#pragma once
|
||||
#include "macro.hpp"
|
||||
#include "file-selection.hpp"
|
||||
#include "resizing-text-edit.hpp"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QComboBox>
|
||||
#include <QDateTime>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
#include <QPlainTextEdit>
|
||||
#include <QCheckBox>
|
||||
|
||||
enum class FileType {
|
||||
@@ -75,7 +75,7 @@ signals:
|
||||
protected:
|
||||
QComboBox *_fileType;
|
||||
FileSelection *_filePath;
|
||||
QPlainTextEdit *_matchText;
|
||||
ResizingPlainTextEdit *_matchText;
|
||||
QCheckBox *_useRegex;
|
||||
QCheckBox *_checkModificationDate;
|
||||
QCheckBox *_checkFileContent;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
#include "macro.hpp"
|
||||
#include "resizing-text-edit.hpp"
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QPushButton>
|
||||
#include <QPlainTextEdit>
|
||||
#include <QCheckBox>
|
||||
|
||||
enum class FilterCondition {
|
||||
@@ -67,7 +67,7 @@ protected:
|
||||
QComboBox *_filters;
|
||||
QComboBox *_conditions;
|
||||
QPushButton *_getSettings;
|
||||
QPlainTextEdit *_settings;
|
||||
ResizingPlainTextEdit *_settings;
|
||||
QCheckBox *_regex;
|
||||
|
||||
std::shared_ptr<MacroConditionFilter> _entryData;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#include "macro.hpp"
|
||||
#include "scene-selection.hpp"
|
||||
#include "scene-item-selection.hpp"
|
||||
#include "resizing-text-edit.hpp"
|
||||
|
||||
#include <QSpinBox>
|
||||
#include <QPlainTextEdit>
|
||||
#include <QCheckBox>
|
||||
|
||||
class MacroConditionSceneTransform : public MacroCondition {
|
||||
@@ -61,7 +61,7 @@ protected:
|
||||
SceneSelectionWidget *_scenes;
|
||||
SceneItemSelectionWidget *_sources;
|
||||
QPushButton *_getSettings;
|
||||
QPlainTextEdit *_settings;
|
||||
ResizingPlainTextEdit *_settings;
|
||||
QCheckBox *_regex;
|
||||
|
||||
std::shared_ptr<MacroConditionSceneTransform> _entryData;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
#include "macro.hpp"
|
||||
#include "resizing-text-edit.hpp"
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QPushButton>
|
||||
#include <QPlainTextEdit>
|
||||
#include <QCheckBox>
|
||||
|
||||
enum class SourceCondition {
|
||||
@@ -64,7 +64,7 @@ protected:
|
||||
QComboBox *_sources;
|
||||
QComboBox *_conditions;
|
||||
QPushButton *_getSettings;
|
||||
QPlainTextEdit *_settings;
|
||||
ResizingPlainTextEdit *_settings;
|
||||
QCheckBox *_regex;
|
||||
|
||||
std::shared_ptr<MacroConditionSource> _entryData;
|
||||
|
||||
17
src/headers/resizing-text-edit.hpp
Normal file
17
src/headers/resizing-text-edit.hpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include <QPlainTextEdit>
|
||||
|
||||
class ResizingPlainTextEdit : public QPlainTextEdit {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ResizingPlainTextEdit(QWidget *parent, const int scrollAt = 10,
|
||||
const int minLines = 3,
|
||||
const int paddingLines = 2);
|
||||
private slots:
|
||||
void ResizeTexteditArea();
|
||||
|
||||
private:
|
||||
const int _scrollAt;
|
||||
const int _minLines;
|
||||
const int _paddingLines;
|
||||
};
|
||||
Reference in New Issue
Block a user