Skip to content

Commit

Permalink
调整qmake适应调整后的目录结构
Browse files Browse the repository at this point in the history
  • Loading branch information
czyt1988 committed Oct 17, 2024
1 parent 09a9d62 commit ed7bd31
Show file tree
Hide file tree
Showing 13 changed files with 189 additions and 174 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.5)

set(SARIBBON_VERSION_MAJOR 2)
set(SARIBBON_VERSION_MINOR 2)
set(SARIBBON_VERSION_PATCH 4)
set(SARIBBON_VERSION_PATCH 5)
set(SARIBBON_VERSION "${SARIBBON_VERSION_MAJOR}.${SARIBBON_VERSION_MINOR}.${SARIBBON_VERSION_PATCH}")
message(STATUS "SARibbon v${SARIBBON_VERSION}")
project(SARibbon VERSION ${SARIBBON_VERSION} LANGUAGES CXX)
Expand Down
8 changes: 5 additions & 3 deletions SARibbon.pro
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
TEMPLATE = subdirs
SUBDIRS += \
src/SARibbonBar \
src/example/NormalMenuBarExample\
src/example/WidgetWithRibbon \
src/example/MainWindowExample
example/NormalMenuBarExample\
example/WidgetWithRibbon \
example/MdiAreaWindowExample \
example/StaticExample \
example/MainWindowExample


CONFIG += ordered
Expand Down
5 changes: 5 additions & 0 deletions changlog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# 版本记录(change log):

## 2024-10-17 -> 2.2.5
- 原有的qt关键宏替换为Q_SIGNAL\Q_SLOT\Q_EMIT,以适应no_keywords设置
- 调整目录结构,单独把example提取出来
- 完善mdi窗口的例子,可以结合qwk实现mdi窗口的最大最小化按钮的显示

## 2024-09-12 -> 2.2.4
- 修正自定义过程调用setRibbonBar后,会导致最大最小化按钮被遮挡的问题
- 调整Mdi例子中cmake的文件大小写,避免在linux系统下大小写敏感
Expand Down
2 changes: 1 addition & 1 deletion example/MainWindowExample/MainWindowExample.pro
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RESOURCES += \
# 下面演示了如何把SARibbon引入
# 只需要下面2句话,只要把common.pri引入工程,就可以实现SARibbon的引入
include($$PWD/../../../common.pri)
include($$PWD/../../common.pri)
include($${SARIBBONBAR_PRI_FILE_PATH})

DESTDIR = $${SARIBBON_BIN_DIR}/bin
Expand Down
37 changes: 37 additions & 0 deletions example/MdiAreaWindowExample/MdiAreaWindowExample.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-09-21T14:04:12
#
#-------------------------------------------------

QT += core gui
# SARibbon 1.x 版本后引入frameless库,必须要cpp17及以上
CONFIG += c++17
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = MdiAreaWindowExample
TEMPLATE = app

SOURCES += main.cpp\
mdimainwindow.cpp

HEADERS += \
mdimainwindow.h

FORMS += \
MainWindow.ui

RESOURCES += \
icon.qrc
# 下面演示了如何把SARibbon引入
# 只需要下面2句话,只要把common.pri引入工程,就可以实现SARibbon的引入
include($$PWD/../../common.pri)
include($${SARIBBONBAR_PRI_FILE_PATH})

DESTDIR = $${SARIBBON_BIN_DIR}/bin

msvc {
QMAKE_CFLAGS += /utf-8
QMAKE_CXXFLAGS += /utf-8
}

2 changes: 1 addition & 1 deletion example/NormalMenuBarExample/NormalMenuBarExample.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ HEADERS += \ \



include($$PWD/../../../common.pri)
include($$PWD/../../common.pri)
DESTDIR = $${SARIBBON_BIN_DIR}/bin
include($${SARIBBONBAR_PRI_FILE_PATH})

Expand Down
2 changes: 1 addition & 1 deletion example/StaticExample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ endif()
#################################################
# 这里展示如何简单的使用SARibbon在CMake文件里
# Here is an example of how to simply use SARibbon in a CMake file
SET(SARIBBON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../..)
SET(SARIBBON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../src)
set(SARIBBON_SIMPLE
${SARIBBON_DIR}/SARibbon.h
${SARIBBON_DIR}/SARibbon.cpp
Expand Down
2 changes: 1 addition & 1 deletion example/StaticExample/StaticExample.pro
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SOURCES += main.cpp\
HEADERS += \
mainwindow.h

include($$PWD/../../SARibbon.pri)
include($$PWD/../../src/SARibbon.pri)

RESOURCES += \
icon.qrc
2 changes: 1 addition & 1 deletion example/WidgetWithRibbon/WidgetWithRibbon.pro
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin

# 下面演示了如何把SARibbon引入
# 只需要下面2句话,只要把common.pri引入工程,就可以实现SARibbon的引入
include($$PWD/../../../common.pri)
include($$PWD/../../common.pri)
include($${SARIBBONBAR_PRI_FILE_PATH})

DESTDIR = $${SARIBBON_BIN_DIR}/bin
Expand Down
Loading

0 comments on commit ed7bd31

Please sign in to comment.