QGpGuiTools/GuiMessage.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of QGpGuiTools.
00004 **
00005 **  This library is free software; you can redistribute it and/or
00006 **  modify it under the terms of the GNU Lesser General Public
00007 **  License as published by the Free Software Foundation; either
00008 **  version 2.1 of the License, or (at your option) any later version.
00009 **
00010 **  This file is distributed in the hope that it will be useful, but WITHOUT
00011 **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 **  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
00013 **  License for more details.
00014 **
00015 **  You should have received a copy of the GNU Lesser General Public
00016 **  License along with this library; if not, write to the Free Software
00017 **  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00018 **
00019 **  See http://www.geopsy.org for more information.
00020 **
00021 **  Created : 2005-10-04
00022 **  Authors :
00023 **    Marc Wathelet
00024 **    Marc Wathelet (LGIT, Grenoble, France)
00025 **
00026 ***************************************************************************/
00027 
00028 #ifndef GUIMESSAGE_H
00029 #define GUIMESSAGE_H
00030 
00031 #include <QGpCoreTools.h>
00032 #include "QGpGuiToolsDLLExport.h"
00033 
00034 namespace QGpGuiTools {
00035 
00036 class QGPGUITOOLS_EXPORT GuiMessage : public QObject, public Message
00037 {
00038   Q_OBJECT
00039 public:
00040   GuiMessage();
00041 
00042 private slots:
00043   void asyncMessageSlot(Message::Answer * a, QWaitCondition * reply, uint msgId,
00044                 int sev, QString caption, const QString & text,
00045                 QString answer0, QString answer1, QString answer2,
00046                 bool againOption);
00047   void asyncGetOpenFileNameSlot(QString * a, QWaitCondition * reply,
00048                                    const QString & caption, const QString & filter, const QString & directory);
00049   void asyncGetSaveFileNameSlot(QString * a, QWaitCondition * reply,
00050                                    const QString & caption, const QString & filter, const QString & selection);
00051   void asyncGetOpenFileNamesSlot(QStringList * a, QWaitCondition * reply,
00052                                     const QString & caption, const QString & filter, const QString & directory);
00053   void asyncGetExistingDirectorySlot(QString * a, QWaitCondition * reply,
00054                                         const QString & caption, const QString & dir);
00055 signals:
00056   void asyncMessageSignal(Message::Answer * a, QWaitCondition * reply, uint msgId,
00057                 int sev, QString caption, const QString & text,
00058                 QString answer0, QString answer1, QString answer2,
00059                 bool againOption);
00060   void asyncGetOpenFileNameSignal(QString * a, QWaitCondition * reply,
00061                                    const QString & caption, const QString & filter, const QString & directory);
00062   void asyncGetSaveFileNameSignal(QString * a, QWaitCondition * reply,
00063                                    const QString & caption, const QString & filter, const QString & selection);
00064   void asyncGetOpenFileNamesSignal(QStringList * a, QWaitCondition * reply,
00065                                     const QString & caption, const QString & filter, const QString & directory);
00066   void asyncGetExistingDirectorySignal(QString * a, QWaitCondition * reply,
00067                                         const QString & caption, const QString & dir);
00068 private:
00069   virtual QString getOpenFileNameInternal(const QString & caption,
00070                                    const QString & filter=QString::null,
00071                                    const QString & directory=QString::null);
00072 
00073   virtual QString getSaveFileNameInternal(const QString & caption,
00074                                    const QString & filter=QString::null,
00075                                    const QString & selection=QString::null);
00076 
00077   virtual QStringList getOpenFileNamesInternal(const QString & caption,
00078                                         const QString & filter=QString::null,
00079                                         const QString & directory=QString::null);
00080 
00081   virtual QString getExistingDirectoryInternal(const QString & caption,
00082                                         const QString & dir=QString::null);
00083   virtual Message::Answer message(uint msgId,
00084                                       Severity sev,
00085                                       QString caption,
00086                                       const QString & text,
00087                                       QString answer0,
00088                                       QString answer1,
00089                                       QString answer2,
00090                                       bool againOption);
00091 };
00092 
00093 } // namespace QGpGuiTools
00094 
00095 #endif // GUIMESSAGE_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines