Skip to content

Commit 34a69a9

Browse files
committed
Merge branch 'quarterstar-dev-svg' into dev/svg
2 parents c35b283 + 0017d55 commit 34a69a9

File tree

211 files changed

+4191
-4128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+4191
-4128
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
# Unix-style newlines with a newline ending every file
4+
[*]
5+
end_of_line = lf
6+
insert_final_newline = true
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
10+
[*.nix]
11+
indent_style = space
12+
indent_size = 2
13+
14+
[*.cpp,*.hpp,*.h]
15+
indent_style = space
16+
indent_size = 4

CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set(CMAKE_AUTOUIC ON)
77
set(CMAKE_AUTOMOC ON)
88
set(CMAKE_AUTORCC ON)
99

10-
set(CMAKE_CXX_STANDARD 17)
10+
set(CMAKE_CXX_STANDARD 23)
1111
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1212

1313

@@ -27,7 +27,7 @@ set(SRC_DIR ${CMAKE_SOURCE_DIR}/src)
2727
# Use globbing to recursively collect all source, header, and resource files from src/.
2828
file(GLOB_RECURSE SRC_FILES
2929
"${SRC_DIR}/*.cpp"
30-
"${SRC_DIR}/*.h"
30+
"${SRC_DIR}/*.hpp"
3131
"${SRC_DIR}/*.qrc"
3232
"${SRC_DIR}/*.qss"
3333
)
@@ -39,6 +39,9 @@ qt_add_executable(${PROJECT_NAME}
3939
MANUAL_FINALIZATION
4040
${PROJECT_SOURCES}
4141
)
42+
43+
add_subdirectory(deps)
44+
4245
qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
4346

4447
target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::OpenGLWidgets)
@@ -66,5 +69,8 @@ install(TARGETS ${PROJECT_NAME}
6669
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
6770
)
6871

69-
70-
qt_finalize_executable(${PROJECT_NAME})
72+
if (UNIX AND NOT APPLE)
73+
install(PROGRAMS deploy/linux/io.github.prayag2.Drawy.desktop.in DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/applications RENAME io.github.prayag2.Drawy.desktop)
74+
install(FILES assets/logo.svg DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor/scalable/apps RENAME io.github.prayag2.Drawy.svg)
75+
install(FILES deploy/linux/io.github.prayag2.Drawy.metainfo.xml.in DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/metainfo/ RENAME io.github.prayag2.Drawy.metainfo.xml)
76+
endif()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[Desktop Entry]
2+
Type=Application
3+
Name=Drawy
4+
Comment=Your handy, infinite, brainstorming tool
5+
Exec=drawy
6+
Icon=io.github.prayag2.Drawy
7+
Categories=Graphics
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version='1.0' encoding='utf-8'?>
2+
<component type="desktop-application">
3+
<id>io.github.prayag2.Drawy</id>
4+
<name>Drawy</name>
5+
<summary>Your handy, infinite, brainstorming tool</summary>
6+
<developer id="com.github.prayag2">
7+
<name>Prayag Jain</name>
8+
</developer>
9+
<metadata_license>CC-BY-4.0</metadata_license>
10+
<project_license>GPL-3.0-or-later</project_license>
11+
<description>
12+
<p>Drawy is a work-in-progress infinite whiteboard tool, which aims to be a native desktop alternative to the amazing web-based Excalidraw.</p>
13+
</description>
14+
<url type="homepage">https://github.com/Prayag2/drawy</url>
15+
<url type="bugtracker">https://github.com/Prayag2/drawy/issues</url>
16+
<url type="faq">https://github.com/Prayag2/drawy/discussions</url>
17+
<url type="help">https://github.com/Prayag2/drawy/discussions</url>
18+
<url type="vcs-browser">https://github.com/Prayag2/drawy</url>
19+
<url type="contribute">https://github.com/Prayag2/drawy</url>
20+
<categories>
21+
<category>Qt</category>
22+
<category>Graphics</category>
23+
</categories>
24+
<recommends>
25+
<control>pointing</control>
26+
</recommends>
27+
<content_rating type="oars-1.1"/>
28+
<launchable type="desktop-id">io.github.prayag2.Drawy.desktop</launchable>
29+
<branding>
30+
<color type="primary" scheme_preference="light">#27a9ff</color>
31+
<color type="primary" scheme_preference="dark">#002d6c</color>
32+
</branding>
33+
</component>

