q2rad 0.1.150__py3-none-any.whl → 0.1.151__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of q2rad might be problematic. Click here for more details.

q2rad/q2rad.py CHANGED
@@ -51,7 +51,7 @@ from q2rad.q2raddb import q2cursor
51
51
  from q2rad.q2appmanager import AppManager
52
52
  from q2rad.q2stylesettings import AppStyleSettings
53
53
  from q2rad.q2utils import set_logging
54
-
54
+ from q2terminal.q2terminal import Q2Terminal
55
55
  from q2rad.q2appselector import Q2AppSelect
56
56
  from q2rad.q2modules import Q2Modules
57
57
  from q2rad.q2forms import Q2Forms
@@ -672,11 +672,35 @@ class Q2RadApp(Q2App):
672
672
  mess = "Updates not found!<p>"
673
673
  q2Mess(mess)
674
674
  if upgraded:
675
- if "win32" in sys.platform:
676
- subprocess.Popen([sys.executable, "-m", "q2rad"], start_new_session=True)
677
- else:
678
- os.execv(sys.executable, [sys.executable, "-m", "q2rad"])
679
- self.close()
675
+ self.restart()
676
+
677
+ def update_from_git(self, package=""):
678
+ if os.path.isfile("poetry.lock"):
679
+ q2mess("poetry.lock presents - update from git is impossible!")
680
+ return
681
+
682
+ def callback(data):
683
+ print(data)
684
+
685
+ trm = Q2Terminal(callback=callback)
686
+ executable = sys.executable.replace("w.exe", ".exe")
687
+ for x in q2_modules:
688
+ if not x.startswith("q2"):
689
+ continue
690
+ if package and x != package:
691
+ continue
692
+ trm.run(
693
+ f"{executable} -m pip install --upgrade --force-reinstall "
694
+ f" git+https://github.com/AndreiPuchko/{x}.git"
695
+ )
696
+ print("Done")
697
+
698
+ def restart(self):
699
+ if "win32" in sys.platform:
700
+ subprocess.Popen([sys.executable, "-m", "q2rad"], start_new_session=True)
701
+ else:
702
+ os.execv(sys.executable, [sys.executable, "-m", "q2rad"])
703
+ self.close()
680
704
 
681
705
  def pip_install(self, package, latest_version):
682
706
  q2working(
q2rad/q2stylesettings.py CHANGED
@@ -49,32 +49,31 @@ class AppStyleSettings(Q2Form):
49
49
  ),
50
50
  )
51
51
 
52
- self.add_control("/h")
52
+ self.add_control("/h", "Font size")
53
+ self.add_control("minus", "-", datalen=1, datatype="int", control="button", valid=self._font_minus)
54
+
53
55
  self.add_control(
54
56
  "font_size",
55
- "Font size",
57
+ "",
56
58
  datalen=6,
57
59
  datatype="int",
58
- control="spin",
60
+ control="line",
59
61
  data=self.q2_app.q2style.font_size,
60
- )
61
- self.add_control(
62
- "apply",
63
- "Apply",
64
- datalen=10,
65
- datatype="int",
66
- control="button",
67
62
  valid=self.style_valid,
68
63
  )
64
+ self.add_control("plus", "+", datalen=1, datatype="int", control="button", valid=self._font_plus)
69
65
  self.add_control("/")
70
66
 
71
67
  self.ok_button = 1
72
68
  self.cancel_button = 1
73
69
 
74
- # def after_form_show(self):
75
- # self.s.color_mode = self.color_modes.get(
76
- # self.q2_app.q2style.color_mode, self.q2_app.q2style.get_system_color_mode()
77
- # )
70
+ def _font_plus(self):
71
+ self.s.font_size = int_(self.s.font_size) + 1
72
+ self.style_valid()
73
+
74
+ def _font_minus(self):
75
+ self.s.font_size = int_(self.s.font_size) - 1
76
+ self.style_valid()
78
77
 
79
78
  def get_color_mode(self):
80
79
  color_mode = self.s.color_mode.lower()
@@ -92,6 +91,9 @@ class AppStyleSettings(Q2Form):
92
91
 
93
92
  def style_valid(self):
94
93
  self.q2_app.q2style.font_size = int_(self.s.font_size)
94
+ if self.q2_app.q2style.font_size < 8:
95
+ self.s.font_size = 8
96
+ self.style_valid()
95
97
  self.q2_app.set_color_mode(self.get_color_mode())
96
98
  self.q2_app.set_color_mode(self.get_color_mode())
97
99
 
q2rad/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.150"
1
+ __version__ = "0.1.151"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: q2rad
3
- Version: 0.1.150
3
+ Version: 0.1.151
4
4
  Summary: RAD - database, GUI, reports
5
5
  Author: Andrei Puchko
6
6
  Author-email: andrei.puchko@gmx.de
@@ -34,23 +34,36 @@ sudo apt install python3-pip python3-virtualenv
34
34
  ```
35
35
 
36
36
  ## Install & run - Launcher (https://github.com/AndreiPuchko/q2radlauncher)
37
- **Linux**: https://github.com/AndreiPuchko/q2radlauncher/blob/main/bin/linux/q2radlauncher
38
-
39
37
  **Windows**: https://github.com/AndreiPuchko/q2radlauncher/blob/main/bin/windows/q2radlauncher.exe
40
38
 
39
+ **Linux**: https://github.com/AndreiPuchko/q2radlauncher/blob/main/bin/linux/q2radlauncher
40
+
41
41
  **macOS**: run from terminal or ```git clone https://github.com/AndreiPuchko/q2radlauncher``` and build executable with ```build_executable.zsh```
42
42
 
43
43
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;https://github.com/AndreiPuchko/q2radlauncher/blob/main/bin/macos/q2radlauncher
44
44
  ## Install & run - Python script
45
- **Linux, macOS**
45
+ **Windows**
46
+ ```bash
47
+ wget https://raw.githubusercontent.com/AndreiPuchko/q2rad/main/install/get-q2rad.py -O get-q2rad.py | py get-q2rad.py; del get-q2rad.py
48
+ ```
49
+ **Linux**
46
50
  ```bash
47
51
  wget https://raw.githubusercontent.com/AndreiPuchko/q2rad/main/install/get-q2rad.py -O - | python3
48
52
  ```
49
- **Windows**
53
+ **macOS**
50
54
  ```bash
51
- wget https://raw.githubusercontent.com/AndreiPuchko/q2rad/main/install/get-q2rad.py -O get-q2rad.py | py get-q2rad.py; del get-q2rad.py
55
+ curl https://raw.githubusercontent.com/AndreiPuchko/q2rad/main/install/get-q2rad.py | python3
52
56
  ```
53
57
  ## Install & run - terminal
58
+ **Windows (Powershell)**
59
+ ```bash
60
+ mkdir q2rad ;`
61
+ cd q2rad ;`
62
+ py -m pip install --upgrade pip ;`
63
+ py -m venv q2rad;q2rad/scripts/activate ;`
64
+ py -m pip install --upgrade q2rad ;`
65
+ q2rad
66
+ ```
54
67
  **Linux**
55
68
  ```bash
56
69
  sudo apt install python3-venv python3-pip -y &&\
@@ -62,15 +75,6 @@ sudo apt install python3-venv python3-pip -y &&\
62
75
  python3 -m pip install --upgrade q2rad && \
63
76
  q2rad
64
77
  ```
65
- **Windows (Powershell)**
66
- ```bash
67
- mkdir q2rad ;`
68
- cd q2rad ;`
69
- py -m pip install --upgrade pip ;`
70
- py -m venv q2rad;q2rad/scripts/activate ;`
71
- py -m pip install --upgrade q2rad ;`
72
- q2rad
73
- ```
74
78
  **macOS**
