-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaddcoursewindow.cpp
More file actions
50 lines (39 loc) · 1.01 KB
/
addcoursewindow.cpp
File metadata and controls
50 lines (39 loc) · 1.01 KB
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
#include "addcoursewindow.h"
#include "ui_addcoursewindow.h"
#include <QMessageBox>
AddCourseWindow::AddCourseWindow(QWidget *parent) :
QDialog(parent),
ui(new Ui::AddCourseWindow)
{
ui->setupUi(this);
}
AddCourseWindow::~AddCourseWindow()
{
delete ui;
}
void AddCourseWindow::on_buttonBox_accepted()
{
QString course = ui->courseInput->text();
QString textbook = ui->textbookInput->text();
QString chapter = ui->chapterInput->text();
if(!course.isEmpty() && !textbook.isEmpty() && !chapter.isEmpty()){
//save the names inputed
courseName = course;
textbookName = textbook;
chapterName = chapter;
}else{
QMessageBox::warning(this,"Warning","No Course,Textbook, or Chapter Entered.");
}
}
void AddCourseWindow::on_buttonBox_rejected()
{
}
QString AddCourseWindow::getCourseName(){
return courseName;
}
QString AddCourseWindow::getTextbookName(){
return textbookName;
}
QString AddCourseWindow::getChapterName(){
return chapterName;
}