Skip to content

Commit bb358d5

Browse files
committed
initial commit
1 parent deda3a4 commit bb358d5

Some content is hidden

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

61 files changed

+44189
-0
lines changed

css/qmain_win.css

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
QWidget {
2+
background-color: #474747;
3+
color: white;
4+
font-family: Verdana;
5+
font-size: 16pt;
6+
margin: 10px;
7+
}
8+
9+
QPushButton {
10+
border: 2px solid gray;
11+
border-radius: 5px;
12+
}
13+
14+
QPushButton#btn_lower,
15+
#btn_upper,
16+
#btn_digits,
17+
#btn_special {
18+
padding: 10px;
19+
}
20+
21+
QPushButton:hover {
22+
border-color: #4396fc;
23+
}
24+
25+
QPushButton:pressed {
26+
border: 4px solid #4396fc;
27+
border-radius: 5px;
28+
}
29+
30+
QPushButton:checked {
31+
background-color: #000c63;
32+
border-color: #4396fc;
33+
}

css/slider_length.css

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
QSlider::groove:horizontal {
2+
background-color: transparent;
3+
height: 5px;
4+
}
5+
6+
QSlider::sub-page:horizontal {
7+
background-color: #4396fc;
8+
}
9+
QSlider::add-page:horizontal {
10+
background-color: gray;
11+
}
12+
QSlider::handle:horizontal {
13+
background-color: #000c63;
14+
width: 22px;
15+
border-radius: 10px;
16+
margin-top: -8px;
17+
margin-bottom: -8px;
18+
}
19+
20+
4396fc

generator_pass/app.build/.sconsign-310.dblite

Whitespace-only changes.
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"./__constants.o"
2+
"./__helpers.o"
3+
"./__loader.o"
4+
"./module.PySide6-preLoad.o"
5+
"./module.PySide6.QtCore-postLoad.o"
6+
"./module.PySide6.o"
7+
"./module.PySide6.support.o"
8+
"./module.PySide6.support.deprecated.o"
9+
"./module.__main__.o"
10+
"./module.buttons.o"
11+
"./module.password.o"
12+
"./module.shiboken6.o"
13+
"./module.ui.o"
14+
"./module.ui.resources.o"
15+
"./module.ui.ui_main.o"
16+
"./static_src/MainProgram.o"
17+
"./static_src/CompiledFunctionType.o"
3.54 MB
Binary file not shown.
3.54 MB
Binary file not shown.
+149
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
2+
#include "nuitka/prelude.h"
3+
#include "structseq.h"
4+
5+
// Global constants storage
6+
PyObject *global_constants[87];
7+
8+
// Sentinel PyObject to be used for all our call iterator endings. It will
9+
// become a PyCObject pointing to NULL. It's address is unique, and that's
10+
// enough for us to use it as sentinel value.
11+
PyObject *_sentinel_value = NULL;
12+
13+
PyObject *Nuitka_dunder_compiled_value = NULL;
14+
15+
16+
#ifdef _NUITKA_STANDALONE
17+
extern PyObject *getStandaloneSysExecutablePath(PyObject *basename);
18+
#endif
19+
20+
extern void setDistributionsMetadata(PyObject *metadata_values);
21+
22+
// We provide the sys.version info shortcut as a global value here for ease of use.
23+
PyObject *Py_SysVersionInfo = NULL;
24+
25+
static void _createGlobalConstants(void) {
26+
// We provide the sys.version info shortcut as a global value here for ease of use.
27+
Py_SysVersionInfo = Nuitka_SysGetObject("version_info");
28+
29+
// The empty name means global.
30+
loadConstantsBlob(&global_constants[0], "");
31+
32+
#if _NUITKA_EXE
33+
/* Set the "sys.executable" path to the original CPython executable or point to inside the
34+
distribution for standalone. */
35+
Nuitka_SysSetObject(
36+
"executable",
37+
#ifndef _NUITKA_STANDALONE
38+
global_constants[86]
39+
#else
40+
getStandaloneSysExecutablePath(global_constants[86])
41+
#endif
42+
);
43+
44+
#ifndef _NUITKA_STANDALONE
45+
/* Set the "sys.prefix" path to the original one. */
46+
Nuitka_SysSetObject(
47+
"prefix",
48+
None
49+
);
50+
51+
/* Set the "sys.prefix" path to the original one. */
52+
Nuitka_SysSetObject(
53+
"exec_prefix",
54+
None
55+
);
56+
57+
58+
#if PYTHON_VERSION >= 0x300
59+
/* Set the "sys.base_prefix" path to the original one. */
60+
Nuitka_SysSetObject(
61+
"base_prefix",
62+
None
63+
);
64+
65+
/* Set the "sys.exec_base_prefix" path to the original one. */
66+
Nuitka_SysSetObject(
67+
"base_exec_prefix",
68+
None
69+
);
70+
71+
#endif
72+
#endif
73+
#endif
74+
75+
static PyTypeObject Nuitka_VersionInfoType;
76+
77+
// Same fields as "sys.version_info" except no serial number.
78+
static PyStructSequence_Field Nuitka_VersionInfoFields[] = {
79+
{(char *)"major", (char *)"Major release number"},
80+
{(char *)"minor", (char *)"Minor release number"},
81+
{(char *)"micro", (char *)"Micro release number"},
82+
{(char *)"releaselevel", (char *)"'alpha', 'beta', 'candidate', or 'release'"},
83+
{(char *)"standalone", (char *)"boolean indicating standalone mode usage"},
84+
{(char *)"onefile", (char *)"boolean indicating standalone mode usage"},
85+
{0}
86+
};
87+
88+
static PyStructSequence_Desc Nuitka_VersionInfoDesc = {
89+
(char *)"__nuitka_version__", /* name */
90+
(char *)"__compiled__\\n\\nVersion information as a named tuple.", /* doc */
91+
Nuitka_VersionInfoFields, /* fields */
92+
6
93+
};
94+
95+
PyStructSequence_InitType(&Nuitka_VersionInfoType, &Nuitka_VersionInfoDesc);
96+
97+
Nuitka_dunder_compiled_value = PyStructSequence_New(&Nuitka_VersionInfoType);
98+
assert(Nuitka_dunder_compiled_value != NULL);
99+
100+
PyStructSequence_SET_ITEM(Nuitka_dunder_compiled_value, 0, PyInt_FromLong(1));
101+
PyStructSequence_SET_ITEM(Nuitka_dunder_compiled_value, 1, PyInt_FromLong(6));
102+
PyStructSequence_SET_ITEM(Nuitka_dunder_compiled_value, 2, PyInt_FromLong(3));
103+
104+
PyStructSequence_SET_ITEM(Nuitka_dunder_compiled_value, 3, Nuitka_String_FromString("release"));
105+
106+
#ifdef _NUITKA_STANDALONE
107+
PyObject *is_standalone_mode = Py_True;
108+
#else
109+
PyObject *is_standalone_mode = Py_False;
110+
#endif
111+
#ifdef _NUITKA_ONEFILE_MODE
112+
PyObject *is_onefile_mode = Py_True;
113+
#else
114+
PyObject *is_onefile_mode = Py_False;
115+
#endif
116+
117+
PyStructSequence_SET_ITEM(Nuitka_dunder_compiled_value, 4, is_standalone_mode);
118+
PyStructSequence_SET_ITEM(Nuitka_dunder_compiled_value, 5, is_onefile_mode);
119+
120+
// Prevent users from creating the Nuitka version type object.
121+
Nuitka_VersionInfoType.tp_init = NULL;
122+
Nuitka_VersionInfoType.tp_new = NULL;
123+
124+
setDistributionsMetadata(global_constants[1]);
125+
}
126+
127+
// In debug mode we can check that the constants were not tampered with in any
128+
// given moment. We typically do it at program exit, but we can add extra calls
129+
// for sanity.
130+
#ifndef __NUITKA_NO_ASSERT__
131+
void checkGlobalConstants(void) {
132+
// TODO: Ask constant code to check values.
133+
134+
}
135+
#endif
136+
137+
void createGlobalConstants(void) {
138+
if (_sentinel_value == NULL) {
139+
#if PYTHON_VERSION < 0x300
140+
_sentinel_value = PyCObject_FromVoidPtr(NULL, NULL);
141+
#else
142+
// The NULL value is not allowed for a capsule, so use something else.
143+
_sentinel_value = PyCapsule_New((void *)27, "sentinel", NULL);
144+
#endif
145+
assert(_sentinel_value);
146+
147+
_createGlobalConstants();
148+
}
149+
}
1.78 KB
Binary file not shown.

0 commit comments

Comments
 (0)