qt6 updates
authorRalphred <Ralphred@liquid.me.uk>
Tue, 8 Oct 2024 09:02:48 +0000 (10:02 +0100)
committerRalphred <Ralphred@liquid.me.uk>
Tue, 8 Oct 2024 09:02:48 +0000 (10:02 +0100)
QtGentools.epj
__init__.py [new file with mode: 0644]
pyqt6eix [new file with mode: 0755]
qtgentools.py
ui/.Ui_mainwindow.py.kate-swp [new file with mode: 0644]
ui/Ui_emerge_tab.py [new file with mode: 0644]
ui/Ui_mainwindow.py
ui/mainwindow.py
ui/mainwindow.ui

index 199a69d0cfa3bda18321e3e8fecd6b5b1a7f987f..179d20f12167b597e99b6ae47d38c1dbfa1fd516 100644 (file)
@@ -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",
       "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": "",
     },
     "MIXEDLANGUAGE": false,
     "OTHERS": [
-      ".gitignore"
+      "QtGentools.epj"
     ],
     "OTHERTOOLSPARMS": {},
     "PACKAGERSPARMS": {},
     "PROGLANGUAGE": "Python3",
-    "PROJECTTYPE": "PyQt5",
+    "PROJECTTYPE": "PyQt6",
     "PROJECTTYPESPECIFICDATA": {},
-    "PROTOCOLS": [],
     "RCCPARAMS": {
       "CompressLevel": 0,
       "CompressionDisable": false,
     },
     "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": "",
       ]
     },
     "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 (file)
index 0000000..e69de29
diff --git a/pyqt6eix b/pyqt6eix
new file mode 100755 (executable)
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", "<html><head/><body><p>Expand all categories to show packages</p></body></html>"))
+        self.s_pb_expand_pkg.setText(_translate("MainWindow", "Exp Categories"))
+        self.s_pb_updatedb.setToolTip(_translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
+"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
+"p, li { white-space: pre-wrap; }\n"
+"</style></head><body style=\" font-family:\'Noto Sans\'; font-size:8pt; font-weight:400; font-style:normal;\">\n"
+"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Update eix\'s database, runs:</p>\n"
+"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">sudo eix-update</p></body></html>"))
+        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", "<html><head/><body><p>Starts searching with the specified parameters</p></body></html>"))
+        self.s_pb_search.setText(_translate("MainWindow", "Search"))
+        self.s_pb_expand_all.setToolTip(_translate("MainWindow", "<html><head/><body><p>Expand all tree entries</p></body></html>"))
+        self.s_pb_expand_all.setText(_translate("MainWindow", "Expand All"))
+        self.s_pb_collapse.setToolTip(_translate("MainWindow", "<html><head/><body><p>Collapse tree</p></body></html>"))
+        self.s_pb_collapse.setText(_translate("MainWindow", "Collapse"))
+        self.s_tv_results.setToolTip(_translate("MainWindow", "<html><head/><body><p>Results show here</p></body></html>"))
+        self.s_cb_stable.setToolTip(_translate("MainWindow", "<html><head/><body><p>Include only packages with a stable version</p></body></html>"))
+        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", "<html><head/><body><p>Search for packages that support a specific use flag(s)</p></body></html>"))
+        self.s_rb_iuse.setText(_translate("MainWindow", "&Use Support"))
+        self.s_cb_testing.setToolTip(_translate("MainWindow", "<html><head/><body><p>Include only packages with a testing version</p></body></html>"))
+        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", "<html><head/><body><p>Search for packages installed with a specific use flag enabled</p></body></html>"))
+        self.s_rb_use_enabled.setText(_translate("MainWindow", "Use Enab&led"))
+        self.s_cb_installed.setToolTip(_translate("MainWindow", "<html><head/><body><p>Include only installed packages</p></body></html>"))
+        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", "<html><head/><body><p>Search for packages instealled with a specific use flag disabled</p></body></html>"))
+        self.s_rb_use_disabled.setText(_translate("MainWindow", "Use Disabled"))
+        self.s_cb_overlay.setToolTip(_translate("MainWindow", "<html><head/><body><p>Include only packages with at least one version in an overlay</p></body></html>"))
+        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¬¬<overlayname><overlayver>¬¬{isminuskeyword}-K{}{isminusunstable}-{}{isminusasterisk}-*{}{isprofilemasked}[P]{}{ismasked}[m]{}{isunstable}~{}{ismissingkeyword}**{}¬¬<version>¬¬<use>{!last}\n{}'
+        IVERS='Instd¬¬<overlayname><overlayver>¬¬{isminuskeyword}-K{}{isminusunstable}-{}{isminusasterisk}-*{}{isprofilemasked}[P]{}{ismasked}[m]{}{isunstable}~{}{ismissingkeyword}**{}¬¬<version>¬¬<use*>{!last}\n{}'
+        format='Categ¬¬<category>\nPacka¬¬<name>¬¬<description>¬¬<homepage>\n<availableversions:AVERS>\n<installedversions:IVERS>\n'
+        ENV={'AVERS':AVERS,'IVERS':IVERS,'HOME':'$HOME'}
+        options.append('--format')
+        options.append(format)
+        self.s_pbar.setValue(0)
+        self.redraw_window()
+        if debug:print(options)
+        process=Popen(options,encoding='utf-8',stdout=PIPE,env=ENV)
+        data,excd=process.communicate()
+        if excd is not None or len(data)<17:
+            self.s_pbar.setFormat('Search Failed!!')
+            return
+        if data.split('\n')[0]=='No matches found':
+            self.s_pbar.setFormat('No matches found!!')
+            return
+        self.s_pbar.setValue(0)
+        self.s_pbar.setFormat('Processing Data: Pass 1/2...')
+        self.redraw_window()
+        results=data.split('\n')
+        self.s_pbar.setMaximum(len(results))
+        try:
+            self.s_lcd_results.display(int(results[len(results)-2].split(' ')[1]))
+        except IndexError:
+            self.s_lcd_results.display(1)
+        except ValueError:
+            self.s_lcd_results.display(1)
+        dataset=[]
+        cats=[]
+        uid=count=puid=ppuid=1
+        for result in results:
+            if debug:print(result)
+            if result[0:7]=='Categ¬¬':
+                cat_name=result.split('¬¬')[1]
+                if cat_name not in cats:
+                    dataset.append({'UID':uid,'PUID':0,'Cat':cat_name,'Nam':'','Des':'','Hom':''})
+                    cats.append(cat_name)
+                    puid=uid
+                    uid+=1
+        for result in results:
+            if result[0:7]=='Categ¬¬':
+                cat_name=result.split('¬¬')[1]
+                puid=cats.index(cat_name)+1
+            elif result[0:7]=='Packa¬¬':
+                data=result.split('¬¬')
+                #if debug:print(data)
+                if data[1]=='secret-service':data[3]='https://www.secretservice.gov'
+                dataset.append({'UID':uid,'PUID':puid,'Cat':cats[puid-1],'Nam':data[1],'Des':data[2],'Hom':data[3]})
+                ppuid=uid
+                uid+=1
+            elif result[0:7]=='Avail¬¬':
+                if debug:print(data)
+                data=result.split('¬¬')
+                dataset.append({'UID':uid,'PUID':ppuid,'Cat':data[1],'Nam':'Available ->','Des':''.join(data[2:4]),'Hom':data[4]})
+                uid+=1
+            elif result[0:7]=='Instd¬¬':
+                if debug:print(data)
+                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):
+                if 'Overlays' not in cats:
+                    dataset.append({'UID':uid,'PUID':0,'Cat':'Overlays','Nam':'','Des':'','Hom':''})
+                    puid=uid
+                    uid+=1
+                    cats.append('Overlays')
+                data=result.split(' ')
+                dataset.append({'UID':uid,'PUID':puid,'Cat':'','Nam':' '.join(data[0:2]),'Des':data[2],'Hom':''})
+            self.s_pbar.setValue(count)
+            count+=1
+        self.s_cats=len(cats)
+        model=self.s_addResults(dataset)
+        self.s_tv_results.setModel(model)
+        for a in range(0,4):
+            self.s_tv_results.setColumnWidth(a,(int(a/2)+1)*150)
+        self.s_pbar.setFormat('Done')
+
+    def s_createResultsModel(self):
+        model=QStandardItemModel()
+        model.setHorizontalHeaderLabels(['Category|Overlay','Name|Version Type','Description|Version','Homepage|Use Flags' ])
+        return model
+
+    def s_addResults(self,results):
+        model=self.s_createResultsModel()
+        prog=1
+        self.s_pbar.setMaximum(len(results))
+        self.s_pbar.setFormat('Processing Data: Pass 2/2...')
+        items={}
+        for result in results:
+            if result['PUID']==0:
+                parent=model.invisibleRootItem()
+            else:
+                parent=items[result['PUID']]
+            parent.appendRow([QStandardItem(result['Cat']),
+                                QStandardItem(result['Nam']),
+                                QStandardItem(result['Des']),
+                                QStandardItem(result['Hom'])])
+            items[result['UID']] = parent.child(parent.rowCount()-1)
+            self.s_pbar.setValue(prog)
+            prog+=1
+        return model
+#endsection
+
+
+
+if __name__ == "__main__":
+    import sys
+    app = QtWidgets.QApplication(sys.argv)
+    ui = MainWindow()
+    ui.show()
+    sys.exit(app.exec())
index b30c0a091b735505432ec4a999341fe174ee22a9..a4996e7d68b34f94d69eec3c61ab45b0ac2947f6 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-from PyQt5 import QtWidgets
+from PyQt6 import QtWidgets
 from ui.mainwindow import MainWindow
 
 if __name__ == "__main__":
@@ -7,5 +7,5 @@ if __name__ == "__main__":
     app = QtWidgets.QApplication(sys.argv)
     ui = MainWindow()
     ui.show()
-    sys.exit(app.exec_())
+    sys.exit(app.exec())
     
diff --git a/ui/.Ui_mainwindow.py.kate-swp b/ui/.Ui_mainwindow.py.kate-swp
new file mode 100644 (file)
index 0000000..6d7041f
Binary files /dev/null and b/ui/.Ui_mainwindow.py.kate-swp differ
diff --git a/ui/Ui_emerge_tab.py b/ui/Ui_emerge_tab.py
new file mode 100644 (file)
index 0000000..dd0d812
--- /dev/null
@@ -0,0 +1,119 @@
+# Form implementation generated from reading ui file 'ui/emerge_tab.ui'
+#
+# Created by: PyQt6 UI code generator 6.7.1
+#
+# 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(848, 506)
+        self.centralwidget = QtWidgets.QWidget(parent=MainWindow)
+        self.centralwidget.setObjectName("centralwidget")
+        self.u_le_cmd = QtWidgets.QLineEdit(parent=self.centralwidget)
+        self.u_le_cmd.setGeometry(QtCore.QRect(30, 420, 671, 28))
+        self.u_le_cmd.setObjectName("u_le_cmd")
+        self.layoutWidget_2 = QtWidgets.QWidget(parent=self.centralwidget)
+        self.layoutWidget_2.setGeometry(QtCore.QRect(120, 10, 100, 54))
+        self.layoutWidget_2.setObjectName("layoutWidget_2")
+        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.layoutWidget_2)
+        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
+        self.verticalLayout_2.setObjectName("verticalLayout_2")
+        self.e_rb_new_use = QtWidgets.QRadioButton(parent=self.layoutWidget_2)
+        self.e_rb_new_use.setObjectName("e_rb_new_use")
+        self.verticalLayout_2.addWidget(self.e_rb_new_use)
+        self.e_rb_ch_use = QtWidgets.QRadioButton(parent=self.layoutWidget_2)
+        self.e_rb_ch_use.setObjectName("e_rb_ch_use")
+        self.verticalLayout_2.addWidget(self.e_rb_ch_use)
+        self.e_lv_results = QtWidgets.QListView(parent=self.centralwidget)
+        self.e_lv_results.setGeometry(QtCore.QRect(30, 110, 671, 231))
+        self.e_lv_results.setObjectName("e_lv_results")
+        self.e_pbar = QtWidgets.QProgressBar(parent=self.centralwidget)
+        self.e_pbar.setGeometry(QtCore.QRect(30, 350, 671, 23))
+        self.e_pbar.setProperty("value", 24)
+        self.e_pbar.setObjectName("e_pbar")
+        self.widget = QtWidgets.QWidget(parent=self.centralwidget)
+        self.widget.setGeometry(QtCore.QRect(370, 15, 321, 71))
+        self.widget.setObjectName("widget")
+        self.gridLayout_2 = QtWidgets.QGridLayout(self.widget)
+        self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
+        self.gridLayout_2.setObjectName("gridLayout_2")
+        self.e_rb_world = QtWidgets.QRadioButton(parent=self.widget)
+        self.e_rb_world.setObjectName("e_rb_world")
+        self.gridLayout_2.addWidget(self.e_rb_world, 0, 0, 1, 1)
+        self.e_rb_atom = QtWidgets.QRadioButton(parent=self.widget)
+        self.e_rb_atom.setObjectName("e_rb_atom")
+        self.gridLayout_2.addWidget(self.e_rb_atom, 0, 1, 1, 1)
+        self.e_rb_system = QtWidgets.QRadioButton(parent=self.widget)
+        self.e_rb_system.setObjectName("e_rb_system")
+        self.gridLayout_2.addWidget(self.e_rb_system, 1, 0, 1, 1)
+        self.e_le_atom = QtWidgets.QLineEdit(parent=self.widget)
+        self.e_le_atom.setObjectName("e_le_atom")
+        self.gridLayout_2.addWidget(self.e_le_atom, 1, 1, 1, 2)
+        self.e_pb_go = QtWidgets.QPushButton(parent=self.widget)
+        self.e_pb_go.setObjectName("e_pb_go")
+        self.gridLayout_2.addWidget(self.e_pb_go, 0, 2, 1, 1)
+        self.widget1 = QtWidgets.QWidget(parent=self.centralwidget)
+        self.widget1.setGeometry(QtCore.QRect(227, 10, 91, 54))
+        self.widget1.setObjectName("widget1")
+        self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.widget1)
+        self.verticalLayout_4.setContentsMargins(0, 0, 0, 0)
+        self.verticalLayout_4.setObjectName("verticalLayout_4")
+        self.e_cb_deep = QtWidgets.QCheckBox(parent=self.widget1)
+        self.e_cb_deep.setObjectName("e_cb_deep")
+        self.verticalLayout_4.addWidget(self.e_cb_deep)
+        self.e_cb_nodeps = QtWidgets.QCheckBox(parent=self.widget1)
+        self.e_cb_nodeps.setObjectName("e_cb_nodeps")
+        self.verticalLayout_4.addWidget(self.e_cb_nodeps)
+        self.widget2 = QtWidgets.QWidget(parent=self.centralwidget)
+        self.widget2.setGeometry(QtCore.QRect(20, 10, 90, 54))
+        self.widget2.setObjectName("widget2")
+        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.widget2)
+        self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
+        self.verticalLayout_3.setObjectName("verticalLayout_3")
+        self.e_rb_update = QtWidgets.QRadioButton(parent=self.widget2)
+        self.e_rb_update.setObjectName("e_rb_update")
+        self.verticalLayout_3.addWidget(self.e_rb_update)
+        self.e_rb_emptytree = QtWidgets.QRadioButton(parent=self.widget2)
+        self.e_rb_emptytree.setObjectName("e_rb_emptytree")
+        self.verticalLayout_3.addWidget(self.e_rb_emptytree)
+        MainWindow.setCentralWidget(self.centralwidget)
+        self.menubar = QtWidgets.QMenuBar(parent=MainWindow)
+        self.menubar.setGeometry(QtCore.QRect(0, 0, 848, 26))
+        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"))
+        self.e_rb_new_use.setText(_translate("MainWindow", "New Use"))
+        self.e_rb_ch_use.setText(_translate("MainWindow", "Changed Use"))
+        self.e_rb_world.setText(_translate("MainWindow", "@World"))
+        self.e_rb_atom.setText(_translate("MainWindow", "Atom Below"))
+        self.e_rb_system.setText(_translate("MainWindow", "@System"))
+        self.e_pb_go.setText(_translate("MainWindow", "Execute"))
+        self.e_cb_deep.setText(_translate("MainWindow", "Deep"))
+        self.e_cb_nodeps.setText(_translate("MainWindow", "No Deps"))
+        self.e_rb_update.setText(_translate("MainWindow", "Update"))
+        self.e_rb_emptytree.setText(_translate("MainWindow", "Empty Tree"))
+
+
+if __name__ == "__main__":
+    import sys
+    app = QtWidgets.QApplication(sys.argv)
+    MainWindow = QtWidgets.QMainWindow()
+    ui = Ui_MainWindow()
+    ui.setupUi(MainWindow)
+    MainWindow.show()
+    sys.exit(app.exec())
index a3f08d76963806b41ef28f040c8f354f0f5e34ce..8613f0c4d3cc0d2990fd7a2b925d964679ef60fd 100644 (file)
@@ -1,63 +1,61 @@
-# -*- coding: utf-8 -*-
-
-# Form implementation generated from reading ui file '/home/andrew/Projects/qtgentools/ui/mainwindow.ui'
+# Form implementation generated from reading ui file 'ui/mainwindow.ui'
 #
