/* * Copyright (c) 2012 Catalin Badea * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ #include #include #include #include #include #include #include #include #include #include namespace Swift { QtHistoryWindow::QtHistoryWindow() { QVBoxLayout* layout = new QVBoxLayout(this); layout->setSpacing(0); layout->setContentsMargins(0,0,0,0); QWidget* bottom = new QWidget(this); layout->addWidget(bottom); bottom->setAutoFillBackground(true); QHBoxLayout* buttonLayout = new QHBoxLayout(bottom); buttonLayout->setContentsMargins(10,0,20,0); buttonLayout->setSpacing(0); buttonLayout->addStretch(); setWindowTitle(tr("History")); } QtHistoryWindow::~QtHistoryWindow() { } void QtHistoryWindow::activate() { emit wantsToActivate(); } void QtHistoryWindow::showEvent(QShowEvent* event) { emit windowOpening(); emit titleUpdated(); QWidget::showEvent(event); } void QtHistoryWindow::closeEvent(QCloseEvent* event) { emit windowClosing(); event->accept(); } }