示例#1
0
    def init_edit_widget(self):
        """Builds the loop controls."""

        qtitem.init_edit_widget(self, stretch=False)
        self.loop_widget = loop_widget(self.experiment.main_window)
        self.qdm = QDataMatrix(self.dm)
        self.qdm.changed.connect(self._apply_table)
        self.edit_vbox.addWidget(self.loop_widget)
        self.edit_vbox.addWidget(self.qdm)
        self.set_focus_widget(self.qdm)
        self.auto_add_widget(self.loop_widget.ui.spinbox_repeat, u'repeat')
        self.auto_add_widget(self.loop_widget.ui.combobox_order, u'order')
        self.auto_add_widget(self.loop_widget.ui.combobox_source,
                             u'source',
                             apply_func=self._apply_source)
        self.auto_add_widget(self.loop_widget.ui.edit_source_file,
                             u'source_file')
        self.auto_add_widget(self.loop_widget.ui.edit_break_if, u'break_if')
        self.auto_add_widget(self.loop_widget.ui.checkbox_break_if_on_first,
                             u'break_if_on_first')
        self.auto_add_widget(self.loop_widget.ui.checkbox_continuous,
                             u'continuous')
        self.loop_widget.ui.combobox_item.activated.connect(self._apply_item)
        self.loop_widget.ui.button_preview.clicked.connect(self._show_preview)
        self.loop_widget.ui.button_wizard.clicked.connect(self._show_wizard)
示例#2
0
    def __init__(self, subprocess_manager):

        QDockWidget.__init__(self, subprocess_manager.main_window)
        self._subprocess_manager = subprocess_manager
        self._qdm = QDataMatrix(self._subprocess_manager.dm(), read_only=True)
        self.setWidget(self._qdm)
        self.setWindowTitle(_('Subprocesses'))
        self.setObjectName('SubprocessManager')
        self.visibilityChanged.connect(self._refresh)
示例#3
0
    def __init__(self, main_window):
        """
		desc:
			Constructor.

		arguments:
			main_window:	The main window object.
		"""

        super(loop_wizard, self).__init__(main_window,
                                          ui=u'dialogs.loop_wizard_dialog')
        try:
            self._dm = pickle.loads(cfg.loop_wizard)
            assert (isinstance(self._dm, DataMatrix))
        except:
            self._dm = DataMatrix(length=0)
        self._qdm = QDataMatrix(self._dm)
        self.ui.hbox_container.addWidget(self._qdm)
        self.ui.table_example.hide()
示例#4
0
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

qdatamatatrix is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with qdatamatatrix.  If not, see <http://www.gnu.org/licenses/>.
"""

from datamatrix import DataMatrix
from qdatamatrix import QDataMatrix
import sys
from qtpy import QtWidgets
import qtpy

dm = DataMatrix(length=3)
dm.col1 = 1, 2, 3
dm.col2 = 'a', 'b', 'c'
print(dm)

app = QtWidgets.QApplication(sys.argv)
qdm = QDataMatrix(dm)
qdm.resize(600, 400)
# qdm.refresh()
qdm.show()
sys.exit(app.exec_())
def inspect_DataMatrix(value):

    qdm = QDataMatrix(value, read_only=True)
    qdm.setFont(QFont(cfg.pyqode_font_name, cfg.pyqode_font_size))
    return qdm
示例#6
0
def inspect_DataMatrix(value):

    return QDataMatrix(value, read_only=True)
示例#7
0
You should have received a copy of the GNU General Public License
along with qdatamatatrix.  If not, see <http://www.gnu.org/licenses/>.
"""

from datamatrix import DataMatrix
from qdatamatrix import QDataMatrix
import sys
from qtpy import QtWidgets
import qtpy


def show():
    print(qdm._dm)
    for n, c in qdm._dm.columns:
        print(n, repr(c._rowid))


dm = DataMatrix(length=4)
dm.sorted = False
dm.col1 = range(4)
dm.col3 = ['a', 'b', 'c', 'd']
dm.col2 = ['e', 'f', 'g', 'h']
print(dm)
app = QtWidgets.QApplication(sys.argv)
qdm = QDataMatrix(dm, read_only=False)
qdm.resize(600, 400)
qdm.changed.connect(show)
qdm.show()
sys.exit(app.exec_())