diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-04-10 09:16:00 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-04-10 09:16:00 +0000 |
| commit | 76f1c92734c5a4b9432b07eb182c6e96908a29b0 (patch) | |
| tree | e60f1404d267a30cf38d6c5db776b38c7a371a3d /src/qmmpui/playlistheadermodel.cpp | |
| parent | 33f541d7924b14e2cc911f2f32669d52688b5cb5 (diff) | |
| download | qmmp-76f1c92734c5a4b9432b07eb182c6e96908a29b0.tar.gz qmmp-76f1c92734c5a4b9432b07eb182c6e96908a29b0.tar.bz2 qmmp-76f1c92734c5a4b9432b07eb182c6e96908a29b0.zip | |
refactoring and some optimizations
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4842 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/playlistheadermodel.cpp')
| -rw-r--r-- | src/qmmpui/playlistheadermodel.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/qmmpui/playlistheadermodel.cpp b/src/qmmpui/playlistheadermodel.cpp index c39df388e..92b342c0b 100644 --- a/src/qmmpui/playlistheadermodel.cpp +++ b/src/qmmpui/playlistheadermodel.cpp @@ -72,7 +72,8 @@ void PlayListHeaderModel::insert(int index, const QString &name, const QString & col.autoResize = false; m_columns.insert(index, col); sync(); - emit inserted(index); + emit columnAdded(index); + emit headerChanged(); } void PlayListHeaderModel::remove(int index) @@ -88,7 +89,8 @@ void PlayListHeaderModel::remove(int index) delete m_columns.takeAt(index).titleFormatter; sync(); - emit removed(index); + emit columnRemoved(index); + emit headerChanged(); } void PlayListHeaderModel::resize(int index, int size) @@ -100,8 +102,8 @@ void PlayListHeaderModel::resize(int index, int size) } m_columns[index].size = qMax(size, 30); - //sync(); - emit resized(index); + emit columnResized(index); + emit headerChanged(); } void PlayListHeaderModel::setAutoResize(int index) @@ -133,7 +135,8 @@ void PlayListHeaderModel::move(int from, int to) } m_columns.move(from, to); - emit moved(from, to); + emit columnMoved(from, to); + emit headerChanged(); } void PlayListHeaderModel::execEdit(int index, QWidget *parent) @@ -153,7 +156,8 @@ void PlayListHeaderModel::execEdit(int index, QWidget *parent) m_columns[index].name = editor.name(); m_columns[index].pattern = editor.pattern(); m_columns[index].titleFormatter->setPattern(editor.pattern()); - emit changed(index); + emit columnChanged(index); + emit headerChanged(); } } |
