21 #ifndef TULIPFONTDIALOG_H 22 #define TULIPFONTDIALOG_H 26 #include <tulip/tulipconf.h> 27 #include <tulip/TulipFont.h> 30 class TulipFontDialog;
35 class TLP_QT_SCOPE TulipFontDialog :
public QDialog {
38 Ui::TulipFontDialog *_ui;
39 TulipFont previousFont;
43 explicit TulipFontDialog(QWidget *parent =
nullptr);
44 ~TulipFontDialog()
override;
45 TulipFont font()
const;
47 void done(
int res)
override {
51 TulipFont getSelectedFont()
const {
52 return ok == QDialog::Accepted ? font() : previousFont;
54 void showEvent(QShowEvent *ev)
override;
56 static TulipFont getFont(QWidget *parent =
nullptr,
const TulipFont &selectedFont = TulipFont());
59 void selectFont(
const TulipFont &);
66 #endif // TULIPFONTDIALOG_H