32 #include <QApplication> 
   33 #include <QSplashScreen> 
   34 #include <QtCore/QMutex> 
   35 #include <QtCore/QSettings> 
   36 #include <boost/function.hpp> 
   37 #include <boost/program_options.hpp> 
   39 #include "WIconManager.h" 
   40 #include "abstractUI/WUIQtWidgetFactory.h" 
   41 #include "core/common/WDefines.h" 
   42 #include "core/graphicsEngine/WGraphicsEngine.h" 
   43 #include "core/graphicsEngine/WROI.h" 
   44 #include "core/kernel/WModule.h" 
   45 #include "core/ui/WUI.h" 
   46 #include "events/WDeferredCallEvent.h" 
   65     WQtGui( 
const boost::program_options::variables_map& options, 
int argc, 
char** argv );
 
  142     virtual void slotConnectionClosed( std::shared_ptr<WModuleConnector> in, std::shared_ptr<WModuleConnector> out );
 
  176     const boost::program_options::variables_map& 
getOptionMap() 
const;
 
  208     template< 
typename Result >
 
  255     std::shared_ptr< WGraphicsEngine > 
m_ge;
 
Implements a WCondition, but can be fired only ONCE.
 
std::shared_ptr< WCondition > SPtr
Shared pointer type for WCondition.
 
Derived WDeferredCallEvent allowing result values in calls.
 
OpenWalnut kernel, managing modules and interaction between UI, GE and DataHandler.
 
Represents a simple log message with some attributes.
 
This class contains the main window and the layout of the widgets within the window.
 
The QT Based GUI implementation.
 
virtual void slotAddDatasetOrModuleToTree(std::shared_ptr< WModule > module)
Slot gets called whenever a new module is added.
 
virtual std::shared_ptr< WModule > getSelectedModule()
returns a pointer to the selected module in the control panel
 
virtual int run()
Runs the GUI.
 
const boost::program_options::variables_map & getOptionMap() const
Returns the option map for the current instance of this GUI.
 
static QSettings & getSettings()
Returns the settings object.
 
static WMainWindow * getMainWindow()
Returns the current main window instance or NULL if not existent.
 
QSplashScreen * m_splash
The splash screen.
 
virtual ~WQtGui()
Default destructor.
 
virtual void slotRemoveDatasetOrModuleInTree(std::shared_ptr< WModule > module)
Slot gets called whenever a module has been removed from the root container.
 
virtual void slotRemoveRoiFromTree(osg::ref_ptr< WROI > roi)
Slot gets called whenever a ROI is removed.
 
virtual void slotActivateDatasetOrModuleInTree(std::shared_ptr< WModule > module)
Slot gets called whenever a module switches its state to "ready".
 
static WMainWindow * m_mainWindow
Main window containing all needed widgets.
 
bool m_loadDeferredOnce
If true, the next trigger of deferredLoad will actually do loading.
 
static WIconManager * getIconManager()
Get the icon manager of this gui instance.
 
static void execInGUIThreadAsync(boost::function< void(void) > functor, WCondition::SPtr notify=WCondition::SPtr())
Call a given function from within the GUI thread.
 
WQtGui(const boost::program_options::variables_map &options, int argc, char **argv)
Constructor.
 
boost::signals2::connection m_loggerConnection
The connection to the AddLog signal of the logger.
 
boost::signals2::signal< void(std::vector< std::string >) > * getLoadButtonSignal()
Getter functions for the signals provided by the gui.
 
virtual void slotConnectionEstablished(std::shared_ptr< WModuleConnector > in, std::shared_ptr< WModuleConnector > out)
Slot gets called whenever a connector pair got connected.
 
std::shared_ptr< WGraphicsEngine > m_ge
Graphics Engine instance.
 
static QSettings * m_settings
Object storing certain persistent application settings.
 
std::shared_ptr< WKernel > m_kernel
Kernel instance.
 
virtual void slotUpdateTextureSorter()
Slot gets called whenever we need to update the texture sorter.
 
static Result execInGUIThread(boost::function< Result(void) > functor, WCondition::SPtr notify=WCondition::SPtr())
Call a given function from within the GUI thread.
 
virtual void slotConnectionClosed(std::shared_ptr< WModuleConnector > in, std::shared_ptr< WModuleConnector > out)
Slot gets called whenever a connector pair got disconnected.
 
void deferredLoad()
This is called by the GE when the osg was set-up correctly.
 
virtual WUIWidgetFactory::SPtr getWidgetFactory() const
Returns the widget factory of the UI.
 
QMutex m_deferredLoadMutex
This mutex protects the deferredLoad method from being called in parallel or twice.
 
const boost::program_options::variables_map & m_optionsMap
Map storing the program options.
 
WUIQtWidgetFactory::SPtr m_widgetFactory
The widget factory which handles WUI widget creation.
 
void slotAddLog(const WLogEntry &entry)
New log item added.
 
static void execInGUIThread(boost::function< void(void) > functor, WCondition::SPtr notify=WCondition::SPtr())
Call a given function from within the GUI thread.
 
void moduleError(std::shared_ptr< WModule > module, const WException &exception)
Called whenever a module crashes.
 
virtual void slotAddRoiToTree(osg::ref_ptr< WROI > roi)
Slot gets called whenever a new ROI is added.
 
This class prescribes the interface to the UI.