diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-03-25 12:47:26 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-03-25 12:47:26 +0100 |
commit | 405503df01e3300304939517994dfb94677858ed (patch) | |
tree | 120c3ccd30067130513a94340f6c3ffaac1aef8a /src/frontend | |
parent | b9d56194b7f434e8ae748d1cffb5a8734c548a4e (diff) |
connect sisyphus-config to main application
Diffstat (limited to 'src/frontend')
-rw-r--r-- | src/frontend/gui/icon/settings.png | bin | 0 -> 14015 bytes | |||
-rwxr-xr-x | src/frontend/gui/sisyphus-gui.py | 7 | ||||
-rwxr-xr-x | src/frontend/gui/sisyphusconfig.py (renamed from src/frontend/gui/sisyphus-config.py) | 5 | ||||
-rw-r--r-- | src/frontend/gui/ui/sisyphus-config.ui | 7 | ||||
-rw-r--r-- | src/frontend/gui/ui/sisyphus-gui.ui | 107 |
5 files changed, 76 insertions, 50 deletions
diff --git a/src/frontend/gui/icon/settings.png b/src/frontend/gui/icon/settings.png Binary files differnew file mode 100644 index 0000000..f9857f0 --- /dev/null +++ b/src/frontend/gui/icon/settings.png diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py index 613c433..9ef3550 100755 --- a/src/frontend/gui/sisyphus-gui.py +++ b/src/frontend/gui/sisyphus-gui.py @@ -7,6 +7,7 @@ import atexit from collections import OrderedDict from PyQt5 import QtCore, QtGui, QtWidgets, uic from libsisyphus import * +from sisyphusconfig import SisyphusConfig class Sisyphus(QtWidgets.QMainWindow): @@ -44,6 +45,8 @@ class Sisyphus(QtWidgets.QMainWindow): self.inputBox.textEdited.connect(self.searchDatabase) + self.settingsButton.clicked.connect(self.sisyphusSettings) + self.updateWorker = UpdateWorker() self.updateThread = QtCore.QThread() self.updateWorker.moveToThread(self.updateThread) @@ -298,6 +301,10 @@ class Sisyphus(QtWidgets.QMainWindow): def updateStatusBar(self, workerMessage): self.statusBar().showMessage(workerMessage) + def sisyphusSettings(self): + self.window = SisyphusConfig() + self.window.show() + def sisyphusExit(self): self.close() diff --git a/src/frontend/gui/sisyphus-config.py b/src/frontend/gui/sisyphusconfig.py index 67e6ae8..35e50fe 100755 --- a/src/frontend/gui/sisyphus-config.py +++ b/src/frontend/gui/sisyphusconfig.py @@ -42,8 +42,3 @@ class SisyphusConfig(QtWidgets.QMainWindow): def SisyphusConfigExit(self): self.close() - -if __name__ == '__main__': - app = QtWidgets.QApplication(sys.argv) - window = SisyphusConfig() - sys.exit(app.exec_()) diff --git a/src/frontend/gui/ui/sisyphus-config.ui b/src/frontend/gui/ui/sisyphus-config.ui index 7d74ae4..fe60c56 100644 --- a/src/frontend/gui/ui/sisyphus-config.ui +++ b/src/frontend/gui/ui/sisyphus-config.ui @@ -2,6 +2,9 @@ <ui version="4.0"> <class>MainWindow</class> <widget class="QMainWindow" name="MainWindow"> + <property name="windowModality"> + <enum>Qt::ApplicationModal</enum> + </property> <property name="geometry"> <rect> <x>0</x> @@ -26,8 +29,8 @@ <string>Sisyphus settings</string> </property> <property name="windowIcon"> - <iconset theme="applications-utilities"> - <normaloff>.</normaloff>.</iconset> + <iconset> + <normaloff>../icon/sisyphus.png</normaloff>../icon/sisyphus.png</iconset> </property> <widget class="QWidget" name="centralWidget"> <layout class="QVBoxLayout" name="verticalLayout"> diff --git a/src/frontend/gui/ui/sisyphus-gui.ui b/src/frontend/gui/ui/sisyphus-gui.ui index 48c0c06..4b502a7 100644 --- a/src/frontend/gui/ui/sisyphus-gui.ui +++ b/src/frontend/gui/ui/sisyphus-gui.ui @@ -3,7 +3,7 @@ <class>Sisyphus</class> <widget class="QMainWindow" name="Sisyphus"> <property name="windowModality"> - <enum>Qt::ApplicationModal</enum> + <enum>Qt::NonModal</enum> </property> <property name="geometry"> <rect> @@ -49,6 +49,68 @@ <property name="spacing"> <number>25</number> </property> + <item row="0" column="0"> + <layout class="QHBoxLayout" name="inputGrid"> + <property name="spacing"> + <number>25</number> + </property> + <property name="leftMargin"> + <number>25</number> + </property> + <property name="rightMargin"> + <number>25</number> + </property> + <item> + <widget class="QPushButton" name="settingsButton"> + <property name="maximumSize"> + <size> + <width>25</width> + <height>25</height> + </size> + </property> + <property name="icon"> + <iconset> + <normaloff>../icon/settings.png</normaloff>../icon/settings.png</iconset> + </property> + <property name="iconSize"> + <size> + <width>16</width> + <height>16</height> + </size> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="applicationFilter"/> + </item> + <item> + <widget class="QLineEdit" name="inputBox"> + <property name="toolTip"> + <string><html><head/><body><p align="center">Write package name and press Enter</p></body></html></string> + </property> + <property name="clearButtonEnabled"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="databaseFilter"/> + </item> + </layout> + </item> + <item row="3" column="0"> + <widget class="QProgressBar" name="progressBar"> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>25</height> + </size> + </property> + <property name="value"> + <number>24</number> + </property> + </widget> + </item> <item row="1" column="0"> <widget class="QTableView" name="databaseTable"> <property name="frameShape"> @@ -98,35 +160,6 @@ </attribute> </widget> </item> - <item row="0" column="0"> - <layout class="QHBoxLayout" name="inputGrid"> - <property name="spacing"> - <number>25</number> - </property> - <property name="leftMargin"> - <number>25</number> - </property> - <property name="rightMargin"> - <number>25</number> - </property> - <item> - <widget class="QComboBox" name="applicationFilter"/> - </item> - <item> - <widget class="QLineEdit" name="inputBox"> - <property name="toolTip"> - <string><html><head/><body><p align="center">Write package name and press Enter</p></body></html></string> - </property> - <property name="clearButtonEnabled"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="databaseFilter"/> - </item> - </layout> - </item> <item row="2" column="0"> <layout class="QHBoxLayout" name="actionGrid"> <property name="spacing"> @@ -264,23 +297,11 @@ </item> </layout> </item> - <item row="3" column="0"> - <widget class="QProgressBar" name="progressBar"> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>25</height> - </size> - </property> - <property name="value"> - <number>24</number> - </property> - </widget> - </item> </layout> </widget> </widget> <tabstops> + <tabstop>settingsButton</tabstop> <tabstop>applicationFilter</tabstop> <tabstop>inputBox</tabstop> <tabstop>databaseFilter</tabstop> |