18 #include <QMouseEvent>
20 #include <QVBoxLayout>
33 , m_currentProjectTitle(new QLabel(
" "))
34 , m_currentProjectDir(new QLabel(
" "))
35 , m_widgetColor(QColor(Qt::white))
37 setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
38 setFixedHeight(widget_height());
39 auto layout =
new QVBoxLayout(
this);
82 QPainter painter(
this);
83 painter.fillRect(0, 0, size().width(), size().height(),
m_widgetColor);
101 if (
m_active && event->button() == Qt::LeftButton)
MVVM_VIEW_EXPORT QString WithTildeHomePath(const QString &path)
Returns a string where Linux path to the file is striped using '~/'.
MVVM_VIEW_EXPORT QSize SizeOfLetterM()
Returns size corresponding to actual size of letter M basing on current font metrics.
MVVM_VIEW_EXPORT QString ProjectWindowTitle(const QString &project_dir, bool is_modified)
Returns a title composed from last part of project path, and is_modified flag.
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.