GUI preparation for search and browse history

This commit is contained in:
Miodrag Milanovic 2018-07-11 16:20:33 +02:00
parent 09735694b2
commit 77818f53bd
7 changed files with 37 additions and 0 deletions

View File

@ -4,5 +4,10 @@
<file>resources/open.png</file>
<file>resources/save.png</file>
<file>resources/exit.png</file>
<file>resources/zoom.png</file>
<file>resources/resultset_first.png</file>
<file>resources/resultset_previous.png</file>
<file>resources/resultset_next.png</file>
<file>resources/resultset_last.png</file>
</qresource>
</RCC>

View File

@ -20,8 +20,10 @@
#include "designwidget.h"
#include <QAction>
#include <QGridLayout>
#include <QLineEdit>
#include <QMenu>
#include <QSplitter>
#include <QToolBar>
#include <QTreeWidgetItem>
#include "fpgaviewwidget.h"
@ -88,8 +90,38 @@ DesignWidget::DesignWidget(QWidget *parent) : QWidget(parent), ctx(nullptr), net
propertyEditor->show();
const QIcon searchIcon(":/icons/resources/zoom.png");
QLineEdit* lineEdit = new QLineEdit();
lineEdit->setClearButtonEnabled(true);
lineEdit->addAction(searchIcon, QLineEdit::LeadingPosition);
lineEdit->setPlaceholderText("Search...");
QAction *actionFirst = new QAction("", this);
QIcon iconFirst(QStringLiteral(":/icons/resources/resultset_first.png"));
actionFirst->setIcon(iconFirst);
QAction *actionPrev = new QAction("", this);
QIcon iconPrev(QStringLiteral(":/icons/resources/resultset_previous.png"));
actionPrev->setIcon(iconPrev);
QAction *actionNext = new QAction("", this);
QIcon iconNext(QStringLiteral(":/icons/resources/resultset_next.png"));
actionNext->setIcon(iconNext);
QAction *actionLast = new QAction("", this);
QIcon iconLast(QStringLiteral(":/icons/resources/resultset_last.png"));
actionLast->setIcon(iconLast);
QToolBar *toolbar = new QToolBar();
toolbar->addAction(actionFirst);
toolbar->addAction(actionPrev);
toolbar->addAction(actionNext);
toolbar->addAction(actionLast);
QSplitter *splitter = new QSplitter(Qt::Vertical);
splitter->addWidget(lineEdit);
splitter->addWidget(treeWidget);
splitter->addWidget(toolbar);
splitter->addWidget(propertyEditor);
QGridLayout *mainLayout = new QGridLayout();

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

BIN
gui/resources/zoom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B