9 #ifndef UI_STATUSDIALOG_H 10 #define UI_STATUSDIALOG_H 12 #include <QtCore/QVariant> 13 #include <QtWidgets/QAction> 14 #include <QtWidgets/QApplication> 15 #include <QtWidgets/QButtonGroup> 16 #include <QtWidgets/QDialog> 17 #include <QtWidgets/QGridLayout> 18 #include <QtWidgets/QHBoxLayout> 19 #include <QtWidgets/QHeaderView> 20 #include <QtWidgets/QLabel> 21 #include <QtWidgets/QPushButton> 22 #include <QtWidgets/QSpacerItem> 23 #include <QtWidgets/QTableView> 24 #include <QtWidgets/QTextBrowser> 25 #include <QtWidgets/QVBoxLayout> 52 if (statusDialog->objectName().isEmpty())
53 statusDialog->setObjectName(QStringLiteral(
"statusDialog"));
54 statusDialog->resize(820, 704);
55 QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::MinimumExpanding);
56 sizePolicy.setHorizontalStretch(0);
57 sizePolicy.setVerticalStretch(0);
58 sizePolicy.setHeightForWidth(statusDialog->sizePolicy().hasHeightForWidth());
59 statusDialog->setSizePolicy(sizePolicy);
60 statusDialog->setMinimumSize(QSize(0, 0));
61 statusDialog->setSizeGripEnabled(
true);
62 gridLayout =
new QGridLayout(statusDialog);
63 gridLayout->setObjectName(QStringLiteral(
"gridLayout"));
64 verticalLayout =
new QVBoxLayout();
65 verticalLayout->setObjectName(QStringLiteral(
"verticalLayout"));
66 verticalLayout->setSizeConstraint(QLayout::SetDefaultConstraint);
67 verticalLayout->setContentsMargins(-1, -1, -1, 0);
68 addrLayout =
new QHBoxLayout();
69 addrLayout->setObjectName(QStringLiteral(
"addrLayout"));
70 addrLayout->setSizeConstraint(QLayout::SetDefaultConstraint);
71 addrLabel =
new QLabel(statusDialog);
72 addrLabel->setObjectName(QStringLiteral(
"addrLabel"));
74 addrLayout->addWidget(addrLabel);
76 ipv4display =
new QTextBrowser(statusDialog);
77 ipv4display->setObjectName(QStringLiteral(
"ipv4display"));
78 ipv4display->setMaximumSize(QSize(160, 22));
79 ipv4display->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
80 ipv4display->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
82 addrLayout->addWidget(ipv4display);
84 ipv6label =
new QLabel(statusDialog);
85 ipv6label->setObjectName(QStringLiteral(
"ipv6label"));
87 addrLayout->addWidget(ipv6label);
89 ipv6display =
new QTextBrowser(statusDialog);
90 ipv6display->setObjectName(QStringLiteral(
"ipv6display"));
91 ipv6display->setMinimumSize(QSize(300, 0));
92 ipv6display->setMaximumSize(QSize(16777215, 22));
93 ipv6display->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
94 ipv6display->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
96 addrLayout->addWidget(ipv6display);
99 verticalLayout->addLayout(addrLayout);
101 portLayout =
new QHBoxLayout();
102 portLayout->setObjectName(QStringLiteral(
"portLayout"));
103 portLayout->setContentsMargins(-1, 0, -1, -1);
104 portLabel =
new QLabel(statusDialog);
105 portLabel->setObjectName(QStringLiteral(
"portLabel"));
107 portLayout->addWidget(portLabel);
109 portDisplay =
new QTextBrowser(statusDialog);
110 portDisplay->setObjectName(QStringLiteral(
"portDisplay"));
111 portDisplay->setMaximumSize(QSize(100, 22));
112 portDisplay->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
113 portDisplay->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
115 portLayout->addWidget(portDisplay);
117 horizontalSpacer_2 =
new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
119 portLayout->addItem(horizontalSpacer_2);
122 verticalLayout->addLayout(portLayout);
124 connectionsLabel =
new QLabel(statusDialog);
125 connectionsLabel->setObjectName(QStringLiteral(
"connectionsLabel"));
127 verticalLayout->addWidget(connectionsLabel);
129 connectionsView =
new QTableView(statusDialog);
130 connectionsView->setObjectName(QStringLiteral(
"connectionsView"));
131 QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding);
132 sizePolicy1.setHorizontalStretch(0);
133 sizePolicy1.setVerticalStretch(0);
134 sizePolicy1.setHeightForWidth(connectionsView->sizePolicy().hasHeightForWidth());
135 connectionsView->setSizePolicy(sizePolicy1);
136 connectionsView->setSelectionMode(QAbstractItemView::SingleSelection);
137 connectionsView->setSelectionBehavior(QAbstractItemView::SelectRows);
138 connectionsView->horizontalHeader()->setStretchLastSection(
true);
140 verticalLayout->addWidget(connectionsView);
142 buttonsLayout =
new QHBoxLayout();
143 buttonsLayout->setObjectName(QStringLiteral(
"buttonsLayout"));
144 buttonsLayout->setContentsMargins(-1, 0, -1, -1);
145 horizontalSpacer =
new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
147 buttonsLayout->addItem(horizontalSpacer);
149 addConnectionButton =
new QPushButton(statusDialog);
150 addConnectionButton->setObjectName(QStringLiteral(
"addConnectionButton"));
152 buttonsLayout->addWidget(addConnectionButton);
154 closeButton =
new QPushButton(statusDialog);
155 closeButton->setObjectName(QStringLiteral(
"closeButton"));
157 buttonsLayout->addWidget(closeButton);
160 verticalLayout->addLayout(buttonsLayout);
162 verticalLayout->setStretch(3, 10);
164 gridLayout->addLayout(verticalLayout, 0, 0, 1, 1);
168 QObject::connect(closeButton, SIGNAL(clicked()), statusDialog, SLOT(reject()));
170 QMetaObject::connectSlotsByName(statusDialog);
175 statusDialog->setWindowTitle(QApplication::translate(
"statusDialog",
"Network and connection status", Q_NULLPTR));
176 addrLabel->setText(QApplication::translate(
"statusDialog",
"Detected own IPv4", Q_NULLPTR));
177 #ifndef QT_NO_TOOLTIP 178 ipv4display->setToolTip(QApplication::translate(
"statusDialog",
"Should your friend have trouble connecting, give her this address with port number", Q_NULLPTR));
179 #endif // QT_NO_TOOLTIP 180 ipv6label->setText(QApplication::translate(
"statusDialog",
"IPv6", Q_NULLPTR));
181 #ifndef QT_NO_TOOLTIP 182 ipv6display->setToolTip(QApplication::translate(
"statusDialog",
"Should your friend have trouble connecting, give her this address with port number", Q_NULLPTR));
183 #endif // QT_NO_TOOLTIP 184 portLabel->setText(QApplication::translate(
"statusDialog",
"TCP port currently used", Q_NULLPTR));
185 connectionsLabel->setText(QApplication::translate(
"statusDialog",
"Currently open connections", Q_NULLPTR));
186 addConnectionButton->setText(QApplication::translate(
"statusDialog",
"Manually add connection", Q_NULLPTR));
187 closeButton->setText(QApplication::translate(
"statusDialog",
"Close", Q_NULLPTR));
198 #endif // UI_STATUSDIALOG_H QLabel * portLabel
Definition: ui_statusDialog.h:40
QHBoxLayout * portLayout
Definition: ui_statusDialog.h:39
QTableView * connectionsView
Definition: ui_statusDialog.h:44
QTextBrowser * ipv6display
Definition: ui_statusDialog.h:38
Definition: ui_aboutDialog.h:161
QHBoxLayout * addrLayout
Definition: ui_statusDialog.h:34
QSpacerItem * horizontalSpacer
Definition: ui_statusDialog.h:46
QTextBrowser * ipv4display
Definition: ui_statusDialog.h:36
QLabel * addrLabel
Definition: ui_statusDialog.h:35
void setupUi(QDialog *statusDialog)
Definition: ui_statusDialog.h:50
void retranslateUi(QDialog *statusDialog)
Definition: ui_statusDialog.h:173
QTextBrowser * portDisplay
Definition: ui_statusDialog.h:41
Definition: ui_statusDialog.h:193
QHBoxLayout * buttonsLayout
Definition: ui_statusDialog.h:45
QLabel * connectionsLabel
Definition: ui_statusDialog.h:43
Definition: ui_statusDialog.h:29
QPushButton * closeButton
Definition: ui_statusDialog.h:48
QLabel * ipv6label
Definition: ui_statusDialog.h:37
QSpacerItem * horizontalSpacer_2
Definition: ui_statusDialog.h:42
QPushButton * addConnectionButton
Definition: ui_statusDialog.h:47
QGridLayout * gridLayout
Definition: ui_statusDialog.h:32
QVBoxLayout * verticalLayout
Definition: ui_statusDialog.h:33