예제 #1
0
    def OKButtonClicked(self):
        reply = QMessageBox.question(self, '확인', '수정한 내용을 적용합니다.', QMessageBox.Yes | QMessageBox.No, QMessageBox.No)

        if (reply == QMessageBox.Yes):
            lists.update(self.hidden.text(), self.Nameedit.text(), self.LinkEdit.text(), self.idedit.text(), self.passwordedit.text(), self.tagedit.text(), self.memoedit.text())
            print(lists.viewall())
            print('yes')
            self.accept()
        else:
            print('no')
예제 #2
0
    def __init__(self):
        super(base_2, self).__init__()
        self.setupUi(self)
        self.SaveButton.clicked.connect(self.SaveButtonClicked)
        print("asdf")
        lists.create()
        namelist = []
        k = []
        check1 = lists.viewall()

        for i in check1:
            a = []
            for j in i:
                if (isinstance(j, str)):
                    a.append(j)
            k.append(a)

        for i in k:
            namelist.append(i[0])
예제 #3
0
    def __init__(self, tag):
        super(base3, self).__init__()
        self.setupUi(self)
        
        check1 = lists.viewall()
        accountlist = []
        check2 = []
        for i in check1:
            a = []
            for j in i:
                if(isinstance(j, str)):
                    a.append(j)
            check2.append(a)

        for j in check2:
            if(j[4] == tag):
                accountlist.append(j)

        self.account = QWidget()
        self.accountLayout = QVBoxLayout()
        for i in reversed(range(self.accountLayout.count())):
            self.accountLayout.itemAt(i).widget().setParent(None)
        self.widgets = []
        for info in accountlist:
            item = FavoritesWidget(info[0], info[1], info[2], info[3], info[4], info[5])
            self.accountLayout.addWidget(item)
            self.widgets.append(item)
        self.account.setLayout(self.accountLayout)
        
        self.scroll = QScrollArea()
        self.scroll.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
        self.scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        self.scroll.setWidgetResizable(True)
        self.scroll.setWidget(self.account)
        
        container = self.tagList
        containerLayout = QVBoxLayout()
        containerLayout.addWidget(self.scroll)

        container.setLayout(containerLayout)
예제 #4
0
    def __init__(self):
        print("__init__")
        lists.create()
        favorites.create()

        widget_list = []
        favorites_list = []
        self.lock = passs.update("false", "true")
        check1 = lists.viewall()
        check2 = favorites.viewall()
        password = (passs.viewall())[0][1]
        for i in check1:
            a = []
            for j in i:
                if (isinstance(j, str)):
                    a.append(j)
            widget_list.append(a)

        for i in check2:
            a = []
            for j in i:
                if (isinstance(j, str)):
                    a.append(j)
            favorites_list.append(a)

        for i in widget_list:
            if (i[4] not in tag_list):
                tag_list.append(i[4])

        super(base_1, self).__init__()
        self.setupUi(self)
        self.account = QWidget()
        self.accountLayout = QVBoxLayout()
        for i in reversed(range(self.accountLayout.count())):
            self.accountLayout.itemAt(i).widget().setParent(None)
        self.widgets = []
        for info in widget_list:
            item = AccountWidget(info[0], info[1], info[2], info[3], info[4],
                                 info[5])
            self.accountLayout.addWidget(item)
            self.widgets.append(item)
        self.account.setLayout(self.accountLayout)

        self.scroll = QScrollArea()
        self.scroll.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
        self.scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        self.scroll.setWidgetResizable(True)
        self.scroll.setWidget(self.account)

        self.scroll2 = QScrollArea()
        self.scroll2.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
        self.scroll2.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        self.scroll2.setWidgetResizable(True)

        self.scroll3 = QScrollArea()
        self.scroll3.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
        self.scroll3.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        self.scroll3.setWidgetResizable(True)

        self.searchbar = self.SearchLine
        self.searchbar.textChanged.connect(self.update)

        container = self.SearchReturn
        containerLayout = QVBoxLayout()
        containerLayout.addWidget(self.scroll)

        container.setLayout(containerLayout)
        site_names = []
        for i in widget_list:
            site_names.append(i[0])

        self.completer = QCompleter(site_names)
        self.completer.setCaseSensitivity(Qt.CaseInsensitive)
        self.searchbar.setCompleter(self.completer)

        self.AddButton.clicked.connect(self.AddButtonClicked)
        self.favorites = QWidget()
        self.favoritesLayout = QVBoxLayout()
        for i in reversed(range(self.favoritesLayout.count())):
            self.favoritesLayout.itemAt(i).widget().setParent(None)
        self.favorites_widget = []
        for info in favorites_list:
            item = FavoritesWidget(info[0], info[1], info[2], info[3], info[4],
                                   info[5])
            self.favoritesLayout.addWidget(item)
            self.favorites_widget.append(item)

        self.favorites.setLayout(self.favoritesLayout)
        self.scroll2.setWidget(self.favorites)
        container2 = self.Favorites
        container2Layout = QVBoxLayout()
        container2Layout.addWidget(self.scroll2)

        container2.setLayout(container2Layout)

        self.HelpButton.clicked.connect(self.HelpButtonClicked)

        self.tray_icon = QSystemTrayIcon(self)
        self.tray_icon.setIcon(self.style().standardIcon(
            QStyle.SP_ComputerIcon))
        self.tray_icon.activated.connect(self.showing)
        '''
            Define and add steps to work with the system tray icon
            show - show window
            hide - hide window
            exit - exit from application
        '''
        show_action = QAction("창 보이기", self)
        quit_action = QAction("프로그램 종료", self)
        hide_action = QAction("창 숨기기", self)
        show_action.triggered.connect(self.show)
        hide_action.triggered.connect(self.hide)
        quit_action.triggered.connect(self.quiting)
        tray_menu = QMenu()
        tray_menu.addAction(show_action)
        tray_menu.addAction(hide_action)
        tray_menu.addAction(quit_action)
        self.tray_icon.setContextMenu(tray_menu)
        self.tray_icon.show()
        self.resetButton.clicked.connect(self.reset)

        self.tags = QWidget()
        self.tagsLayout = QVBoxLayout()
        for i in reversed(range(self.tagsLayout.count())):
            self.tagsLayout.itemAt(i).widget().setParent(None)
        self.tags_widget = []
        for info in tag_list:
            item = Tag(info)
            self.tagsLayout.addWidget(item)
            self.tags_widget.append(item)
        self.tags.setLayout(self.tagsLayout)
        self.scroll3.setWidget(self.tags)
        container3 = self.TagWidget
        container3Layout = QVBoxLayout()
        container3Layout.addWidget(self.scroll3)

        container3.setLayout(container3Layout)

        self.lockButton.clicked.connect(self.LockButtonClicked)
        self.changePassword.clicked.connect(self.ChangeButtonClicked)
        self.setFixedSize(1000, 650)
예제 #5
0
    def reset(self):
        self.clearLayout(self.accountLayout)
        self.clearLayout(self.favoritesLayout)
        self.clearLayout(self.tagsLayout)

        print("reset")
        lists.create()
        favorites.create()

        widget_list = []
        favorites_list = []
        tag_list = []

        check1 = lists.viewall()
        check2 = favorites.viewall()

        for i in check1:
            a = []
            for j in i:
                if (isinstance(j, str)):
                    a.append(j)
            widget_list.append(a)

        for i in check2:
            a = []
            for j in i:
                if (isinstance(j, str)):
                    a.append(j)
            favorites_list.append(a)

        for i in widget_list:
            if (i[4] not in tag_list):
                tag_list.append(i[4])

        self.widgets = []
        for info in widget_list:
            item = AccountWidget(info[0], info[1], info[2], info[3], info[4],
                                 info[5])
            self.accountLayout.addWidget(item)
            self.widgets.append(item)

        self.scroll = QScrollArea()
        self.scroll.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
        self.scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        self.scroll.setWidgetResizable(True)

        self.scroll2 = QScrollArea()
        self.scroll2.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
        self.scroll2.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        self.scroll2.setWidgetResizable(True)

        self.scroll3 = QScrollArea()
        self.scroll3.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
        self.scroll3.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
        self.scroll3.setWidgetResizable(True)

        self.searchbar = self.SearchLine
        self.searchbar.textChanged.connect(self.update)

        site_names = []
        for i in widget_list:
            site_names.append(i[0])
        self.completer = QCompleter(site_names)
        self.completer.setCaseSensitivity(Qt.CaseInsensitive)
        self.searchbar.setCompleter(self.completer)

        self.favorites_widget = []
        for info in favorites_list:
            item = FavoritesWidget(info[0], info[1], info[2], info[3], info[4],
                                   info[5])
            self.favoritesLayout.addWidget(item)
            self.favorites_widget.append(item)

        for info in tag_list:
            item = Tag(info)
            self.tagsLayout.addWidget(item)
            self.tags_widget.append(item)