├── .clang-format ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .gitmodules ├── .idea ├── .gitignore ├── CodeKeeper.iml ├── caches │ └── deviceStreaming.xml ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── misc.xml ├── modules.xml └── vcs.xml ├── .vscode ├── c_cpp_properties.json ├── launch.json ├── settings.json └── tasks.json ├── CONTRIBUTING.md ├── CodeKeeper ├── LICENSE.md ├── README.md ├── SECURITY.md ├── build.sh ├── clang_format.sh ├── doc ├── Installation.md ├── Screenshots.md ├── Shortcuts.md └── Tweaks.md ├── imgs ├── 1.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png ├── 8.png ├── custom_theme.png ├── dark.png ├── default_theme.png ├── display-arrow-down.png ├── header.png ├── light.png ├── logo.png ├── mac-command.png ├── markdown.png └── toncoin.png ├── rm_cache.sh └── src ├── CodeKeeper ├── .gitignore ├── .qmake.stash ├── CodeKeeper ├── CodeKeeper.pro ├── CodeKeeper_ru_RU.ts ├── accountFunc │ └── functional.cpp ├── accountwindow.cpp ├── accountwindow.h ├── commandPalette.cpp ├── commandPalette.h ├── custom │ ├── ColorValueDisplay │ │ └── ColorValueDisplay.h │ ├── circleChart │ │ └── CircleChart.h │ ├── circleProgressbar │ │ └── ProgressCircle.h │ └── clickableLabel │ │ └── clickableLabel.h ├── custom_stylesheet.qss ├── custom_stylesheet_solarized.qss ├── gitFunc │ ├── cloneRepo.cpp │ ├── getUpdates.cpp │ └── pushUpdates.cpp ├── keeperFunc │ ├── addConnects.cpp │ ├── commandsFunc.cpp │ ├── createMenu.cpp │ ├── functional.cpp │ ├── getProjectInfo.cpp │ ├── notesFunc.cpp │ ├── projectsFunc.cpp │ └── tasksFunc.cpp ├── mac_dark_stylesheet.qss ├── main.cpp ├── mainwindow.cpp ├── mainwindow.h ├── settingsFunc │ ├── GitHubReleaseDownloader.h │ └── functional.cpp ├── settingswindow.cpp ├── settingswindow.h ├── sql_db │ ├── projectsDB.cpp │ └── tasksDB.cpp ├── stylesheet.qss ├── syncFunc │ └── functional.cpp ├── syncwindow.cpp ├── syncwindow.h └── uhxEvg.json └── resources ├── .comments └── markdown.png.xml ├── CodeKeeper_ru_RU.ts ├── CustomFont.ttf ├── CustomFont_2.ttf ├── CustomFont_3.ttf ├── about.png ├── auto_sync_off.png ├── auto_sync_on.png ├── bold.png ├── check-mark.png ├── checkbox.png ├── connected.png ├── copy.png ├── delete.png ├── disconnected.png ├── document.png ├── down-arrow.png ├── download.png ├── edit.png ├── expand.png ├── export.png ├── folder-open.png ├── folder.png ├── german.png ├── git.png ├── green.png ├── greenHovered.png ├── greenInHovered.png ├── greenInPressed.png ├── greenPressed.png ├── h1.png ├── h2.png ├── h3.png ├── home_dir.png ├── icon.png ├── italic.png ├── japan.png ├── license.txt ├── lightning.png ├── link.png ├── list.png ├── logo.png ├── main.png ├── markdown.png ├── new.png ├── new_folder.png ├── note.png ├── numList.png ├── open.png ├── palette.png ├── paste.png ├── project.png ├── quit.png ├── quote.png ├── read.png ├── red.png ├── redHovered.png ├── redPressed.png ├── refresh.png ├── rename.png ├── resize.png ├── resources.qrc ├── retry.png ├── russian.png ├── save.png ├── search.png ├── settings.png ├── sorting.png ├── spanish.png ├── storage.png ├── strikethrough.png ├── sync.png ├── table.png ├── task.png ├── tea.svg ├── trash.png ├── unfocusedButton.png ├── up-arrow.png ├── usa.png ├── user.png ├── view.png ├── yellow.png ├── yellowHovered.png └── yellowPressed.png /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | # BasedOnStyle: Microsoft 4 | AccessModifierOffset: -2 5 | AlignAfterOpenBracket: Align 6 | AlignArrayOfStructures: None 7 | AlignConsecutiveAssignments: 8 | Enabled: false 9 | AcrossEmptyLines: false 10 | AcrossComments: false 11 | AlignCompound: false 12 | AlignFunctionPointers: false 13 | PadOperators: true 14 | AlignConsecutiveBitFields: 15 | Enabled: false 16 | AcrossEmptyLines: false 17 | AcrossComments: false 18 | AlignCompound: false 19 | AlignFunctionPointers: false 20 | PadOperators: false 21 | AlignConsecutiveDeclarations: 22 | Enabled: false 23 | AcrossEmptyLines: false 24 | AcrossComments: false 25 | AlignCompound: false 26 | AlignFunctionPointers: false 27 | PadOperators: false 28 | AlignConsecutiveMacros: 29 | Enabled: false 30 | AcrossEmptyLines: false 31 | AcrossComments: false 32 | AlignCompound: false 33 | AlignFunctionPointers: false 34 | PadOperators: false 35 | AlignConsecutiveShortCaseStatements: 36 | Enabled: false 37 | AcrossEmptyLines: false 38 | AcrossComments: false 39 | AlignCaseColons: false 40 | AlignEscapedNewlines: Right 41 | AlignOperands: Align 42 | AlignTrailingComments: 43 | Kind: Always 44 | OverEmptyLines: 0 45 | AllowAllArgumentsOnNextLine: true 46 | AllowAllParametersOfDeclarationOnNextLine: true 47 | AllowBreakBeforeNoexceptSpecifier: Never 48 | AllowShortBlocksOnASingleLine: Never 49 | AllowShortCaseLabelsOnASingleLine: false 50 | AllowShortCompoundRequirementOnASingleLine: true 51 | AllowShortEnumsOnASingleLine: false 52 | AllowShortFunctionsOnASingleLine: None 53 | AllowShortIfStatementsOnASingleLine: Never 54 | AllowShortLambdasOnASingleLine: All 55 | AllowShortLoopsOnASingleLine: false 56 | AlwaysBreakAfterDefinitionReturnType: None 57 | AlwaysBreakAfterReturnType: None 58 | AlwaysBreakBeforeMultilineStrings: false 59 | AlwaysBreakTemplateDeclarations: MultiLine 60 | AttributeMacros: 61 | - __capability 62 | BinPackArguments: true 63 | BinPackParameters: true 64 | BitFieldColonSpacing: Both 65 | BraceWrapping: 66 | AfterCaseLabel: false 67 | AfterClass: true 68 | AfterControlStatement: Always 69 | AfterEnum: true 70 | AfterExternBlock: true 71 | AfterFunction: true 72 | AfterNamespace: true 73 | AfterObjCDeclaration: true 74 | AfterStruct: true 75 | AfterUnion: false 76 | BeforeCatch: true 77 | BeforeElse: true 78 | BeforeLambdaBody: false 79 | BeforeWhile: false 80 | IndentBraces: false 81 | SplitEmptyFunction: true 82 | SplitEmptyRecord: true 83 | SplitEmptyNamespace: true 84 | BreakAdjacentStringLiterals: true 85 | BreakAfterAttributes: Leave 86 | BreakAfterJavaFieldAnnotations: false 87 | BreakArrays: true 88 | BreakBeforeBinaryOperators: None 89 | BreakBeforeConceptDeclarations: Always 90 | BreakBeforeBraces: Custom 91 | BreakBeforeInlineASMColon: OnlyMultiline 92 | BreakBeforeTernaryOperators: true 93 | BreakConstructorInitializers: BeforeColon 94 | BreakInheritanceList: BeforeColon 95 | BreakStringLiterals: true 96 | ColumnLimit: 120 97 | CommentPragmas: '^ IWYU pragma:' 98 | CompactNamespaces: false 99 | ConstructorInitializerIndentWidth: 4 100 | ContinuationIndentWidth: 4 101 | Cpp11BracedListStyle: true 102 | DerivePointerAlignment: false 103 | DisableFormat: false 104 | EmptyLineAfterAccessModifier: Never 105 | EmptyLineBeforeAccessModifier: LogicalBlock 106 | ExperimentalAutoDetectBinPacking: false 107 | FixNamespaceComments: true 108 | ForEachMacros: 109 | - foreach 110 | - Q_FOREACH 111 | - BOOST_FOREACH 112 | IfMacros: 113 | - KJ_IF_MAYBE 114 | IncludeBlocks: Preserve 115 | IncludeCategories: 116 | - Regex: '^"(llvm|llvm-c|clang|clang-c)/' 117 | Priority: 2 118 | SortPriority: 0 119 | CaseSensitive: false 120 | - Regex: '^(<|"(gtest|gmock|isl|json)/)' 121 | Priority: 3 122 | SortPriority: 0 123 | CaseSensitive: false 124 | - Regex: '.*' 125 | Priority: 1 126 | SortPriority: 0 127 | CaseSensitive: false 128 | IncludeIsMainRegex: '(Test)?$' 129 | IncludeIsMainSourceRegex: '' 130 | IndentAccessModifiers: false 131 | IndentCaseBlocks: false 132 | IndentCaseLabels: false 133 | IndentExternBlock: AfterExternBlock 134 | IndentGotoLabels: true 135 | IndentPPDirectives: None 136 | IndentRequiresClause: true 137 | IndentWidth: 4 138 | IndentWrappedFunctionNames: false 139 | InsertBraces: false 140 | InsertNewlineAtEOF: false 141 | InsertTrailingCommas: None 142 | IntegerLiteralSeparator: 143 | Binary: 0 144 | BinaryMinDigits: 0 145 | Decimal: 0 146 | DecimalMinDigits: 0 147 | Hex: 0 148 | HexMinDigits: 0 149 | JavaScriptQuotes: Leave 150 | JavaScriptWrapImports: true 151 | KeepEmptyLinesAtTheStartOfBlocks: true 152 | KeepEmptyLinesAtEOF: false 153 | LambdaBodyIndentation: Signature 154 | LineEnding: DeriveLF 155 | MacroBlockBegin: '' 156 | MacroBlockEnd: '' 157 | MaxEmptyLinesToKeep: 1 158 | NamespaceIndentation: None 159 | ObjCBinPackProtocolList: Auto 160 | ObjCBlockIndentWidth: 2 161 | ObjCBreakBeforeNestedBlockParam: true 162 | ObjCSpaceAfterProperty: false 163 | ObjCSpaceBeforeProtocolList: true 164 | PackConstructorInitializers: BinPack 165 | PenaltyBreakAssignment: 2 166 | PenaltyBreakBeforeFirstCallParameter: 19 167 | PenaltyBreakComment: 300 168 | PenaltyBreakFirstLessLess: 120 169 | PenaltyBreakOpenParenthesis: 0 170 | PenaltyBreakScopeResolution: 500 171 | PenaltyBreakString: 1000 172 | PenaltyBreakTemplateDeclaration: 10 173 | PenaltyExcessCharacter: 1000000 174 | PenaltyIndentedWhitespace: 0 175 | PenaltyReturnTypeOnItsOwnLine: 1000 176 | PointerAlignment: Right 177 | PPIndentWidth: -1 178 | QualifierAlignment: Leave 179 | ReferenceAlignment: Pointer 180 | ReflowComments: true 181 | RemoveBracesLLVM: false 182 | RemoveParentheses: Leave 183 | RemoveSemicolon: false 184 | RequiresClausePosition: OwnLine 185 | RequiresExpressionIndentation: OuterScope 186 | SeparateDefinitionBlocks: Leave 187 | ShortNamespaceLines: 1 188 | SkipMacroDefinitionBody: false 189 | SortIncludes: CaseSensitive 190 | SortJavaStaticImport: Before 191 | SortUsingDeclarations: LexicographicNumeric 192 | SpaceAfterCStyleCast: false 193 | SpaceAfterLogicalNot: false 194 | SpaceAfterTemplateKeyword: true 195 | SpaceAroundPointerQualifiers: Default 196 | SpaceBeforeAssignmentOperators: true 197 | SpaceBeforeCaseColon: false 198 | SpaceBeforeCpp11BracedList: false 199 | SpaceBeforeCtorInitializerColon: true 200 | SpaceBeforeInheritanceColon: true 201 | SpaceBeforeJsonColon: false 202 | SpaceBeforeParens: ControlStatements 203 | SpaceBeforeParensOptions: 204 | AfterControlStatements: true 205 | AfterForeachMacros: true 206 | AfterFunctionDefinitionName: false 207 | AfterFunctionDeclarationName: false 208 | AfterIfMacros: true 209 | AfterOverloadedOperator: false 210 | AfterPlacementOperator: true 211 | AfterRequiresInClause: false 212 | AfterRequiresInExpression: false 213 | BeforeNonEmptyParentheses: false 214 | SpaceBeforeRangeBasedForLoopColon: true 215 | SpaceBeforeSquareBrackets: false 216 | SpaceInEmptyBlock: false 217 | SpacesBeforeTrailingComments: 1 218 | SpacesInAngles: Never 219 | SpacesInContainerLiterals: true 220 | SpacesInLineCommentPrefix: 221 | Minimum: 1 222 | Maximum: -1 223 | SpacesInParens: Never 224 | SpacesInParensOptions: 225 | InCStyleCasts: false 226 | InConditionalStatements: false 227 | InEmptyParentheses: false 228 | Other: false 229 | SpacesInSquareBrackets: false 230 | Standard: Latest 231 | StatementAttributeLikeMacros: 232 | - Q_EMIT 233 | StatementMacros: 234 | - Q_UNUSED 235 | - QT_REQUIRE_VERSION 236 | TabWidth: 4 237 | UseTab: Never 238 | VerilogBreakBetweenInstancePorts: true 239 | WhitespaceSensitiveMacros: 240 | - BOOST_PP_STRINGIZE 241 | - CF_SWIFT_NAME 242 | - NS_SWIFT_NAME 243 | - PP_STRINGIZE 244 | - STRINGIZE 245 | ... 246 | 247 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | src/CodeKeeper/CodeKeeper 3 | src/CodeKeeper/data.db 4 | src/CodeKeeper/data.db 5 | *.db 6 | src/CodeKeeper/moc_predefs.h 7 | src/CodeKeeper/qmake_qmake_immediate.qrc 8 | *.db 9 | mykey.asc 10 | src/CodeKeeper/CodeKeeper.asc 11 | src/CodeKeeper/build/ 12 | /src/CodeKeeper/CMakeFiles 13 | /src/CodeKeeper/CodeKeeper_autogen 14 | /build 15 | /.cache 16 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "src/CodeKeeper/3rdParty/qmarkdowntextedit"] 2 | path = src/CodeKeeper/3rdParty/qmarkdowntextedit 3 | url = https://github.com/pbek/qmarkdowntextedit 4 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /.idea/CodeKeeper.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 119 | 120 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "linux-gcc-x64", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "compilerPath": "/usr/bin/gcc", 9 | "cStandard": "${default}", 10 | "cppStandard": "${default}", 11 | "intelliSenseMode": "linux-gcc-x64", 12 | "compilerArgs": [ 13 | "" 14 | ] 15 | } 16 | ], 17 | "version": 4 18 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "C/C++ Runner: Debug Session", 6 | "type": "cppdbg", 7 | "request": "launch", 8 | "args": [], 9 | "stopAtEntry": false, 10 | "externalConsole": false, 11 | "cwd": "/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper", 12 | "program": "/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/build/Debug/outDebug", 13 | "MIMode": "gdb", 14 | "miDebuggerPath": "gdb", 15 | "setupCommands": [ 16 | { 17 | "description": "Enable pretty-printing for gdb", 18 | "text": "-enable-pretty-printing", 19 | "ignoreFailures": true 20 | } 21 | ], 22 | "visualizerFile": "/home/nighty/.config/Code/User/workspaceStorage/3092fd482ba6162c53717f261664f911/tonka3000.qtvsctools/qt.natvis.xml" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "C_Cpp_Runner.cCompilerPath": "gcc", 3 | "C_Cpp_Runner.cppCompilerPath": "g++", 4 | "C_Cpp_Runner.debuggerPath": "gdb", 5 | "C_Cpp_Runner.cStandard": "", 6 | "C_Cpp_Runner.cppStandard": "", 7 | "C_Cpp_Runner.msvcBatchPath": "", 8 | "C_Cpp_Runner.useMsvc": false, 9 | "C_Cpp_Runner.warnings": [ 10 | "-Wall", 11 | "-Wextra", 12 | "-Wpedantic", 13 | "-Wshadow", 14 | "-Wformat=2", 15 | "-Wcast-align", 16 | "-Wconversion", 17 | "-Wsign-conversion", 18 | "-Wnull-dereference" 19 | ], 20 | "C_Cpp_Runner.msvcWarnings": [ 21 | "/W4", 22 | "/permissive-", 23 | "/w14242", 24 | "/w14287", 25 | "/w14296", 26 | "/w14311", 27 | "/w14826", 28 | "/w44062", 29 | "/w44242", 30 | "/w14905", 31 | "/w14906", 32 | "/w14263", 33 | "/w44265", 34 | "/w14928" 35 | ], 36 | "C_Cpp_Runner.enableWarnings": true, 37 | "C_Cpp_Runner.warningsAsError": false, 38 | "C_Cpp_Runner.compilerArgs": [], 39 | "C_Cpp_Runner.linkerArgs": [], 40 | "C_Cpp_Runner.includePaths": [], 41 | "C_Cpp_Runner.includeSearch": [ 42 | "*", 43 | "**/*" 44 | ], 45 | "C_Cpp_Runner.excludeSearch": [ 46 | "**/build", 47 | "**/build/**", 48 | "**/.*", 49 | "**/.*/**", 50 | "**/.vscode", 51 | "**/.vscode/**" 52 | ], 53 | "C_Cpp_Runner.useAddressSanitizer": false, 54 | "C_Cpp_Runner.useUndefinedSanitizer": false, 55 | "C_Cpp_Runner.useLeakSanitizer": false, 56 | "C_Cpp_Runner.showCompilationTime": false, 57 | "C_Cpp_Runner.useLinkTimeOptimization": false, 58 | "C_Cpp_Runner.msvcSecureNoWarnings": false, 59 | "files.associations": { 60 | "chrono": "cpp", 61 | "optional": "cpp", 62 | "format": "cpp", 63 | "system_error": "cpp", 64 | "__node_handle": "cpp", 65 | "*.tcc": "cpp", 66 | "affinity": "cpp", 67 | "forward_list": "cpp", 68 | "list": "cpp", 69 | "__hash_table": "cpp", 70 | "__tree": "cpp", 71 | "array": "cpp", 72 | "span": "cpp", 73 | "string": "cpp", 74 | "string_view": "cpp", 75 | "vector": "cpp", 76 | "*.inc": "cpp", 77 | "valuemap": "cpp", 78 | "valueobject": "cpp", 79 | "boundingbox": "cpp", 80 | "boundingsphere": "cpp", 81 | "__bit_reference": "cpp", 82 | "bitset": "cpp", 83 | "deque": "cpp", 84 | "__memory": "cpp", 85 | "limits": "cpp", 86 | "ratio": "cpp", 87 | "tuple": "cpp", 88 | "memory": "cpp", 89 | "future": "cpp", 90 | "istream": "cpp", 91 | "functional": "cpp", 92 | "utility": "cpp", 93 | "variant": "cpp", 94 | "fstream": "cpp", 95 | "algorithm": "cpp", 96 | "hash_map": "cpp", 97 | "hash_set": "cpp", 98 | "cmath": "cpp", 99 | "any": "cpp", 100 | "atomic": "cpp", 101 | "bit": "cpp", 102 | "cctype": "cpp", 103 | "charconv": "cpp", 104 | "cinttypes": "cpp", 105 | "clocale": "cpp", 106 | "codecvt": "cpp", 107 | "compare": "cpp", 108 | "concepts": "cpp", 109 | "condition_variable": "cpp", 110 | "cstdarg": "cpp", 111 | "cstddef": "cpp", 112 | "cstdint": "cpp", 113 | "cstdio": "cpp", 114 | "cstdlib": "cpp", 115 | "cstring": "cpp", 116 | "ctime": "cpp", 117 | "cwchar": "cpp", 118 | "cwctype": "cpp", 119 | "map": "cpp", 120 | "set": "cpp", 121 | "unordered_map": "cpp", 122 | "unordered_set": "cpp", 123 | "exception": "cpp", 124 | "iterator": "cpp", 125 | "memory_resource": "cpp", 126 | "numeric": "cpp", 127 | "random": "cpp", 128 | "source_location": "cpp", 129 | "type_traits": "cpp", 130 | "initializer_list": "cpp", 131 | "iomanip": "cpp", 132 | "iosfwd": "cpp", 133 | "iostream": "cpp", 134 | "mutex": "cpp", 135 | "new": "cpp", 136 | "numbers": "cpp", 137 | "ostream": "cpp", 138 | "semaphore": "cpp", 139 | "shared_mutex": "cpp", 140 | "sstream": "cpp", 141 | "stdexcept": "cpp", 142 | "stdfloat": "cpp", 143 | "stop_token": "cpp", 144 | "streambuf": "cpp", 145 | "text_encoding": "cpp", 146 | "thread": "cpp", 147 | "cfenv": "cpp", 148 | "typeindex": "cpp", 149 | "typeinfo": "cpp", 150 | "valarray": "cpp", 151 | "locale": "cpp", 152 | "ios": "cpp", 153 | "regex": "cpp", 154 | "__locale": "cpp", 155 | "ranges": "cpp", 156 | "stacktrace": "cpp" 157 | }, 158 | "cmake.sourceDirectory": "/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper" 159 | } 160 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "tasks": [ 3 | { 4 | "type": "cppbuild", 5 | "label": "C/C++: g++ build active file", 6 | "command": "/usr/bin/g++", 7 | "args": [ 8 | "-fdiagnostics-color=always", 9 | "-g", 10 | "${file}", 11 | "-o", 12 | "${fileDirname}/${fileBasenameNoExtension}" 13 | ], 14 | "options": { 15 | "cwd": "${fileDirname}" 16 | }, 17 | "problemMatcher": [ 18 | "$gcc" 19 | ], 20 | "group": { 21 | "kind": "build", 22 | "isDefault": true 23 | }, 24 | "detail": "Task generated by Debugger." 25 | } 26 | ], 27 | "version": "2.0.0" 28 | } -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | night3098games@gmail.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | -------------------------------------------------------------------------------- /CodeKeeper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/CodeKeeper -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | # **`☘️ CodeKeeper`** 4 | ### *Projects manager for developers* 5 | ![](imgs/1.png) 6 | 7 |
8 | 9 |
**License**

10 |
**Shortcuts**

11 |
**Installation**

12 |
**Tweaks**

13 |
**Screenshots**

