не влезал текст
[novacoin.git] / src / qt / guiutil.h
index 1ff4aba..e640e59 100644 (file)
@@ -4,6 +4,9 @@
 #include <QString>
 #include <QObject>
 #include <QMessageBox>
+#include <QWidget>
+#include <QEvent>
+#include <QTextEdit>
 
 QT_BEGIN_NAMESPACE
 class QFont;
@@ -73,7 +76,8 @@ namespace GUIUtil
 
     // Open debug.log
     void openDebugLogfile();
-
+    // Open novacoin.conf
+    void openConfigfile();
     /** Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text
       representation if needed. This assures that Qt can word-wrap long tooltip messages.
       Tooltips longer than the provided size threshold (in characters) are wrapped.
@@ -113,6 +117,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);