-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathgpspanel.cpp
41 lines (33 loc) · 1015 Bytes
/
gpspanel.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/** @file gpspanel.cpp
* Soubor s tridou GpsPanel dedici ze trify QDockWidget pro zobrazeni otevrenych GPS tras
*/
#include "gpspanel.h"
GpsPanel::GpsPanel(QWidget* parent)
: QDockWidget(parent)
{
setWindowTitle(tr("GPS routes"));
setVisible(false);
setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable);
setMinimumWidth(150);
treeW = new QTreeWidget(this);
treeW->setColumnCount(2);
treeW->setColumnWidth(0, 165);
treeW->setColumnWidth(1, 140);
treeW->setHeaderLabels(QStringList() << ""
<< "");
setWidget(treeW);
resize(sizeHint());
}
void GpsPanel::retranslateUi()
{
setWindowTitle(tr("GPS routes"));
}
QSize GpsPanel::sizeHint() const
{
return QSize(280, 16777215);
}
void GpsPanel::addGpsWidget(GpsRoute* gpsRouteWidget)
{
treeW->addTopLevelItem(gpsRouteWidget);
treeW->setItemWidget(gpsRouteWidget, 1, gpsRouteWidget->buttonWidget);
}