commit 37fc80f11f39700f6f6cf06862b4c1033067cd10 Author: hwd Date: Wed Apr 29 17:17:45 2020 +0200 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/WidgetInWidget/GenericFooterTemplate.ui b/WidgetInWidget/GenericFooterTemplate.ui new file mode 100755 index 0000000..e08395a --- /dev/null +++ b/WidgetInWidget/GenericFooterTemplate.ui @@ -0,0 +1,24 @@ + + + LoginTemplate + + + + 0 + 0 + 415 + 449 + + + + + DejaVu Serif + + + + Form + + + + + diff --git a/WidgetInWidget/LoginTemplate.ui b/WidgetInWidget/LoginTemplate.ui new file mode 100755 index 0000000..dcadbf9 --- /dev/null +++ b/WidgetInWidget/LoginTemplate.ui @@ -0,0 +1,350 @@ + + + LoginTemplate + + + + 0 + 0 + 415 + 449 + + + + + DejaVu Serif + + + + Form + + + + + 10 + 10 + 64 + 64 + + + + + + + 80 + 20 + 240 + 45 + + + + + DejaVu Serif + 25 + 75 + true + false + PreferAntialias + false + + + + LoginName + + + true + + + false + + + + + + 10 + 120 + 131 + 321 + + + + + + 0 + 0 + 131 + 31 + + + + + DejaVu Serif + 16 + + + + Username: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 0 + 40 + 131 + 31 + + + + + DejaVu Serif + 16 + + + + Password: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 0 + 80 + 131 + 31 + + + + + DejaVu Serif + 16 + + + + Website: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 0 + 120 + 131 + 31 + + + + + DejaVu Serif + 16 + + + + Notes: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 0 + 200 + 131 + 31 + + + + + DejaVu Serif + 16 + + + + Tags: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 0 + 260 + 131 + 31 + + + + + DejaVu Serif + 10 + + + + Last changed: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 0 + 280 + 131 + 31 + + + + + DejaVu Serif + 10 + + + + Created: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 150 + 120 + 251 + 321 + + + + + + 0 + 260 + 131 + 31 + + + + + DejaVu Serif + 10 + + + + 14.04.2020 13:43:08 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + 0 + 280 + 131 + 31 + + + + + DejaVu Serif + 10 + + + + 14.04.2020 13:43:08 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + 10 + 5 + 200 + 24 + + + + + DejaVu Serif + 14 + + + + + + + 10 + 45 + 200 + 24 + + + + + DejaVu Serif + 14 + + + + + + + 10 + 85 + 200 + 24 + + + + + DejaVu Serif + 14 + + + + + + + 10 + 125 + 200 + 75 + + + + + + + 10 + 210 + 200 + 24 + + + + + + + + diff --git a/WidgetInWidget/LoginTemplate2.py b/WidgetInWidget/LoginTemplate2.py new file mode 100755 index 0000000..ed779c0 --- /dev/null +++ b/WidgetInWidget/LoginTemplate2.py @@ -0,0 +1,181 @@ + + +from PyQt5 import QtCore, QtGui, QtWidgets + + +class Ui_LoginTemplate(object): + def setupUi(self, LoginTemplate): + LoginTemplate.setObjectName("LoginTemplate") + LoginTemplate.resize(517, 531) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + LoginTemplate.setFont(font) + self.formLayoutWidget = QtWidgets.QWidget(LoginTemplate) + self.formLayoutWidget.setGeometry(QtCore.QRect(0, 0, 511, 521)) + self.formLayoutWidget.setObjectName("formLayoutWidget") + self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget) + self.formLayout.setLabelAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) + self.formLayout.setContentsMargins(0, 0, 0, 0) + self.formLayout.setObjectName("formLayout") + self.gvIcon = QtWidgets.QGraphicsView(self.formLayoutWidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.gvIcon.sizePolicy().hasHeightForWidth()) + self.gvIcon.setSizePolicy(sizePolicy) + self.gvIcon.setMinimumSize(QtCore.QSize(64, 64)) + self.gvIcon.setMaximumSize(QtCore.QSize(64, 64)) + self.gvIcon.setObjectName("gvIcon") + self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.gvIcon) + self.lblLoginName = QtWidgets.QLabel(self.formLayoutWidget) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(25) + font.setBold(True) + font.setUnderline(False) + font.setWeight(75) + font.setKerning(False) + font.setStyleStrategy(QtGui.QFont.PreferAntialias) + self.lblLoginName.setFont(font) + self.lblLoginName.setScaledContents(True) + self.lblLoginName.setWordWrap(False) + self.lblLoginName.setObjectName("lblLoginName") + self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.lblLoginName) + self.lblUsrName = QtWidgets.QLabel(self.formLayoutWidget) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(16) + self.lblUsrName.setFont(font) + self.lblUsrName.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.lblUsrName.setObjectName("lblUsrName") + self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.lblUsrName) + self.tbUsrName = QtWidgets.QLineEdit(self.formLayoutWidget) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(14) + self.tbUsrName.setFont(font) + self.tbUsrName.setObjectName("tbUsrName") + self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.tbUsrName) + self.lblPasswd = QtWidgets.QLabel(self.formLayoutWidget) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(16) + self.lblPasswd.setFont(font) + self.lblPasswd.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.lblPasswd.setObjectName("lblPasswd") + self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.lblPasswd) + self.tbPasswd = QtWidgets.QLineEdit(self.formLayoutWidget) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(14) + self.tbPasswd.setFont(font) + self.tbPasswd.setObjectName("tbPasswd") + self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.tbPasswd) + self.lblWebsite = QtWidgets.QLabel(self.formLayoutWidget) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(16) + self.lblWebsite.setFont(font) + self.lblWebsite.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.lblWebsite.setObjectName("lblWebsite") + self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.lblWebsite) + self.tbWebsite = QtWidgets.QLineEdit(self.formLayoutWidget) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(14) + self.tbWebsite.setFont(font) + self.tbWebsite.setObjectName("tbWebsite") + self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.tbWebsite) + self.lblNotes = QtWidgets.QLabel(self.formLayoutWidget) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(16) + self.lblNotes.setFont(font) + self.lblNotes.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.lblNotes.setObjectName("lblNotes") + self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.lblNotes) + self.tbNotes = QtWidgets.QTextEdit(self.formLayoutWidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.tbNotes.sizePolicy().hasHeightForWidth()) + self.tbNotes.setSizePolicy(sizePolicy) + self.tbNotes.setMinimumSize(QtCore.QSize(0, 75)) + self.tbNotes.setMaximumSize(QtCore.QSize(16777215, 75)) + self.tbNotes.setObjectName("tbNotes") + self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.tbNotes) + self.lblTags = QtWidgets.QLabel(self.formLayoutWidget) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(16) + self.lblTags.setFont(font) + self.lblTags.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.lblTags.setObjectName("lblTags") + self.formLayout.setWidget(8, QtWidgets.QFormLayout.LabelRole, self.lblTags) + self.tbTags = QtWidgets.QLineEdit(self.formLayoutWidget) + self.tbTags.setObjectName("tbTags") + self.formLayout.setWidget(8, QtWidgets.QFormLayout.FieldRole, self.tbTags) + self.lblLastChangedDesc = QtWidgets.QLabel(self.formLayoutWidget) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(10) + self.lblLastChangedDesc.setFont(font) + self.lblLastChangedDesc.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.lblLastChangedDesc.setObjectName("lblLastChangedDesc") + self.formLayout.setWidget(9, QtWidgets.QFormLayout.LabelRole, self.lblLastChangedDesc) + self.lblLastChangedVal = QtWidgets.QLabel(self.formLayoutWidget) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(10) + self.lblLastChangedVal.setFont(font) + self.lblLastChangedVal.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) + self.lblLastChangedVal.setObjectName("lblLastChangedVal") + self.formLayout.setWidget(9, QtWidgets.QFormLayout.FieldRole, self.lblLastChangedVal) + self.lblCreatedDesc = QtWidgets.QLabel(self.formLayoutWidget) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(10) + self.lblCreatedDesc.setFont(font) + self.lblCreatedDesc.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.lblCreatedDesc.setObjectName("lblCreatedDesc") + self.formLayout.setWidget(10, QtWidgets.QFormLayout.LabelRole, self.lblCreatedDesc) + self.lblCreatedVal = QtWidgets.QLabel(self.formLayoutWidget) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(10) + self.lblCreatedVal.setFont(font) + self.lblCreatedVal.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) + self.lblCreatedVal.setObjectName("lblCreatedVal") + self.formLayout.setWidget(10, QtWidgets.QFormLayout.FieldRole, self.lblCreatedVal) + self.scrollArea = QtWidgets.QScrollArea(self.formLayoutWidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.scrollArea.sizePolicy().hasHeightForWidth()) + self.scrollArea.setSizePolicy(sizePolicy) + self.scrollArea.setMinimumSize(QtCore.QSize(0, 170)) + self.scrollArea.setMaximumSize(QtCore.QSize(16777215, 170)) + self.scrollArea.setWidgetResizable(True) + self.scrollArea.setObjectName("scrollArea") + self.scrollAreaWidgetContents = QtWidgets.QWidget() + self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 400, 168)) + self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") + self.scrollArea.setWidget(self.scrollAreaWidgetContents) + self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.scrollArea) + + self.retranslateUi(LoginTemplate) + QtCore.QMetaObject.connectSlotsByName(LoginTemplate) + + def retranslateUi(self, LoginTemplate): + _translate = QtCore.QCoreApplication.translate + LoginTemplate.setWindowTitle(_translate("LoginTemplate", "Form")) + self.lblLoginName.setText(_translate("LoginTemplate", "LoginName")) + self.lblUsrName.setText(_translate("LoginTemplate", "Username:")) + self.lblPasswd.setText(_translate("LoginTemplate", "Password:")) + self.lblWebsite.setText(_translate("LoginTemplate", "Website:")) + self.lblNotes.setText(_translate("LoginTemplate", "Notes:")) + self.lblTags.setText(_translate("LoginTemplate", "Tags:")) + self.lblLastChangedDesc.setText(_translate("LoginTemplate", "Last changed:")) + self.lblLastChangedVal.setText(_translate("LoginTemplate", "14.04.2020 13:43:08")) + self.lblCreatedDesc.setText(_translate("LoginTemplate", "Created:")) + self.lblCreatedVal.setText(_translate("LoginTemplate", "14.04.2020 13:43:08")) diff --git a/WidgetInWidget/LoginTemplate2.ui b/WidgetInWidget/LoginTemplate2.ui new file mode 100755 index 0000000..de8e12a --- /dev/null +++ b/WidgetInWidget/LoginTemplate2.ui @@ -0,0 +1,319 @@ + + + LoginTemplate + + + + 0 + 0 + 517 + 531 + + + + + DejaVu Serif + + + + Form + + + + + 0 + 0 + 511 + 521 + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + 0 + 0 + + + + + 64 + 64 + + + + + 64 + 64 + + + + + + + + + DejaVu Serif + 25 + 75 + true + false + PreferAntialias + false + + + + LoginName + + + true + + + false + + + + + + + + DejaVu Serif + 16 + + + + Username: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + DejaVu Serif + 14 + + + + + + + + + DejaVu Serif + 16 + + + + Password: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + DejaVu Serif + 14 + + + + + + + + + DejaVu Serif + 16 + + + + Website: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + DejaVu Serif + 14 + + + + + + + + + DejaVu Serif + 16 + + + + Notes: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 0 + 75 + + + + + 16777215 + 75 + + + + + + + + + DejaVu Serif + 16 + + + + Tags: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + DejaVu Serif + 10 + + + + Last changed: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + DejaVu Serif + 10 + + + + 14.04.2020 13:43:08 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + DejaVu Serif + 10 + + + + Created: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + DejaVu Serif + 10 + + + + 14.04.2020 13:43:08 + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 0 + 170 + + + + + 16777215 + 170 + + + + true + + + + + 0 + 0 + 400 + 168 + + + + + + + + + + + diff --git a/WidgetInWidget/Mainview2.py b/WidgetInWidget/Mainview2.py new file mode 100755 index 0000000..2d2de85 --- /dev/null +++ b/WidgetInWidget/Mainview2.py @@ -0,0 +1,108 @@ +from PyQt5 import QtCore, QtGui, QtWidgets +from LoginTemplate2 import Ui_LoginTemplate + + +class Ui_PyOnePass(QtWidgets.QWidget): + def setupUi(self, PyOnePass): + PyOnePass.setObjectName("PyOnePass") + PyOnePass.resize(1000, 580) + PyOnePass.setMinimumSize(QtCore.QSize(1000, 580)) + PyOnePass.setMaximumSize(QtCore.QSize(1000, 580)) + self.centralwidget = QtWidgets.QWidget(PyOnePass) + self.centralwidget.setObjectName("centralwidget") + self.lstWidVaults = QtWidgets.QListWidget(self.centralwidget) + self.lstWidVaults.setGeometry(QtCore.QRect(5, 25, 180, 120)) + self.lstWidVaults.setObjectName("lstWidVaults") + self.lstWidCategories = QtWidgets.QListWidget(self.centralwidget) + self.lstWidCategories.setGeometry(QtCore.QRect(5, 170, 180, 230)) + self.lstWidCategories.setFrameShadow(QtWidgets.QFrame.Sunken) + self.lstWidCategories.setLineWidth(1) + self.lstWidCategories.setMidLineWidth(0) + self.lstWidCategories.setObjectName("lstWidCategories") + self.lblVaults = QtWidgets.QLabel(self.centralwidget) + self.lblVaults.setGeometry(QtCore.QRect(5, 5, 50, 16)) + self.lblVaults.setObjectName("lblVaults") + self.lblItems = QtWidgets.QLabel(self.centralwidget) + self.lblItems.setGeometry(QtCore.QRect(5, 150, 70, 16)) + self.lblItems.setObjectName("lblItems") + self.lblTags = QtWidgets.QLabel(self.centralwidget) + self.lblTags.setGeometry(QtCore.QRect(5, 405, 50, 16)) + self.lblTags.setObjectName("lblTags") + self.lstWidTags = QtWidgets.QListWidget(self.centralwidget) + self.lstWidTags.setGeometry(QtCore.QRect(5, 425, 180, 125)) + self.lstWidTags.setObjectName("lstWidTags") + self.lstWidItems = QtWidgets.QListWidget(self.centralwidget) + self.lstWidItems.setGeometry(QtCore.QRect(220, 90, 250, 460)) + self.lstWidItems.setObjectName("lstWidItems") + self.label = QtWidgets.QLabel(self.centralwidget) + self.label.setGeometry(QtCore.QRect(220, 70, 57, 16)) + self.label.setObjectName("label") + self.tbSearch = QtWidgets.QLineEdit(self.centralwidget) + self.tbSearch.setGeometry(QtCore.QRect(220, 25, 220, 26)) + self.tbSearch.setObjectName("tbSearch") + self.lblSearchbox = QtWidgets.QLabel(self.centralwidget) + self.lblSearchbox.setGeometry(QtCore.QRect(220, 5, 57, 16)) + self.lblSearchbox.setObjectName("lblSearchbox") + self.cbFilterItems = QtWidgets.QComboBox(self.centralwidget) + self.cbFilterItems.setGeometry(QtCore.QRect(260, 60, 210, 26)) + font = QtGui.QFont() + font.setFamily("Hack") + self.cbFilterItems.setFont(font) + self.cbFilterItems.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor)) + self.cbFilterItems.setObjectName("cbFilterItems") + self.btnAddItem = QtWidgets.QPushButton(self.centralwidget) + self.btnAddItem.setGeometry(QtCore.QRect(444, 25, 26, 26)) + self.btnAddItem.setObjectName("btnAddItem") + self.lblLogoutTimer = QtWidgets.QLabel(self.centralwidget) + self.lblLogoutTimer.setGeometry(QtCore.QRect(860, 5, 131, 20)) + self.lblLogoutTimer.setToolTip("") + self.lblLogoutTimer.setToolTipDuration(8) + self.lblLogoutTimer.setObjectName("lblLogoutTimer") + self.horizontalLayoutWidget = QtWidgets.QWidget(self.centralwidget) + self.horizontalLayoutWidget.setGeometry(QtCore.QRect(480, 30, 515, 520)) + self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") + self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget) + self.horizontalLayout.setContentsMargins(0, 0, 0, 0) + self.horizontalLayout.setObjectName("horizontalLayout") + PyOnePass.setCentralWidget(self.centralwidget) + self.menubar = QtWidgets.QMenuBar(PyOnePass) + self.menubar.setGeometry(QtCore.QRect(0, 0, 1000, 21)) + self.menubar.setObjectName("menubar") + self.menuFile = QtWidgets.QMenu(self.menubar) + self.menuFile.setObjectName("menuFile") + PyOnePass.setMenuBar(self.menubar) + self.actionExit = QtWidgets.QAction(PyOnePass) + self.actionExit.setObjectName("actionExit") + self.menuFile.addAction(self.actionExit) + self.menubar.addAction(self.menuFile.menuAction()) + + self.retranslateUi(PyOnePass) + QtCore.QMetaObject.connectSlotsByName(PyOnePass) + + def retranslateUi(self, PyOnePass): + _translate = QtCore.QCoreApplication.translate + PyOnePass.setWindowTitle(_translate("PyOnePass", "MainWindow")) + self.lblVaults.setText(_translate("PyOnePass", "Vaults:")) + self.lblItems.setText(_translate("PyOnePass", "Categories:")) + self.lblTags.setText(_translate("PyOnePass", "Tags:")) + self.label.setText(_translate("PyOnePass", "Items:")) + self.lblSearchbox.setText(_translate("PyOnePass", "search:")) + self.btnAddItem.setText(_translate("PyOnePass", "+")) + self.lblLogoutTimer.setText(_translate("PyOnePass", "00:00:00 until logout")) + self.menuFile.setTitle(_translate("PyOnePass", "File")) + self.actionExit.setText(_translate("PyOnePass", "Exit")) + + def eerrtt(self): + pass + + + +if __name__ == "__main__": + import sys + app = QtWidgets.QApplication(sys.argv) + PyOnePass = QtWidgets.QMainWindow() + ui = Ui_PyOnePass() + ui.setupUi(PyOnePass) + #ui.addTemplateWidget() + PyOnePass.show() + sys.exit(app.exec_()) diff --git a/WidgetInWidget/Mainview2.ui b/WidgetInWidget/Mainview2.ui new file mode 100755 index 0000000..c65e372 --- /dev/null +++ b/WidgetInWidget/Mainview2.ui @@ -0,0 +1,240 @@ + + + PyOnePass + + + + 0 + 0 + 1000 + 580 + + + + + 1000 + 580 + + + + + 1000 + 580 + + + + MainWindow + + + + + + 5 + 25 + 180 + 120 + + + + + + + 5 + 170 + 180 + 230 + + + + QFrame::Sunken + + + 1 + + + 0 + + + + + + 5 + 5 + 50 + 16 + + + + Vaults: + + + + + + 5 + 150 + 70 + 16 + + + + Categories: + + + + + + 5 + 405 + 50 + 16 + + + + Tags: + + + + + + 5 + 425 + 180 + 125 + + + + + + + 220 + 90 + 250 + 460 + + + + + + + 220 + 70 + 57 + 16 + + + + Items: + + + + + + 220 + 25 + 220 + 26 + + + + + + + 220 + 5 + 57 + 16 + + + + search: + + + + + + 260 + 60 + 210 + 26 + + + + + Hack + + + + ArrowCursor + + + + + + 444 + 25 + 26 + 26 + + + + + + + + + + + 860 + 5 + 131 + 20 + + + + + + + 8 + + + 00:00:00 until logout + + + + + + 480 + 30 + 491 + 521 + + + + + + + + + 0 + 0 + 1000 + 21 + + + + + File + + + + + + + + Exit + + + + + + diff --git a/WidgetInWidget/NotesTemplate.ui b/WidgetInWidget/NotesTemplate.ui new file mode 100755 index 0000000..5a23491 --- /dev/null +++ b/WidgetInWidget/NotesTemplate.ui @@ -0,0 +1,123 @@ + + + LoginTemplate + + + + 0 + 0 + 415 + 449 + + + + + DejaVu Serif + + + + Form + + + + + 10 + 10 + 64 + 64 + + + + + + + 80 + 20 + 240 + 45 + + + + + DejaVu Serif + 25 + 75 + true + false + PreferAntialias + false + + + + LoginName + + + true + + + false + + + + + + 10 + 80 + 390 + 350 + + + + Qt::ScrollBarAlwaysOn + + + true + + + + + 0 + 0 + 371 + 348 + + + + + + 10 + 65 + 47 + 13 + + + + + 10 + 75 + true + + + + Notes: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 70 + 10 + 291 + 71 + + + + + + + + + diff --git a/WidgetInWidget/WidgetLoginTemplate.py b/WidgetInWidget/WidgetLoginTemplate.py new file mode 100755 index 0000000..9600eab --- /dev/null +++ b/WidgetInWidget/WidgetLoginTemplate.py @@ -0,0 +1,158 @@ + +from PyQt5 import QtCore, QtGui, QtWidgets + + +class Ui_LoginTemplate(object): + def setupUi(self, LoginTemplate): + LoginTemplate.setObjectName("LoginTemplate") + LoginTemplate.resize(415, 449) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + LoginTemplate.setFont(font) + self.gvIcon = QtWidgets.QGraphicsView(LoginTemplate) + self.gvIcon.setGeometry(QtCore.QRect(10, 10, 64, 64)) + self.gvIcon.setObjectName("gvIcon") + self.lblLoginName = QtWidgets.QLabel(LoginTemplate) + self.lblLoginName.setGeometry(QtCore.QRect(80, 20, 240, 45)) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(25) + font.setBold(True) + font.setWeight(75) + font.setStyleStrategy(QtGui.QFont.PreferAntialias) + self.lblLoginName.setFont(font) + self.lblLoginName.setScaledContents(True) + self.lblLoginName.setWordWrap(False) + self.lblLoginName.setObjectName("lblLoginName") + self.widget = QtWidgets.QWidget(LoginTemplate) + self.widget.setGeometry(QtCore.QRect(10, 120, 131, 321)) + self.widget.setObjectName("widget") + self.lblUsrName = QtWidgets.QLabel(self.widget) + self.lblUsrName.setGeometry(QtCore.QRect(0, 0, 131, 31)) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(16) + self.lblUsrName.setFont(font) + self.lblUsrName.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.lblUsrName.setObjectName("lblUsrName") + self.lblPasswd = QtWidgets.QLabel(self.widget) + self.lblPasswd.setGeometry(QtCore.QRect(0, 40, 131, 31)) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(16) + self.lblPasswd.setFont(font) + self.lblPasswd.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.lblPasswd.setObjectName("lblPasswd") + self.lblWebsite = QtWidgets.QLabel(self.widget) + self.lblWebsite.setGeometry(QtCore.QRect(0, 80, 131, 31)) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(16) + self.lblWebsite.setFont(font) + self.lblWebsite.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.lblWebsite.setObjectName("lblWebsite") + self.lblNotes = QtWidgets.QLabel(self.widget) + self.lblNotes.setGeometry(QtCore.QRect(0, 120, 131, 31)) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(16) + self.lblNotes.setFont(font) + self.lblNotes.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.lblNotes.setObjectName("lblNotes") + self.lblTags = QtWidgets.QLabel(self.widget) + self.lblTags.setGeometry(QtCore.QRect(0, 200, 131, 31)) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(16) + self.lblTags.setFont(font) + self.lblTags.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.lblTags.setObjectName("lblTags") + self.lblLastChangedDesc = QtWidgets.QLabel(self.widget) + self.lblLastChangedDesc.setGeometry(QtCore.QRect(0, 260, 131, 31)) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(10) + self.lblLastChangedDesc.setFont(font) + self.lblLastChangedDesc.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.lblLastChangedDesc.setObjectName("lblLastChangedDesc") + self.lblCreatedDesc = QtWidgets.QLabel(self.widget) + self.lblCreatedDesc.setGeometry(QtCore.QRect(0, 280, 131, 31)) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(10) + self.lblCreatedDesc.setFont(font) + self.lblCreatedDesc.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.lblCreatedDesc.setObjectName("lblCreatedDesc") + self.widget_2 = QtWidgets.QWidget(LoginTemplate) + self.widget_2.setGeometry(QtCore.QRect(150, 120, 251, 321)) + self.widget_2.setObjectName("widget_2") + self.lblLastChangedVal = QtWidgets.QLabel(self.widget_2) + self.lblLastChangedVal.setGeometry(QtCore.QRect(0, 260, 131, 31)) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(10) + self.lblLastChangedVal.setFont(font) + self.lblLastChangedVal.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) + self.lblLastChangedVal.setObjectName("lblLastChangedVal") + self.lblCreatedVal = QtWidgets.QLabel(self.widget_2) + self.lblCreatedVal.setGeometry(QtCore.QRect(0, 280, 131, 31)) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(10) + self.lblCreatedVal.setFont(font) + self.lblCreatedVal.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) + self.lblCreatedVal.setObjectName("lblCreatedVal") + self.tbUsrName = QtWidgets.QLineEdit(self.widget_2) + self.tbUsrName.setGeometry(QtCore.QRect(10, 5, 200, 24)) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(14) + self.tbUsrName.setFont(font) + self.tbUsrName.setObjectName("tbUsrName") + self.tbPasswd = QtWidgets.QLineEdit(self.widget_2) + self.tbPasswd.setGeometry(QtCore.QRect(10, 45, 200, 24)) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(14) + self.tbPasswd.setFont(font) + self.tbPasswd.setObjectName("tbPasswd") + self.tbWebsite = QtWidgets.QLineEdit(self.widget_2) + self.tbWebsite.setGeometry(QtCore.QRect(10, 85, 200, 24)) + font = QtGui.QFont() + font.setFamily("DejaVu Serif") + font.setPointSize(14) + self.tbWebsite.setFont(font) + self.tbWebsite.setObjectName("tbWebsite") + self.tbNotes = QtWidgets.QTextEdit(self.widget_2) + self.tbNotes.setGeometry(QtCore.QRect(10, 125, 200, 75)) + self.tbNotes.setObjectName("tbNotes") + self.tbTags = QtWidgets.QLineEdit(self.widget_2) + self.tbTags.setGeometry(QtCore.QRect(10, 210, 200, 24)) + self.tbTags.setObjectName("tbTags") + + self.retranslateUi(LoginTemplate) + QtCore.QMetaObject.connectSlotsByName(LoginTemplate) + + def retranslateUi(self, LoginTemplate): + _translate = QtCore.QCoreApplication.translate + LoginTemplate.setWindowTitle(_translate("LoginTemplate", "Form")) + self.lblLoginName.setText(_translate("LoginTemplate", "LoginName")) + self.lblUsrName.setText(_translate("LoginTemplate", "Username:")) + self.lblPasswd.setText(_translate("LoginTemplate", "Password:")) + self.lblWebsite.setText(_translate("LoginTemplate", "Website:")) + self.lblNotes.setText(_translate("LoginTemplate", "Notes:")) + self.lblTags.setText(_translate("LoginTemplate", "Tags:")) + self.lblLastChangedDesc.setText(_translate("LoginTemplate", "Last changed:")) + self.lblCreatedDesc.setText(_translate("LoginTemplate", "Created:")) + self.lblLastChangedVal.setText(_translate("LoginTemplate", "14.04.2020 13:43:08")) + self.lblCreatedVal.setText(_translate("LoginTemplate", "14.04.2020 13:43:08")) + + +if __name__ == "__main__": + import sys + app = QtWidgets.QApplication(sys.argv) + LoginTemplate = QtWidgets.QWidget() + ui = Ui_LoginTemplate() + ui.setupUi(LoginTemplate) + LoginTemplate.show() + sys.exit(app.exec_()) diff --git a/WidgetInWidget/testing.py b/WidgetInWidget/testing.py new file mode 100755 index 0000000..28f236a --- /dev/null +++ b/WidgetInWidget/testing.py @@ -0,0 +1,36 @@ +from PyQt5 import QtCore, QtGui, QtWidgets +from LoginTemplate2 import Ui_LoginTemplate +from Mainview2 import Ui_PyOnePass +import Mainview2 + +import sys +class myUi(Mainview2.Ui_PyOnePass): + + def addTemplateWidget(self): + # *https://stackoverflow.com/questions/36654225/pyqt5-add-custom-qwidget-to-qlayout + # https://stackoverflow.com/questions/8651742/dynamically-adding-and-removing-widgets-in-pyqt + # *https://stackoverflow.com/questions/46637836/pyqt5-updated-widget-is-not-added-to-the-layout-though-the-widget-is-updated + + LoginTemplate = QtWidgets.QWidget() + self.ui = Ui_LoginTemplate() + self.ui.setupUi(LoginTemplate) + + # add Template-Widget + self.horizontalLayout.addWidget(LoginTemplate) + + # filling widgets: + self.ui.tbUsrName.setText('Username') + + + + +app = QtWidgets.QApplication(sys.argv) +popMainWin = QtWidgets.QMainWindow() +ui = myUi() + +ui.eerrtt() + +ui.setupUi(ui) +ui.addTemplateWidget() +ui.show() +sys.exit(app.exec_())