-# Created by: PyQt5 UI code generator 5.15.1
+# Created by: PyQt6 UI code generator 6.7.1
 #
-# WARNING: Any manual changes made to this file will be lost when pyuic5 is
+# 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 PyQt5 import QtCore, QtGui, QtWidgets
+from PyQt6 import QtCore, QtGui, QtWidgets
 
 
 class Ui_MainWindow(object):
     def setupUi(self, MainWindow):
         MainWindow.setObjectName("MainWindow")
-        MainWindow.resize(685, 452)
-        self.centralWidget = QtWidgets.QWidget(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(self.centralWidget)
+        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(self.tab_search)
+        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(self.tab_search)
+        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(self.tab_search)
+        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(self.tab_search)
+        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(self.tab_search)
+        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.MinimumExpanding, QtWidgets.QSizePolicy.Minimum)
+        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(self.tab_search)
+        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(self.tab_search)
+        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.Preferred, QtWidgets.QSizePolicy.Minimum)
+        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(self.tab_search)
-        self.s_tv_results.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
+        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.NoSelection)
-        self.s_tv_results.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectItems)
+        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")
@@ -67,253 +65,70 @@ class Ui_MainWindow(object):
         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(self.tab_search)
+        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(self.tab_search)
+        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(self.tab_search)
+        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(self.tab_search)
+        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(self.tab_search)
+        self.s_lcd_results = QtWidgets.QLCDNumber(parent=self.tab_search)
         self.s_lcd_results.setDigitCount(5)
-        self.s_lcd_results.setSegmentStyle(QtWidgets.QLCDNumber.Flat)
+        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.Expanding, QtWidgets.QSizePolicy.Minimum)
+        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(self.tab_search)
+        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(self.tab_search)
+        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(self.tab_search)
+        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(self.tab_search)
+        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(self.tab_search)
+        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(self.tab_search)
+        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.SetDefaultConstraint)
+        self.verticalLayout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetDefaultConstraint)
         self.verticalLayout.setObjectName("verticalLayout")
-        self.s_cb_overlay = QtWidgets.QCheckBox(self.tab_search)
+        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(self.tab_search)
+        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(self.tab_search)
-        self.s_l_results.setAlignment(QtCore.Qt.AlignCenter)
+        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.tab_depgraph = QtWidgets.QWidget()
-        self.tab_depgraph.setObjectName("tab_depgraph")
-        self.gridLayout_4 = QtWidgets.QGridLayout(self.tab_depgraph)
-        self.gridLayout_4.setObjectName("gridLayout_4")
-        self.d_rb_select = QtWidgets.QRadioButton(self.tab_depgraph)
-        self.d_rb_select.setChecked(True)
-        self.d_rb_select.setObjectName("d_rb_select")
-        self.gridLayout_4.addWidget(self.d_rb_select, 0, 0, 1, 1)
-        self.d_cb_category = QtWidgets.QComboBox(self.tab_depgraph)
-        self.d_cb_category.setObjectName("d_cb_category")
-        self.d_cb_category.addItem("")
-        self.gridLayout_4.addWidget(self.d_cb_category, 0, 1, 1, 1)
-        self.d_cb_package = QtWidgets.QComboBox(self.tab_depgraph)
-        self.d_cb_package.setObjectName("d_cb_package")
-        self.d_cb_package.addItem("")
-        self.gridLayout_4.addWidget(self.d_cb_package, 0, 2, 1, 1)
-        self.d_cb_version = QtWidgets.QComboBox(self.tab_depgraph)
-        self.d_cb_version.setObjectName("d_cb_version")
-        self.d_cb_version.addItem("")
-        self.gridLayout_4.addWidget(self.d_cb_version, 0, 3, 1, 1)
-        self.gridLayout_3 = QtWidgets.QGridLayout()
-        self.gridLayout_3.setObjectName("gridLayout_3")
-        self.d_label_depth = QtWidgets.QLabel(self.tab_depgraph)
-        self.d_label_depth.setMaximumSize(QtCore.QSize(60, 16777215))
-        font = QtGui.QFont()
-        font.setBold(True)
-        font.setWeight(75)
-        self.d_label_depth.setFont(font)
-        self.d_label_depth.setLayoutDirection(QtCore.Qt.LeftToRight)
-        self.d_label_depth.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
-        self.d_label_depth.setObjectName("d_label_depth")
-        self.gridLayout_3.addWidget(self.d_label_depth, 0, 0, 1, 1)
-        self.d_le_depth = QtWidgets.QLineEdit(self.tab_depgraph)
-        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
-        sizePolicy.setHorizontalStretch(0)
-        sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.d_le_depth.sizePolicy().hasHeightForWidth())
-        self.d_le_depth.setSizePolicy(sizePolicy)
-        self.d_le_depth.setMaximumSize(QtCore.QSize(80, 16777215))
-        self.d_le_depth.setSizeIncrement(QtCore.QSize(5, 0))
-        self.d_le_depth.setBaseSize(QtCore.QSize(30, 0))
-        self.d_le_depth.setInputMask("")
-        self.d_le_depth.setObjectName("d_le_depth")
-        self.gridLayout_3.addWidget(self.d_le_depth, 0, 1, 1, 1)
-        self.d_ckb_installed = QtWidgets.QCheckBox(self.tab_depgraph)
-        self.d_ckb_installed.setObjectName("d_ckb_installed")
-        self.gridLayout_3.addWidget(self.d_ckb_installed, 1, 0, 1, 2)
-        self.gridLayout_4.addLayout(self.gridLayout_3, 0, 4, 2, 1)
-        spacerItem3 = QtWidgets.QSpacerItem(0, 48, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
-        self.gridLayout_4.addItem(spacerItem3, 0, 5, 2, 1)
-        self.d_pb_calculate = QtWidgets.QPushButton(self.tab_depgraph)
-        self.d_pb_calculate.setObjectName("d_pb_calculate")
-        self.gridLayout_4.addWidget(self.d_pb_calculate, 0, 6, 1, 1)
-        self.d_rb_manual = QtWidgets.QRadioButton(self.tab_depgraph)
-        self.d_rb_manual.setObjectName("d_rb_manual")
-        self.gridLayout_4.addWidget(self.d_rb_manual, 1, 0, 1, 1)
-        self.d_le_package = QtWidgets.QLineEdit(self.tab_depgraph)
-        self.d_le_package.setEnabled(False)
-        self.d_le_package.setText("")
-        self.d_le_package.setPlaceholderText("")
-        self.d_le_package.setObjectName("d_le_package")
-        self.gridLayout_4.addWidget(self.d_le_package, 1, 1, 1, 3)
-        spacerItem4 = QtWidgets.QSpacerItem(20, 18, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
-        self.gridLayout_4.addItem(spacerItem4, 1, 6, 1, 1)
-        self.d_tv_results = QtWidgets.QTreeView(self.tab_depgraph)
-        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Expanding)
-        sizePolicy.setHorizontalStretch(0)
-        sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.d_tv_results.sizePolicy().hasHeightForWidth())
-        self.d_tv_results.setSizePolicy(sizePolicy)
-        self.d_tv_results.setMinimumSize(QtCore.QSize(0, 250))
-        self.d_tv_results.setObjectName("d_tv_results")
-        self.gridLayout_4.addWidget(self.d_tv_results, 2, 0, 1, 7)
-        self.d_pbar = QtWidgets.QProgressBar(self.tab_depgraph)
-        self.d_pbar.setProperty("value", 0)
-        self.d_pbar.setTextVisible(True)
-        self.d_pbar.setFormat("")
-        self.d_pbar.setObjectName("d_pbar")
-        self.gridLayout_4.addWidget(self.d_pbar, 3, 0, 1, 7)
-        self.gridLayout_7 = QtWidgets.QGridLayout()
-        self.gridLayout_7.setObjectName("gridLayout_7")
-        self.d_pb_expand = QtWidgets.QPushButton(self.tab_depgraph)
-        self.d_pb_expand.setObjectName("d_pb_expand")
-        self.gridLayout_7.addWidget(self.d_pb_expand, 0, 0, 1, 1)
-        self.d_pb_collapse = QtWidgets.QPushButton(self.tab_depgraph)
-        self.d_pb_collapse.setObjectName("d_pb_collapse")
-        self.gridLayout_7.addWidget(self.d_pb_collapse, 0, 1, 1, 1)
-        spacerItem5 = QtWidgets.QSpacerItem(3000, 27, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
-        self.gridLayout_7.addItem(spacerItem5, 0, 2, 1, 1)
-        self.label = QtWidgets.QLabel(self.tab_depgraph)
-        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred)
-        sizePolicy.setHorizontalStretch(0)
-        sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
-        self.label.setSizePolicy(sizePolicy)
-        self.label.setMaximumSize(QtCore.QSize(100, 16777215))
-        self.label.setObjectName("label")
-        self.gridLayout_7.addWidget(self.label, 0, 3, 1, 1)
-        self.d_lcd_deps = QtWidgets.QLCDNumber(self.tab_depgraph)
-        self.d_lcd_deps.setSegmentStyle(QtWidgets.QLCDNumber.Flat)
-        self.d_lcd_deps.setObjectName("d_lcd_deps")
-        self.gridLayout_7.addWidget(self.d_lcd_deps, 0, 4, 1, 1)
-        self.gridLayout_4.addLayout(self.gridLayout_7, 4, 0, 1, 7)
-        self.tw_1.addTab(self.tab_depgraph, "")
-        self.tab_update = QtWidgets.QWidget()
-        self.tab_update.setObjectName("tab_update")
-        self.gridLayout_5 = QtWidgets.QGridLayout(self.tab_update)
-        self.gridLayout_5.setObjectName("gridLayout_5")
-        self.e_rb_new_use = QtWidgets.QRadioButton(self.tab_update)
-        self.e_rb_new_use.setCheckable(True)
-        self.e_rb_new_use.setChecked(False)
-        self.e_rb_new_use.setObjectName("e_rb_new_use")
-        self.use_buttongroup = QtWidgets.QButtonGroup(MainWindow)
-        self.use_buttongroup.setObjectName("use_buttongroup")
-        self.use_buttongroup.addButton(self.e_rb_new_use)
-        self.gridLayout_5.addWidget(self.e_rb_new_use, 0, 0, 1, 1)
-        self.e_rb_update = QtWidgets.QRadioButton(self.tab_update)
-        font = QtGui.QFont()
-        font.setBold(False)
-        font.setUnderline(False)
-        font.setWeight(50)
-        self.e_rb_update.setFont(font)
-        self.e_rb_update.setCheckable(True)
-        self.e_rb_update.setChecked(False)
-        self.e_rb_update.setObjectName("e_rb_update")
-        self.tree_buttongroup = QtWidgets.QButtonGroup(MainWindow)
-        self.tree_buttongroup.setObjectName("tree_buttongroup")
-        self.tree_buttongroup.addButton(self.e_rb_update)
-        self.gridLayout_5.addWidget(self.e_rb_update, 0, 1, 1, 1)
-        self.e_cb_deep = QtWidgets.QCheckBox(self.tab_update)
-        self.e_cb_deep.setChecked(False)
-        self.e_cb_deep.setObjectName("e_cb_deep")
-        self.gridLayout_5.addWidget(self.e_cb_deep, 0, 2, 1, 1)
-        self.e_rb_world = QtWidgets.QRadioButton(self.tab_update)
-        self.e_rb_world.setCheckable(True)
-        self.e_rb_world.setChecked(False)
-        self.e_rb_world.setObjectName("e_rb_world")
-        self.atom_buttongroup = QtWidgets.QButtonGroup(MainWindow)
-        self.atom_buttongroup.setObjectName("atom_buttongroup")
-        self.atom_buttongroup.addButton(self.e_rb_world)
-        self.gridLayout_5.addWidget(self.e_rb_world, 0, 3, 1, 1)
-        self.e_rb_atom = QtWidgets.QRadioButton(self.tab_update)
-        self.e_rb_atom.setChecked(True)
-        self.e_rb_atom.setObjectName("e_rb_atom")
-        self.atom_buttongroup.addButton(self.e_rb_atom)
-        self.gridLayout_5.addWidget(self.e_rb_atom, 0, 4, 1, 1)
-        spacerItem6 = QtWidgets.QSpacerItem(44, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
-        self.gridLayout_5.addItem(spacerItem6, 0, 5, 1, 1)
-        self.e_pb_go = QtWidgets.QPushButton(self.tab_update)
-        self.e_pb_go.setObjectName("e_pb_go")
-        self.gridLayout_5.addWidget(self.e_pb_go, 0, 6, 1, 1)
-        self.e_rb_ch_use = QtWidgets.QRadioButton(self.tab_update)
-        self.e_rb_ch_use.setObjectName("e_rb_ch_use")
-        self.use_buttongroup.addButton(self.e_rb_ch_use)
-        self.gridLayout_5.addWidget(self.e_rb_ch_use, 1, 0, 1, 1)
-        self.e_rb_emptytree = QtWidgets.QRadioButton(self.tab_update)
-        self.e_rb_emptytree.setAutoExclusive(True)
-        self.e_rb_emptytree.setObjectName("e_rb_emptytree")
-        self.tree_buttongroup.addButton(self.e_rb_emptytree)
-        self.gridLayout_5.addWidget(self.e_rb_emptytree, 1, 1, 1, 1)
-        self.e_cb_nodeps = QtWidgets.QCheckBox(self.tab_update)
-        self.e_cb_nodeps.setObjectName("e_cb_nodeps")
-        self.gridLayout_5.addWidget(self.e_cb_nodeps, 1, 2, 1, 1)
-        self.e_rb_system = QtWidgets.QRadioButton(self.tab_update)
-        self.e_rb_system.setObjectName("e_rb_system")
-        self.atom_buttongroup.addButton(self.e_rb_system)
-        self.gridLayout_5.addWidget(self.e_rb_system, 1, 3, 1, 1)
-        self.e_le_atom = QtWidgets.QLineEdit(self.tab_update)
-        self.e_le_atom.setObjectName("e_le_atom")
-        self.gridLayout_5.addWidget(self.e_le_atom, 1, 4, 1, 3)
-        self.e_lv_results = QtWidgets.QListView(self.tab_update)
-        self.e_lv_results.setObjectName("e_lv_results")
-        self.gridLayout_5.addWidget(self.e_lv_results, 2, 0, 1, 7)
-        self.e_pbar = QtWidgets.QProgressBar(self.tab_update)
-        self.e_pbar.setProperty("value", 0)
-        self.e_pbar.setTextVisible(True)
-        self.e_pbar.setFormat("")
-        self.e_pbar.setObjectName("e_pbar")
-        self.gridLayout_5.addWidget(self.e_pbar, 3, 0, 1, 7)
-        self.u_le_cmd = QtWidgets.QLineEdit(self.tab_update)
-        self.u_le_cmd.setObjectName("u_le_cmd")
-        self.gridLayout_5.addWidget(self.u_le_cmd, 4, 0, 1, 7)
-        self.tw_1.addTab(self.tab_update, "")
         self.gridLayout_2.addWidget(self.tw_1, 0, 1, 1, 1)
         MainWindow.setCentralWidget(self.centralWidget)
 
@@ -345,67 +160,27 @@ class Ui_MainWindow(object):
         self.s_cb_stable.setToolTip(_translate("MainWindow", "<html><head/><body><p>Include only packages with a stable version</p></body></html>"))
         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", "Any"))
+        self.s_rb_any.setText(_translate("MainWindow", "An&y"))
         self.s_rb_iuse.setToolTip(_translate("MainWindow", "<html><head/><body><p>Search for packages that support a specific use flag(s)</p></body></html>"))
-        self.s_rb_iuse.setText(_translate("MainWindow", "Use Support"))
+        self.s_rb_iuse.setText(_translate("MainWindow", "&Use Support"))
         self.s_cb_testing.setToolTip(_translate("MainWindow", "<html><head/><body><p>Include only packages with a testing version</p></body></html>"))
         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_decription.setText(_translate("MainWindow", "&Description"))
         self.s_rb_use_enabled.setToolTip(_translate("MainWindow", "<html><head/><body><p>Search for packages installed with a specific use flag enabled</p></body></html>"))
-        self.s_rb_use_enabled.setText(_translate("MainWindow", "Use Enabled"))
+        self.s_rb_use_enabled.setText(_translate("MainWindow", "Use Enab&led"))
         self.s_cb_installed.setToolTip(_translate("MainWindow", "<html><head/><body><p>Include only installed packages</p></body></html>"))
         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", "Category"))
+        self.s_rb_category.setText(_translate("MainWindow", "Ca&tegory"))
         self.s_rb_use_disabled.setToolTip(_translate("MainWindow", "<html><head/><body><p>Search for packages instealled with a specific use flag disabled</p></body></html>"))
         self.s_rb_use_disabled.setText(_translate("MainWindow", "Use Disabled"))
         self.s_cb_overlay.setToolTip(_translate("MainWindow", "<html><head/><body><p>Include only packages with at least one version in an overlay</p></body></html>"))
         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_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"))
-        self.d_rb_select.setText(_translate("MainWindow", "Select Package"))
-        self.d_cb_category.setToolTip(_translate("MainWindow", "<html><head/><body><p>Select a package category from the list</p></body></html>"))
-        self.d_cb_category.setItemText(0, _translate("MainWindow", "Select Category"))
-        self.d_cb_package.setToolTip(_translate("MainWindow", "<html><head/><body><p>Select a package from the list</p></body></html>"))
-        self.d_cb_package.setItemText(0, _translate("MainWindow", "Select Package"))
-        self.d_cb_version.setToolTip(_translate("MainWindow", "<html><head/><body><p>Select a package version from the list</p></body></html>"))
-        self.d_cb_version.setItemText(0, _translate("MainWindow", "Select Version"))
-        self.d_label_depth.setToolTip(_translate("MainWindow", "Max depgrah depth (0=no max)"))
-        self.d_label_depth.setText(_translate("MainWindow", "Depth:"))
-        self.d_le_depth.setToolTip(_translate("MainWindow", "<html><head/><body><p>Set the depth to which the dependencies are calculated (0 = full depth)</p></body></html>"))
-        self.d_le_depth.setText(_translate("MainWindow", "1"))
-        self.d_ckb_installed.setToolTip(_translate("MainWindow", "<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>"))
-        self.d_ckb_installed.setText(_translate("MainWindow", "Exclude Installed"))
-        self.d_pb_calculate.setToolTip(_translate("MainWindow", "<html><head/><body><p>Click to do stuff</p></body></html>"))
-        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", "<html><head/><body><p>Adds the --newuse (-N) option to the emerge command</p></body></html>"))
-        self.e_rb_new_use.setText(_translate("MainWindow", "New Use"))
-        self.e_rb_update.setToolTip(_translate("MainWindow", "<html><head/><body><p>Adds the --update (-u) option to the emerge command</p></body></html>"))
-        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", "<html><head/><body><p>Enter a specific atom or set in the box below to use this option</p></body></html>"))
-        self.e_rb_atom.setText(_translate("MainWindow", "Atom Below"))
-        self.e_pb_go.setToolTip(_translate("MainWindow", "<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>"))
-        self.e_pb_go.setText(_translate("MainWindow", "Execute"))
-        self.e_rb_ch_use.setToolTip(_translate("MainWindow", "<html><head/><body><p>Adds the --changed-use (-U) option to the emerge command</p></body></html>"))
-        self.e_rb_ch_use.setText(_translate("MainWindow", "Changed Use"))
-        self.e_rb_emptytree.setToolTip(_translate("MainWindow", "<html><head/><body><p>Adds the --emptytree (-e) option to the emerge command</p></body></html>"))
-        self.e_rb_emptytree.setText(_translate("MainWindow", "Empty Tree"))
-        self.e_cb_nodeps.setToolTip(_translate("MainWindow", "<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>"))
-        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", "<html><head/><body><p>Command to run in a terminal to make proposed changes</p></body></html>"))
-        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())
index 1ea27ca0f6c030dbdedd3fb0affa4b5656b619fd..b00a9fc96f56ce8fbbef14326e3f8da37a9116e2 100644 (file)
@@ -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
index f811c470d249d84df5f48714de1d1890e327cdcd..2b0d8a706aa605ee3f3fa0c37a67ec32d1d1bf17 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>685</width>
-    <height>452</height>
+    <width>732</width>
+    <height>462</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -83,10 +83,10 @@ p, li { white-space: pre-wrap; }
         <item row="2" column="9">
          <spacer name="horizontalSpacer_4">
           <property name="orientation">
-           <enum>Qt::Horizontal</enum>
+           <enum>Qt::Orientation::Horizontal</enum>
           </property>
           <property name="sizeType">
-           <enum>QSizePolicy::MinimumExpanding</enum>
+           <enum>QSizePolicy::Policy::MinimumExpanding</enum>
           </property>
           <property name="sizeHint" stdset="0">
            <size>
@@ -119,10 +119,10 @@ p, li { white-space: pre-wrap; }
         <item row="1" column="10" rowspan="2">
          <spacer name="horizontalSpacer_6">
           <property name="orientation">
-           <enum>Qt::Horizontal</enum>
+           <enum>Qt::Orientation::Horizontal</enum>
           </property>
           <property name="sizeType">
-           <enum>QSizePolicy::Preferred</enum>
+           <enum>QSizePolicy::Policy::Preferred</enum>
           </property>
           <property name="sizeHint" stdset="0">
            <size>
@@ -138,7 +138,7 @@ p, li { white-space: pre-wrap; }
            <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Results show here&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
           </property>
           <property name="editTriggers">
-           <set>QAbstractItemView::NoEditTriggers</set>
+           <set>QAbstractItemView::EditTrigger::NoEditTriggers</set>
           </property>
           <property name="showDropIndicator" stdset="0">
            <bool>false</bool>
@@ -147,10 +147,10 @@ p, li { white-space: pre-wrap; }
            <bool>true</bool>
           </property>
           <property name="selectionMode">
-           <enum>QAbstractItemView::NoSelection</enum>
+           <enum>QAbstractItemView::SelectionMode::NoSelection</enum>
           </property>
           <property name="selectionBehavior">
-           <enum>QAbstractItemView::SelectItems</enum>
+           <enum>QAbstractItemView::SelectionBehavior::SelectItems</enum>
           </property>
           <property name="sortingEnabled">
            <bool>false</bool>
@@ -187,7 +187,7 @@ p, li { white-space: pre-wrap; }
              <string>Search any field</string>
             </property>
             <property name="text">
-             <string>Any</string>
+             <string>An&amp;y</string>
             </property>
             <property name="checkable">
              <bool>true</bool>
@@ -200,7 +200,7 @@ p, li { white-space: pre-wrap; }
              <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Search for packages that support a specific use flag(s)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
             </property>
             <property name="text">
-             <string>Use Support</string>
+             <string>&amp;Use Support</string>
             </property>
            </widget>
           </item>
@@ -225,14 +225,14 @@ p, li { white-space: pre-wrap; }
            <number>5</number>
           </property>
           <property name="segmentStyle">
-           <enum>QLCDNumber::Flat</enum>
+           <enum>QLCDNumber::SegmentStyle::Flat</enum>
           </property>
          </widget>
         </item>
         <item row="1" column="8" colspan="2">
          <spacer name="horizontalSpacer_3">
           <property name="orientation">
-           <enum>Qt::Horizontal</enum>
+           <enum>Qt::Orientation::Horizontal</enum>
           </property>
           <property name="sizeHint" stdset="0">
            <size>
@@ -260,7 +260,7 @@ p, li { white-space: pre-wrap; }
              <string>Search the description field</string>
             </property>
             <property name="text">
-             <string>Description</string>
+             <string>&amp;Description</string>
             </property>
            </widget>
           </item>
@@ -270,7 +270,7 @@ p, li { white-space: pre-wrap; }
              <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Search for packages installed with a specific use flag enabled&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
             </property>
             <property name="text">
-             <string>Use Enabled</string>
+             <string>Use Enab&amp;led</string>
             </property>
            </widget>
           </item>
@@ -294,7 +294,7 @@ p, li { white-space: pre-wrap; }
              <string>Search the category field</string>
             </property>
             <property name="text">
-             <string>Category</string>
+             <string>Ca&amp;tegory</string>
             </property>
            </widget>
           </item>
@@ -313,7 +313,7 @@ p, li { white-space: pre-wrap; }
         <item row="0" column="5" rowspan="3" colspan="3">
          <layout class="QVBoxLayout" name="verticalLayout">
           <property name="sizeConstraint">
-           <enum>QLayout::SetDefaultConstraint</enum>
+           <enum>QLayout::SizeConstraint::SetDefaultConstraint</enum>
           </property>
           <item>
            <widget class="QCheckBox" name="s_cb_overlay">
@@ -334,7 +334,7 @@ p, li { white-space: pre-wrap; }
              <string>Search the name field</string>
             </property>
             <property name="text">
-             <string>Name</string>
+             <string>&amp;Name</string>
             </property>
            </widget>
           </item>
@@ -344,7 +344,7 @@ p, li { white-space: pre-wrap; }
              <string>Results: </string>
             </property>
             <property name="alignment">
-             <set>Qt::AlignCenter</set>
+             <set>Qt::AlignmentFlag::AlignCenter</set>
             </property>
            </widget>
           </item>
@@ -352,479 +352,6 @@ p, li { white-space: pre-wrap; }
         </item>
        </layout>
       </widget>
