mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 05:49:53 +08:00
NotebookSelector: use ComboBox
This commit is contained in:
parent
bdd935d9c2
commit
d25c142bfa
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user