Exemple #1
0
    def _createDock(self):
        d = QDockWidget("All Robots", self)
        w = QWidget()
        layout = QVBoxLayout()
        layout.setAlignment(Qt.AlignTop)

        self.cb = QComboBox()
        self.cb.addItem("#0 - ALL")
        self.cb.addItem(
            "-----------------")  # 1 is reserved for the Control Center LoRa
        self.cb.addItem("#2 - Eduro")
        self.cb.addItem("#3 - Kloubak K3")
        self.cb.addItem("#4 - MOBoS")
        self.cb.addItem("#5 - Kloubak K2")
        self.cb.addItem("#6 - Maria")
        self.cb.currentIndexChanged.connect(self.selectionchange)
        layout.addWidget(self.cb)

        layout.addWidget(
            QPushButton("&Pause Mission", clicked=self.on_pause_mission))
        layout.addWidget(
            QPushButton("&Continue Mission", clicked=self.on_continue_mission))
        layout.addWidget(
            QPushButton("&Stop Mission", clicked=self.on_stop_mission))
        layout.addWidget(QPushButton("&Go Home", clicked=self.on_go_home))
        w.setLayout(layout)
        d.setWidget(w)
        d.setDisabled(True)
        self.addDockWidget(Qt.RightDockWidgetArea, d)
Exemple #2
0
    def _createLineEdit(self):
        d = QDockWidget("Z-coord", self)
        w = QWidget()
        layout = QVBoxLayout()
        layout.setAlignment(Qt.AlignTop)

        self.edit = QLineEdit()
        self.edit.setText('-1.0')
        layout.addWidget(self.edit)

        w.setLayout(layout)
        d.setWidget(w)
        d.setDisabled(True)
        self.addDockWidget(Qt.RightDockWidgetArea, d)
        self.edit.textChanged.connect(self.on_z_coord_change)