From ae9fdd7ad003f9c93bb48289a75c3074cbaee61e Mon Sep 17 00:00:00 2001
From: Ralphred
Date: Tue, 8 Oct 2024 10:02:48 +0100
Subject: [PATCH] qt6 updates
---
QtGentools.epj | 43 +--
__init__.py | 0
pyqt6eix | 400 ++++++++++++++++++++++++++
qtgentools.py | 4 +-
ui/.Ui_mainwindow.py.kate-swp | Bin 0 -> 218 bytes
ui/Ui_emerge_tab.py | 119 ++++++++
ui/Ui_mainwindow.py | 315 +++------------------
ui/mainwindow.py | 12 +-
ui/mainwindow.ui | 515 ++--------------------------------
9 files changed, 618 insertions(+), 790 deletions(-)
create mode 100644 __init__.py
create mode 100755 pyqt6eix
create mode 100644 ui/.Ui_mainwindow.py.kate-swp
create mode 100644 ui/Ui_emerge_tab.py
diff --git a/QtGentools.epj b/QtGentools.epj
index 199a69d..179d20f 100644
--- a/QtGentools.epj
+++ b/QtGentools.epj
@@ -1,33 +1,36 @@
{
"header": {
"comment": "eric project file for project QtGentools",
- "copyright": "Copyright (C) 2021 Andrew Foster, qtgentools@liquid.me.uk",
- "saved": "2021-07-10, 19:00:17"
+ "copyright": "Copyright (C) 2024 , ",
+ "saved": "2024-10-08, 09:01:31"
},
"project": {
- "AUTHOR": "Andrew Foster",
+ "AUTHOR": "",
"CHECKERSPARMS": {},
- "DESCRIPTION": "Set of GUI tools for helping to manage portage",
+ "DESCRIPTION": "",
"DOCSTRING": "",
"DOCUMENTATIONPARMS": {},
- "EMAIL": "qtgentools@liquid.me.uk",
+ "EMAIL": "",
+ "EMBEDDED_VENV": false,
"EOL": 0,
"FILETYPES": {
- "*.e4p": "OTHERS",
+ "*.cfg": "OTHERS",
"*.epj": "OTHERS",
- "*.idl": "INTERFACES",
+ "*.ini": "OTHERS",
+ "*.json": "OTHERS",
"*.md": "OTHERS",
- "*.proto": "PROTOCOLS",
"*.py": "SOURCES",
"*.py3": "SOURCES",
"*.pyw": "SOURCES",
"*.pyw3": "SOURCES",
"*.qm": "TRANSLATIONS",
- "*.qrc": "RESOURCES",
"*.rst": "OTHERS",
+ "*.toml": "OTHERS",
"*.ts": "TRANSLATIONS",
"*.txt": "OTHERS",
"*.ui": "FORMS",
+ "*.yaml": "OTHERS",
+ "*.yml": "OTHERS",
"GNUmakefile": "OTHERS",
"Makefile": "OTHERS",
"README": "OTHERS",
@@ -35,17 +38,18 @@
"makefile": "OTHERS"
},
"FORMS": [
+ "ui/emerge_tab.ui",
"ui/mainwindow.ui"
],
- "HASH": "d281728577b1da42b1c49d27174d437ec65311a5",
+ "HASH": "881f07b5076ce75c16ca461668c9e1a7f7ab9358",
"IDLPARAMS": {
"DefinedNames": [],
"IncludeDirs": [],
"UndefinedNames": []
},
- "INTERFACES": [],
"LEXERASSOCS": {},
- "MAINSCRIPT": "qtgentools.py",
+ "LICENSE": "",
+ "MAINSCRIPT": "",
"MAKEPARAMS": {
"MakeEnabled": false,
"MakeExecutable": "",
@@ -56,14 +60,13 @@
},
"MIXEDLANGUAGE": false,
"OTHERS": [
- ".gitignore"
+ "QtGentools.epj"
],
"OTHERTOOLSPARMS": {},
"PACKAGERSPARMS": {},
"PROGLANGUAGE": "Python3",
- "PROJECTTYPE": "PyQt5",
+ "PROJECTTYPE": "PyQt6",
"PROJECTTYPESPECIFICDATA": {},
- "PROTOCOLS": [],
"RCCPARAMS": {
"CompressLevel": 0,
"CompressionDisable": false,
@@ -72,17 +75,21 @@
},
"RESOURCES": [],
"SOURCES": [
+ "__init__.py",
"qtgentools.py",
"ui/Ui_mainwindow.py",
"ui/mainwindow.py"
],
+ "SOURCESDIR": "",
"SPELLEXCLUDES": "",
- "SPELLLANGUAGE": "",
+ "SPELLLANGUAGE": "en_US",
"SPELLWORDS": "",
+ "TESTING_FRAMEWORK": "",
"TRANSLATIONEXCEPTIONS": [],
"TRANSLATIONPATTERN": "",
"TRANSLATIONS": [],
"TRANSLATIONSBINPATH": "",
+ "TRANSLATIONSOURCESTARTPATH": "",
"UICPARAMS": {
"Package": "",
"PackagesRoot": "",
@@ -128,6 +135,6 @@
]
},
"VCSOTHERDATA": {},
- "VERSION": "0.1"
+ "VERSION": "6.1"
}
-}
\ No newline at end of file
+}
diff --git a/__init__.py b/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/pyqt6eix b/pyqt6eix
new file mode 100755
index 0000000..f1af285
--- /dev/null
+++ b/pyqt6eix
@@ -0,0 +1,400 @@
+#!/usr/bin/env python
+from PyQt6 import QtCore, QtGui, QtWidgets
+from PyQt6.QtWidgets import QApplication,QMainWindow
+from subprocess import PIPE,Popen,TimeoutExpired
+import re
+from PyQt6.QtGui import QStandardItemModel,QStandardItem
+
+class Ui_MainWindow(object):
+ def setupUi(self, MainWindow):
+ MainWindow.setObjectName("MainWindow")
+ MainWindow.resize(732, 462)
+ self.centralWidget = QtWidgets.QWidget(parent=MainWindow)
+ self.centralWidget.setObjectName("centralWidget")
+ self.gridLayout_2 = QtWidgets.QGridLayout(self.centralWidget)
+ self.gridLayout_2.setObjectName("gridLayout_2")
+ self.tw_1 = QtWidgets.QTabWidget(parent=self.centralWidget)
+ self.tw_1.setObjectName("tw_1")
+ self.tab_search = QtWidgets.QWidget()
+ self.tab_search.setObjectName("tab_search")
+ self.gridLayout = QtWidgets.QGridLayout(self.tab_search)
+ self.gridLayout.setObjectName("gridLayout")
+ self.s_pb_expand_pkg = QtWidgets.QPushButton(parent=self.tab_search)
+ self.s_pb_expand_pkg.setObjectName("s_pb_expand_pkg")
+ self.gridLayout.addWidget(self.s_pb_expand_pkg, 5, 1, 1, 2)
+ self.s_pb_updatedb = QtWidgets.QPushButton(parent=self.tab_search)
+ self.s_pb_updatedb.setObjectName("s_pb_updatedb")
+ self.gridLayout.addWidget(self.s_pb_updatedb, 5, 5, 1, 2)
+ self.s_le_search = QtWidgets.QLineEdit(parent=self.tab_search)
+ self.s_le_search.setText("")
+ self.s_le_search.setObjectName("s_le_search")
+ self.gridLayout.addWidget(self.s_le_search, 0, 8, 1, 2)
+ self.s_le_command = QtWidgets.QLineEdit(parent=self.tab_search)
+ self.s_le_command.setEnabled(False)
+ self.s_le_command.setObjectName("s_le_command")
+ self.gridLayout.addWidget(self.s_le_command, 5, 7, 1, 4)
+ self.s_pb_search = QtWidgets.QPushButton(parent=self.tab_search)
+ self.s_pb_search.setObjectName("s_pb_search")
+ self.gridLayout.addWidget(self.s_pb_search, 0, 10, 1, 1)
+ spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Minimum)
+ self.gridLayout.addItem(spacerItem, 2, 9, 1, 1)
+ self.s_pb_expand_all = QtWidgets.QPushButton(parent=self.tab_search)
+ self.s_pb_expand_all.setObjectName("s_pb_expand_all")
+ self.gridLayout.addWidget(self.s_pb_expand_all, 5, 0, 1, 1)
+ self.s_pb_collapse = QtWidgets.QPushButton(parent=self.tab_search)
+ self.s_pb_collapse.setObjectName("s_pb_collapse")
+ self.gridLayout.addWidget(self.s_pb_collapse, 5, 3, 1, 2)
+ spacerItem1 = QtWidgets.QSpacerItem(81, 48, QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Minimum)
+ self.gridLayout.addItem(spacerItem1, 1, 10, 2, 1)
+ self.s_tv_results = QtWidgets.QTreeView(parent=self.tab_search)
+ self.s_tv_results.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
+ self.s_tv_results.setProperty("showDropIndicator", False)
+ self.s_tv_results.setAlternatingRowColors(True)
+ self.s_tv_results.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.NoSelection)
+ self.s_tv_results.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectItems)
+ self.s_tv_results.setSortingEnabled(False)
+ self.s_tv_results.setWordWrap(False)
+ self.s_tv_results.setObjectName("s_tv_results")
+ self.s_tv_results.header().setCascadingSectionResizes(False)
+ self.s_tv_results.header().setSortIndicatorShown(False)
+ self.s_tv_results.header().setStretchLastSection(True)
+ self.gridLayout.addWidget(self.s_tv_results, 3, 0, 1, 11)
+ self.verticalLayout_4 = QtWidgets.QVBoxLayout()
+ self.verticalLayout_4.setObjectName("verticalLayout_4")
+ self.s_cb_stable = QtWidgets.QCheckBox(parent=self.tab_search)
+ self.s_cb_stable.setObjectName("s_cb_stable")
+ self.verticalLayout_4.addWidget(self.s_cb_stable)
+ self.s_rb_any = QtWidgets.QRadioButton(parent=self.tab_search)
+ self.s_rb_any.setCheckable(True)
+ self.s_rb_any.setObjectName("s_rb_any")
+ self.verticalLayout_4.addWidget(self.s_rb_any)
+ self.s_rb_iuse = QtWidgets.QRadioButton(parent=self.tab_search)
+ self.s_rb_iuse.setObjectName("s_rb_iuse")
+ self.verticalLayout_4.addWidget(self.s_rb_iuse)
+ self.gridLayout.addLayout(self.verticalLayout_4, 0, 0, 3, 1)
+ self.s_pbar = QtWidgets.QProgressBar(parent=self.tab_search)
+ self.s_pbar.setProperty("value", 0)
+ self.s_pbar.setTextVisible(True)
+ self.s_pbar.setFormat("")
+ self.s_pbar.setObjectName("s_pbar")
+ self.gridLayout.addWidget(self.s_pbar, 4, 0, 1, 11)
+ self.s_lcd_results = QtWidgets.QLCDNumber(parent=self.tab_search)
+ self.s_lcd_results.setDigitCount(5)
+ self.s_lcd_results.setSegmentStyle(QtWidgets.QLCDNumber.SegmentStyle.Flat)
+ self.s_lcd_results.setObjectName("s_lcd_results")
+ self.gridLayout.addWidget(self.s_lcd_results, 2, 8, 1, 1)
+ spacerItem2 = QtWidgets.QSpacerItem(101, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
+ self.gridLayout.addItem(spacerItem2, 1, 8, 1, 2)
+ self.verticalLayout_3 = QtWidgets.QVBoxLayout()
+ self.verticalLayout_3.setObjectName("verticalLayout_3")
+ self.s_cb_testing = QtWidgets.QCheckBox(parent=self.tab_search)
+ self.s_cb_testing.setObjectName("s_cb_testing")
+ self.verticalLayout_3.addWidget(self.s_cb_testing)
+ self.s_rb_decription = QtWidgets.QRadioButton(parent=self.tab_search)
+ self.s_rb_decription.setObjectName("s_rb_decription")
+ self.verticalLayout_3.addWidget(self.s_rb_decription)
+ self.s_rb_use_enabled = QtWidgets.QRadioButton(parent=self.tab_search)
+ self.s_rb_use_enabled.setObjectName("s_rb_use_enabled")
+ self.verticalLayout_3.addWidget(self.s_rb_use_enabled)
+ self.gridLayout.addLayout(self.verticalLayout_3, 0, 1, 3, 2)
+ self.verticalLayout_2 = QtWidgets.QVBoxLayout()
+ self.verticalLayout_2.setObjectName("verticalLayout_2")
+ self.s_cb_installed = QtWidgets.QCheckBox(parent=self.tab_search)
+ self.s_cb_installed.setObjectName("s_cb_installed")
+ self.verticalLayout_2.addWidget(self.s_cb_installed)
+ self.s_rb_category = QtWidgets.QRadioButton(parent=self.tab_search)
+ self.s_rb_category.setObjectName("s_rb_category")
+ self.verticalLayout_2.addWidget(self.s_rb_category)
+ self.s_rb_use_disabled = QtWidgets.QRadioButton(parent=self.tab_search)
+ self.s_rb_use_disabled.setObjectName("s_rb_use_disabled")
+ self.verticalLayout_2.addWidget(self.s_rb_use_disabled)
+ self.gridLayout.addLayout(self.verticalLayout_2, 0, 3, 3, 2)
+ self.verticalLayout = QtWidgets.QVBoxLayout()
+ self.verticalLayout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetDefaultConstraint)
+ self.verticalLayout.setObjectName("verticalLayout")
+ self.s_cb_overlay = QtWidgets.QCheckBox(parent=self.tab_search)
+ self.s_cb_overlay.setTristate(False)
+ self.s_cb_overlay.setObjectName("s_cb_overlay")
+ self.verticalLayout.addWidget(self.s_cb_overlay)
+ self.s_rb_name = QtWidgets.QRadioButton(parent=self.tab_search)
+ self.s_rb_name.setObjectName("s_rb_name")
+ self.verticalLayout.addWidget(self.s_rb_name)
+ self.s_l_results = QtWidgets.QLabel(parent=self.tab_search)
+ self.s_l_results.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter)
+ self.s_l_results.setObjectName("s_l_results")
+ self.verticalLayout.addWidget(self.s_l_results)
+ self.gridLayout.addLayout(self.verticalLayout, 0, 5, 3, 3)
+ self.tw_1.addTab(self.tab_search, "")
+ self.gridLayout_2.addWidget(self.tw_1, 0, 1, 1, 1)
+ MainWindow.setCentralWidget(self.centralWidget)
+
+ self.retranslateUi(MainWindow)
+ self.tw_1.setCurrentIndex(0)
+ QtCore.QMetaObject.connectSlotsByName(MainWindow)
+
+ def retranslateUi(self, MainWindow):
+ _translate = QtCore.QCoreApplication.translate
+ MainWindow.setWindowTitle(_translate("MainWindow", "PyQt6Eix"))
+ self.s_pb_expand_pkg.setToolTip(_translate("MainWindow", "
Expand all categories to show packages
"))
+ self.s_pb_expand_pkg.setText(_translate("MainWindow", "Exp Categories"))
+ self.s_pb_updatedb.setToolTip(_translate("MainWindow", "\n"
+"\n"
+"Update eix\'s database, runs:
\n"
+"sudo eix-update
"))
+ self.s_pb_updatedb.setText(_translate("MainWindow", "Update DB"))
+ self.s_le_search.setPlaceholderText(_translate("MainWindow", "Enter search term"))
+ self.s_le_command.setText(_translate("MainWindow", "eix"))
+ self.s_pb_search.setToolTip(_translate("MainWindow", "Starts searching with the specified parameters
"))
+ self.s_pb_search.setText(_translate("MainWindow", "Search"))
+ self.s_pb_expand_all.setToolTip(_translate("MainWindow", "Expand all tree entries
"))
+ self.s_pb_expand_all.setText(_translate("MainWindow", "Expand All"))
+ self.s_pb_collapse.setToolTip(_translate("MainWindow", "Collapse tree
"))
+ self.s_pb_collapse.setText(_translate("MainWindow", "Collapse"))
+ self.s_tv_results.setToolTip(_translate("MainWindow", "Results show here
"))
+ self.s_cb_stable.setToolTip(_translate("MainWindow", "Include only packages with a stable version
"))
+ self.s_cb_stable.setText(_translate("MainWindow", "Stable"))
+ self.s_rb_any.setToolTip(_translate("MainWindow", "Search any field"))
+ self.s_rb_any.setText(_translate("MainWindow", "An&y"))
+ self.s_rb_iuse.setToolTip(_translate("MainWindow", "Search for packages that support a specific use flag(s)
"))
+ self.s_rb_iuse.setText(_translate("MainWindow", "&Use Support"))
+ self.s_cb_testing.setToolTip(_translate("MainWindow", "Include only packages with a testing version
"))
+ self.s_cb_testing.setText(_translate("MainWindow", "Testing"))
+ self.s_rb_decription.setToolTip(_translate("MainWindow", "Search the description field"))
+ self.s_rb_decription.setText(_translate("MainWindow", "&Description"))
+ self.s_rb_use_enabled.setToolTip(_translate("MainWindow", "Search for packages installed with a specific use flag enabled
"))
+ self.s_rb_use_enabled.setText(_translate("MainWindow", "Use Enab&led"))
+ self.s_cb_installed.setToolTip(_translate("MainWindow", "Include only installed packages
"))
+ self.s_cb_installed.setText(_translate("MainWindow", "Installed"))
+ self.s_rb_category.setToolTip(_translate("MainWindow", "Search the category field"))
+ self.s_rb_category.setText(_translate("MainWindow", "Ca&tegory"))
+ self.s_rb_use_disabled.setToolTip(_translate("MainWindow", "Search for packages instealled with a specific use flag disabled
"))
+ self.s_rb_use_disabled.setText(_translate("MainWindow", "Use Disabled"))
+ self.s_cb_overlay.setToolTip(_translate("MainWindow", "Include only packages with at least one version in an overlay
"))
+ self.s_cb_overlay.setText(_translate("MainWindow", "Overlay"))
+ self.s_rb_name.setToolTip(_translate("MainWindow", "Search the name field"))
+ self.s_rb_name.setText(_translate("MainWindow", "&Name"))
+ self.s_l_results.setText(_translate("MainWindow", "Results: "))
+ self.tw_1.setTabText(self.tw_1.indexOf(self.tab_search), _translate("MainWindow", "Search"))
+
+
+debug=False #True
+
+class d_Category:
+ def __init__(self):
+ self.Name=''
+ self.Packages=[]
+
+class d_Package:
+ def __init__(self):
+ self.Name=''
+ self.Versions=[]
+
+class MainWindow(QMainWindow, Ui_MainWindow):
+ def __init__(self, parent=None):
+ super(MainWindow, self).__init__(parent)
+ self.setupUi(self)
+ self.d_catsupop=True
+ self.s_cb_option={
+ 's_cb_stable':[self.s_cb_stable,'--stable'],
+ 's_cb_testing':[self.s_cb_testing,'--testing'],
+ 's_cb_installed':[self.s_cb_installed,'--installed'],
+ 's_cb_overlay':[self.s_cb_overlay,'--overlay'],
+ }
+ self.s_rb_option={
+ 's_rb_decription':[self.s_rb_decription,'--description'],
+ 's_rb_use_disabled':[self.s_rb_use_disabled,'--installed-without-use'],
+ 's_rb_any':[self.s_rb_any,'--any'],
+ 's_rb_name':[self.s_rb_name,'--name'],
+ 's_rb_category':[self.s_rb_category,'--category'],
+ 's_rb_iuse':[self.s_rb_iuse,'--use'],
+ 's_rb_use_enabled':[self.s_rb_use_enabled,'--installed-with-use'],
+ }
+ self.s_cats=0
+
+ def redraw_window(self):
+ self.update()
+ QApplication.processEvents()
+
+ def fold_use(self,use,trim):
+ if len(use)>trim:
+ uselist=use.split(' ')
+ nbp=trim
+ use=''
+ for usept in uselist:
+ usept=uselist.pop(0)
+ if len(use)+len(usept)>nbp:
+ use='%s\n'%use
+ trim+=2
+ nbp+=trim
+ use='%s %s'%(use,usept)
+ return use
+
+#section search tab
+ def on_s_pb_expand_pkg_released(self):
+ model=self.s_tv_results.model()
+ if not model:return
+ for a in range(0,self.s_cats+1):
+ self.s_tv_results.expand(model.createIndex(a,1))
+
+ def on_s_pb_updatedb_released(self):
+ child=Popen(['sudo','eix-update'])
+ child.wait()
+
+ def on_s_pb_search_released(self):
+ options=['eix']
+ for rb in self.s_rb_option:
+ if self.s_rb_option[rb][0].isChecked():
+ options.append(self.s_rb_option[rb][1])
+ break
+ for cb in self.s_cb_option:
+ if self.s_cb_option[cb][0].isChecked():
+ options.append(self.s_cb_option[cb][1])
+ term=self.s_le_search.text()
+ options.append(term)
+ cmnd=' '.join(options)
+ self.s_pbar.setFormat('Running: %s'%cmnd)
+ self.s_le_command.setText(cmnd)
+ self.s_le_command.setEnabled(True)
+ self.s_doSearch(options)
+
+ def on_s_pb_expand_all_released(self):
+ self.s_tv_results.expandAll()
+
+ def on_s_pb_collapse_released(self):
+ self.s_tv_results.collapseAll()
+
+ def on_s_le_search_returnPressed(self):
+ self.on_s_pb_search_released()
+
+ def on_s_tv_results_doubleClicked(self,p0):
+ url=p0.model().data(p0)
+ match=re.match('^https?://.*?( |$)',url)
+ if match:
+ url=url[:match.end()]
+ helpers=['xdg-open','kde-open5',]
+ for helper in helpers:
+ try:
+ child=Popen([helper,url])
+ if child.wait(timeout=5)==0:
+ return
+ except FileNotFoundError:
+ continue
+ except TimeoutExpired:
+ child.kill()
+ continue
+
+ def s_doSearch(self,options):
+ AVERS='Avail¬¬¬¬{isminuskeyword}-K{}{isminusunstable}-{}{isminusasterisk}-*{}{isprofilemasked}[P]{}{ismasked}[m]{}{isunstable}~{}{ismissingkeyword}**{}¬¬¬¬Experimental feature:
May result in spurious parent/child relationships in depgraph
The packages listed are still the correct dependencies.
"))
- self.d_ckb_installed.setText(_translate("MainWindow", "Exclude Installed"))
- self.d_pb_calculate.setToolTip(_translate("MainWindow", "Click to do stuff
"))
- self.d_pb_calculate.setText(_translate("MainWindow", "Calculate"))
- self.d_rb_manual.setText(_translate("MainWindow", "Enter Package"))
- self.d_pb_expand.setText(_translate("MainWindow", "Expand All"))
- self.d_pb_collapse.setText(_translate("MainWindow", "Collapse All"))
- self.label.setText(_translate("MainWindow", "Deps Found:"))
- self.tw_1.setTabText(self.tw_1.indexOf(self.tab_depgraph), _translate("MainWindow", "Dep Graph"))
- self.e_rb_new_use.setToolTip(_translate("MainWindow", "Adds the --newuse (-N) option to the emerge command
"))
- self.e_rb_new_use.setText(_translate("MainWindow", "New Use"))
- self.e_rb_update.setToolTip(_translate("MainWindow", "Adds the --update (-u) option to the emerge command
"))
- self.e_rb_update.setText(_translate("MainWindow", "Update"))
- self.e_cb_deep.setText(_translate("MainWindow", "Deep"))
- self.e_rb_world.setText(_translate("MainWindow", "@World"))
- self.e_rb_atom.setToolTip(_translate("MainWindow", "Enter a specific atom or set in the box below to use this option
"))
- self.e_rb_atom.setText(_translate("MainWindow", "Atom Below"))
- self.e_pb_go.setToolTip(_translate("MainWindow", "Executes the command with the set parameters
All command run with \'--pretend\' set.
\'--pretend\' is substituted for \'--ask\' on the displayed command, for quick copy and pasting.
"))
- self.e_pb_go.setText(_translate("MainWindow", "Execute"))
- self.e_rb_ch_use.setToolTip(_translate("MainWindow", "Adds the --changed-use (-U) option to the emerge command
"))
- self.e_rb_ch_use.setText(_translate("MainWindow", "Changed Use"))
- self.e_rb_emptytree.setToolTip(_translate("MainWindow", "Adds the --emptytree (-e) option to the emerge command
"))
- self.e_rb_emptytree.setText(_translate("MainWindow", "Empty Tree"))
- self.e_cb_nodeps.setToolTip(_translate("MainWindow", "Adds the --nodeps option to the emerge command (speeds up checking for use changes on a single package)
"))
- self.e_cb_nodeps.setText(_translate("MainWindow", "No Deps"))
- self.e_rb_system.setText(_translate("MainWindow", "@System"))
- self.e_le_atom.setPlaceholderText(_translate("MainWindow", "Enter atom or set here"))
- self.u_le_cmd.setToolTip(_translate("MainWindow", "Command to run in a terminal to make proposed changes
"))
- self.tw_1.setTabText(self.tw_1.indexOf(self.tab_update), _translate("MainWindow", "Emerge"))
if __name__ == "__main__":
@@ -415,4 +190,4 @@ if __name__ == "__main__":
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
- sys.exit(app.exec_())
+ sys.exit(app.exec())
diff --git a/ui/mainwindow.py b/ui/mainwindow.py
index 1ea27ca..b00a9fc 100644
--- a/ui/mainwindow.py
+++ b/ui/mainwindow.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-from PyQt5.QtWidgets import QApplication,QMainWindow
+from PyQt6.QtWidgets import QApplication,QMainWindow
from .Ui_mainwindow import Ui_MainWindow
from subprocess import PIPE,Popen,TimeoutExpired
import re
-from PyQt5.QtGui import QStandardItemModel,QStandardItem
+from PyQt6.QtGui import QStandardItemModel,QStandardItem
debug=False #True
@@ -123,9 +123,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
if enders.match(output):
break
if in_results:
- output=re.sub('\(~\)','~',output)
+ output=re.sub('\\(~\\)','~',output)
output=re.sub('~ {1,9}','~',output)
- output=re.sub('\*\*',' ',output)
+ output=re.sub('\\*\\*',' ',output)
output=output.split()[0]
if output[0]=='(':continue
self.d_cb_version.addItem(output)
@@ -190,7 +190,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
depth=1
cmd=['equery','-C','g',pkg,'--depth=%s'%depth]
process=Popen(cmd,encoding='utf-8',stdout=PIPE)
- re_depth=re.compile('\[ {0,2}[0-9]{1,3}\]')
+ re_depth=re.compile('\\[ {0,2}[0-9]{1,3}\\]')
uid=0
pdict={}
items={}
@@ -385,7 +385,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
data=result.split('¬¬')
dataset.append({'UID':uid,'PUID':ppuid,'Cat':data[1],'Nam':'Installed ->','Des':''.join(data[2:4]),'Hom':data[4]})
uid+=1
- elif re.match('^\[[0-9]*?\] "',result):
+ elif re.match('^\\[[0-9]*?\\] "',result):
if 'Overlays' not in cats:
dataset.append({'UID':uid,'PUID':0,'Cat':'Overlays','Nam':'','Des':'','Hom':''})
puid=uid
diff --git a/ui/mainwindow.ui b/ui/mainwindow.ui
index f811c47..2b0d8a7 100644
--- a/ui/mainwindow.ui
+++ b/ui/mainwindow.ui
@@ -6,8 +6,8 @@
0
0
- 685
- 452
+ 732
+ 462
@@ -83,10 +83,10 @@ p, li { white-space: pre-wrap; }
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
- QSizePolicy::MinimumExpanding
+ QSizePolicy::Policy::MinimumExpanding
@@ -119,10 +119,10 @@ p, li { white-space: pre-wrap; }
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
- QSizePolicy::Preferred
+ QSizePolicy::Policy::Preferred
@@ -138,7 +138,7 @@ p, li { white-space: pre-wrap; }
<html><head/><body><p>Results show here</p></body></html>
- QAbstractItemView::NoEditTriggers
+ QAbstractItemView::EditTrigger::NoEditTriggers
false
@@ -147,10 +147,10 @@ p, li { white-space: pre-wrap; }
true
- QAbstractItemView::NoSelection
+ QAbstractItemView::SelectionMode::NoSelection
- QAbstractItemView::SelectItems
+ QAbstractItemView::SelectionBehavior::SelectItems
false
@@ -187,7 +187,7 @@ p, li { white-space: pre-wrap; }
Search any field
- Any
+ An&y
true
@@ -200,7 +200,7 @@ p, li { white-space: pre-wrap; }
<html><head/><body><p>Search for packages that support a specific use flag(s)</p></body></html>
- Use Support
+ &Use Support
@@ -225,14 +225,14 @@ p, li { white-space: pre-wrap; }
5
- QLCDNumber::Flat
+ QLCDNumber::SegmentStyle::Flat
-
- Qt::Horizontal
+ Qt::Orientation::Horizontal
@@ -260,7 +260,7 @@ p, li { white-space: pre-wrap; }
Search the description field
- Description
+ &Description
@@ -270,7 +270,7 @@ p, li { white-space: pre-wrap; }
<html><head/><body><p>Search for packages installed with a specific use flag enabled</p></body></html>
- Use Enabled
+ Use Enab&led
@@ -294,7 +294,7 @@ p, li { white-space: pre-wrap; }
Search the category field
- Category
+ Ca&tegory
@@ -313,7 +313,7 @@ p, li { white-space: pre-wrap; }
-
- QLayout::SetDefaultConstraint
+ QLayout::SizeConstraint::SetDefaultConstraint
-
@@ -334,7 +334,7 @@ p, li { white-space: pre-wrap; }
Search the name field
- Name
+ &Name
@@ -344,7 +344,7 @@ p, li { white-space: pre-wrap; }
Results:
- Qt::AlignCenter
+ Qt::AlignmentFlag::AlignCenter
@@ -352,479 +352,6 @@ p, li { white-space: pre-wrap; }
-
-
- Dep Graph
-
-
- -
-
-
- Select Package
-
-
- true
-
-
-
- -
-
-
- <html><head/><body><p>Select a package category from the list</p></body></html>
-
-
-
-
- Select Category
-
-
-
-
- -
-
-
- <html><head/><body><p>Select a package from the list</p></body></html>
-
-
-
-
- Select Package
-
-
-
-
- -
-
-
- <html><head/><body><p>Select a package version from the list</p></body></html>
-
-
-
-
- Select Version
-
-
-
-
- -
-
-
-
-
-
-
- 60
- 16777215
-
-
-
-
- 75
- true
-
-
-
- Max depgrah depth (0=no max)
-
-
- Qt::LeftToRight
-
-
- Depth:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 80
- 16777215
-
-
-
-
- 5
- 0
-
-
-
-
- 30
- 0
-
-
-
- <html><head/><body><p>Set the depth to which the dependencies are calculated (0 = full depth)</p></body></html>
-
-
-
-
-
- 1
-
-
-
- -
-
-
- <html><head/><body><p>Experimental feature:</p><p>May result in spurious parent/child relationships in depgraph</p><p>The packages listed are still the correct dependencies.</p></body></html>
-
-
- Exclude Installed
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 0
- 48
-
-
-
-
- -
-
-
- <html><head/><body><p>Click to do stuff</p></body></html>
-
-
- Calculate
-
-
-
- -
-
-
- Enter Package
-
-
-
- -
-
-
- false
-
-
-
-
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
- QSizePolicy::Fixed
-
-
-
- 20
- 18
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 0
- 250
-
-
-
-
- -
-
-
- 0
-
-
- true
-
-
-
-
-
-
- -
-
-
-
-
-
- Expand All
-
-
-
- -
-
-
- Collapse All
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 3000
- 27
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 100
- 16777215
-
-
-
- Deps Found:
-
-
-
- -
-
-
- QLCDNumber::Flat
-
-
-
-
-
-
-
-
-
- Emerge
-
-
- -
-
-
- <html><head/><body><p>Adds the --newuse (-N) option to the emerge command</p></body></html>
-
-
- New Use
-
-
- true
-
-
- false
-
-
- use_buttongroup
-
-
-
- -
-
-
-
- 50
- false
- false
-
-
-
- <html><head/><body><p>Adds the --update (-u) option to the emerge command</p></body></html>
-
-
- Update
-
-
- true
-
-
- false
-
-
- tree_buttongroup
-
-
-
- -
-
-
- Deep
-
-
- false
-
-
-
- -
-
-
- @World
-
-
- true
-
-
- false
-
-
- atom_buttongroup
-
-
-
- -
-
-
- <html><head/><body><p>Enter a specific atom or set in the box below to use this option</p></body></html>
-
-
- Atom Below
-
-
- true
-
-
- atom_buttongroup
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 44
- 20
-
-
-
-
- -
-
-
- <html><head/><body><p>Executes the command with the set parameters</p><p>All command run with '--pretend' set. </p><p>'--pretend' is substituted for '--ask' on the displayed command, for quick copy and pasting.</p></body></html>
-
-
- Execute
-
-
-
- -
-
-
- <html><head/><body><p>Adds the --changed-use (-U) option to the emerge command</p></body></html>
-
-
- Changed Use
-
-
- use_buttongroup
-
-
-
- -
-
-
- <html><head/><body><p>Adds the --emptytree (-e) option to the emerge command</p></body></html>
-
-
- Empty Tree
-
-
- true
-
-
- tree_buttongroup
-
-
-
- -
-
-
- <html><head/><body><p>Adds the --nodeps option to the emerge command (speeds up checking for use changes on a single package)</p></body></html>
-
-
- No Deps
-
-
-
- -
-
-
- @System
-
-
- atom_buttongroup
-
-
-
- -
-
-
- Enter atom or set here
-
-
-
- -
-
-
- -
-
-
- 0
-
-
- true
-
-
-
-
-
-
- -
-
-
- <html><head/><body><p>Command to run in a terminal to make proposed changes</p></body></html>
-
-
-
-
-
@@ -833,12 +360,12 @@ p, li { white-space: pre-wrap; }
+
+
true
-
-
--
2.45.2