COPASI API  4.16.103
CWindowInterface.cpp
Go to the documentation of this file.
1 // Copyright (C) 2012 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 #include <UI/CWindowInterface.h>
7 #include <UI/copasiui3window.h>
8 
9 CWindowInterface::CWindowInterface(QWidget *parent /*= NULL*/, Qt::WindowFlags flags /*= NULL*/)
10  : QMainWindow(parent, flags)
11 {
12 }
13 
15 {
16 }
17 
19 {
20  if (window == NULL)
22 
23  if (window != NULL)
24  window->addWindow(this);
25 }
26 
27 void CWindowInterface::saveToFile(const QString& fileName) const
28 {
29  // by default nothing will be saved, overwrite to implement saving to file
30 }
31 
33 {
34  if (window == NULL)
36 
37  if (window != NULL)
38  window->removeWindow(this);
39 }
CWindowInterface(QWidget *parent=NULL, Qt::WindowFlags flags=NULL)
void removeFromMainWindow(CopasiUI3Window *window=NULL)
virtual void saveToFile(const QString &fileName) const
static CopasiUI3Window * getMainWindow()
void addWindow(QMainWindow *pWindow)
void addToMainWindow(CopasiUI3Window *window=NULL)
virtual ~CWindowInterface()
void removeWindow(QMainWindow *pWindow)