mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Added again a QCompleter to show the possibilities
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
43bb8881fd
commit
1b8f7f53f2
2 changed files with 9 additions and 0 deletions
|
@ -58,6 +58,13 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
|||
ui.extraData->setModel(extraDataModel);
|
||||
closeMessage();
|
||||
|
||||
QCompleter *completer = new QCompleter();
|
||||
completer->setModel(LocationInformationModel::instance());
|
||||
completer->setCompletionColumn(LocationInformationModel::NAME);
|
||||
completer->setCompletionRole(Qt::DisplayRole);
|
||||
completer->setCompletionMode(QCompleter::PopupCompletion);
|
||||
|
||||
ui.location->setCompleter(completer);
|
||||
connect(ui.addDiveSite, SIGNAL(clicked()), this, SLOT(showDiveSiteSimpleEdit()));
|
||||
|
||||
QAction *action = new QAction(tr("Apply changes"), this);
|
||||
|
@ -746,6 +753,7 @@ void MainTab::reload()
|
|||
buddyModel.updateModel();
|
||||
diveMasterModel.updateModel();
|
||||
tagModel.updateModel();
|
||||
LocationInformationModel::instance()->update();
|
||||
}
|
||||
|
||||
// tricky little macro to edit all the selected dives
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include "ui_maintab.h"
|
||||
#include "completionmodels.h"
|
||||
#include "divelocationmodel.h"
|
||||
#include "dive.h"
|
||||
|
||||
class WeightModel;
|
||||
|
|
Loading…
Add table
Reference in a new issue