예제 #1
0
파일: pack.py 프로젝트: 4otaku/tools
    def __init__(self, app):
        Window_Abstract.__init__(self, app)

        layout = QtGui.QHBoxLayout()

        self._button = QtGui.QGroupBox(self.get_box())
        self._button.setLayout(layout)

        button = QtGui.QPushButton(self.utf("Выберите файл"), self._button)
        button.clicked.connect(self.select_file)

        layout.addWidget(button)

        self._label = QtGui.QLabel(self.utf("Файл не выбран"), self._button)
        self._label.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)

        layout.addWidget(self._label)

        self.get_layout().addWidget(self._button)

        self._title = QtGui.QLineEdit(QtCore.QString(self.utf('Введите заголовок')), self.get_box())
        self._title.connect(self._title, QtCore.SIGNAL("textChanged(QString)"), self.on_title_change)
        self.get_layout().addWidget(self._title)

        self._text = QtGui.QTextEdit(QtCore.QString(self.utf('Введите описание')), self.get_box())
        self._text.connect(self._text, QtCore.SIGNAL("textChanged()"), self.on_text_change)
        self.get_layout().addWidget(self._text)

        self._send = QtGui.QPushButton(self.utf("Отправить"), self.get_box())
        self._send.clicked.connect(self.send_file)
        self._send.setDisabled(True)
        self.get_layout().addWidget(self._send)
예제 #2
0
파일: text.py 프로젝트: 4otaku/tools
    def __init__(self, app):
        Window_Abstract.__init__(self, app)

        self._text = QtGui.QTextBrowser(self.get_box())
        self._text.setHtml(self.utf(self.text))
        self._text.setOpenExternalLinks(True)
        self._text.setFrameStyle(QtGui.QFrame.NoFrame)
        self._text.setWordWrapMode(QtGui.QTextOption.WrapAtWordBoundaryOrAnywhere)
        self._text.setReadOnly(True)

        self.get_layout().addWidget(self._text, 1)
예제 #3
0
파일: abstract.py 프로젝트: 4otaku/tools
    def __init__(self, app, data):
        Window_Abstract.__init__(self, app)

        for key, bar in self.bars.iteritems():
            self.init_bar(key, bar)

        label = QtGui.QLabel(self.utf('Результат:'), self.get_box())
        label.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
        self.get_layout().addWidget(label)

        self._result_box = QtGui.QTextBrowser(self.get_box())
        self._result_box.setOpenExternalLinks(True)
        self._result_box.setReadOnly(True)
        self.get_layout().addWidget(self._result_box)

        self.data = data

        self.process_request()
예제 #4
0
파일: art.py 프로젝트: 4otaku/tools
 def __init__(self, app):
     Window_Abstract.__init__(self, app)