瀏覽代碼

NotebookSelector: use ComboBox

Le Tan 3 年之前
父節點
當前提交
d25c142bfa
共有 3 個文件被更改,包括 6 次插入6 次删除
  1. 1 1
      src/widgets/dialogs/exportdialog.cpp
  2. 3 3
      src/widgets/notebookselector.cpp
  3. 2 2
      src/widgets/notebookselector.h

+ 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: