change: change code style to Linux style except indent.

This commit is contained in:
Mike Solar
2025-08-03 03:09:40 +08:00
parent 65ab76edc8
commit 74f73ab3be
789 changed files with 77113 additions and 68888 deletions
+16 -14
View File
@@ -28,23 +28,25 @@
#include "ui/icons/icons.h"
namespace olive {
TextDialog::TextDialog(const QString &start, QWidget* parent) :
QDialog(parent)
namespace olive
{
QVBoxLayout* layout = new QVBoxLayout(this);
// Create text edit widget
text_edit_ = new QPlainTextEdit();
text_edit_->document()->setPlainText(start);
layout->addWidget(text_edit_);
TextDialog::TextDialog(const QString &start, QWidget *parent)
: QDialog(parent)
{
QVBoxLayout *layout = new QVBoxLayout(this);
// Create buttons
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
layout->addWidget(buttons);
connect(buttons, &QDialogButtonBox::accepted, this, &TextDialog::accept);
connect(buttons, &QDialogButtonBox::rejected, this, &TextDialog::reject);
// Create text edit widget
text_edit_ = new QPlainTextEdit();
text_edit_->document()->setPlainText(start);
layout->addWidget(text_edit_);
// Create buttons
QDialogButtonBox *buttons =
new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
layout->addWidget(buttons);
connect(buttons, &QDialogButtonBox::accepted, this, &TextDialog::accept);
connect(buttons, &QDialogButtonBox::rejected, this, &TextDialog::reject);
}
}
+11 -12
View File
@@ -28,22 +28,21 @@
#include "common/define.h"
#include "widget/slider/floatslider.h"
namespace olive {
class TextDialog : public QDialog
namespace olive
{
Q_OBJECT
public:
TextDialog(const QString &start, QWidget* parent = nullptr);
QString text() const
{
return text_edit_->toPlainText();
}
class TextDialog : public QDialog {
Q_OBJECT
public:
TextDialog(const QString &start, QWidget *parent = nullptr);
QString text() const
{
return text_edit_->toPlainText();
}
private:
QPlainTextEdit* text_edit_;
QPlainTextEdit *text_edit_;
};
}