add cfg-editor

Change-Id: I68b8ba9311ec0487d7a2676095a7170a2447b3d0
Reviewed-on: https://forge.frm2.tum.de/review/20206
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
Seger Sandra
2019-03-19 10:39:41 +01:00
committed by Enrico Faulhaber
parent 0bf43d67ba
commit e1f017d678
35 changed files with 14621 additions and 7 deletions

46
bin/cfg-editor Executable file
View File

@ -0,0 +1,46 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# *****************************************************************************
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This program 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
# this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Module authors:
# Sandra Seger <sandra.seger@frm2.tum.de>
#
# *****************************************************************************
import sys
import argparse
from os import path
# Add import path for inplace usage
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
from secop.gui.qt import QApplication
from secop.gui.cfg_editor.mainwindow import MainWindow
def main(argv=None):
parser = argparse.ArgumentParser()
parser.add_argument('-f', '--file', help='Configuration file to open.')
args = parser.parse_args()
app = QApplication(argv)
window = MainWindow(args.file)
window.show()
return app.exec_()
if __name__ == '__main__':
sys.exit(main(sys.argv))