blob: 6868ca5b7df429c5b9c2d6bd4d2ae58c672e9569 (
plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/*
* Copyright (c) 2012 Catalin Badea
* Licensed under the simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
#include <QtHistoryWindow.h>
#include <QtTabbable.h>
#include <QCloseEvent>
#include <QTextEdit>
#include <QVBoxLayout>
#include <QPushButton>
#include <QScrollBar>
#include <QCheckBox>
#include <QtSwiftUtil.h>
#include <string>
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();
}
}
|