ui: basic search view

- Added a basic SearchView (+ controller and qt implementation)
- SearchView can set the active element of other views by dispatching a message.
- SearchView adjusts its text when the active element is changed by other views.
- Added wrappers for Button and EditBox that allow the usage of simple callback functions.
This commit is contained in:
malte_langkabel
2014-07-04 13:43:27 +02:00
parent 9297ea6d6d
commit b1023ba4ac
22 changed files with 356 additions and 6 deletions
+23
View File
@@ -0,0 +1,23 @@
#include "qt/element/QtButton.h"
QtButton::QtButton(QWidget *parent)
: QPushButton(parent)
, m_onClick(nullptr)
{
connect(this, SIGNAL(clicked()), this, SLOT(slotOnClick()));
}
QtButton::~QtButton()
{
}
void QtButton::setCallbackOnClick(std::function<void(void)> callback)
{
m_onClick = callback;
}
void QtButton::slotOnClick()
{
if (m_onClick)
m_onClick();
}