Пример #1
0
    def __init__(self):
        # Model
        self.graphModel = Graph()

        # Views
        self.graphicsGraphView = GraphicsGraphView()
        self.textGraphView = TextGraphView()

        # Controllers
        self.textGraphController = TextGraphController(
            self.graphModel,
            self.textGraphView)
        self. graphicsGraphController = GraphicsGraphController(
            self.graphModel,
            self.graphicsGraphView,
            self.textGraphController)

        # Main application
        self.mainWindow = MainWindow()
        self.mainWindowController = MainWindowController(
            self.graphModel,
            self.mainWindow,
            self.textGraphController)

        # Adding views to main window
        self.mainWindow.addWidgetToSplitter(self.graphicsGraphView)
        self.mainWindow.addWidgetToSplitter(self.textGraphView)
Пример #2
0
    def __init__(self):
        # Model
        self.graphModel = Graph()

        # Views
        self.graphicsGraphView = GraphicsGraphView()
        self.textGraphView = TextGraphView()

        # Controllers
        self.textGraphController = TextGraphController(self.graphModel,
                                                       self.textGraphView)
        self.graphicsGraphController = GraphicsGraphController(
            self.graphModel, self.graphicsGraphView, self.textGraphController)

        # Main application
        self.mainWindow = MainWindow()
        self.mainWindowController = MainWindowController(
            self.graphModel, self.mainWindow, self.textGraphController)

        # Adding views to main window
        self.mainWindow.addWidgetToSplitter(self.graphicsGraphView)
        self.mainWindow.addWidgetToSplitter(self.textGraphView)
Пример #3
0
class Doted(object):
    '''The Doted class provides a main application.


    Attribute(s):
    model (Graph): Model representing the graph
    graphicsGraphView (GraphicsGraphView): Graphic view
    textGraphView (TextGraphView): Textual view
    graphicsGraphController (GraphicsGraphController): Graphic controller
    textGraphController (TextGraphController): Textual controller
    mainWindow (MainWindow): Application view
    mainWindowController (MainWindowController): Application controller
    '''

    def __init__(self):
        # Model
        self.graphModel = Graph()

        # Views
        self.graphicsGraphView = GraphicsGraphView()
        self.textGraphView = TextGraphView()

        # Controllers
        self.textGraphController = TextGraphController(
            self.graphModel,
            self.textGraphView)
        self. graphicsGraphController = GraphicsGraphController(
            self.graphModel,
            self.graphicsGraphView,
            self.textGraphController)

        # Main application
        self.mainWindow = MainWindow()
        self.mainWindowController = MainWindowController(
            self.graphModel,
            self.mainWindow,
            self.textGraphController)

        # Adding views to main window
        self.mainWindow.addWidgetToSplitter(self.graphicsGraphView)
        self.mainWindow.addWidgetToSplitter(self.textGraphView)

    def run(self):
        '''Run the application.'''
        self.mainWindow.show()
Пример #4
0
class Doted(object):
    '''The Doted class provides a main application.


    Attribute(s):
    model (Graph): Model representing the graph
    graphicsGraphView (GraphicsGraphView): Graphic view
    textGraphView (TextGraphView): Textual view
    graphicsGraphController (GraphicsGraphController): Graphic controller
    textGraphController (TextGraphController): Textual controller
    mainWindow (MainWindow): Application view
    mainWindowController (MainWindowController): Application controller
    '''
    def __init__(self):
        # Model
        self.graphModel = Graph()

        # Views
        self.graphicsGraphView = GraphicsGraphView()
        self.textGraphView = TextGraphView()

        # Controllers
        self.textGraphController = TextGraphController(self.graphModel,
                                                       self.textGraphView)
        self.graphicsGraphController = GraphicsGraphController(
            self.graphModel, self.graphicsGraphView, self.textGraphController)

        # Main application
        self.mainWindow = MainWindow()
        self.mainWindowController = MainWindowController(
            self.graphModel, self.mainWindow, self.textGraphController)

        # Adding views to main window
        self.mainWindow.addWidgetToSplitter(self.graphicsGraphView)
        self.mainWindow.addWidgetToSplitter(self.textGraphView)

    def run(self):
        '''Run the application.'''
        self.mainWindow.show()