HEADERS += \
misc/debug.h \
- misc/misc.h
+ misc/misc.h \
+ misc/waitcursor.h
SOURCES += \
misc/code39.cpp \
misc/debug.cpp \
- misc/misc.cpp
+ misc/misc.cpp \
+ misc/waitcursor.cpp
INCLUDEPATH += ./misc
\ No newline at end of file
--- /dev/null
+//
+// C++ Implementation: waitcursor
+//
+// Description:
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2009
+//
+// Copyright: See README/COPYING files that come with this distribution
+//
+//
+
+#include "waitcursor.h"
+
+#include <QApplication>
+#include <QCursor>
+
+WaitCursor::WaitCursor()
+{
+ QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+}
+
+WaitCursor::~WaitCursor()
+{
+ QApplication::restoreOverrideCursor();
+}
--- /dev/null
+//
+// C++ Interface: waitcursor
+//
+// Description:
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2009
+//
+// Copyright: See README/COPYING files that come with this distribution
+//
+//
+
+#ifndef MAGICSMOKE_WAITCURSOR_H
+#define MAGICSMOKE_WAITCURSOR_H
+
+/**simple class to show a busy-cursor while an instance of it exists*/
+class WaitCursor
+{
+ public:
+ /**displays a wait cursor (Qt::WaitCursor)*/
+ WaitCursor();
+ /**restores the last normal cursor*/
+ ~WaitCursor();
+};
+
+
+#endif
--- /dev/null
+//
+// C++ Implementation: MTransaction
+//
+// Description:
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2010
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#include "MTransaction.h"
+#include "waitcursor.h"
+
+QByteArray MTransaction::executeQuery(QString hreq,QByteArray data)
+{
+ //show the user we are waiting
+ WaitCursor wc;
+ //call parent
+ return WTransaction::executeQuery(hreq,data);
+}
+
+MTransaction::MTransaction(QString iface):WTransaction(iface){}
+MTransaction::MTransaction(const WTransaction&t):WTransaction(t){}
+MTransaction::MTransaction(const MTransaction&t):WTransaction(t){}
--- /dev/null
+//
+// C++ Interface: MTransaction
+//
+// Description:
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2010
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#ifndef MSMOKE_MTRANSACTION_H
+#define MSMOKE_MTRANSACTION_H
+
+#include "WTransaction.h"
+
+class MTransaction:public WTransaction{
+ protected:
+ /**internal: construct the transaction*/
+ MTransaction(QString iface=QString());
+ /**internal: copy the transaction*/
+ MTransaction(const WTransaction&);
+ /**internal: copy the transaction*/
+ MTransaction(const MTransaction&);
+ /**internal: extend executeQuery to show a wait cursor*/
+ QByteArray executeQuery(QString,QByteArray);
+};
+
+#endif
wext/MOTicket.h \
wext/MOAddress.h \
wext/MOEvent.h \
- wext/MOCustomer.h
+ wext/MOCustomer.h \
+ wext/MTransaction.h
SOURCES += \
wext/MOCustomerInfo.cpp \
wext/MOTicket.cpp \
wext/MOAddress.cpp \
wext/MOEvent.cpp \
- wext/MOCustomer.cpp
\ No newline at end of file
+ wext/MOCustomer.cpp \
+ wext/MTransaction.cpp
</DataBase>
<!-- configure output -->
- <QtClientOutput sourceDir="src" subDir="wob" priInclude="wob.pri" classPrefix="M" clean="yes"/>
+ <QtClientOutput sourceDir="src" subDir="wob" priInclude="wob.pri" classPrefix="M" clean="yes" transactionBase="MTransaction"/>
<PHPServerOutput sourceDir="www" subDir="inc/wob" extension=".php" clean="yes" transactionBase="MSmokeTransaction">
</PHPServerOutput>
<HtmlOutput sourceDir="doc" subDir="wob" clean="yes"/>
<?
//load the linguist dummies, since we use them quite often
-include_once("inc/tr.php");
+include_once("inc/wbase/tr.php");
//load WOB data
include('./inc/wbase/autoload.php');
include('./inc/wob/autoload.php');
+++ /dev/null
-<?
-//
-// PHP Implementation: tr
-//
-// Description: dummy implementation for Qt's tr and transalate to make the PHP code
-// compatible with linguist
-//
-// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2008
-//
-// Copyright: See README/COPYING files that come with this distribution
-//
-//
-
-/** tr() assumes the context is set with a C++ class statement (won't find any here)
-or with a special comment, please include / * TRANSLATOR php:: * / in all files using it */
-function tr($str,$comment=""){return $str;}
-
-/** translate() also takes a context*/
-function translate($context,$str,$comment=""){return $str;}
-
-
-/**XML translation: & -> &, < -> < etc.pp.*/
-function xq($str){return htmlspecialchars($str,ENT_NOQUOTES,"UTF-8");}
-
-?>
\ No newline at end of file