9 #ifndef UI_CONNECTION_H 10 #define UI_CONNECTION_H 12 #include <QtCore/QVariant> 13 #include <QtWidgets/QAction> 14 #include <QtWidgets/QApplication> 15 #include <QtWidgets/QButtonGroup> 16 #include <QtWidgets/QComboBox> 17 #include <QtWidgets/QDialog> 18 #include <QtWidgets/QGridLayout> 19 #include <QtWidgets/QHBoxLayout> 20 #include <QtWidgets/QHeaderView> 21 #include <QtWidgets/QLabel> 22 #include <QtWidgets/QPushButton> 23 #include <QtWidgets/QSpacerItem> 24 #include <QtWidgets/QWidget> 58 if (dialog_connection->objectName().isEmpty())
59 dialog_connection->setObjectName(QStringLiteral(
"dialog_connection"));
60 dialog_connection->resize(320, 280);
61 QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
62 sizePolicy.setHorizontalStretch(0);
63 sizePolicy.setVerticalStretch(0);
64 sizePolicy.setHeightForWidth(dialog_connection->sizePolicy().hasHeightForWidth());
65 dialog_connection->setSizePolicy(sizePolicy);
66 dialog_connection->setMinimumSize(QSize(320, 280));
67 dialog_connection->setMaximumSize(QSize(320, 280));
69 icon.addFile(QStringLiteral(
":/button_connect/icons/connect"), QSize(), QIcon::Normal, QIcon::Off);
70 dialog_connection->setWindowIcon(icon);
71 verticalLayoutWidget =
new QWidget(dialog_connection);
72 verticalLayoutWidget->setObjectName(QStringLiteral(
"verticalLayoutWidget"));
73 verticalLayoutWidget->setGeometry(QRect(10, 10, 297, 254));
74 gridLayout =
new QGridLayout(verticalLayoutWidget);
75 gridLayout->setObjectName(QStringLiteral(
"gridLayout"));
76 gridLayout->setSizeConstraint(QLayout::SetDefaultConstraint);
77 gridLayout->setContentsMargins(0, 0, 0, 0);
78 layout_baudRate =
new QHBoxLayout();
79 layout_baudRate->setObjectName(QStringLiteral(
"layout_baudRate"));
80 label_baudRate =
new QLabel(verticalLayoutWidget);
81 label_baudRate->setObjectName(QStringLiteral(
"label_baudRate"));
83 layout_baudRate->addWidget(label_baudRate);
85 baudRate =
new QComboBox(verticalLayoutWidget);
86 baudRate->setObjectName(QStringLiteral(
"baudRate"));
88 layout_baudRate->addWidget(baudRate);
91 gridLayout->addLayout(layout_baudRate, 1, 0, 1, 1);
93 layout_stopBits =
new QHBoxLayout();
94 layout_stopBits->setObjectName(QStringLiteral(
"layout_stopBits"));
95 label_stopBits =
new QLabel(verticalLayoutWidget);
96 label_stopBits->setObjectName(QStringLiteral(
"label_stopBits"));
98 layout_stopBits->addWidget(label_stopBits);
100 stopBits =
new QComboBox(verticalLayoutWidget);
101 stopBits->setObjectName(QStringLiteral(
"stopBits"));
103 layout_stopBits->addWidget(stopBits);
106 gridLayout->addLayout(layout_stopBits, 5, 0, 1, 1);
108 layout_dataBits =
new QHBoxLayout();
109 layout_dataBits->setObjectName(QStringLiteral(
"layout_dataBits"));
110 label_dataBits =
new QLabel(verticalLayoutWidget);
111 label_dataBits->setObjectName(QStringLiteral(
"label_dataBits"));
113 layout_dataBits->addWidget(label_dataBits);
115 dataBits =
new QComboBox(verticalLayoutWidget);
116 dataBits->setObjectName(QStringLiteral(
"dataBits"));
118 layout_dataBits->addWidget(dataBits);
121 gridLayout->addLayout(layout_dataBits, 3, 0, 1, 1);
123 layout_parity =
new QHBoxLayout();
124 layout_parity->setObjectName(QStringLiteral(
"layout_parity"));
125 label_parity =
new QLabel(verticalLayoutWidget);
126 label_parity->setObjectName(QStringLiteral(
"label_parity"));
128 layout_parity->addWidget(label_parity);
130 parity =
new QComboBox(verticalLayoutWidget);
131 parity->setObjectName(QStringLiteral(
"parity"));
133 layout_parity->addWidget(parity);
136 gridLayout->addLayout(layout_parity, 2, 0, 1, 1);
138 layout_portName =
new QHBoxLayout();
139 layout_portName->setObjectName(QStringLiteral(
"layout_portName"));
140 label_portName =
new QLabel(verticalLayoutWidget);
141 label_portName->setObjectName(QStringLiteral(
"label_portName"));
143 layout_portName->addWidget(label_portName);
145 portName =
new QComboBox(verticalLayoutWidget);
146 portName->setObjectName(QStringLiteral(
"portName"));
148 layout_portName->addWidget(portName);
151 gridLayout->addLayout(layout_portName, 0, 0, 1, 1);
153 layout_flowControl =
new QHBoxLayout();
154 layout_flowControl->setObjectName(QStringLiteral(
"layout_flowControl"));
155 label_flowControl =
new QLabel(verticalLayoutWidget);
156 label_flowControl->setObjectName(QStringLiteral(
"label_flowControl"));
158 layout_flowControl->addWidget(label_flowControl);
160 flowControl =
new QComboBox(verticalLayoutWidget);
161 flowControl->setObjectName(QStringLiteral(
"flowControl"));
163 layout_flowControl->addWidget(flowControl);
166 gridLayout->addLayout(layout_flowControl, 4, 0, 1, 1);
168 horizontalLayout =
new QHBoxLayout();
169 horizontalLayout->setObjectName(QStringLiteral(
"horizontalLayout"));
170 button_ok =
new QPushButton(verticalLayoutWidget);
171 button_ok->setObjectName(QStringLiteral(
"button_ok"));
173 horizontalLayout->addWidget(button_ok);
175 button_cancel =
new QPushButton(verticalLayoutWidget);
176 button_cancel->setObjectName(QStringLiteral(
"button_cancel"));
178 horizontalLayout->addWidget(button_cancel);
181 gridLayout->addLayout(horizontalLayout, 7, 0, 1, 1);
183 verticalSpacer =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
185 gridLayout->addItem(verticalSpacer, 6, 0, 1, 1);
190 QMetaObject::connectSlotsByName(dialog_connection);
195 dialog_connection->setWindowTitle(QApplication::translate(
"dialog_connection",
"Po\305\202\304\205czenie", Q_NULLPTR));
196 label_baudRate->setText(QApplication::translate(
"dialog_connection",
"BaudRate", Q_NULLPTR));
198 baudRate->insertItems(0, QStringList()
199 << QApplication::translate(
"dialog_connection",
"115200", Q_NULLPTR)
200 << QApplication::translate(
"dialog_connection",
"9600", Q_NULLPTR)
202 label_stopBits->setText(QApplication::translate(
"dialog_connection",
"Bit stopu", Q_NULLPTR));
204 stopBits->insertItems(0, QStringList()
205 << QApplication::translate(
"dialog_connection",
"1", Q_NULLPTR)
207 label_dataBits->setText(QApplication::translate(
"dialog_connection",
"Data bits", Q_NULLPTR));
209 dataBits->insertItems(0, QStringList()
210 << QApplication::translate(
"dialog_connection",
"8", Q_NULLPTR)
212 label_parity->setText(QApplication::translate(
"dialog_connection",
"Parzysto\305\233\304\207", Q_NULLPTR));
214 parity->insertItems(0, QStringList()
215 << QApplication::translate(
"dialog_connection",
"Nieparzysty", Q_NULLPTR)
216 << QApplication::translate(
"dialog_connection",
"Parzysty", Q_NULLPTR)
218 label_portName->setText(QApplication::translate(
"dialog_connection",
"<html><head/><body><p>Port</p></body></html>", Q_NULLPTR));
219 label_flowControl->setText(QApplication::translate(
"dialog_connection",
"Flow control", Q_NULLPTR));
220 flowControl->clear();
221 flowControl->insertItems(0, QStringList()
222 << QApplication::translate(
"dialog_connection",
"Hardware", Q_NULLPTR)
223 << QApplication::translate(
"dialog_connection",
"Software", Q_NULLPTR)
225 button_ok->setText(QApplication::translate(
"dialog_connection",
"OK", Q_NULLPTR));
226 button_cancel->setText(QApplication::translate(
"dialog_connection",
"Anuluj", Q_NULLPTR));
237 #endif // UI_CONNECTION_H QPushButton * button_cancel
Definition: ui_connection.hh:53
QLabel * label_dataBits
Definition: ui_connection.hh:40
QHBoxLayout * layout_baudRate
Definition: ui_connection.hh:33
QHBoxLayout * layout_dataBits
Definition: ui_connection.hh:39
QHBoxLayout * horizontalLayout
Definition: ui_connection.hh:51
QPushButton * button_ok
Definition: ui_connection.hh:52
QLabel * label_stopBits
Definition: ui_connection.hh:37
Definition: mainwindow.hh:76
QComboBox * portName
Definition: ui_connection.hh:47
QHBoxLayout * layout_stopBits
Definition: ui_connection.hh:36
QHBoxLayout * layout_portName
Definition: ui_connection.hh:45
QHBoxLayout * layout_parity
Definition: ui_connection.hh:42
QWidget * verticalLayoutWidget
Definition: ui_connection.hh:31
QComboBox * dataBits
Definition: ui_connection.hh:41
QComboBox * flowControl
Definition: ui_connection.hh:50
QLabel * label_parity
Definition: ui_connection.hh:43
QLabel * label_portName
Definition: ui_connection.hh:46
Definition: ui_connection.hh:232
QComboBox * parity
Definition: ui_connection.hh:44
Definition: ui_connection.hh:28
QHBoxLayout * layout_flowControl
Definition: ui_connection.hh:48
QSpacerItem * verticalSpacer
Definition: ui_connection.hh:54
QComboBox * stopBits
Definition: ui_connection.hh:38
QComboBox * baudRate
Definition: ui_connection.hh:35
QLabel * label_flowControl
Definition: ui_connection.hh:49
QLabel * label_baudRate
Definition: ui_connection.hh:34
void setupUi(QDialog *dialog_connection)
Definition: ui_connection.hh:56
QGridLayout * gridLayout
Definition: ui_connection.hh:32
void retranslateUi(QDialog *dialog_connection)
Definition: ui_connection.hh:193