Update CMakeLists.txt - play with openssl
[novacoin.git] / src / qt / guiutil.h
index fd72668..97838bb 100644 (file)
@@ -4,6 +4,11 @@
 #include <QString>
 #include <QObject>
 #include <QMessageBox>
+#include <QWidget>
+#include <QEvent>
+#include <QTextEdit>
+
+#include <boost/filesystem.hpp>
 
 QT_BEGIN_NAMESPACE
 class QFont;
@@ -19,6 +24,11 @@ class SendCoinsRecipient;
  */
 namespace GUIUtil
 {
+     /* Convert QString to OS specific boost path through UTF-8 */
+    boost::filesystem::path qstringToBoostPath(const QString &path);
+     /* Convert OS specific boost path to QString through UTF-8 */
+    QString boostPathToQString(const boost::filesystem::path &path);
+
     // Create human-readable string from date
     QString dateTimeStr(const QDateTime &datetime);
     QString dateTimeStr(qint64 nTime);
@@ -114,6 +124,21 @@ namespace GUIUtil
         QString header;
         QString coreOptions;
         QString uiOptions;
+
+        virtual bool event(QEvent *e)
+        {
+            bool res = QMessageBox::event(e);
+            if (e->type() == QEvent::MouseMove || e->type() == QEvent::MouseButtonPress)
+            {
+                setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
+                if (QWidget *textEdit = findChild<QTextEdit *>())
+                {
+                    textEdit->setMaximumHeight(QWIDGETSIZE_MAX);
+                }
+            }
+
+            return res;
+        }
     };
     /* Convert seconds into a QString with days, hours, mins, secs */
     QString formatDurationStr(int secs);