commit f9ed137cb6076ddc003f4fe82c4e66ffe5ccc651 Author: orkun Date: Sat Feb 1 00:56:02 2025 +0300 Initial ... and most probably the last commit ever, I hope. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a859dac --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +build +CMakeCache.txt +CMakeFiles/ +Makefile +ScratchPad +ScratchPad_autogen/ +cmake_install.cmake +install_manifest.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..5200234 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 3.16) +project(ScratchPad) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +find_package(Qt5 COMPONENTS Widgets REQUIRED) + +add_executable(ScratchPad + main.cpp +) + +target_link_libraries(ScratchPad Qt5::Widgets) + +# Add at the end of existing CMakeLists.txt +install(TARGETS ScratchPad + RUNTIME DESTINATION bin +) + +install(FILES scratchpad.desktop + DESTINATION share/applications +) + +install(FILES scratchpad.svg + DESTINATION share/icons/hicolor/scalable/apps +) + diff --git a/README.md b/README.md new file mode 100644 index 0000000..2f84f52 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# Scratch Pad +The simplest scratchpad for copy and paste. + +# Installation + +```console +cmake . && make && sudo make install +``` + diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..45af7c7 --- /dev/null +++ b/main.cpp @@ -0,0 +1,26 @@ +#include +#include +#include + +class ScratchPad : public QMainWindow { +public: + ScratchPad() { + textEdit = new QPlainTextEdit(this); + setCentralWidget(textEdit); + + setWindowTitle("Scratch Pad"); + resize(600, 400); + } + +private: + QPlainTextEdit *textEdit; +}; + +int main(int argc, char *argv[]) { + QApplication app(argc, argv); + + ScratchPad mainWindow; + mainWindow.show(); + + return app.exec(); +} diff --git a/scratchpad.desktop b/scratchpad.desktop new file mode 100644 index 0000000..5b3b730 --- /dev/null +++ b/scratchpad.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Scratch Pad +Comment=Simple text scratch pad for note taking +Exec=ScratchPad +Icon=scratchpad +Terminal=false +Type=Application +Categories=Utility;TextEditor; diff --git a/scratchpad.svg b/scratchpad.svg new file mode 100644 index 0000000..11a4554 --- /dev/null +++ b/scratchpad.svg @@ -0,0 +1,218 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T + T + T + T + T + T + T + +