Final MapConnection UI updates

This commit is contained in:
GriffinR
2024-08-19 18:49:57 -04:00
parent 186e20171b
commit 7a0ae53143
8 changed files with 104 additions and 33 deletions

View File

@@ -14,8 +14,7 @@ class ConnectionsListItem;
// We show the data for each map connection in the panel on the right side of the Connections tab.
// An instance of this class is used for each item in that list.
// It communicates with the ConnectionPixmapItem on the map through a shared MapConnection pointer,
// and the two classes should signal one another when they change this data.
// It communicates with the ConnectionPixmapItem on the map through a shared MapConnection pointer.
class ConnectionsListItem : public QFrame
{
Q_OBJECT
@@ -27,28 +26,27 @@ public:
void updateUI();
void setSelected(bool selected);
QPointer<MapConnection> connection;
private:
Ui::ConnectionsListItem *ui;
QPointer<MapConnection> connection;
Map *map;
bool isSelected = false;
unsigned actionId = 0;
protected:
void mousePressEvent(QMouseEvent*) override;
void mouseDoubleClickEvent(QMouseEvent*) override;
signals:
void removed(MapConnection*);
void selected();
void doubleClicked(MapConnection*);
void removed(MapConnection*);
void openMapClicked(MapConnection*);
private slots:
void on_comboBox_Direction_currentTextChanged(const QString &direction);
void on_comboBox_Map_currentTextChanged(const QString &mapName);
void on_spinBox_Offset_valueChanged(int offset);
void on_button_Delete_clicked();
void on_button_OpenMap_clicked();
};
#endif // CONNECTIONSLISTITEM_H

View File

@@ -24,6 +24,9 @@ signals:
private:
Ui::NewMapConnectionDialog *ui;
bool mapNameIsValid();
void setWarningVisible(bool visible);
};
#endif // NEWMAPCONNECTIONDIALOG_H