-      <widget class="QWidget" name="tab_depgraph">
-       <attribute name="title">
-        <string>Dep Graph</string>
-       </attribute>
-       <layout class="QGridLayout" name="gridLayout_4">
-        <item row="0" column="0">
-         <widget class="QRadioButton" name="d_rb_select">
-          <property name="text">
-           <string>Select Package</string>
-          </property>
-          <property name="checked">
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="QComboBox" name="d_cb_category">
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select a package category from the list&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-          <item>
-           <property name="text">
-            <string>Select Category</string>
-           </property>
-          </item>
-         </widget>
-        </item>
-        <item row="0" column="2">
-         <widget class="QComboBox" name="d_cb_package">
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select a package from the list&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-          <item>
-           <property name="text">
-            <string>Select Package</string>
-           </property>
-          </item>
-         </widget>
-        </item>
-        <item row="0" column="3">
-         <widget class="QComboBox" name="d_cb_version">
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select a package version from the list&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-          <item>
-           <property name="text">
-            <string>Select Version</string>
-           </property>
-          </item>
-         </widget>
-        </item>
-        <item row="0" column="4" rowspan="2">
-         <layout class="QGridLayout" name="gridLayout_3">
-          <item row="0" column="0">
-           <widget class="QLabel" name="d_label_depth">
-            <property name="maximumSize">
-             <size>
-              <width>60</width>
-              <height>16777215</height>
-             </size>
-            </property>
-            <property name="font">
-             <font>
-              <weight>75</weight>
-              <bold>true</bold>
-             </font>
-            </property>
-            <property name="toolTip">
-             <string>Max depgrah depth (0=no max)</string>
-            </property>
-            <property name="layoutDirection">
-             <enum>Qt::LeftToRight</enum>
-            </property>
-            <property name="text">
-             <string>Depth:</string>
-            </property>
-            <property name="alignment">
-             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-            </property>
-           </widget>
-          </item>
-          <item row="0" column="1">
-           <widget class="QLineEdit" name="d_le_depth">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="maximumSize">
-             <size>
-              <width>80</width>
-              <height>16777215</height>
-             </size>
-            </property>
-            <property name="sizeIncrement">
-             <size>
-              <width>5</width>
-              <height>0</height>
-             </size>
-            </property>
-            <property name="baseSize">
-             <size>
-              <width>30</width>
-              <height>0</height>
-             </size>
-            </property>
-            <property name="toolTip">
-             <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set the depth to which the dependencies are calculated (0 = full depth)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-            </property>
-            <property name="inputMask">
-             <string/>
-            </property>
-            <property name="text">
-             <string>1</string>
-            </property>
-           </widget>
-          </item>
-          <item row="1" column="0" colspan="2">
-           <widget class="QCheckBox" name="d_ckb_installed">
-            <property name="toolTip">
-             <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Experimental feature:&lt;/p&gt;&lt;p&gt;May result in spurious parent/child relationships in depgraph&lt;/p&gt;&lt;p&gt;The packages listed are still the correct dependencies.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-            </property>
-            <property name="text">
-             <string>Exclude Installed</string>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </item>
-        <item row="0" column="5" rowspan="2">
-         <spacer name="horizontalSpacer_2">
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>0</width>
-            <height>48</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-        <item row="0" column="6">
-         <widget class="QPushButton" name="d_pb_calculate">
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click to do stuff&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-          <property name="text">
-           <string>Calculate</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0">
-         <widget class="QRadioButton" name="d_rb_manual">
-          <property name="text">
-           <string>Enter Package</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="1" colspan="3">
-         <widget class="QLineEdit" name="d_le_package">
-          <property name="enabled">
-           <bool>false</bool>
-          </property>
-          <property name="text">
-           <string/>
-          </property>
-          <property name="placeholderText">
-           <string/>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="6">
-         <spacer name="verticalSpacer">
-          <property name="orientation">
-           <enum>Qt::Vertical</enum>
-          </property>
-          <property name="sizeType">
-           <enum>QSizePolicy::Fixed</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>20</width>
-            <height>18</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-        <item row="2" column="0" colspan="7">
-         <widget class="QTreeView" name="d_tv_results">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="minimumSize">
-           <size>
-            <width>0</width>
-            <height>250</height>
-           </size>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="0" colspan="7">
-         <widget class="QProgressBar" name="d_pbar">
-          <property name="value">
-           <number>0</number>
-          </property>
-          <property name="textVisible">
-           <bool>true</bool>
-          </property>
-          <property name="format">
-           <string/>
-          </property>
-         </widget>
-        </item>
-        <item row="4" column="0" colspan="7">
-         <layout class="QGridLayout" name="gridLayout_7">
-          <item row="0" column="0">
-           <widget class="QPushButton" name="d_pb_expand">
-            <property name="text">
-             <string>Expand All</string>
-            </property>
-           </widget>
-          </item>
-          <item row="0" column="1">
-           <widget class="QPushButton" name="d_pb_collapse">
-            <property name="text">
-             <string>Collapse All</string>
-            </property>
-           </widget>
-          </item>
-          <item row="0" column="2">
-           <spacer name="horizontalSpacer">
-            <property name="orientation">
-             <enum>Qt::Horizontal</enum>
-            </property>
-            <property name="sizeHint" stdset="0">
-             <size>
-              <width>3000</width>
-              <height>27</height>
-             </size>
-            </property>
-           </spacer>
-          </item>
-          <item row="0" column="3">
-           <widget class="QLabel" name="label">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="maximumSize">
-             <size>
-              <width>100</width>
-              <height>16777215</height>
-             </size>
-            </property>
-            <property name="text">
-             <string>Deps Found:</string>
-            </property>
-           </widget>
-          </item>
-          <item row="0" column="4">
-           <widget class="QLCDNumber" name="d_lcd_deps">
-            <property name="segmentStyle">
-             <enum>QLCDNumber::Flat</enum>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="tab_update">
-       <attribute name="title">
-        <string>Emerge</string>
-       </attribute>
-       <layout class="QGridLayout" name="gridLayout_5">
-        <item row="0" column="0">
-         <widget class="QRadioButton" name="e_rb_new_use">
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Adds the --newuse (-N) option to the emerge command&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-          <property name="text">
-           <string>New Use</string>
-          </property>
-          <property name="checkable">
-           <bool>true</bool>
-          </property>
-          <property name="checked">
-           <bool>false</bool>
-          </property>
-          <attribute name="buttonGroup">
-           <string notr="true">use_buttongroup</string>
-          </attribute>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="QRadioButton" name="e_rb_update">
-          <property name="font">
-           <font>
-            <weight>50</weight>
-            <bold>false</bold>
-            <underline>false</underline>
-           </font>
-          </property>
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Adds the --update (-u) option to the emerge command&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-          <property name="text">
-           <string>Update</string>
-          </property>
-          <property name="checkable">
-           <bool>true</bool>
-          </property>
-          <property name="checked">
-           <bool>false</bool>
-          </property>
-          <attribute name="buttonGroup">
-           <string notr="true">tree_buttongroup</string>
-          </attribute>
-         </widget>
-        </item>
-        <item row="0" column="2">
-         <widget class="QCheckBox" name="e_cb_deep">
-          <property name="text">
-           <string>Deep</string>
-          </property>
-          <property name="checked">
-           <bool>false</bool>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="3">
-         <widget class="QRadioButton" name="e_rb_world">
-          <property name="text">
-           <string>@World</string>
-          </property>
-          <property name="checkable">
-           <bool>true</bool>
-          </property>
-          <property name="checked">
-           <bool>false</bool>
-          </property>
-          <attribute name="buttonGroup">
-           <string notr="true">atom_buttongroup</string>
-          </attribute>
-         </widget>
-        </item>
-        <item row="0" column="4">
-         <widget class="QRadioButton" name="e_rb_atom">
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enter a specific atom or set in the box below to use this option&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-          <property name="text">
-           <string>Atom Below</string>
-          </property>
-          <property name="checked">
-           <bool>true</bool>
-          </property>
-          <attribute name="buttonGroup">
-           <string notr="true">atom_buttongroup</string>
-          </attribute>
-         </widget>
-        </item>
-        <item row="0" column="5">
-         <spacer name="horizontalSpacer_5">
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>44</width>
-            <height>20</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-        <item row="0" column="6">
-         <widget class="QPushButton" name="e_pb_go">
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Executes the command with the set parameters&lt;/p&gt;&lt;p&gt;All command run with '--pretend' set. &lt;/p&gt;&lt;p&gt;'--pretend' is substituted for '--ask' on the displayed command, for quick copy and pasting.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-          <property name="text">
-           <string>Execute</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0">
-         <widget class="QRadioButton" name="e_rb_ch_use">
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Adds the --changed-use (-U) option to the emerge command&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-          <property name="text">
-           <string>Changed Use</string>
-          </property>
-          <attribute name="buttonGroup">
-           <string notr="true">use_buttongroup</string>
-          </attribute>
-         </widget>
-        </item>
-        <item row="1" column="1">
-         <widget class="QRadioButton" name="e_rb_emptytree">
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Adds the --emptytree (-e) option to the emerge command&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-          <property name="text">
-           <string>Empty Tree</string>
-          </property>
-          <property name="autoExclusive">
-           <bool>true</bool>
-          </property>
-          <attribute name="buttonGroup">
-           <string notr="true">tree_buttongroup</string>
-          </attribute>
-         </widget>
-        </item>
-        <item row="1" column="2">
-         <widget class="QCheckBox" name="e_cb_nodeps">
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Adds the --nodeps option to the emerge command (speeds up checking for use changes on a single package)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-          <property name="text">
-           <string>No Deps</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="3">
-         <widget class="QRadioButton" name="e_rb_system">
-          <property name="text">
-           <string>@System</string>
-          </property>
-          <attribute name="buttonGroup">
-           <string notr="true">atom_buttongroup</string>
-          </attribute>
-         </widget>
-        </item>
-        <item row="1" column="4" colspan="3">
-         <widget class="QLineEdit" name="e_le_atom">
-          <property name="placeholderText">
-           <string>Enter atom or set here</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="0" colspan="7">
-         <widget class="QListView" name="e_lv_results"/>
-        </item>
-        <item row="3" column="0" colspan="7">
-         <widget class="QProgressBar" name="e_pbar">
-          <property name="value">
-           <number>0</number>
-          </property>
-          <property name="textVisible">
-           <bool>true</bool>
-          </property>
-          <property name="format">
-           <string/>
-          </property>
-         </widget>
-        </item>
-        <item row="4" column="0" colspan="7">
-         <widget class="QLineEdit" name="u_le_cmd">
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Command to run in a terminal to make proposed changes&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
      </widget>
     </item>
    </layout>
@@ -833,12 +360,12 @@ p, li { white-space: pre-wrap; }
  <resources/>
  <connections/>
  <buttongroups>
+  <buttongroup name="tree_buttongroup"/>
+  <buttongroup name="atom_buttongroup"/>
   <buttongroup name="use_buttongroup">
    <property name="exclusive">
     <bool>true</bool>
    </property>
   </buttongroup>
-  <buttongroup name="atom_buttongroup"/>
-  <buttongroup name="tree_buttongroup"/>
  </buttongroups>
 </ui>