cmake/modules: 对 Notepad-- 的构建进行优化,以适用于 Qt Creator 显示

This commit is contained in:
zinface 2023-12-19 17:49:54 +08:00
parent 1da49440b6
commit 284d976858
2 changed files with 5 additions and 24 deletions

View File

@ -8,11 +8,11 @@
if(TRUE) if(TRUE)
# Notepad-- # Notepad--
set(QRC_SOURCES src/RealCompare.qrc) set(QRC_SOURCES src/RealCompare.qrc)
spark_aux_source_paths(CCEditorSources spark_add_executable_path(${PROJECT_NAME}
src ${PROJECT_SOURCE_DIR}/src
src/cceditor ${PROJECT_SOURCE_DIR}/src/cceditor
) ${QRC_SOURCES})
spark_add_executable(${PROJECT_NAME} ${CCEditorSources} ${QRC_SOURCES})
target_include_directories(${PROJECT_NAME} PRIVATE target_include_directories(${PROJECT_NAME} PRIVATE
${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/src/cceditor ${PROJECT_SOURCE_DIR}/src/cceditor

View File

@ -1,19 +0,0 @@
#pragma once
#include <QStyledItemDelegate>
class NdStyledItemDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
NdStyledItemDelegate(QObject *parent);
virtual ~NdStyledItemDelegate();
void setFontSize(int size);
protected:
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
private:
int m_defaultFontSize;
};