-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a712f02
commit bae697d
Showing
18 changed files
with
3,335 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source_url "https://raw.githubusercontent.com/cachix/devenv/d1f7b48e35e6dee421cfd0f51481d17f77586997/direnvrc" "sha256-YBzqskFZxmNb3kYVoKD9ZixoPXJh1C9ZvTLGFRkauZ0=" | ||
|
||
use devenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
{ | ||
"nodes": { | ||
"devenv": { | ||
"locked": { | ||
"dir": "src/modules", | ||
"lastModified": 1697058441, | ||
"narHash": "sha256-gjtW+nkM9suMsjyid63HPmt6WZQEvuVqA5cOAf4lLM0=", | ||
"owner": "cachix", | ||
"repo": "devenv", | ||
"rev": "55294461a62d90c8626feca22f52b0d3d0e18e39", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"dir": "src/modules", | ||
"owner": "cachix", | ||
"repo": "devenv", | ||
"type": "github" | ||
} | ||
}, | ||
"flake-compat": { | ||
"flake": false, | ||
"locked": { | ||
"lastModified": 1673956053, | ||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", | ||
"owner": "edolstra", | ||
"repo": "flake-compat", | ||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "edolstra", | ||
"repo": "flake-compat", | ||
"type": "github" | ||
} | ||
}, | ||
"flake-utils": { | ||
"inputs": { | ||
"systems": "systems" | ||
}, | ||
"locked": { | ||
"lastModified": 1685518550, | ||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", | ||
"owner": "numtide", | ||
"repo": "flake-utils", | ||
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "numtide", | ||
"repo": "flake-utils", | ||
"type": "github" | ||
} | ||
}, | ||
"gitignore": { | ||
"inputs": { | ||
"nixpkgs": [ | ||
"pre-commit-hooks", | ||
"nixpkgs" | ||
] | ||
}, | ||
"locked": { | ||
"lastModified": 1660459072, | ||
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", | ||
"owner": "hercules-ci", | ||
"repo": "gitignore.nix", | ||
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "hercules-ci", | ||
"repo": "gitignore.nix", | ||
"type": "github" | ||
} | ||
}, | ||
"nixpkgs": { | ||
"locked": { | ||
"lastModified": 1697009197, | ||
"narHash": "sha256-viVRhBTFT8fPJTb1N3brQIpFZnttmwo3JVKNuWRVc3s=", | ||
"owner": "NixOS", | ||
"repo": "nixpkgs", | ||
"rev": "01441e14af5e29c9d27ace398e6dd0b293e25a54", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "NixOS", | ||
"ref": "nixpkgs-unstable", | ||
"repo": "nixpkgs", | ||
"type": "github" | ||
} | ||
}, | ||
"nixpkgs-stable": { | ||
"locked": { | ||
"lastModified": 1685801374, | ||
"narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", | ||
"owner": "NixOS", | ||
"repo": "nixpkgs", | ||
"rev": "c37ca420157f4abc31e26f436c1145f8951ff373", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "NixOS", | ||
"ref": "nixos-23.05", | ||
"repo": "nixpkgs", | ||
"type": "github" | ||
} | ||
}, | ||
"pre-commit-hooks": { | ||
"inputs": { | ||
"flake-compat": "flake-compat", | ||
"flake-utils": "flake-utils", | ||
"gitignore": "gitignore", | ||
"nixpkgs": [ | ||
"nixpkgs" | ||
], | ||
"nixpkgs-stable": "nixpkgs-stable" | ||
}, | ||
"locked": { | ||
"lastModified": 1696846637, | ||
"narHash": "sha256-0hv4kbXxci2+pxhuXlVgftj/Jq79VSmtAyvfabCCtYk=", | ||
"owner": "cachix", | ||
"repo": "pre-commit-hooks.nix", | ||
"rev": "42e1b6095ef80a51f79595d9951eb38e91c4e6ca", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "cachix", | ||
"repo": "pre-commit-hooks.nix", | ||
"type": "github" | ||
} | ||
}, | ||
"root": { | ||
"inputs": { | ||
"devenv": "devenv", | ||
"nixpkgs": "nixpkgs", | ||
"pre-commit-hooks": "pre-commit-hooks" | ||
} | ||
}, | ||
"systems": { | ||
"locked": { | ||
"lastModified": 1681028828, | ||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", | ||
"owner": "nix-systems", | ||
"repo": "default", | ||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "nix-systems", | ||
"repo": "default", | ||
"type": "github" | ||
} | ||
} | ||
}, | ||
"root": "root", | ||
"version": 7 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ pkgs, ... }: | ||
|
||
{ | ||
# https://devenv.sh/basics/ | ||
env.GREET = "devenv"; | ||
|
||
# https://devenv.sh/packages/ | ||
packages = [ pkgs.git pkgs.qt6.full pkgs.python310Packages.pyqt6 ]; | ||
|
||
# https://devenv.sh/scripts/ | ||
scripts.hello.exec = "echo hello from $GREET"; | ||
|
||
enterShell = '' | ||
hello | ||
git --version | ||
''; | ||
|
||
# https://devenv.sh/languages/ | ||
languages.python.enable = true; | ||
|
||
languages.python.poetry.activate.enable = true; | ||
languages.python.poetry.enable = true; | ||
|
||
# https://devenv.sh/pre-commit-hooks/ | ||
# pre-commit.hooks.shellcheck.enable = true; | ||
|
||
# https://devenv.sh/processes/ | ||
# processes.ping.exec = "ping example.com"; | ||
|
||
# See full reference at https://devenv.sh/reference/options/ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
inputs: | ||
nixpkgs: | ||
url: github:NixOS/nixpkgs/nixpkgs-unstable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
# Coding conventions | ||
|
||
|
||
`PascalCase` for **classes**, | ||
`under_score` for **variables** and **class members** | ||
|
||
if you use the Designer, for example, you name your button *push_button* | ||
|
||
means a custom method my_custom_method | ||
internal, getWindowIcon | ||
|
||
```python | ||
#Using PyQt-specific naming conventions | ||
self.niceLabel = QLabel("Hello, PyQt!", self) | ||
self.niceLabel.setGeometry(10, 10, 380, 180) | ||
|
||
# Using PEP 8 conventions for a custom method | ||
self.my_custom_method() | ||
|
||
def my_custom_method(self): | ||
print("This is a custom method.") | ||
|
||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import sys | ||
from PyQt6.QtWidgets import QApplication, QWidget | ||
from PyQt6.QtGui import QIcon | ||
|
||
|
||
|
||
class Window(QWidget): | ||
|
||
def __init__(self): | ||
super().__init__() | ||
|
||
self.setWindowTitle("hello") | ||
self.setGeometry(150,150,500,500) | ||
self.setWindowIcon(QIcon("icons/list.png")) | ||
self.setStyleSheet("background-color:red") | ||
self.setWindowOpacity(0.7) | ||
|
||
|
||
app = QApplication(sys.argv) | ||
|
||
window = Window() | ||
window.show() | ||
|
||
sys.exit(app.exec()) |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Form implementation generated from reading ui file 'main_ui.ui' | ||
# | ||
# Created by: PyQt6 UI code generator 6.5.2 | ||
# | ||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is | ||
# run again. Do not edit this file unless you know what you are doing. | ||
|
||
|
||
from PyQt6 import QtCore, QtGui, QtWidgets | ||
|
||
|
||
class Ui_MainWindow(object): | ||
def setupUi(self, MainWindow): | ||
MainWindow.setObjectName("MainWindow") | ||
MainWindow.resize(800, 600) | ||
self.centralwidget = QtWidgets.QWidget(parent=MainWindow) | ||
self.centralwidget.setObjectName("centralwidget") | ||
self.widget = QtWidgets.QWidget(parent=self.centralwidget) | ||
self.widget.setGeometry(QtCore.QRect(9, 59, 131, 501)) | ||
self.widget.setObjectName("widget") | ||
self.widget_2 = QtWidgets.QWidget(parent=self.centralwidget) | ||
self.widget_2.setGeometry(QtCore.QRect(530, 60, 261, 511)) | ||
self.widget_2.setObjectName("widget_2") | ||
self.stackedWidget = QtWidgets.QStackedWidget(parent=self.centralwidget) | ||
self.stackedWidget.setGeometry(QtCore.QRect(169, 59, 331, 491)) | ||
self.stackedWidget.setObjectName("stackedWidget") | ||
self.page_3 = QtWidgets.QWidget() | ||
self.page_3.setObjectName("page_3") | ||
self.stackedWidget.addWidget(self.page_3) | ||
self.page_4 = QtWidgets.QWidget() | ||
self.page_4.setObjectName("page_4") | ||
self.stackedWidget.addWidget(self.page_4) | ||
self.widget_3 = QtWidgets.QWidget(parent=self.centralwidget) | ||
self.widget_3.setGeometry(QtCore.QRect(29, 10, 751, 41)) | ||
self.widget_3.setObjectName("widget_3") | ||
MainWindow.setCentralWidget(self.centralwidget) | ||
self.menubar = QtWidgets.QMenuBar(parent=MainWindow) | ||
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 19)) | ||
self.menubar.setObjectName("menubar") | ||
MainWindow.setMenuBar(self.menubar) | ||
self.statusbar = QtWidgets.QStatusBar(parent=MainWindow) | ||
self.statusbar.setObjectName("statusbar") | ||
MainWindow.setStatusBar(self.statusbar) | ||
|
||
self.retranslateUi(MainWindow) | ||
QtCore.QMetaObject.connectSlotsByName(MainWindow) | ||
|
||
def retranslateUi(self, MainWindow): | ||
_translate = QtCore.QCoreApplication.translate | ||
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) |
Oops, something went wrong.