ui: new style for CodeView

This commit is contained in:
Eberhard Graether
2015-05-25 01:47:14 +02:00
parent d985009bff
commit f15f0de414
19 changed files with 161 additions and 138 deletions
+5 -17
View File
@@ -3,27 +3,26 @@
#include <QScrollBar>
#include <QVBoxLayout>
#include "utility/file/FileSystem.h"
#include "data/location/TokenLocationFile.h"
#include "qt/element/QtCodeFile.h"
#include "utility/file/FileSystem.h"
QtCodeFileList::QtCodeFileList(QWidget* parent)
: QScrollArea(parent)
, m_focusedTokenId(0)
, m_showMaximizeButton(true)
{
m_frame = std::make_shared<QFrame>(this);
m_frame->setObjectName("code_file_list");
QVBoxLayout* layout = new QVBoxLayout(m_frame.get());
layout->setSpacing(10);
layout->setContentsMargins(15, 15, 15, 15);
layout->setSpacing(8);
layout->setContentsMargins(8, 8, 8, 8);
layout->setAlignment(Qt::AlignTop);
m_frame->setLayout(layout);
setWidgetResizable(true);
setWidget(m_frame.get());
setObjectName("code_file_list");
}
QtCodeFileList::~QtCodeFileList()
@@ -98,17 +97,6 @@ void QtCodeFileList::setErrorMessages(const std::vector<std::string>& errorMessa
updateFiles();
}
bool QtCodeFileList::getShowMaximizeButton() const
{
return m_showMaximizeButton;
}
void QtCodeFileList::setShowMaximizeButton(bool show)
{
m_showMaximizeButton = show;
updateFiles();
}
void QtCodeFileList::updateFiles()
{
for (std::shared_ptr<QtCodeFile> file: m_files)