From d25c142bfa8bfdd87df678897d309e9cde154611 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Wed, 2 Mar 2022 10:57:16 +0800 Subject: [PATCH] NotebookSelector: use ComboBox --- src/widgets/dialogs/exportdialog.cpp | 2 +- src/widgets/notebookselector.cpp | 6 +++--- src/widgets/notebookselector.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/widgets/dialogs/exportdialog.cpp b/src/widgets/dialogs/exportdialog.cpp index a21fa00e..024889ae 100644 --- a/src/widgets/dialogs/exportdialog.cpp +++ b/src/widgets/dialogs/exportdialog.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -35,6 +34,7 @@ #include #include #include +#include using namespace vnotex; diff --git a/src/widgets/notebookselector.cpp b/src/widgets/notebookselector.cpp index b9db9c24..27dec9d5 100644 --- a/src/widgets/notebookselector.cpp +++ b/src/widgets/notebookselector.cpp @@ -15,7 +15,7 @@ using namespace vnotex; NotebookSelector::NotebookSelector(QWidget *p_parent) - : QComboBox(p_parent), + : ComboBox(p_parent), NavigationMode(NavigationMode::Type::StagedDoubleKeys, this) { auto itemDelegate = new QStyledItemDelegate(this); @@ -169,7 +169,7 @@ bool NotebookSelector::eventFilter(QObject *p_obj, QEvent *p_event) return true; } } - return QComboBox::eventFilter(p_obj, p_event); + return ComboBox::eventFilter(p_obj, p_event); } void NotebookSelector::clearNavigation() @@ -187,5 +187,5 @@ void NotebookSelector::mousePressEvent(QMouseEvent *p_event) return; } - QComboBox::mousePressEvent(p_event); + ComboBox::mousePressEvent(p_event); } diff --git a/src/widgets/notebookselector.h b/src/widgets/notebookselector.h index 3c27b0e3..74380a5c 100644 --- a/src/widgets/notebookselector.h +++ b/src/widgets/notebookselector.h @@ -1,17 +1,17 @@ #ifndef NOTEBOOKSELECTOR_H #define NOTEBOOKSELECTOR_H -#include #include #include "global.h" #include "navigationmode.h" +#include "combobox.h" namespace vnotex { class Notebook; - class NotebookSelector : public QComboBox, public NavigationMode + class NotebookSelector : public ComboBox, public NavigationMode { Q_OBJECT public: