Skip to content

Commit 229c92f

Browse files
committed
added help box
1 parent 372135a commit 229c92f

File tree

2 files changed

+25
-17
lines changed

2 files changed

+25
-17
lines changed

Calculator/mainwindow.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ MainWindow::~MainWindow()
4848

4949
void MainWindow::on_pushButton_clicked()
5050
{
51-
QString plaintextvalue = ui->textEdit->toPlainText();
51+
52+
//QString plaintextvalue = ui->textEdit->toPlainText();
5253
QMessageBox msgBox;
53-
msgBox.setText(plaintextvalue);
54+
msgBox.setText("Enter a key Then type in message of decrypt by enter encrypted text into decrypt box then click the decrypt button. Any key entered will be converted to uppercase.");
5455
msgBox.exec();
5556
}
5657

Calculator/mainwindow.ui

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,33 +21,40 @@
2121
<property name="topMargin">
2222
<number>9</number>
2323
</property>
24-
<item row="3" column="0">
25-
<widget class="QPushButton" name="pushButton_2">
24+
<item row="0" column="0">
25+
<widget class="QLabel" name="label">
2626
<property name="text">
27-
<string>Decrypt</string>
27+
<string> Key: </string>
2828
</property>
2929
</widget>
3030
</item>
31-
<item row="1" column="1">
32-
<widget class="QTextEdit" name="textEdit"/>
33-
</item>
34-
<item row="3" column="1">
35-
<widget class="QTextEdit" name="textEdit_2"/>
36-
</item>
3731
<item row="0" column="1">
3832
<widget class="QLineEdit" name="lineEdit"/>
3933
</item>
40-
<item row="0" column="0">
41-
<widget class="QLabel" name="label">
34+
<item row="1" column="0">
35+
<widget class="QLabel" name="label_2">
4236
<property name="text">
43-
<string> Key: </string>
37+
<string> Encrypt:</string>
4438
</property>
4539
</widget>
4640
</item>
47-
<item row="1" column="0">
48-
<widget class="QLabel" name="label_2">
41+
<item row="1" column="1">
42+
<widget class="QTextEdit" name="textEdit"/>
43+
</item>
44+
<item row="3" column="0">
45+
<widget class="QPushButton" name="pushButton_2">
4946
<property name="text">
50-
<string> Encrypt:</string>
47+
<string>Decrypt</string>
48+
</property>
49+
</widget>
50+
</item>
51+
<item row="3" column="1">
52+
<widget class="QTextEdit" name="textEdit_2"/>
53+
</item>
54+
<item row="4" column="1">
55+
<widget class="QPushButton" name="pushButton">
56+
<property name="text">
57+
<string>Help</string>
5158
</property>
5259
</widget>
5360
</item>

0 commit comments

Comments
 (0)