diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2009-03-23 18:54:29 -0400 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2009-03-23 18:54:29 -0400 |
commit | dbe9aeae0776185978ceafbaa8aaa99c46078ee7 (patch) | |
tree | 7af94e41a78755b87321f8968ef1bc7fb47f134f /sigtools/RootPluginModel.cpp | |
parent | 740bdd2a6972afe8d8f4c1b7e04a669c29fd7459 (diff) | |
download | sigen-dbe9aeae0776185978ceafbaa8aaa99c46078ee7.tar.gz sigen-dbe9aeae0776185978ceafbaa8aaa99c46078ee7.tar.xz sigen-dbe9aeae0776185978ceafbaa8aaa99c46078ee7.zip |
Add PluginTypeModel header
Diffstat (limited to 'sigtools/RootPluginModel.cpp')
-rw-r--r-- | sigtools/RootPluginModel.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sigtools/RootPluginModel.cpp b/sigtools/RootPluginModel.cpp index 0f75ef3a..eeb11f34 100644 --- a/sigtools/RootPluginModel.cpp +++ b/sigtools/RootPluginModel.cpp @@ -48,12 +48,19 @@ QSize RootPluginModel::sizeHint(const QStyleOptionViewItem& option) const BaseModel* RootPluginModel::childItem(const int row) { + if ((0 <= row) && (row < m_types.size())) + return m_types.values()[row]; + return NULL; } void RootPluginModel::addPlugin(const QString& type, KService::Ptr service) { + if (!m_types.contains(type)) + m_types[type] = new PluginTypeModel(type, this); + m_types[type]->addPlugin(service); } int RootPluginModel::findChild(BaseModel* model) const { + return m_types.values().indexOf(model); } |