diff options
author | am <am@f440f766-f032-0410-8965-dc7d17de2ca0> | 2009-07-24 18:15:51 +0000 |
---|---|---|
committer | am <am@f440f766-f032-0410-8965-dc7d17de2ca0> | 2009-07-24 18:15:51 +0000 |
commit | 6423dcb88055f3553981f9fc8816b42df871c706 (patch) | |
tree | f5f16fb1b879de9b78625d813876961cceea79dd /listeditor.cpp | |
parent | 0e3e202c90e3ccb80310087409936c00189f0cea (diff) | |
download | SheMov-6423dcb88055f3553981f9fc8816b42df871c706.tar.gz SheMov-6423dcb88055f3553981f9fc8816b42df871c706.tar.bz2 SheMov-6423dcb88055f3553981f9fc8816b42df871c706.zip |
-some minor changes and usability things:
-When archiving files, also add new actors to the actorselection
-Added completer to ListEditor
-When selecting an already existing actor, also add it to actorselection
-invalidate ArchiveProxy when items are added
-prevent manual editing of FilesystemView
git-svn-id: file:///var/svn/repos2/shemov/trunk@395 f440f766-f032-0410-8965-dc7d17de2ca0
Diffstat (limited to 'listeditor.cpp')
-rw-r--r-- | listeditor.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/listeditor.cpp b/listeditor.cpp index ac001c9..53f58d6 100644 --- a/listeditor.cpp +++ b/listeditor.cpp @@ -10,6 +10,7 @@ #include <QPushButton> #include <QHBoxLayout> #include <QVBoxLayout> +#include <QCompleter> #include "listeditor.h" #include "listmodel.h" @@ -19,6 +20,10 @@ ListEditor::ListEditor(ListModel *model, QWidget *parent) : QWidget(parent), mMo mItems->setModel(mModel); mEdit = new QLineEdit; + QCompleter *completer = new QCompleter(this); + completer->setModel(mModel); + completer->setCompletionRole(Qt::DisplayRole); + mEdit->setCompleter(completer); mAdd = new QPushButton(tr("Add")); connect(mAdd, SIGNAL(clicked()), this, SLOT(addItem())); @@ -36,8 +41,6 @@ ListEditor::ListEditor(ListModel *model, QWidget *parent) : QWidget(parent), mMo mainLayout->addWidget(mEdit); mainLayout->addLayout(buttonLayout); - connect(mItems, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(itemChanged(const QString &))); - setLayout(mainLayout); } @@ -50,6 +53,8 @@ void ListEditor::addItem(){ if(idx == QModelIndex()){ mModel->addItem(newItem); emit itemAdded(newItem); + }else{ + emit itemAdded(idx.data().toString()); } } |