OpenMS
QApplicationTOPP Class Reference

Extension to the QApplication for running TOPPs GUI tools. More...

#include <OpenMS/VISUAL/APPLICATIONS/MISC/QApplicationTOPP.h>

Inheritance diagram for QApplicationTOPP:
[legend]
Collaboration diagram for QApplicationTOPP:
[legend]

Signals

void fileOpen (QString file)
 

Public Member Functions

 QApplicationTOPP (int &argc, char **argv)
 Constructor (no NOT remove the "&" from argc, since Qt will segfault on some platforms otherwise!) More...
 
 ~QApplicationTOPP () override
 Destructor. More...
 
bool notify (QObject *rec, QEvent *ev) override
 : Catch exceptions in Qt GUI applications, preventing ungraceful exit More...
 
bool event (QEvent *) override
 

Static Public Member Functions

static void showAboutDialog (QWidget *parent, const QString &toolname)
 Show the About-Dialog with License and Citation for all GUI tools. More...
 

Detailed Description

Extension to the QApplication for running TOPPs GUI tools.

Basically re-implements notify of QApplication to prevent ungraceful exit.

Constructor & Destructor Documentation

◆ QApplicationTOPP()

QApplicationTOPP ( int &  argc,
char **  argv 
)

Constructor (no NOT remove the "&" from argc, since Qt will segfault on some platforms otherwise!)

References OpenMS::Math::contains(), File::find(), OpenMS::make_gui_progress_logger, and String::toQString().

◆ ~QApplicationTOPP()

~QApplicationTOPP ( )
overridedefault

Destructor.

Member Function Documentation

◆ event()

bool event ( QEvent *  event)
override

Reimplemented from QApplication, to handle QEvent::FileOpen to enable handling of odoc event on MacOSX

References QApplicationTOPP::fileOpen().

◆ fileOpen

void fileOpen ( QString  file)
signal

Referenced by QApplicationTOPP::event(), and main().

◆ notify()

bool notify ( QObject rec,
QEvent *  ev 
)
override

: Catch exceptions in Qt GUI applications, preventing ungraceful exit

Re-implementing QApplication::notify() to catch exception thrown in event handlers (which is most likely OpenMS code).

References BaseException::getName(), OPENMS_LOG_ERROR, and String::toQString().

◆ showAboutDialog()

void showAboutDialog ( QWidget parent,
const QString &  toolname 
)
static

Show the About-Dialog with License and Citation for all GUI tools.

Parameters
parentParent widget (usually 'this')
toolnamename of the tool (used as heading)

References VersionInfo::getRevision(), VersionInfo::getVersion(), and OpenMS::StringUtils::toQString().

Referenced by FLASHDeconvWizardBase::showAboutDialog(), SwathWizardBase::showAboutDialog(), and TOPPASBase::showAboutDialog().