22 lines
476 B
C++
22 lines
476 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() {
|
|
qDebug() << "h";
|
|
previousValue = value;
|
|
value = currentText();
|
|
}
|