14 | 15 |
16 | 17 | --- 18 | 19 |
20 | 21 | ![](https://img.shields.io/github/forks/Nighty3098/CodeKeeper?style=for-the-badge&color=9dc3ea&logoColor=D9E0EE&labelColor=1c1c29) 22 | ![](https://img.shields.io/github/downloads/Nighty3098/CodeKeeper/total?style=for-the-badge&color=e0ea9d&logoColor=D9E0EE&labelColor=171b22) 23 | ![](https://img.shields.io/github/stars/Nighty3098/CodeKeeper?style=for-the-badge&color=eed49f&logoColor=D9E0EE&labelColor=1c1c29) 24 |

25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 | 33 | --- 34 | 35 | ***🛠️ If you have found bugs in our product or have suggestions, please write about them:*** 36 | 37 | [![Discord](https://img.shields.io/discord/1238858182403559505.svg?label=Discord&logo=Discord&style=for-the-badge&color=f5a7a0&logoColor=FFFFFF&labelColor=1c1c29)](https://discord.gg/6xEc5WFK) 38 |

39 | 40 | 41 | 42 |

43 | 44 | --- 45 | 46 | ### **`💵 Support me`** 47 | 48 |
49 | 50 | ***`UQCF-sPDO0QqkNtvy5CKSvYWEsZS6l7vzaytV36oYM0SNhKt`*** 51 | 52 |
53 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | # Security Policy 4 | 5 | > [!WARNING] 6 | > Supported Versions 7 | > Only Latest Version is Supported 8 | 9 |


10 | 11 |
12 | 13 | ### Contacts: 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Define color codes for better readability 4 | GREEN="\e[1;32m" 5 | YELLOW="\e[1;33m" 6 | RED="\e[1;31m" 7 | RESET="\e[0m" 8 | 9 | #bash clang_format.sh 10 | 11 | # Change to the CodeKeeper source directory 12 | echo -e "${GREEN}Navigating to the CodeKeeper source directory...${RESET}" 13 | cd src/CodeKeeper/ || { echo -e "${RED}Error: Failed to change directory to src/CodeKeeper.${RESET}"; exit 1; } 14 | 15 | # Run qmake and check for success 16 | echo -e "${GREEN}Running qmake...${RESET}" 17 | qmake6 CodeKeeper.pro 18 | if [ $? -ne 0 ]; then 19 | echo -e "${RED}Error: qmake6 command failed. Please check the .pro file and dependencies.${RESET}" 20 | exit 1; 21 | fi 22 | 23 | # Start the compilation process 24 | echo -e "${GREEN}Starting compilation...${RESET}" 25 | make 26 | if [ $? -ne 0 ]; then 27 | echo -e "${RED}Error: make command failed. Compilation was not successful.${RESET}" 28 | exit 1; 29 | fi 30 | 31 | # Notify user upon successful build 32 | echo -e "${GREEN}Compilation successful, sending notification...${RESET}" 33 | notify-send "CodeKeeper" "Build complete!" 34 | echo -e "${GREEN}Compilation complete.${RESET}" 35 | 36 | echo -e "${GREEN}Copying bin file to main directory...${RESET}" 37 | chmod +x CodeKeeper 38 | cp CodeKeeper ../../ || { echo -e "${RED}Error: Failed to copy bin file to the root directory.${RESET}"; exit 1; } 39 | 40 | # Return to the root directory 41 | echo -e "${GREEN}Navigating back to the root directory...${RESET}" 42 | cd ../.. || { echo -e "${RED}Error: Failed to return to the root directory.${RESET}"; exit 1; } 43 | 44 | echo -e "${GREEN}" 45 | echo -e " ▄████▄ ▒█████ ▓█████▄ ▓█████ ██ ▄█▀▓█████ ▓█████ ██▓███ ▓█████ ██▀███" 46 | echo -e "▒██▀ ▀█ ▒██▒ ██▒▒██▀ ██▌▓█ ▀ ██▄█▒ ▓█ ▀ ▓█ ▀ ▓██░ ██▒▓█ ▀ ▓██ ▒ ██▒" 47 | echo -e "▒▓█ ▄ ▒██░ ██▒░██ █▌▒███ ▓███▄░ ▒███ ▒███ ▓██░ ██▓▒▒███ ▓██ ░▄█ ▒" 48 | echo -e "▒▓▓▄ ▄██▒▒██ ██░░▓█▄ ▌▒▓█ ▄ ▓██ █▄ ▒▓█ ▄ ▒▓█ ▄ ▒██▄█▓▒ ▒▒▓█ ▄ ▒██▀▀█▄" 49 | echo -e "▒ ▓███▀ ░░ ████▓▒░░▒████▓ ░▒████▒▒██▒ █▄░▒████▒░▒████▒▒██▒ ░ ░░▒████▒░██▓ ▒██▒" 50 | echo -e "░ ░▒ ▒ ░░ ▒░▒░▒░ ▒▒▓ ▒ ░░ ▒░ ░▒ ▒▒ ▓▒░░ ▒░ ░░░ ▒░ ░▒▓▒░ ░ ░░░ ▒░ ░░ ▒▓ ░▒▓░" 51 | echo -e " ░ ▒ ░ ▒ ▒░ ░ ▒ ▒ ░ ░ ░░ ░▒ ▒░ ░ ░ ░ ░ ░ ░░▒ ░ ░ ░ ░ ░▒ ░ ▒░" 52 | echo -e "░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░░ ░ ░ ░ ░░ ░ ░░ ░" 53 | echo -e "░ ░ ░ ░ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ░" 54 | echo -e "░ ░${RESET}" 55 | 56 | echo -e "" 57 | echo -e "${YELLOW}" 58 | echo -e " CodeKeeper" 59 | echo -e " Created by Nighty3098" 60 | echo -e " Copyright 2024" 61 | 62 | 63 | -------------------------------------------------------------------------------- /clang_format.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | GREEN="\e[1;32m" 4 | YELLOW="\e[1;33m" 5 | RED="\e[1;31m" 6 | RESET="\e[0m" 7 | 8 | find . -type f -name "*.cpp" | while read -r file; do 9 | if clang-format -i "$file"; then 10 | printf "${GREEN}Formatted: %s${RESET}\n" "$file" 11 | else 12 | printf "${RED}Failed to format: %s${RESET}\n" "$file" 13 | exit 1 14 | fi 15 | done 16 | -------------------------------------------------------------------------------- /doc/Installation.md: -------------------------------------------------------------------------------- 1 |
2 | 3 |


4 | 5 |


6 |
7 | 8 | ### Installation 9 | > [!IMPORTANT] 10 | > The program requires qt and other third-party modules to run. This will be fixed in the nearest future 11 | 12 | 13 | ``` 14 | git clone https://github.com/Nighty3098/CodeKeeper --recurse-submodules 15 | cd CodeKeeper/ 16 | bash build.sh 17 | ``` 18 | -------------------------------------------------------------------------------- /doc/Screenshots.md: -------------------------------------------------------------------------------- 1 |
2 |


3 | 4 |


5 |

Screenshots

6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | -------------------------------------------------------------------------------- /doc/Shortcuts.md: -------------------------------------------------------------------------------- 1 |
2 | 3 |


4 | 5 | 6 | 7 |


8 | 9 | ### ⌘ Shortcuts 10 | 11 | | Shortcut | Action | 12 | |:------------------|:----------------------------------------| 13 | | Alt+1 | Move to tab 1 | 14 | | Alt+2 | Move to tab 2 | 15 | | Alt+3 | Move to tab 3 | 16 | | Alt+4 | Move to tab 4 | 17 | | Ctrl+M | Show/Hide menu and decoration elements | 18 | | Ctrl+E | Expand notes list to 1 step | 19 | | Ctrl+Shift+L | Show notes list | 20 | | Ctrl+Shift+N | Create new folder | 21 | | Ctrl+N | New project/task/note | 22 | | Delete | Delete project/task | 23 | | F2 | Rename note or folder | 24 | | Ctrl+Shift+P | Open settings | 25 | 26 |
27 | -------------------------------------------------------------------------------- /doc/Tweaks.md: -------------------------------------------------------------------------------- 1 | 2 | ### Tweaks 3 | 4 | > [!WARNING] 5 | > On some operating systems there may be problems with the standard qt theme, in this case, we recommend to enable custom theme in the program settings. 6 | 7 | | Default theme | Custom theme | 8 | |:--------------|:-------------| 9 | | ![](https://github.com/user-attachments/assets/eaabcc3d-8b42-4cc3-8453-313c69833ba0) | ![](../imgs/dark.png) | 10 | 11 |

12 | 13 | | Light theme | Dark theme | 14 | |:--------------|:-------------| 15 | | ![](../imgs/light.png) | ![](../imgs/dark.png) | 16 | -------------------------------------------------------------------------------- /imgs/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/1.png -------------------------------------------------------------------------------- /imgs/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/2.png -------------------------------------------------------------------------------- /imgs/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/3.png -------------------------------------------------------------------------------- /imgs/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/4.png -------------------------------------------------------------------------------- /imgs/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/5.png -------------------------------------------------------------------------------- /imgs/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/6.png -------------------------------------------------------------------------------- /imgs/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/7.png -------------------------------------------------------------------------------- /imgs/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/8.png -------------------------------------------------------------------------------- /imgs/custom_theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/custom_theme.png -------------------------------------------------------------------------------- /imgs/dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/dark.png -------------------------------------------------------------------------------- /imgs/default_theme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/default_theme.png -------------------------------------------------------------------------------- /imgs/display-arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/display-arrow-down.png -------------------------------------------------------------------------------- /imgs/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/header.png -------------------------------------------------------------------------------- /imgs/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/light.png -------------------------------------------------------------------------------- /imgs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/logo.png -------------------------------------------------------------------------------- /imgs/mac-command.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/mac-command.png -------------------------------------------------------------------------------- /imgs/markdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/markdown.png -------------------------------------------------------------------------------- /imgs/toncoin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/imgs/toncoin.png -------------------------------------------------------------------------------- /rm_cache.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -rf src/CodeKeeper/.qt/ \ 4 | src/CodeKeeper/.qtc_clangd \ 5 | src/CodeKeeper/build \ 6 | src/CodeKeeper/CodeKeeper.pro.user \ 7 | src/CodeKeeper/CodeKeeper.pro.user.1f90c22 \ 8 | src/CodeKeeper/main.o \ 9 | src/CodeKeeper/Makefile \ 10 | src/CodeKeeper/markdownhighlighter.o \ 11 | src/CodeKeeper/moc_linenumberarea.cpp \ 12 | src/CodeKeeper/moc_linenumberarea.o \ 13 | src/CodeKeeper/moc_mainwindow.cpp \ 14 | src/CodeKeeper/moc_mainwindow.o \ 15 | src/CodeKeeper/moc_markdownhighlighter.cpp \ 16 | src/CodeKeeper/moc_markdownhighlighter.o \ 17 | src/CodeKeeper/moc_predefs.h \ 18 | src/CodeKeeper/moc_qmarkdowntextedit.cpp \ 19 | src/CodeKeeper/moc_qmarkdowntextedit.o \ 20 | src/CodeKeeper/moc_qplaintexteditsearchwidget.cpp \ 21 | src/CodeKeeper/moc_qplaintexteditsearchwidget.o \ 22 | src/CodeKeeper/moc_settingswindow.cpp \ 23 | src/CodeKeeper/moc_settingswindow.o \ 24 | src/CodeKeeper/moc_syncwindow.cpp \ 25 | src/CodeKeeper/moc_syncwindow.o \ 26 | src/CodeKeeper/qmake_qmake_immediate.qrc \ 27 | src/CodeKeeper/qmarkdowntextedit.o \ 28 | src/CodeKeeper/qownlanguagedata.o \ 29 | src/CodeKeeper/qplaintexteditsearchwidget.o \ 30 | src/CodeKeeper/qrc_media.cpp \ 31 | src/CodeKeeper/qrc_media.o \ 32 | src/CodeKeeper/qrc_qmake_qmake_immediate.cpp \ 33 | src/CodeKeeper/qrc_qmake_qmake_immediate.o \ 34 | src/CodeKeeper/qrc_resources.cpp \ 35 | src/CodeKeeper/qrc_resources.o \ 36 | src/CodeKeeper/settings.json \ 37 | src/CodeKeeper/settingswindow.o \ 38 | src/CodeKeeper/syncwindow.o \ 39 | src/CodeKeeper/ui_qplaintexteditsearchwidget.h \ 40 | src/CodeKeeper/accountwindow.o \ 41 | src/CodeKeeper/moc_accountwindow.cpp \ 42 | src/CodeKeeper/moc_accountwindow.o \ 43 | src/CodeKeeper/object_script.CodeKeeper.Debug \ 44 | src/CodeKeeper/object_script.CodeKeeper.Release \ 45 | src/CodeKeeper/CircledProgressBar.o \ 46 | src/CodeKeeper/moc_CircledProgressBar.o \ 47 | src/CodeKeeper/moc_CircledProgressBar.cpp \ 48 | src/CodeKeeper/moc_ProgressCircle.cpp \ 49 | src/CodeKeeper/moc_ProgressCircle.o \ 50 | src/CodeKeeper/ProgressCircle.o \ 51 | src/CodeKeeper/moc_CircleChart.cpp \ 52 | src/CodeKeeper/moc_ColorValueDisplay.cpp \ 53 | src/CodeKeeper/moc_CircleChart.o \ 54 | src/CodeKeeper/moc_ColorValueDisplay.o 55 | 56 | echo "Done!" 57 | -------------------------------------------------------------------------------- /src/CodeKeeper/.gitignore: -------------------------------------------------------------------------------- 1 | # This file is used to ignore files which are generated 2 | # ---------------------------------------------------------------------------- 3 | 4 | *~ 5 | *.db 6 | *.autosave 7 | *.a 8 | *.core 9 | *.moc 10 | *.o 11 | *.obj 12 | *.orig 13 | *.rej 14 | *.so 15 | *.so.* 16 | *_pch.h.cpp 17 | *_resource.rc 18 | *.qm 19 | .#* 20 | *.*# 21 | core 22 | !core/ 23 | tags 24 | .DS_Store 25 | .directory 26 | *.debug 27 | Makefile* 28 | *.prl 29 | *.app 30 | moc_*.cpp 31 | ui_*.h 32 | qrc_*.cpp 33 | Thumbs.db 34 | *.res 35 | *.rc 36 | /.qmake.cache 37 | /.qmake.stash 38 | 39 | # qtcreator generated files 40 | *.pro.user* 41 | CMakeLists.txt.user* 42 | 43 | # xemacs temporary files 44 | *.flc 45 | 46 | # Vim temporary files 47 | .*.swp 48 | 49 | # Visual Studio generated files 50 | *.ib_pdb_index 51 | *.idb 52 | *.ilk 53 | *.pdb 54 | *.sln 55 | *.suo 56 | *.vcproj 57 | *vcproj.*.*.user 58 | *.ncb 59 | *.sdf 60 | *.opensdf 61 | *.vcxproj 62 | *vcxproj.* 63 | 64 | # MinGW generated files 65 | *.Debug 66 | *.Release 67 | 68 | # Python byte code 69 | *.pyc 70 | 71 | # Binaries 72 | # -------- 73 | *.dll 74 | *.exe 75 | 76 | -------------------------------------------------------------------------------- /src/CodeKeeper/.qmake.stash: -------------------------------------------------------------------------------- 1 | QMAKE_CXX.QT_COMPILER_STDCXX = 201703L 2 | QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 13 3 | QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 2 4 | QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 1 5 | QMAKE_CXX.COMPILER_MACROS = \ 6 | QT_COMPILER_STDCXX \ 7 | QMAKE_GCC_MAJOR_VERSION \ 8 | QMAKE_GCC_MINOR_VERSION \ 9 | QMAKE_GCC_PATCH_VERSION 10 | QMAKE_CXX.INCDIRS = \ 11 | /usr/include/c++/13.2.1 \ 12 | /usr/include/c++/13.2.1/x86_64-pc-linux-gnu \ 13 | /usr/include/c++/13.2.1/backward \ 14 | /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include \ 15 | /usr/local/include \ 16 | /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include-fixed \ 17 | /usr/include 18 | QMAKE_CXX.LIBDIRS = \ 19 | /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1 \ 20 | /usr/lib \ 21 | /lib 22 | -------------------------------------------------------------------------------- /src/CodeKeeper/CodeKeeper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/CodeKeeper/CodeKeeper -------------------------------------------------------------------------------- /src/CodeKeeper/CodeKeeper.pro: -------------------------------------------------------------------------------- 1 | QT += core gui widgets sql network 2 | 3 | greaterThan(QT_MAJOR_VERSION, 6): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | INCLUDEPATH += "3rdParty/qmarkdowntextedit" 8 | LIBS += -L3rdParty/qmarkdowntextedit -L$$OUT_PWD 9 | win32: LIBS += -L$$OUT_PWD/release -L$$OUT_PWD/debug 10 | 11 | SOURCES += \ 12 | accountwindow.cpp \ 13 | main.cpp \ 14 | mainwindow.cpp \ 15 | settingswindow.cpp \ 16 | syncwindow.cpp \ 17 | commandPalette.cpp \ 18 | keeperFunc/commandsFunc.cpp \ 19 | settingsFunc/functional.cpp \ 20 | keeperFunc/functional.cpp \ 21 | keeperFunc/tasksFunc.cpp \ 22 | keeperFunc/projectsFunc.cpp \ 23 | keeperFunc/notesFunc.cpp \ 24 | keeperFunc/getProjectInfo.cpp \ 25 | accountFunc/functional.cpp \ 26 | syncFunc/functional.cpp \ 27 | sql_db/projectsDB.cpp \ 28 | sql_db/tasksDB.cpp \ 29 | gitFunc/cloneRepo.cpp \ 30 | gitFunc/getUpdates.cpp \ 31 | gitFunc/pushUpdates.cpp \ 32 | keeperFunc/createMenu.cpp \ 33 | keeperFunc/addConnects.cpp 34 | 35 | HEADERS += \ 36 | accountwindow.h \ 37 | mainwindow.h \ 38 | settingswindow.h \ 39 | syncwindow.h \ 40 | commandPalette.h \ 41 | custom/clickableLabel/clickableLabel.h \ 42 | custom/circleProgressbar/ProgressCircle.h \ 43 | custom/circleChart/CircleChart.h \ 44 | custom/ColorValueDisplay/ColorValueDisplay.h 45 | 46 | RESOURCES += \ 47 | ../resources/resources.qrc \ 48 | stylesheet.qss \ 49 | custom_stylesheet.qss \ 50 | mac_dark_stylesheet.qss \ 51 | custom_stylesheet_solarized.qss 52 | 53 | include(3rdParty/qmarkdowntextedit/qmarkdowntextedit.pri) 54 | 55 | qnx: target.path = /tmp/$${TARGET}/bin 56 | else: unix:!android: target.path = /opt/$${TARGET}/bin 57 | !isEmpty(target.path): INSTALLS += target 58 | 59 | TRANSLATIONS += \ 60 | CodeKeeper_ru_RU.ts 61 | -------------------------------------------------------------------------------- /src/CodeKeeper/accountwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "accountwindow.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "accountFunc/functional.cpp" 8 | #include "custom/ColorValueDisplay/ColorValueDisplay.h" 9 | #include "custom/circleChart/CircleChart.h" 10 | #include "custom/circleProgressbar/ProgressCircle.h" 11 | #include "mainwindow.h" 12 | 13 | AccountWindow::AccountWindow(QWidget *parent) : QMainWindow{parent} 14 | { 15 | setWindowFlags(windowFlags() | Qt::FramelessWindowHint); 16 | 17 | globalSettings = new QSettings("CodeKeeper", "CodeKeeper"); 18 | MainWindow *mainWindow = static_cast(parent); 19 | 20 | centralWidget = new QWidget(this); 21 | setCentralWidget(centralWidget); 22 | 23 | mainLayout = new QGridLayout(centralWidget); 24 | setFixedSize(800, 550); 25 | 26 | globalSettings = new QSettings("CodeKeeper", "CodeKeeper"); 27 | 28 | getSettingsData(); 29 | 30 | tasksTitle = new QLabel(); 31 | tasksTitle->setText(tr("Tasks")); 32 | tasksTitle->setAlignment(Qt::AlignCenter); 33 | 34 | projectTitle = new QLabel(); 35 | projectTitle->setText(tr("Projects")); 36 | projectTitle->setAlignment(Qt::AlignCenter); 37 | 38 | profilePicture = new QLabel(); 39 | profilePicture->setAlignment(Qt::AlignCenter); 40 | profilePicture->setPixmap(mainWindow->changeIconColor(QPixmap(":/user.png")) 41 | .scaled(300, 300, Qt::KeepAspectRatio, Qt::SmoothTransformation)); 42 | profilePicture->setFixedSize(300, 300); 43 | profilePicture->setStyleSheet("border-radius: 145px;"); 44 | 45 | profileInfo = new QLabel(); 46 | profileInfo->setText(tr("Loading...")); 47 | profileInfo->setAlignment(Qt::AlignHCenter); 48 | 49 | tasksStatsLayout = new QHBoxLayout(); 50 | 51 | tasksStatsProgress = new CircleProgressBar(); 52 | tasksStatsProgress->setFixedSize(60, 60); 53 | tasksStatsProgress->setBackgroundColor(QColor(Qt::transparent)); 54 | tasksStatsProgress->setLineWidth(font_size.toInt()); 55 | tasksStatsProgress->setDisplayMode(CircleProgressBar::Percent); // Percent, CustomText, NoPercent, Hidden 56 | 57 | tasksChartValuesDisplay = new ColorValueDisplay(); 58 | tasksChartValuesDisplay->setFixedSize(160, 85); 59 | 60 | tasksStatsLayout->addWidget(tasksStatsProgress); 61 | tasksStatsLayout->addWidget(tasksChartValuesDisplay); 62 | tasksStatsLayout->setSpacing(5); 63 | 64 | userName = new QLabel(); 65 | userName->setText(git_user); 66 | userName->setAlignment(Qt::AlignHCenter); 67 | 68 | openRepo = new QPushButton(tr("Open Git")); 69 | openRepo->setFixedSize(100, 25); 70 | 71 | closeWindow = new QPushButton(""); 72 | closeWindow->setObjectName("closeBtn"); 73 | closeWindow->setFixedSize(13, 13); 74 | 75 | projectsStatsLayout = new QHBoxLayout(); 76 | projectsStatsLayout->setSpacing(5); 77 | 78 | projectsChart = new CircleChart(); 79 | projectsChart->setAlignment(Qt::AlignCenter); 80 | projectsChart->setFixedSize(120, 120); 81 | projectsChart->setHeight(90); 82 | 83 | chartValuesDisplay = new ColorValueDisplay(); 84 | chartValuesDisplay->setFixedSize(160, 85); 85 | 86 | projectsStatsLayout->addWidget(projectsChart); 87 | projectsStatsLayout->addWidget(chartValuesDisplay); 88 | 89 | QVBoxLayout *statsLayout = new QVBoxLayout(); 90 | statsLayout->setSpacing(20); 91 | statsLayout->addWidget(tasksTitle, Qt::AlignHCenter | Qt::AlignBottom); 92 | statsLayout->addLayout(tasksStatsLayout); 93 | statsLayout->addWidget(projectTitle, Qt::AlignHCenter | Qt::AlignBottom); 94 | statsLayout->addLayout(projectsStatsLayout); 95 | 96 | statsWidget = new QWidget(); 97 | statsWidget->setFixedSize(350, 300); 98 | statsWidget->setLayout(statsLayout); 99 | 100 | QVBoxLayout *gitProfileLayout = new QVBoxLayout(); 101 | gitProfileLayout->addWidget(userName, Qt::AlignVCenter); 102 | gitProfileLayout->addWidget(profilePicture, Qt::AlignVCenter); 103 | gitProfileLayout->addWidget(profileInfo, Qt::AlignVCenter); 104 | 105 | QThread *styleThread = new QThread; 106 | QObject::connect(styleThread, &QThread::started, this, [this]() { 107 | setFontStyle(); 108 | 109 | qDebug() << "styleThread started"; 110 | }); 111 | styleThread->start(); 112 | 113 | QThread *setUserDataThread = new QThread; 114 | QObject::connect(setUserDataThread, &QThread::started, this, [this]() { 115 | qDebug() << "setUserDataThread started"; 116 | 117 | setUserData(git_user, profileInfo); 118 | setTasksProgress(); 119 | setProjectsStats(); 120 | }); 121 | setUserDataThread->start(); 122 | 123 | QThread *setUserImageThread = new QThread; 124 | QObject::connect(setUserImageThread, &QThread::started, this, [this]() { 125 | qDebug() << "setUserImageThread started"; 126 | 127 | get_image_url(git_user, profilePicture); 128 | }); 129 | setUserImageThread->start(); 130 | 131 | mainLayout->addWidget(closeWindow, 0, 0, 1, 8, Qt::AlignLeft); 132 | mainLayout->addWidget(userName, 1, 0, 1, 8, Qt::AlignCenter); 133 | mainLayout->addWidget(profilePicture, 2, 0, 7, 4, Qt::AlignCenter); 134 | mainLayout->addWidget(statsWidget, 2, 4, 7, 4, Qt::AlignCenter); 135 | mainLayout->addWidget(profileInfo, 12, 0, 1, 8, Qt::AlignCenter); 136 | mainLayout->addWidget(openRepo, 16, 0, 1, 8, Qt::AlignCenter); 137 | 138 | connect(closeWindow, SIGNAL(clicked()), this, SLOT(closeWindowSlot())); 139 | connect(openRepo, SIGNAL(clicked()), this, SLOT(onOpenRepoClicked())); 140 | } 141 | 142 | AccountWindow::~AccountWindow() {}; 143 | -------------------------------------------------------------------------------- /src/CodeKeeper/accountwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef ACCOUNTWINDOW_H 2 | #define ACCOUNTWINDOW_H 3 | 4 | #include "custom/ColorValueDisplay/ColorValueDisplay.h" 5 | #include "custom/circleChart/CircleChart.h" 6 | #include "custom/circleProgressbar/ProgressCircle.h" 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | class AccountWindow : public QMainWindow 17 | { 18 | Q_OBJECT 19 | public: 20 | explicit AccountWindow(QWidget *parent = nullptr); 21 | ~AccountWindow(); 22 | 23 | void setFontStyle(); 24 | 25 | QSettings *globalSettings; 26 | 27 | QFont selectedFont; 28 | QString font_size; 29 | int theme; 30 | QString path; 31 | 32 | QString git_repo; 33 | QString git_user; 34 | QString git_token; 35 | 36 | bool isAutoSyncB; 37 | bool isCustomTheme; 38 | 39 | QCache imageCache; 40 | 41 | private: 42 | QHBoxLayout *langsStatsLayout; 43 | QHBoxLayout *GitLangsStatsLayout; 44 | 45 | QHBoxLayout *tasksStatsLayout; 46 | QHBoxLayout *projectsStatsLayout; 47 | 48 | QWidget *centralWidget; 49 | QGridLayout *mainLayout; 50 | 51 | QLabel *profilePicture; 52 | QLabel *userName; 53 | QLabel *profileInfo; 54 | QLabel *tasksStats; 55 | 56 | QLabel *tasksTitle; 57 | QLabel *projectTitle; 58 | 59 | QPushButton *closeWindow; 60 | QPushButton *openRepo; 61 | 62 | CircleProgressBar *tasksStatsProgress; 63 | ColorValueDisplay *tasksChartValuesDisplay; 64 | 65 | CircleChart *projectsChart; 66 | ColorValueDisplay *chartValuesDisplay; 67 | 68 | QWidget *statsWidget; 69 | 70 | private slots: 71 | void setUserData(const QString &username, QLabel *label); 72 | void closeWindowSlot(); 73 | void getSettingsData(); 74 | void setImageFromUrl(const QString &url, QLabel *label); 75 | void onOpenRepoClicked(); 76 | int getStarsCount(const QString &username, const QString &token); 77 | void setTasksProgress(); 78 | void setProjectsStats(); 79 | void get_image_url(const QString &username, QLabel *label); 80 | QStringList getAllGitReposUrls(const QString &username); 81 | float calculatePercentage(int count, int total); 82 | }; 83 | 84 | #endif // ACCOUNTWINDOW_H 85 | -------------------------------------------------------------------------------- /src/CodeKeeper/commandPalette.cpp: -------------------------------------------------------------------------------- 1 | #include "commandPalette.h" 2 | #include "mainwindow.h" 3 | 4 | #include "keeperFunc/commandsFunc.cpp" 5 | 6 | CommandPalette::CommandPalette(QWidget *parent) : QMainWindow{parent} 7 | { 8 | setWindowFlags(windowFlags() | Qt::FramelessWindowHint); 9 | 10 | globalSettings = new QSettings("CodeKeeper", "CodeKeeper"); 11 | 12 | centralWidget = new QWidget(this); 13 | setCentralWidget(centralWidget); 14 | mainLayout = new QGridLayout(centralWidget); 15 | mainLayout->setSpacing(10); 16 | 17 | int font_size_int = font_size.toInt(); 18 | 19 | getSettingsData(); 20 | setWindowSize(); 21 | setWindowPosition(); 22 | 23 | searchBar = new QLineEdit(); 24 | searchBar->setPlaceholderText(tr("CodeKeeper")); 25 | searchBar->setFixedHeight(30); 26 | searchBar->setAlignment(Qt::AlignCenter); 27 | 28 | closeBtn = new QPushButton(); 29 | closeBtn->setFixedSize(13, 13); 30 | closeBtn->setFlat(true); 31 | 32 | closeBtn->setStyleSheet("QPushButton {" 33 | " border-radius: 6px;" 34 | " border-color: rgba(0, 0, 0, 0);" 35 | " background-color: #e08581;" 36 | " background-repeat: no-repeat;" 37 | " background-attachment: fixed;" 38 | "}" 39 | 40 | "QPushButton:hover {" 41 | " border-radius: 6px;" 42 | " border-color: rgba(0, 0, 0, 0);" 43 | " background-repeat: no-repeat;" 44 | " background-color: #e06a65;" 45 | " background-attachment: fixed;" 46 | "}"); 47 | 48 | listItems = new QListWidget(); 49 | listItems->setSelectionMode(QAbstractItemView::SingleSelection); 50 | listItems->setStyleSheet( 51 | "QListWidget::item:selected {color: #000000; background-color: #a9bf85;border-radius: 5px; font-size: " + 52 | font_size + "pt;} QListWidget {font-size: " + font_size + "pt; background-color: transparent;}"); 53 | 54 | settingsItem = new QListWidgetItem(tr("Settings")); 55 | syncItem = new QListWidgetItem(tr("Sync")); 56 | helpItem = new QListWidgetItem(tr("Help")); 57 | aboutItem = new QListWidgetItem(tr("About")); 58 | clearAllDataItem = new QListWidgetItem(tr("Remove all data")); 59 | userProfileItem = new QListWidgetItem(tr("User account")); 60 | hideMenuItem = new QListWidgetItem(tr("Hide menu")); 61 | 62 | listItems->addItem(settingsItem); 63 | listItems->addItem(syncItem); 64 | listItems->addItem(aboutItem); 65 | listItems->addItem(helpItem); 66 | listItems->addItem(clearAllDataItem); 67 | listItems->addItem(userProfileItem); 68 | listItems->addItem(hideMenuItem); 69 | 70 | searchBar->setFont(selectedFont); 71 | searchBar->setStyleSheet("font-size: " + font_size + "pt;"); 72 | 73 | listItems->setFont(selectedFont); 74 | 75 | mainLayout->addWidget(closeBtn, 0, 0, Qt::AlignLeft); 76 | mainLayout->addWidget(searchBar, 1, 0); 77 | mainLayout->addWidget(listItems, 2, 0); 78 | 79 | connect(closeBtn, &QPushButton::clicked, this, [this]() { close(); }); 80 | connect(searchBar, &QLineEdit::textChanged, this, &CommandPalette::filterList); 81 | connect(listItems, &QListWidget::itemActivated, this, &CommandPalette::activateCommand); 82 | } 83 | 84 | CommandPalette::~CommandPalette() {}; 85 | -------------------------------------------------------------------------------- /src/CodeKeeper/commandPalette.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMANDPALETTE_H 2 | #define COMMANDPALETTE_H 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "accountwindow.h" 9 | #include "settingswindow.h" 10 | #include "syncwindow.h" 11 | 12 | class CommandPalette : public QMainWindow 13 | { 14 | Q_OBJECT 15 | public: 16 | explicit CommandPalette(QWidget *parent = nullptr); 17 | ~CommandPalette(); 18 | 19 | void setFontStyle(); 20 | 21 | QSettings *globalSettings; 22 | 23 | QFont selectedFont; 24 | QString font_size; 25 | 26 | private: 27 | QWidget *centralWidget; 28 | QGridLayout *mainLayout; 29 | 30 | QLineEdit *searchBar; 31 | QListWidget *listItems; 32 | QPushButton *closeBtn; 33 | 34 | QListWidgetItem *settingsItem; 35 | QListWidgetItem *syncItem; 36 | QListWidgetItem *helpItem; 37 | QListWidgetItem *aboutItem; 38 | QListWidgetItem *checkUpdatesItem; 39 | QListWidgetItem *clearAllDataItem; 40 | QListWidgetItem *userProfileItem; 41 | QListWidgetItem *hideMenuItem; 42 | 43 | private slots: 44 | void getSettingsData(); 45 | void setWindowSize(); 46 | void setWindowPosition(); 47 | void filterList(const QString &text); 48 | void activateCommand(QListWidgetItem *item); 49 | }; 50 | 51 | #endif // COMMANDPALETTE_H 52 | -------------------------------------------------------------------------------- /src/CodeKeeper/custom/ColorValueDisplay/ColorValueDisplay.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | #ifndef COLORVALUEDISPLAY_H 11 | #define COLORVALUEDISPLAY_H 12 | 13 | class ColorValueDisplay : public QWidget { 14 | Q_OBJECT 15 | 16 | public: 17 | ColorValueDisplay(QWidget *parent = nullptr) : QWidget(parent) { 18 | QVBoxLayout *layout = new QVBoxLayout(this); 19 | layout->setSpacing(5); 20 | layout->setContentsMargins(5, 5, 5, 5); 21 | 22 | items_ = new QVector(); 23 | } 24 | 25 | void addValue(const QString &text, int value, QColor color, QFont &font) { 26 | ColorValueItem *item = new ColorValueItem(text, value, color, font); 27 | items_->append(item); 28 | layout()->addWidget(item); 29 | update(); 30 | } 31 | 32 | private: 33 | class ColorValueItem : public QWidget { 34 | public: 35 | ColorValueItem(const QString &text, int value, QColor color, QFont &font, QWidget *parent = nullptr) : QWidget(parent) { 36 | QHBoxLayout *layout = new QHBoxLayout(this); 37 | layout->setSpacing(5); 38 | layout->setContentsMargins(0, 0, 0, 0); 39 | 40 | QLabel *colorLabel = new QLabel(this); 41 | colorLabel->setStyleSheet(QString("background-color: %1; border: 0px solid black; border-radius: 5px;").arg(color.name())); 42 | colorLabel->setFixedSize(10, 10); 43 | layout->addWidget(colorLabel); 44 | 45 | QLabel *dashLabel = new QLabel("-", this); 46 | dashLabel->setFont(font); 47 | layout->addWidget(dashLabel); 48 | 49 | QLabel *textLabel = new QLabel(text, this); 50 | textLabel->setFont(font); 51 | layout->addWidget(textLabel); 52 | 53 | QLabel *valueLabel = new QLabel(QString::number(value) + "%", this); 54 | valueLabel->setFont(font); 55 | layout->addWidget(valueLabel); 56 | } 57 | }; 58 | 59 | QVector *items_; 60 | }; 61 | 62 | 63 | #endif // COLORVALUEDISPLAY_H 64 | -------------------------------------------------------------------------------- /src/CodeKeeper/custom/circleChart/CircleChart.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #ifndef CIRCLECHART_H 7 | #define CIRCLECHART_H 8 | 9 | class CircleChart : public QProgressBar { 10 | Q_OBJECT 11 | 12 | public: 13 | CircleChart(QWidget *parent = nullptr) : QProgressBar(parent) { 14 | // Установка фона прогресс-бара 15 | setStyleSheet("QProgressBar { background-color: transparent; border: none; }"); 16 | } 17 | 18 | void setMaximumValue(int value) { 19 | QProgressBar::setMaximum(value); 20 | } 21 | 22 | void addValue(double value, QColor color) { 23 | values_.append(value); 24 | colors_.append(color); 25 | update(); 26 | } 27 | 28 | void setHeight(int height) { 29 | height_ = height; 30 | update(); 31 | } 32 | 33 | protected: 34 | void paintEvent(QPaintEvent *event) override { 35 | Q_UNUSED(event); 36 | 37 | QPainter painter(this); 38 | painter.setRenderHint(QPainter::Antialiasing); 39 | 40 | int width = this->width(); 41 | int height = this->height(); 42 | int diameter = qMin(width, height); 43 | int radius = diameter / 2; 44 | 45 | // Установка цвета фона 46 | painter.setBrush(Qt::NoBrush); // Заливка фона 47 | painter.setPen(Qt::NoPen); // Убираем границу 48 | painter.drawEllipse(QRectF(0, 0, diameter, diameter)); // Рисуем фон 49 | 50 | // Рисуем круги прогресса 51 | qreal progress = 0; 52 | for (int i = 0; i < values_.size(); i++) { 53 | qreal value = values_.at(i) / (qreal)maximum(); 54 | painter.setBrush(colors_.at(i)); 55 | painter.setPen(Qt::NoPen); 56 | painter.drawPie(QRectF(radius - height_ / 2, radius - height_ / 2, height_, height_), 57 | (progress * 360) * 16, (value * 360) * 16); 58 | progress += value; 59 | } 60 | 61 | // Заполнение оставшегося пространства 62 | if (progress < 1.0) { 63 | painter.setBrush(Qt::NoBrush); // Цвет для оставшегося пространства 64 | painter.setPen(Qt::NoPen); 65 | painter.drawPie(QRectF(radius - height_ / 2, radius - height_ / 2, height_, height_), 66 | (progress * 360) * 16, (1.0 - progress) * 360 * 16); 67 | } 68 | } 69 | 70 | private: 71 | QVector values_; // Изменен на double для большей точности 72 | QVector colors_; 73 | int height_ = 20; 74 | }; 75 | 76 | #endif // CIRCLECHART_H 77 | -------------------------------------------------------------------------------- /src/CodeKeeper/custom/circleProgressbar/ProgressCircle.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef PROGRESSCIRCLE_H 4 | #define PROGRESSCIRCLE_H 5 | 6 | class CircleProgressBar : public QWidget { 7 | Q_OBJECT 8 | 9 | public: 10 | enum DisplayMode { 11 | Percent, // Display percentages 12 | CustomText, // Display custom text 13 | NoPercent, // Display value without percent sign 14 | Hidden // Hide text 15 | }; 16 | 17 | explicit CircleProgressBar(QWidget *parent = nullptr) : QWidget(parent) { 18 | setAttribute(Qt::WA_StyledBackground, true); 19 | setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); 20 | setMinimumWidth(100); 21 | setMinimumHeight(100); 22 | 23 | m_backgroundColor = Qt::lightGray; 24 | m_progressColor = Qt::blue; 25 | m_lineWidth = 10; // default line width 26 | m_displayMode = Percent; // Default display mode 27 | } 28 | 29 | void setValue(int value) { 30 | m_value = value; 31 | update(); 32 | } 33 | 34 | void setMaxValue(int maxValue) { 35 | m_maxValue = maxValue; 36 | update(); 37 | } 38 | 39 | void setBackgroundColor(QColor color) { 40 | m_backgroundColor = color; 41 | update(); 42 | } 43 | 44 | void setProgressColor(QColor color) { 45 | m_progressColor = color; 46 | update(); 47 | } 48 | 49 | void setLineWidth(int width) { 50 | m_lineWidth = width; 51 | update(); 52 | } 53 | 54 | void setDisplayMode(DisplayMode mode) { 55 | m_displayMode = mode; 56 | update(); 57 | } 58 | 59 | void setCustomText(const QString &text) { 60 | m_customText = text; // Set the custom text 61 | update(); // Update the widget to reflect the change 62 | } 63 | 64 | int value() const { return m_value; } 65 | int maxValue() const { return m_maxValue; } 66 | int lineWidth() const { return m_lineWidth; } 67 | 68 | protected: 69 | void paintEvent(QPaintEvent *event) override { 70 | QPainter painter(this); 71 | painter.setRenderHint(QPainter::Antialiasing); 72 | 73 | int centerX = width() / 2; 74 | int centerY = height() / 2; 75 | int radius = qMin(centerX, centerY) - 5; 76 | 77 | // Draw the background circle 78 | QPen backgroundPen(m_backgroundColor); 79 | backgroundPen.setWidth(m_lineWidth); 80 | painter.setPen(backgroundPen); 81 | painter.drawEllipse(centerX - radius, centerY - radius, 2 * radius, 2 * radius); 82 | 83 | // Calculate the angle based on the value 84 | qreal angle = (qreal)m_value / m_maxValue * 360; 85 | 86 | // Draw the progress arc 87 | QPainterPath progressPath; 88 | progressPath.moveTo(centerX, centerY - radius); 89 | progressPath.arcTo(centerX - radius, centerY - radius, 2 * radius, 2 * radius, 90, -angle); 90 | QPen progressPen(m_progressColor); 91 | progressPen.setWidth(m_lineWidth); 92 | progressPen.setCapStyle(Qt::RoundCap); 93 | painter.setPen(progressPen); 94 | painter.drawPath(progressPath); 95 | 96 | // Draw the text based on the display mode 97 | QString text; 98 | switch (m_displayMode) { 99 | case Percent: 100 | text = QString("%1%").arg(m_value * 100 / m_maxValue); 101 | break; 102 | case CustomText: 103 | text = m_customText; 104 | break; 105 | case NoPercent: 106 | text = QString::number(m_value); 107 | break; 108 | case Hidden: 109 | text = ""; // No text to display 110 | break; 111 | } 112 | 113 | if (!text.isEmpty()) { 114 | painter.drawText(QRect(centerX - radius, centerY - radius, 2 * radius, 2 * radius), Qt::AlignCenter, text); 115 | } 116 | } 117 | 118 | private: 119 | int m_value = 0; 120 | int m_maxValue = 100; 121 | QColor m_backgroundColor; 122 | QColor m_progressColor; 123 | int m_lineWidth; 124 | DisplayMode m_displayMode; // Current display mode 125 | QString m_customText; // Custom text to display 126 | }; 127 | 128 | #endif // PROGRESSCIRCLE_H -------------------------------------------------------------------------------- /src/CodeKeeper/custom/clickableLabel/clickableLabel.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | class ClickableLabel : public QLabel 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit ClickableLabel(const QString &text, QWidget *parent = nullptr) : QLabel(parent), m_text(text) 11 | { 12 | setFixedHeight(25); 13 | setAlignment(Qt::AlignLeft | Qt::AlignVCenter); 14 | 15 | QPixmap originalPixmap(":/expand.png"); 16 | QPixmap coloredPixmap = changeIconColor(originalPixmap); 17 | m_pixmap = coloredPixmap; 18 | 19 | m_pixmapSize = QSize(20, 20); 20 | m_textColor = Qt::white; 21 | } 22 | 23 | void setCustomStyleSheet(const QString &styleSheet) 24 | { 25 | QLabel::setObjectName("subtitle"); 26 | QLabel::setStyleSheet(styleSheet); 27 | updateFontSize(); 28 | updateTextColor(); 29 | } 30 | 31 | void setPixmapSize(int size) 32 | { 33 | m_pixmapSize = QSize(size, size); 34 | m_pixmap = m_pixmap.scaled(m_pixmapSize, Qt::KeepAspectRatio, Qt::SmoothTransformation); 35 | update(); 36 | } 37 | 38 | QPixmap changeIconColor(QPixmap pixmap) 39 | { 40 | QColor color = QColor("#fff"); 41 | QPixmap coloredPixmap = pixmap; 42 | QPainter painter(&coloredPixmap); 43 | 44 | painter.setCompositionMode(QPainter::CompositionMode_SourceIn); 45 | painter.fillRect(coloredPixmap.rect(), color); 46 | painter.end(); 47 | 48 | return coloredPixmap; 49 | } 50 | 51 | signals: 52 | void clicked(); 53 | 54 | protected: 55 | void mousePressEvent(QMouseEvent *event) override 56 | { 57 | emit clicked(); 58 | QLabel::mousePressEvent(event); 59 | } 60 | 61 | void paintEvent(QPaintEvent *event) override 62 | { 63 | QLabel::paintEvent(event); 64 | 65 | QPainter painter(this); 66 | int pixmapWidth = m_pixmap.width(); 67 | int pixmapHeight = m_pixmap.height(); 68 | painter.drawPixmap(5, (height() - pixmapHeight) / 2, m_pixmap); 69 | 70 | painter.setPen(m_textColor); 71 | 72 | int textX = pixmapWidth + 10; 73 | painter.drawText(textX, height() / 2 + painter.fontMetrics().height() / 4, m_text); 74 | } 75 | 76 | private: 77 | QString m_text; 78 | QPixmap m_pixmap; 79 | QSize m_pixmapSize; 80 | QColor m_textColor; 81 | 82 | void updateFontSize() 83 | { 84 | QStringList styleList = styleSheet().split(';'); 85 | for (const QString &style : styleList) 86 | { 87 | if (style.contains("font-size:")) 88 | { 89 | QString fontSizeStr = style.split(':').last().trimmed(); 90 | bool ok; 91 | int fontSize = fontSizeStr.split(' ').first().toInt(&ok); 92 | if (ok) 93 | { 94 | QFont font = this->font(); 95 | font.setPointSize(fontSize); 96 | setFont(font); 97 | } 98 | break; 99 | } 100 | } 101 | } 102 | 103 | void updateTextColor() 104 | { 105 | QStringList styleList = styleSheet().split(';'); 106 | for (const QString &style : styleList) 107 | { 108 | if (style.contains("color:")) 109 | { 110 | QString colorStr = style.split(':').last().trimmed(); 111 | QColor color(colorStr); 112 | if (color.isValid()) 113 | { 114 | m_textColor = color; 115 | } 116 | break; 117 | } 118 | } 119 | } 120 | }; 121 | -------------------------------------------------------------------------------- /src/CodeKeeper/gitFunc/cloneRepo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/CodeKeeper/gitFunc/cloneRepo.cpp -------------------------------------------------------------------------------- /src/CodeKeeper/gitFunc/getUpdates.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/CodeKeeper/gitFunc/getUpdates.cpp -------------------------------------------------------------------------------- /src/CodeKeeper/gitFunc/pushUpdates.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/CodeKeeper/gitFunc/pushUpdates.cpp -------------------------------------------------------------------------------- /src/CodeKeeper/keeperFunc/addConnects.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | void MainWindow::createConnects() 4 | { 5 | int font_size_int = globalSettings->value("fontSize").value(); 6 | 7 | connect(openSettingsWindowQS, &QShortcut::activated, this, [this]() { openSettingsWindow(); }); 8 | 9 | connect(label_1, &ClickableLabel::clicked, [=]() { 10 | if (this->width() < 1400) 11 | { 12 | incompleteTasks->setVisible(!incompleteTasks->isVisible()); 13 | if (incompleteWidget->height() > font_size_int * 2.5) 14 | { 15 | incompleteWidget->setMaximumHeight(font_size_int * 2.5); 16 | } 17 | else 18 | { 19 | incompleteWidget->setMaximumHeight(1000000); 20 | }; 21 | } 22 | }); 23 | connect(label_2, &ClickableLabel::clicked, [=]() { 24 | if (this->width() < 1400) 25 | { 26 | inprocessTasks->setVisible(!inprocessTasks->isVisible()); 27 | if (inprocessWidget->height() > font_size_int * 2.5) 28 | { 29 | inprocessWidget->setMaximumHeight(font_size_int * 2.5); 30 | } 31 | else 32 | { 33 | inprocessWidget->setMaximumHeight(1000000); 34 | }; 35 | } 36 | }); 37 | connect(label_3, &ClickableLabel::clicked, [=]() { 38 | if (this->width() < 1400) 39 | { 40 | completeTasks->setVisible(!completeTasks->isVisible()); 41 | if (completeWidget->height() > font_size_int * 2.5) 42 | { 43 | completeWidget->setMaximumHeight(font_size_int * 2.5); 44 | } 45 | else 46 | { 47 | completeWidget->setMaximumHeight(1000000); 48 | }; 49 | } 50 | }); 51 | 52 | connect(toFirstTab, &QShortcut::activated, tabs, [this]() { tabs->setCurrentIndex(0); }); 53 | 54 | connect(toSecondTab, &QShortcut::activated, tabs, [this]() { tabs->setCurrentIndex(1); }); 55 | 56 | connect(toThirdTab, &QShortcut::activated, tabs, [this]() { tabs->setCurrentIndex(2); }); 57 | 58 | connect(toFourthTab, &QShortcut::activated, tabs, [this]() { tabs->setCurrentIndex(3); }); 59 | 60 | connect(mainTabButton, &QPushButton::clicked, [this]() { 61 | tabs->setCurrentIndex(0); 62 | windowTitle->setText(" ~ CodeKeeper ~ "); 63 | setWindowTitle("CodeKeeper"); 64 | }); 65 | 66 | connect(tasksTabButton, &QPushButton::clicked, [this]() { 67 | tabs->setCurrentIndex(2); 68 | windowTitle->setText(" ~ Tasks ~ "); 69 | setWindowTitle(tr("Tasks")); 70 | loadProjectsList(projectsList); 71 | }); 72 | 73 | connect(notesTabButton, &QPushButton::clicked, [this]() { 74 | tabs->setCurrentIndex(1); 75 | windowTitle->setText(" ~ Notes ~ "); 76 | setWindowTitle(tr("Notes")); 77 | }); 78 | 79 | connect(projectsTabButton, &QPushButton::clicked, [this]() { 80 | tabs->setCurrentIndex(3); 81 | windowTitle->setText(" ~ Projects ~ "); 82 | setWindowTitle(tr("Projects")); 83 | }); 84 | 85 | connect(openCommandPalette, &QShortcut::activated, this, [this]() { 86 | qDebug() << "Opening command palette..."; 87 | commandPalette = new CommandPalette(this); 88 | commandPalette->show(); 89 | }); 90 | 91 | connect(projectsList, &QComboBox::currentTextChanged, this, [this]() { filterTasksByProject(projectsList); }); 92 | 93 | connect(hideMenuQS, &QShortcut::activated, this, [this]() { hideMenu(); }); 94 | 95 | connect(incompleteTasks, &QListWidget::itemChanged, this, 96 | [=](QListWidgetItem *item) { onMovingTaskTo(item, incompleteTasks); }); 97 | connect(inprocessTasks, &QListWidget::itemChanged, this, 98 | [=](QListWidgetItem *item) { onMovingTaskTo(item, inprocessTasks); }); 99 | connect(completeTasks, &QListWidget::itemChanged, this, 100 | [=](QListWidgetItem *item) { onMovingTaskTo(item, completeTasks); }); 101 | 102 | connect(incompleteTasks, &QListWidget::itemEntered, this, 103 | [=](QListWidgetItem *item) { onMovingTaskFrom(item, incompleteTasks); }); 104 | connect(inprocessTasks, &QListWidget::itemEntered, this, 105 | [=](QListWidgetItem *item) { onMovingTaskFrom(item, inprocessTasks); }); 106 | connect(completeTasks, &QListWidget::itemEntered, this, 107 | [=](QListWidgetItem *item) { onMovingTaskFrom(item, completeTasks); }); 108 | 109 | connect(notStartedProjects, &QListWidget::itemChanged, this, 110 | [=](QListWidgetItem *item) { onMovingProjectTo(item, notStartedProjects); }); 111 | connect(startedProjects, &QListWidget::itemChanged, this, 112 | [=](QListWidgetItem *item) { onMovingProjectTo(item, startedProjects); }); 113 | connect(finishlineProjects, &QListWidget::itemChanged, this, 114 | [=](QListWidgetItem *item) { onMovingProjectTo(item, finishlineProjects); }); 115 | connect(finishedProjects, &QListWidget::itemChanged, this, 116 | [=](QListWidgetItem *item) { onMovingProjectTo(item, finishedProjects); }); 117 | 118 | connect(notStartedProjects, &QListWidget::itemEntered, this, 119 | [=](QListWidgetItem *item) { onMovingProjectFrom(item, notStartedProjects); }); 120 | connect(startedProjects, &QListWidget::itemEntered, this, 121 | [=](QListWidgetItem *item) { onMovingProjectFrom(item, startedProjects); }); 122 | connect(finishlineProjects, &QListWidget::itemEntered, this, 123 | [=](QListWidgetItem *item) { onMovingProjectFrom(item, finishlineProjects); }); 124 | connect(finishedProjects, &QListWidget::itemEntered, this, 125 | [=](QListWidgetItem *item) { onMovingProjectFrom(item, finishedProjects); }); 126 | 127 | connect(incompleteTasks, &QListWidget::customContextMenuRequested, this, 128 | [this](const QPoint &pos) { activateTasksContextMenu(pos, incompleteTasks); }); 129 | connect(inprocessTasks, &QListWidget::customContextMenuRequested, this, 130 | [this](const QPoint &pos) { activateTasksContextMenu(pos, inprocessTasks); }); 131 | connect(completeTasks, &QListWidget::customContextMenuRequested, this, 132 | [this](const QPoint &pos) { activateTasksContextMenu(pos, completeTasks); }); 133 | 134 | connect(notStartedProjects, &QListWidget::customContextMenuRequested, this, 135 | [this](const QPoint &pos) { activateProjectContextMenu(pos, notStartedProjects); }); 136 | 137 | connect(startedProjects, &QListWidget::customContextMenuRequested, this, 138 | [this](const QPoint &pos) { activateProjectContextMenu(pos, startedProjects); }); 139 | 140 | connect(finishlineProjects, &QListWidget::customContextMenuRequested, this, 141 | [this](const QPoint &pos) { activateProjectContextMenu(pos, finishlineProjects); }); 142 | 143 | connect(finishedProjects, &QListWidget::customContextMenuRequested, this, 144 | [this](const QPoint &pos) { activateProjectContextMenu(pos, finishedProjects); }); 145 | 146 | connect(closeBtn, &QPushButton::clicked, this, [this]() { close(); }); 147 | connect(minimizeBtn, &QPushButton::clicked, this, [this]() { showMinimized(); }); 148 | connect(maximizeBtn, &QPushButton::clicked, this, [this]() { 149 | this->setWindowState(this->windowState() ^ Qt::WindowFullScreen); 150 | }); 151 | 152 | connect(tabs, &QTabWidget::currentChanged, this, 153 | [=]() { updateTasksProgress(tabs, incompleteTasks, inprocessTasks, completeTasks, tasksProgress); }); 154 | 155 | connect(tabs, &QTabWidget::currentChanged, this, 156 | [=]() { getTotalTasks(tabs, incompleteTasks, inprocessTasks, completeTasks); }); 157 | 158 | connect(tabs, &QTabWidget::currentChanged, this, [=]() { 159 | getTotalProjects(tabs, notStartedProjects, startedProjects, finishedProjects, finishlineProjects); 160 | }); 161 | 162 | connect(openSettingsBtn, &QPushButton::clicked, this, &MainWindow::openSettingsWindow); 163 | connect(openAccountWindow, &QPushButton::clicked, this, &MainWindow::fOpenAccountWindow); 164 | connect(syncDataBtn, &QPushButton::clicked, this, &MainWindow::openSyncWindow); 165 | 166 | // fix 167 | connect(notStartedProjects, &QListWidget::itemClicked, this, &MainWindow::on_listWidget_itemClicked); 168 | connect(startedProjects, &QListWidget::itemClicked, this, &MainWindow::on_listWidget_itemClicked); 169 | connect(finishlineProjects, &QListWidget::itemClicked, this, &MainWindow::on_listWidget_itemClicked); 170 | connect(finishedProjects, &QListWidget::itemClicked, this, &MainWindow::on_listWidget_itemClicked); 171 | 172 | connect(incompleteTasks, &QListWidget::itemClicked, this, &MainWindow::on_listWidget_itemClicked); 173 | connect(inprocessTasks, &QListWidget::itemClicked, this, &MainWindow::on_listWidget_itemClicked); 174 | connect(completeTasks, &QListWidget::itemClicked, this, &MainWindow::on_listWidget_itemClicked); 175 | 176 | connect(notStartedProjects, &QListWidget::itemPressed, this, &MainWindow::on_listWidget_itemClicked); 177 | connect(startedProjects, &QListWidget::itemPressed, this, &MainWindow::on_listWidget_itemClicked); 178 | connect(finishlineProjects, &QListWidget::itemPressed, this, &MainWindow::on_listWidget_itemClicked); 179 | connect(finishedProjects, &QListWidget::itemPressed, this, &MainWindow::on_listWidget_itemClicked); 180 | 181 | connect(incompleteTasks, &QListWidget::itemPressed, this, &MainWindow::on_listWidget_itemClicked); 182 | connect(inprocessTasks, &QListWidget::itemPressed, this, &MainWindow::on_listWidget_itemClicked); 183 | connect(completeTasks, &QListWidget::itemPressed, this, &MainWindow::on_listWidget_itemClicked); 184 | 185 | connect(completeTasks, &QListWidget::itemDoubleClicked, this, [=](QListWidgetItem *item) { editTask(); }); 186 | 187 | connect(incompleteTasks, &QListWidget::itemDoubleClicked, this, [=](QListWidgetItem *item) { editTask(); }); 188 | 189 | connect(inprocessTasks, &QListWidget::itemDoubleClicked, this, [=](QListWidgetItem *item) { editTask(); }); 190 | 191 | connect(notStartedProjects, &QListWidget::itemDoubleClicked, this, [=](QListWidgetItem *item) { openProject(); }); 192 | connect(startedProjects, &QListWidget::itemDoubleClicked, this, [=](QListWidgetItem *item) { openProject(); }); 193 | connect(finishlineProjects, &QListWidget::itemDoubleClicked, this, [=](QListWidgetItem *item) { openProject(); }); 194 | connect(finishedProjects, &QListWidget::itemDoubleClicked, this, [=](QListWidgetItem *item) { openProject(); }); 195 | 196 | connect(setH1B, &QPushButton::clicked, this, &MainWindow::setH1); 197 | connect(setH2B, &QPushButton::clicked, this, &MainWindow::setH2); 198 | connect(setH3B, &QPushButton::clicked, this, &MainWindow::setH3); 199 | connect(setListB, &QPushButton::clicked, this, &MainWindow::setList); 200 | connect(setLinkB, &QPushButton::clicked, this, &MainWindow::setLink); 201 | connect(setBoldB, &QPushButton::clicked, this, &MainWindow::setBold); 202 | connect(setItalicB, &QPushButton::clicked, this, &MainWindow::setItalic); 203 | connect(setStrikeB, &QPushButton::clicked, this, &MainWindow::setStrike); 204 | connect(setTaskB, &QPushButton::clicked, this, &MainWindow::setTask); 205 | connect(setNumListB, &QPushButton::clicked, this, &MainWindow::setNumList); 206 | connect(setTableB, &QPushButton::clicked, this, &MainWindow::setTable); 207 | connect(setQuoteB, &QPushButton::clicked, this, &MainWindow::setQuote); 208 | 209 | connect(notesList, &QTreeView::doubleClicked, this, &MainWindow::onNoteDoubleClicked); 210 | 211 | connect(noteEdit, &QMarkdownTextEdit::textChanged, this, &MainWindow::saveNote); 212 | 213 | connect(notesList, &QTreeView::clicked, this, [=](const QModelIndex &index) { 214 | if (index.isValid()) 215 | { 216 | QDateTime lastModified = notesDirModel->data(index, Qt::UserRole + 1).toDateTime(); 217 | if (lastModified.isValid()) 218 | { 219 | QString toolTip = "Last modified: " + lastModified.toString(); 220 | notesList->setToolTip(toolTip); 221 | qDebug() << toolTip; 222 | } 223 | } 224 | }); 225 | 226 | connect(notesList, &QListWidget::customContextMenuRequested, this, 227 | [this](const QPoint &pos) { activateNotesContextMenu(pos, notesList); }); 228 | } 229 | 230 | void MainWindow::createShortcuts() 231 | { 232 | toFirstTab = new QShortcut(QKeySequence(Qt::ALT + Qt::Key_1), this); 233 | toSecondTab = new QShortcut(QKeySequence(Qt::ALT + Qt::Key_2), this); 234 | toThirdTab = new QShortcut(QKeySequence(Qt::ALT + Qt::Key_3), this); 235 | toFourthTab = new QShortcut(QKeySequence(Qt::ALT + Qt::Key_4), this); 236 | 237 | openCommandPalette = new QShortcut(QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_P), this); 238 | 239 | openSettingsWindowQS = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_P), this); 240 | 241 | hideMenuQS = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_M), this); 242 | } 243 | -------------------------------------------------------------------------------- /src/CodeKeeper/keeperFunc/commandsFunc.cpp: -------------------------------------------------------------------------------- 1 | void CommandPalette::getSettingsData() 2 | { 3 | selectedFont = globalSettings->value("font").value(); 4 | font_size = globalSettings->value("fontSize").value(); 5 | } 6 | 7 | void CommandPalette::setWindowSize() 8 | { 9 | MainWindow *mainWindow = qobject_cast(this->parent()); 10 | int width = mainWindow->width(); 11 | if (width < 1920) 12 | { 13 | width = width - 200; 14 | } 15 | if (width > 1920) 16 | { 17 | width = 1500; 18 | } 19 | 20 | int height = 400; 21 | 22 | setFixedSize(width, height); 23 | qDebug() << "Set commands window size"; 24 | } 25 | 26 | void CommandPalette::setWindowPosition() 27 | { 28 | QThread *commandsWindowThread = new QThread; 29 | QObject::connect(commandsWindowThread, &QThread::started, this, [this]() { 30 | MainWindow *mainWindow = qobject_cast(this->parent()); 31 | QRect geo = mainWindow->geometry(); 32 | int x = geo.x(); 33 | int y = geo.y(); 34 | int width = geo.width(); 35 | int height = geo.height(); 36 | 37 | QRect geo2 = this->geometry(); 38 | 39 | int width2 = geo2.width(); 40 | int height2 = geo2.height(); 41 | 42 | int new_x = x + (width - width2) / 2; 43 | int new_y = y + (height - height2) / 4; 44 | 45 | this->move(new_x, new_y); 46 | 47 | qDebug() << "Set commands window position"; 48 | }); 49 | commandsWindowThread->start(); 50 | } 51 | 52 | void CommandPalette::filterList(const QString &text) 53 | { 54 | for (int i = 0; i < listItems->count(); ++i) 55 | { 56 | QListWidgetItem *item = listItems->item(i); 57 | item->setHidden(!item->text().contains(text, Qt::CaseInsensitive)); 58 | } 59 | } 60 | 61 | void CommandPalette::activateCommand(QListWidgetItem *item) 62 | { 63 | MainWindow *mainWindow = static_cast(parent()); 64 | SettingsWindow *settingsWindow = static_cast(parent()); 65 | 66 | if (item == settingsItem) 67 | { 68 | qDebug() << "Run settings action"; 69 | mainWindow->openSettingsWindow(); 70 | } 71 | else if (item == syncItem) 72 | { 73 | qDebug() << "Run sync action"; 74 | mainWindow->openSyncWindow(); 75 | } 76 | else if (item == helpItem) 77 | { 78 | qDebug() << "Run help action"; 79 | QDesktopServices::openUrl(QUrl("https://github.com/Nighty3098/CodeKeeper/wiki")); 80 | } 81 | else if (item == aboutItem) 82 | { 83 | qDebug() << "Run about action"; 84 | QDesktopServices::openUrl(QUrl("https://github.com/Nighty3098/CodeKeeper")); 85 | } 86 | else if (item == clearAllDataItem) 87 | { 88 | qDebug() << "Run rm_data action"; 89 | mainWindow->deleteAllData(); 90 | } 91 | else if (item == userProfileItem) 92 | { 93 | qDebug() << "Run account action"; 94 | mainWindow->fOpenAccountWindow(); 95 | } 96 | else if (item == hideMenuItem) 97 | { 98 | qDebug() << "Run hide menu action"; 99 | mainWindow->hideMenu(); 100 | } 101 | 102 | this->close(); 103 | } 104 | -------------------------------------------------------------------------------- /src/CodeKeeper/keeperFunc/createMenu.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | void MainWindow::createTrayMenu(QMenu *menu, QString font_size) 4 | { 5 | closeAppA = menu->addAction( 6 | changeIconColor(QPixmap(":/quit.png")) 7 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 8 | tr("Exit"), this, [=]() { this->close(); }); 9 | closeAppA = menu->addAction( 10 | changeIconColor(QPixmap(":/task.png")) 11 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 12 | tr("Open tasks"), this, [=]() { 13 | tabs->setCurrentIndex(2); 14 | windowTitle->setText(" ~ Tasks ~ "); 15 | setWindowTitle(tr("Tasks")); 16 | }); 17 | closeAppA = menu->addAction( 18 | changeIconColor(QPixmap(":/project.png")) 19 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 20 | tr("Open projects"), this, [=]() { 21 | tabs->setCurrentIndex(3); 22 | windowTitle->setText(" ~ Projects ~ "); 23 | setWindowTitle(tr("Projects")); 24 | }); 25 | closeAppA = menu->addAction( 26 | changeIconColor(QPixmap(":/document.png")) 27 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 28 | tr("Open notes"), this, [=]() { 29 | tabs->setCurrentIndex(1); 30 | windowTitle->setText(" ~ Notes ~ "); 31 | setWindowTitle(tr("Notes")); 32 | }); 33 | } 34 | 35 | void MainWindow::createNotesMenu(QMenu *menu, QString font_size) 36 | { 37 | newNote = menu->addAction( 38 | changeIconColor(QPixmap(":/new.png")) 39 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 40 | tr("New Note"), this, SLOT(createNote()), QKeySequence(Qt::CTRL + Qt::Key_N)); 41 | rmNote = menu->addAction( 42 | changeIconColor(QPixmap(":/delete.png")) 43 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 44 | tr("Remove"), this, SLOT(removeNote()), QKeySequence(Qt::CTRL + Qt::Key_Delete)); 45 | newFolder = menu->addAction( 46 | changeIconColor(QPixmap(":/new_folder.png")) 47 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 48 | tr("New folder"), this, SLOT(createFolder()), QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_N)); 49 | renameItemA = menu->addAction( 50 | changeIconColor(QPixmap(":/rename.png")) 51 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 52 | tr("Rename"), this, SLOT(renameItem()), QKeySequence(Qt::Key_F2)); 53 | 54 | menu->addSeparator(); 55 | 56 | expandAllA = menu->addAction( 57 | changeIconColor(QPixmap(":/expand.png")) 58 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 59 | tr("Expand on one stage"), [this]() { notesList->expandAll(); }, QKeySequence(Qt::CTRL + Qt::Key_E)); 60 | 61 | menu->addSeparator(); 62 | 63 | QMenu *editMenu = new QMenu(tr("Edit"), menu); 64 | editMenu->setIcon( 65 | changeIconColor(QPixmap(":/edit.png")) 66 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation)); 67 | setH1A = editMenu->addAction( 68 | changeIconColor(QPixmap(":/h1.png")) 69 | .scaled(font_size.toInt() + 5, font_size.toInt() + 5, Qt::KeepAspectRatio, Qt::SmoothTransformation), 70 | tr("Set H1"), this, SLOT(setH1())); 71 | setH2A = editMenu->addAction( 72 | changeIconColor(QPixmap(":/h2.png")) 73 | .scaled(font_size.toInt() + 5, font_size.toInt() + 5, Qt::KeepAspectRatio, Qt::SmoothTransformation), 74 | tr("Set H2"), this, SLOT(setH2())); 75 | setH3A = editMenu->addAction( 76 | changeIconColor(QPixmap(":/h3.png")) 77 | .scaled(font_size.toInt() + 5, font_size.toInt() + 5, Qt::KeepAspectRatio, Qt::SmoothTransformation), 78 | tr("Set H3"), this, SLOT(setH3())); 79 | editMenu->addSeparator(); 80 | setQuoteA = editMenu->addAction( 81 | changeIconColor(QPixmap(":/quote.png")) 82 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 83 | tr("Add quote"), this, SLOT(setQuote())); 84 | setListA = editMenu->addAction( 85 | changeIconColor(QPixmap(":/list.png")) 86 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 87 | tr("Add list item"), this, SLOT(setList())); 88 | setNumListA = editMenu->addAction( 89 | changeIconColor(QPixmap(":/numList.png")) 90 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 91 | tr("Add numbered list"), this, SLOT(setNumList())); 92 | setLinkA = editMenu->addAction( 93 | changeIconColor(QPixmap(":/link.png")) 94 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 95 | tr("Add link"), this, SLOT(setLink())); 96 | setTaskA = editMenu->addAction( 97 | changeIconColor(QPixmap(":/checkbox.png")) 98 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 99 | tr("Add task"), this, SLOT(setTask())); 100 | editMenu->addSeparator(); 101 | setBoldA = editMenu->addAction( 102 | changeIconColor(QPixmap(":/bold.png")) 103 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 104 | tr("Set bold"), this, SLOT(setBold())); 105 | setItalicA = editMenu->addAction( 106 | changeIconColor(QPixmap(":/italic.png")) 107 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 108 | tr("Set italic"), this, SLOT(setItalic())); 109 | setStrikeA = editMenu->addAction( 110 | changeIconColor(QPixmap(":/strikethrough.png")) 111 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 112 | tr("Set strikethrough"), this, SLOT(setStrike())); 113 | setTableA = editMenu->addAction( 114 | changeIconColor(QPixmap(":/table.png")) 115 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 116 | tr("Add table"), this, SLOT(setTable())); 117 | 118 | QMenu *sortMenu = new QMenu(tr("Sort by"), menu); 119 | sortMenu->setIcon( 120 | changeIconColor(QPixmap(":/sorting.png")) 121 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation)); 122 | nameAction = sortMenu->addAction(tr("Name"), this, SLOT(setSortByName())); 123 | dateAction = sortMenu->addAction(tr("Date"), this, SLOT(setSortByTime())); 124 | 125 | menu->addMenu(editMenu); 126 | menu->addMenu(sortMenu); 127 | } 128 | 129 | void MainWindow::createNotesContextMenu(QMenu *menu, QString font_size) 130 | { 131 | mRenameNoteA = menu->addAction( 132 | changeIconColor(QPixmap(":/edit.png")) 133 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 134 | tr("Rename"), this, SLOT(renameItem())); 135 | 136 | mDeleteItemA = menu->addAction( 137 | changeIconColor(QPixmap(":/delete.png")) 138 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 139 | tr("Remove"), this, SLOT(removeNote()), QKeySequence(Qt::Key_Delete)); 140 | } 141 | 142 | void MainWindow::createProjectMenu(QMenu *menu, QString font_size) 143 | { 144 | newProject = menu->addAction( 145 | changeIconColor(QPixmap(":/new.png")) 146 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 147 | tr("New"), this, SLOT(createProject()), QKeySequence(Qt::CTRL + Qt::Key_N)); 148 | rmProject = menu->addAction( 149 | changeIconColor(QPixmap(":/delete.png")) 150 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 151 | tr("Remove"), this, SLOT(removeProject()), QKeySequence(Qt::Key_Delete)); 152 | 153 | menu->addSeparator(); 154 | 155 | editProject = menu->addAction( 156 | changeIconColor(QPixmap(":/open.png")) 157 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 158 | tr("Open"), this, SLOT(openProject())); 159 | openProjectInGit = menu->addAction( 160 | changeIconColor(QPixmap(":/open.png")) 161 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 162 | tr("Open in git"), this, SLOT(openGitProject())); 163 | } 164 | 165 | void MainWindow::createTaskMenu(QMenu *menu, QString font_size) 166 | { 167 | addTaskA = menu->addAction( 168 | changeIconColor(QPixmap(":/new.png")) 169 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 170 | tr("Add task"), this, SLOT(addNewTask()), QKeySequence(Qt::Key_Return)); 171 | rmTaskA = menu->addAction( 172 | changeIconColor(QPixmap(":/delete.png")) 173 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 174 | tr("Delete task"), this, SLOT(removeTask()), QKeySequence(Qt::Key_Delete)); 175 | editTaskA = menu->addAction( 176 | changeIconColor(QPixmap(":/edit.png")) 177 | .scaled(font_size.toInt() + 1, font_size.toInt() + 1, Qt::KeepAspectRatio, Qt::SmoothTransformation), 178 | tr("Edit task"), this, SLOT(editTask())); 179 | } 180 | -------------------------------------------------------------------------------- /src/CodeKeeper/keeperFunc/getProjectInfo.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | QString formatFileSize(qint64 bytes) 4 | { 5 | static const char *suffixes[] = {"KB", "MB", "GB", "TB", "PB", "..."}; 6 | int index = 0; 7 | double size = bytes; 8 | 9 | while (size >= 1024 && index < 5) 10 | { 11 | size /= 1024; 12 | index++; 13 | } 14 | 15 | return QString::number(size, 'f', 2) + " " + suffixes[index]; 16 | } 17 | 18 | QString MainWindow::getRepositoryData(QString git_url, QTableWidget *table, QLabel *label) 19 | { 20 | QString prefix = "https://github.com/"; 21 | QString repo = git_url.replace(prefix, ""); 22 | QString repoData; 23 | 24 | QString name, description, createdAt, openIssues, forks, lang, stars, repoSize, license, totalDownloads, release, 25 | releaseDate, lastCommitS; 26 | 27 | QNetworkAccessManager *manager = new QNetworkAccessManager(this); 28 | 29 | QUrl url("https://api.github.com/repos/" + repo); 30 | 31 | QUrlQuery query; 32 | query.addQueryItem("login", git_user); 33 | url.setQuery(query); 34 | 35 | QNetworkRequest request(url); 36 | request.setHeader(QNetworkRequest::UserAgentHeader, "CodeKeeper"); 37 | request.setRawHeader("Authorization", ("Bearer " + git_token).toUtf8()); 38 | request.setRawHeader("X-GitHub-Api-Version", "2022-11-28"); 39 | request.setRawHeader("Accept", "application/vnd.github.v3+json"); 40 | 41 | QNetworkReply *reply = manager->get(request); 42 | QEventLoop loop; 43 | QObject::connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit); 44 | 45 | loop.exec(); 46 | 47 | if (reply->error()) 48 | { 49 | qWarning() << "Error:" << reply->errorString(); 50 | reply->deleteLater(); 51 | } 52 | 53 | QJsonDocument doc = QJsonDocument::fromJson(reply->readAll()); 54 | QJsonObject obj = doc.object(); 55 | // qDebug() << doc; 56 | 57 | name = obj["name"].toString(); 58 | 59 | description = obj["description"].toString(); 60 | 61 | createdAt = obj["created_at"].toString(); 62 | QDateTime createdDate = QDateTime::fromString(createdAt, Qt::ISODate); 63 | createdAt = createdDate.toString("dd MMM yyyy hh:mm"); 64 | 65 | openIssues = QString::number(obj["open_issues"].toInt()); 66 | 67 | forks = QString::number(obj["forks"].toInt()); 68 | 69 | stars = QString::number(obj["stargazers_count"].toInt()); 70 | 71 | qint64 size = obj["size"].toDouble(); 72 | repoSize = formatFileSize(size); 73 | 74 | if (obj.contains("license")) 75 | { 76 | QJsonObject licenseObj = obj["license"].toObject(); 77 | if (licenseObj.contains("name")) 78 | { 79 | license = licenseObj["name"].toString() + " "; 80 | } 81 | else 82 | { 83 | qDebug() << "License not found"; 84 | } 85 | } 86 | else 87 | { 88 | qDebug() << "License not found"; 89 | } 90 | 91 | QUrl commitUrl("https://api.github.com/repos/" + repo + "/commits"); 92 | commitUrl.setQuery(query); 93 | 94 | QNetworkRequest commitUrlRequest(commitUrl); 95 | commitUrlRequest.setHeader(QNetworkRequest::UserAgentHeader, "CodeKeeper"); 96 | commitUrlRequest.setRawHeader("Authorization", ("Bearer " + git_token).toUtf8()); 97 | commitUrlRequest.setRawHeader("X-GitHub-Api-Version", "2022-11-28"); 98 | commitUrlRequest.setRawHeader("Accept", "application/vnd.github.v3+json"); 99 | 100 | QNetworkReply *commitReply = manager->get(commitUrlRequest); 101 | QObject::connect(commitReply, &QNetworkReply::finished, &loop, &QEventLoop::quit); 102 | 103 | loop.exec(); 104 | 105 | if (commitReply->error()) 106 | { 107 | qWarning() << "Error:" << commitReply->errorString(); 108 | commitReply->deleteLater(); 109 | } 110 | 111 | QJsonDocument commitDoc = QJsonDocument::fromJson(commitReply->readAll()); 112 | QJsonObject commitObj = commitDoc.object(); 113 | QJsonArray commits = commitDoc.array(); 114 | // qDebug() << commitDoc; 115 | 116 | if (commits.isEmpty()) 117 | { 118 | qDebug() << "No commits found"; 119 | } 120 | 121 | QJsonObject lastCommit = commits.first().toObject(); 122 | QString dateStr = lastCommit["commit"].toObject()["author"].toObject()["date"].toString(); 123 | 124 | QDateTime lastCommitDate = QDateTime::fromString(dateStr, Qt::ISODate); 125 | 126 | lastCommitS = lastCommitDate.toString("dd MMM yyyy hh:mm"); 127 | 128 | QUrl releaseUrl("https://api.github.com/repos/" + repo + "/releases"); 129 | releaseUrl.setQuery(query); 130 | 131 | QNetworkRequest releaseUrlRequest(releaseUrl); 132 | releaseUrlRequest.setHeader(QNetworkRequest::UserAgentHeader, "CodeKeeper"); 133 | releaseUrlRequest.setRawHeader("Authorization", ("Bearer " + git_token).toUtf8()); 134 | releaseUrlRequest.setRawHeader("X-GitHub-Api-Version", "2022-11-28"); 135 | releaseUrlRequest.setRawHeader("Accept", "application/vnd.github.v3+json"); 136 | 137 | QNetworkReply *releaseReply = manager->get(releaseUrlRequest); 138 | QObject::connect(releaseReply, &QNetworkReply::finished, &loop, &QEventLoop::quit); 139 | 140 | loop.exec(); 141 | 142 | if (releaseReply->error()) 143 | { 144 | qWarning() << "Error:" << releaseReply->errorString(); 145 | releaseReply->deleteLater(); 146 | } 147 | 148 | QJsonDocument releaseDoc = QJsonDocument::fromJson(releaseReply->readAll()); 149 | QJsonArray releases = releaseDoc.array(); 150 | // qDebug() << releaseDoc; 151 | 152 | int iTotalDownloads = 0; 153 | for (const QJsonValue &release : releases) 154 | { 155 | QJsonObject releaseObj = release.toObject(); 156 | int downloads = releaseObj["assets"].toArray().at(0).toObject()["download_count"].toInt(); 157 | iTotalDownloads += downloads; 158 | } 159 | 160 | totalDownloads = QString::number(iTotalDownloads); 161 | 162 | // Release info 163 | QUrl releasesUrl("https://api.github.com/repos/" + repo + "/releases/latest"); 164 | releasesUrl.setQuery(query); 165 | 166 | QNetworkRequest releasesRequest(releasesUrl); 167 | releasesRequest.setHeader(QNetworkRequest::UserAgentHeader, "CodeKeeper"); 168 | releasesRequest.setRawHeader("Authorization", ("Bearer " + git_token).toUtf8()); 169 | releasesRequest.setRawHeader("X-GitHub-Api-Version", "2022-11-28"); 170 | releasesRequest.setRawHeader("Accept", "application/vnd.github.v3+json"); 171 | 172 | QNetworkReply *releasesReply = manager->get(releasesRequest); 173 | QObject::connect(releasesReply, &QNetworkReply::finished, &loop, &QEventLoop::quit); 174 | 175 | loop.exec(); 176 | 177 | if (releasesReply->error()) 178 | { 179 | qWarning() << "Error:" << releasesReply->errorString(); 180 | releasesReply->deleteLater(); 181 | } 182 | 183 | QJsonDocument releasesDoc = QJsonDocument::fromJson(releasesReply->readAll()); 184 | QJsonObject releasesObj = releasesDoc.object(); 185 | // qDebug() << releasesDoc; 186 | 187 | release = releasesObj["name"].toString(); 188 | 189 | dateStr = releasesObj["published_at"].toString(); 190 | 191 | QDateTime releaseDateT = QDateTime::fromString(dateStr, Qt::ISODate); 192 | releaseDate = releaseDateT.toString("dd MMM yyyy hh:mm"); 193 | 194 | releasesReply->deleteLater(); 195 | reply->deleteLater(); 196 | 197 | // get repo langs 198 | QUrl langUrl("https://api.github.com/repos/" + repo + "/languages"); 199 | langUrl.setQuery(query); 200 | 201 | QNetworkRequest langRequest(langUrl); 202 | langRequest.setHeader(QNetworkRequest::UserAgentHeader, "CodeKeeper"); 203 | langRequest.setRawHeader("Authorization", ("Bearer " + git_token).toUtf8()); 204 | langRequest.setRawHeader("X-GitHub-Api-Version", "2022-11-28"); 205 | langRequest.setRawHeader("Accept", "application/vnd.github.v3+json"); 206 | 207 | QNetworkReply *langReply = manager->get(langRequest); 208 | QObject::connect(langReply, &QNetworkReply::finished, &loop, &QEventLoop::quit); 209 | 210 | loop.exec(); 211 | 212 | if (langReply->error()) 213 | { 214 | qWarning() << "Error:" << langReply->errorString(); 215 | langReply->deleteLater(); 216 | } 217 | 218 | QJsonDocument langDoc = QJsonDocument::fromJson(langReply->readAll()); 219 | QJsonObject langObj = langDoc.object(); 220 | // qDebug() << langDoc; 221 | 222 | QString languages; 223 | for (const QString &lang : langObj.keys()) 224 | { 225 | if (!languages.isEmpty()) 226 | { 227 | languages += ", "; 228 | } 229 | languages += lang; 230 | } 231 | // working on table 232 | 233 | table->setRowCount(12); 234 | table->setColumnCount(2); 235 | table->setShowGrid(false); 236 | 237 | table->setColumnWidth(0, 255); 238 | table->setColumnWidth(1, 255); 239 | 240 | table->setRowHeight(0, 25); 241 | table->setRowHeight(1, 25); 242 | table->setRowHeight(3, 25); 243 | table->setRowHeight(4, 25); 244 | table->setRowHeight(5, 25); 245 | table->setRowHeight(6, 25); 246 | table->setRowHeight(7, 25); 247 | table->setRowHeight(8, 25); 248 | table->setRowHeight(9, 25); 249 | table->setRowHeight(10, 25); 250 | table->setRowHeight(11, 25); 251 | 252 | table->verticalHeader()->hide(); 253 | table->horizontalHeader()->hide(); 254 | 255 | table->setItem(0, 0, new QTableWidgetItem("Repo")); 256 | table->setItem(0, 1, new QTableWidgetItem(name)); 257 | table->item(0, 0)->setTextAlignment(Qt::AlignCenter); 258 | table->item(0, 1)->setTextAlignment(Qt::AlignCenter); 259 | 260 | QStringList dataList, textList; 261 | 262 | dataList << name; 263 | textList << tr("Repo"); 264 | 265 | if (isCreated) 266 | { 267 | textList << tr("Created at"); 268 | dataList << createdAt; 269 | } 270 | 271 | if (isIssue) 272 | { 273 | dataList << openIssues; 274 | textList << tr("Open issues"); 275 | } 276 | 277 | if (isForks) 278 | { 279 | dataList << forks; 280 | textList << tr("Forks"); 281 | } 282 | 283 | if (isLang) 284 | { 285 | dataList << languages; 286 | textList << tr("Lang"); 287 | } 288 | 289 | if (isStars) 290 | { 291 | dataList << stars; 292 | textList << tr("Stars"); 293 | } 294 | 295 | if (isRepoSize) 296 | { 297 | dataList << repoSize; 298 | textList << tr("Repo size"); 299 | } 300 | 301 | if (isLicense) 302 | { 303 | dataList << license; 304 | textList << tr("License"); 305 | } 306 | 307 | if (isLastCommit) 308 | { 309 | dataList << lastCommitS; 310 | textList << tr("Last commit"); 311 | } 312 | 313 | if (isDownloads) 314 | { 315 | dataList << totalDownloads; 316 | textList << tr("Downloads"); 317 | } 318 | 319 | if (isRelease) 320 | { 321 | dataList << release; 322 | textList << tr("Release"); 323 | } 324 | 325 | if (isReleaseDate) 326 | { 327 | dataList << releaseDate; 328 | textList << tr("Release at"); 329 | } 330 | 331 | description = description.left(30) + "..."; 332 | label->setText(name + " - " + description); 333 | 334 | for (int i = 0; i < dataList.count(); i++) 335 | { 336 | table->setItem(i, 0, new QTableWidgetItem(textList[i])); 337 | table->setItem(i, 1, new QTableWidgetItem(dataList[i])); 338 | table->item(i, 0)->setTextAlignment(Qt::AlignCenter); 339 | } 340 | 341 | for (int row = 0; row < table->rowCount(); ++row) 342 | { 343 | for (int col = 0; col < table->columnCount(); ++col) 344 | { 345 | QTableWidgetItem *item = table->item(row, col); 346 | if (item) 347 | { 348 | item->setFlags(item->flags() & ~Qt::ItemIsEditable); 349 | item->setTextAlignment(Qt::AlignCenter); 350 | } 351 | } 352 | } 353 | 354 | return repoData; 355 | } 356 | 357 | QString MainWindow::getProjectIssues(QString git_url) 358 | { 359 | int maxLength = 150; 360 | QString prefix = "https://github.com/"; 361 | QString repo = git_url.replace(prefix, ""); 362 | QString issuesData = ""; 365 | 366 | QUrl url("https://api.github.com/repos/" + repo + "/issues"); 367 | QNetworkRequest request(url); 368 | 369 | QNetworkAccessManager manager; 370 | QNetworkReply *reply = manager.get(request); 371 | 372 | request.setHeader(QNetworkRequest::UserAgentHeader, "CodeKeeper"); 373 | request.setRawHeader("Authorization", ("Bearer " + git_token).toUtf8()); 374 | request.setRawHeader("X-GitHub-Api-Version", "2022-11-28"); 375 | request.setRawHeader("Accept", "application/vnd.github.v3+json"); 376 | 377 | QEventLoop loop; 378 | QObject::connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit); 379 | 380 | loop.exec(); 381 | 382 | if (reply->error() == QNetworkReply::NoError) 383 | { 384 | QByteArray data = reply->readAll(); 385 | QJsonDocument json = QJsonDocument::fromJson(data); 386 | QJsonArray issues = json.array(); 387 | 388 | // qDebug() << json; 389 | 390 | foreach (const QJsonValue &issue, issues) 391 | { 392 | QJsonObject issueObject = issue.toObject(); 393 | QString title = issueObject["title"].toString(); 394 | QString body = issueObject["body"].toString(); 395 | QString creator = issueObject["user"].toObject()["login"].toString(); 396 | QString creatorUrl = issueObject["user"].toObject()["html_url"].toString(); 397 | QString shortBody = body.left(maxLength); 398 | QString link = issueObject["html_url"].toString(); 399 | 400 | QString dateStr = issueObject["created_at"].toString(); 401 | QDateTime createDate = QDateTime::fromString(dateStr, Qt::ISODate); 402 | QString date = createDate.toString("dd MMM yyyy hh:mm"); 403 | 404 | issuesData += "

- " 406 | "

" + 407 | title + 408 | "


Created by " + creator + " at " + date + "

" + shortBody + 412 | "

Open
"; 416 | } 417 | } 418 | else 419 | { 420 | qWarning() << "Error: " << reply->errorString(); 421 | } 422 | reply->deleteLater(); 423 | 424 | issuesData += ""; 425 | 426 | qDebug() << issuesData; 427 | return issuesData; 428 | } 429 | -------------------------------------------------------------------------------- /src/CodeKeeper/keeperFunc/notesFunc.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | QModelIndex indexFromItem(QTreeWidgetItem *item, int column) 5 | { 6 | } 7 | 8 | bool createFile(const QString &path) 9 | { 10 | QFile file(path); 11 | if (file.open(QIODevice::WriteOnly)) 12 | { 13 | QTextStream stream(&file); 14 | stream << "Just start typing..."; 15 | file.close(); 16 | qDebug() << "File created successfully at " << path; 17 | return true; 18 | } 19 | else 20 | { 21 | qWarning() << "Failed to create file at " << path << " : " << file.errorString(); 22 | return false; 23 | } 24 | } 25 | 26 | void MainWindow::activateNotesContextMenu(const QPoint &pos, notesTree *notesList) 27 | { 28 | QPoint item = notesList->mapToGlobal(pos); 29 | QMenu *submenu = new QMenu; 30 | 31 | if (isCustomTheme) 32 | { 33 | submenu->setStyleSheet("QMenu {" 34 | " background-color: #2b3d4c;" 35 | " color: #fff;" 36 | " border: 1px solid #fff;" 37 | " border-radius: 10px;" 38 | "}" 39 | "QMenu::separator {" 40 | " height: 3px;" 41 | " border-radius: 1px;" 42 | " background-color: #fff;" 43 | "}" 44 | "QMenu::item {" 45 | " border-radius: 0px;" 46 | " color: #fff;" 47 | " margin: 5px 10px;" 48 | "}" 49 | "QMenu::item:selected {" 50 | " border-radius: 10px;" 51 | " color: #78b3ba;" 52 | " text-decoration: none;" 53 | "}"); 54 | } 55 | else 56 | { 57 | } 58 | 59 | createNotesContextMenu(submenu, font_size); 60 | 61 | QAction *rightClickItem = submenu->exec(item); 62 | } 63 | 64 | void MainWindow::loadNotes() 65 | { 66 | dir = globalSettings->value("path").value(); 67 | notesDirModel->setRootPath(dir); 68 | 69 | notesList->setAnimated(true); 70 | notesList->setWordWrap(true); 71 | notesList->setDragDropMode(QAbstractItemView::DragDrop); 72 | notesList->setDefaultDropAction(Qt::MoveAction); 73 | notesList->setDragEnabled(true); 74 | notesList->setMinimumWidth(100); 75 | notesList->setHeaderHidden(true); 76 | notesList->setColumnHidden(1, true); 77 | notesList->setSortingEnabled(true); 78 | notesList->setModel(notesDirModel); 79 | notesList->setRootIndex(notesDirModel->index(dir)); 80 | 81 | notesList->setColumnWidth(0, 297); 82 | notesList->setColumnHidden(1, true); 83 | notesList->setColumnHidden(2, true); 84 | notesList->setColumnHidden(3, true); 85 | notesList->setColumnHidden(4, true); 86 | } 87 | 88 | void MainWindow::setSortByTime() 89 | { 90 | notesList->sortByColumn(3, Qt::SortOrder()); 91 | } 92 | 93 | void MainWindow::setSortByName() 94 | { 95 | notesList->sortByColumn(0, Qt::SortOrder()); 96 | } 97 | 98 | void MainWindow::saveNote() 99 | { 100 | QModelIndex index = notesList->currentIndex(); 101 | if (index.isValid() && notesDirModel->fileInfo(index).isFile()) 102 | { 103 | QString filePath = notesDirModel->filePath(index); 104 | QString text = noteEdit->toPlainText(); 105 | 106 | QFile file(filePath); 107 | if (file.open(QIODevice::WriteOnly)) 108 | { 109 | QTextStream stream(&file); 110 | stream << text; 111 | file.close(); 112 | // ! qDebug() << "Success, Text written to file 113 | // successfully."; 114 | } 115 | else 116 | { 117 | qWarning() << "Error, Failed to open file for writing."; 118 | } 119 | } 120 | else 121 | { 122 | qWarning() << "Error, Please select a valid file."; 123 | } 124 | } 125 | 126 | void MainWindow::onNoteDoubleClicked() 127 | { 128 | QModelIndex index = notesList->currentIndex(); 129 | QString path_to_note = notesDirModel->filePath(index); 130 | 131 | QFile file(path_to_note); 132 | 133 | QRegularExpression re("(\\.md|\\.html|\\.txt)$"); 134 | if (notesDirModel->fileInfo(index).isFile()) 135 | { 136 | if (re.match(path_to_note).hasMatch()) 137 | { 138 | if (file.open(QIODevice::ReadWrite)) 139 | { 140 | qDebug() << path_to_note; 141 | QTextStream stream(&file); 142 | noteEdit->setPlainText(stream.readAll()); 143 | file.close(); 144 | } 145 | } 146 | else 147 | { 148 | noteEdit->setPlainText(tr("### File format not supported.")); 149 | qWarning() << "File format not supported"; 150 | } 151 | } 152 | } 153 | 154 | void MainWindow::hideNotesList() 155 | { 156 | notesList->setVisible(!notesList->isVisible()); 157 | globalSettings->setValue("isVisibleNotesList", notesList->isVisible()); 158 | } 159 | 160 | void MainWindow::setHeader() 161 | { 162 | QString text = noteEdit->toPlainText(); 163 | 164 | QStringList lines = text.split("\n"); 165 | QString sourceName = lines.first(); 166 | 167 | QString noteName = sourceName.mid(0, 40) + "..."; 168 | 169 | noteNameLabel->setText(noteName); 170 | } 171 | 172 | void MainWindow::toViewMode() 173 | { 174 | bool isView = noteEdit->isVisible(); 175 | 176 | setH1B->setVisible(!isView); 177 | setH2B->setVisible(!isView); 178 | setH3B->setVisible(!isView); 179 | setListB->setVisible(!isView); 180 | setLinkB->setVisible(!isView); 181 | setBoldB->setVisible(!isView); 182 | setItalicB->setVisible(!isView); 183 | setStrikeB->setVisible(!isView); 184 | setTaskB->setVisible(!isView); 185 | setNumListB->setVisible(!isView); 186 | setTableB->setVisible(!isView); 187 | setQuoteB->setVisible(!isView); 188 | 189 | notesList->setVisible(!isView); 190 | noteEdit->setVisible(!isView); 191 | 192 | showList->setChecked(!isView); 193 | tabs->setTabBarAutoHide(!isView); 194 | } 195 | 196 | void MainWindow::createFolder() 197 | { 198 | QModelIndex index = notesList->currentIndex(); 199 | 200 | if (index.isValid()) 201 | { 202 | QString name = QInputDialog::getText(this, tr("Name"), tr("Folder name")); 203 | if (!name.isEmpty()) 204 | { 205 | qDebug() << "🔸 Folder name:" << name; 206 | notesDirModel->mkdir(index, name); 207 | } 208 | } 209 | } 210 | 211 | void MainWindow::createNote() 212 | { 213 | QModelIndex index = notesList->currentIndex(); 214 | 215 | if (index.isValid()) 216 | { 217 | QString name = QInputDialog::getText(this, tr("Name"), tr("Note name")); 218 | if (!name.isEmpty()) 219 | { 220 | name = name + ".md"; 221 | QString path_to_note = notesDirModel->filePath(index) + "/" + name; 222 | qDebug() << "Note name:" << name; 223 | createFile(path_to_note); 224 | } 225 | } 226 | } 227 | 228 | void MainWindow::removeNote() 229 | { 230 | QModelIndex index = notesList->currentIndex(); 231 | if (index.isValid()) 232 | { 233 | if (notesDirModel->fileInfo(index).isDir()) 234 | { 235 | qDebug() << "Folder deleted successfully "; 236 | notesDirModel->rmdir(index); 237 | } 238 | else 239 | { 240 | qDebug() << "Note deleted successfully "; 241 | notesDirModel->remove(index); 242 | } 243 | } 244 | } 245 | 246 | void MainWindow::renameItem() 247 | { 248 | QItemSelectionModel *selectionModel = notesList->selectionModel(); 249 | QModelIndexList indexes = selectionModel->selectedIndexes(); 250 | 251 | if (indexes.isEmpty()) 252 | { 253 | // No items are selected 254 | return; 255 | } 256 | 257 | QModelIndex index = indexes.first(); 258 | QFileInfo fileInfo = notesDirModel->fileInfo(index); 259 | 260 | // Prompt the user to enter a new name 261 | bool ok; 262 | QString newName = QInputDialog::getText(notesList, tr("Rename File or Folder"), tr("Enter the new name:"), 263 | QLineEdit::Normal, fileInfo.baseName(), &ok); 264 | 265 | if (ok && !newName.isEmpty()) 266 | { 267 | // Get the new file path 268 | QString newFilePath = fileInfo.absoluteDir().absoluteFilePath(newName); 269 | 270 | // Rename the file or folder 271 | if (fileInfo.isFile()) 272 | { 273 | QFile file(fileInfo.absoluteFilePath()); 274 | if (file.rename(newFilePath)) 275 | { 276 | } 277 | } 278 | else if (fileInfo.isDir()) 279 | { 280 | QDir dir(fileInfo.absoluteFilePath()); 281 | if (dir.rename(fileInfo.absoluteFilePath(), newFilePath)) 282 | { 283 | } 284 | } 285 | } 286 | } 287 | 288 | void MainWindow::setH1() 289 | { 290 | QTextCursor cursor = noteEdit->textCursor(); 291 | int lineNumber = cursor.blockNumber(); 292 | QTextBlock block = noteEdit->document()->findBlockByNumber(lineNumber); 293 | 294 | cursor.movePosition(QTextCursor::StartOfLine); 295 | cursor.insertText("# "); 296 | 297 | noteEdit->setTextCursor(cursor); 298 | }; 299 | 300 | void MainWindow::setH2() 301 | { 302 | QTextCursor cursor = noteEdit->textCursor(); 303 | int lineNumber = cursor.blockNumber(); 304 | QTextBlock block = noteEdit->document()->findBlockByNumber(lineNumber); 305 | 306 | cursor.movePosition(QTextCursor::StartOfLine); 307 | cursor.insertText("## "); 308 | 309 | noteEdit->setTextCursor(cursor); 310 | }; 311 | 312 | void MainWindow::setH3() 313 | { 314 | QTextCursor cursor = noteEdit->textCursor(); 315 | int lineNumber = cursor.blockNumber(); 316 | QTextBlock block = noteEdit->document()->findBlockByNumber(lineNumber); 317 | 318 | cursor.movePosition(QTextCursor::StartOfLine); 319 | cursor.insertText("### "); 320 | 321 | noteEdit->setTextCursor(cursor); 322 | }; 323 | 324 | void MainWindow::setList() 325 | { 326 | QTextCursor cursor = noteEdit->textCursor(); 327 | int lineNumber = cursor.blockNumber(); 328 | QTextBlock block = noteEdit->document()->findBlockByNumber(lineNumber); 329 | 330 | cursor.movePosition(QTextCursor::StartOfLine); 331 | cursor.insertText(" - "); 332 | 333 | noteEdit->setTextCursor(cursor); 334 | }; 335 | 336 | void MainWindow::setNumList() 337 | { 338 | QTextCursor cursor = noteEdit->textCursor(); 339 | int lineNumber = cursor.blockNumber(); 340 | QTextBlock block = noteEdit->document()->findBlockByNumber(lineNumber); 341 | 342 | cursor.movePosition(QTextCursor::StartOfLine); 343 | cursor.insertText(" 1) "); 344 | 345 | noteEdit->setTextCursor(cursor); 346 | }; 347 | 348 | void MainWindow::setLink() 349 | { 350 | QTextCursor cursor = noteEdit->textCursor(); 351 | int lineNumber = cursor.blockNumber(); 352 | QTextBlock block = noteEdit->document()->findBlockByNumber(lineNumber); 353 | 354 | cursor.movePosition(QTextCursor::StartOfLine); 355 | cursor.insertText("[Link]("); 356 | 357 | cursor.movePosition(QTextCursor::EndOfLine); 358 | cursor.insertText(")"); 359 | 360 | noteEdit->setTextCursor(cursor); 361 | }; 362 | 363 | void MainWindow::setBold() 364 | { 365 | QTextCursor cursor = noteEdit->textCursor(); 366 | int lineNumber = cursor.blockNumber(); 367 | QTextBlock block = noteEdit->document()->findBlockByNumber(lineNumber); 368 | 369 | cursor.movePosition(QTextCursor::StartOfLine); 370 | cursor.insertText("**"); 371 | 372 | cursor.movePosition(QTextCursor::EndOfLine); 373 | cursor.insertText("**"); 374 | 375 | noteEdit->setTextCursor(cursor); 376 | } 377 | 378 | void MainWindow::setItalic() 379 | { 380 | QTextCursor cursor = noteEdit->textCursor(); 381 | int lineNumber = cursor.blockNumber(); 382 | QTextBlock block = noteEdit->document()->findBlockByNumber(lineNumber); 383 | 384 | cursor.movePosition(QTextCursor::StartOfLine); 385 | cursor.insertText("*"); 386 | 387 | cursor.movePosition(QTextCursor::EndOfLine); 388 | cursor.insertText("*"); 389 | 390 | noteEdit->setTextCursor(cursor); 391 | } 392 | 393 | void MainWindow::setStrike() 394 | { 395 | QTextCursor cursor = noteEdit->textCursor(); 396 | int lineNumber = cursor.blockNumber(); 397 | QTextBlock block = noteEdit->document()->findBlockByNumber(lineNumber); 398 | 399 | cursor.movePosition(QTextCursor::StartOfLine); 400 | cursor.insertText("~"); 401 | 402 | cursor.movePosition(QTextCursor::EndOfLine); 403 | cursor.insertText("~"); 404 | 405 | noteEdit->setTextCursor(cursor); 406 | } 407 | 408 | void MainWindow::setTask() 409 | { 410 | QTextCursor cursor = noteEdit->textCursor(); 411 | int lineNumber = cursor.blockNumber(); 412 | QTextBlock block = noteEdit->document()->findBlockByNumber(lineNumber); 413 | 414 | cursor.movePosition(QTextCursor::StartOfLine); 415 | cursor.insertText(" - [ ] - "); 416 | 417 | noteEdit->setTextCursor(cursor); 418 | } 419 | 420 | void MainWindow::setQuote() 421 | { 422 | QTextCursor cursor = noteEdit->textCursor(); 423 | int lineNumber = cursor.blockNumber(); 424 | QTextBlock block = noteEdit->document()->findBlockByNumber(lineNumber); 425 | 426 | cursor.movePosition(QTextCursor::StartOfLine); 427 | cursor.insertText(" > "); 428 | 429 | noteEdit->setTextCursor(cursor); 430 | } 431 | 432 | void MainWindow::setTable() 433 | { 434 | QTextCursor cursor = noteEdit->textCursor(); 435 | int lineNumber = cursor.blockNumber(); 436 | QTextBlock block = noteEdit->document()->findBlockByNumber(lineNumber); 437 | 438 | cursor.movePosition(QTextCursor::StartOfLine); 439 | cursor.insertText("\n" 440 | "\n" 441 | " \n" 442 | " \n" 443 | "\n\n" 444 | "\n" 445 | " \n" 446 | " \n" 447 | "\n" 448 | "
Column 1Column 2
Item 1Item 2
\n\n"); 449 | 450 | noteEdit->setTextCursor(cursor); 451 | } 452 | -------------------------------------------------------------------------------- /src/CodeKeeper/keeperFunc/tasksFunc.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | void MainWindow::activateTasksContextMenu(const QPoint &pos, QListWidget *listWidget) 4 | { 5 | QPoint item = listWidget->mapToGlobal(pos); 6 | QMenu *submenu = new QMenu(this); // Set parent to manage memory automatically 7 | if (isCustomTheme) 8 | { 9 | submenu->setStyleSheet("QMenu {" 10 | " background-color: #505a6a;" 11 | " color: #fff;" 12 | " border: 0px solid #fff;" 13 | " border-radius: 10px;" 14 | "}" 15 | "QMenu::separator {" 16 | " height: 3px;" 17 | " border-radius: 1px;" 18 | " background-color: #fff;" 19 | "}" 20 | "QMenu::item {" 21 | " border-radius: 0px;" 22 | " color: #fff;" 23 | " margin: 5px 10px;" 24 | "}" 25 | "QMenu::item:selected {" 26 | " border-radius: 10px;" 27 | " color: #78b3ba;" 28 | " text-decoration: none;" 29 | "}"); 30 | } 31 | createTaskMenu(submenu, font_size); 32 | QAction *rightClickItem = submenu->exec(item); 33 | } 34 | 35 | void MainWindow::onMovingTaskFrom(QListWidgetItem *item, QListWidget *list) 36 | { 37 | if (item && list) 38 | { 39 | qDebug() << "Moving task: " << item->text() << " from: " << list->objectName(); 40 | } 41 | } 42 | 43 | void MainWindow::onMovingTaskTo(QListWidgetItem *item, QListWidget *list) 44 | { 45 | if (item && list) 46 | { 47 | qDebug() << "Moved task: " << item->text() << " to: " << list->objectName(); 48 | QStringList data = item->text().split("\n――――――――――――――\n"); 49 | if (data.size() >= 2) 50 | { 51 | QString status = list->objectName(); 52 | QString cT = data[1]; 53 | updateTaskStatus(&data[0], &status, &cT); 54 | } 55 | else 56 | { 57 | qWarning() << "Invalid task data format"; 58 | } 59 | } 60 | } 61 | 62 | void MainWindow::addNewTask() 63 | { 64 | QString text = taskText->text(); 65 | if (!text.isEmpty()) 66 | { 67 | taskText->clear(); 68 | QString task = text + "\n――――――――――――――\n" + getCurrentDateTimeString(); 69 | qDebug() << "Added new task: " << task; 70 | incompleteTasks->addItem(task); 71 | QString status = incompleteTasks->objectName(); 72 | QString projectLink = projectsList->currentText(); 73 | if (projectLink.isEmpty()) 74 | { 75 | projectLink = "NULL"; 76 | } 77 | if (projectLink == "ALL") 78 | { 79 | projectLink = "NULL"; 80 | } 81 | saveTaskToDB(&task, &status, &projectLink); 82 | } 83 | else 84 | { 85 | qWarning() << "Task is empty"; 86 | } 87 | filterTasksByProject(projectsList); 88 | } 89 | 90 | void MainWindow::removeTask() 91 | { 92 | QList listWidgets = {incompleteTasks, inprocessTasks, completeTasks}; 93 | for (QListWidget *listWidget : listWidgets) 94 | { 95 | QListWidgetItem *item = listWidget->currentItem(); 96 | if (item) 97 | { 98 | QString task = item->text(); 99 | QString status = listWidget->objectName(); 100 | listWidget->takeItem(listWidget->row(item)); 101 | qDebug() << "Removed task: " << task; 102 | removeTaskFromDB(&task, &status); 103 | delete item; // Ensure item is deleted to free memory 104 | break; 105 | } 106 | } 107 | filterTasksByProject(projectList); 108 | } 109 | 110 | void MainWindow::getTotalTasks(QTabWidget *tasksTab, QListWidget *incompleteTasks, QListWidget *inprocessTasks, 111 | QListWidget *completeTasks) 112 | { 113 | if (tasksTab->currentIndex() == 2) 114 | { 115 | QTimer *timer3 = new QTimer(this); // Set parent to manage memory automatically 116 | connect(timer3, &QTimer::timeout, [=]() { 117 | int totalTasks = incompleteTasks->count() + inprocessTasks->count() + completeTasks->count(); 118 | tasksProgress->setFormat("Total tasks: " + QString::number(totalTasks) + " "); 119 | }); 120 | timer3->start(500); 121 | } 122 | } 123 | 124 | void MainWindow::updateTasksProgress(QTabWidget *tasksTab, QListWidget *incompleteTasks, QListWidget *inprocessTasks, 125 | QListWidget *completeTasks, QProgressBar *tasksProgress) 126 | { 127 | if (tasksTab->currentIndex() == 2) 128 | { 129 | QTimer *timer2 = new QTimer(this); // Set parent to manage memory automatically 130 | connect(timer2, &QTimer::timeout, [=]() { 131 | int totalTasks = incompleteTasks->count() + inprocessTasks->count() + completeTasks->count(); 132 | int completedTasks = completeTasks->count(); 133 | 134 | if (totalTasks == 0) 135 | { 136 | tasksProgress->setValue(0); 137 | } 138 | else 139 | { 140 | double percentage = static_cast(completedTasks) / static_cast(totalTasks) * 100.0; 141 | tasksProgress->setValue(percentage); 142 | } 143 | }); 144 | timer2->start(500); 145 | } 146 | } 147 | 148 | void MainWindow::loadProjectsList(QComboBox *projectList) 149 | { 150 | qDebug() << "Load projects list"; 151 | projectList->clear(); 152 | 153 | QStringList projectsStringList = getProjectsList(); 154 | 155 | for (const QString &project : projectsStringList) 156 | { 157 | projectList->addItem(project); 158 | } 159 | 160 | projectList->addItem("All"); 161 | } 162 | 163 | void MainWindow::filterTasksByProject(QComboBox *projectList) 164 | { 165 | qDebug() << "Activated: " << projectList->currentText(); 166 | 167 | QString selectedProject = projectList->currentText(); 168 | 169 | for (int i = 0; i < incompleteTasks->count(); ++i) 170 | { 171 | QListWidgetItem *item = incompleteTasks->item(i); 172 | QStringList task = item->text().split("\n――――――――――――――\n"); 173 | 174 | QString status = incompleteTasks->objectName(); 175 | QString projectLink = getProjectByTask(&task[0], &status); 176 | 177 | item->setHidden(selectedProject != "All" && projectLink != selectedProject); 178 | } 179 | 180 | for (int i = 0; i < inprocessTasks->count(); ++i) 181 | { 182 | QListWidgetItem *item = inprocessTasks->item(i); 183 | 184 | QStringList task = item->text().split("\n――――――――――――――\n"); 185 | 186 | QString status = inprocessTasks->objectName(); 187 | QString projectLink = getProjectByTask(&task[0], &status); 188 | 189 | item->setHidden(selectedProject != "All" && projectLink != selectedProject); 190 | } 191 | 192 | for (int i = 0; i < completeTasks->count(); ++i) 193 | { 194 | QListWidgetItem *item = completeTasks->item(i); 195 | 196 | QStringList task = item->text().split("\n――――――――――――――\n"); 197 | 198 | QString status = completeTasks->objectName(); 199 | QString projectLink = getProjectByTask(&task[0], &status); 200 | 201 | item->setHidden(selectedProject != "All" && projectLink != selectedProject); 202 | } 203 | } 204 | 205 | void MainWindow::editTask() 206 | { 207 | QListWidget *listWidgets[] = {incompleteTasks, inprocessTasks, completeTasks}; 208 | for (QListWidget *listWidget : listWidgets) 209 | { 210 | QListWidgetItem *item = listWidget->currentItem(); 211 | if (item) 212 | { 213 | qDebug() << font_size; 214 | QString oldText = item->text(); 215 | QStringList oldData = oldText.split("\n――――――――――――――\n"); 216 | 217 | QRect geo = this->geometry(); 218 | int x = geo.x(); 219 | int y = geo.y(); 220 | int width = geo.width(); 221 | int height = geo.height(); 222 | 223 | QDialog dialog(this); 224 | dialog.setMinimumSize(220, 250); 225 | dialog.setWindowTitle(tr("Edit task")); 226 | dialog.setWindowFlags(Qt::Window | Qt::FramelessWindowHint); 227 | 228 | QRect geo2 = dialog.geometry(); 229 | int width2 = geo2.width(); 230 | int height2 = geo2.height(); 231 | 232 | int new_x = x + (width - width2) / 2; 233 | int new_y = y + (height - height2) / 2; 234 | 235 | QVBoxLayout *layout = new QVBoxLayout(&dialog); 236 | QPlainTextEdit taskEdit(&dialog); 237 | taskEdit.setFont(selectedFont); 238 | taskEdit.setStyleSheet("font-size: " + font_size + "px;"); 239 | taskEdit.setMinimumSize(200, 100); 240 | taskEdit.setPlainText(oldData[0]); 241 | 242 | QComboBox *projectList = new QComboBox(&dialog); 243 | projectList->setPlaceholderText("Select project ..."); 244 | projectList->setFont(selectedFont); 245 | projectList->setStyleSheet("font-size: " + font_size + "px;"); 246 | projectList->setMinimumSize(200, 30); 247 | 248 | loadProjectsList(projectList); 249 | 250 | QString c_status = listWidget->objectName(); 251 | QString c_task = oldData[0]; 252 | 253 | QString projectLink = getProjectByTask(&c_task, &c_status); 254 | 255 | if (!projectLink.isEmpty() && projectLink != "NULL") 256 | { 257 | for (int i = 0; i < projectList->count(); ++i) 258 | { 259 | QString itemText = projectList->itemText(i); 260 | if (itemText == projectLink) 261 | { 262 | projectList->setCurrentIndex(i); 263 | } 264 | } 265 | } 266 | 267 | QPushButton okButton(QPixmap(":/save.png") 268 | .scaled(font_size.toInt() + 5, font_size.toInt() + 5, Qt::KeepAspectRatio, 269 | Qt::SmoothTransformation), 270 | tr(""), &dialog); 271 | okButton.setFont(selectedFont); 272 | okButton.setStyleSheet("font-size: " + font_size + "px;"); 273 | okButton.setMinimumSize(30, 30); 274 | 275 | QPushButton cancelButton(QPixmap(":/quit.png") 276 | .scaled(font_size.toInt() + 5, font_size.toInt() + 5, Qt::KeepAspectRatio, 277 | Qt::SmoothTransformation), 278 | tr(""), &dialog); 279 | cancelButton.setFont(selectedFont); 280 | cancelButton.setStyleSheet("font-size: " + font_size + "px;"); 281 | cancelButton.setMinimumSize(30, 30); 282 | 283 | layout->addWidget(projectList); 284 | layout->addWidget(&taskEdit); 285 | QHBoxLayout *buttonsLayout = new QHBoxLayout(); 286 | buttonsLayout->addWidget(&okButton); 287 | buttonsLayout->addWidget(&cancelButton); 288 | layout->addLayout(buttonsLayout); 289 | 290 | QObject::connect(&okButton, &QPushButton::clicked, [&]() { 291 | QString newText = taskEdit.toPlainText(); 292 | if (!newText.isEmpty()) 293 | { 294 | QString newTask = newText + "\n――――――――――――――\n" + getCurrentDateTimeString(); 295 | QString status = listWidget->objectName(); 296 | QString cT = oldData[1]; 297 | QString newProjectLink = projectList->currentText(); 298 | item->setText(newTask); 299 | updateTaskData(&newTask, &status, &cT, &newProjectLink); 300 | } 301 | dialog.close(); 302 | }); 303 | 304 | QObject::connect(&cancelButton, &QPushButton::clicked, [&]() { dialog.close(); }); 305 | 306 | dialog.exec(); 307 | dialog.move(new_x, new_y); 308 | 309 | break; 310 | } 311 | } 312 | } 313 | -------------------------------------------------------------------------------- /src/CodeKeeper/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "mainwindow.h" 8 | 9 | int main(int argc, char *argv[]) 10 | { 11 | QApplication a(argc, argv); 12 | 13 | qDebug() << "\n\n\n\e[1;31m"; 14 | qDebug() << " ▄████▄ ▒█████ ▓█████▄ ▓█████ ██ ▄█▀▓█████ ▓█████ ██▓███ ▓█████ ██▀███"; 15 | qDebug() << "▒██▀ ▀█ ▒██▒ ██▒▒██▀ ██▌▓█ ▀ ██▄█▒ ▓█ ▀ ▓█ ▀ ▓██░ ██▒▓█ ▀ ▓██ ▒ ██▒"; 16 | qDebug() << "▒▓█ ▄ ▒██░ ██▒░██ █▌▒███ ▓███▄░ ▒███ ▒███ ▓██░ ██▓▒▒███ ▓██ ░▄█ ▒"; 17 | qDebug() << "▒▓▓▄ ▄██▒▒██ ██░░▓█▄ ▌▒▓█ ▄ ▓██ █▄ ▒▓█ ▄ ▒▓█ ▄ ▒██▄█▓▒ ▒▒▓█ ▄ ▒██▀▀█▄"; 18 | qDebug() << "▒ ▓███▀ ░░ ████▓▒░░▒████▓ ░▒████▒▒██▒ █▄░▒████▒░▒████▒▒██▒ ░ ░░▒████▒░██▓ ▒██▒"; 19 | qDebug() << "░ ░▒ ▒ ░░ ▒░▒░▒░ ▒▒▓ ▒ ░░ ▒░ ░▒ ▒▒ ▓▒░░ ▒░ ░░░ ▒░ ░▒▓▒░ ░ ░░░ ▒░ ░░ ▒▓ ░▒▓░"; 20 | qDebug() << " ░ ▒ ░ ▒ ▒░ ░ ▒ ▒ ░ ░ ░░ ░▒ ▒░ ░ ░ ░ ░ ░ ░░▒ ░ ░ ░ ░ ░▒ ░ ▒░"; 21 | qDebug() << "░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░░ ░ ░ ░ ░░ ░ ░░ ░"; 22 | qDebug() << "░ ░ ░ ░ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ░"; 23 | qDebug() << "░ ░\n\n"; 24 | qDebug() << " Created by Nighty3098"; 25 | qDebug() << " Copyright © 2024. All rights reserved."; 26 | qDebug() << "\e[0m"; 27 | 28 | QSettings *globalSettings = new QSettings("CodeKeeper", "CodeKeeper"); 29 | int appLang = globalSettings->value("lang").value(); 30 | 31 | QTranslator translator; 32 | if (appLang == 1) 33 | { 34 | QString file = ":/CodeKeeper_ru_RU.ts"; 35 | qDebug() << "Loading " << file; 36 | translator.load(file); 37 | } 38 | if (appLang == 0) 39 | { 40 | qDebug() << "Loading " 41 | << "English"; 42 | } 43 | if (appLang == 2) 44 | { 45 | qDebug() << "Loading " 46 | << "Japanese"; 47 | } 48 | if (appLang == 3) 49 | { 50 | qDebug() << "Loading " 51 | << "Germany"; 52 | } 53 | if (appLang == 4) 54 | { 55 | qDebug() << "Loading " 56 | << "Spanish"; 57 | } 58 | qApp->installTranslator(&translator); 59 | 60 | MainWindow keeper; 61 | keeper.setWindowIcon(QIcon(":/icon.png")); 62 | keeper.setMinimumSize(900, 700); 63 | keeper.show(); 64 | 65 | return a.exec(); 66 | } 67 | -------------------------------------------------------------------------------- /src/CodeKeeper/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #include "3rdParty/qmarkdowntextedit/qmarkdowntextedit.h" 21 | #include "accountwindow.h" 22 | #include "commandPalette.h" 23 | #include "custom/clickableLabel/clickableLabel.h" 24 | #include "settingswindow.h" 25 | #include "syncwindow.h" 26 | 27 | class notesTree : public QTreeView 28 | { 29 | protected: 30 | }; 31 | 32 | // Not working !!!! WTF !!!! 33 | class NoteEditor : public QMarkdownTextEdit 34 | { 35 | Q_OBJECT 36 | 37 | public: 38 | NoteEditor(QWidget *parent = nullptr) : QMarkdownTextEdit(parent) 39 | { 40 | setAcceptDrops(true); 41 | } 42 | 43 | protected: 44 | void dragEnterEvent(QDragEnterEvent *event) override 45 | { 46 | if (event->mimeData()->hasUrls()) 47 | { 48 | event->acceptProposedAction(); 49 | } 50 | } 51 | 52 | void dropEvent(QDropEvent *event) override 53 | { 54 | if (event->mimeData()->hasUrls()) 55 | { 56 | QStringList filePaths; 57 | foreach (const QUrl &url, event->mimeData()->urls()) 58 | { 59 | filePaths << url.toLocalFile(); 60 | } 61 | insertPlainText(filePaths.join("\n")); 62 | 63 | QTextCursor cursor = textCursor(); 64 | cursor.movePosition(QTextCursor::End); 65 | setTextCursor(cursor); 66 | 67 | event->acceptProposedAction(); 68 | } 69 | } 70 | }; 71 | 72 | class MainWindow : public QMainWindow 73 | { 74 | Q_OBJECT 75 | 76 | public: 77 | QSettings *globalSettings; 78 | 79 | NoteEditor *noteEdit; 80 | notesTree *notesList; 81 | 82 | QFileSystemModel *notesDirModel; 83 | QFileSystemModel *noteFileModel; 84 | 85 | QTabWidget *tabs; 86 | 87 | void loadStyleSheetFile(); 88 | QPixmap changeIconColor(QPixmap pixmap); 89 | 90 | void openSyncWindow(); 91 | void openSettingsWindow(); 92 | void fOpenAccountWindow(); 93 | void deleteAllData(); 94 | void hideMenu(); 95 | 96 | void setSettingsData(); 97 | void getSettingsData(); 98 | 99 | void createCustomTitlebar(); 100 | void setConnectionStatus(); 101 | 102 | void setStyle(QFont *selectedFont, int *font_size_int); 103 | void loadNotes(); 104 | void loadProjects(); 105 | void loadTasks(); 106 | 107 | bool createConnection(QString path); 108 | void createConnects(); 109 | void createShortcuts(); 110 | 111 | void activateProjectContextMenu(const QPoint &pos, QListWidget *listWidget); 112 | void activateTasksContextMenu(const QPoint &pos, QListWidget *listWidget); 113 | void activateNotesContextMenu(const QPoint &pos, notesTree *notesList); 114 | 115 | QStringList getAllReposUrl(); 116 | 117 | QMarkdownTextEdit *note; 118 | 119 | QListWidget *incompleteTasks; 120 | QListWidget *inprocessTasks; 121 | QListWidget *completeTasks; 122 | 123 | QListWidget *notStartedProjects; 124 | QListWidget *startedProjects; 125 | QListWidget *finishedProjects; 126 | QListWidget *finishlineProjects; 127 | 128 | MainWindow(QWidget *parent = nullptr); 129 | ~MainWindow(); 130 | 131 | bool isVisibleNotesList; 132 | bool isViewMode; 133 | bool isVisiblePreview; 134 | bool isVisibleFolders; 135 | bool isAutoSyncB; 136 | bool isCustomTitlebar; 137 | int sortNotesRole; 138 | bool isAutoSyncing; 139 | bool isCustomTheme; 140 | bool isCreated; 141 | bool isReleaseDate; 142 | bool isLastCommit; 143 | bool isPullReq; 144 | bool isLicense; 145 | bool isRelease; 146 | bool isIssue; 147 | bool isDownloads; 148 | bool isCommit; 149 | bool isLang; 150 | bool isStars; 151 | bool isForks; 152 | bool isRepoSize; 153 | bool isAutoCheckUpdates; 154 | 155 | QString git_repo; 156 | QString git_user; 157 | QString git_token; 158 | 159 | bool firstRun; 160 | 161 | QString dir; 162 | QFont selectedFont; 163 | QString font_size; 164 | int theme; 165 | int appLang; 166 | 167 | QComboBox *projectList; 168 | 169 | private slots: 170 | 171 | void updateButtonStyles(QPushButton *activeButton); 172 | void setupAdaptiveUI(); 173 | 174 | void iconActivated(QSystemTrayIcon::ActivationReason reason); 175 | 176 | QString getRepositoryData(QString git_url, QTableWidget *table, QLabel *label); 177 | QString getProjectIssues(QString git_url); 178 | 179 | void openFolder(); 180 | void showWelcomeMessage(); 181 | 182 | void selectFileInQTreeView(QTreeView *treeView, const QString &fileName); 183 | 184 | void hideNotesList(); 185 | void setHeader(); 186 | void createNote(); 187 | void removeNote(); 188 | void saveNote(); 189 | void toViewMode(); 190 | void createFolder(); 191 | void renameItem(); 192 | 193 | void removeTaskFromDB(QString *task, QString *status); 194 | void saveTaskToDB(QString *task, QString *status, QString *projectLink); 195 | void addNewTask(); 196 | void removeTask(); 197 | 198 | void on_listWidget_itemClicked(QListWidgetItem *item); 199 | void editTask(); 200 | void onNoteDoubleClicked(); 201 | void updateTasksProgress(QTabWidget *tasksTab, QListWidget *incompleteTasks, QListWidget *inprocessTasks, 202 | QListWidget *completeTasks, QProgressBar *tasksProgress); 203 | 204 | void getTotalTasks(QTabWidget *tasksTab, QListWidget *incompleteTasks, QListWidget *inprocessTasks, 205 | QListWidget *completeTasks); 206 | 207 | void getTotalProjects(QTabWidget *tasksTab, QListWidget *notStartedProjects, QListWidget *startedProjects, 208 | QListWidget *finishedProjects, QListWidget *finishlineProjects); 209 | 210 | void openProject(); 211 | void openGitProject(); 212 | 213 | void createProject(); 214 | void removeProject(); 215 | 216 | void setH1(); 217 | void setH2(); 218 | void setH3(); 219 | void setList(); 220 | void setLink(); 221 | void setNumList(); 222 | void setBold(); 223 | void setItalic(); 224 | void setStrike(); 225 | void setTask(); 226 | void setTable(); 227 | void setQuote(); 228 | 229 | void setSortByTime(); 230 | void setSortByName(); 231 | 232 | void updateWindowTitle(); 233 | 234 | QString getCurrentDateTimeString(); 235 | 236 | void create_tasks_connection(); 237 | void create_projects_connection(); 238 | 239 | void updateTaskStatus(QString *task, QString *status, QString *cT); 240 | void updateTaskData(QString *task, QString *status, QString *cT, QString *projectLink); 241 | void onMovingTaskFrom(QListWidgetItem *item, QListWidget *list); 242 | void onMovingTaskTo(QListWidgetItem *item, QListWidget *list); 243 | 244 | QStringList GetProjectData(QString *title, QString *status, QString *git_url); 245 | void updateProjectStatus(QString *status, QString *createdTime, QString *oldTime); 246 | void removeProjectFromDB(QString *git_url, QString *status, QString *createdTime); 247 | void saveProjectToDB(QString *title, QString *git_url, QString *status, QString *createdTime); 248 | void updateProjectData(QString *title, QString *git_url, QString *doc, QString *createdTime, QString *oldTime, 249 | QString *oldGit); 250 | void onMovingProjectFrom(QListWidgetItem *item, QListWidget *list); 251 | void onMovingProjectTo(QListWidgetItem *item, QListWidget *list); 252 | 253 | bool checkConnection(); 254 | void updateTime(); 255 | 256 | void createNotesMenu(QMenu *menu, QString font_size); 257 | void createProjectMenu(QMenu *menu, QString font_size); 258 | void createTaskMenu(QMenu *menu, QString font_size); 259 | void createTrayMenu(QMenu *menu, QString font_size); 260 | void createNotesContextMenu(QMenu *menu, QString font_size); 261 | 262 | void filterTasksByProject(QComboBox *projectList); 263 | void loadProjectsList(QComboBox *projectList); 264 | QString getProjectByTask(QString *task, QString *status); 265 | 266 | QStringList getProjectsList(); 267 | 268 | protected: 269 | void resizeEvent(QResizeEvent *event) override 270 | { 271 | QMainWindow::resizeEvent(event); 272 | setupAdaptiveUI(); 273 | } 274 | 275 | void mousePressEvent(QMouseEvent *event) override 276 | { 277 | if (event->button() == Qt::LeftButton) 278 | { 279 | m_dragPosition = event->globalPos() - frameGeometry().topLeft(); 280 | event->accept(); 281 | } 282 | else 283 | { 284 | QMainWindow::mousePressEvent(event); 285 | } 286 | } 287 | 288 | void mouseMoveEvent(QMouseEvent *event) override 289 | { 290 | if (event->buttons() & Qt::LeftButton) 291 | { 292 | move(event->globalPos() - m_dragPosition); 293 | event->accept(); 294 | } 295 | else 296 | { 297 | QMainWindow::mouseMoveEvent(event); 298 | } 299 | } 300 | 301 | private: 302 | QSystemTrayIcon *trayIcon; 303 | 304 | QWidget *winControlW; 305 | QWidget *tabButtonsWidget; 306 | QVBoxLayout *tabButtons; 307 | QShortcut *hideMenuQS; 308 | bool isHideMenu; 309 | 310 | // shortcuts 311 | QShortcut *toFirstTab; 312 | QShortcut *toSecondTab; 313 | QShortcut *toThirdTab; 314 | QShortcut *toFourthTab; 315 | QShortcut *openSettingsWindowQS; 316 | 317 | // other 318 | QLabel *windowTitle; 319 | QLabel *verLabel; 320 | QWidget *centralWidget; 321 | QGridLayout *mainLayout; 322 | QHBoxLayout *winControlL; 323 | 324 | QSizeGrip *sizeGrip; 325 | 326 | QLabel *timeLabel; 327 | QLabel *dateLabel; 328 | QLabel *helloLabel; 329 | QLabel *decorationLabel; 330 | 331 | QPushButton *maximizeBtn; 332 | QPushButton *closeBtn; 333 | QPushButton *minimizeBtn; 334 | 335 | QPushButton *isAutoSync; 336 | QPushButton *isConnected; 337 | 338 | bool isFullScreen; 339 | QPoint m_dragPosition; 340 | 341 | // ======================================================== 342 | // main tab 343 | QPushButton *syncDataBtn; 344 | QPushButton *openSettingsBtn; 345 | QPushButton *openAccountWindow; 346 | 347 | // ======================================================== 348 | // notes tab 349 | MarkdownHighlighter *highlighter; 350 | QToolButton *menuButton; 351 | QLabel *noteNameLabel; 352 | 353 | QPushButton *setH1B; 354 | QPushButton *setH2B; 355 | QPushButton *setH3B; 356 | QPushButton *setListB; 357 | QPushButton *setLinkB; 358 | QPushButton *setBoldB; 359 | QPushButton *setItalicB; 360 | QPushButton *setStrikeB; 361 | QPushButton *setTaskB; 362 | QPushButton *setNumListB; 363 | QPushButton *setTableB; 364 | QPushButton *setQuoteB; 365 | 366 | // ======================================================== 367 | // tasks tab 368 | 369 | QWidget *inprocessWidget; 370 | QWidget *incompleteWidget; 371 | QWidget *completeWidget; 372 | 373 | QProgressBar *tasksProgress; 374 | QToolButton *tasksMenuBtn; 375 | QSplitter *tasksSplitter; 376 | 377 | ClickableLabel *label_1; 378 | ClickableLabel *label_2; 379 | ClickableLabel *label_3; 380 | 381 | QLineEdit *taskText; 382 | QComboBox *projectsList; 383 | 384 | // ======================================================== 385 | 386 | QPushButton *mainTabButton; 387 | QPushButton *tasksTabButton; 388 | QPushButton *notesTabButton; 389 | QPushButton *projectsTabButton; 390 | 391 | // ======================================================== 392 | // projects tab 393 | QLabel *projectsMainLabel; 394 | QToolButton *projectsMenuButton; 395 | 396 | QLabel *totalProjectsL; 397 | QLabel *fProjects; 398 | QLabel *flProjects; 399 | QLabel *sProjects; 400 | QLabel *nsProjects; 401 | 402 | QAction *newNote; 403 | QAction *rmNote; 404 | QAction *expandAllA; 405 | QAction *renameItemA; 406 | QAction *newFolder; 407 | QAction *showList; 408 | 409 | QAction *nameAction; 410 | QAction *dateAction; 411 | 412 | QAction *addTaskA; 413 | QAction *rmTaskA; 414 | QAction *editTaskA; 415 | 416 | QAction *newProject; 417 | QAction *openProjectInGit; 418 | QAction *rmProject; 419 | QAction *editProject; 420 | 421 | QAction *setH1A; 422 | QAction *setH2A; 423 | QAction *setH3A; 424 | QAction *setListA; 425 | QAction *setLinkA; 426 | QAction *setTaskA; 427 | QAction *setBoldA; 428 | QAction *setItalicA; 429 | QAction *setStrikeA; 430 | QAction *setNumListA; 431 | QAction *setTableA; 432 | QAction *setQuoteA; 433 | 434 | QAction *mRenameNoteA; 435 | QAction *mDeleteItemA; 436 | 437 | QAction *closeAppA; 438 | QAction *openNotesA; 439 | QAction *openProjectsA; 440 | QAction *openTasksA; 441 | 442 | QShortcut *openCommandPalette; 443 | 444 | QMenu *menu; 445 | QMenu *tasksMenu; 446 | QMenu *projectsMenu; 447 | 448 | AccountWindow *accountWindow; 449 | SettingsWindow *settingsWindow; 450 | SyncWindow *syncWindow; 451 | CommandPalette *commandPalette; 452 | }; 453 | 454 | #endif // MAINWINDOW_H 455 | -------------------------------------------------------------------------------- /src/CodeKeeper/settingsFunc/GitHubReleaseDownloader.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | void downloadFileFromLatestRelease(const QString &owner, const QString &repo, 14 | const QString &fileName, QLabel *label, QString git_user, 15 | QString git_token) 16 | { 17 | QString savePath = QCoreApplication::applicationDirPath() + "/CodeKeeper"; 18 | QString browserDownloadUrl; 19 | 20 | QString oldFilePath = QCoreApplication::applicationDirPath() + "/CodeKeeper"; 21 | QString newFilePath = QCoreApplication::applicationDirPath() + "/CodeKeeper.old"; 22 | 23 | if (QFile::exists(oldFilePath)) { 24 | if (QFile::rename(oldFilePath, newFilePath)) { 25 | qDebug() << "File renamed successfully"; 26 | } else { 27 | qDebug() << "Error when renaming a file"; 28 | } 29 | } else { 30 | qDebug() << "The file doesn't exist"; 31 | } 32 | 33 | 34 | qDebug() << savePath; 35 | 36 | QNetworkAccessManager manager; 37 | QNetworkRequest request; 38 | request.setUrl(QUrl("https://api.github.com/repos/DXS-GROUP/CodeKeeper/releases/latest")); 39 | request.setHeader(QNetworkRequest::UserAgentHeader, "CodeKeeper"); 40 | request.setRawHeader("Authorization", ("Bearer " + git_token).toUtf8()); 41 | request.setRawHeader("X-GitHub-Api-Version", "2022-11-28"); 42 | request.setRawHeader("Accept", "application/vnd.github.v3+json"); 43 | 44 | QNetworkReply *reply = manager.get(request); 45 | 46 | QEventLoop loop; 47 | QObject::connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit); 48 | loop.exec(); 49 | 50 | if (reply->error() != QNetworkReply::NoError) { 51 | label->setText("Error fetching release information:" + reply->errorString()); 52 | qDebug() << "Error fetching release information:" << reply->errorString(); 53 | delete reply; 54 | } 55 | 56 | QJsonDocument json = QJsonDocument::fromJson(reply->readAll()); 57 | QJsonObject jsonObject = json.object(); 58 | 59 | QJsonArray assets = jsonObject["assets"].toArray(); 60 | foreach (const QJsonValue &asset, assets) { 61 | QJsonObject assetObject = asset.toObject(); 62 | browserDownloadUrl = assetObject["browser_download_url"].toString(); 63 | // Use the browser_download_url here 64 | qDebug() << "Browser download URL:" << browserDownloadUrl; 65 | } 66 | } -------------------------------------------------------------------------------- /src/CodeKeeper/settingswindow.h: -------------------------------------------------------------------------------- 1 | #ifndef SETTINGSWINDOW_H 2 | #define SETTINGSWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | class SettingsWindow : public QMainWindow 10 | { 11 | Q_OBJECT 12 | public: 13 | explicit SettingsWindow(QWidget *parent = nullptr); 14 | ~SettingsWindow(); 15 | QSettings *globalSettings; 16 | 17 | void checkUpdates(); 18 | QString getNewAppVersion(); 19 | 20 | QLabel *versionInfo; 21 | 22 | QFont selectedFont; 23 | QString font_size; 24 | int theme; 25 | QString git_repo; 26 | QString git_user; 27 | QString git_token; 28 | QString path; 29 | 30 | int appLang; 31 | 32 | bool isTimeB; 33 | bool isDateB; 34 | bool isHostB; 35 | bool isAutoSyncB; 36 | bool isCustomTitlebar; 37 | bool isCustomTheme; 38 | bool isAutoCheckUpdates; 39 | 40 | bool isCreated; 41 | bool isReleaseDate; 42 | bool isLastCommit; 43 | bool isPullReq; 44 | bool isLicense; 45 | bool isRelease; 46 | bool isIssue; 47 | bool isDownloads; 48 | bool isCommit; 49 | bool isLang; 50 | bool isStars; 51 | bool isForks; 52 | bool isRepoSize; 53 | 54 | protected: 55 | void mousePressEvent(QMouseEvent *event) override 56 | { 57 | if (event->button() == Qt::LeftButton) 58 | { 59 | m_dragPosition = event->globalPos() - frameGeometry().topLeft(); 60 | event->accept(); 61 | } 62 | else 63 | { 64 | QMainWindow::mousePressEvent(event); 65 | } 66 | } 67 | 68 | void mouseMoveEvent(QMouseEvent *event) override 69 | { 70 | if (event->buttons() & Qt::LeftButton) 71 | { 72 | move(event->globalPos() - m_dragPosition); 73 | event->accept(); 74 | } 75 | else 76 | { 77 | QMainWindow::mouseMoveEvent(event); 78 | } 79 | } 80 | 81 | private slots: 82 | QPixmap changeIconColor(QPixmap pixmap); 83 | void closeEvent(QCloseEvent *event); 84 | void QuitW(); 85 | void saveData(); 86 | void fopenFolder(); 87 | 88 | QString fetchSecondLastRelease(); 89 | 90 | void setStyle2(QFont *selectedFont, int *font_size_int); 91 | void checkRepo(); 92 | 93 | private: 94 | QPoint m_dragPosition; 95 | 96 | QSizeGrip *sizeGrip; 97 | 98 | QWidget *centralWidget; 99 | QVBoxLayout *mainLayout; 100 | QTabWidget *tabs; 101 | 102 | QPushButton *saveBtn; 103 | QPushButton *quitBtn; 104 | 105 | // main tab 106 | QLabel *appName; 107 | QLabel *urlToRepo; 108 | 109 | QPushButton *checkUpdatesBtn; 110 | QCheckBox *autoUpdates; 111 | 112 | // sync settings 113 | QLabel *repoAvailability; 114 | QLabel *gitLabel; 115 | QLabel *gitLabel2; 116 | 117 | QLineEdit *gitToken; 118 | QLineEdit *gitUser; 119 | QLineEdit *gitRepo; 120 | 121 | QCheckBox *autoSyncAfterStart; 122 | 123 | QCheckBox *isDate; 124 | QCheckBox *isTime; 125 | QCheckBox *isHost; 126 | QCheckBox *isSync; 127 | 128 | // appereance 129 | QLabel *mainTitle; 130 | 131 | QLabel *fontLabel; 132 | QLabel *fontSizeLabel; 133 | QLabel *themeLabel; 134 | QLabel *langLabel; 135 | 136 | QSpinBox *fontSize; 137 | QFontComboBox *fontSelector; 138 | QComboBox *themeSelector; 139 | 140 | QComboBox *langSelector; 141 | 142 | QCheckBox *customTheme; 143 | QCheckBox *customTitleBar; 144 | 145 | // storage 146 | QLabel *storageLabel; 147 | QLineEdit *pathToFolder; 148 | QPushButton *openFolder; 149 | 150 | // projects content 151 | QLabel *projectsContentLabel; 152 | 153 | QCheckBox *CisCreated; 154 | QCheckBox *CisReleaseDate; 155 | QCheckBox *CisLastCommit; 156 | QCheckBox *CisPullReq; 157 | QCheckBox *CisLicense; 158 | QCheckBox *CisRelease; 159 | QCheckBox *CisIssue; 160 | QCheckBox *CisDownloads; 161 | QCheckBox *CisCommit; 162 | QCheckBox *CisLang; 163 | QCheckBox *CisStars; 164 | QCheckBox *CisForks; 165 | QCheckBox *CisRepoSize; 166 | 167 | QLabel *warningLabel; 168 | }; 169 | 170 | #endif // SETTINGSWINDOW_H 171 | -------------------------------------------------------------------------------- /src/CodeKeeper/sql_db/projectsDB.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "mainwindow.h" 7 | 8 | QStringList MainWindow::getAllReposUrl() 9 | { 10 | QStringList reposUrls; 11 | 12 | QSqlQuery query; 13 | if (query.exec("SELECT git_url FROM projects")) 14 | { 15 | while (query.next()) 16 | { 17 | QString url = query.value(0).toString(); 18 | reposUrls.append(url); 19 | } 20 | } 21 | else 22 | { 23 | qWarning() << query.lastError(); 24 | } 25 | 26 | return reposUrls; 27 | } 28 | 29 | void MainWindow::create_projects_connection() 30 | { 31 | QSqlQuery query; 32 | 33 | QString str = "CREATE TABLE projects ( " 34 | "id INTEGER PRIMARY KEY AUTOINCREMENT, " 35 | "title TEXT," 36 | "git_url TEXT," 37 | "projectDoc TEXT," 38 | "status VARCHAR(50)," 39 | "createdTime VARCHAR(50)" 40 | ");"; 41 | 42 | if (!query.exec(str)) 43 | { 44 | qWarning() << query.lastError(); 45 | } 46 | else 47 | { 48 | qDebug() << "Projects db was created"; 49 | } 50 | } 51 | 52 | QStringList MainWindow::GetProjectData(QString *title, QString *status, QString *git_url) 53 | { 54 | QStringList projectData; 55 | QSqlQuery query; 56 | 57 | query.prepare("SELECT * FROM projects WHERE status = :status AND title = :title AND git_url = :git_url"); 58 | query.bindValue(":status", *status); 59 | query.bindValue(":title", *title); 60 | query.bindValue(":git_url", *git_url); 61 | 62 | if (query.exec()) 63 | { 64 | if (query.next()) 65 | { 66 | projectData << query.value("title").toString(); 67 | projectData << query.value("git_url").toString(); 68 | projectData << query.value("projectDoc").toString(); 69 | projectData << query.value("status").toString(); 70 | projectData << query.value("createdTime").toString(); 71 | qDebug() << "Load project: " << projectData; 72 | } 73 | } 74 | else 75 | { 76 | qWarning() << "Error querying projects database:" << query.lastError(); 77 | } 78 | return projectData; 79 | } 80 | 81 | void MainWindow::updateProjectData(QString *title, QString *git_url, QString *doc, QString *createdTime, 82 | QString *oldTime, QString *oldGit) 83 | { 84 | QSqlQuery query; 85 | 86 | query.prepare( 87 | "UPDATE projects SET title = :title, git_url = :git_url, projectDoc = :doc, createdTime = :createdTime " 88 | "WHERE createdTime = :oldTime AND git_url = :oldGit"); 89 | query.bindValue(":title", *title); 90 | query.bindValue(":git_url", *git_url); 91 | query.bindValue(":doc", *doc); 92 | query.bindValue(":createdTime", *createdTime); 93 | query.bindValue(":oldTime", *oldTime); 94 | query.bindValue(":oldGit", *oldGit); 95 | 96 | if (!query.exec()) 97 | { 98 | qWarning() << "" << query.lastError(); 99 | } 100 | else 101 | { 102 | qDebug() << "Successfully updated"; 103 | } 104 | } 105 | 106 | void MainWindow::saveProjectToDB(QString *title, QString *git_url, QString *status, QString *createdTime) 107 | { 108 | QSqlQuery query; 109 | 110 | query.prepare("INSERT INTO projects (title, git_url, projectDoc, status, createdTime) " 111 | "VALUES (:title, :git_url, ' ', :status, :createdTime)"); 112 | query.bindValue(":title", *title); 113 | query.bindValue(":git_url", *git_url); 114 | query.bindValue(":status", *status); 115 | query.bindValue(":createdTime", *createdTime); 116 | 117 | if (!query.exec()) 118 | { 119 | qWarning() << "" << query.lastError(); 120 | } 121 | else 122 | { 123 | qDebug() << "Successfully saved"; 124 | } 125 | } 126 | 127 | void MainWindow::updateProjectStatus(QString *status, QString *createdTime, QString *oldTime) 128 | { 129 | QSqlQuery query; 130 | 131 | query.prepare("UPDATE projects SET status = :status WHERE createdTime = :oldTime"); 132 | query.bindValue(":status", *status); 133 | query.bindValue(":oldTime", *oldTime); 134 | 135 | if (!query.exec()) 136 | { 137 | qWarning() << "" << query.lastError(); 138 | } 139 | else 140 | { 141 | qDebug() << "Successfully updated"; 142 | } 143 | } 144 | 145 | void MainWindow::removeProjectFromDB(QString *git_url, QString *status, QString *createdTime) 146 | { 147 | QSqlQuery query; 148 | 149 | query.prepare("DELETE FROM projects WHERE git_url = :git_url"); 150 | query.bindValue(":git_url", *git_url); 151 | 152 | if (!query.exec()) 153 | { 154 | qWarning() << "" << query.lastError(); 155 | } 156 | else 157 | { 158 | qDebug() << "Successfully removed"; 159 | } 160 | } 161 | 162 | void MainWindow::loadProjects() 163 | { 164 | notStartedProjects->clear(); 165 | startedProjects->clear(); 166 | finishlineProjects->clear(); 167 | finishedProjects->clear(); 168 | 169 | QSqlQuery query; 170 | 171 | query.exec("SELECT * FROM projects"); 172 | while (query.next()) 173 | { 174 | int id = query.value("id").toInt(); 175 | QString title = query.value("title").toString(); 176 | QString git_url = query.value("git_url").toString(); 177 | QString createdTime = query.value("createdTime").toString(); 178 | QString status = query.value("status").toString(); 179 | 180 | QString data = title + "\n\n" + git_url + "\n\n" + createdTime; 181 | 182 | QListWidgetItem *item = new QListWidgetItem(data); 183 | 184 | item->setData(Qt::UserRole, id); 185 | 186 | if (status == "NotStartedProjects") 187 | { 188 | notStartedProjects->addItem(item); 189 | } 190 | if (status == "StartedProjects") 191 | { 192 | startedProjects->addItem(item); 193 | } 194 | if (status == "FinishlineProjects") 195 | { 196 | finishlineProjects->addItem(item); 197 | } 198 | if (status == "FinishedProjects") 199 | { 200 | finishedProjects->addItem(item); 201 | } 202 | else 203 | { 204 | qWarning() << "Unknown status: " << status; 205 | } 206 | } 207 | qDebug() << "Projects was loaded"; 208 | } 209 | 210 | QStringList MainWindow::getProjectsList() 211 | { 212 | QSqlQuery query; 213 | 214 | query.exec("SELECT * FROM projects"); 215 | QStringList projectsList; 216 | while (query.next()) 217 | { 218 | projectsList << query.value("title").toString(); 219 | } 220 | return projectsList; 221 | } 222 | -------------------------------------------------------------------------------- /src/CodeKeeper/sql_db/tasksDB.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "mainwindow.h" 7 | 8 | void MainWindow::create_tasks_connection() 9 | { 10 | QSqlQuery query; 11 | 12 | QString str = "CREATE TABLE tasks ( " 13 | "id INTEGER PRIMARY KEY AUTOINCREMENT, " 14 | "task TEXT," 15 | "status VARCHAR(50)," 16 | "createdTime VARCHAR(50)," 17 | "projectLink TEXT);"; 18 | 19 | if (!query.exec(str)) 20 | { 21 | qDebug() << "" << query.lastError(); 22 | } 23 | else 24 | { 25 | qDebug() << "Tasks db was created"; 26 | } 27 | } 28 | 29 | void MainWindow::updateTaskData(QString *task, QString *status, QString *cT, QString *projectLink) 30 | { 31 | QSqlQuery query; 32 | 33 | QStringList taskText = task->split("\n――――――――――――――\n"); 34 | QString task_s = taskText[0]; 35 | 36 | query.prepare( 37 | "UPDATE tasks SET task = :task, projectLink = :projectLink WHERE createdTime = :cT AND status = :status"); 38 | query.bindValue(":task", task_s); 39 | query.bindValue(":cT", *cT); 40 | query.bindValue(":status", *status); 41 | query.bindValue(":projectLink", *projectLink); 42 | 43 | if (!query.exec()) 44 | { 45 | qDebug() << "" << query.lastError(); 46 | } 47 | 48 | qDebug() << task_s << *status << *cT << *projectLink; 49 | } 50 | 51 | void MainWindow::updateTaskStatus(QString *task, QString *status, QString *cT) 52 | { 53 | QSqlQuery query; 54 | 55 | QStringList taskText = task->split("\n――――――――――――――\n"); 56 | 57 | query.prepare("UPDATE tasks SET status = :status WHERE createdTime = :cT AND task = :task"); 58 | query.bindValue(":status", *status); 59 | query.bindValue(":cT", *cT); 60 | query.bindValue(":task", taskText[0]); 61 | 62 | if (!query.exec()) 63 | { 64 | qDebug() << "" << query.lastError(); 65 | } 66 | } 67 | 68 | void MainWindow::saveTaskToDB(QString *task, QString *status, QString *projectLink) 69 | { 70 | QSqlQuery query; 71 | 72 | QStringList taskText = task->split("\n――――――――――――――\n"); 73 | 74 | query.prepare("INSERT INTO tasks (task, status, createdTime, projectLink) VALUES(:task, :status, :createdTime, " 75 | ":projectLink)"); 76 | query.bindValue(":task", taskText[0]); 77 | query.bindValue(":status", *status); 78 | query.bindValue(":createdTime", taskText[1]); 79 | query.bindValue(":projectLink", *projectLink); 80 | 81 | if (!query.exec()) 82 | { 83 | qDebug() << "" << query.lastError(); 84 | } 85 | else 86 | { 87 | qDebug() << "" << taskText[0] << " was saved"; 88 | } 89 | } 90 | 91 | void MainWindow::removeTaskFromDB(QString *task, QString *status) 92 | { 93 | QSqlQuery query; 94 | 95 | QStringList taskText = task->split("\n――――――――――――――\n"); 96 | 97 | query.prepare("DELETE FROM tasks WHERE task = :task AND status = :status AND createdTime = :createdTime"); 98 | query.bindValue(":task", taskText[0]); 99 | query.bindValue(":status", *status); 100 | query.bindValue(":createdTime", taskText[1]); 101 | 102 | if (!query.exec()) 103 | { 104 | qDebug() << "" << query.lastError(); 105 | } 106 | else 107 | { 108 | qDebug() << "Successfully removed"; 109 | } 110 | } 111 | 112 | void MainWindow::loadTasks() 113 | { 114 | incompleteTasks->clear(); 115 | inprocessTasks->clear(); 116 | completeTasks->clear(); 117 | 118 | QSqlQuery query; 119 | 120 | query.exec("SELECT * FROM tasks ORDER BY createdTime DESC"); 121 | while (query.next()) 122 | { 123 | int id = query.value("id").toInt(); 124 | QString task = query.value("task").toString(); 125 | QString status = query.value("status").toString(); 126 | QString createdTime = query.value("createdTime").toString(); 127 | 128 | QString text = task + "\n――――――――――――――\n" + createdTime; 129 | 130 | QListWidgetItem *item = new QListWidgetItem(text); 131 | item->setData(Qt::UserRole, id); 132 | 133 | if (status == "IncompleteTasks") 134 | { 135 | incompleteTasks->addItem(item); 136 | } 137 | else if (status == "InprocessTasks") 138 | { 139 | inprocessTasks->addItem(item); 140 | } 141 | else if (status == "CompleteTasks") 142 | { 143 | completeTasks->addItem(item); 144 | } 145 | else 146 | { 147 | qDebug() << "Unknown status: " << status; 148 | } 149 | } 150 | 151 | qDebug() << "Tasks loaded"; 152 | } 153 | 154 | QString MainWindow::getProjectByTask(QString *task, QString *status) 155 | { 156 | if (task == nullptr || status == nullptr) 157 | { 158 | qWarning() << "Null pointer passed to getProjectByTask"; 159 | return ""; 160 | } 161 | 162 | QSqlQuery query; 163 | query.prepare( 164 | "SELECT projectLink FROM tasks WHERE task = :task AND status = :status ORDER BY createdTime DESC LIMIT 1"); 165 | 166 | query.bindValue(":task", *task); 167 | query.bindValue(":status", *status); 168 | 169 | QString projectLink = ""; 170 | if (query.exec()) 171 | { 172 | if (query.next()) 173 | { 174 | projectLink = query.value("projectLink").toString(); 175 | return projectLink; 176 | } 177 | } 178 | else 179 | { 180 | qWarning() << "Error querying projects database:" << query.lastError(); 181 | return ""; 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /src/CodeKeeper/stylesheet.qss: -------------------------------------------------------------------------------- 1 | QTreeView { 2 | background-color: transparent; 3 | border: none; 4 | outline: none; 5 | } 6 | 7 | QMarkdownTextEdit { 8 | background-color: transparent; 9 | border: none; 10 | outline: none; 11 | } 12 | 13 | QMarkdownTextEdit::lineNumber { 14 | background-color: #5260bb; 15 | border-radius: 10px; 16 | outline: none; 17 | } 18 | 19 | QMarkdownTextEdit::lineNumber:selected { 20 | color: #fff; 21 | background-color: #0d1117; 22 | border-radius: 10px; 23 | outline: none; 24 | } 25 | 26 | QMarkdownTextEdit::lineNumber::selected:active { 27 | color: #05ff00; 28 | background-color: #0d1117; 29 | border-radius: 10px; 30 | outline: none; 31 | } 32 | 33 | QListWidget { 34 | background-color: transparent; 35 | border: none; 36 | outline: none; 37 | } 38 | 39 | QLineEdit { 40 | border-radius: 10px; 41 | outline: none; 42 | } 43 | 44 | QProgressBar { 45 | color: #0D1117; 46 | height: auto; 47 | background-color: #ff757f; 48 | border-radius: 5px; 49 | outline: none; 50 | } 51 | QProgressBar::chunk { 52 | color: #0D1117; 53 | background-color: #c3e88d; 54 | border-radius: 5px; 55 | outline: none; 56 | } 57 | 58 | QScrollBar:vertical { 59 | background: transparent; 60 | border-radius: 3px; 61 | width: 6px; 62 | margin: 3px 0px 3px 0px; 63 | outline: none; 64 | } 65 | 66 | QScrollBar:horizontal { 67 | background: #0a070d; 68 | border-radius: 3px; 69 | height: 6px; 70 | margin: 0px 0px 0px 0px; 71 | outline: none; 72 | } 73 | 74 | QScrollBar::handle:vertical { 75 | border-radius: 3px; 76 | background: #666c72; 77 | height: 6px; 78 | outline: none; 79 | } 80 | 81 | QScrollBar::handle:horizontal { 82 | border-radius: 3px; 83 | background: #666c72; 84 | min-width: 20px; 85 | outline: none; 86 | } 87 | 88 | QScrollBar::handle:vertical:hover, QScrollBar::handle:horizontal:hover { 89 | border-radius: 2px; 90 | background: #666c72; 91 | } 92 | 93 | QScrollBar::add-line, QScrollBar::sub-line { 94 | border-radius: 2px; 95 | background: transparent; 96 | } 97 | 98 | QScrollBar::add-line:vertical { 99 | border-radius: 2px; 100 | subcontrol-position: bottom; 101 | subcontrol-origin: margin; 102 | height: 0px; 103 | } 104 | 105 | QScrollBar::sub-line:vertical { 106 | border-radius: 2px; 107 | subcontrol-position: top; 108 | subcontrol-origin: margin; 109 | height: 0px; 110 | } 111 | 112 | QScrollBar::add-line:horizontal { 113 | border-radius: 2px; 114 | subcontrol-position: right; 115 | subcontrol-origin: margin; 116 | width: 0px; 117 | } 118 | 119 | QScrollBar::sub-line:horizontal { 120 | border-radius: 2px; 121 | subcontrol-position: left; 122 | subcontrol-origin: margin; 123 | width: 0px; 124 | } 125 | 126 | QScrollBar::add-page, QScrollBar::sub-page { 127 | background: transparent; 128 | } 129 | 130 | QTableWidget { 131 | show-decoration-selected: 0; 132 | border: 0px; 133 | border-radius: 5px; 134 | } 135 | QTableWidget::item { 136 | border-radius: 5px; 137 | } 138 | -------------------------------------------------------------------------------- /src/CodeKeeper/syncFunc/functional.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "syncwindow.h" 5 | 6 | void SyncWindow::setFontStyle() 7 | { 8 | appName->setFont(selectedFont); 9 | 10 | infoLabel->setFont(selectedFont); 11 | infoLabel->setStyleSheet("font-size: " + font_size + "px;"); 12 | 13 | syncingProgress->setFont(selectedFont); 14 | 15 | startSyncing->setFont(selectedFont); 16 | startSyncing->setStyleSheet("font-size: " + font_size + "px;"); 17 | 18 | stopSyncing->setFont(selectedFont); 19 | stopSyncing->setStyleSheet("font-size: " + font_size + "px;"); 20 | } 21 | 22 | void SyncWindow::startSyncingFunc() 23 | { 24 | qDebug() << "Starting syncing..."; 25 | 26 | syncingProgress->setValue(90); 27 | } 28 | 29 | void SyncWindow::cancelSyncingFunc() 30 | { 31 | qDebug() << "Canceling syncing..."; 32 | 33 | this->close(); 34 | } 35 | 36 | bool SyncWindow::checkConnection() 37 | { 38 | QNetworkAccessManager *manager; 39 | QNetworkReply *reply; 40 | 41 | manager = new QNetworkAccessManager(); 42 | reply = manager->get(QNetworkRequest(QUrl("http://www.google.com"))); 43 | 44 | QObject::connect(reply, &QNetworkReply::finished, [=]() { 45 | if (reply->error() == QNetworkReply::NoError) 46 | { 47 | qDebug() << "Internet connection is available"; 48 | return true; 49 | } 50 | else 51 | { 52 | qDebug() << "No internet connection found"; 53 | return false; 54 | } 55 | }); 56 | } 57 | -------------------------------------------------------------------------------- /src/CodeKeeper/syncwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "syncwindow.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "gitFunc/cloneRepo.cpp" 8 | #include "gitFunc/getUpdates.cpp" 9 | #include "gitFunc/pushUpdates.cpp" 10 | #include "syncFunc/functional.cpp" 11 | 12 | SyncWindow::SyncWindow(QWidget *parent) : QMainWindow(parent) 13 | { 14 | centralWidget = new QWidget(this); 15 | setCentralWidget(centralWidget); 16 | 17 | this->setWindowFlags(windowFlags() | Qt::FramelessWindowHint); 18 | this->setFixedSize(300, 500); 19 | 20 | globalSettings = new QSettings("CodeKeeper", "CodeKeeper"); 21 | selectedFont = globalSettings->value("font").value(); 22 | font_size = globalSettings->value("fontSize").value(); 23 | dir = globalSettings->value("path").value(); 24 | 25 | mainLayout = new QGridLayout; 26 | 27 | appIcon = new QLabel(tr("Syncing with Git")); 28 | appIcon->setPixmap(QPixmap(":/icon.png")); 29 | appIcon->setAlignment(Qt::AlignCenter); 30 | 31 | appName = new QLabel("CodeKeeper"); 32 | appName->setStyleSheet("font-size: 30px;"); 33 | appName->setAlignment(Qt::AlignCenter); 34 | 35 | infoLabel = new QLabel(tr("Syncing with Git")); 36 | infoLabel->setAlignment(Qt::AlignCenter); 37 | 38 | syncingProgress = new QProgressBar(); 39 | syncingProgress->setMaximum(100); 40 | syncingProgress->setValue(0); 41 | syncingProgress->setFixedSize(200, 20); 42 | syncingProgress->setAlignment(Qt::AlignCenter); 43 | syncingProgress->setFormat(" "); 44 | 45 | startSyncing = new QPushButton(tr("Start")); 46 | startSyncing->setFixedSize(100, 25); 47 | 48 | stopSyncing = new QPushButton(tr("Cancel && Quit")); 49 | stopSyncing->setFixedSize(100, 25); 50 | 51 | QVBoxLayout *infoLayout = new QVBoxLayout(); 52 | infoLayout->setAlignment(Qt::AlignHCenter); 53 | infoLayout->addWidget(appName); 54 | infoLayout->addWidget(infoLabel); 55 | 56 | QVBoxLayout *buttonsLayout = new QVBoxLayout(); 57 | buttonsLayout->setAlignment(Qt::AlignHCenter); 58 | buttonsLayout->addWidget(startSyncing); 59 | buttonsLayout->addWidget(stopSyncing); 60 | buttonsLayout->setSpacing(4); 61 | 62 | mainLayout->addLayout(infoLayout, 0, 0, 2, 2, Qt::AlignCenter); 63 | mainLayout->addWidget(syncingProgress, 2, 0, 1, 2, Qt::AlignCenter); 64 | mainLayout->addLayout(buttonsLayout, 3, 0, 1, 2, Qt::AlignCenter); 65 | 66 | setFontStyle(); 67 | 68 | qDebug() << "Opening Sync Window"; 69 | 70 | centralWidget->setLayout(mainLayout); 71 | 72 | connect(startSyncing, SIGNAL(clicked()), this, SLOT(startSyncingFunc())); 73 | connect(stopSyncing, SIGNAL(clicked()), this, SLOT(cancelSyncingFunc())); 74 | } 75 | 76 | SyncWindow::~SyncWindow() 77 | { 78 | } 79 | -------------------------------------------------------------------------------- /src/CodeKeeper/syncwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef SYNCWINDOW_H 2 | #define SYNCWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | class SyncWindow : public QMainWindow 11 | { 12 | Q_OBJECT; 13 | 14 | public: 15 | void setFontStyle(); 16 | 17 | QSettings *globalSettings; 18 | 19 | SyncWindow(QWidget *parent = nullptr); 20 | ~SyncWindow(); 21 | 22 | QString dir; 23 | QFont selectedFont; 24 | QString font_size; 25 | QString theme; 26 | QString git_repo; 27 | QString git_user; 28 | QString git_token; 29 | 30 | private slots: 31 | bool checkConnection(); 32 | void startSyncingFunc(); 33 | void cancelSyncingFunc(); 34 | 35 | protected: 36 | private: 37 | QWidget *centralWidget; 38 | QGridLayout *mainLayout; 39 | 40 | QLabel *appIcon; 41 | QLabel *appName; 42 | QLabel *infoLabel; 43 | 44 | QProgressBar *syncingProgress; 45 | 46 | QPushButton *startSyncing; 47 | QPushButton *stopSyncing; 48 | }; 49 | 50 | #endif // SYNCWINDOW_H 51 | -------------------------------------------------------------------------------- /src/CodeKeeper/uhxEvg.json: -------------------------------------------------------------------------------- 1 | [{"excluded":[],"includePaths":["/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/3rdParty/qmarkdowntextedit","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/3rdParty/qmarkdowntextedit","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/3rdParty/qmarkdowntextedit","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/3rdParty/qmarkdowntextedit","/usr/include/qt","/usr/include/qt/QtWidgets","/usr/include/qt/QtGui","/usr/include/qt/QtSql","/usr/include/qt/QtNetwork","/usr/include/qt/QtCore","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper"],"projectFile":"/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/CodeKeeper.pro","sources":["/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/3rdParty/qmarkdowntextedit/linenumberarea.h","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/3rdParty/qmarkdowntextedit/markdownhighlighter.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/3rdParty/qmarkdowntextedit/markdownhighlighter.h","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/3rdParty/qmarkdowntextedit/qmarkdowntextedit.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/3rdParty/qmarkdowntextedit/qmarkdowntextedit.h","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/3rdParty/qmarkdowntextedit/qownlanguagedata.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/3rdParty/qmarkdowntextedit/qownlanguagedata.h","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/3rdParty/qmarkdowntextedit/qplaintexteditsearchwidget.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/3rdParty/qmarkdowntextedit/qplaintexteditsearchwidget.h","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/3rdParty/qmarkdowntextedit/qplaintexteditsearchwidget.ui","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/accountFunc/functional.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/accountwindow.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/accountwindow.h","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/custom/ColorValueDisplay/ColorValueDisplay.h","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/custom/circleChart/CircleChart.h","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/custom/circleProgressbar/ProgressCircle.h","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/gitFunc/cloneRepo.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/gitFunc/getUpdates.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/gitFunc/pushUpdates.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/keeperFunc/addConnects.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/keeperFunc/createMenu.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/keeperFunc/functional.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/keeperFunc/getProjectInfo.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/keeperFunc/notesFunc.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/keeperFunc/projectsFunc.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/keeperFunc/tasksFunc.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/main.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/mainwindow.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/mainwindow.h","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/settingsFunc/functional.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/settingswindow.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/settingswindow.h","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/sql_db/projectsDB.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/sql_db/tasksDB.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/syncFunc/functional.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/syncwindow.cpp","/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/syncwindow.h"],"translations":["/home/nighty/Dev/Git/CodeKeeper/src/CodeKeeper/CodeKeeper_ru_RU.ts"]}] 2 | -------------------------------------------------------------------------------- /src/resources/.comments/markdown.png.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 95 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/resources/CustomFont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/CustomFont.ttf -------------------------------------------------------------------------------- /src/resources/CustomFont_2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/CustomFont_2.ttf -------------------------------------------------------------------------------- /src/resources/CustomFont_3.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/CustomFont_3.ttf -------------------------------------------------------------------------------- /src/resources/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/about.png -------------------------------------------------------------------------------- /src/resources/auto_sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/auto_sync_off.png -------------------------------------------------------------------------------- /src/resources/auto_sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/auto_sync_on.png -------------------------------------------------------------------------------- /src/resources/bold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/bold.png -------------------------------------------------------------------------------- /src/resources/check-mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/check-mark.png -------------------------------------------------------------------------------- /src/resources/checkbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/checkbox.png -------------------------------------------------------------------------------- /src/resources/connected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/connected.png -------------------------------------------------------------------------------- /src/resources/copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/copy.png -------------------------------------------------------------------------------- /src/resources/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/delete.png -------------------------------------------------------------------------------- /src/resources/disconnected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/disconnected.png -------------------------------------------------------------------------------- /src/resources/document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/document.png -------------------------------------------------------------------------------- /src/resources/down-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/down-arrow.png -------------------------------------------------------------------------------- /src/resources/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/download.png -------------------------------------------------------------------------------- /src/resources/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/edit.png -------------------------------------------------------------------------------- /src/resources/expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/expand.png -------------------------------------------------------------------------------- /src/resources/export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/export.png -------------------------------------------------------------------------------- /src/resources/folder-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/folder-open.png -------------------------------------------------------------------------------- /src/resources/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/folder.png -------------------------------------------------------------------------------- /src/resources/german.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/german.png -------------------------------------------------------------------------------- /src/resources/git.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/git.png -------------------------------------------------------------------------------- /src/resources/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/green.png -------------------------------------------------------------------------------- /src/resources/greenHovered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/greenHovered.png -------------------------------------------------------------------------------- /src/resources/greenInHovered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/greenInHovered.png -------------------------------------------------------------------------------- /src/resources/greenInPressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/greenInPressed.png -------------------------------------------------------------------------------- /src/resources/greenPressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/greenPressed.png -------------------------------------------------------------------------------- /src/resources/h1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/h1.png -------------------------------------------------------------------------------- /src/resources/h2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/h2.png -------------------------------------------------------------------------------- /src/resources/h3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/h3.png -------------------------------------------------------------------------------- /src/resources/home_dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/home_dir.png -------------------------------------------------------------------------------- /src/resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/icon.png -------------------------------------------------------------------------------- /src/resources/italic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/italic.png -------------------------------------------------------------------------------- /src/resources/japan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/japan.png -------------------------------------------------------------------------------- /src/resources/lightning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/lightning.png -------------------------------------------------------------------------------- /src/resources/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/link.png -------------------------------------------------------------------------------- /src/resources/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/list.png -------------------------------------------------------------------------------- /src/resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/logo.png -------------------------------------------------------------------------------- /src/resources/main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/main.png -------------------------------------------------------------------------------- /src/resources/markdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/markdown.png -------------------------------------------------------------------------------- /src/resources/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/new.png -------------------------------------------------------------------------------- /src/resources/new_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/new_folder.png -------------------------------------------------------------------------------- /src/resources/note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/note.png -------------------------------------------------------------------------------- /src/resources/numList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/numList.png -------------------------------------------------------------------------------- /src/resources/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/open.png -------------------------------------------------------------------------------- /src/resources/palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/palette.png -------------------------------------------------------------------------------- /src/resources/paste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/paste.png -------------------------------------------------------------------------------- /src/resources/project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/project.png -------------------------------------------------------------------------------- /src/resources/quit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/quit.png -------------------------------------------------------------------------------- /src/resources/quote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/quote.png -------------------------------------------------------------------------------- /src/resources/read.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/read.png -------------------------------------------------------------------------------- /src/resources/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/red.png -------------------------------------------------------------------------------- /src/resources/redHovered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/redHovered.png -------------------------------------------------------------------------------- /src/resources/redPressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/redPressed.png -------------------------------------------------------------------------------- /src/resources/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/refresh.png -------------------------------------------------------------------------------- /src/resources/rename.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/rename.png -------------------------------------------------------------------------------- /src/resources/resize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/resize.png -------------------------------------------------------------------------------- /src/resources/resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | lightning.png 4 | license.txt 5 | check-mark.png 6 | logo.png 7 | download.png 8 | sync.png 9 | user.png 10 | copy.png 11 | delete.png 12 | icon.png 13 | new.png 14 | new_folder.png 15 | open.png 16 | paste.png 17 | retry.png 18 | search.png 19 | save.png 20 | quit.png 21 | settings.png 22 | note.png 23 | folder.png 24 | bold.png 25 | checkbox.png 26 | h1.png 27 | h2.png 28 | h3.png 29 | italic.png 30 | link.png 31 | list.png 32 | strikethrough.png 33 | view.png 34 | document.png 35 | folder-open.png 36 | home_dir.png 37 | trash.png 38 | numList.png 39 | table.png 40 | edit.png 41 | main.png 42 | project.png 43 | task.png 44 | refresh.png 45 | storage.png 46 | palette.png 47 | green.png 48 | greenHovered.png 49 | greenInHovered.png 50 | greenInPressed.png 51 | greenPressed.png 52 | red.png 53 | redHovered.png 54 | redPressed.png 55 | unfocusedButton.png 56 | yellow.png 57 | yellowHovered.png 58 | yellowPressed.png 59 | up-arrow.png 60 | down-arrow.png 61 | quote.png 62 | rename.png 63 | markdown.png 64 | disconnected.png 65 | connected.png 66 | auto_sync_off.png 67 | auto_sync_on.png 68 | sorting.png 69 | export.png 70 | expand.png 71 | read.png 72 | german.png 73 | spanish.png 74 | usa.png 75 | japan.png 76 | russian.png 77 | CustomFont.ttf 78 | CustomFont_3.ttf 79 | CustomFont_2.ttf 80 | git.png 81 | tea.svg 82 | resize.png 83 | about.png 84 | CodeKeeper_ru_RU.ts 85 | 86 | 87 | -------------------------------------------------------------------------------- /src/resources/retry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/retry.png -------------------------------------------------------------------------------- /src/resources/russian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/russian.png -------------------------------------------------------------------------------- /src/resources/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/save.png -------------------------------------------------------------------------------- /src/resources/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/search.png -------------------------------------------------------------------------------- /src/resources/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/settings.png -------------------------------------------------------------------------------- /src/resources/sorting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/sorting.png -------------------------------------------------------------------------------- /src/resources/spanish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/spanish.png -------------------------------------------------------------------------------- /src/resources/storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/storage.png -------------------------------------------------------------------------------- /src/resources/strikethrough.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/strikethrough.png -------------------------------------------------------------------------------- /src/resources/sync.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/sync.png -------------------------------------------------------------------------------- /src/resources/table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/table.png -------------------------------------------------------------------------------- /src/resources/task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/task.png -------------------------------------------------------------------------------- /src/resources/trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/trash.png -------------------------------------------------------------------------------- /src/resources/unfocusedButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/unfocusedButton.png -------------------------------------------------------------------------------- /src/resources/up-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/up-arrow.png -------------------------------------------------------------------------------- /src/resources/usa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/usa.png -------------------------------------------------------------------------------- /src/resources/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/user.png -------------------------------------------------------------------------------- /src/resources/view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/view.png -------------------------------------------------------------------------------- /src/resources/yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/yellow.png -------------------------------------------------------------------------------- /src/resources/yellowHovered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/yellowHovered.png -------------------------------------------------------------------------------- /src/resources/yellowPressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nighty3098/CodeKeeper/dc4faf2e7c4b2063c742cd181743bb32fc96c914/src/resources/yellowPressed.png --------------------------------------------------------------------------------