Files
oak-editor/ui/fontcombobox.cpp
T
2018-10-05 00:17:09 +10:00

21 lines
457 B
C++

#include "fontcombobox.h"
#include <QFontDatabase>
FontCombobox::FontCombobox(QWidget* parent) : ComboBoxEx(parent) {
addItems(QFontDatabase().families());
value = currentText();
connect(this, SIGNAL(currentTextChanged(QString)), this, SLOT(updateInternals()));
}
const QString& FontCombobox::getPreviousValue() {
return previousValue;
}
void FontCombobox::updateInternals() {
previousValue = value;
value = currentText();
}