bye,bye qmake, say hello to cmake
This commit is contained in:
parent
1ac6334c0e
commit
247dd38067
|
@ -91,10 +91,6 @@ PenaltyBreakString: 1000
|
|||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
PointerAlignment: Left
|
||||
RawStringFormats:
|
||||
- Delimiter: pb
|
||||
Language: TextProto
|
||||
BasedOnStyle: google
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SortUsingDeclarations: true
|
||||
|
@ -112,5 +108,6 @@ SpacesInSquareBrackets: true
|
|||
Standard: Cpp11
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
UseCRLF: Always
|
||||
...
|
||||
|
||||
|
|
|
@ -0,0 +1,473 @@
|
|||
name: CMake Build Matrix
|
||||
|
||||
# Directories
|
||||
# - $GITHUB_WORKSPACE/qskinny_source : Checkout directory for qskinny sources
|
||||
# - $GITHUB_WORKSPACE/qskinny_build : Build directory for QSkinny CMake
|
||||
# - $GITHUB_WORKSPACE/qskinny_install : Install directory for QSkinny package
|
||||
# - $GITHUB_WORKSPACE/qskinny_build_test : Build directory for QSkinny CMake integration test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [cmake]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: ${{ matrix.config.name }}
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- {
|
||||
name: "Windows Latest MSVC Qt5",
|
||||
os: windows-latest,
|
||||
artifact: "windows_msvc.7z",
|
||||
build_type: "Release",
|
||||
cc: "cl",
|
||||
cxx: "cl",
|
||||
environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
|
||||
archiver: "7z a",
|
||||
generators: "Visual Studio 17 2022",
|
||||
cmake:
|
||||
{
|
||||
qtversion: "5.15.2",
|
||||
qtdirkey: "Qt5_DIR",
|
||||
qtdirvalue: "../Qt/5.15.2/msvc2019_64/lib/cmake/Qt5",
|
||||
qtprefixpath: "../Qt/5.15.2/msvc2019_64",
|
||||
},
|
||||
screenshot_filename: "windows-latest-msvc-qt-5-15-2.jpg",
|
||||
}
|
||||
- {
|
||||
name: "Windows Latest MSVC Qt6",
|
||||
os: windows-latest,
|
||||
artifact: "windows_msvc.7z",
|
||||
build_type: "Release",
|
||||
cc: "cl",
|
||||
cxx: "cl",
|
||||
environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
|
||||
archiver: "7z a",
|
||||
generators: "Visual Studio 17 2022",
|
||||
cmake:
|
||||
{
|
||||
qtversion: "6.5.0",
|
||||
qtdirkey: "Qt6_DIR",
|
||||
qtdirvalue: "../Qt/6.5.0/msvc2019_64/lib/cmake/Qt6",
|
||||
qtprefixpath: "../Qt/6.5.0/msvc2019_64",
|
||||
},
|
||||
screenshot_filename: "windows-latest-msvc-qt-6.5.0.jpg",
|
||||
}
|
||||
- {
|
||||
name: "Windows 2019 MSVC Qt5",
|
||||
os: windows-2019,
|
||||
artifact: "windows_msvc.7z",
|
||||
build_type: "Release",
|
||||
cc: "cl",
|
||||
cxx: "cl",
|
||||
environment_script: "C:/Program Files/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
|
||||
archiver: "7z a",
|
||||
generators: "Visual Studio 16 2019",
|
||||
cmake:
|
||||
{
|
||||
qtversion: "5.15.2",
|
||||
qtdirkey: "Qt5_DIR",
|
||||
qtdirvalue: "../Qt/5.15.2/msvc2019_64/lib/cmake/Qt5",
|
||||
qtprefixpath: "../Qt/5.15.2/msvc2019_64",
|
||||
},
|
||||
screenshot_filename: "windows-2019-msvc-qt-5-15-2.jpg",
|
||||
}
|
||||
- {
|
||||
name: "Windows 2019 MSVC Qt6",
|
||||
os: windows-2019,
|
||||
artifact: "windows_msvc.7z",
|
||||
build_type: "Release",
|
||||
cc: "cl",
|
||||
cxx: "cl",
|
||||
environment_script: "C:/Program Files/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
|
||||
archiver: "7z a",
|
||||
generators: "Visual Studio 16 2019",
|
||||
cmake:
|
||||
{
|
||||
qtversion: "6.5.0",
|
||||
qtdirkey: "Qt6_DIR",
|
||||
qtdirvalue: "../Qt/6.5.0/msvc2019_64/lib/cmake/Qt6",
|
||||
qtprefixpath: "../Qt/6.5.0/msvc2019_64",
|
||||
},
|
||||
screenshot_filename: "windows-2019-msvc-qt-6.5.0.jpg",
|
||||
}
|
||||
- {
|
||||
name: "Ubuntu Latest GCC Qt5",
|
||||
os: ubuntu-latest,
|
||||
artifact: "ubuntu_gcc.7z",
|
||||
build_type: "Release",
|
||||
cc: "gcc",
|
||||
cxx: "g++",
|
||||
archiver: "7z a",
|
||||
generators: "Ninja",
|
||||
env: { DISPLAY: ":1" },
|
||||
cmake:
|
||||
{
|
||||
qtversion: "5.15.2",
|
||||
qtdirkey: "Qt5_DIR",
|
||||
qtdirvalue: "../Qt/5.15.2/gcc_64/lib/cmake/Qt5",
|
||||
qtprefixpath: "../Qt/5.15.2/gcc_64",
|
||||
},
|
||||
screenshot_filename: "ubuntu-latest-gcc-qt-5-15-2.jpg",
|
||||
}
|
||||
- {
|
||||
name: "Ubuntu Latest GCC Qt6",
|
||||
os: ubuntu-latest,
|
||||
artifact: "ubuntu_gcc.7z",
|
||||
build_type: "Release",
|
||||
cc: "gcc",
|
||||
cxx: "g++",
|
||||
archiver: "7z a",
|
||||
generators: "Ninja",
|
||||
env: { DISPLAY: ":1" },
|
||||
cmake:
|
||||
{
|
||||
qtversion: "6.5.0",
|
||||
qtdirkey: "Qt6_DIR",
|
||||
qtdirvalue: "../Qt/6.5.0/gcc_64/lib/cmake/Qt6",
|
||||
qtprefixpath: "../Qt/6.5.0/gcc_64",
|
||||
},
|
||||
screenshot_filename: "ubuntu-latest-gcc-qt-6.5.0.jpg",
|
||||
}
|
||||
- {
|
||||
name: "Ubuntu GCC 9 Qt5",
|
||||
os: ubuntu-latest,
|
||||
artifact: "ubuntu_gcc9.7z",
|
||||
build_type: "Release",
|
||||
cc: "gcc",
|
||||
cxx: "g++",
|
||||
archiver: "7z a",
|
||||
generators: "Ninja",
|
||||
env: { DISPLAY: ":1" },
|
||||
cmake:
|
||||
{
|
||||
qtversion: "5.15.2",
|
||||
qtdirkey: "Qt5_DIR",
|
||||
qtdirvalue: "../Qt/5.15.2/gcc_64/lib/cmake/Qt5",
|
||||
qtprefixpath: "../Qt/5.15.2/gcc_64",
|
||||
},
|
||||
screenshot_filename: "ubuntu-latest-gcc-9-qt-5-15-2.jpg",
|
||||
}
|
||||
- {
|
||||
name: "Ubuntu GCC 9 Qt6",
|
||||
os: ubuntu-latest,
|
||||
artifact: "ubuntu_gcc9.7z",
|
||||
build_type: "Release",
|
||||
cc: "gcc",
|
||||
cxx: "g++",
|
||||
archiver: "7z a",
|
||||
generators: "Ninja",
|
||||
env: { DISPLAY: ":1" },
|
||||
cmake:
|
||||
{
|
||||
qtversion: "6.5.0",
|
||||
qtdirkey: "Qt6_DIR",
|
||||
qtdirvalue: "../Qt/6.5.0/gcc_64/lib/cmake/Qt6",
|
||||
qtprefixpath: "../Qt/6.5.0/gcc_64",
|
||||
},
|
||||
screenshot_filename: "ubuntu-latest-gcc-9-qt-6.5.0.jpg",
|
||||
}
|
||||
- {
|
||||
name: "macOS Latest Clang Qt5",
|
||||
os: macos-latest,
|
||||
artifact: "macos_clang.7z",
|
||||
build_type: "Release",
|
||||
cc: "clang",
|
||||
cxx: "clang++",
|
||||
archiver: "7za a",
|
||||
generators: "Ninja",
|
||||
cmake:
|
||||
{
|
||||
qtversion: "5.15.2",
|
||||
qtdirkey: "Qt5_DIR",
|
||||
qtdirvalue: "../Qt/5.15.2/clang_64/lib/cmake/Qt5",
|
||||
qtprefixpath: "../Qt/5.15.2/clang_64",
|
||||
},
|
||||
screenshot_filename: "macos-latest-clang-qt-5-15-2.jpg",
|
||||
}
|
||||
- {
|
||||
name: "macOS Latest Clang Qt6",
|
||||
os: macos-latest,
|
||||
artifact: "macos_clang.7z",
|
||||
build_type: "Release",
|
||||
cc: "clang",
|
||||
cxx: "clang++",
|
||||
archiver: "7za a",
|
||||
generators: "Ninja",
|
||||
cmake:
|
||||
{
|
||||
qtversion: "6.5.0",
|
||||
qtdirkey: "Qt6_DIR",
|
||||
qtdirvalue: "../Qt/6.5.0/clang_64/lib/cmake/Qt6",
|
||||
qtprefixpath: "../Qt/6.5.0/clang_64",
|
||||
},
|
||||
screenshot_filename: "macos-latest-clang-qt-6.5.0.jpg",
|
||||
}
|
||||
|
||||
steps:
|
||||
- name: Git Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: qskinny_source
|
||||
|
||||
- name: Print env
|
||||
run: |
|
||||
echo github.event.action: ${{ github.event.action }}
|
||||
echo github.event_name: ${{ github.event_name }}
|
||||
|
||||
- name: Install dependencies on windows
|
||||
if: startsWith(matrix.config.os, 'windows')
|
||||
run: |
|
||||
choco install ninja
|
||||
choco install cmake --version=3.16.3
|
||||
ninja --version
|
||||
cmake --version
|
||||
|
||||
- name: Install dependencies on ubuntu
|
||||
if: startsWith(matrix.config.name, 'Ubuntu Latest GCC')
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install ninja-build cmake
|
||||
ninja --version
|
||||
cmake --version
|
||||
gcc --version
|
||||
|
||||
- name: Install dependencies on ubuntu9
|
||||
if: startsWith(matrix.config.name, 'Ubuntu GCC 9')
|
||||
run: |
|
||||
echo Update gcc-9 =======================================================================
|
||||
echo gcc version before
|
||||
gcc --version
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
sudo apt-get update
|
||||
sudo apt-get install ninja-build cmake gcc-9 g++-9
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
|
||||
echo gcc version after
|
||||
gcc --version
|
||||
echo Update ninja =======================================================================
|
||||
echo ninja version before
|
||||
ninja --version
|
||||
# wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip
|
||||
wget https://github.com/ninja-build/ninja/releases/latest/download/ninja-linux.zip
|
||||
sudo unzip ninja-linux.zip -d /usr/local/bin/
|
||||
sudo update-alternatives --install /usr/bin/ninja ninja /usr/local/bin/ninja 1 --force
|
||||
echo ninja version after
|
||||
ninja --version
|
||||
echo Update cmake =======================================================================
|
||||
echo cmake version before
|
||||
cmake --version
|
||||
# curl --silent "https://api.github.com/repos/Kitware/CMake/releases/latest" | sed -n 's/.*tag_name":\s"\(.*\)".*/\1/p' | head -2
|
||||
# wget https://github.com/Kitware/CMake/releases/latest/download/cmake-3.16.5-Linux-x86_64.sh
|
||||
cmake_version=$(curl --silent "https://api.github.com/repos/Kitware/CMake/releases/latest" | sed -n 's/.*tag_name":\s"\(.*\)".*/\1/p' | head -2 | cut -c 2-)
|
||||
echo cmake download latest v$cmake_version version
|
||||
wget https://github.com/Kitware/CMake/releases/download/v$cmake_version/cmake-$cmake_version-Linux-x86_64.sh
|
||||
chmod +x cmake-$cmake_version-Linux-x86_64.sh
|
||||
sudo mkdir /opt/cmake
|
||||
sudo ./cmake-$cmake_version-Linux-x86_64.sh --prefix=/opt/cmake --skip-license
|
||||
sudo update-alternatives --install /usr/bin/cmake cmake /opt/cmake/bin/cmake 1 --force
|
||||
echo cmake version after
|
||||
cmake --version
|
||||
|
||||
- name: Install dependencies on macos
|
||||
if: startsWith(matrix.config.os, 'macos')
|
||||
run: |
|
||||
brew install p7zip cmake ninja
|
||||
ninja --version
|
||||
cmake --version
|
||||
|
||||
- name: Install needed xkbcommon symlink
|
||||
if: startsWith(matrix.config.name, 'Ubuntu')
|
||||
run: |
|
||||
sudo apt-get install libxkbcommon-dev -y
|
||||
sudo apt-get install libxkbcommon-x11-0 -y
|
||||
sudo apt-get install libxcb-cursor-dev -y
|
||||
sudo apt-get install x11-xserver-utils -y
|
||||
|
||||
- name: Install hunspell for Ubuntu
|
||||
if: false && startsWith(matrix.config.name, 'Ubuntu')
|
||||
run: |
|
||||
sudo apt-get install -y libhunspell-dev
|
||||
|
||||
- name: Install pinyin for Ubuntu
|
||||
if: false && startsWith(matrix.config.name, 'Ubuntu')
|
||||
run: |
|
||||
sudo apt-get install -y libimepinyin-dev
|
||||
|
||||
- name: Install imagemagick for Ubuntu
|
||||
if: startsWith(matrix.config.name, 'Ubuntu')
|
||||
run: |
|
||||
sudo apt-get install -y imagemagick
|
||||
|
||||
#- name: Cache Qt5
|
||||
# if: endsWith(matrix.config.name, 'Qt5')
|
||||
# id: cache-qt-5-15
|
||||
# uses: actions/cache@v1 # not v2!
|
||||
# with:
|
||||
# path: ../Qt/5.15.2
|
||||
# key: ${{ runner.os }}-QtCache-Qt5
|
||||
#
|
||||
#- name: Cache Qt6
|
||||
# if: endsWith(matrix.config.name, 'Qt6')
|
||||
# id: cache-qt-6-2
|
||||
# uses: actions/cache@v1 # not v2!
|
||||
# with:
|
||||
# path: ../Qt/6.5.0
|
||||
# key: ${{ runner.os }}-QtCache-Qt6
|
||||
|
||||
- name: Install Qt5
|
||||
if: endsWith(matrix.config.name, 'Qt5')
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: "5.15.2"
|
||||
target: "desktop"
|
||||
install-deps: "true"
|
||||
modules: "qtwebengine"
|
||||
cached: ${{ steps.cache-qt-5-15.outputs.cache-hit }}
|
||||
setup-python: "false"
|
||||
tools: ""
|
||||
set-env: "true"
|
||||
tools-only: "false"
|
||||
|
||||
- name: Install Qt6
|
||||
if: endsWith(matrix.config.name, 'Qt6')
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: "6.5.0"
|
||||
target: "desktop"
|
||||
install-deps: "true"
|
||||
modules: "qtwebengine"
|
||||
cached: ${{ steps.cache-qt-6-2.outputs.cache-hit }}
|
||||
setup-python: "false"
|
||||
tools: ""
|
||||
set-env: "true"
|
||||
tools-only: "false"
|
||||
|
||||
- name: Configure ( QSkinny )
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir qskinny_build
|
||||
mkdir qskinny_install
|
||||
cmake \
|
||||
-S qskinny_source \
|
||||
-B qskinny_build \
|
||||
-G "${{ matrix.config.generators }}" \
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=qskinny_install \
|
||||
-DCMAKE_PREFIX_PATH:PATH="${{ matrix.config.cmake.qtprefixpath }}" \
|
||||
-D${{ matrix.config.cmake.qtdirkey }}:PATH="${{ matrix.config.cmake.qtdirvalue }}"
|
||||
|
||||
- name: Build ( QSkinny )
|
||||
shell: bash
|
||||
run: cmake --build qskinny_build --config ${{ matrix.config.build_type }}
|
||||
|
||||
#- name: Tests
|
||||
# shell: bash
|
||||
# run: ctest -j14 -C Release -T test --output-on-failure
|
||||
|
||||
- name: Install ( QSkinny ) Strip
|
||||
shell: bash
|
||||
run: cmake --install qskinny_build --prefix qskinny_install --strip --config ${{ matrix.config.build_type }}
|
||||
|
||||
- name: Smoke test ( QSkinny ) on MacOS
|
||||
if: startsWith(matrix.config.name, 'macOS')
|
||||
env:
|
||||
QT_DEBUG_PLUGINS: "1"
|
||||
run: |
|
||||
echo "starting iotdashboard"
|
||||
DYLD_LIBRARY_PATH=./qskinny_install/lib:./qskinny_install/plugins/skins ./qskinny_build/examples/bin/iotdashboard.app/Contents/MacOS/iotdashboard -qwindowgeometry 1024x600+75+100 --screenshot ${{ matrix.config.screenshot_filename }} &
|
||||
sleep 10
|
||||
|
||||
# TODO remove 'qskinny_build\skins\material3\Release' when skin install is fixed
|
||||
- name: Smoke Test ( QSkinny ) on Windows
|
||||
if: startsWith(matrix.config.name, 'Windows')
|
||||
env:
|
||||
QT_DEBUG_PLUGINS: "1"
|
||||
run: |
|
||||
$env:Path += ";./qskinny_install/bin;./qskinny_install/lib;./qskinny_install/plugins/skins;./qskinny_build/skins/material3/Release;./qskinny_build/skins/squiek/Release"
|
||||
echo "starting iotdashboard"
|
||||
Start-Process qskinny_build\examples\bin\Release\iotdashboard.exe -ArgumentList "-qwindowgeometry 1024x600+0+0 --screenshot ${{ matrix.config.screenshot_filename }}"
|
||||
Start-Sleep -Seconds 10
|
||||
|
||||
- name: Smoke test ( QSkinny ) on Ubuntu
|
||||
if: startsWith(matrix.config.name, 'Ubuntu')
|
||||
env:
|
||||
DISPLAY: ":1"
|
||||
QT_DEBUG_PLUGINS: "1"
|
||||
run: |
|
||||
echo starting Xvfb
|
||||
Xvfb :1 &
|
||||
sleep 10
|
||||
echo starting iotdashboard
|
||||
./qskinny_build/examples/bin/iotdashboard --screenshot ${{ matrix.config.screenshot_filename }} &
|
||||
sleep 10
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.config.screenshot_filename }}
|
||||
path: ${{ matrix.config.screenshot_filename }}
|
||||
|
||||
#- uses: OrbitalOwen/desktop-screenshot-action@0.1
|
||||
# with:
|
||||
# file-name: ${{ matrix.config.screenshot_filename }}
|
||||
|
||||
- name: Smoke Test Cleanup ( QSkinny ) on Windows
|
||||
if: startsWith(matrix.config.name, 'Windows')
|
||||
run: |
|
||||
taskkill /IM iotdashboard.exe /T
|
||||
|
||||
- name: Smoke Test Cleanup ( QSkinny ) on MacOS
|
||||
if: startsWith(matrix.config.name, 'macOS')
|
||||
run: |
|
||||
killall iotdashboard
|
||||
|
||||
- name: Smoke Test Cleanup ( QSkinny ) on Ubuntu
|
||||
if: startsWith(matrix.config.name, 'Ubuntu')
|
||||
run: |
|
||||
killall iotdashboard
|
||||
killall Xvfb
|
||||
|
||||
#- name: Configure ( CMake Integration Test )
|
||||
# shell: bash
|
||||
# run: |
|
||||
# mkdir qskinny_build_test
|
||||
# cmake \
|
||||
# -S qskinny_source/examples/iotdashboard_smoketest \
|
||||
# -B qskinny_build_test \
|
||||
# -G "${{ matrix.config.generators }}" \
|
||||
# -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
||||
# -DCMAKE_PREFIX_PATH:PATH="${{ matrix.config.cmake.qtprefixpath }}" \
|
||||
# -D${{ matrix.config.cmake.qtdirkey }}:PATH="${{ matrix.config.cmake.qtdirvalue }}" \
|
||||
# -DQSkinny_DIR:PATH=$GITHUB_WORKSPACE/qskinny_install/lib/cmake/QSkinny
|
||||
#
|
||||
#- name: Build ( CMake Integration Test )
|
||||
# shell: bash
|
||||
# run: cmake --build qskinny_build_test --config ${{ matrix.config.build_type }}
|
||||
|
||||
# - name: Pack
|
||||
# shell: bash
|
||||
# working-directory: instdir
|
||||
# run: |
|
||||
# ls -laR
|
||||
# ${{ matrix.config.archiver }} ../${{ matrix.config.artifact }} .
|
||||
|
||||
# - name: Upload
|
||||
# uses: actions/upload-artifact@v1
|
||||
# with:
|
||||
# path: ./${{ matrix.config.artifact }}
|
||||
# name: ${{ matrix.config.artifact }}
|
||||
|
||||
# - name: Upload release asset
|
||||
# if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'created')
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# upload_url: ${{ github.event.release.upload_url }}
|
||||
# asset_path: ./${{ matrix.config.artifact }}
|
||||
# asset_name: ${{ matrix.config.artifact }}.zip
|
||||
# asset_content_type: application/zip
|
|
@ -1,488 +0,0 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
|
||||
build-linux-qt5-15:
|
||||
name: Linux Qt 5.15 build
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DISPLAY: ":1"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache Qt
|
||||
id: cache-qt-5-15
|
||||
uses: actions/cache@v1 # not v2!
|
||||
with:
|
||||
path: ../Qt/5.15.2
|
||||
key: ${{ runner.os }}-QtCache-Qt5
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: '5.15.2'
|
||||
host: 'linux'
|
||||
target: 'desktop'
|
||||
install-deps: 'true'
|
||||
modules: 'qtwebengine'
|
||||
cached: ${{ steps.cache-qt-5-15.outputs.cache-hit }}
|
||||
setup-python: 'true'
|
||||
tools: ''
|
||||
set-env: 'true'
|
||||
tools-only: 'false'
|
||||
|
||||
- name: Ubuntu and Qt version
|
||||
run: |
|
||||
cat /etc/issue
|
||||
echo number of processors: $(nproc)
|
||||
qmake -v
|
||||
- name: qmake
|
||||
run: qmake qskinny.pro
|
||||
- name: make
|
||||
run: make -j$(nproc)
|
||||
- name: Smoke test
|
||||
run: |
|
||||
echo starting Xvfb
|
||||
Xvfb :1 &
|
||||
sleep 10
|
||||
echo starting iotdashboard
|
||||
./examples/bin/iotdashboard &
|
||||
sleep 10
|
||||
echo taking screenshot
|
||||
import -pause 1 -window root screenshot-linux-qt5-15.jpg
|
||||
echo killing iotdashboard
|
||||
killall iotdashboard
|
||||
echo killing Xvfb
|
||||
killall Xvfb
|
||||
- name: Upload smoke test artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: screenshot-linux-qt5-15.jpg
|
||||
path: screenshot-linux-qt5-15.jpg
|
||||
|
||||
|
||||
build-linux-qt-lts:
|
||||
name: Linux Qt 6.2 (LTS) build
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DISPLAY: ":1"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache Qt
|
||||
id: cache-qt-6-2
|
||||
uses: actions/cache@v1 # not v2!
|
||||
with:
|
||||
path: ../Qt/6.2.4
|
||||
key: ${{ runner.os }}-QtCache-Qt6-2
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: '6.2.4'
|
||||
host: 'linux'
|
||||
target: 'desktop'
|
||||
install-deps: 'true'
|
||||
modules: 'qtwebengine'
|
||||
cached: ${{ steps.cache-qt-6-2.outputs.cache-hit }}
|
||||
setup-python: 'true'
|
||||
tools: ''
|
||||
set-env: 'true'
|
||||
tools-only: 'false'
|
||||
|
||||
- name: Install needed xkbcommon symlink
|
||||
run: sudo apt-get install libxkbcommon-dev -y
|
||||
- name: Ubuntu and Qt version
|
||||
run: |
|
||||
cat /etc/issue
|
||||
echo number of processors: $(nproc)
|
||||
qmake -v
|
||||
- name: qmake
|
||||
run: qmake qskinny.pro
|
||||
- name: make
|
||||
run: make -j$(nproc)
|
||||
- name: Smoke test
|
||||
run: |
|
||||
echo starting Xvfb
|
||||
Xvfb :1 &
|
||||
sleep 10
|
||||
echo starting gallery
|
||||
./examples/bin/gallery &
|
||||
sleep 10
|
||||
echo taking screenshot
|
||||
import -pause 1 -window root screenshot-linux-qt6-2.jpg
|
||||
echo killing gallery
|
||||
killall gallery
|
||||
echo killing Xvfb
|
||||
killall Xvfb
|
||||
- name: Upload smoke test artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: screenshot-linux-qt6-2.jpg
|
||||
path: screenshot-linux-qt6-2.jpg
|
||||
|
||||
|
||||
build-linux-qt-current:
|
||||
name: Linux Qt 6.4 (current) build
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DISPLAY: ":1"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache Qt
|
||||
id: cache-qt-6-4
|
||||
uses: actions/cache@v1 # not v2!
|
||||
with:
|
||||
path: ../Qt/6.4.1
|
||||
key: ${{ runner.os }}-QtCache-Qt6-4
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: '6.4.1'
|
||||
host: 'linux'
|
||||
target: 'desktop'
|
||||
install-deps: 'true'
|
||||
modules: 'qtwebengine'
|
||||
cached: ${{ steps.cache-qt-6-4.outputs.cache-hit }}
|
||||
setup-python: 'true'
|
||||
tools: ''
|
||||
set-env: 'true'
|
||||
tools-only: 'false'
|
||||
|
||||
- name: Install needed xkbcommon symlink
|
||||
run: sudo apt-get install libxkbcommon-dev -y
|
||||
- name: Ubuntu and Qt version
|
||||
run: |
|
||||
cat /etc/issue
|
||||
echo number of processors: $(nproc)
|
||||
qmake -v
|
||||
- name: qmake
|
||||
run: qmake qskinny.pro
|
||||
- name: make
|
||||
run: make -j$(nproc)
|
||||
- name: Smoke test
|
||||
run: |
|
||||
echo starting Xvfb
|
||||
Xvfb :1 &
|
||||
sleep 10
|
||||
echo starting gallery
|
||||
./examples/bin/gallery &
|
||||
sleep 10
|
||||
echo taking screenshot
|
||||
import -pause 1 -window root screenshot-linux-qt6-4.jpg
|
||||
echo killing gallery
|
||||
killall gallery
|
||||
echo killing Xvfb
|
||||
killall Xvfb
|
||||
- name: Upload smoke test artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: screenshot-linux-qt6-4.jpg
|
||||
path: screenshot-linux-qt6-4.jpg
|
||||
|
||||
|
||||
build-windows-qt5-15:
|
||||
name: Windows Qt 5.15 build
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache Qt
|
||||
id: cache-qt-5-15
|
||||
uses: actions/cache@v1 # not v2!
|
||||
with:
|
||||
path: ../Qt/5.15.2
|
||||
key: ${{ runner.os }}-QtCache-Qt5
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: '5.15.2'
|
||||
host: 'windows'
|
||||
target: 'desktop'
|
||||
arch: 'win64_msvc2019_64'
|
||||
install-deps: 'true'
|
||||
modules: 'qtwebengine'
|
||||
cached: ${{ steps.cache-qt-5-15.outputs.cache-hit }}
|
||||
setup-python: 'true'
|
||||
tools: ''
|
||||
set-env: 'true'
|
||||
tools-only: 'false'
|
||||
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Windows and Qt version
|
||||
run: |
|
||||
systeminfo /fo csv | ConvertFrom-Csv | select OS*, System*, Hotfix* | Format-List
|
||||
qmake -v
|
||||
|
||||
- name: qmake
|
||||
run: qmake qskinny.pro
|
||||
|
||||
- name: jom
|
||||
run: |
|
||||
Invoke-WebRequest -Uri "https://download.qt.io/official_releases/jom/jom.zip" -OutFile jom.zip
|
||||
unzip jom.zip
|
||||
.\jom
|
||||
- name: Smoke test
|
||||
run: |
|
||||
$Env:PATH += ";lib;plugins\skins"
|
||||
echo "starting iotdashboard"
|
||||
Start-Process .\examples\bin\iotdashboard -ArgumentList "-qwindowgeometry 1024x600+0+0"
|
||||
Start-Sleep -s 10
|
||||
- uses: OrbitalOwen/desktop-screenshot-action@0.1
|
||||
with:
|
||||
file-name: 'screenshot-windows-qt5-15.jpg'
|
||||
- name: Cleanup smoke test
|
||||
run: taskkill /IM iotdashboard.exe /T
|
||||
|
||||
|
||||
build-windows-qt-lts:
|
||||
name: Windows Qt 6.2 (LTS) build
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache Qt
|
||||
id: cache-qt-6-2
|
||||
uses: actions/cache@v1 # not v2!
|
||||
with:
|
||||
path: ../Qt/6.2.4
|
||||
key: ${{ runner.os }}-QtCache-Qt6-2
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: '6.2.4'
|
||||
host: 'windows'
|
||||
target: 'desktop'
|
||||
arch: 'win64_msvc2019_64'
|
||||
install-deps: 'true'
|
||||
modules: 'qtwebengine'
|
||||
cached: ${{ steps.cache-qt-6-2.outputs.cache-hit }}
|
||||
setup-python: 'true'
|
||||
tools: ''
|
||||
set-env: 'true'
|
||||
tools-only: 'false'
|
||||
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Windows and Qt version
|
||||
run: |
|
||||
systeminfo /fo csv | ConvertFrom-Csv | select OS*, System*, Hotfix* | Format-List
|
||||
qmake -v
|
||||
|
||||
- name: qmake
|
||||
run: qmake qskinny.pro
|
||||
|
||||
- name: jom
|
||||
run: |
|
||||
Invoke-WebRequest -Uri "https://download.qt.io/official_releases/jom/jom.zip" -OutFile jom.zip
|
||||
unzip jom.zip
|
||||
.\jom
|
||||
- name: Smoke test
|
||||
run: |
|
||||
$Env:PATH += ";lib;plugins\skins"
|
||||
echo "starting gallery"
|
||||
Start-Process .\examples\bin\gallery -ArgumentList "-qwindowgeometry 1024x600+0+0"
|
||||
Start-Sleep -s 10
|
||||
- uses: OrbitalOwen/desktop-screenshot-action@0.1
|
||||
with:
|
||||
file-name: 'screenshot-windows-qt6-2.jpg'
|
||||
- name: Cleanup smoke test
|
||||
run: taskkill /IM gallery.exe /T
|
||||
|
||||
|
||||
build-windows-qt-current:
|
||||
name: Windows Qt 6.4 (current) build
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache Qt
|
||||
id: cache-qt-6-4
|
||||
uses: actions/cache@v1 # not v2!
|
||||
with:
|
||||
path: ../Qt/6.4.1
|
||||
key: ${{ runner.os }}-QtCache-Qt6-4
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: '6.4.1'
|
||||
host: 'windows'
|
||||
target: 'desktop'
|
||||
arch: 'win64_msvc2019_64'
|
||||
install-deps: 'true'
|
||||
modules: 'qtwebengine'
|
||||
cached: ${{ steps.cache-qt-6-4.outputs.cache-hit }}
|
||||
setup-python: 'true'
|
||||
tools: ''
|
||||
set-env: 'true'
|
||||
tools-only: 'false'
|
||||
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Windows and Qt version
|
||||
run: |
|
||||
systeminfo /fo csv | ConvertFrom-Csv | select OS*, System*, Hotfix* | Format-List
|
||||
qmake -v
|
||||
|
||||
- name: qmake
|
||||
run: qmake qskinny.pro
|
||||
|
||||
- name: jom
|
||||
run: |
|
||||
Invoke-WebRequest -Uri "https://download.qt.io/official_releases/jom/jom.zip" -OutFile jom.zip
|
||||
unzip jom.zip
|
||||
.\jom
|
||||
- name: Smoke test
|
||||
run: |
|
||||
$Env:PATH += ";lib;plugins\skins"
|
||||
echo "starting gallery"
|
||||
Start-Process .\examples\bin\gallery -ArgumentList "-qwindowgeometry 1024x600+0+0"
|
||||
Start-Sleep -s 10
|
||||
- uses: OrbitalOwen/desktop-screenshot-action@0.1
|
||||
with:
|
||||
file-name: 'screenshot-windows-qt6-4.jpg'
|
||||
- name: Cleanup smoke test
|
||||
run: taskkill /IM gallery.exe /T
|
||||
|
||||
|
||||
build-mac-qt5-15:
|
||||
name: MacOS Qt 5.15 build
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache Qt
|
||||
id: cache-qt-5-15
|
||||
uses: actions/cache@v1 # not v2!
|
||||
with:
|
||||
path: ../Qt/5.15.2
|
||||
key: ${{ runner.os }}-QtCache-Qt5
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: '5.15.2'
|
||||
host: 'mac'
|
||||
target: 'desktop'
|
||||
install-deps: 'true'
|
||||
modules: 'qtwebengine'
|
||||
cached: ${{ steps.cache-qt-5-15.outputs.cache-hit }}
|
||||
setup-python: 'true'
|
||||
tools: ''
|
||||
set-env: 'true'
|
||||
tools-only: 'false'
|
||||
|
||||
- name: MacOS and Qt version
|
||||
run: |
|
||||
sw_vers
|
||||
echo number of processors: $(sysctl -n hw.ncpu)
|
||||
qmake -v
|
||||
- name: qmake
|
||||
run: qmake qskinny.pro
|
||||
- name: make
|
||||
run: make -j$(sysctl -n hw.ncpu)
|
||||
- name: Smoke test
|
||||
run: |
|
||||
DYLD_LIBRARY_PATH=./lib ./examples/bin/iotdashboard.app/Contents/MacOS/iotdashboard -qwindowgeometry 1024x600+75+100 &
|
||||
sleep 10
|
||||
- uses: OrbitalOwen/desktop-screenshot-action@0.1
|
||||
with:
|
||||
file-name: 'screenshot-macos-qt5-15.jpg'
|
||||
- name: Cleanup smoke test
|
||||
run: killall iotdashboard
|
||||
|
||||
|
||||
build-mac-qt-lts:
|
||||
name: MacOS Qt 6.2 (LTS) build
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache Qt
|
||||
id: cache-qt-6-2
|
||||
uses: actions/cache@v1 # not v2!
|
||||
with:
|
||||
path: ../Qt/6.2.4
|
||||
key: ${{ runner.os }}-QtCache-Qt6-2
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: '6.2.4'
|
||||
host: 'mac'
|
||||
target: 'desktop'
|
||||
install-deps: 'true'
|
||||
modules: 'qtwebengine'
|
||||
cached: ${{ steps.cache-qt-6-2.outputs.cache-hit }}
|
||||
setup-python: 'true'
|
||||
tools: ''
|
||||
set-env: 'true'
|
||||
tools-only: 'false'
|
||||
|
||||
- name: MacOS and Qt version
|
||||
run: |
|
||||
sw_vers
|
||||
echo number of processors: $(sysctl -n hw.ncpu)
|
||||
qmake -v
|
||||
- name: qmake
|
||||
run: qmake qskinny.pro
|
||||
- name: make
|
||||
run: make -j$(sysctl -n hw.ncpu)
|
||||
- name: Smoke test
|
||||
run: |
|
||||
DYLD_LIBRARY_PATH=./lib ./examples/bin/gallery.app/Contents/MacOS/gallery -qwindowgeometry 1024x600+75+100 &
|
||||
sleep 10
|
||||
- uses: OrbitalOwen/desktop-screenshot-action@0.1
|
||||
with:
|
||||
file-name: 'screenshot-macos-qt6-2.jpg'
|
||||
- name: Cleanup smoke test
|
||||
run: killall gallery
|
||||
|
||||
build-mac-qt-current:
|
||||
name: MacOS Qt 6.4 (current) build
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache Qt
|
||||
id: cache-qt-6-4
|
||||
uses: actions/cache@v1 # not v2!
|
||||
with:
|
||||
path: ../Qt/6.4.1
|
||||
key: ${{ runner.os }}-QtCache-Qt6-4
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: '6.4.1'
|
||||
host: 'mac'
|
||||
target: 'desktop'
|
||||
install-deps: 'true'
|
||||
modules: 'qtwebengine'
|
||||
cached: ${{ steps.cache-qt-6-4.outputs.cache-hit }}
|
||||
setup-python: 'true'
|
||||
tools: ''
|
||||
set-env: 'true'
|
||||
tools-only: 'false'
|
||||
|
||||
- name: MacOS and Qt version
|
||||
run: |
|
||||
sw_vers
|
||||
echo number of processors: $(sysctl -n hw.ncpu)
|
||||
qmake -v
|
||||
- name: qmake
|
||||
run: qmake qskinny.pro
|
||||
- name: make
|
||||
run: make -j$(sysctl -n hw.ncpu)
|
||||
- name: Smoke test
|
||||
run: |
|
||||
DYLD_LIBRARY_PATH=./lib ./examples/bin/gallery.app/Contents/MacOS/gallery -qwindowgeometry 1024x600+75+100 &
|
||||
sleep 10
|
||||
- uses: OrbitalOwen/desktop-screenshot-action@0.1
|
||||
with:
|
||||
file-name: 'screenshot-macos-qt6-4.jpg'
|
||||
- name: Cleanup smoke test
|
||||
run: killall gallery
|
|
@ -14,3 +14,4 @@ qskinny.pro.user
|
|||
*.log
|
||||
html
|
||||
tags
|
||||
.vscode
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
############################################################################
|
||||
|
||||
cmake_minimum_required(VERSION 3.16.3)
|
||||
|
||||
macro(qsk_setup_options)
|
||||
|
||||
option(BUILD_PEDANTIC "Enable pedantic compile flags ( only GNU/CLANG )" OFF)
|
||||
option(BUILD_QSKDLL "Build libs ( not plugins ) as shared library" ON)
|
||||
option(BUILD_QML_EXPORT "Exporting QSkinny to QML" ON)
|
||||
|
||||
option(BUILD_TOOLS "Build qskinny tools" ON)
|
||||
option(BUILD_INPUTCONTEXT "Build virtual keyboard support" ON)
|
||||
option(BUILD_EXAMPLES "Build qskinny examples" ON)
|
||||
option(BUILD_PLAYGROUND "Build qskinny playground" ON)
|
||||
|
||||
# we actually want to use cmake_dependent_option - minimum cmake version ??
|
||||
|
||||
option( BUILD_SVG2QVG_STANDALONE "Build svg2qvg without qskinny library dependency" ON )
|
||||
if( NOT BUILD_TOOLS )
|
||||
set( BUILD_SVG2QVG_STANDALONE OFF )
|
||||
endif()
|
||||
|
||||
if( NOT BUILD_INPUTCONTEXT )
|
||||
set( ENABLE_PINYIN OFF )
|
||||
set( ENABLE_HUNSPELL OFF )
|
||||
endif()
|
||||
|
||||
option(ENABLE_ENSURE_SKINS "Examples add skins manually, when not finding plugins" ON)
|
||||
|
||||
endmacro()
|
||||
|
||||
macro(qsk_setup_build)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC OFF)
|
||||
set(CMAKE_GLOBAL_AUTOGEN_TARGET OFF)
|
||||
set(AUTOGEN_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/autogen")
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
qsk_initialize_build_flags()
|
||||
|
||||
if ( BUILD_PEDANTIC )
|
||||
message( STATUS "Setting pedantic compiler flags" )
|
||||
qsk_enable_pedantic_flags()
|
||||
endif()
|
||||
|
||||
# Loading individual settings from a file that is
|
||||
# propagated by the environmant variable QSK_LOCAL_CMAKE_RULES
|
||||
# This is a leftover from the previous qmake build environment.
|
||||
# Let's if we can do this using cmake standard mechanisms TODO ...
|
||||
|
||||
qsk_load_optional_build_flags()
|
||||
|
||||
# Finalizing after processing QSK_LOCAL_CMAKE_RULES
|
||||
qsk_finalize_build_flags()
|
||||
|
||||
endmacro()
|
||||
|
||||
macro(qsk_setup_install)
|
||||
# we have to provide and install a QSkinnyConfig.cmake
|
||||
# TODO ...
|
||||
endmacro()
|
||||
|
||||
############################################################################
|
||||
# QSkinny
|
||||
############################################################################
|
||||
|
||||
project(QSkinny
|
||||
LANGUAGES C CXX
|
||||
HOMEPAGE_URL "https://github.com/uwerat/qskinny"
|
||||
VERSION 0.8.0)
|
||||
|
||||
qsk_setup_options()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# loading helper macros
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
include("QskConfigMacros")
|
||||
include("QskFindMacros")
|
||||
include("QskBuildFunctions")
|
||||
|
||||
qsk_setup_Qt()
|
||||
qsk_setup_build()
|
||||
qsk_setup_install()
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(skins)
|
||||
|
||||
if(BUILD_QML_EXPORT)
|
||||
add_subdirectory(qmlexport)
|
||||
endif()
|
||||
|
||||
if(BUILD_INPUTCONTEXT)
|
||||
add_subdirectory(inputcontext)
|
||||
endif()
|
||||
|
||||
if(BUILD_EXAMPLES OR BUILD_PLAYGROUND)
|
||||
add_subdirectory(support)
|
||||
endif()
|
||||
|
||||
if(BUILD_TOOLS)
|
||||
add_subdirectory(tools)
|
||||
endif()
|
||||
|
||||
if(BUILD_EXAMPLES)
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
|
||||
if(BUILD_PLAYGROUND)
|
||||
add_subdirectory(playground)
|
||||
endif()
|
|
@ -2,6 +2,8 @@
|
|||
|
||||

|
||||
|
||||
[](https://github.com/vrcomputing/qskinny/actions/workflows/cmake.yml)
|
||||
|
||||
The (Q)Skinny library is a framework built on top of the Qt scene graph
|
||||
and very few core classes from Qt/Quick. It offers a set of lightweight controls,
|
||||
that can be used from C++ and/or QML.
|
||||
|
@ -37,6 +39,10 @@ On debian bullseye these packages need to be installed: `build-essential
|
|||
qt-qmake qtbase5-dev qtbase5-private-dev qtdeclarative5-dev
|
||||
qtdeclarative5-private-dev libqt5svg5-dev`.
|
||||
|
||||
> Optional: When enabling the `hunspell` feature the following package needs to be installed: `libhunspell-dev`
|
||||
|
||||
> Optional: When enabling the `pinyin` feature the following package needs to be installed: `libimepinyin-dev`
|
||||
|
||||
If you want to know more about QSkinny - or even like to give it a specific
|
||||
direction - please contact support@qskinny.org.
|
||||
|
||||
|
|
|
@ -0,0 +1,172 @@
|
|||
# SPDX-FileCopyrightText: 2014 Mathieu Tarral <mathieu.tarral@gmail.com>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
ECMEnableSanitizers
|
||||
-------------------
|
||||
|
||||
Enable compiler sanitizer flags.
|
||||
|
||||
The following sanitizers are supported:
|
||||
|
||||
- Address Sanitizer
|
||||
- Memory Sanitizer
|
||||
- Thread Sanitizer
|
||||
- Leak Sanitizer
|
||||
- Undefined Behaviour Sanitizer
|
||||
|
||||
All of them are implemented in Clang, depending on your version, and
|
||||
there is an work in progress in GCC, where some of them are currently
|
||||
implemented.
|
||||
|
||||
This module will check your current compiler version to see if it
|
||||
supports the sanitizers that you want to enable
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
Simply add::
|
||||
|
||||
include(ECMEnableSanitizers)
|
||||
|
||||
to your ``CMakeLists.txt``. Note that this module is included in
|
||||
KDECompilerSettings, so projects using that module do not need to also
|
||||
include this one.
|
||||
|
||||
The sanitizers are not enabled by default. Instead, you must set
|
||||
``ECM_ENABLE_SANITIZERS`` (either in your ``CMakeLists.txt`` or on the
|
||||
command line) to a semicolon-separated list of sanitizers you wish to enable.
|
||||
The options are:
|
||||
|
||||
- address
|
||||
- memory
|
||||
- thread
|
||||
- leak
|
||||
- undefined
|
||||
- fuzzer-no-link
|
||||
- fuzzer
|
||||
|
||||
The sanitizers "address", "memory" and "thread" are mutually exclusive. You
|
||||
cannot enable two of them in the same build.
|
||||
|
||||
"leak" requires the "address" sanitizer.
|
||||
|
||||
.. note::
|
||||
|
||||
To reduce the overhead induced by the instrumentation of the sanitizers, it
|
||||
is advised to enable compiler optimizations (``-O1`` or higher).
|
||||
|
||||
Example
|
||||
=======
|
||||
|
||||
This is an example of usage::
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DECM_ENABLE_SANITIZERS='address;leak;undefined' ..
|
||||
|
||||
.. note::
|
||||
|
||||
Most of the sanitizers will require Clang. To enable it, use::
|
||||
|
||||
-DCMAKE_CXX_COMPILER=clang++
|
||||
|
||||
Since 1.3.0.
|
||||
#]=======================================================================]
|
||||
|
||||
# MACRO check_compiler_version
|
||||
#-----------------------------
|
||||
macro (check_compiler_version gcc_required_version clang_required_version msvc_required_version)
|
||||
if (
|
||||
(
|
||||
CMAKE_CXX_COMPILER_ID MATCHES "GNU"
|
||||
AND
|
||||
CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${gcc_required_version}
|
||||
)
|
||||
OR
|
||||
(
|
||||
CMAKE_CXX_COMPILER_ID MATCHES "Clang"
|
||||
AND
|
||||
CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${clang_required_version}
|
||||
)
|
||||
OR
|
||||
(
|
||||
CMAKE_CXX_COMPILER_ID MATCHES "MSVC"
|
||||
AND
|
||||
CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${msvc_required_version}
|
||||
)
|
||||
)
|
||||
# error !
|
||||
message(FATAL_ERROR "You ask to enable the sanitizer ${CUR_SANITIZER},
|
||||
but your compiler ${CMAKE_CXX_COMPILER_ID} version ${CMAKE_CXX_COMPILER_VERSION}
|
||||
does not support it !
|
||||
You should use at least GCC ${gcc_required_version}, Clang ${clang_required_version}
|
||||
or MSVC ${msvc_required_version}
|
||||
(99.99 means not implemented yet)")
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
# MACRO check_compiler_support
|
||||
#------------------------------
|
||||
macro (enable_sanitizer_flags sanitize_option)
|
||||
if (${sanitize_option} MATCHES "address")
|
||||
check_compiler_version("4.8" "3.1" "19.28")
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=address")
|
||||
else()
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
||||
set(XSAN_LINKER_FLAGS "asan")
|
||||
endif()
|
||||
elseif (${sanitize_option} MATCHES "thread")
|
||||
check_compiler_version("4.8" "3.1" "99.99")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=thread")
|
||||
set(XSAN_LINKER_FLAGS "tsan")
|
||||
elseif (${sanitize_option} MATCHES "memory")
|
||||
check_compiler_version("99.99" "3.1" "99.99")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=memory")
|
||||
elseif (${sanitize_option} MATCHES "leak")
|
||||
check_compiler_version("4.9" "3.4" "99.99")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=leak")
|
||||
set(XSAN_LINKER_FLAGS "lsan")
|
||||
elseif (${sanitize_option} MATCHES "undefined")
|
||||
check_compiler_version("4.9" "3.1" "99.99")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-omit-frame-pointer -fno-optimize-sibling-calls")
|
||||
elseif (${sanitize_option} MATCHES "fuzzer-no-link")
|
||||
check_compiler_version("99.99" "6.0" "99.99")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=fuzzer-no-link")
|
||||
set(XSAN_LINKER_FLAGS "-fsanitize=fuzzer-no-link")
|
||||
elseif (${sanitize_option} MATCHES "fuzzer")
|
||||
check_compiler_version("99.99" "6.0" "99.99")
|
||||
set(XSAN_COMPILE_FLAGS "-fsanitize=fuzzer")
|
||||
else ()
|
||||
message(FATAL_ERROR "Compiler sanitizer option \"${sanitize_option}\" not supported.")
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
if (ECM_ENABLE_SANITIZERS)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
# for each element of the ECM_ENABLE_SANITIZERS list
|
||||
foreach ( CUR_SANITIZER ${ECM_ENABLE_SANITIZERS} )
|
||||
# lowercase filter
|
||||
string(TOLOWER ${CUR_SANITIZER} CUR_SANITIZER)
|
||||
# check option and enable appropriate flags
|
||||
enable_sanitizer_flags ( ${CUR_SANITIZER} )
|
||||
# TODO: GCC will not link pthread library if enabled ASan
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${XSAN_COMPILE_FLAGS}" )
|
||||
endif()
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${XSAN_COMPILE_FLAGS}" )
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
link_libraries(${XSAN_LINKER_FLAGS})
|
||||
endif()
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
string(REPLACE "-Wl,--no-undefined" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
string(REPLACE "-Wl,--no-undefined" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}")
|
||||
endif ()
|
||||
endforeach()
|
||||
else()
|
||||
message(STATUS "Tried to enable sanitizers (-DECM_ENABLE_SANITIZERS=${ECM_ENABLE_SANITIZERS}), \
|
||||
but compiler (${CMAKE_CXX_COMPILER_ID}) does not have sanitizer support")
|
||||
endif()
|
||||
endif()
|
|
@ -0,0 +1,101 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
############################################################################
|
||||
|
||||
function(qsk_add_executable target)
|
||||
|
||||
if(QT_VERSION_MAJOR VERSION_GREATER_EQUAL 6)
|
||||
qt6_add_executable(${ARGV})
|
||||
else()
|
||||
add_executable(${ARGV})
|
||||
endif()
|
||||
|
||||
set_target_properties(${target} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
|
||||
|
||||
endfunction()
|
||||
|
||||
function(qsk_add_library target)
|
||||
|
||||
if(QT_VERSION_MAJOR VERSION_GREATER_EQUAL 6)
|
||||
qt6_add_library(${ARGV})
|
||||
else()
|
||||
add_library(${ARGV})
|
||||
endif()
|
||||
|
||||
set_target_properties(${target} PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
|
||||
|
||||
endfunction()
|
||||
|
||||
function(qsk_add_plugin target TYPE CLASS_NAME)
|
||||
|
||||
cmake_parse_arguments(PARSE_ARGV 3 arg "MANUAL_FINALIZATION" "" "")
|
||||
|
||||
# qt6_add_plugin calls add_library as MODULE - even when SHARED
|
||||
# is requested. In general this ould be the correct type for plugins -
|
||||
# however we also want to link the plugin when ENABLE_ENSURE_SKINS
|
||||
# is enabled.
|
||||
# Probably the correct solution would be to put the implemetation of
|
||||
# the skins into a regular lib and the plugins would contain
|
||||
# the factories only. TODO ...
|
||||
# So for the moment better don't do:
|
||||
# qt6_add_plugin(${target} SHARED ${CLASS_NAME} )
|
||||
|
||||
if(QT_VERSION_MAJOR VERSION_GREATER_EQUAL 6)
|
||||
qt6_add_library(${target} SHARED )
|
||||
else()
|
||||
add_library(${target} SHARED )
|
||||
endif()
|
||||
|
||||
set_target_properties(${target} PROPERTIES
|
||||
QT_PLUGIN_CLASS_NAME ${CLASS_NAME} )
|
||||
|
||||
target_compile_definitions(${target} PRIVATE QT_PLUGIN )
|
||||
|
||||
target_sources( ${target} PRIVATE ${arg_UNPARSED_ARGUMENTS} )
|
||||
target_link_libraries(${target} PRIVATE qskinny)
|
||||
|
||||
set_target_properties(${target} PROPERTIES FOLDER ${TYPE})
|
||||
|
||||
# the plugin has to go to .../plugins/${TYPE}/
|
||||
# otherwise it won't be found at runtime ...
|
||||
|
||||
set_target_properties( ${target} PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/${TYPE})
|
||||
|
||||
install(TARGETS ${target} DESTINATION "plugins/${TYPE}" )
|
||||
set_target_properties(${target} PROPERTIES
|
||||
INSTALL_RPATH "\${ORIGIN}/../../lib" )
|
||||
|
||||
endfunction()
|
||||
|
||||
function(qsk_add_example target)
|
||||
|
||||
cmake_parse_arguments(PARSE_ARGV 1 arg "MANUAL_FINALIZATION" "" "")
|
||||
|
||||
qsk_add_executable(${target} WIN32 MACOSX_BUNDLE ${arg_UNPARSED_ARGUMENTS} )
|
||||
|
||||
set_target_properties(${target} PROPERTIES FOLDER examples)
|
||||
|
||||
set_target_properties(${target} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../bin )
|
||||
|
||||
target_link_libraries(${target} PRIVATE qskinny )
|
||||
|
||||
# not all examples need this one. TODO ...
|
||||
target_link_libraries(${target} PRIVATE qsktestsupport)
|
||||
|
||||
if( BUILD_QML_EXPORT )
|
||||
# Only needed, when having QML files. Autodetections is possible
|
||||
# by looking into all '*.qrc' files ( rcc --list *.qrc ) for *.qml
|
||||
# entries TODO ...
|
||||
|
||||
target_link_libraries(${target} PRIVATE qskqmlexport)
|
||||
endif()
|
||||
|
||||
# for examples with subdirectories
|
||||
target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
endfunction()
|
|
@ -0,0 +1,165 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
############################################################################
|
||||
|
||||
macro(qsk_load_optional_build_flags)
|
||||
|
||||
if( DEFINED ENV{QSK_LOCAL_CMAKE_RULES} )
|
||||
|
||||
# When not working with the Qt/Creator it is often more convenient
|
||||
# to include the specific options of your local build, than passing
|
||||
# them all on the command line
|
||||
|
||||
set(LOCAL_RULES $ENV{QSK_LOCAL_CMAKE_RULES})
|
||||
|
||||
if(NOT "${LOCAL_RULES}" STREQUAL "")
|
||||
|
||||
if(EXISTS ${LOCAL_RULES})
|
||||
message(STATUS "Loading build options from: ${LOCAL_RULES}")
|
||||
include(${LOCAL_RULES})
|
||||
else()
|
||||
message(Warning "Loading build options from: ${LOCAL_RULES}" - Failed)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
||||
macro(qsk_enable_pedantic_flags)
|
||||
|
||||
if(QT_VERSION_MAJOR VERSION_EQUAL 5)
|
||||
add_compile_definitions(QT_STRICT_ITERATORS)
|
||||
endif()
|
||||
|
||||
# note: setting CMAKE_CXX_COMPILER without CMAKE_CXX_COMPILER_ID
|
||||
# will fail here
|
||||
|
||||
if ( ( CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
|
||||
OR ( CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) )
|
||||
|
||||
add_compile_options( -pedantic)
|
||||
add_compile_options( -pedantic-errors)
|
||||
|
||||
add_compile_options( -Wformat -Werror=format-security)
|
||||
add_compile_options( -Wsuggest-override)
|
||||
|
||||
add_compile_options( -Wextra-semi )
|
||||
add_compile_options( -Winline )
|
||||
|
||||
add_compile_options( -Wmissing-declarations )
|
||||
add_compile_options( -Wredundant-decls )
|
||||
|
||||
add_compile_options( -Wnon-virtual-dtor )
|
||||
add_compile_options( -Woverloaded-virtual )
|
||||
add_compile_options( -Wfloat-equal )
|
||||
|
||||
if ( CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
|
||||
|
||||
add_compile_options( -Wsuggest-attribute=pure)
|
||||
add_compile_options( -Wsuggest-attribute=const)
|
||||
add_compile_options( -Wsuggest-attribute=noreturn)
|
||||
add_compile_options( -Wsuggest-attribute=malloc)
|
||||
add_compile_options( -Wsuggest-final-types)
|
||||
add_compile_options( -Wsuggest-final-methods)
|
||||
|
||||
add_compile_options( -Wduplicated-branches )
|
||||
add_compile_options( -Wduplicated-cond )
|
||||
add_compile_options( -Wshadow=local)
|
||||
|
||||
# we have a lot of useless casts, when qreal is a double,
|
||||
# that are needed when qreal is a float.
|
||||
|
||||
# add_compile_options( -Wuseless-cast )
|
||||
|
||||
add_compile_options( -Wlogical-op)
|
||||
add_compile_options( -Wclass-memaccess )
|
||||
|
||||
elseif ( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
|
||||
|
||||
add_compile_options( -Weverything)
|
||||
add_compile_options( -Wno-c++98-compat)
|
||||
add_compile_options( -Wno-c++98-compat-pedantic )
|
||||
add_compile_options( -Wno-global-constructors )
|
||||
|
||||
# We have a lot of dummy destructors with the intention to
|
||||
# - a breakpoint for the debugger
|
||||
# - being able to add some debug statements without recompiling
|
||||
# - preparation for binary compatible changes
|
||||
# Needs to be reconsidered: TODO ...
|
||||
add_compile_options( -Wno-deprecated-copy-with-user-provided-dtor )
|
||||
|
||||
add_compile_options( -Wno-signed-enum-bitfield )
|
||||
add_compile_options( -Wno-padded )
|
||||
|
||||
# since Qt 6.3 Q_GLOBAL_STATIC seems to use what is not supported for < c++20
|
||||
add_compile_options( -Wno-gnu-zero-variadic-macro-arguments )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
||||
macro(qsk_initialize_build_flags)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
||||
|
||||
add_compile_definitions(QT_NO_KEYWORDS)
|
||||
# add_compile_definitions(QT_DISABLE_DEPRECATED_BEFORE=0x000000)
|
||||
|
||||
if ( NOT MSVC )
|
||||
add_compile_options( -Wall -Wextra )
|
||||
else()
|
||||
add_compile_options(/W4 /WX)
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
||||
macro(qsk_finalize_build_flags)
|
||||
|
||||
message( STATUS "Build Type: ${CMAKE_BUILD_TYPE}" )
|
||||
|
||||
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
add_compile_definitions(ITEM_STATISTICS=1)
|
||||
endif()
|
||||
|
||||
if( (CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "GNU") )
|
||||
|
||||
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
add_compile_options(-O0)
|
||||
else()
|
||||
add_compile_options(-O3)
|
||||
endif()
|
||||
|
||||
add_compile_options(-ffast-math)
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
if ( NOT "${ECM_ENABLE_SANITIZERS}" STREQUAL "")
|
||||
|
||||
# see: https://api.kde.org/ecm/module/ECMEnableSanitizers.html
|
||||
#
|
||||
# a semicolon-separated list of sanitizers:
|
||||
# - address
|
||||
# - memory
|
||||
# - thread
|
||||
# - leak
|
||||
# - undefined
|
||||
# - fuzzer
|
||||
#
|
||||
# where “address”, “memory” and “thread” are mutually exclusive
|
||||
# f.e: set(ECM_ENABLE_SANITIZERS address;leak;undefined)
|
||||
|
||||
include(ECMEnableSanitizers)
|
||||
|
||||
endif()
|
||||
|
||||
endmacro()
|
|
@ -0,0 +1,119 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
############################################################################
|
||||
|
||||
macro(qsk_setup_Qt)
|
||||
|
||||
# Often users have several Qt installations on their system and
|
||||
# need to be able to explicitly the one to be used. Let's see if
|
||||
# standard cmake features are good enough or if we need to introduce
|
||||
# something sort of additional option. TODO ...
|
||||
|
||||
find_package(QT "5.15" NAMES Qt6 Qt5 REQUIRED COMPONENTS Quick)
|
||||
|
||||
if ( QT_FOUND )
|
||||
|
||||
# Would like to have a status message about where the Qt installation
|
||||
# has been found without having the mess of CMAKE_FIND_DEBUG_MODE
|
||||
# With Qt6 there seems to be: _qt_cmake_dir
|
||||
|
||||
message(STATUS "Found Qt ${QT_VERSION} ${_qt_cmake_dir}")
|
||||
else()
|
||||
message(FATAL_ERROR "Couldn't find any Qt package !")
|
||||
endif()
|
||||
|
||||
# Using find_package is probably no good idea as all other Qt modules should
|
||||
# be located below ${_qt_cmake_dir}. Otherwise we might end up with modules
|
||||
# from different packages. TODO ...
|
||||
|
||||
if( BUILD_TOOLS )
|
||||
# needed for building the svg2qvg tool
|
||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Svg)
|
||||
endif()
|
||||
|
||||
if( BUILD_EXAMPLES OR BUILD_PLAYGROUND )
|
||||
# On embedded systems you often find optimized Qt installations without
|
||||
# Qt/Widgets support. QSkinny itself does not need Qt/Widgets - however
|
||||
# playground/grids demonstrates the differences between the various
|
||||
# grid layouts. So no big deal when it is missing.
|
||||
|
||||
find_package(Qt${QT_VERSION_MAJOR} QUIET OPTIONAL_COMPONENTS QuickWidgets)
|
||||
if (NOT Qt${QT_VERSION_MAJOR}QuickWidgets_FOUND)
|
||||
message(STATUS "No Qt/Quick Widgets support: skipping some unimportant examples")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(BUILD_PLAYGROUND)
|
||||
# When building Qt most of the time is spent on the WebEngine modules
|
||||
# while only few applications need it. So it is a common situation to
|
||||
# have Qt installations without.
|
||||
# playground/webview shows how to use the Qt/Quick frontend from
|
||||
# C++, but QSkinny itself does not need the WebEngine at all.
|
||||
|
||||
if (QT_VERSION_MAJOR VERSION_LESS 6)
|
||||
find_package(Qt${QT_VERSION_MAJOR} QUIET OPTIONAL_COMPONENTS WebEngine)
|
||||
set( Qt5WebEngineQuick_FOUND ${Qt5WebEngine_FOUND} )
|
||||
else()
|
||||
find_package(Qt${QT_VERSION_MAJOR} QUIET
|
||||
OPTIONAL_COMPONENTS WebEngineCore WebEngineQuick)
|
||||
endif()
|
||||
|
||||
if( NOT Qt${QT_VERSION_MAJOR}WebEngineQuick_FOUND)
|
||||
message(STATUS "No Qt/Quick WebEngine support: skipping some unimportant examples")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(qsk_setup_Hunspell)
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
pkg_check_modules(hunspell hunspell IMPORTED_TARGET)
|
||||
set(package_name "PkgConfig::hunspell")
|
||||
|
||||
if (NOT TARGET "${package_name}")
|
||||
set(Hunspell_FOUND 0)
|
||||
return()
|
||||
endif()
|
||||
|
||||
add_library(Hunspell::Hunspell INTERFACE IMPORTED)
|
||||
target_link_libraries(Hunspell::Hunspell INTERFACE ${package_name})
|
||||
unset(package_name)
|
||||
|
||||
set(Hunspell_FOUND TRUE)
|
||||
|
||||
endmacro()
|
||||
|
||||
macro(qsk_setup_Pinyin)
|
||||
|
||||
# does this code work ????
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PKG_PINYIN QUIET pinyin)
|
||||
|
||||
find_path(PINYIN_INCLUDE_DIRS
|
||||
NAMES pinyinime.h
|
||||
PATH_SUFFIXES pinyin LibIME LibIME/libime/pinyin
|
||||
HINTS ${PKG_PINYIN_INCLUDE_DIRS})
|
||||
|
||||
find_library(PINYIN_LIBRARIES
|
||||
NAMES ${PKG_PINYIN_LIBRARIES} IMEPinyin imepinyin ime libime libimepinyin
|
||||
HINTS ${PKG_PINYIN_LIBRARY_DIRS})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(PINYIN
|
||||
REQUIRED_VARS PINYIN_LIBRARIES PINYIN_INCLUDE_DIRS
|
||||
VERSION_VAR PKG_PINYIN_VERSION)
|
||||
|
||||
mark_as_advanced(PINYIN_INCLUDE_DIRS PINYIN_LIBRARIES)
|
||||
|
||||
add_library(pinyin SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(pinyin PROPERTIES IMPORTED_LOCATION ${PINYIN_LIBRARIES})
|
||||
|
||||
target_include_directories(pinyin INTERFACE ${PINYIN_INCLUDE_DIRS})
|
||||
|
||||
find_package(LibIMEPinyin REQUIRED)
|
||||
find_package(Fcitx5Utils REQUIRED)
|
||||
|
||||
endmacro()
|
|
@ -0,0 +1,18 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
############################################################################
|
||||
|
||||
## @param SVG_FILENAME absolute filename to the svg
|
||||
## @param QVG_FILENAME absolute filename to the qvg
|
||||
function(qsk_svg2qvg SVG_FILENAME QVG_FILENAME)
|
||||
get_filename_component(QVG_FILENAME ${QVG_FILENAME} ABSOLUTE)
|
||||
get_filename_component(SVG_FILENAME ${SVG_FILENAME} ABSOLUTE)
|
||||
add_custom_command(
|
||||
COMMAND svg2qvg ${SVG_FILENAME} ${QVG_FILENAME}
|
||||
OUTPUT ${QVG_FILENAME}
|
||||
DEPENDS ${SVG_FILENAME}
|
||||
WORKING_DIRECTORY $<TARGET_FILE_DIR:${Qt}::Svg>
|
||||
COMMENT "Compiling ${SVG_FILENAME} to ${QVG_FILENAME}")
|
||||
endfunction()
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
add_subdirectory(desktop)
|
||||
add_subdirectory(gallery)
|
||||
add_subdirectory(layouts)
|
||||
add_subdirectory(listbox)
|
||||
add_subdirectory(messagebox)
|
||||
add_subdirectory(mycontrols)
|
||||
add_subdirectory(qvgviewer)
|
||||
add_subdirectory(thumbnails)
|
||||
add_subdirectory(tabview)
|
||||
add_subdirectory(iotdashboard)
|
||||
|
||||
if( BUILD_QML_EXPORT )
|
||||
add_subdirectory(boxes)
|
||||
add_subdirectory(buttons)
|
||||
add_subdirectory(frames)
|
||||
add_subdirectory(glabels)
|
||||
add_subdirectory(messageboxQml)
|
||||
endif()
|
|
@ -0,0 +1,6 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
qsk_add_example(boxes Box.h Box.cpp main.cpp)
|
|
@ -1,8 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
HEADERS += \
|
||||
Box.h
|
||||
|
||||
SOURCES += \
|
||||
Box.cpp \
|
||||
main.cpp
|
|
@ -0,0 +1,9 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
set(SOURCES main.cpp)
|
||||
qt_add_resources(SOURCES buttons.qrc)
|
||||
|
||||
qsk_add_example(buttons ${SOURCES})
|
|
@ -1,7 +0,0 @@
|
|||
CONFIG += qskexample qskqmlexport
|
||||
|
||||
RESOURCES += \
|
||||
buttons.qrc
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
|
@ -0,0 +1,6 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
qsk_add_example(desktop main.cpp)
|
|
@ -1,4 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
|
@ -1,22 +0,0 @@
|
|||
TEMPLATE = subdirs
|
||||
|
||||
# c++
|
||||
SUBDIRS += \
|
||||
desktop \
|
||||
gallery \
|
||||
layouts \
|
||||
listbox \
|
||||
messagebox \
|
||||
mycontrols \
|
||||
qvgviewer \
|
||||
thumbnails \
|
||||
tabview \
|
||||
iotdashboard
|
||||
|
||||
# qml
|
||||
SUBDIRS += \
|
||||
boxes \
|
||||
buttons \
|
||||
frames \
|
||||
glabels \
|
||||
messageboxQml
|
|
@ -0,0 +1,10 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
set(SOURCES Frame.h Frame.cpp main.cpp)
|
||||
qt_add_resources(SOURCES frames.qrc)
|
||||
|
||||
qsk_add_example(frames ${SOURCES})
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
CONFIG += qskexample qskqmlexport
|
||||
|
||||
RESOURCES += \
|
||||
frames.qrc
|
||||
|
||||
HEADERS += \
|
||||
Frame.h
|
||||
|
||||
SOURCES += \
|
||||
Frame.cpp \
|
||||
main.cpp
|
|
@ -0,0 +1,19 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
set(SOURCES
|
||||
label/LabelPage.h label/LabelPage.cpp
|
||||
inputs/InputPage.h inputs/InputPage.cpp
|
||||
progressbar/ProgressBarPage.h progressbar/ProgressBarPage.cpp
|
||||
button/ButtonPage.h button/ButtonPage.cpp
|
||||
selector/SelectorPage.h selector/SelectorPage.cpp
|
||||
dialog/DialogPage.h dialog/DialogPage.cpp
|
||||
Page.h Page.cpp
|
||||
main.cpp
|
||||
)
|
||||
qt_add_resources(SOURCES icons.qrc)
|
||||
|
||||
qsk_add_example(gallery ${SOURCES})
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
HEADERS += \
|
||||
label/LabelPage.h \
|
||||
inputs/InputPage.h \
|
||||
progressbar/ProgressBarPage.h \
|
||||
button/ButtonPage.h \
|
||||
selector/SelectorPage.h \
|
||||
dialog/DialogPage.h \
|
||||
Page.h
|
||||
|
||||
SOURCES += \
|
||||
label/LabelPage.cpp \
|
||||
inputs/InputPage.cpp \
|
||||
progressbar/ProgressBarPage.cpp \
|
||||
button/ButtonPage.cpp \
|
||||
selector/SelectorPage.cpp \
|
||||
dialog/DialogPage.cpp \
|
||||
Page.cpp \
|
||||
main.cpp
|
||||
|
||||
RESOURCES += \
|
||||
icons.qrc
|
|
@ -0,0 +1,9 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
set(SOURCES main.cpp)
|
||||
qt_add_resources(SOURCES glabels.qrc)
|
||||
|
||||
qsk_add_example(glabels ${SOURCES})
|
|
@ -1,7 +0,0 @@
|
|||
CONFIG += qskexample qskqmlexport
|
||||
|
||||
RESOURCES += \
|
||||
glabels.qrc
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
|
@ -0,0 +1,44 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
set(SOURCES
|
||||
Box.h Box.cpp
|
||||
BoxWithButtons.h BoxWithButtons.cpp
|
||||
CircularProgressBar.h CircularProgressBar.cpp
|
||||
CircularProgressBarSkinlet.h CircularProgressBarSkinlet.cpp
|
||||
Diagram.h Diagram.cpp
|
||||
DiagramSkinlet.h DiagramSkinlet.cpp
|
||||
EnergyMeter.h EnergyMeter.cpp
|
||||
GraphicProvider.h GraphicProvider.cpp
|
||||
GridBox.h GridBox.cpp
|
||||
LightDisplaySkinlet.h LightDisplaySkinlet.cpp
|
||||
LightDisplay.h LightDisplay.cpp
|
||||
DashboardPage.h DashboardPage.cpp
|
||||
DevicesPage.h DevicesPage.cpp
|
||||
MainItem.h MainItem.cpp
|
||||
MainWindow.h MainWindow.cpp
|
||||
MembersPage.h MembersPage.cpp
|
||||
MenuBar.h MenuBar.cpp
|
||||
MyDevices.h MyDevices.cpp
|
||||
RoomsPage.h RoomsPage.cpp
|
||||
RoundedIcon.h RoundedIcon.cpp
|
||||
Skin.h Skin.cpp
|
||||
StatisticsPage.h StatisticsPage.cpp
|
||||
TopBar.h TopBar.cpp
|
||||
RoundButton.h RoundButton.cpp
|
||||
UsageBox.h UsageBox.cpp
|
||||
UsageDiagram.h UsageDiagram.cpp
|
||||
StoragePage.h StoragePage.cpp
|
||||
StorageMeter.h StorageMeter.cpp
|
||||
StorageBar.h StorageBar.cpp
|
||||
StorageBarSkinlet.h StorageBarSkinlet.cpp
|
||||
nodes/DiagramDataNode.h nodes/DiagramDataNode.cpp
|
||||
nodes/DiagramSegmentsNode.h nodes/DiagramSegmentsNode.cpp
|
||||
nodes/RadialTickmarksNode.cpp nodes/RadialTickmarksNode.h
|
||||
main.cpp
|
||||
)
|
||||
qt_add_resources(SOURCES images.qrc fonts.qrc)
|
||||
|
||||
qsk_add_example(iotdashboard ${SOURCES})
|
|
@ -1,80 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
SOURCES += \
|
||||
Box.cpp \
|
||||
BoxWithButtons.cpp \
|
||||
CircularProgressBar.cpp \
|
||||
CircularProgressBarSkinlet.cpp \
|
||||
DashboardPage.cpp \
|
||||
DevicesPage.cpp \
|
||||
Diagram.cpp \
|
||||
DiagramSkinlet.cpp \
|
||||
EnergyMeter.cpp \
|
||||
GraphicProvider.cpp \
|
||||
GridBox.cpp \
|
||||
LightDisplaySkinlet.cpp \
|
||||
LightDisplay.cpp \
|
||||
MainItem.cpp \
|
||||
MainWindow.cpp \
|
||||
MenuBar.cpp \
|
||||
MembersPage.cpp \
|
||||
MyDevices.cpp \
|
||||
RoomsPage.cpp \
|
||||
RoundedIcon.cpp \
|
||||
Skin.cpp \
|
||||
StatisticsPage.cpp \
|
||||
TopBar.cpp \
|
||||
RoundButton.cpp \
|
||||
UsageBox.cpp \
|
||||
UsageDiagram.cpp \
|
||||
StoragePage.cpp \
|
||||
StorageMeter.cpp \
|
||||
StorageBar.cpp \
|
||||
StorageBarSkinlet.cpp \
|
||||
main.cpp \
|
||||
|
||||
SOURCES += \
|
||||
nodes/DiagramDataNode.cpp \
|
||||
nodes/DiagramSegmentsNode.cpp \
|
||||
nodes/RadialTickmarksNode.cpp
|
||||
|
||||
HEADERS += \
|
||||
Box.h \
|
||||
BoxWithButtons.h \
|
||||
CircularProgressBar.h \
|
||||
CircularProgressBarSkinlet.h \
|
||||
Diagram.h \
|
||||
DiagramSkinlet.h \
|
||||
EnergyMeter.h \
|
||||
GraphicProvider.h \
|
||||
GridBox.h \
|
||||
LightDisplaySkinlet.h \
|
||||
LightDisplay.h \
|
||||
DashboardPage.h \
|
||||
DevicesPage.h \
|
||||
MainItem.h \
|
||||
MainWindow.h \
|
||||
MembersPage.h \
|
||||
MenuBar.h \
|
||||
MyDevices.h \
|
||||
RoomsPage.h \
|
||||
RoundedIcon.h \
|
||||
Skin.h \
|
||||
StatisticsPage.h \
|
||||
TopBar.h \
|
||||
RoundButton.h \
|
||||
UsageBox.h \
|
||||
UsageDiagram.h \
|
||||
StoragePage.h \
|
||||
StorageMeter.h \
|
||||
StorageBar.h \
|
||||
StorageBarSkinlet.h \
|
||||
|
||||
HEADERS += \
|
||||
nodes/DiagramDataNode.h \
|
||||
nodes/DiagramSegmentsNode.h \
|
||||
nodes/RadialTickmarksNode.h
|
||||
|
||||
RESOURCES += \
|
||||
images.qrc \
|
||||
fonts.qrc
|
|
@ -7,7 +7,9 @@
|
|||
#include "GraphicProvider.h"
|
||||
#include "Skin.h"
|
||||
|
||||
#ifdef USE_SHORTCUTS
|
||||
#include <SkinnyShortcut.h>
|
||||
#endif
|
||||
|
||||
#include <QskSetup.h>
|
||||
#include <QskShortcutMap.h>
|
||||
|
@ -17,6 +19,7 @@
|
|||
#include <QskObjectCounter.h>
|
||||
|
||||
#include <QGuiApplication>
|
||||
#include <QTimer>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -75,13 +78,26 @@ int main( int argc, char* argv[] )
|
|||
|
||||
qskSetup->setSkin( "DaytimeSkin" );
|
||||
|
||||
#ifdef USE_SHORTCUTS
|
||||
// With CTRL-B you can rotate a couple of visual debug modes
|
||||
SkinnyShortcut::enable( SkinnyShortcut::RotateSkin | SkinnyShortcut::DebugBackground |
|
||||
SkinnyShortcut::DebugStatistics | SkinnyShortcut::Quit );
|
||||
#endif
|
||||
|
||||
MainWindow window;
|
||||
window.show();
|
||||
|
||||
for( int i = 1; i < argc; i++ )
|
||||
{
|
||||
if( argv[i] == QStringLiteral("--screenshot") && i + 1 < argc )
|
||||
{
|
||||
QTimer::singleShot( 500, &window, [&app, &window, filename = QString(argv[i + 1])]()
|
||||
{ auto image = window.grabWindow(); image.save(filename); } );
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
set(SOURCES
|
||||
TestRectangle.h TestRectangle.cpp
|
||||
ButtonBox.h ButtonBox.cpp
|
||||
FlowLayoutPage.h FlowLayoutPage.cpp
|
||||
GridLayoutPage.h GridLayoutPage.cpp
|
||||
LinearLayoutPage.h LinearLayoutPage.cpp
|
||||
DynamicConstraintsPage.h DynamicConstraintsPage.cpp
|
||||
StackLayoutPage.h StackLayoutPage.cpp
|
||||
main.cpp
|
||||
)
|
||||
qt_add_resources(SOURCES layouts.qrc)
|
||||
|
||||
qsk_add_example(layouts ${SOURCES})
|
|
@ -1,23 +0,0 @@
|
|||
CONFIG += qskexample qskqmlexport
|
||||
|
||||
RESOURCES += \
|
||||
layouts.qrc
|
||||
|
||||
HEADERS += \
|
||||
TestRectangle.h \
|
||||
ButtonBox.h \
|
||||
FlowLayoutPage.h \
|
||||
GridLayoutPage.h \
|
||||
LinearLayoutPage.h \
|
||||
DynamicConstraintsPage.h \
|
||||
StackLayoutPage.h
|
||||
|
||||
SOURCES += \
|
||||
TestRectangle.cpp \
|
||||
ButtonBox.cpp \
|
||||
FlowLayoutPage.cpp \
|
||||
GridLayoutPage.cpp \
|
||||
LinearLayoutPage.cpp \
|
||||
DynamicConstraintsPage.cpp \
|
||||
StackLayoutPage.cpp \
|
||||
main.cpp
|
|
@ -0,0 +1,6 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
qsk_add_example(listbox main.cpp)
|
|
@ -1,4 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
|
@ -0,0 +1,6 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
qsk_add_example(messagebox main.cpp)
|
|
@ -1,4 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
|
@ -0,0 +1,9 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
set(SOURCES main.cpp)
|
||||
qt_add_resources(SOURCES messagebox.qrc)
|
||||
|
||||
qsk_add_example(messageboxQml ${SOURCES})
|
|
@ -1,8 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
CONFIG += qskqmlexport
|
||||
|
||||
RESOURCES += \
|
||||
messagebox.qrc
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
|
@ -0,0 +1,11 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
qsk_add_example(mycontrols
|
||||
MySkin.h MySkin.cpp
|
||||
MyToggleButton.h MyToggleButton.cpp
|
||||
MyToggleButtonSkinlet.h MyToggleButtonSkinlet.cpp
|
||||
main.cpp
|
||||
)
|
|
@ -1,12 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
SOURCES += \
|
||||
MySkin.cpp \
|
||||
MyToggleButton.cpp \
|
||||
MyToggleButtonSkinlet.cpp \
|
||||
main.cpp
|
||||
|
||||
HEADERS += \
|
||||
MyToggleButton.h \
|
||||
MyToggleButtonSkinlet.h \
|
||||
MySkin.h
|
|
@ -0,0 +1,9 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
set(SOURCES MainWindow.h MainWindow.cpp main.cpp)
|
||||
qt_add_resources(SOURCES qvgviewer.qrc)
|
||||
|
||||
qsk_add_example(qvgviewer ${SOURCES})
|
|
@ -1,34 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
HEADERS += \
|
||||
MainWindow.h
|
||||
|
||||
SOURCES += \
|
||||
MainWindow.cpp \
|
||||
main.cpp
|
||||
|
||||
# CONFIG += autoqvg
|
||||
|
||||
autoqvg {
|
||||
|
||||
CONFIG += qskqvg
|
||||
|
||||
QVGRESOURCES += \
|
||||
qvgviewer.qrc
|
||||
|
||||
SVGSOURCES = \
|
||||
svg/01.01.10.svg \
|
||||
svg/01.03.04q.svg \
|
||||
svg/01.08.05q.svg \
|
||||
svg/01.25.18.svg
|
||||
|
||||
} else {
|
||||
|
||||
# When cross compiling we need to have the svg2qvg tool being
|
||||
# compiled for the build environment - not for the one of the target.
|
||||
# So we better have precompiled qvg files in the repository to
|
||||
# make the build process much easier
|
||||
|
||||
RESOURCES += \
|
||||
qvgviewer.qrc
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
qsk_add_example(tabview
|
||||
CustomSlider.h CustomSlider.cpp
|
||||
CustomSliderSkinlet.h CustomSliderSkinlet.cpp
|
||||
OtherSlider.h OtherSlider.cpp
|
||||
main.cpp
|
||||
)
|
|
@ -1,12 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
HEADERS += \
|
||||
CustomSlider.h \
|
||||
CustomSliderSkinlet.h \
|
||||
OtherSlider.h \
|
||||
|
||||
SOURCES += \
|
||||
CustomSlider.cpp \
|
||||
CustomSliderSkinlet.cpp \
|
||||
OtherSlider.cpp \
|
||||
main.cpp
|
|
@ -0,0 +1,6 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
qsk_add_example(thumbnails main.cpp)
|
|
@ -1,4 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
|
@ -1,36 +0,0 @@
|
|||
load(default_post)
|
||||
|
||||
equals(TEMPLATE, lib) {
|
||||
|
||||
plugin {
|
||||
|
||||
!isEmpty( QSK_PLUGIN_SUBDIR ) {
|
||||
|
||||
DESTDIR = $${QSK_PLUGIN_DIR}/$${QSK_PLUGIN_SUBDIR}
|
||||
}
|
||||
|
||||
darwin {
|
||||
# Add install name to all libraries, including plugins
|
||||
LIBS += -Wl,-install_name,@rpath/lib$${TARGET}.dylib
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
DESTDIR = $${QSK_LIB_DIR}
|
||||
}
|
||||
|
||||
unix {
|
||||
|
||||
VERSION = $${QSK_VERSION}
|
||||
}
|
||||
|
||||
contains(QSK_CONFIG, QskDll) {
|
||||
|
||||
CONFIG += dll
|
||||
DEFINES += QSK_DLL
|
||||
}
|
||||
else {
|
||||
CONFIG += staticlib
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
load(default_pre)
|
||||
|
||||
QSK_ROOT = $$clean_path( $$PWD/.. )
|
||||
|
||||
equals( QSK_ROOT, $$_PRO_FILE_PWD_ ) {
|
||||
|
||||
QSK_SUB_DIR = "."
|
||||
QSK_OUT_ROOT = $$OUT_PWD
|
||||
}
|
||||
else {
|
||||
|
||||
QSK_SUB_DIR = $$relative_path( $$_PRO_FILE_PWD_, $$QSK_ROOT )
|
||||
QSK_OUT_ROOT = $$replace( OUT_PWD, /$$QSK_SUB_DIR, "" )
|
||||
}
|
||||
|
||||
QSK_PLUGIN_DIR = $${QSK_OUT_ROOT}/plugins
|
||||
QSK_LIB_DIR = $${QSK_OUT_ROOT}/lib
|
||||
|
||||
include( qskconfig.pri )
|
||||
include( qskfunctions.pri )
|
|
@ -1,188 +0,0 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
############################################################################
|
||||
|
||||
QSK_VER_MAJ = 0
|
||||
QSK_VER_MIN = 0
|
||||
QSK_VER_PAT = 0
|
||||
QSK_VERSION = $${QSK_VER_MAJ}.$${QSK_VER_MIN}.$${QSK_VER_PAT}
|
||||
|
||||
# trying the PREFIX environment variable first
|
||||
|
||||
QSK_INSTALL_PREFIX = $$(PREFIX)
|
||||
|
||||
isEmpty( QSK_INSTALL_PREFIX ) {
|
||||
|
||||
QSK_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX]
|
||||
|
||||
unix {
|
||||
QSK_INSTALL_PREFIX = /usr/local/qskinny-$${QSK_VERSION}
|
||||
}
|
||||
|
||||
win32 {
|
||||
QSK_INSTALL_PREFIX = C:/Qskinny-$${QSK_VERSION}
|
||||
}
|
||||
}
|
||||
|
||||
QSK_INSTALL_DOCS = $${QSK_INSTALL_PREFIX}/doc
|
||||
QSK_INSTALL_HEADERS = $${QSK_INSTALL_PREFIX}/include
|
||||
QSK_INSTALL_LIBS = $${QSK_INSTALL_PREFIX}/lib
|
||||
QSK_INSTALL_BINS = $${QSK_INSTALL_PREFIX}/bin
|
||||
QSK_INSTALL_PLUGINS = $${QSK_INSTALL_PREFIX}/plugins
|
||||
QSK_INSTALL_EXAMPLES = $${QSK_INSTALL_PREFIX}/examples
|
||||
|
||||
CONFIG += no_private_qt_headers_warning
|
||||
|
||||
CONFIG += warn_on
|
||||
CONFIG += no_keywords
|
||||
CONFIG += silent
|
||||
#CONFIG -= depend_includepath
|
||||
|
||||
CONFIG += strict_c++
|
||||
CONFIG += c++17
|
||||
CONFIG += pedantic
|
||||
CONFIG += hide_symbols
|
||||
|
||||
# CONFIG += debug
|
||||
# CONFIG += sanitize
|
||||
|
||||
use_no_rpath {
|
||||
CONFIG -= use_local_rpath use_install_rpath
|
||||
} else {
|
||||
cross_compile {
|
||||
CONFIG *= use_install_rpath
|
||||
QMAKE_RPATHLINKDIR *= $${QSK_PLUGIN_DIR}/skins
|
||||
} else {
|
||||
!use_install_rpath: CONFIG *= use_local_rpath
|
||||
}
|
||||
}
|
||||
|
||||
MOC_DIR = moc
|
||||
OBJECTS_DIR = obj
|
||||
RCC_DIR = rcc
|
||||
|
||||
QSK_CONFIG += QskDll
|
||||
|
||||
linux {
|
||||
|
||||
pedantic {
|
||||
|
||||
DEFINES += QT_STRICT_ITERATORS
|
||||
|
||||
# Qt headers do not stand pedantic checks, so it's better
|
||||
# to exclude them by declaring them as system includes
|
||||
|
||||
CONFIG += qtassysteminclude
|
||||
}
|
||||
|
||||
qtassysteminclude {
|
||||
|
||||
# As most distros set QT_INSTALL_HEADERS to /usr/include we
|
||||
# would run into gcc compiler errors and better drop it
|
||||
# from the list below. Should be no problem as we don't
|
||||
# add the Qt module to our includes and therefore don't
|
||||
# need this path.
|
||||
|
||||
QMAKE_CXXFLAGS += \
|
||||
-isystem $$[QT_INSTALL_HEADERS]/QtCore \
|
||||
-isystem $$[QT_INSTALL_HEADERS]/QtCore/$$[QT_VERSION]/QtCore \
|
||||
-isystem $$[QT_INSTALL_HEADERS]/QtGui \
|
||||
-isystem $$[QT_INSTALL_HEADERS]/QtGui/$$[QT_VERSION]/QtGui \
|
||||
-isystem $$[QT_INSTALL_HEADERS]/QtQuick \
|
||||
-isystem $$[QT_INSTALL_HEADERS]/QtQuick/$$[QT_VERSION]/QtQuick \
|
||||
-isystem $$[QT_INSTALL_HEADERS]/QtQml \
|
||||
-isystem $$[QT_INSTALL_HEADERS]/QtQml/$$[QT_VERSION]/QtQml \
|
||||
}
|
||||
}
|
||||
|
||||
linux-g++ | linux-g++-64 {
|
||||
|
||||
# --- optional optimzations
|
||||
|
||||
QMAKE_CXXFLAGS_DEBUG *= -O0
|
||||
#QMAKE_CXXFLAGS_DEBUG *= -Og
|
||||
|
||||
QMAKE_CXXFLAGS_RELEASE *= -O3
|
||||
QMAKE_CXXFLAGS_RELEASE *= -ffast-math
|
||||
|
||||
# QMAKE_CXXFLAGS_RELEASE *= -Ofast
|
||||
# QMAKE_CXXFLAGS_RELEASE *= -Os
|
||||
}
|
||||
|
||||
pedantic {
|
||||
|
||||
linux-g++ | linux-g++-64 {
|
||||
|
||||
QMAKE_CXXFLAGS *= -pedantic-errors
|
||||
QMAKE_CXXFLAGS *= -Wextra
|
||||
QMAKE_CXXFLAGS *= -Werror=format-security
|
||||
#QMAKE_CXXFLAGS *= -Wlogical-op
|
||||
|
||||
# QMAKE_CXXFLAGS *= -Wconversion
|
||||
# QMAKE_CXXFLAGS *= -Wfloat-equal
|
||||
# QMAKE_CXXFLAGS *= -Wshadow
|
||||
|
||||
QMAKE_CXXFLAGS *= -Wsuggest-override
|
||||
# QMAKE_CXXFLAGS *= -Wsuggest-final-types
|
||||
# QMAKE_CXXFLAGS *= -Wsuggest-final-methods
|
||||
|
||||
# QMAKE_CXXFLAGS *= -fanalyzer
|
||||
}
|
||||
|
||||
linux-clang {
|
||||
|
||||
#QMAKE_CXXFLAGS *= -pedantic-errors
|
||||
|
||||
#QMAKE_CXXFLAGS *= -Weverything
|
||||
#QMAKE_CXXFLAGS *= -Wno-c++98-compat-pedantic
|
||||
#QMAKE_CXXFLAGS *= -Wno-global-constructors
|
||||
#QMAKE_CXXFLAGS *= -Wno-exit-time-destructors
|
||||
#QMAKE_CXXFLAGS *= -Wno-padded
|
||||
#QMAKE_CXXFLAGS *= -Wno-float-equal
|
||||
#QMAKE_CXXFLAGS *= -Wno-undefined-reinterpret-cast
|
||||
#QMAKE_CXXFLAGS *= -Wno-deprecated
|
||||
#QMAKE_CXXFLAGS *= -Wno-switch-enum
|
||||
#QMAKE_CXXFLAGS *= -Wno-keyword-macro
|
||||
#QMAKE_CXXFLAGS *= -Wno-old-style-cast
|
||||
#QMAKE_CXXFLAGS *= -Wno-used-but-marked-unused
|
||||
#QMAKE_CXXFLAGS *= -Wno-weak-vtables
|
||||
#QMAKE_CXXFLAGS *= -Wno-shadow
|
||||
#QMAKE_CXXFLAGS *= -Wno-double-promotion
|
||||
#QMAKE_CXXFLAGS *= -Wno-conversion
|
||||
#QMAKE_CXXFLAGS *= -Wno-documentation-unknown-command
|
||||
#QMAKE_CXXFLAGS *= -Wno-unused-macros
|
||||
}
|
||||
}
|
||||
|
||||
sanitize {
|
||||
|
||||
CONFIG += sanitizer
|
||||
CONFIG += sanitize_address
|
||||
# CONFIG *= sanitize_undefined
|
||||
|
||||
linux-g++ | linux-g++-64 {
|
||||
#QMAKE_CXXFLAGS *= -fsanitize-address-use-after-scope
|
||||
#QMAKE_LFLAGS *= -fsanitize-address-use-after-scope
|
||||
}
|
||||
}
|
||||
|
||||
debug {
|
||||
DEFINES += ITEM_STATISTICS=1
|
||||
}
|
||||
|
||||
# DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x000000
|
||||
|
||||
LOCAL_PRI=$$(QSK_LOCAL_PRI)
|
||||
|
||||
if ( !isEmpty( LOCAL_PRI ) ) {
|
||||
|
||||
if ( exists( $${LOCAL_PRI} ) ) {
|
||||
|
||||
# When not working with the Qt/Creator it is often more convenient
|
||||
# to include the specific options of your local build, than passing
|
||||
# them all on the command line
|
||||
|
||||
include( $${LOCAL_PRI} )
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
TEMPLATE = app
|
||||
CONFIG += qskinny qsktestsupport
|
||||
|
||||
DEFINES += QSK_DLL
|
||||
DESTDIR = $$clean_path( $${OUT_PWD}/../bin )
|
||||
|
||||
target.path = $${QSK_INSTALL_EXAMPLES}/bin
|
||||
INSTALLS = target
|
|
@ -1,24 +0,0 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
############################################################################
|
||||
|
||||
defineReplace(qskLibraryTarget) {
|
||||
|
||||
return( $$qtLibraryTarget($$1) )
|
||||
}
|
||||
|
||||
defineReplace(qskPluginTarget) {
|
||||
|
||||
return( $$qtLibraryTarget($$1) )
|
||||
}
|
||||
|
||||
defineTest(qskAddLibrary) {
|
||||
|
||||
LIBS *= -L$$1
|
||||
LIBS += -l$$2$$qtPlatformTargetSuffix()
|
||||
|
||||
export(LIBS)
|
||||
|
||||
return(true)
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
QT *= quick
|
||||
|
||||
QSK_DIRS = \
|
||||
$${QSK_ROOT}/src/common \
|
||||
$${QSK_ROOT}/src/controls \
|
||||
$${QSK_ROOT}/src/dialogs \
|
||||
$${QSK_ROOT}/src/graphic \
|
||||
$${QSK_ROOT}/src/inputpanel \
|
||||
$${QSK_ROOT}/src/layouts \
|
||||
$${QSK_ROOT}/src/nodes
|
||||
|
||||
INCLUDEPATH *= $${QSK_DIRS}
|
||||
DEPENDPATH *= $${QSK_DIRS}
|
||||
|
||||
use_install_rpath: QMAKE_RPATHDIR *= $${QSK_INSTALL_LIBS}
|
||||
use_local_rpath: QMAKE_RPATHDIR *= $${QSK_LIB_DIR}
|
||||
|
||||
qskAddLibrary( $${QSK_LIB_DIR}, qskinny )
|
|
@ -1,9 +0,0 @@
|
|||
QSK_QML_EXPORT_DIRS = $${QSK_ROOT}/qmlexport
|
||||
|
||||
INCLUDEPATH *= $${QSK_QML_EXPORT_DIRS}
|
||||
DEPENDPATH *= $${QSK_QML_EXPORT_DIRS}
|
||||
|
||||
use_install_rpath: QMAKE_RPATHDIR *= $${QSK_INSTALL_LIBS}
|
||||
use_local_rpath: QMAKE_RPATHDIR *= $${QSK_LIB_DIR}
|
||||
|
||||
qskAddLibrary( $${QSK_LIB_DIR}, qskqmlexport)
|
|
@ -1,59 +0,0 @@
|
|||
##############################################################################
|
||||
# rules to create qvg from svg files
|
||||
##############################################################################
|
||||
|
||||
SVG2QVG=$$shell_path($${QSK_OUT_ROOT}/tools/bin/svg2qvg)
|
||||
QVG_DIR=qvg
|
||||
|
||||
svg2qvg.name = SVG compiler
|
||||
svg2qvg.input = SVGSOURCES
|
||||
svg2qvg.output = $${QVG_DIR}/${QMAKE_FILE_BASE}.qvg
|
||||
svg2qvg.variable_out =
|
||||
svg2qvg.commands += ($$sprintf($${QMAKE_MKDIR_CMD}, $${QVG_DIR})) && $${SVG2QVG} ${QMAKE_FILE_IN} $${svg2qvg.output}
|
||||
|
||||
QMAKE_EXTRA_COMPILERS += svg2qvg
|
||||
|
||||
##############################################################################
|
||||
# When using qvg files, that have to be generated from svg files, as resource,
|
||||
##############################################################################
|
||||
|
||||
qvgrcc.name = RCC compiler
|
||||
qvgrcc.input = QVGRESOURCES
|
||||
qvgrcc.output = $${RCC_DIR}/qrc_${QMAKE_FILE_BASE}.cpp
|
||||
qvgrcc.variable_out = SOURCES
|
||||
qvgrcc.CONFIG += add_inputs_as_makefile_deps
|
||||
|
||||
# Paths inside a qrc file are always relative to the path of the
|
||||
# qrc file itself. So in case of shadow builds we need to copy the
|
||||
# qrc file into the shadow directory as the included qvg files
|
||||
# are generated there.
|
||||
|
||||
QRC_SHADOW_CLONE = $$shell_path( $${OUT_PWD}/${QMAKE_FILE_BASE}_shadow.qrc )
|
||||
qtPrepareTool(QMAKE_RCC, rcc, _DEP)
|
||||
|
||||
equals( OUT_PWD, $${_PRO_FILE_PWD_} ) {
|
||||
|
||||
qvgrcc.depend_command = $$QMAKE_RCC_DEP -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
|
||||
|
||||
} else {
|
||||
|
||||
qvgrcc.depend_command = \
|
||||
$${QMAKE_COPY} ${QMAKE_FILE_IN} $${QRC_SHADOW_CLONE} && \
|
||||
$$QMAKE_RCC_DEP -list $$QMAKE_RESOURCE_FLAGS $${QRC_SHADOW_CLONE} && \
|
||||
$${QMAKE_DEL_FILE} $${QRC_SHADOW_CLONE}
|
||||
}
|
||||
|
||||
equals( OUT_PWD, $${_PRO_FILE_PWD_} ) {
|
||||
|
||||
qvgrcc.commands = $$QMAKE_RCC $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||
|
||||
} else {
|
||||
|
||||
qvgrcc.commands = \
|
||||
$${QMAKE_COPY} ${QMAKE_FILE_IN} $${QRC_SHADOW_CLONE} && \
|
||||
$$QMAKE_RCC $$QMAKE_RESOURCE_FLAGS $${QRC_SHADOW_CLONE} -o ${QMAKE_FILE_OUT} && \
|
||||
$${QMAKE_DEL_FILE} $${QRC_SHADOW_CLONE}
|
||||
}
|
||||
|
||||
QMAKE_EXTRA_COMPILERS += qvgrcc
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
QSK_TEST_SUPPORT_DIRS = $${QSK_ROOT}/support
|
||||
|
||||
INCLUDEPATH *= $${QSK_TEST_SUPPORT_DIRS}
|
||||
DEPENDPATH *= $${QSK_TEST_SUPPORT_DIRS}
|
||||
|
||||
use_install_rpath: QMAKE_RPATHDIR *= $${QSK_INSTALL_EXAMPLES}/lib
|
||||
use_local_rpath: QMAKE_RPATHDIR *= $${QSK_LIB_DIR}
|
||||
|
||||
qskAddLibrary( $${QSK_LIB_DIR}, qsktestsupport)
|
|
@ -0,0 +1,49 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
############################################################################
|
||||
|
||||
if(NOT LINUX AND ENABLE_HUNSPELL)
|
||||
message(WARNING "Feature 'hunspell' only available for UNIX!")
|
||||
unset(ENABLE_HUNSPELL CACHE)
|
||||
endif()
|
||||
|
||||
if(NOT LINUX AND ENABLE_PINYIN)
|
||||
message(WARNING "Feature 'pinyin' only available for UNIX!")
|
||||
unset(ENABLE_PINYIN CACHE)
|
||||
endif()
|
||||
|
||||
set(SOURCES QskInputContextGlobal.h QskInputContextPlugin.cpp)
|
||||
|
||||
if(ENABLE_PINYIN)
|
||||
qsk_setup_Pinyin()
|
||||
|
||||
list(APPEND SOURCES
|
||||
${CMAKE_SOURCE_DIR}/src/inputpanel/QskPinyinTextPredictor.h
|
||||
${CMAKE_SOURCE_DIR}/src/inputpanel/QskPinyinTextPredictor.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_HUNSPELL)
|
||||
qsk_setup_Hunspell()
|
||||
|
||||
list(APPEND SOURCES
|
||||
${CMAKE_SOURCE_DIR}/src/inputpanel/QskHunspellTextPredictor.h
|
||||
${CMAKE_SOURCE_DIR}/src/inputpanel/QskHunspellTextPredictor.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
set(target qskinputcontext)
|
||||
|
||||
qsk_add_plugin(${target} platforminputcontexts QskInputContextPlugin ${SOURCES})
|
||||
|
||||
if(ENABLE_PINYIN)
|
||||
target_link_libraries(${target} PRIVATE pinyin Fcitx5::Utils)
|
||||
endif()
|
||||
|
||||
if(ENABLE_HUNSPELL)
|
||||
target_link_libraries(${target} PRIVATE hunspell)
|
||||
endif()
|
||||
|
||||
set_target_properties(${target} PROPERTIES DEFINE_SYMBOL QSK_INPUTCONTEXT_MAKEDLL )
|
||||
target_link_libraries(${target} PRIVATE qskinny Qt::GuiPrivate)
|
|
@ -1,52 +0,0 @@
|
|||
TEMPLATE = lib
|
||||
TARGET = $$qskPluginTarget(qskinputcontext)
|
||||
|
||||
QT += gui-private
|
||||
|
||||
CONFIG += plugin
|
||||
CONFIG += qskinny
|
||||
|
||||
QSK_PLUGIN_SUBDIR = platforminputcontexts
|
||||
contains(QSK_CONFIG, QskDll): DEFINES += QSK_INPUTCONTEXT_MAKEDLL
|
||||
|
||||
HEADERS += \
|
||||
QskInputContextGlobal.h
|
||||
|
||||
SOURCES += \
|
||||
QskInputContextPlugin.cpp
|
||||
|
||||
OTHER_FILES += metadata.json
|
||||
|
||||
pinyin {
|
||||
|
||||
unix {
|
||||
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += pinyin
|
||||
|
||||
HEADERS += \
|
||||
QskPinyinTextPredictor.h
|
||||
|
||||
SOURCES += \
|
||||
QskPinyinTextPredictor.cpp
|
||||
}
|
||||
}
|
||||
|
||||
hunspell {
|
||||
|
||||
unix {
|
||||
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += hunspell
|
||||
|
||||
HEADERS += \
|
||||
QskHunspellTextPredictor.h
|
||||
|
||||
SOURCES += \
|
||||
QskHunspellTextPredictor.cpp
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
target.path = $${QSK_INSTALL_PLUGINS}/$${QSK_PLUGIN_SUBDIR}
|
||||
INSTALLS = target
|
|
@ -0,0 +1,31 @@
|
|||
add_subdirectory(anchors)
|
||||
add_subdirectory(dials)
|
||||
add_subdirectory(dialogbuttons)
|
||||
add_subdirectory(gradients)
|
||||
add_subdirectory(invoker)
|
||||
add_subdirectory(shadows)
|
||||
add_subdirectory(shapes)
|
||||
|
||||
if (BUILD_INPUTCONTEXT)
|
||||
add_subdirectory(inputpanel)
|
||||
endif()
|
||||
|
||||
if (BUILD_QML_EXPORT)
|
||||
add_subdirectory(images)
|
||||
endif()
|
||||
|
||||
if (QT_VERSION_MAJOR VERSION_LESS 6)
|
||||
if(TARGET Qt::WebEngine)
|
||||
add_subdirectory(webview)
|
||||
endif()
|
||||
else()
|
||||
if(TARGET Qt::WebEngineCore)
|
||||
if(TARGET Qt::WebEngineQuick)
|
||||
add_subdirectory(webview)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TARGET Qt::QuickWidgets)
|
||||
add_subdirectory(grids)
|
||||
endif()
|
|
@ -0,0 +1,15 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
set(SOURCES
|
||||
kiwi/Strength.h kiwi/Term.h kiwi/Variable.h
|
||||
kiwi/Constraint.h kiwi/Constraint.cpp
|
||||
kiwi/Expression.h kiwi/Expression.cpp
|
||||
kiwi/Solver.h kiwi/Solver.cpp
|
||||
AnchorBox.h AnchorBox.cpp
|
||||
main.cpp
|
||||
)
|
||||
|
||||
qsk_add_example(anchors ${SOURCES})
|
|
@ -1,21 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
HEADERS += \
|
||||
kiwi/Constraint.h \
|
||||
kiwi/Expression.h \
|
||||
kiwi/Solver.h \
|
||||
kiwi/Strength.h \
|
||||
kiwi/Term.h \
|
||||
kiwi/Variable.h
|
||||
|
||||
SOURCES += \
|
||||
kiwi/Expression.cpp \
|
||||
kiwi/Constraint.cpp \
|
||||
kiwi/Solver.cpp
|
||||
|
||||
HEADERS += \
|
||||
AnchorBox.h
|
||||
|
||||
SOURCES += \
|
||||
AnchorBox.cpp \
|
||||
main.cpp
|
|
@ -0,0 +1,6 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
qsk_add_example(dialogbuttons Window.h Window.cpp main.cpp)
|
|
@ -1,8 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
HEADERS += \
|
||||
Window.h
|
||||
|
||||
SOURCES += \
|
||||
Window.cpp \
|
||||
main.cpp
|
|
@ -0,0 +1,15 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
set(SOURCES
|
||||
SkinFactory.h SkinFactory.cpp
|
||||
Dial.h Dial.cpp
|
||||
DialSkinlet.h DialSkinlet.cpp
|
||||
Dashboard.h Dashboard.cpp
|
||||
main.cpp
|
||||
)
|
||||
qt_add_resources(SOURCES images.qrc)
|
||||
|
||||
qsk_add_example(dials ${SOURCES})
|
|
@ -1,17 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
HEADERS += \
|
||||
SkinFactory.h \
|
||||
Dial.h \
|
||||
DialSkinlet.h \
|
||||
Dashboard.h
|
||||
|
||||
SOURCES += \
|
||||
SkinFactory.cpp \
|
||||
Dial.cpp \
|
||||
DialSkinlet.cpp \
|
||||
Dashboard.cpp \
|
||||
main.cpp \
|
||||
|
||||
RESOURCES += \
|
||||
images.qrc
|
|
@ -0,0 +1,17 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
set(SOURCES GradientView.h GradientView.cpp main.cpp)
|
||||
|
||||
if(TARGET quickshapes_private)
|
||||
list(APPEND SOURCES GradientQuickShape.h GradientQuickShape.cpp)
|
||||
endif()
|
||||
|
||||
qsk_add_example(gradients ${SOURCES})
|
||||
|
||||
if(TARGET quickshapes_private)
|
||||
target_compile_definitions(gradients PRIVATE SHAPE_GRADIENT)
|
||||
target_link_libraries(gradients PRIVATE quickshapes_private)
|
||||
endif()
|
|
@ -1,18 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
HEADERS += \
|
||||
GradientView.h
|
||||
|
||||
SOURCES += \
|
||||
GradientView.cpp \
|
||||
main.cpp
|
||||
|
||||
qtHaveModule(quickshapes_private) {
|
||||
|
||||
QT += quickshapes_private
|
||||
|
||||
HEADERS += GradientQuickShape.h
|
||||
SOURCES += GradientQuickShape.cpp
|
||||
|
||||
DEFINES += SHAPE_GRADIENT
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
set(SOURCES
|
||||
GridAccessor.h GridAccessor.cpp
|
||||
GridSkinny.h GridSkinny.cpp
|
||||
GridWidgets.h GridWidgets.cpp
|
||||
GridGraphics.h GridGraphics.cpp
|
||||
GridQuick.h GridQuick.cpp
|
||||
TestBox.h TestBox.cpp
|
||||
main.cpp
|
||||
)
|
||||
|
||||
qsk_add_example(grids ${SOURCES})
|
||||
target_link_libraries(grids PRIVATE Qt::QuickWidgets)
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
QT += widgets quickwidgets
|
||||
|
||||
HEADERS += \
|
||||
GridAccessor.h \
|
||||
GridSkinny.h \
|
||||
GridWidgets.h \
|
||||
GridGraphics.h \
|
||||
GridQuick.h \
|
||||
TestBox.h
|
||||
|
||||
SOURCES += \
|
||||
GridAccessor.cpp \
|
||||
GridSkinny.cpp \
|
||||
GridWidgets.cpp \
|
||||
GridGraphics.cpp \
|
||||
GridQuick.cpp \
|
||||
TestBox.cpp \
|
||||
main.cpp
|
||||
|
||||
linux {
|
||||
|
||||
pedantic {
|
||||
QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS]/QtQuickWidgets
|
||||
QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS]/QtWidgets
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
set(SOURCES Image.h Image.cpp main.cpp)
|
||||
qt_add_resources(SOURCES images.qrc)
|
||||
|
||||
qsk_add_example(images ${SOURCES})
|
|
@ -1,13 +0,0 @@
|
|||
CONFIG += qskexample qskqmlexport
|
||||
|
||||
QT += quick_private
|
||||
|
||||
RESOURCES += \
|
||||
images.qrc
|
||||
|
||||
HEADERS += \
|
||||
Image.h
|
||||
|
||||
SOURCES += \
|
||||
Image.cpp \
|
||||
main.cpp
|
|
@ -0,0 +1,6 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
qsk_add_example(inputpanel main.cpp)
|
|
@ -1,4 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
|
@ -0,0 +1,8 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
qsk_add_example(invoker Callback.h Callback.cpp Invoker.h Invoker.cpp main.cpp)
|
||||
set_target_properties(invoker PROPERTIES AUTOMOC_MOC_OPTIONS --no-warnings)
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
QMAKE_MOC_OPTIONS += -nw # disable warning about missing READ
|
||||
|
||||
HEADERS += \
|
||||
Callback.h \
|
||||
Invoker.h
|
||||
|
||||
SOURCES += \
|
||||
Callback.cpp \
|
||||
Invoker.cpp \
|
||||
main.cpp
|
|
@ -1,24 +0,0 @@
|
|||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS += \
|
||||
anchors \
|
||||
dials \
|
||||
dialogbuttons \
|
||||
gradients \
|
||||
invoker \
|
||||
inputpanel \
|
||||
images \
|
||||
shadows \
|
||||
shapes
|
||||
|
||||
qtHaveModule(webengine) {
|
||||
|
||||
SUBDIRS += \
|
||||
webview
|
||||
}
|
||||
|
||||
qtHaveModule(quickwidgets) {
|
||||
|
||||
SUBDIRS += \
|
||||
grids
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
qsk_add_example(shadows ShadowedBox.h ShadowedBox.cpp main.cpp)
|
|
@ -1,8 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
HEADERS += \
|
||||
ShadowedBox.h \
|
||||
|
||||
SOURCES += \
|
||||
ShadowedBox.cpp \
|
||||
main.cpp
|
|
@ -0,0 +1,22 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
set(SOURCES
|
||||
ShapeItem.h ShapeItem.cpp
|
||||
GeometricShape.h GeometricShape.cpp
|
||||
Stroke.h Stroke.cpp
|
||||
Window.h Window.cpp
|
||||
main.cpp
|
||||
)
|
||||
|
||||
if( BUILD_QML_EXPORT )
|
||||
qt_add_resources(SOURCES shapes.qrc)
|
||||
endif()
|
||||
|
||||
qsk_add_example(shapes ${SOURCES})
|
||||
|
||||
if( NOT BUILD_QML_EXPORT )
|
||||
target_compile_definitions(shapes PRIVATE NO_QML)
|
||||
endif()
|
|
@ -7,12 +7,14 @@
|
|||
#include "GeometricShape.h"
|
||||
#include "Stroke.h"
|
||||
|
||||
#include <QskQml.h>
|
||||
#include <QskObjectCounter.h>
|
||||
|
||||
#include <SkinnyShortcut.h>
|
||||
#include <QGuiApplication>
|
||||
|
||||
#ifndef NO_QML
|
||||
|
||||
#include <QskQml.h>
|
||||
#include <QQmlApplicationEngine>
|
||||
|
||||
template< typename T >
|
||||
|
@ -44,6 +46,8 @@ static bool doQml( int argc, char* argv[] )
|
|||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int main( int argc, char* argv[] )
|
||||
{
|
||||
#ifdef ITEM_STATISTICS
|
||||
|
@ -53,6 +57,7 @@ int main( int argc, char* argv[] )
|
|||
QGuiApplication app( argc, argv );
|
||||
SkinnyShortcut::enable( SkinnyShortcut::AllShortcuts );
|
||||
|
||||
#ifndef NO_QML
|
||||
if ( doQml( argc, argv ) )
|
||||
{
|
||||
qDebug() << "Running QML";
|
||||
|
@ -66,7 +71,7 @@ int main( int argc, char* argv[] )
|
|||
|
||||
return app.exec();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
qDebug() << "Running C++";
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
CONFIG += qskexample qskqmlexport
|
||||
|
||||
RESOURCES += \
|
||||
shapes.qrc
|
||||
|
||||
HEADERS += \
|
||||
Stroke.h \
|
||||
ShapeItem.h \
|
||||
GeometricShape.h \
|
||||
Window.h
|
||||
|
||||
SOURCES += \
|
||||
Stroke.cpp \
|
||||
ShapeItem.cpp \
|
||||
GeometricShape.cpp \
|
||||
Window.cpp \
|
||||
main.cpp
|
|
@ -0,0 +1,13 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
qsk_add_example(webview main.cpp)
|
||||
|
||||
if (QT_VERSION_MAJOR VERSION_GREATER 5)
|
||||
target_link_libraries(webview PRIVATE Qt::WebEngineQuick Qt::WebEngineQuickPrivate)
|
||||
else()
|
||||
target_link_libraries(webview PRIVATE Qt::WebEngine Qt::WebEnginePrivate)
|
||||
endif()
|
||||
|
|
@ -37,7 +37,10 @@ int main( int argc, char* argv[] )
|
|||
QskObjectCounter counter( true );
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
|
||||
// namespace QtWebEngine doesn't exist in Qt6: https://doc.qt.io/qt-5/qtwebengine.html
|
||||
QtWebEngine::initialize();
|
||||
#endif
|
||||
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication app( argc, argv );
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
CONFIG += qskexample
|
||||
QT += webengine webengine-private webenginecore-private core-private
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
|
@ -0,0 +1,23 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
############################################################################
|
||||
|
||||
set(HEADERS QskQmlGlobal.h QskShortcutQml.h QskLayoutQml.h QskMainQml.h QskQml.h)
|
||||
set(SOURCES QskShortcutQml.cpp QskLayoutQml.cpp QskMainQml.cpp QskQml.cpp)
|
||||
|
||||
set(target qskqmlexport)
|
||||
qsk_add_library(${target} SHARED ${SOURCES} ${HEADERS})
|
||||
|
||||
target_link_libraries(${target} PRIVATE qskinny)
|
||||
target_include_directories(${target} PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
||||
set_target_properties(${target} PROPERTIES PUBLIC_HEADER QskQml.h)
|
||||
|
||||
if(BUILD_QSKDLL)
|
||||
set_target_properties(${target} PROPERTIES DEFINE_SYMBOL QSK_QML_MAKEDLL)
|
||||
set_target_properties(${target} PROPERTIES INSTALL_RPATH "\${ORIGIN}" )
|
||||
set_target_properties(${target} PROPERTIES
|
||||
VERSION ${CMAKE_PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} )
|
||||
endif()
|
||||
|
||||
install(TARGETS ${target} )
|
|
@ -1,26 +0,0 @@
|
|||
TEMPLATE = lib
|
||||
TARGET = $$qskLibraryTarget(qskqmlexport)
|
||||
|
||||
QT += quick-private
|
||||
CONFIG += qskinny
|
||||
|
||||
contains(QSK_CONFIG, QskDll): DEFINES += QSK_QML_MAKEDLL
|
||||
|
||||
HEADERS += \
|
||||
QskQml.hpp
|
||||
|
||||
HEADERS += \
|
||||
QskQmlGlobal.h \
|
||||
QskShortcutQml.h \
|
||||
QskLayoutQml.h \
|
||||
QskMainQml.h \
|
||||
QskQml.h
|
||||
|
||||
SOURCES += \
|
||||
QskShortcutQml.cpp \
|
||||
QskLayoutQml.cpp \
|
||||
QskMainQml.cpp \
|
||||
QskQml.cpp
|
||||
|
||||
target.path = $${QSK_INSTALL_LIBS}
|
||||
INSTALLS = target
|
27
qskinny.pro
27
qskinny.pro
|
@ -1,27 +0,0 @@
|
|||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS = \
|
||||
src \
|
||||
skins \
|
||||
inputcontext \
|
||||
qmlexport \
|
||||
tools \
|
||||
support \
|
||||
examples \
|
||||
playground
|
||||
|
||||
OTHER_FILES = \
|
||||
doc/Doxyfile \
|
||||
doc/*.dox \
|
||||
doc/*.metadox \
|
||||
doc/classes/*.dox \
|
||||
doc/classes/*.metadox \
|
||||
TODO
|
||||
|
||||
qmlexport.depends = src
|
||||
inputcontext.depends = src
|
||||
skins.depends = src
|
||||
tools.depends = src
|
||||
support.depends = src skins
|
||||
examples.depends = tools support skins qmlexport
|
||||
playground.depends = tools support skins qmlexport
|
|
@ -0,0 +1,2 @@
|
|||
add_subdirectory(squiek)
|
||||
add_subdirectory(material3)
|
|
@ -0,0 +1,13 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
############################################################################
|
||||
|
||||
set(SOURCES
|
||||
QskMaterial3Global.h QskMaterial3Skin.h QskMaterial3Skin.cpp
|
||||
QskMaterial3SkinFactory.h QskMaterial3SkinFactory.cpp
|
||||
)
|
||||
qt_add_resources(SOURCES icons.qrc)
|
||||
|
||||
qsk_add_plugin(material3skin skins QskMaterial3SkinFactory ${SOURCES})
|
||||
set_target_properties(material3skin PROPERTIES DEFINE_SYMBOL QSK_MATERIAL3_MAKEDLL )
|
|
@ -12,9 +12,10 @@
|
|||
class QSK_MATERIAL3_EXPORT QskMaterial3SkinFactory : public QskSkinFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
#if defined( QSK_MATERIAL3_MAKEDLL )
|
||||
Q_PLUGIN_METADATA( IID QskSkinFactoryIID FILE "metadata.json" )
|
||||
Q_INTERFACES( QskSkinFactory )
|
||||
#endif
|
||||
|
||||
public:
|
||||
QskMaterial3SkinFactory( QObject* parent = nullptr );
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
CONFIG += plugin
|
||||
CONFIG += qskinny
|
||||
|
||||
TEMPLATE = lib
|
||||
QSK_PLUGIN_SUBDIR = skins
|
||||
|
||||
TARGET = $$qskPluginTarget(material3skin)
|
||||
DEFINES += QSK_MATERIAL3_MAKEDLL
|
||||
|
||||
HEADERS += \
|
||||
QskMaterial3Global.h \
|
||||
QskMaterial3Skin.h \
|
||||
QskMaterial3SkinFactory.h
|
||||
|
||||
SOURCES += \
|
||||
QskMaterial3Skin.cpp \
|
||||
QskMaterial3SkinFactory.cpp
|
||||
|
||||
RESOURCES += \
|
||||
icons.qrc \
|
||||
|
||||
OTHER_FILES += metadata.json
|
||||
|
||||
target.path = $${QSK_INSTALL_PLUGINS}/$${QSK_PLUGIN_SUBDIR}
|
||||
INSTALLS = target
|
|
@ -1,5 +0,0 @@
|
|||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS += \
|
||||
squiek \
|
||||
material3
|
|
@ -0,0 +1,10 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
############################################################################
|
||||
|
||||
qsk_add_plugin(squiekskin skins QskSquiekSkinFactory
|
||||
QskSquiekGlobal.h QskSquiekSkin.h QskSquiekSkin.cpp
|
||||
QskSquiekSkinFactory.h QskSquiekSkinFactory.cpp
|
||||
)
|
||||
set_target_properties(squiekskin PROPERTIES DEFINE_SYMBOL QSK_SQUIEK_MAKEDLL)
|
|
@ -13,8 +13,10 @@ class QSK_SQUIEK_EXPORT QskSquiekSkinFactory : public QskSkinFactory
|
|||
{
|
||||
Q_OBJECT
|
||||
|
||||
#if defined( QSK_SQUIEK_MAKEDLL )
|
||||
Q_PLUGIN_METADATA( IID QskSkinFactoryIID FILE "metadata.json" )
|
||||
Q_INTERFACES( QskSkinFactory )
|
||||
#endif
|
||||
|
||||
public:
|
||||
QskSquiekSkinFactory( QObject* parent = nullptr );
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
CONFIG += plugin
|
||||
CONFIG += qskinny
|
||||
|
||||
TEMPLATE = lib
|
||||
QSK_PLUGIN_SUBDIR = skins
|
||||
|
||||
TARGET = $$qskPluginTarget(squiekskin)
|
||||
DEFINES += QSK_SQUIEK_MAKEDLL
|
||||
|
||||
HEADERS += \
|
||||
QskSquiekGlobal.h \
|
||||
QskSquiekSkin.h \
|
||||
QskSquiekSkinFactory.h
|
||||
|
||||
SOURCES += \
|
||||
QskSquiekSkin.cpp \
|
||||
QskSquiekSkinFactory.cpp
|
||||
|
||||
OTHER_FILES += metadata.json
|
||||
|
||||
target.path = $${QSK_INSTALL_PLUGINS}/$${QSK_PLUGIN_SUBDIR}
|
||||
INSTALLS = target
|
|
@ -0,0 +1,481 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
############################################################################
|
||||
|
||||
list(APPEND HEADERS
|
||||
common/QskArcMetrics.h
|
||||
common/QskAspect.h
|
||||
common/QskBoxBorderColors.h
|
||||
common/QskBoxBorderMetrics.h
|
||||
common/QskBoxShapeMetrics.h
|
||||
common/QskBoxHints.h
|
||||
common/QskFunctions.h
|
||||
common/QskGlobal.h
|
||||
common/QskGradient.h
|
||||
common/QskGradientDirection.h
|
||||
common/QskGradientStop.h
|
||||
common/QskHctColor.h
|
||||
common/QskIntervalF.h
|
||||
common/QskLabelData.h
|
||||
common/QskMargins.h
|
||||
common/QskMetaFunction.h
|
||||
common/QskMetaFunction.hpp
|
||||
common/QskMetaInvokable.h
|
||||
common/QskNamespace.h
|
||||
common/QskObjectCounter.h
|
||||
common/QskPlacementPolicy.h
|
||||
common/QskPlatform.h
|
||||
common/QskRgbValue.h
|
||||
common/QskScaleEngine.h
|
||||
common/QskScaleTickmarks.h
|
||||
common/QskShadowMetrics.h
|
||||
common/QskSizePolicy.h
|
||||
common/QskStateCombination.h
|
||||
common/QskTextColors.h
|
||||
common/QskTextOptions.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES
|
||||
common/QskArcMetrics.cpp
|
||||
common/QskAspect.cpp
|
||||
common/QskBoxBorderColors.cpp
|
||||
common/QskBoxBorderMetrics.cpp
|
||||
common/QskBoxShapeMetrics.cpp
|
||||
common/QskBoxHints.cpp
|
||||
common/QskFunctions.cpp
|
||||
common/QskGradient.cpp
|
||||
common/QskGradientDirection.cpp
|
||||
common/QskGradientStop.cpp
|
||||
common/QskHctColor.cpp
|
||||
common/QskIntervalF.cpp
|
||||
common/QskLabelData.cpp
|
||||
common/QskMargins.cpp
|
||||
common/QskMetaFunction.cpp
|
||||
common/QskMetaInvokable.cpp
|
||||
common/QskObjectCounter.cpp
|
||||
common/QskPlatform.cpp
|
||||
common/QskPlacementPolicy.cpp
|
||||
common/QskRgbValue.cpp
|
||||
common/QskScaleEngine.cpp
|
||||
common/QskScaleTickmarks.cpp
|
||||
common/QskShadowMetrics.cpp
|
||||
common/QskSizePolicy.cpp
|
||||
common/QskTextColors.cpp
|
||||
common/QskTextOptions.cpp
|
||||
)
|
||||
|
||||
list(APPEND HEADERS
|
||||
graphic/QskColorFilter.h
|
||||
graphic/QskGraphic.h
|
||||
graphic/QskGraphicImageProvider.h
|
||||
graphic/QskGraphicIO.h
|
||||
graphic/QskGraphicPaintEngine.h
|
||||
graphic/QskGraphicProvider.h
|
||||
graphic/QskGraphicProviderMap.h
|
||||
graphic/QskGraphicTextureFactory.h
|
||||
graphic/QskIcon.h
|
||||
graphic/QskPainterCommand.h
|
||||
graphic/QskStandardSymbol.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES
|
||||
graphic/QskColorFilter.cpp
|
||||
graphic/QskGraphic.cpp
|
||||
graphic/QskGraphicImageProvider.cpp
|
||||
graphic/QskGraphicIO.cpp
|
||||
graphic/QskGraphicPaintEngine.cpp
|
||||
graphic/QskGraphicProvider.cpp
|
||||
graphic/QskGraphicProviderMap.cpp
|
||||
graphic/QskGraphicTextureFactory.cpp
|
||||
graphic/QskIcon.cpp
|
||||
graphic/QskPainterCommand.cpp
|
||||
graphic/QskStandardSymbol.cpp
|
||||
)
|
||||
|
||||
list(APPEND HEADERS
|
||||
nodes/QskArcNode.h
|
||||
nodes/QskArcRenderer.h
|
||||
nodes/QskBoxNode.h
|
||||
nodes/QskBoxClipNode.h
|
||||
nodes/QskBoxFillNode.h
|
||||
nodes/QskBoxRectangleNode.h
|
||||
nodes/QskBoxRenderer.h
|
||||
nodes/QskBoxMetrics.h
|
||||
nodes/QskBoxBasicStroker.h
|
||||
nodes/QskBoxGradientStroker.h
|
||||
nodes/QskBoxColorMap.h
|
||||
nodes/QskBoxShadowNode.h
|
||||
nodes/QskColorRamp.h
|
||||
nodes/QskGraphicNode.h
|
||||
nodes/QskPaintedNode.h
|
||||
nodes/QskPlainTextRenderer.h
|
||||
nodes/QskRichTextRenderer.h
|
||||
nodes/QskScaleRenderer.h
|
||||
nodes/QskSGNode.h
|
||||
nodes/QskStrokeNode.h
|
||||
nodes/QskShapeNode.h
|
||||
nodes/QskGradientMaterial.h
|
||||
nodes/QskTextNode.h
|
||||
nodes/QskTextRenderer.h
|
||||
nodes/QskTextureRenderer.h
|
||||
nodes/QskTickmarksNode.h
|
||||
nodes/QskVertex.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES
|
||||
nodes/QskArcNode.cpp
|
||||
nodes/QskArcRenderer.cpp
|
||||
nodes/QskBoxNode.cpp
|
||||
nodes/QskBoxClipNode.cpp
|
||||
nodes/QskBoxFillNode.cpp
|
||||
nodes/QskBoxRectangleNode.cpp
|
||||
nodes/QskBoxRenderer.cpp
|
||||
nodes/QskBoxMetrics.cpp
|
||||
nodes/QskBoxBasicStroker.cpp
|
||||
nodes/QskBoxGradientStroker.cpp
|
||||
nodes/QskBoxShadowNode.cpp
|
||||
nodes/QskColorRamp.cpp
|
||||
nodes/QskGraphicNode.cpp
|
||||
nodes/QskPaintedNode.cpp
|
||||
nodes/QskPlainTextRenderer.cpp
|
||||
nodes/QskRectangleNode.cpp
|
||||
nodes/QskRichTextRenderer.cpp
|
||||
nodes/QskScaleRenderer.cpp
|
||||
nodes/QskSGNode.cpp
|
||||
nodes/QskStrokeNode.cpp
|
||||
nodes/QskShapeNode.cpp
|
||||
nodes/QskGradientMaterial.cpp
|
||||
nodes/QskTextNode.cpp
|
||||
nodes/QskTextRenderer.cpp
|
||||
nodes/QskTextureRenderer.cpp
|
||||
nodes/QskTickmarksNode.cpp
|
||||
nodes/QskVertex.cpp
|
||||
)
|
||||
|
||||
qt_add_resources(SOURCES nodes/shaders.qrc)
|
||||
|
||||
list(APPEND HEADERS
|
||||
controls/QskAbstractButton.h
|
||||
controls/QskAnimationHint.h
|
||||
controls/QskAnimator.h
|
||||
controls/QskMainView.h
|
||||
controls/QskBoundedControl.h
|
||||
controls/QskBoundedInput.h
|
||||
controls/QskBoundedRangeInput.h
|
||||
controls/QskBoundedValueInput.h
|
||||
controls/QskBox.h
|
||||
controls/QskBoxSkinlet.h
|
||||
controls/QskCheckBox.h
|
||||
controls/QskCheckBoxSkinlet.h
|
||||
controls/QskComboBox.h
|
||||
controls/QskComboBoxSkinlet.h
|
||||
controls/QskControl.h
|
||||
controls/QskEvent.h
|
||||
controls/QskFlickAnimator.h
|
||||
controls/QskFocusIndicator.h
|
||||
controls/QskFocusIndicatorSkinlet.h
|
||||
controls/QskGesture.h
|
||||
controls/QskGestureRecognizer.h
|
||||
controls/QskGraphicLabel.h
|
||||
controls/QskGraphicLabelSkinlet.h
|
||||
controls/QskHintAnimator.h
|
||||
controls/QskInputGrabber.h
|
||||
controls/QskListView.h
|
||||
controls/QskListViewSkinlet.h
|
||||
controls/QskMenu.h
|
||||
controls/QskMenuSkinlet.h
|
||||
controls/QskObjectTree.h
|
||||
controls/QskPageIndicator.h
|
||||
controls/QskPageIndicatorSkinlet.h
|
||||
controls/QskPanGestureRecognizer.h
|
||||
controls/QskPopup.h
|
||||
controls/QskPopupSkinlet.h
|
||||
controls/QskPushButton.h
|
||||
controls/QskPushButtonSkinlet.h
|
||||
controls/QskProgressBar.h
|
||||
controls/QskProgressBarSkinlet.h
|
||||
controls/QskQuick.h
|
||||
controls/QskQuickItem.h
|
||||
controls/QskRadioBox.h
|
||||
controls/QskRadioBoxSkinlet.h
|
||||
controls/QskScrollArea.h
|
||||
controls/QskScrollBox.h
|
||||
controls/QskScrollView.h
|
||||
controls/QskScrollViewSkinlet.h
|
||||
controls/QskSegmentedBar.h
|
||||
controls/QskSegmentedBarSkinlet.h
|
||||
controls/QskSeparator.h
|
||||
controls/QskSeparatorSkinlet.h
|
||||
controls/QskSetup.h
|
||||
controls/QskShortcutMap.h
|
||||
controls/QskSimpleListBox.h
|
||||
controls/QskSkin.h
|
||||
controls/QskSkinFactory.h
|
||||
controls/QskSkinHintTable.h
|
||||
controls/QskSkinHintTableEditor.h
|
||||
controls/QskSkinManager.h
|
||||
controls/QskSkinStateChanger.h
|
||||
controls/QskSkinTransition.h
|
||||
controls/QskSkinlet.h
|
||||
controls/QskSkinnable.h
|
||||
controls/QskSlider.h
|
||||
controls/QskSliderSkinlet.h
|
||||
controls/QskStatusIndicator.h
|
||||
controls/QskStatusIndicatorSkinlet.h
|
||||
controls/QskSpinBox.h
|
||||
controls/QskSpinBoxSkinlet.h
|
||||
controls/QskSubWindowArea.h
|
||||
controls/QskSubWindowAreaSkinlet.h
|
||||
controls/QskSubWindow.h
|
||||
controls/QskSubWindowSkinlet.h
|
||||
controls/QskSwitchButton.h
|
||||
controls/QskSwitchButtonSkinlet.h
|
||||
controls/QskTabBar.h
|
||||
controls/QskTabButton.h
|
||||
controls/QskTabButtonSkinlet.h
|
||||
controls/QskTabView.h
|
||||
controls/QskTabViewSkinlet.h
|
||||
controls/QskTextInput.h
|
||||
controls/QskTextInputSkinlet.h
|
||||
controls/QskTextLabel.h
|
||||
controls/QskTextLabelSkinlet.h
|
||||
controls/QskVariantAnimator.h
|
||||
controls/QskWindow.h
|
||||
)
|
||||
|
||||
list(APPEND PRIVATE_HEADERS
|
||||
controls/QskDirtyItemFilter.h
|
||||
controls/QskControlPrivate.h
|
||||
controls/QskQuickItemPrivate.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES
|
||||
controls/QskAbstractButton.cpp
|
||||
controls/QskAnimator.cpp
|
||||
controls/QskAnimationHint.cpp
|
||||
controls/QskMainView.cpp
|
||||
controls/QskBoundedControl.cpp
|
||||
controls/QskBoundedInput.cpp
|
||||
controls/QskBoundedRangeInput.cpp
|
||||
controls/QskBoundedValueInput.cpp
|
||||
controls/QskBox.cpp
|
||||
controls/QskBoxSkinlet.cpp
|
||||
controls/QskCheckBox.cpp
|
||||
controls/QskCheckBoxSkinlet.cpp
|
||||
controls/QskComboBox.cpp
|
||||
controls/QskComboBoxSkinlet.cpp
|
||||
controls/QskControl.cpp
|
||||
controls/QskControlPrivate.cpp
|
||||
controls/QskDirtyItemFilter.cpp
|
||||
controls/QskEvent.cpp
|
||||
controls/QskFlickAnimator.cpp
|
||||
controls/QskFocusIndicator.cpp
|
||||
controls/QskFocusIndicatorSkinlet.cpp
|
||||
controls/QskGesture.cpp
|
||||
controls/QskGestureRecognizer.cpp
|
||||
controls/QskGraphicLabel.cpp
|
||||
controls/QskGraphicLabelSkinlet.cpp
|
||||
controls/QskHintAnimator.cpp
|
||||
controls/QskInputGrabber.cpp
|
||||
controls/QskListView.cpp
|
||||
controls/QskListViewSkinlet.cpp
|
||||
controls/QskMenuSkinlet.cpp
|
||||
controls/QskMenu.cpp
|
||||
controls/QskObjectTree.cpp
|
||||
controls/QskPageIndicator.cpp
|
||||
controls/QskPageIndicatorSkinlet.cpp
|
||||
controls/QskPanGestureRecognizer.cpp
|
||||
controls/QskPopup.cpp
|
||||
controls/QskPopupSkinlet.cpp
|
||||
controls/QskPushButton.cpp
|
||||
controls/QskPushButtonSkinlet.cpp
|
||||
controls/QskProgressBar.cpp
|
||||
controls/QskProgressBarSkinlet.cpp
|
||||
controls/QskQuick.cpp
|
||||
controls/QskQuickItem.cpp
|
||||
controls/QskQuickItemPrivate.cpp
|
||||
controls/QskScrollArea.cpp
|
||||
controls/QskScrollBox.cpp
|
||||
controls/QskScrollView.cpp
|
||||
controls/QskScrollViewSkinlet.cpp
|
||||
controls/QskRadioBox.cpp
|
||||
controls/QskRadioBoxSkinlet.cpp
|
||||
controls/QskSegmentedBar.cpp
|
||||
controls/QskSegmentedBarSkinlet.cpp
|
||||
controls/QskSeparator.cpp
|
||||
controls/QskSeparatorSkinlet.cpp
|
||||
controls/QskSetup.cpp
|
||||
controls/QskShortcutMap.cpp
|
||||
controls/QskSimpleListBox.cpp
|
||||
controls/QskSkin.cpp
|
||||
controls/QskSkinHintTable.cpp
|
||||
controls/QskSkinHintTableEditor.cpp
|
||||
controls/QskSkinFactory.cpp
|
||||
controls/QskSkinManager.cpp
|
||||
controls/QskSkinTransition.cpp
|
||||
controls/QskSkinlet.cpp
|
||||
controls/QskSkinnable.cpp
|
||||
controls/QskSlider.cpp
|
||||
controls/QskSliderSkinlet.cpp
|
||||
controls/QskSpinBox.cpp
|
||||
controls/QskSpinBoxSkinlet.cpp
|
||||
controls/QskStatusIndicator.cpp
|
||||
controls/QskStatusIndicatorSkinlet.cpp
|
||||
controls/QskSubWindowArea.cpp
|
||||
controls/QskSubWindowAreaSkinlet.cpp
|
||||
controls/QskSubWindow.cpp
|
||||
controls/QskSubWindowSkinlet.cpp
|
||||
controls/QskSwitchButton.cpp
|
||||
controls/QskSwitchButtonSkinlet.cpp
|
||||
controls/QskTabBar.cpp
|
||||
controls/QskTabButton.cpp
|
||||
controls/QskTabButtonSkinlet.cpp
|
||||
controls/QskTabView.cpp
|
||||
controls/QskTabViewSkinlet.cpp
|
||||
controls/QskTextInput.cpp
|
||||
controls/QskTextInputSkinlet.cpp
|
||||
controls/QskTextLabel.cpp
|
||||
controls/QskTextLabelSkinlet.cpp
|
||||
controls/QskVariantAnimator.cpp
|
||||
controls/QskWindow.cpp
|
||||
)
|
||||
|
||||
list(APPEND HEADERS
|
||||
layouts/QskGridBox.h
|
||||
layouts/QskGridLayoutEngine.h
|
||||
layouts/QskIndexedLayoutBox.h
|
||||
layouts/QskLayoutChain.h
|
||||
layouts/QskLayoutEngine2D.h
|
||||
layouts/QskLayoutElement.h
|
||||
layouts/QskLayoutMetrics.h
|
||||
layouts/QskLinearBox.h
|
||||
layouts/QskLinearLayoutEngine.h
|
||||
layouts/QskStackBoxAnimator.h
|
||||
layouts/QskStackBox.h
|
||||
)
|
||||
|
||||
list(APPEND PRIVATE_HEADERS
|
||||
layouts/QskSubcontrolLayoutEngine.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES
|
||||
layouts/QskGridBox.cpp
|
||||
layouts/QskGridLayoutEngine.cpp
|
||||
layouts/QskIndexedLayoutBox.cpp
|
||||
layouts/QskLayoutChain.cpp
|
||||
layouts/QskLayoutEngine2D.cpp
|
||||
layouts/QskLayoutElement.cpp
|
||||
layouts/QskLayoutMetrics.cpp
|
||||
layouts/QskLinearBox.cpp
|
||||
layouts/QskLinearLayoutEngine.cpp
|
||||
layouts/QskStackBoxAnimator.cpp
|
||||
layouts/QskStackBox.cpp
|
||||
layouts/QskSubcontrolLayoutEngine.cpp
|
||||
)
|
||||
|
||||
list(APPEND HEADERS
|
||||
dialogs/QskDialog.h
|
||||
dialogs/QskDialogButton.h
|
||||
dialogs/QskDialogButtonBox.h
|
||||
dialogs/QskDialogSubWindow.h
|
||||
dialogs/QskDialogWindow.h
|
||||
dialogs/QskMessageSubWindow.h
|
||||
dialogs/QskMessageWindow.h
|
||||
dialogs/QskSelectionSubWindow.h
|
||||
dialogs/QskSelectionWindow.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES
|
||||
dialogs/QskDialogButton.cpp
|
||||
dialogs/QskDialogButtonBox.cpp
|
||||
dialogs/QskDialog.cpp
|
||||
dialogs/QskDialogSubWindow.cpp
|
||||
dialogs/QskDialogWindow.cpp
|
||||
dialogs/QskMessageSubWindow.cpp
|
||||
dialogs/QskMessageWindow.cpp
|
||||
dialogs/QskSelectionSubWindow.cpp
|
||||
dialogs/QskSelectionWindow.cpp
|
||||
)
|
||||
|
||||
list(APPEND HEADERS
|
||||
inputpanel/QskTextPredictor.h
|
||||
inputpanel/QskInputContext.h
|
||||
inputpanel/QskInputPanel.h
|
||||
inputpanel/QskInputPanelBox.h
|
||||
inputpanel/QskInputPredictionBar.h
|
||||
inputpanel/QskVirtualKeyboard.h
|
||||
)
|
||||
|
||||
list(APPEND SOURCES
|
||||
inputpanel/QskTextPredictor.cpp
|
||||
inputpanel/QskInputContext.cpp
|
||||
inputpanel/QskInputPanel.cpp
|
||||
inputpanel/QskInputPanelBox.cpp
|
||||
inputpanel/QskInputPredictionBar.cpp
|
||||
inputpanel/QskVirtualKeyboard.cpp
|
||||
)
|
||||
|
||||
if(ENABLE_PINYIN)
|
||||
list(APPEND HEADERS inputpanel/QskPinyinTextPredictor.h)
|
||||
list(APPEND SOURCES inputpanel/QskPinyinTextPredictor.cpp)
|
||||
endif()
|
||||
|
||||
if(ENABLE_HUNSPELL)
|
||||
list(APPEND HEADERS inputpanel/QskHunspellTextPredictor.h)
|
||||
list(APPEND SOURCES inputpanel/QskHunspellTextPredictor.cpp)
|
||||
endif()
|
||||
|
||||
set(target qskinny)
|
||||
|
||||
if(BUILD_QSKDLL)
|
||||
qsk_add_library(${target} SHARED ${SOURCES} ${HEADERS} ${PRIVATE_HEADERS})
|
||||
else()
|
||||
qsk_add_library(${target} STATIC ${SOURCES} ${HEADERS} ${PRIVATE_HEADERS})
|
||||
endif()
|
||||
|
||||
if(BUILD_QSKDLL)
|
||||
target_compile_definitions(${target} PUBLIC QSK_DLL )
|
||||
set_target_properties(${target} PROPERTIES DEFINE_SYMBOL QSK_MAKEDLL)
|
||||
endif()
|
||||
|
||||
target_include_directories(${target} PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/common>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/controls>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/dialogs>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphic>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/inputpanel>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/layouts>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes>)
|
||||
|
||||
target_link_libraries(${target}
|
||||
PUBLIC Qt::Core Qt::CorePrivate Qt::Quick Qt::QuickPrivate)
|
||||
|
||||
if (QT_VERSION_MAJOR VERSION_GREATER 5)
|
||||
target_link_libraries(${target} PUBLIC Qt::OpenGL Qt::OpenGLPrivate)
|
||||
endif()
|
||||
|
||||
if(ENABLE_HUNSPELL)
|
||||
target_link_libraries(${target} PRIVATE hunspell)
|
||||
endif()
|
||||
|
||||
if(ENABLE_PINYIN)
|
||||
target_compile_definitions(${target} PRIVATE PINYIN)
|
||||
target_link_libraries(${target} PRIVATE pinyin Fcitx5::Utils)
|
||||
|
||||
target_include_directories(${target}
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/inputcontext>)
|
||||
endif()
|
||||
|
||||
set_target_properties(${target} PROPERTIES FOLDER libs)
|
||||
|
||||
# TODO hack for standalone qvg2svg
|
||||
set_target_properties(${target}
|
||||
PROPERTIES AUTOGEN_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/qskinny_autogen)
|
||||
|
||||
list(TRANSFORM HEADERS PREPEND "${CMAKE_CURRENT_LIST_DIR}/")
|
||||
set_target_properties(${target} PROPERTIES PUBLIC_HEADER "${HEADERS}")
|
||||
set_target_properties(${target} PROPERTIES
|
||||
VERSION ${CMAKE_PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} )
|
||||
|
||||
install(TARGETS ${target} )
|
454
src/src.pro
454
src/src.pro
|
@ -1,454 +0,0 @@
|
|||
TEMPLATE = lib
|
||||
TARGET = $$qskLibraryTarget(qskinny)
|
||||
|
||||
QT += quick quick-private
|
||||
|
||||
greaterThan( QT_MAJOR_VERSION, 5 ) {
|
||||
QT += opengl-private
|
||||
}
|
||||
|
||||
contains(QSK_CONFIG, QskDll): DEFINES += QSK_MAKEDLL
|
||||
|
||||
QSK_SUBDIRS = common graphic nodes controls layouts dialogs inputpanel
|
||||
INCLUDEPATH *= $${QSK_SUBDIRS}
|
||||
DEPENDPATH *= $${QSK_SUBDIRS}
|
||||
|
||||
# CONFIG += pinyin
|
||||
# CONFIG += hunspell
|
||||
|
||||
HEADERS += \
|
||||
common/QskArcMetrics.h \
|
||||
common/QskAspect.h \
|
||||
common/QskBoxBorderColors.h \
|
||||
common/QskBoxBorderMetrics.h \
|
||||
common/QskBoxShapeMetrics.h \
|
||||
common/QskBoxHints.h \
|
||||
common/QskFunctions.h \
|
||||
common/QskGlobal.h \
|
||||
common/QskGradient.h \
|
||||
common/QskGradientDirection.h \
|
||||
common/QskGradientStop.h \
|
||||
common/QskHctColor.h \
|
||||
common/QskIntervalF.h \
|
||||
common/QskLabelData.h \
|
||||
common/QskMargins.h \
|
||||
common/QskMetaFunction.h \
|
||||
common/QskMetaFunction.hpp \
|
||||
common/QskMetaInvokable.h \
|
||||
common/QskNamespace.h \
|
||||
common/QskObjectCounter.h \
|
||||
common/QskPlacementPolicy.h \
|
||||
common/QskPlatform.h \
|
||||
common/QskRgbValue.h \
|
||||
common/QskScaleEngine.h \
|
||||
common/QskScaleTickmarks.h \
|
||||
common/QskShadowMetrics.h \
|
||||
common/QskSizePolicy.h \
|
||||
common/QskStateCombination.h \
|
||||
common/QskTextColors.h \
|
||||
common/QskTextOptions.h
|
||||
|
||||
SOURCES += \
|
||||
common/QskArcMetrics.cpp \
|
||||
common/QskAspect.cpp \
|
||||
common/QskBoxBorderColors.cpp \
|
||||
common/QskBoxBorderMetrics.cpp \
|
||||
common/QskBoxShapeMetrics.cpp \
|
||||
common/QskBoxHints.cpp \
|
||||
common/QskFunctions.cpp \
|
||||
common/QskGradient.cpp \
|
||||
common/QskGradientDirection.cpp \
|
||||
common/QskGradientStop.cpp \
|
||||
common/QskHctColor.cpp \
|
||||
common/QskIntervalF.cpp \
|
||||
common/QskLabelData.cpp \
|
||||
common/QskMargins.cpp \
|
||||
common/QskMetaFunction.cpp \
|
||||
common/QskMetaInvokable.cpp \
|
||||
common/QskObjectCounter.cpp \
|
||||
common/QskPlatform.cpp \
|
||||
common/QskPlacementPolicy.cpp \
|
||||
common/QskRgbValue.cpp \
|
||||
common/QskScaleEngine.cpp \
|
||||
common/QskScaleTickmarks.cpp \
|
||||
common/QskShadowMetrics.cpp \
|
||||
common/QskSizePolicy.cpp \
|
||||
common/QskTextColors.cpp \
|
||||
common/QskTextOptions.cpp
|
||||
|
||||
HEADERS += \
|
||||
graphic/QskColorFilter.h \
|
||||
graphic/QskGraphic.h \
|
||||
graphic/QskGraphicImageProvider.h \
|
||||
graphic/QskGraphicIO.h \
|
||||
graphic/QskGraphicPaintEngine.h \
|
||||
graphic/QskGraphicProvider.h \
|
||||
graphic/QskGraphicProviderMap.h \
|
||||
graphic/QskGraphicTextureFactory.h \
|
||||
graphic/QskIcon.h \
|
||||
graphic/QskPainterCommand.h \
|
||||
graphic/QskStandardSymbol.h
|
||||
|
||||
SOURCES += \
|
||||
graphic/QskColorFilter.cpp \
|
||||
graphic/QskGraphic.cpp \
|
||||
graphic/QskGraphicImageProvider.cpp \
|
||||
graphic/QskGraphicIO.cpp \
|
||||
graphic/QskGraphicPaintEngine.cpp \
|
||||
graphic/QskGraphicProvider.cpp \
|
||||
graphic/QskGraphicProviderMap.cpp \
|
||||
graphic/QskGraphicTextureFactory.cpp \
|
||||
graphic/QskIcon.cpp \
|
||||
graphic/QskPainterCommand.cpp \
|
||||
graphic/QskStandardSymbol.cpp
|
||||
|
||||
HEADERS += \
|
||||
nodes/QskArcNode.h \
|
||||
nodes/QskArcRenderer.h \
|
||||
nodes/QskBoxNode.h \
|
||||
nodes/QskBoxClipNode.h \
|
||||
nodes/QskBoxFillNode.h \
|
||||
nodes/QskBoxRectangleNode.h \
|
||||
nodes/QskBoxRenderer.h \
|
||||
nodes/QskBoxMetrics.h \
|
||||
nodes/QskBoxBasicStroker.h \
|
||||
nodes/QskBoxGradientStroker.h \
|
||||
nodes/QskBoxColorMap.h \
|
||||
nodes/QskBoxShadowNode.h \
|
||||
nodes/QskColorRamp.h \
|
||||
nodes/QskGraphicNode.h \
|
||||
nodes/QskPaintedNode.h \
|
||||
nodes/QskPlainTextRenderer.h \
|
||||
nodes/QskRectangleNode.h \
|
||||
nodes/QskRichTextRenderer.h \
|
||||
nodes/QskScaleRenderer.h \
|
||||
nodes/QskSGNode.h \
|
||||
nodes/QskStrokeNode.h \
|
||||
nodes/QskShapeNode.h \
|
||||
nodes/QskGradientMaterial.h \
|
||||
nodes/QskTextNode.h \
|
||||
nodes/QskTextRenderer.h \
|
||||
nodes/QskTextureRenderer.h \
|
||||
nodes/QskTickmarksNode.h \
|
||||
nodes/QskVertex.h
|
||||
|
||||
SOURCES += \
|
||||
nodes/QskArcNode.cpp \
|
||||
nodes/QskArcRenderer.cpp \
|
||||
nodes/QskBoxNode.cpp \
|
||||
nodes/QskBoxClipNode.cpp \
|
||||
nodes/QskBoxFillNode.cpp \
|
||||
nodes/QskBoxRectangleNode.cpp \
|
||||
nodes/QskBoxRenderer.cpp \
|
||||
nodes/QskBoxMetrics.cpp \
|
||||
nodes/QskBoxBasicStroker.cpp \
|
||||
nodes/QskBoxGradientStroker.cpp \
|
||||
nodes/QskBoxShadowNode.cpp \
|
||||
nodes/QskColorRamp.cpp \
|
||||
nodes/QskGraphicNode.cpp \
|
||||
nodes/QskPaintedNode.cpp \
|
||||
nodes/QskPlainTextRenderer.cpp \
|
||||
nodes/QskRectangleNode.cpp \
|
||||
nodes/QskRichTextRenderer.cpp \
|
||||
nodes/QskScaleRenderer.cpp \
|
||||
nodes/QskSGNode.cpp \
|
||||
nodes/QskStrokeNode.cpp \
|
||||
nodes/QskShapeNode.cpp \
|
||||
nodes/QskGradientMaterial.cpp \
|
||||
nodes/QskTextNode.cpp \
|
||||
nodes/QskTextRenderer.cpp \
|
||||
nodes/QskTextureRenderer.cpp \
|
||||
nodes/QskTickmarksNode.cpp \
|
||||
nodes/QskVertex.cpp
|
||||
|
||||
RESOURCES += \
|
||||
nodes/shaders.qrc
|
||||
|
||||
HEADERS += \
|
||||
controls/QskAbstractButton.h \
|
||||
controls/QskAnimationHint.h \
|
||||
controls/QskAnimator.h \
|
||||
controls/QskBoundedControl.h \
|
||||
controls/QskBoundedInput.h \
|
||||
controls/QskBoundedRangeInput.h \
|
||||
controls/QskBoundedValueInput.h \
|
||||
controls/QskBox.h \
|
||||
controls/QskBoxSkinlet.h \
|
||||
controls/QskCheckBox.h \
|
||||
controls/QskCheckBoxSkinlet.h \
|
||||
controls/QskComboBox.h \
|
||||
controls/QskComboBoxSkinlet.h \
|
||||
controls/QskControl.h \
|
||||
controls/QskControlPrivate.h \
|
||||
controls/QskDirtyItemFilter.h \
|
||||
controls/QskEvent.h \
|
||||
controls/QskFlickAnimator.h \
|
||||
controls/QskFocusIndicator.h \
|
||||
controls/QskFocusIndicatorSkinlet.h \
|
||||
controls/QskGesture.h \
|
||||
controls/QskGestureRecognizer.h \
|
||||
controls/QskGraphicLabel.h \
|
||||
controls/QskGraphicLabelSkinlet.h \
|
||||
controls/QskHintAnimator.h \
|
||||
controls/QskInputGrabber.h \
|
||||
controls/QskListView.h \
|
||||
controls/QskListViewSkinlet.h \
|
||||
controls/QskMainView.h \
|
||||
controls/QskMenu.h \
|
||||
controls/QskMenuSkinlet.h \
|
||||
controls/QskObjectTree.h \
|
||||
controls/QskPageIndicator.h \
|
||||
controls/QskPageIndicatorSkinlet.h \
|
||||
controls/QskPanGestureRecognizer.h \
|
||||
controls/QskPopup.h \
|
||||
controls/QskPopupSkinlet.h \
|
||||
controls/QskPushButton.h \
|
||||
controls/QskPushButtonSkinlet.h \
|
||||
controls/QskProgressBar.h \
|
||||
controls/QskProgressBarSkinlet.h \
|
||||
controls/QskQuick.h \
|
||||
controls/QskQuickItem.h \
|
||||
controls/QskQuickItemPrivate.h \
|
||||
controls/QskRadioBox.h \
|
||||
controls/QskRadioBoxSkinlet.h \
|
||||
controls/QskScrollArea.h \
|
||||
controls/QskScrollBox.h \
|
||||
controls/QskScrollView.h \
|
||||
controls/QskScrollViewSkinlet.h \
|
||||
controls/QskSegmentedBar.h \
|
||||
controls/QskSegmentedBarSkinlet.h \
|
||||
controls/QskSeparator.h \
|
||||
controls/QskSeparatorSkinlet.h \
|
||||
controls/QskSetup.h \
|
||||
controls/QskShortcutMap.h \
|
||||
controls/QskSimpleListBox.h \
|
||||
controls/QskSkin.h \
|
||||
controls/QskSkinFactory.h \
|
||||
controls/QskSkinHintTable.h \
|
||||
controls/QskSkinHintTableEditor.h \
|
||||
controls/QskSkinManager.h \
|
||||
controls/QskSkinStateChanger.h \
|
||||
controls/QskSkinTransition.h \
|
||||
controls/QskSkinlet.h \
|
||||
controls/QskSkinnable.h \
|
||||
controls/QskSlider.h \
|
||||
controls/QskSliderSkinlet.h \
|
||||
controls/QskStatusIndicator.h \
|
||||
controls/QskStatusIndicatorSkinlet.h \
|
||||
controls/QskSpinBox.h \
|
||||
controls/QskSpinBoxSkinlet.h \
|
||||
controls/QskSubWindowArea.h \
|
||||
controls/QskSubWindowAreaSkinlet.h \
|
||||
controls/QskSubWindow.h \
|
||||
controls/QskSubWindowSkinlet.h \
|
||||
controls/QskSwitchButton.h \
|
||||
controls/QskSwitchButtonSkinlet.h \
|
||||
controls/QskTabBar.h \
|
||||
controls/QskTabButton.h \
|
||||
controls/QskTabButtonSkinlet.h \
|
||||
controls/QskTabView.h \
|
||||
controls/QskTabViewSkinlet.h \
|
||||
controls/QskTextInput.h \
|
||||
controls/QskTextInputSkinlet.h \
|
||||
controls/QskTextLabel.h \
|
||||
controls/QskTextLabelSkinlet.h \
|
||||
controls/QskVariantAnimator.h \
|
||||
controls/QskWindow.h
|
||||
|
||||
SOURCES += \
|
||||
controls/QskAbstractButton.cpp \
|
||||
controls/QskAnimator.cpp \
|
||||
controls/QskAnimationHint.cpp \
|
||||
controls/QskBoundedControl.cpp \
|
||||
controls/QskBoundedInput.cpp \
|
||||
controls/QskBoundedRangeInput.cpp \
|
||||
controls/QskBoundedValueInput.cpp \
|
||||
controls/QskBox.cpp \
|
||||
controls/QskBoxSkinlet.cpp \
|
||||
controls/QskCheckBox.cpp \
|
||||
controls/QskCheckBoxSkinlet.cpp \
|
||||
controls/QskComboBox.cpp \
|
||||
controls/QskComboBoxSkinlet.cpp \
|
||||
controls/QskControl.cpp \
|
||||
controls/QskControlPrivate.cpp \
|
||||
controls/QskDirtyItemFilter.cpp \
|
||||
controls/QskEvent.cpp \
|
||||
controls/QskFlickAnimator.cpp \
|
||||
controls/QskFocusIndicator.cpp \
|
||||
controls/QskFocusIndicatorSkinlet.cpp \
|
||||
controls/QskGesture.cpp \
|
||||
controls/QskGestureRecognizer.cpp \
|
||||
controls/QskGraphicLabel.cpp \
|
||||
controls/QskGraphicLabelSkinlet.cpp \
|
||||
controls/QskHintAnimator.cpp \
|
||||
controls/QskInputGrabber.cpp \
|
||||
controls/QskListView.cpp \
|
||||
controls/QskListViewSkinlet.cpp \
|
||||
controls/QskMainView.cpp \
|
||||
controls/QskMenuSkinlet.cpp \
|
||||
controls/QskMenu.cpp \
|
||||
controls/QskObjectTree.cpp \
|
||||
controls/QskPageIndicator.cpp \
|
||||
controls/QskPageIndicatorSkinlet.cpp \
|
||||
controls/QskPanGestureRecognizer.cpp \
|
||||
controls/QskPopup.cpp \
|
||||
controls/QskPopupSkinlet.cpp \
|
||||
controls/QskPushButton.cpp \
|
||||
controls/QskPushButtonSkinlet.cpp \
|
||||
controls/QskProgressBar.cpp \
|
||||
controls/QskProgressBarSkinlet.cpp \
|
||||
controls/QskQuick.cpp \
|
||||
controls/QskQuickItem.cpp \
|
||||
controls/QskQuickItemPrivate.cpp \
|
||||
controls/QskScrollArea.cpp \
|
||||
controls/QskScrollBox.cpp \
|
||||
controls/QskScrollView.cpp \
|
||||
controls/QskRadioBox.cpp \
|
||||
controls/QskRadioBoxSkinlet.cpp \
|
||||
controls/QskScrollViewSkinlet.cpp \
|
||||
controls/QskSegmentedBar.cpp \
|
||||
controls/QskSegmentedBarSkinlet.cpp \
|
||||
controls/QskSeparator.cpp \
|
||||
controls/QskSeparatorSkinlet.cpp \
|
||||
controls/QskSetup.cpp \
|
||||
controls/QskShortcutMap.cpp \
|
||||
controls/QskSimpleListBox.cpp \
|
||||
controls/QskSkin.cpp \
|
||||
controls/QskSkinHintTable.cpp \
|
||||
controls/QskSkinHintTableEditor.cpp \
|
||||
controls/QskSkinFactory.cpp \
|
||||
controls/QskSkinManager.cpp \
|
||||
controls/QskSkinTransition.cpp \
|
||||
controls/QskSkinlet.cpp \
|
||||
controls/QskSkinnable.cpp \
|
||||
controls/QskSlider.cpp \
|
||||
controls/QskSliderSkinlet.cpp \
|
||||
controls/QskSpinBox.cpp \
|
||||
controls/QskSpinBoxSkinlet.cpp \
|
||||
controls/QskStatusIndicator.cpp \
|
||||
controls/QskStatusIndicatorSkinlet.cpp \
|
||||
controls/QskSubWindowArea.cpp \
|
||||
controls/QskSubWindowAreaSkinlet.cpp \
|
||||
controls/QskSubWindow.cpp \
|
||||
controls/QskSubWindowSkinlet.cpp \
|
||||
controls/QskSwitchButton.cpp \
|
||||
controls/QskSwitchButtonSkinlet.cpp \
|
||||
controls/QskTabBar.cpp \
|
||||
controls/QskTabButton.cpp \
|
||||
controls/QskTabButtonSkinlet.cpp \
|
||||
controls/QskTabView.cpp \
|
||||
controls/QskTabViewSkinlet.cpp \
|
||||
controls/QskTextInput.cpp \
|
||||
controls/QskTextInputSkinlet.cpp \
|
||||
controls/QskTextLabel.cpp \
|
||||
controls/QskTextLabelSkinlet.cpp \
|
||||
controls/QskVariantAnimator.cpp \
|
||||
controls/QskWindow.cpp
|
||||
|
||||
HEADERS += \
|
||||
layouts/QskGridBox.h \
|
||||
layouts/QskGridLayoutEngine.h \
|
||||
layouts/QskIndexedLayoutBox.h \
|
||||
layouts/QskLayoutChain.h \
|
||||
layouts/QskLayoutEngine2D.h \
|
||||
layouts/QskLayoutElement.h \
|
||||
layouts/QskLayoutMetrics.h \
|
||||
layouts/QskLinearBox.h \
|
||||
layouts/QskLinearLayoutEngine.h \
|
||||
layouts/QskStackBoxAnimator.h \
|
||||
layouts/QskStackBox.h \
|
||||
layouts/QskSubcontrolLayoutEngine.h
|
||||
|
||||
SOURCES += \
|
||||
layouts/QskGridBox.cpp \
|
||||
layouts/QskGridLayoutEngine.cpp \
|
||||
layouts/QskIndexedLayoutBox.cpp \
|
||||
layouts/QskLayoutChain.cpp \
|
||||
layouts/QskLayoutEngine2D.cpp \
|
||||
layouts/QskLayoutElement.cpp \
|
||||
layouts/QskLayoutMetrics.cpp \
|
||||
layouts/QskLinearBox.cpp \
|
||||
layouts/QskLinearLayoutEngine.cpp \
|
||||
layouts/QskStackBoxAnimator.cpp \
|
||||
layouts/QskStackBox.cpp \
|
||||
layouts/QskSubcontrolLayoutEngine.cpp
|
||||
|
||||
HEADERS += \
|
||||
dialogs/QskDialog.h \
|
||||
dialogs/QskDialogButton.h \
|
||||
dialogs/QskDialogButtonBox.h \
|
||||
dialogs/QskDialogSubWindow.h \
|
||||
dialogs/QskDialogWindow.h \
|
||||
dialogs/QskMessageSubWindow.h \
|
||||
dialogs/QskMessageWindow.h \
|
||||
dialogs/QskSelectionSubWindow.h \
|
||||
dialogs/QskSelectionWindow.h
|
||||
|
||||
SOURCES += \
|
||||
dialogs/QskDialogButton.cpp \
|
||||
dialogs/QskDialogButtonBox.cpp \
|
||||
dialogs/QskDialog.cpp \
|
||||
dialogs/QskDialogSubWindow.cpp \
|
||||
dialogs/QskDialogWindow.cpp \
|
||||
dialogs/QskMessageSubWindow.cpp \
|
||||
dialogs/QskMessageWindow.cpp \
|
||||
dialogs/QskSelectionSubWindow.cpp \
|
||||
dialogs/QskSelectionWindow.cpp
|
||||
|
||||
HEADERS += \
|
||||
inputpanel/QskTextPredictor.h \
|
||||
inputpanel/QskInputContext.h \
|
||||
inputpanel/QskInputPanel.h \
|
||||
inputpanel/QskInputPanelBox.h \
|
||||
inputpanel/QskInputPredictionBar.h \
|
||||
inputpanel/QskVirtualKeyboard.h
|
||||
|
||||
SOURCES += \
|
||||
inputpanel/QskTextPredictor.cpp \
|
||||
inputpanel/QskInputContext.cpp \
|
||||
inputpanel/QskInputPanel.cpp \
|
||||
inputpanel/QskInputPanelBox.cpp \
|
||||
inputpanel/QskInputPredictionBar.cpp \
|
||||
inputpanel/QskVirtualKeyboard.cpp
|
||||
|
||||
|
||||
pinyin {
|
||||
|
||||
unix {
|
||||
|
||||
DEFINES += PINYIN
|
||||
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += pinyin
|
||||
|
||||
HEADERS += \
|
||||
inputpanel/QskPinyinTextPredictor.h
|
||||
|
||||
SOURCES += \
|
||||
inputpanel/QskPinyinTextPredictor.cpp
|
||||
}
|
||||
}
|
||||
|
||||
hunspell {
|
||||
|
||||
unix {
|
||||
|
||||
DEFINES += HUNSPELL
|
||||
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += hunspell
|
||||
|
||||
HEADERS += \
|
||||
inputpanel/QskHunspellTextPredictor.h
|
||||
|
||||
SOURCES += \
|
||||
inputpanel/QskHunspellTextPredictor.cpp
|
||||
}
|
||||
}
|
||||
|
||||
target.path = $${QSK_INSTALL_LIBS}
|
||||
INSTALLS = target
|
||||
|
||||
header_files.files = $$HEADERS
|
||||
header_files.path = $${QSK_INSTALL_HEADERS}
|
||||
INSTALLS += header_files
|
|
@ -0,0 +1,59 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the 3-clause BSD License
|
||||
############################################################################
|
||||
|
||||
set(SOURCES
|
||||
SkinnyGlobal.h
|
||||
SkinnyNamespace.h SkinnyNamespace.cpp
|
||||
SkinnyShapeFactory.h SkinnyShapeFactory.cpp
|
||||
SkinnyShapeProvider.h SkinnyShapeProvider.cpp
|
||||
SkinnyShortcut.h SkinnyShortcut.cpp
|
||||
)
|
||||
|
||||
set(target qsktestsupport)
|
||||
|
||||
if (BUILD_QSKDLL)
|
||||
qsk_add_library(${target} SHARED ${SOURCES})
|
||||
else()
|
||||
qsk_add_library(${target} STATIC ${SOURCES})
|
||||
endif()
|
||||
|
||||
target_link_libraries(${target} PUBLIC qskinny)
|
||||
|
||||
if (BUILD_QSKDLL)
|
||||
set_target_properties( ${target} PROPERTIES DEFINE_SYMBOL SKINNY_MAKEDLL )
|
||||
endif()
|
||||
|
||||
target_compile_definitions(${target}
|
||||
PRIVATE PLUGIN_PATH=${CMAKE_BINARY_DIR}/plugins)
|
||||
|
||||
target_include_directories(${target} PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
if(ENABLE_ENSURE_SKINS)
|
||||
target_include_directories(${target} PRIVATE ${CMAKE_SOURCE_DIR}/skins)
|
||||
target_compile_definitions(${target} PRIVATE ENSURE_SKINS)
|
||||
target_link_libraries(${target} PRIVATE squiekskin material3skin)
|
||||
endif()
|
||||
|
||||
set(HIDE_SYSTEM_FONTS ON)
|
||||
|
||||
if(HIDE_SYSTEM_FONTS)
|
||||
message( STATUS "Hiding system fonts from the examples" )
|
||||
|
||||
# The fonts being used in the examples are included and we do not
|
||||
# need the fonts from the system. To avoid, that setting up the font
|
||||
# cache slows doesn the stratup performance we hide the system fonts
|
||||
# be using a dummy font config environment.
|
||||
# ( this hack is pretty old ( Qt 5.4 ) - maybe it is not needed anymore TODO )
|
||||
|
||||
set(QSK_FONTDIR ${CMAKE_CURRENT_LIST_DIR}/fonts)
|
||||
set(QSK_FONTCACHEDIR ${CMAKE_CURRENT_BINARY_DIR}/fontconfig)
|
||||
set(QSK_FONTCONF_FILE ${QSK_FONTCACHEDIR}/fonts.conf)
|
||||
|
||||
configure_file(fonts.conf.cmake.in ${QSK_FONTCONF_FILE}
|
||||
@ONLY NEWLINE_STYLE LF)
|
||||
|
||||
target_compile_definitions(${target}
|
||||
PRIVATE FONTCONFIG_FILE=${QSK_FONTCONF_FILE})
|
||||
endif()
|
|
@ -1,9 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
|
||||
<fontconfig>
|
||||
|
||||
<dir>FONTDIR</dir>
|
||||
<cachedir>FONTCACHEDIR/cache</cachedir>
|
||||
|
||||
<dir>@QSK_FONTDIR@</dir>
|
||||
<cachedir>@QSK_FONTCACHEDIR@/cache</cachedir>
|
||||
</fontconfig>
|
|
@ -1,57 +0,0 @@
|
|||
TEMPLATE = lib
|
||||
TARGET = $$qskLibraryTarget(qsktestsupport)
|
||||
|
||||
target.path = $${QSK_INSTALL_EXAMPLES}/lib
|
||||
INSTALLS = target
|
||||
|
||||
CONFIG += ensure_skins
|
||||
CONFIG += fontconfig
|
||||
CONFIG += qskinny
|
||||
|
||||
contains(QSK_CONFIG, QskDll): DEFINES += SKINNY_MAKEDLL
|
||||
|
||||
HEADERS += \
|
||||
SkinnyGlobal.h \
|
||||
SkinnyNamespace.h \
|
||||
SkinnyShapeFactory.h \
|
||||
SkinnyShapeProvider.h \
|
||||
SkinnyShortcut.h
|
||||
|
||||
SOURCES += \
|
||||
SkinnyNamespace.cpp \
|
||||
SkinnyShapeFactory.cpp \
|
||||
SkinnyShapeProvider.cpp \
|
||||
SkinnyShortcut.cpp
|
||||
|
||||
DEFINES += PLUGIN_PATH=$${QSK_PLUGIN_DIR}
|
||||
|
||||
ensure_skins {
|
||||
|
||||
# Enabling fall back code, that inserts some skin factories manually
|
||||
# when not finding skin factories as plugins
|
||||
|
||||
INCLUDEPATH *= $${QSK_ROOT}/skins
|
||||
DEPENDPATH *= $${QSK_ROOT}/skins
|
||||
|
||||
DEFINES += ENSURE_SKINS
|
||||
|
||||
use_install_rpath: QMAKE_RPATHDIR *= $${QSK_INSTALL_PLUGINS}/skins
|
||||
use_local_rpath: QMAKE_RPATHDIR *= $${QSK_PLUGIN_DIR}/skins
|
||||
|
||||
qskAddLibrary($${QSK_PLUGIN_DIR}/skins, squiekskin)
|
||||
qskAddLibrary($${QSK_PLUGIN_DIR}/skins, material3skin)
|
||||
}
|
||||
|
||||
fontconfig {
|
||||
|
||||
QSK_FONTDIR=$${PWD}/fonts
|
||||
QSK_FONTCACHEDIR=$${OUT_PWD}/fontconfig
|
||||
QSK_FONTCONF_FILE=$${QSK_FONTCACHEDIR}/fonts.conf
|
||||
|
||||
QSK_FONTCONF_DATA = "$$cat( $${PWD}/fonts.conf.in, false )"
|
||||
QSK_FONTCONF_DATA = $$replace(QSK_FONTCONF_DATA, FONTCACHEDIR, $${QSK_FONTCACHEDIR} )
|
||||
QSK_FONTCONF_DATA = $$replace(QSK_FONTCONF_DATA, FONTDIR, $${QSK_FONTDIR} )
|
||||
write_file( $${QSK_FONTCONF_FILE}, QSK_FONTCONF_DATA )
|
||||
|
||||
DEFINES += FONTCONFIG_FILE=$$clean_path( $$QSK_FONTCONF_FILE )
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
if(TARGET Qt::Svg)
|
||||
add_subdirectory(svg2qvg)
|
||||
endif()
|
|
@ -0,0 +1,44 @@
|
|||
############################################################################
|
||||
# QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
# This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
############################################################################
|
||||
|
||||
set(target svg2qvg)
|
||||
qsk_add_executable(${target} main.cpp)
|
||||
|
||||
if(BUILD_SVG2QVG_STANDALONE)
|
||||
|
||||
# NOTE: when building standalone some moc files are transitively required.
|
||||
# These files are being created by the qskinny build, hence we add an explicit dependency.
|
||||
# E.g. main.cpp -> #include <QskGraphic.cpp> -> #include "moc_QskGraphic.cpp"
|
||||
add_dependencies(${target} qskinny)
|
||||
|
||||
# TODO hack for standalone qvg2svg
|
||||
get_target_property(qskinny_AUTOGEN_DIR qskinny AUTOGEN_BUILD_DIR)
|
||||
if (${qskinny_AUTOGEN_DIR} STREQUAL "")
|
||||
message(FATAL_ERROR "Directory '${qskinny_AUTOGEN_DIR}' doesn't exist")
|
||||
endif()
|
||||
|
||||
# TODO fix multi configuration generators
|
||||
if(CMAKE_GENERATOR MATCHES "Visual Studio.*")
|
||||
add_definitions("/I${qskinny_AUTOGEN_DIR}/include_\$(Configuration)")
|
||||
else()
|
||||
target_include_directories(${target} PRIVATE ${qskinny_AUTOGEN_DIR}/include)
|
||||
endif()
|
||||
|
||||
target_include_directories(${target}
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/src/common
|
||||
${CMAKE_SOURCE_DIR}/src/graphic)
|
||||
|
||||
target_compile_definitions(${target} PRIVATE QSK_STANDALONE)
|
||||
target_link_libraries(${target} PRIVATE Qt::Gui Qt::GuiPrivate)
|
||||
else()
|
||||
target_link_libraries(${target} PRIVATE qskinny)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${target} PRIVATE Qt::Svg)
|
||||
|
||||
set_target_properties(${target} PROPERTIES FOLDER tools)
|
||||
|
||||
install(TARGETS ${target})
|
|
@ -1,38 +0,0 @@
|
|||
TEMPLATE = app
|
||||
TARGET = svg2qvg
|
||||
|
||||
QT += svg
|
||||
|
||||
CONFIG += standalone
|
||||
CONFIG -= app_bundle
|
||||
CONFIG -= sanitize
|
||||
|
||||
DESTDIR = $${QSK_OUT_ROOT}/tools/bin
|
||||
|
||||
standalone {
|
||||
|
||||
# We only need a very small subset of QSkinny and by including the
|
||||
# necessary cpp files svg2qvg becomes independent from the library
|
||||
|
||||
QSK_DIRS = \
|
||||
$${QSK_ROOT}/src/common \
|
||||
$${QSK_ROOT}/src/graphic
|
||||
|
||||
INCLUDEPATH *= $${QSK_DIRS} $${QSK_OUT_ROOT}/src/$${MOC_DIR}
|
||||
DEPENDPATH += $${QSK_DIRS}
|
||||
|
||||
DEFINES += QSK_STANDALONE
|
||||
QSK_CONFIG -= QskDll
|
||||
|
||||
QT += gui-private
|
||||
}
|
||||
else {
|
||||
|
||||
CONFIG += qskinny
|
||||
}
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
||||
|
||||
target.path = $${QSK_INSTALL_BINS}
|
||||
INSTALLS = target
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue