rosconfigdialog.py
Go to the documentation of this file.
1 '''
2  Copyright (C) 1997-2017 JDERobot Developers Team
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU Library General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, see <http://www.gnu.org/licenses/>.
16 
17  Authors : Okan Asik (asik.okan@gmail.com)
18 
19  '''
20 import sys
21 from PyQt5.QtWidgets import QDialog, QVBoxLayout, \
22  QApplication, QTabWidget
23 from visualstates.configs.rosconfig import RosConfig
24 from visualstates.gui.dialogs.packagetab import PackageTab
25 from visualstates.gui.dialogs.topicstab import TopicsTab
26 from visualstates.gui.dialogs.workspacetab import WorkspaceTab
27 
28 
29 class RosConfigDialog(QDialog):
30 
31  def __init__(self, name, config):
32  super(QDialog, self).__init__()
33  self.setWindowTitle(name)
34  self.tabWidget = None
35 
36  self.config = config
37 
38  self.tabWidget = QTabWidget()
39  mainLayout = QVBoxLayout()
40  mainLayout.addWidget(self.tabWidget)
41  self.packageTab = PackageTab(self.config)
42  self.tabWidget.addTab(self.packageTab, 'Package')
43  self.topicsTab = TopicsTab(self.config)
44  self.tabWidget.addTab(self.topicsTab, 'Topics')
45  self.workspaceTab = WorkspaceTab()
46  self.tabWidget.addTab(self.workspaceTab, 'Workspaces')
47  self.setLayout(mainLayout)
48 
49 
50 if __name__ == '__main__':
51  app = QApplication(sys.argv)
52  config = RosConfig()
53 
54  dialog = RosConfigDialog('Config')
55  dialog.setConfig(config)
56 
57  dialog.exec_()


visualstates
Author(s):
autogenerated on Thu Apr 1 2021 02:42:20