mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Extend tags model to Buddy field
This doesn't change storage format. Instead it parses buddy strings and converts them to string list which is supplied to tags widget. This feature was requested in ticket #311 Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d2c95ddf75
commit
88f3df5c79
3 changed files with 4 additions and 3 deletions
|
@ -834,8 +834,9 @@ void markChangedWidget(QWidget *w){
|
|||
w->setPalette(p);
|
||||
}
|
||||
|
||||
void MainTab::on_buddy_textChanged(const QString& text)
|
||||
void MainTab::on_buddy_textChanged()
|
||||
{
|
||||
QString text = ui.buddy->toPlainText().split(",", QString::SkipEmptyParts).join(", ");
|
||||
EDIT_SELECTED_DIVES( EDIT_TEXT(mydive->buddy, text) );
|
||||
markChangedWidget(ui.buddy);
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ public slots:
|
|||
void on_location_textChanged(const QString& text);
|
||||
void on_coordinates_textChanged(const QString& text);
|
||||
void on_divemaster_textChanged(const QString& text);
|
||||
void on_buddy_textChanged(const QString& text);
|
||||
void on_buddy_textChanged();
|
||||
void on_suit_textChanged(const QString& text);
|
||||
void on_notes_textChanged();
|
||||
void on_airtemp_textChanged(const QString& text);
|
||||
|
|
|
@ -157,7 +157,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLineEdit" name="buddy">
|
||||
<widget class="TagWidget" name="buddy">
|
||||
<property name="readOnly">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
|
Loading…
Add table
Reference in a new issue