Skip to content
This repository was archived by the owner on Sep 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .ci/clang-format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

find QDash -iname '*.h' -o -iname '*.cpp' | xargs clang-format -i -style=file:QDash/.clang-format
2 changes: 1 addition & 1 deletion .ci/linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ cd build

ninja -j${NPROC}

strip -s src/native/QDash
strip -s QDash/Native/QDash

if [ "$USE_CCACHE" = "true" ]; then
ccache -s
Expand Down
2 changes: 1 addition & 1 deletion .ci/linux/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fi
wget --retry-connrefused --tries=30 "$SHARUN" -O ./sharun-aio
chmod +x ./sharun-aio
xvfb-run -a ./sharun-aio l -p -v -e -s -k \
../$BUILDDIR/src/native/QDash \
../$BUILDDIR/QDash/Native/QDash \
$LIBDIR/libXss.so* \
$LIBDIR/libdecor-0.so* \
$LIBDIR/qt6/plugins/audio/* \
Expand Down
2 changes: 1 addition & 1 deletion .ci/macos/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ cmake .. -G Ninja \

ninja

ccache -s
ccache -s
6 changes: 3 additions & 3 deletions .ci/macos/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set -ex

cd build
rm -rf QDash.app
cp -r src/native/QDash.app .
cp -r QDash/Native/QDash.app .
chmod a+x QDash.app/Contents/MacOS/QDash
mkdir -p QDash.app/Contents/Resources
cp ../dist/QDash.icns QDash.app/Contents/Resources
Expand All @@ -12,12 +12,12 @@ unset DYLD_LIBRARY_PATH
unset DYLD_FRAMEWORK_PATH

macdeployqt QDash.app \
-qmldir=../src/qml \
-qmldir=../QDash \
-qmlimport=$QML_SOURCES_PATHS \
-verbose=2

macdeployqt QDash.app \
-qmldir=../src/qml \
-qmldir=../QDash \
-qmlimport=$QML_SOURCES_PATHS \
-verbose=2 \
-always-overwrite
Expand Down
2 changes: 1 addition & 1 deletion .ci/windows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $WINDEPLOYQT --release \
--no-system-dxc-compiler \
--no-system-d3d-compiler \
--dir pkg \
--qmldir ../src/qml \
--qmldir ../QDash \
--qmlimport $QML2_IMPORT_PATH \
QDash.exe

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ find_package(ntcore)

set(QT_QML_GENERATE_QMLLS_INI ON)

add_subdirectory(src)
add_subdirectory(QDash)
91 changes: 91 additions & 0 deletions QDash/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# SPDX-FileCopyrightText: 2016 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
# SPDX-License-Identifier: GPL-2.0-or-later

---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^\<[^Q][^/.>]*\>'
Priority: -2
- Regex: '^\<'
Priority: -1
- Regex: '^\"'
Priority: 0
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 150
PointerAlignment: Right
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Latest
TabWidth: 4
UseTab: Never
...
26 changes: 16 additions & 10 deletions src/qml/CMakeLists.txt → QDash/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
add_subdirectory(basewidget)
add_subdirectory(config)
add_subdirectory(constants)
add_subdirectory(dialogs)
add_subdirectory(fields)
add_subdirectory(items)
add_subdirectory(widgets)
add_subdirectory(main)
set(QRC_FILES
${CMAKE_CURRENT_SOURCE_DIR}/resources/fields.qrc
${CMAKE_CURRENT_SOURCE_DIR}/resources/accents.qrc
${CMAKE_CURRENT_SOURCE_DIR}/resources/icons.qrc
)

add_subdirectory(Config)
add_subdirectory(Constants)
add_subdirectory(Dialogs)
add_subdirectory(Fields)
add_subdirectory(Items)
add_subdirectory(Widgets)
add_subdirectory(Main)

set(BASE_PLUGINS
QDashQmlBaseWidget
QDashQmlConstants
QDashQmlConfig
QDashQmlDialogs
QDashQmlFields
QDashQmlItems
QDashQmlWidgets
QDashQmlMain
)

Expand All @@ -30,4 +33,7 @@ target_link_libraries(QDashQml

${QDASH_QT_LIBRARIES}
${QML_PLUGINS}
QDashQmlWidgets
)

add_subdirectory(Native)
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import QtQuick
import QtQuick.Controls.Material

import constants
import dialogs
import QDash.Constants
import QDash.Dialogs

AnimatedDialog {
required property Item content
Expand All @@ -14,20 +14,20 @@ AnimatedDialog {
window.height, Math.max(
implicitBackgroundHeight + topInset
+ bottomInset, contentHeight + topPadding + bottomPadding
+ (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) + 75 * Constants.scalar)
width: Math.min(window.width, 625 * Constants.scalar)
+ (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) + 75)
width: Math.min(window.width, 625)

standardButtons: Dialog.Ok | Dialog.Cancel

ScrollView {
clip: true

contentWidth: width - 5 * Constants.scalar - effectiveScrollBarWidth
contentWidth: width - 5 - effectiveScrollBarWidth

anchors {
fill: parent

topMargin: 5 * Constants.scalar
topMargin: 5

rightMargin: 5
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set(CMAKE_AUTOMOC ON)

qt_add_library(QDashQmlConfig STATIC)
qt6_add_qml_module(QDashQmlConfig
URI config
URI QDash.Config
VERSION 1.0
QML_FILES
BaseConfigDialog.qml
Expand Down
4 changes: 2 additions & 2 deletions src/qml/config/ColorField.qml → QDash/Config/ColorField.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import QtQuick.Layouts
import QtQuick.Shapes 2.15
import QtQuick.Dialogs

import constants
import QDash.Constants

RowLayout {
required property string label
Expand Down Expand Up @@ -42,7 +42,7 @@ RowLayout {
Button {
Layout.fillWidth: true
text: "Pick"
font.pixelSize: 18 * Constants.scalar
font.pixelSize: 18

onClicked: {
colorDialog.open()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import QtQuick 2.15
import QtQuick.Controls.Material 2.15
import QtQuick.Layouts 2.15

import constants
import QDash.Constants

CheckBox {
required property string label
Expand All @@ -14,10 +14,10 @@ CheckBox {
required property var bindTarget

id: textField
font.pixelSize: 18 * Constants.scalar
font.pixelSize: 18

indicator.implicitWidth: 28 * Constants.scalar
indicator.implicitHeight: 28 * Constants.scalar
indicator.implicitWidth: 28
indicator.implicitHeight: 28

function open() {
checked = bindTarget[bindedProperty]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import QtQuick.Controls.Material
import QtQuick.Layouts
import QtQuick.Shapes 2.15

import constants
import fields
import QDash.Constants
import QDash.Fields

BetterComboBox {
/** what property to bind to */
Expand All @@ -18,9 +18,9 @@ BetterComboBox {

id: combo
model: choices
font.pixelSize: 18 * Constants.scalar
font.pixelSize: 18

implicitHeight: 40 * Constants.scalar
implicitHeight: 40

function open() {
currentIndex = indexOfValue(bindTarget[bindedProperty])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import QtQuick 2.15
import QtQuick.Controls.Material 2.15
import QtQuick.Layouts 2.15

import constants
import fields
import QDash.Constants
import QDash.Fields

BetterDoubleSpinBox {
id: spin
Expand All @@ -16,9 +16,9 @@ BetterDoubleSpinBox {
from: -1E9
to: 1E9

height: 50 * Constants.scalar
height: 50

font.pixelSize: 18 * Constants.scalar
font.pixelSize: 18

function open() {
value = bindTarget[bindedProperty]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import QtQuick.Controls.Material
import QtQuick.Layouts
import QtQuick.Shapes 2.15

import constants
import fields
import QDash.Constants
import QDash.Fields

BetterComboBox {
/** what property to bind to */
Expand All @@ -18,9 +18,9 @@ BetterComboBox {

id: combo
model: choices
font.pixelSize: 18 * Constants.scalar
font.pixelSize: 18

implicitHeight: 40 * Constants.scalar
implicitHeight: 40

function open() {
currentIndex = bindTarget[bindedProperty]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import QtQuick 2.15
import QtQuick.Controls.Material 2.15
import QtQuick.Layouts 2.15

import constants
import fields
import QDash.Constants
import QDash.Fields

BetterSpinBox {
id: spin
Expand All @@ -15,7 +15,7 @@ BetterSpinBox {
/** the target to bind the property to */
required property var bindTarget

font.pixelSize: 18 * Constants.scalar
font.pixelSize: 18

from: 0
to: 1E9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import QtQuick 2.15
import QtQuick.Controls.Material 2.15
import QtQuick.Layouts 2.15

import constants
import fields
import QDash.Constants
import QDash.Fields

BetterTextField {
required property string label
Expand All @@ -15,7 +15,7 @@ BetterTextField {
required property var bindTarget

id: textField
font.pixelSize: 18 * Constants.scalar
font.pixelSize: 18

function open() {
text = bindTarget[bindedProperty]
Expand Down
Loading
Loading