deps/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
include(FetchContent)
2+
3+
FetchContent_Declare(
4+
kanzi
5+
URL https://github.com/flanglet/kanzi-cpp/archive/refs/tags/2.4.0.zip
6+
URL_MD5 ec451cdab40362e9e4af8e5ca780a07d
7+
)
8+
9+
add_subdirectory(kanzi)
10+
11+
# find_package(tinyxml2 REQUIRED)
12+
# target_link_libraries(${PROJECT_NAME} PRIVATE tinyxml2::tinyxml2)

deps/kanzi/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
message(STATUS "Fetching kanzi...")
2+
3+
FetchContent_GetProperties(kanzi)
4+
FetchContent_MakeAvailable(kanzi)
5+
6+
message(STATUS "kanzi_SOURCE_DIR=${kanzi_SOURCE_DIR}")
7+
8+
add_subdirectory(${kanzi_SOURCE_DIR}/src ${kanzi_BINARY_DIR})
9+
10+
target_link_libraries(drawy PRIVATE libkanzi)
11+
target_include_directories(drawy PRIVATE ${kanzi_SOURCE_DIR}/src)

flake.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,13 @@
5757
src = ./.;
5858
hooks = {
5959
nixfmt-rfc-style.enable = true;
60-
mirrors-clang-format = {
61-
entry = "${pkgs.clang-tools}/bin/clang-format";
60+
clang-format = {
6261
enable = true;
62+
package = pkgs.clang-tools;
63+
types_or = pkgs.lib.mkForce [
64+
"c"
65+
"c++"
66+
];
6367
};
6468
};
6569
};

src/canvas/canvas.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
/*
2-
* Drawy - A simple brainstorming tool with an infinite canvas
3-
* Copyright (C) 2025 - Prayag Jain <[email protected]>
4-
*
5-
* This program is free software: you can redistribute it and/or modify
6-
* it under the terms of the GNU General Public License as published by
7-
* the Free Software Foundation, either version 3 of the License, or
8-
* (at your option) any later version.
9-
*
10-
* This program is distributed in the hope that it will be useful,
11-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU General Public License for more details.
14-
*
15-
* You should have received a copy of the GNU General Public License
16-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17-
*/
18-
19-
#include "canvas.h"
2+
* Drawy - A simple brainstorming tool with an infinite canvas
3+
* Copyright (C) 2025 - Prayag Jain <[email protected]>
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
#include "canvas.hpp"
2020

2121
#include <QBuffer>
2222
#include <QResizeEvent>
Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
/*
2-
* Drawy - A simple brainstorming tool with an infinite canvas
3-
* Copyright (C) 2025 - Prayag Jain <[email protected]>
4-
*
5-
* This program is free software: you can redistribute it and/or modify
6-
* it under the terms of the GNU General Public License as published by
7-
* the Free Software Foundation, either version 3 of the License, or
8-
* (at your option) any later version.
9-
*
10-
* This program is distributed in the hope that it will be useful,
11-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
* GNU General Public License for more details.
14-
*
15-
* You should have received a copy of the GNU General Public License
16-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17-
*/
2+
* Drawy - A simple brainstorming tool with an infinite canvas
3+
* Copyright (C) 2025 - Prayag Jain <[email protected]>
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
1818

19-
#ifndef CANVAS_H
20-
#define CANVAS_H
19+
#pragma once
2120

2221
#include <QPainter>
2322
#include <QWidget>
@@ -88,5 +87,3 @@ public slots:
8887
static void setImageData(QPixmap *const img, const QByteArray &arr);
8988
void resize();
9089
};
91-
92-
#endif // CANVAS_H

src/command/command.h

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)