1 /**
2 * UGENE - Integrated Bioinformatics Tools.
3 * Copyright (C) 2008-2021 UniPro <ugene@unipro.ru>
4 * http://ugene.net
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
20 */
21
22 #include "MaEditorOverviewArea.h"
23
24 #include <QVBoxLayout>
25
26 #include "MaGraphOverview.h"
27 #include "ov_msa/view_rendering/MaEditorWgt.h"
28
29 namespace U2 {
30
MaEditorOverviewArea(MaEditorWgt * ui,const QString & objectName)31 MaEditorOverviewArea::MaEditorOverviewArea(MaEditorWgt *ui, const QString &objectName)
32 : QWidget(ui),
33 isWidgetResizable(false) {
34 setObjectName(objectName);
35
36 layout = new QVBoxLayout();
37 layout->setMargin(0);
38 layout->setSpacing(0);
39 setLayout(layout);
40
41 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
42 setContextMenuPolicy(Qt::PreventContextMenu);
43 }
44
cancelRendering()45 void MaEditorOverviewArea::cancelRendering() {
46 }
47
isResizable() const48 bool MaEditorOverviewArea::isResizable() const {
49 return isWidgetResizable;
50 }
51
sl_show()52 void MaEditorOverviewArea::sl_show() {
53 setVisible(!isVisible());
54 }
55
addOverview(QWidget * overviewWgt)56 void MaEditorOverviewArea::addOverview(QWidget *overviewWgt) {
57 layout->addWidget(overviewWgt);
58 }
59
60 } // namespace U2
61