mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-12 20:05:55 -05:00
Prefer NoScrollComboBox::setTextItem over setCurrentText
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define DIVINGMAPPIXMAPITEM_H
|
||||
|
||||
#include "mapconnection.h"
|
||||
#include "noscrollcombobox.h"
|
||||
|
||||
#include <QGraphicsPixmapItem>
|
||||
#include <QPointer>
|
||||
@@ -10,7 +11,7 @@
|
||||
class DivingMapPixmapItem : public QObject, public QGraphicsPixmapItem {
|
||||
Q_OBJECT
|
||||
public:
|
||||
DivingMapPixmapItem(MapConnection *connection, QComboBox *combo);
|
||||
DivingMapPixmapItem(MapConnection *connection, NoScrollComboBox *combo);
|
||||
~DivingMapPixmapItem();
|
||||
|
||||
MapConnection* connection() const { return m_connection; }
|
||||
@@ -18,7 +19,7 @@ public:
|
||||
|
||||
private:
|
||||
QPointer<MapConnection> m_connection;
|
||||
QPointer<QComboBox> m_combo;
|
||||
QPointer<NoScrollComboBox> m_combo;
|
||||
|
||||
void setComboText(const QString &text);
|
||||
static QPixmap getBasePixmap(MapConnection* connection);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "mapheader.h"
|
||||
#include "project.h"
|
||||
#include "noscrollcombobox.h"
|
||||
|
||||
namespace Ui {
|
||||
class MapHeaderForm;
|
||||
@@ -64,7 +65,7 @@ private:
|
||||
QPointer<Project> m_project = nullptr;
|
||||
bool m_allowProjectChanges = true;
|
||||
|
||||
void setText(QComboBox *combo, const QString &text) const;
|
||||
void setText(NoScrollComboBox *combo, const QString &text) const;
|
||||
void setText(QLineEdit *lineEdit, const QString &text) const;
|
||||
void setLocations(const QStringList &locations);
|
||||
void updateLocationName();
|
||||
|
||||
Reference in New Issue
Block a user