LibEngsas
Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
EUpdateNoticeDialog Class Reference

Used to inform about new available versions. More...

#include <eupdatenoticedialog.h>

+ Inheritance diagram for EUpdateNoticeDialog:
+ Collaboration diagram for EUpdateNoticeDialog:

Public Member Functions

 EUpdateNoticeDialog (QIcon logo, QUrl url, QWidget *parent=0, Qt::WindowFlags flags=0)
 Uses QApplication::applicationName() as application name. More...
 
 EUpdateNoticeDialog (QString appName, QIcon logo, QUrl url, QWidget *parent=0, Qt::WindowFlags flags=0)
 Uses appName as application name. More...
 
void check (QString currentVersion=QString())
 Starts the check. More...
 
- Public Member Functions inherited from EDialog
 EDialog (QString objName, QWidget *parent=0, Qt::WindowFlags flags=0)
 Creates a EDialog instance with objectName() set to objName. More...
 
 EDialog (QWidget *parent=0, Qt::WindowFlags flags=0)
 
virtual ~EDialog ()
 
void setWindowTitle (const QString &title)
 Sets the window title and prepends the QApplication::applicationName(). More...
 
void setObjectName (const QString &name)
 Set's the objectname and calls loadGeometry() afterwards. More...
 
void loadGeometry ()
 Can be called to restore geometry of this object. More...
 
void connectByPass (QObject *object)
 Connects all standard signals. More...
 

Private Slots

void openLink (QString url)
 
void dontShowAgain (int state)
 
void replyFinished ()
 
void compare (QString version)
 Compares the currentVersion against the actualVersion. More...
 

Private Member Functions

void init (QIcon logo, QUrl url)
 

Private Attributes

QString appName
 
QString currentVersion
 
QUrl url
 
Ui::EUpdateNoticeDialog * ui
 

Additional Inherited Members

- Public Slots inherited from EDialog
virtual void reloadSettings ()
 Used to reload settings the settings. More...
 
- Signals inherited from EDialog
void error (const QString &message)
 
void warning (const QString &message)
 
void information (const QString &message)
 
void reloadEnableActions ()
 Request reloading of enabled actions in EMainWindow. More...
 
void addMenu (QMenu *newMenu, const QString &parent, QString before=QString())
 
void addAction (QAction *newAction, const QString &parent, QString before=QString())
 
void addToolBar (QToolBar *newToolBar, Qt::ToolBarArea area=Qt::TopToolBarArea)
 
void addNewDockWidget (QDockWidget *widget, const Qt::DockWidgetArea &area)
 
void setCentralWidget (QWidget *centralWidget)
 
void showSettings ()
 
void showHelp (const QString &page)
 
void showStatusWidget (QWidget *widget)
 
void reloadSettingsRequest ()
 Indicates, that a reload of the settings is needed. More...
 
void doReloadSettings ()
 Emitted to bring the reload request back to the farest child. More...
 
- Protected Slots inherited from EDialog
virtual void errorByPass (const QString &message)
 
virtual void warningByPass (const QString &message)
 
virtual void informationByPass (const QString &message)
 
virtual void reloadEnableActionsByPass ()
 
virtual void addMenuByPass (QMenu *newMenu, const QString &parent, QString before=QString())
 
virtual void addActionByPass (QAction *newAction, const QString &parent, QString before=QString())
 
virtual void addToolBarByPass (QToolBar *newToolBar, Qt::ToolBarArea area=Qt::TopToolBarArea)
 
virtual void addNewDockWidgetByPass (QDockWidget *widget, const Qt::DockWidgetArea &area)
 
virtual void setCentralWidgetByPass (QWidget *centralWidget)
 
virtual void showSettingsByPass ()
 
virtual void showHelpByPass (const QString &page)
 
virtual void showStatusWidgetByPass (QWidget *widget)
 
virtual void reloadSettingsRequestByPass ()
 
void setHelp (QString page, EPushButton *helpButton=0)
 Call this function to setup helpButton as a help button. More...
 
- Protected Member Functions inherited from EDialog
QString helpPage ()
 
void closeEvent (QCloseEvent *event)
 

Detailed Description

Used to inform about new available versions.

It checks http://ftp.engsas.de/versions.xml for new available versions of the current application. The name of the application can be given or otherwise QApplication::applicationName() is used. Also the current Version can be set via check() or if empty, QApplication::applicationVersion() is used.

To allow the user to confgire it's behaviour, integrate the EUpdateNoticeSettings widget into your settings dialog. This widget is also contained in the designer plugins.

To use this class with QApplication use the code snippet:

// make sure the update dialog is only shown,
// if no package management software is invoved
#if not defined(BUILD_PACKAGE) or defined(Q_OS_WIN32)
// Url will be expanded to http://en|www.engsas.de/example
// and the object deletes itself after finishing the check
EUpdateNoticeDialog *dialog = new EUpdateNoticeDialog(QUrl("example", this);
connectByPass(dialog);
dialog->check();
#endif
See also
EUpdateNoticeDialog(QWidget*, Qt::WindowFlags)
EUpdateNoticeDialog(QString, QWidget*, Qt::WindowFlags)
check()
EUpdateNoticeSettings

Constructor & Destructor Documentation

EUpdateNoticeDialog::EUpdateNoticeDialog ( QIcon  logo,
QUrl  url,
QWidget *  parent = 0,
Qt::WindowFlags  flags = 0 
)

Uses QApplication::applicationName() as application name.

+ Here is the call graph for this function:

EUpdateNoticeDialog::EUpdateNoticeDialog ( QString  appName,
QIcon  logo,
QUrl  url,
QWidget *  parent = 0,
Qt::WindowFlags  flags = 0 
)

Uses appName as application name.

+ Here is the call graph for this function:

Member Function Documentation

void EUpdateNoticeDialog::check ( QString  currentVersion = QString())

Starts the check.

If currentVersion is empty, QApplication::applicationVersion() is used as current version.

+ Here is the call graph for this function:

void EUpdateNoticeDialog::compare ( QString  version)
privateslot

Compares the currentVersion against the actualVersion.

Internally it uses the Version class, but to avoid dependency in this header file, Version is not used here!

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EUpdateNoticeDialog::dontShowAgain ( int  state)
privateslot

+ Here is the caller graph for this function:

void EUpdateNoticeDialog::init ( QIcon  logo,
QUrl  url 
)
private

+ Here is the call graph for this function:

void EUpdateNoticeDialog::openLink ( QString  url)
privateslot

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EUpdateNoticeDialog::replyFinished ( )
privateslot

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

QString EUpdateNoticeDialog::appName
private
QString EUpdateNoticeDialog::currentVersion
private
Ui::EUpdateNoticeDialog* EUpdateNoticeDialog::ui
private
QUrl EUpdateNoticeDialog::url
private

The documentation for this class was generated from the following files: