exportdialog: allow restoring parameters

This commit is contained in:
itsmattkc
2022-08-10 11:49:21 -07:00
parent a2b400a1dc
commit 409f24be39
22 changed files with 331 additions and 222 deletions
+10
View File
@@ -145,4 +145,14 @@ QStringList QtUtils::WordWrapString(const QString &s, const QFontMetrics &fm, in
return list;
}
void QtUtils::SetComboBoxData(QComboBox *cb, int data)
{
for (int i=0; i<cb->count(); i++) {
if (cb->itemData(i).toInt() == data) {
cb->setCurrentIndex(i);
break;
}
}
}
}
+3 -6
View File
@@ -21,12 +21,7 @@
#ifndef QTVERSIONABSTRACTION_H
#define QTVERSIONABSTRACTION_H
/**
*
* A fairly simple header for reducing the amount of Qt version checks necessary throughout the code
*
*/
#include <QComboBox>
#include <QDateTime>
#include <QFileInfo>
#include <QFontMetrics>
@@ -58,6 +53,8 @@ public:
static QStringList WordWrapString(const QString &s, const QFontMetrics &fm, int bounding_width);
static void SetComboBoxData(QComboBox *cb, int data);
template <typename T>
static T *GetParentOfType(const QObject *child)
{