ui: Added second line to search autocompletion list showing namespace or filepath

* Show namespace or filepath in second line of search autocompletions
* Add filepaths relative to .coatidb location
* Rescore matches to acknowledge line split
* Fixed SearchMatch type to be drawn always visible at right edge
This commit is contained in:
Eberhard Graether
2016-10-31 22:41:17 +01:00
parent 8445e705f6
commit a4240def56
21 changed files with 564 additions and 168 deletions
@@ -2,12 +2,18 @@
#include <QApplication>
#include "qt/utility/utilityQt.h"
qreal QtDeviceScaledPixmap::devicePixelRatio()
{
QApplication* app = dynamic_cast<QApplication*>(QCoreApplication::instance());
return app->devicePixelRatio();
}
QtDeviceScaledPixmap::QtDeviceScaledPixmap()
{
}
QtDeviceScaledPixmap::QtDeviceScaledPixmap(QString filePath)
: m_pixmap(filePath)
{
@@ -48,3 +54,8 @@ void QtDeviceScaledPixmap::mirror(bool horizontal, bool vertical)
m_pixmap = QPixmap::fromImage(m_pixmap.toImage().mirrored(horizontal, vertical));
m_pixmap.setDevicePixelRatio(devicePixelRatio());
}
void QtDeviceScaledPixmap::colorize(QColor color)
{
m_pixmap = utility::colorizePixmap(m_pixmap, color);
}
@@ -8,7 +8,8 @@ class QtDeviceScaledPixmap
public:
static qreal devicePixelRatio();
explicit QtDeviceScaledPixmap(QString filePath);
QtDeviceScaledPixmap();
QtDeviceScaledPixmap(QString filePath);
virtual ~QtDeviceScaledPixmap();
const QPixmap& pixmap() const;
@@ -20,6 +21,7 @@ public:
void scaleToHeight(int height);
void mirror(bool horizontal = false, bool vertical = true);
void colorize(QColor color);
private:
QPixmap m_pixmap;