75
79
  ```bash
76
80
  mkdir -p q2rad && \
@@ -10,14 +10,14 @@ q2rad/q2market.py,sha256=pqo16gG6ic0vMgBllwdzdb_KX3SFCSG5wY1dqRv77qs,2768
10
10
  q2rad/q2modules.py,sha256=GhDDXWmdvVZUUjHR1Dop7hHYJN6Lj0cEjzsIRnEYuBs,3963
11
11
  q2rad/q2packages.py,sha256=y3_eZyScxZqHH0saGpeelleG3WuNx8MfCbTPtRqzses,3460
12
12
  q2rad/q2queries.py,sha256=09OsTt05VBY6Bcn2f7jvqUEWpQO2e248HmKUNuLtnr0,12065
13
- q2rad/q2rad.py,sha256=OFI22dqz2iToCtCB2oDDpZkAPaLCiPHcz6lNbSC_gk4,38338
13
+ q2rad/q2rad.py,sha256=zTwEfunBB84XtB0gJbmu5ZJJYl1JprrPhWLixFkaFDY,39135
14
14
  q2rad/q2raddb.py,sha256=4sBuExWJHk-tUmt1CiLrSAdlHT3uTjjwZ75ibv6YW1Y,4467
15
15
  q2rad/q2reports.py,sha256=TIuGWrkzfp8ghsk1TA055_VRyKzC_YrWEHJGvBtjtnE,80033
16
- q2rad/q2stylesettings.py,sha256=5Pc6cFmxgt0_CdBKsM4J4YvVBQSn7WX5SqxoVtaGALo,3410
16
+ q2rad/q2stylesettings.py,sha256=wilUST04g9ZkvmWIIs_rWeg9m7mfcz27MI7mTmB3y3E,3610
17
17
  q2rad/q2utils.py,sha256=CjLH6nPSP1WbTTcvlaiPUl6lLsXi9lGY4gaNVVuw8FY,8908
18
- q2rad/version.py,sha256=aI02xc9GhWyF53zP9DZFnb7nRPtAd3esINGNYQQj_rA,23
19
- q2rad-0.1.150.dist-info/entry_points.txt,sha256=DmsJQE6f3wYuhdN2h6ARYxSe8_d03paeepfGpdVj5rs,42
20
- q2rad-0.1.150.dist-info/LICENSE,sha256=JRR3LlR18ghhYXT4G2cWgXmnxRvcuVcKlqncWWK4MRY,10347
21
- q2rad-0.1.150.dist-info/METADATA,sha256=4GOQUj_zB-4mrwGRUGmEjK9nwc7mfu91Q_q6dKmtZVU,3399
22
- q2rad-0.1.150.dist-info/WHEEL,sha256=WGfLGfLX43Ei_YORXSnT54hxFygu34kMpcQdmgmEwCQ,88
23
- q2rad-0.1.150.dist-info/RECORD,,
18
+ q2rad/version.py,sha256=f_iWj0XpobbXXAzfHuUTADA-UHapplzcf3Kcmd1cqcU,23
19
+ q2rad-0.1.151.dist-info/entry_points.txt,sha256=DmsJQE6f3wYuhdN2h6ARYxSe8_d03paeepfGpdVj5rs,42
20
+ q2rad-0.1.151.dist-info/LICENSE,sha256=JRR3LlR18ghhYXT4G2cWgXmnxRvcuVcKlqncWWK4MRY,10347
21
+ q2rad-0.1.151.dist-info/METADATA,sha256=QFqWtptE9z1udh7faUv8KhAJcqG5jGRoBLtkr65VMN8,3509
22
+ q2rad-0.1.151.dist-info/WHEEL,sha256=WGfLGfLX43Ei_YORXSnT54hxFygu34kMpcQdmgmEwCQ,88
23
+ q2rad-0.1.151.dist-info/RECORD,,