src/inspector.cpp

Thu, 06 Nov 2014 15:42:38 +0200

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Thu, 06 Nov 2014 15:42:38 +0200
branch
experimental
changeset 913
d93a42b07e28
permissions
-rw-r--r--

- commit work done on inspector

913
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 #include "inspector.h"
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
2
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
3 static void SortComboBox
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
4
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
5 ObjectInspector::ObjectInspector (QWidget* parent = null, Qt::WindowFlags f) :
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6 m_ui (new Ui_ObjectInspector)
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7 {
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 populate();
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 }
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11 ObjectInspector::~ObjectInspector()
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
12 {
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
13 delete m_ui;
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
14 }
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
15
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
16 void ObjectInspector::populate()
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
17 {
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
18 for (LDDocumentPtr& doc : LDDocument::AllDocuments())
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
19 {
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
20 int idx = m_ui->documentFilter->size();
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
21 m_ui->documentFilter->
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
22 m_ui->documentFilter->setItemData (idx, void* (doc));
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
23 }
d93a42b07e28 - commit work done on inspector
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
24 }

mercurial