diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-07-09 17:39:53 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-07-09 17:39:53 +0100 |
commit | d7f47c37cbf4a6c3f92b518e6ce6e144e9e67276 (patch) | |
tree | d8a6a95a70cd60a18774bd849aaa105fad2f549a /src/frontend | |
parent | a09a21d956c747d0479eab11c50b5988d9053faa (diff) |
enable filtering widget (signals not yet connected)
Diffstat (limited to 'src/frontend')
-rwxr-xr-x | src/frontend/gui/sisyphus-gui.py | 26 | ||||
-rw-r--r-- | src/frontend/gui/ui/sisyphus-gui.ui | 44 |
2 files changed, 44 insertions, 26 deletions
diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py index 800dfad..1a7a64a 100755 --- a/src/frontend/gui/sisyphus-gui.py +++ b/src/frontend/gui/sisyphus-gui.py @@ -12,11 +12,11 @@ class Sisyphus(QtWidgets.QMainWindow): self.show() self.load_packages() - self.package_install.clicked.connect(self.install_package) - self.package_uninstall.clicked.connect(self.uninstall_package) - self.orphans_remove.clicked.connect(self.remove_orphans) - self.system_upgrade.clicked.connect(self.upgrade_system) - self.sisyphus_exit.clicked.connect(self.exit_sisyphus) + self.install.clicked.connect(self.install_package) + self.uninstall.clicked.connect(self.uninstall_package) + self.orphans.clicked.connect(self.remove_orphans) + self.upgrade.clicked.connect(self.upgrade_system) + self.abort.clicked.connect(self.exit_sisyphus) def centerOnScreen(self): resolution = QtWidgets.QDesktopWidget().screenGeometry() @@ -24,11 +24,11 @@ class Sisyphus(QtWidgets.QMainWindow): (resolution.height() / 2) - (self.frameSize().height() / 2)) def install_package(self): - pkgname = self.table_everything.item(self.table_everything.currentRow(), 1).text() + pkgname = self.database.item(self.database.currentRow(), 1).text() subprocess.Popen(['xterm', '-e', 'sisyphus', 'auto-install'] + pkgname.split()) def uninstall_package(self): - pkgname = self.table_everything.item(self.table_everything.currentRow(), 1).text() + pkgname = self.database.item(self.database.currentRow(), 1).text() subprocess.Popen(['xterm', '-e', 'sisyphus', 'auto-uninstall'] + pkgname.split()) def remove_orphans(self): @@ -62,12 +62,12 @@ class Sisyphus(QtWidgets.QMainWindow): for row in rows: inx = rows.index(row) - self.table_everything.insertRow(inx) - self.table_everything.setItem(inx, 0, QtWidgets.QTableWidgetItem(row[0])) - self.table_everything.setItem(inx, 1, QtWidgets.QTableWidgetItem(row[1])) - self.table_everything.setItem(inx, 2, QtWidgets.QTableWidgetItem(row[2])) - self.table_everything.setItem(inx, 3, QtWidgets.QTableWidgetItem(row[3])) - self.table_everything.setItem(inx, 4, QtWidgets.QTableWidgetItem(row[4])) + self.database.insertRow(inx) + self.database.setItem(inx, 0, QtWidgets.QTableWidgetItem(row[0])) + self.database.setItem(inx, 1, QtWidgets.QTableWidgetItem(row[1])) + self.database.setItem(inx, 2, QtWidgets.QTableWidgetItem(row[2])) + self.database.setItem(inx, 3, QtWidgets.QTableWidgetItem(row[3])) + self.database.setItem(inx, 4, QtWidgets.QTableWidgetItem(row[4])) if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) diff --git a/src/frontend/gui/ui/sisyphus-gui.ui b/src/frontend/gui/ui/sisyphus-gui.ui index f2cbcdb..ad37fbd 100644 --- a/src/frontend/gui/ui/sisyphus-gui.ui +++ b/src/frontend/gui/ui/sisyphus-gui.ui @@ -32,13 +32,13 @@ <iconset> <normaloff>../icon/sisyphus.png</normaloff>../icon/sisyphus.png</iconset> </property> - <widget class="QTableWidget" name="table_everything"> + <widget class="QTableWidget" name="database"> <property name="geometry"> <rect> <x>25</x> - <y>25</y> + <y>75</y> <width>950</width> - <height>500</height> + <height>450</height> </rect> </property> <property name="maximumSize"> @@ -106,7 +106,7 @@ </property> </column> </widget> - <widget class="QPushButton" name="package_uninstall"> + <widget class="QPushButton" name="uninstall"> <property name="geometry"> <rect> <x>225</x> @@ -132,7 +132,7 @@ </size> </property> </widget> - <widget class="QPushButton" name="orphans_remove"> + <widget class="QPushButton" name="orphans"> <property name="geometry"> <rect> <x>425</x> @@ -158,7 +158,7 @@ </size> </property> </widget> - <widget class="QPushButton" name="sisyphus_exit"> + <widget class="QPushButton" name="abort"> <property name="geometry"> <rect> <x>825</x> @@ -181,7 +181,7 @@ </size> </property> </widget> - <widget class="QPushButton" name="package_install"> + <widget class="QPushButton" name="install"> <property name="geometry"> <rect> <x>25</x> @@ -207,7 +207,7 @@ </size> </property> </widget> - <widget class="QPushButton" name="system_upgrade"> + <widget class="QPushButton" name="upgrade"> <property name="geometry"> <rect> <x>625</x> @@ -230,13 +230,31 @@ </size> </property> </widget> + <widget class="QLineEdit" name="input"> + <property name="geometry"> + <rect> + <x>250</x> + <y>25</y> + <width>500</width> + <height>25</height> + </rect> + </property> + <property name="text"> + <string>Enter package name...</string> + </property> + <property name="clearButtonEnabled"> + <bool>true</bool> + </property> + </widget> </widget> <tabstops> - <tabstop>table_everything</tabstop> - <tabstop>package_install</tabstop> - <tabstop>package_uninstall</tabstop> - <tabstop>orphans_remove</tabstop> - <tabstop>sisyphus_exit</tabstop> + <tabstop>input</tabstop> + <tabstop>database</tabstop> + <tabstop>install</tabstop> + <tabstop>uninstall</tabstop> + <tabstop>orphans</tabstop> + <tabstop>upgrade</tabstop> + <tabstop>abort</tabstop> </tabstops> <resources/> <connections/> |