2024-06-30 12:51:22 +08:00
|
|
|
#pragma once
|
|
|
|
|
2024-06-22 20:01:42 +08:00
|
|
|
#include <KXmlGuiWindow>
|
|
|
|
|
|
|
|
#include "ui_GeneralSettings.h"
|
|
|
|
|
2024-06-30 12:51:22 +08:00
|
|
|
class QLabel;
|
2024-07-02 23:47:26 +08:00
|
|
|
class SciEdit;
|
2024-06-22 20:01:42 +08:00
|
|
|
class MainWindow : public KXmlGuiWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit MainWindow(QWidget *parent = nullptr);
|
|
|
|
~MainWindow();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void setupActions();
|
|
|
|
void showSettings();
|
2024-06-30 12:51:22 +08:00
|
|
|
void applyLexer(const QString & lexer);
|
2024-06-22 20:01:42 +08:00
|
|
|
|
2024-07-02 23:47:26 +08:00
|
|
|
SciEdit * m_editor;
|
2024-06-30 12:51:22 +08:00
|
|
|
QLabel * m_cursorPosStatusLabel;
|
2024-06-22 20:01:42 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
// plainly for KConfigDialog
|
|
|
|
// void setupUi(QWidget *GeneralSettings)
|
|
|
|
template <typename T>
|
|
|
|
class SettingsPage : public QWidget
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SettingsPage(QWidget *parent)
|
|
|
|
: QWidget(parent)
|
|
|
|
{
|
|
|
|
ui.setupUi(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
T ui;
|
|
|
|
};
|