Added completion for buddy, divemaster, location and suit.

Added completion for buddy, divemaster, location and suit.
The completions uses some models that I created in the last
commit - everytime that a divelog file is loaded, it creates
a list of completion items.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-08-13 10:49:59 -03:00
parent 84f73a5fb1
commit 6da2d40d3c
2 changed files with 26 additions and 0 deletions

View file

@ -12,6 +12,8 @@
#include "models.h"
class QCompleter;
namespace Ui
{
class MainTab;
@ -27,6 +29,13 @@ struct NotesBackup{
QString divemaster;
};
struct Completers{
QCompleter *location;
QCompleter *divemaster;
QCompleter *buddy;
QCompleter *suit;
};
class MainTab : public QTabWidget
{
Q_OBJECT
@ -72,6 +81,7 @@ private:
QPushButton *addCylinder;
QPushButton *addWeight;
enum { NONE, DIVE, TRIP } editMode;
Completers completers;
void enableEdition();
};