#include <QString>
#include <QObject>
#include <QMessageBox>
+#include <QWidget>
+#include <QEvent>
+#include <QTextEdit>
+
+#include <boost/filesystem.hpp>
QT_BEGIN_NAMESPACE
class QFont;
*/
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);
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);