Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zolotarev <deathbaba@gmail.com>2011-03-25 19:53:10 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:14:17 +0300
commitd9f0eb0f28f31b3676f6ac33a364728e9b24762e (patch)
tree6af943423463235896397bf80e39ddafcb90c40f /qt/update_dialog.cpp
parent1074e272443fc7ce3bd089737478956fc0d20d32 (diff)
[qt] Added Close button to Downloader
Diffstat (limited to 'qt/update_dialog.cpp')
-rw-r--r--qt/update_dialog.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/qt/update_dialog.cpp b/qt/update_dialog.cpp
index 64afdc423c..d3148d1d88 100644
--- a/qt/update_dialog.cpp
+++ b/qt/update_dialog.cpp
@@ -66,8 +66,13 @@ namespace qt
m_label = new QLabel(QString(QObject::tr(LAST_UPDATE_CHECK)) + timeString.c_str(), this);
m_updateButton = new QPushButton(QObject::tr(CHECK_FOR_UPDATE), this);
+ m_updateButton->setDefault(false);
connect(m_updateButton, SIGNAL(clicked()), this, SLOT(OnUpdateClick()));
+ QPushButton * closeButton = new QPushButton(QObject::tr("Close"), this);
+ closeButton->setDefault(true);
+ connect(closeButton, SIGNAL(clicked()), this, SLOT(OnCloseClick()));
+
m_tree = new QTreeWidget(this);
m_tree->setColumnCount(KNumberOfColumns);
QStringList columnLabels;
@@ -78,9 +83,11 @@ namespace qt
QHBoxLayout * horizontalLayout = new QHBoxLayout();
horizontalLayout->addWidget(m_label);
horizontalLayout->addWidget(m_updateButton);
+ horizontalLayout->addWidget(closeButton);
+
QVBoxLayout * verticalLayout = new QVBoxLayout();
- verticalLayout->addLayout(horizontalLayout);
verticalLayout->addWidget(m_tree);
+ verticalLayout->addLayout(horizontalLayout);
setLayout(verticalLayout);
setWindowTitle(tr("Geographical Regions"));
@@ -189,6 +196,11 @@ namespace qt
m_storage.CheckForUpdate();
}
+ void UpdateDialog::OnCloseClick()
+ {
+ done(0);
+ }
+
/// Changes row's text color
void SetRowColor(QTreeWidgetItem & item, QColor const & color)
{