Browse Source

NotebookSelector: use ComboBox

Le Tan 3 năm trước cách đây
mục cha
commit
d25c142bfa

+ 1 - 1
src/widgets/dialogs/exportdialog.cpp

@@ -5,7 +5,6 @@
 #include <QVBoxLayout>
 #include <QHBoxLayout>
 #include <QLabel>
-#include <QComboBox>
 #include <QPushButton>
 #include <QCheckBox>
 #include <QLineEdit>
@@ -35,6 +34,7 @@
 #include <export/exporter.h>
 #include <widgets/locationinputwithbrowsebutton.h>
 #include <widgets/messageboxhelper.h>
+#include <widgets/combobox.h>
 
 using namespace vnotex;
 

+ 3 - 3
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);
 }

+ 2 - 2
src/widgets/notebookselector.h

@@ -1,17 +1,17 @@
 #ifndef NOTEBOOKSELECTOR_H
 #define NOTEBOOKSELECTOR_H
 
-#include <QComboBox>
 #include <QModelIndex>
 
 #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: