Skip to content

Commit

Permalink
v9.29.0
Browse files Browse the repository at this point in the history
[文本终端]重构文本终端按键模块,允许在不同平台下,自定义及使用该平台的按键习惯。
[文本终端]修复鼠标在中文移动过程的鼠标残影问题。
[文本终端]优化键盘按键自动重复的频率算法。
[文本终端]增加bell的声音,提示用户当前输入状态。
[文本终端]优化字符串复制和粘贴,为用户提供更多的选择。

[Text Terminal] Reconstruct the text terminal button module, allowing customization and use of button habits on different platforms.
[Text terminal] Fixed the issue of mouse residue during Chinese movement.
[Text Terminal] Optimize the frequency algorithm for automatic repetition of keyboard keys.
[Text terminal] Add a bell sound to the text terminal to prompt the user about the current input status.
[Text Terminal] Optimize string copying and pasting, providing users with more choices.
  • Loading branch information
getwingm committed Oct 11, 2023
1 parent 781f34d commit f3978ce
Show file tree
Hide file tree
Showing 63 changed files with 4,530 additions and 982 deletions.
8 changes: 8 additions & 0 deletions kxterm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ find_package(Qt5 COMPONENTS Core Gui Widgets REQUIRED)
set(SOURCE_FILES
qkxhistory.cpp
qkxkeytranslator.cpp
qkxkeytranslatormodel.cpp
qkxscreen.cpp
qkxtermitem.cpp
qkxutils.cpp
Expand All @@ -27,11 +28,14 @@ set(SOURCE_FILES
wcwidth.cpp
qkxechoinput.cpp
qkxbackgroundimagerender.cpp
qkxcombinekeyactiondialog.cpp
qkxshortcutinputdialog.cpp
)

set(HAEDER_FILES
qkxhistory.h
qkxkeytranslator.h
qkxkeytranslatormodel.h
qkxscreen.h
qkxtermitem.h
qkxutils.h
Expand All @@ -45,11 +49,15 @@ set(HAEDER_FILES
wcwidth.h
qkxechoinput.h
qkxbackgroundimagerender.h
qkxcombinekeyactiondialog.h
qkxshortcutinputdialog.h
qkxterm_share.h
)

set(OTHER_FILES
qkxsearch.ui
qkxcombinekeyactiondialog.ui
qkxshortcutinputdialog.ui
)

add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES} ${HAEDER_FILES} ${OTHER_FILES})
Expand Down
12 changes: 12 additions & 0 deletions kxterm/qkxcolorschema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "qkxcolorschema.h"

#include <QFile>
#include <QFileInfo>

QKxColorSchema::QKxColorSchema(QObject *parent)
: QObject(parent)
Expand All @@ -24,8 +25,17 @@ QKxColorSchema::~QKxColorSchema()

}

QString QKxColorSchema::name() const
{
return m_name;
}

bool QKxColorSchema::load(const QString &path)
{
m_pretty.clear();
m_name.clear();
m_indexs.clear();

QFile f(path);
if(!f.open(QFile::ReadOnly|QFile::Text)) {
return false;
Expand All @@ -49,6 +59,8 @@ bool QKxColorSchema::load(const QString &path)
}
}
}
QFileInfo fi(f);
m_name = fi.fileName();
m_pretty.clear();
return !m_indexs.isEmpty();
}
Expand Down
2 changes: 2 additions & 0 deletions kxterm/qkxcolorschema.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class QKxColorSchema : public QObject
public:
explicit QKxColorSchema(QObject *parent = nullptr);
virtual ~QKxColorSchema();
QString name() const;
bool load(const QString& path);
QColor cursor() const;
QColor background() const;
Expand All @@ -37,6 +38,7 @@ class QKxColorSchema : public QObject
QColor m_cursor;
QVector<QColor> m_indexs;
QMap<QRgb, QColor> m_pretty;
QString m_name;
};

#endif // QTHEME_H
Loading

0 comments on commit f3978ce

Please sign in to comment.