├── Odev1 └── Homework │ ├── Balon.cpp │ ├── Homework.pro │ ├── Homework.pro.user │ ├── clickablelabel.cpp │ ├── clickablelabel.h │ ├── images.qrc │ ├── images │ ├── 0.jpg │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── 5.jpg │ ├── 6.jpg │ ├── arkaplan.jpg │ └── patlama.jpg │ ├── main.cpp │ ├── mainwindow.cpp │ ├── mainwindow.h │ └── mainwindow.ui ├── Odev2 └── Homework │ ├── Homework.pro │ ├── Homework.pro.user │ ├── Homework.pro.user.0e1ded0 │ ├── Images.qrc │ ├── clickablelabel.cpp │ ├── clickablelabel.h │ ├── database.db │ ├── dersislemleri.cpp │ ├── dersislemleri.h │ ├── dersislemleri.ui │ ├── images │ ├── ders.jpg │ ├── notlar.jpg │ └── ogr.jpg │ ├── main.cpp │ ├── mainwindow.cpp │ ├── mainwindow.h │ ├── mainwindow.ui │ ├── notislemleri.cpp │ ├── notislemleri.h │ ├── notislemleri.ui │ ├── ogrenciislemleri.cpp │ ├── ogrenciislemleri.h │ └── ogrenciislemleri.ui ├── README.md ├── UygulamaSinavi1 ├── Quiz.pro ├── Quiz.pro.user ├── main.cpp ├── mainwindow.cpp ├── mainwindow.h └── mainwindow.ui └── UygulamaSinavi2 ├── Quiz.pro ├── Quiz.pro.user ├── database.db ├── main.cpp ├── mainwindow.cpp ├── mainwindow.h ├── mainwindow.ui └── ogrenciler.txt /Odev1/Homework/Balon.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "clickablelabel.h" 3 | 4 | class Balon{ 5 | 6 | public: 7 | 8 | // Constructor 9 | Balon(ClickableLabel *label_temp, int wid){ 10 | 11 | x= 9 + (QRandomGenerator::global()->generate() % (wid-68)); 12 | label=label_temp; 13 | 14 | label->setFixedWidth(50); 15 | label->setFixedHeight(50); 16 | 17 | label->move(x,80); 18 | 19 | int a=QRandomGenerator::global()->generate()%7; 20 | QString temp = ":/images/images/"+QString::number(a)+".jpg"; 21 | 22 | QPixmap pix(temp); 23 | label->setPixmap(pix.scaled(50,50,Qt::KeepAspectRatio)); 24 | 25 | label->show(); 26 | } 27 | 28 | // balonun konumunu asagiya kaydirma 29 | void new_move(){ 30 | 31 | getLabel()->move(x, getLabel()->pos().y()+6); 32 | 33 | } 34 | 35 | // balon disari ciktimi kontrolu 36 | static int check(Balon *bal, int H){ 37 | 38 | if(bal->label->pos().y()>H+4){ 39 | return 1; 40 | } 41 | 42 | else{ 43 | return 0; 44 | } 45 | 46 | } 47 | 48 | ClickableLabel * getLabel(){ 49 | return label; 50 | } 51 | 52 | private: 53 | 54 | // balon konumu 55 | int x; 56 | 57 | // tiklanabilir label 58 | ClickableLabel *label; 59 | 60 | }; 61 | -------------------------------------------------------------------------------- /Odev1/Homework/Homework.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 3 | 4 | CONFIG += c++11 5 | 6 | # The following define makes your compiler emit warnings if you use 7 | # any Qt feature that has been marked deprecated (the exact warnings 8 | # depend on your compiler). Please consult the documentation of the 9 | # deprecated API in order to know how to port your code away from it. 10 | DEFINES += QT_DEPRECATED_WARNINGS 11 | 12 | # You can also make your code fail to compile if it uses deprecated APIs. 13 | # In order to do so, uncomment the following line. 14 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 15 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 16 | 17 | SOURCES += \ 18 | Balon.cpp \ 19 | clickablelabel.cpp \ 20 | main.cpp \ 21 | mainwindow.cpp 22 | 23 | HEADERS += \ 24 | clickablelabel.h \ 25 | mainwindow.h 26 | 27 | FORMS += \ 28 | mainwindow.ui 29 | 30 | # Default rules for deployment. 31 | qnx: target.path = /tmp/$${TARGET}/bin 32 | else: unix:!android: target.path = /opt/$${TARGET}/bin 33 | !isEmpty(target.path): INSTALLS += target 34 | 35 | RESOURCES += \ 36 | images.qrc 37 | -------------------------------------------------------------------------------- /Odev1/Homework/Homework.pro.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | EnvironmentId 7 | {d69e1896-df8b-416a-9078-32ea6883fa76} 8 | 9 | 10 | ProjectExplorer.Project.ActiveTarget 11 | 0 12 | 13 | 14 | ProjectExplorer.Project.EditorSettings 15 | 16 | true 17 | false 18 | true 19 | 20 | Cpp 21 | 22 | CppGlobal 23 | 24 | 25 | 26 | QmlJS 27 | 28 | QmlJSGlobal 29 | 30 | 31 | 2 32 | UTF-8 33 | false 34 | 4 35 | false 36 | 80 37 | true 38 | true 39 | 1 40 | false 41 | true 42 | false 43 | 0 44 | true 45 | true 46 | 0 47 | 8 48 | true 49 | false 50 | 1 51 | true 52 | true 53 | true 54 | *.md, *.MD, Makefile 55 | false 56 | true 57 | 58 | 59 | 60 | ProjectExplorer.Project.PluginSettings 61 | 62 | 63 | true 64 | false 65 | true 66 | true 67 | true 68 | true 69 | 70 | 71 | 0 72 | true 73 | 74 | -fno-delayed-template-parsing 75 | 76 | true 77 | Builtin.BuildSystem 78 | 79 | true 80 | true 81 | Builtin.DefaultTidyAndClazy 82 | 4 83 | 84 | 85 | 86 | true 87 | 88 | 89 | 90 | 91 | ProjectExplorer.Project.Target.0 92 | 93 | Desktop 94 | Desktop Qt 6.1.0 MinGW 64-bit 95 | Desktop Qt 6.1.0 MinGW 64-bit 96 | qt.qt6.610.win64_mingw81_kit 97 | 0 98 | 0 99 | 0 100 | 101 | 0 102 | D:\build-Homework-Desktop_Qt_6_1_0_MinGW_64_bit-Debug 103 | D:/build-Homework-Desktop_Qt_6_1_0_MinGW_64_bit-Debug 104 | 105 | 106 | true 107 | QtProjectManager.QMakeBuildStep 108 | false 109 | 110 | 111 | 112 | true 113 | Qt4ProjectManager.MakeStep 114 | 115 | 2 116 | Build 117 | Build 118 | ProjectExplorer.BuildSteps.Build 119 | 120 | 121 | 122 | true 123 | Qt4ProjectManager.MakeStep 124 | clean 125 | 126 | 1 127 | Clean 128 | Clean 129 | ProjectExplorer.BuildSteps.Clean 130 | 131 | 2 132 | false 133 | 134 | 135 | Debug 136 | Qt4ProjectManager.Qt4BuildConfiguration 137 | 2 138 | 139 | 140 | D:\build-Homework-Desktop_Qt_6_1_0_MinGW_64_bit-Release 141 | D:/build-Homework-Desktop_Qt_6_1_0_MinGW_64_bit-Release 142 | 143 | 144 | true 145 | QtProjectManager.QMakeBuildStep 146 | false 147 | 148 | 149 | 150 | true 151 | Qt4ProjectManager.MakeStep 152 | 153 | 2 154 | Build 155 | Build 156 | ProjectExplorer.BuildSteps.Build 157 | 158 | 159 | 160 | true 161 | Qt4ProjectManager.MakeStep 162 | clean 163 | 164 | 1 165 | Clean 166 | Clean 167 | ProjectExplorer.BuildSteps.Clean 168 | 169 | 2 170 | false 171 | 172 | 173 | Release 174 | Qt4ProjectManager.Qt4BuildConfiguration 175 | 0 176 | 0 177 | 178 | 179 | 0 180 | D:\build-Homework-Desktop_Qt_6_1_0_MinGW_64_bit-Profile 181 | D:/build-Homework-Desktop_Qt_6_1_0_MinGW_64_bit-Profile 182 | 183 | 184 | true 185 | QtProjectManager.QMakeBuildStep 186 | false 187 | 188 | 189 | 190 | true 191 | Qt4ProjectManager.MakeStep 192 | 193 | 2 194 | Build 195 | Build 196 | ProjectExplorer.BuildSteps.Build 197 | 198 | 199 | 200 | true 201 | Qt4ProjectManager.MakeStep 202 | clean 203 | 204 | 1 205 | Clean 206 | Clean 207 | ProjectExplorer.BuildSteps.Clean 208 | 209 | 2 210 | false 211 | 212 | 213 | Profile 214 | Qt4ProjectManager.Qt4BuildConfiguration 215 | 0 216 | 0 217 | 0 218 | 219 | 3 220 | 221 | 222 | 0 223 | Deploy 224 | Deploy 225 | ProjectExplorer.BuildSteps.Deploy 226 | 227 | 1 228 | 229 | false 230 | ProjectExplorer.DefaultDeployConfiguration 231 | 232 | 1 233 | 234 | dwarf 235 | 236 | cpu-cycles 237 | 238 | 239 | 250 240 | 241 | -e 242 | cpu-cycles 243 | --call-graph 244 | dwarf,4096 245 | -F 246 | 250 247 | 248 | -F 249 | true 250 | 4096 251 | false 252 | false 253 | 1000 254 | 255 | true 256 | 257 | 258 | false 259 | false 260 | false 261 | false 262 | true 263 | 0.01 264 | 10 265 | true 266 | kcachegrind 267 | 1 268 | 269 | 25 270 | 271 | 1 272 | true 273 | false 274 | true 275 | 276 | valgrind 277 | 278 | 0 279 | 1 280 | 2 281 | 3 282 | 4 283 | 5 284 | 6 285 | 7 286 | 8 287 | 9 288 | 10 289 | 11 290 | 12 291 | 13 292 | 14 293 | 294 | 295 | 2 296 | 297 | Qt4ProjectManager.Qt4RunConfiguration:D:/Homework/Homework.pro 298 | D:/Homework/Homework.pro 299 | false 300 | true 301 | true 302 | false 303 | true 304 | D:/build-Homework-Desktop_Qt_6_1_0_MinGW_64_bit-Debug 305 | 306 | 1 307 | 308 | 309 | 310 | ProjectExplorer.Project.TargetCount 311 | 1 312 | 313 | 314 | ProjectExplorer.Project.Updater.FileVersion 315 | 22 316 | 317 | 318 | Version 319 | 22 320 | 321 | 322 | -------------------------------------------------------------------------------- /Odev1/Homework/clickablelabel.cpp: -------------------------------------------------------------------------------- 1 | #include "clickablelabel.h" 2 | 3 | ClickableLabel::ClickableLabel(QWidget* parent, Qt::WindowFlags f) 4 | : QLabel(parent) { 5 | 6 | } 7 | 8 | ClickableLabel::~ClickableLabel() {} 9 | 10 | void ClickableLabel::mousePressEvent(QMouseEvent* event) { 11 | emit clicked(); 12 | } 13 | -------------------------------------------------------------------------------- /Odev1/Homework/clickablelabel.h: -------------------------------------------------------------------------------- 1 | #ifndef CLICKABLELABEL_H 2 | #define CLICKABLELABEL_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class ClickableLabel : public QLabel { 9 | Q_OBJECT 10 | 11 | public: 12 | explicit ClickableLabel(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); 13 | ~ClickableLabel(); 14 | 15 | signals: 16 | void clicked(); 17 | 18 | protected: 19 | void mousePressEvent(QMouseEvent* event); 20 | 21 | }; 22 | 23 | #endif // CLICKABLELABEL_H 24 | -------------------------------------------------------------------------------- /Odev1/Homework/images.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/0.jpg 4 | images/1.jpg 5 | images/2.jpg 6 | images/3.jpg 7 | images/4.jpg 8 | images/5.jpg 9 | images/6.jpg 10 | images/arkaplan.jpg 11 | images/patlama.jpg 12 | 13 | 14 | -------------------------------------------------------------------------------- /Odev1/Homework/images/0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmetFurkanDEMIR/Visual-programming-with-Qt/85f304e8fc9beba3d48f88fb70c7693398463b05/Odev1/Homework/images/0.jpg -------------------------------------------------------------------------------- /Odev1/Homework/images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmetFurkanDEMIR/Visual-programming-with-Qt/85f304e8fc9beba3d48f88fb70c7693398463b05/Odev1/Homework/images/1.jpg -------------------------------------------------------------------------------- /Odev1/Homework/images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmetFurkanDEMIR/Visual-programming-with-Qt/85f304e8fc9beba3d48f88fb70c7693398463b05/Odev1/Homework/images/2.jpg -------------------------------------------------------------------------------- /Odev1/Homework/images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmetFurkanDEMIR/Visual-programming-with-Qt/85f304e8fc9beba3d48f88fb70c7693398463b05/Odev1/Homework/images/3.jpg -------------------------------------------------------------------------------- /Odev1/Homework/images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmetFurkanDEMIR/Visual-programming-with-Qt/85f304e8fc9beba3d48f88fb70c7693398463b05/Odev1/Homework/images/4.jpg -------------------------------------------------------------------------------- /Odev1/Homework/images/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmetFurkanDEMIR/Visual-programming-with-Qt/85f304e8fc9beba3d48f88fb70c7693398463b05/Odev1/Homework/images/5.jpg -------------------------------------------------------------------------------- /Odev1/Homework/images/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmetFurkanDEMIR/Visual-programming-with-Qt/85f304e8fc9beba3d48f88fb70c7693398463b05/Odev1/Homework/images/6.jpg -------------------------------------------------------------------------------- /Odev1/Homework/images/arkaplan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmetFurkanDEMIR/Visual-programming-with-Qt/85f304e8fc9beba3d48f88fb70c7693398463b05/Odev1/Homework/images/arkaplan.jpg -------------------------------------------------------------------------------- /Odev1/Homework/images/patlama.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmetFurkanDEMIR/Visual-programming-with-Qt/85f304e8fc9beba3d48f88fb70c7693398463b05/Odev1/Homework/images/patlama.jpg -------------------------------------------------------------------------------- /Odev1/Homework/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | 4 | // monitorun boyutu 5 | int heightH; 6 | int widthW; 7 | 8 | int main(int argc, char *argv[]) 9 | { 10 | QApplication a(argc, argv); 11 | MainWindow w; 12 | w.showFullScreen(); 13 | return a.exec(); 14 | } 15 | -------------------------------------------------------------------------------- /Odev1/Homework/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "ui_mainwindow.h" 3 | #include "clickablelabel.h" 4 | #include 5 | 6 | // Constructor function 7 | MainWindow::MainWindow(QWidget *parent) 8 | : QMainWindow(parent) 9 | , ui(new Ui::MainWindow) 10 | { 11 | ui->setupUi(this); 12 | 13 | // monitore gore oyun ekrani duzenlenir 14 | displaySettings(); 15 | 16 | // zaman labeli guncelleme 17 | time = 1; 18 | timer_time = new QTimer(this); 19 | connect(timer_time, SIGNAL(timeout()), this, SLOT(time_update())); 20 | timer_time->start(1000); 21 | 22 | // otomatik balon cikartma 23 | timer_BalonSpawn = new QTimer(this); 24 | connect(timer_BalonSpawn, SIGNAL(timeout()), this, SLOT(spawn())); 25 | timer_BalonSpawn->start(700); 26 | 27 | // balonlari asagi kaydirma signal&slot 28 | // balonlarin ekrandan cikma kontrolu 29 | timer_label = new QTimer(this); 30 | connect(timer_label, SIGNAL(timeout()), SLOT(move_update())); 31 | timer_label->start(40); 32 | 33 | // durumu ekranda yazdirmak icin kullanilan labeller. 34 | vurulan=0; 35 | kacan=0; 36 | 37 | // oyun ekran ayari 38 | flagWindow=0; 39 | 40 | } 41 | 42 | MainWindow::~MainWindow() 43 | { 44 | delete ui; 45 | } 46 | 47 | // tum ekranlar ile uyumlu olmasini sagliyorum (1920x1080, 1366x768, vb..) 48 | void MainWindow::displaySettings(){ 49 | 50 | QScreen *screen = QGuiApplication::primaryScreen(); 51 | QRect screenGeometry = screen->geometry(); 52 | int height_res = screenGeometry.height(); 53 | int width_res = screenGeometry.width(); 54 | heightH=height_res; 55 | widthW=width_res; 56 | 57 | this->resize(width_res, height_res); 58 | 59 | ui->label_4->resize(width_res+2, height_res+2); 60 | 61 | QPixmap pix(":/images/images/arkaplan.jpg"); 62 | ui->label_4->setPixmap(pix.scaled(width_res+2,width_res+2,Qt::KeepAspectRatio)); 63 | 64 | ui->pushButton->move(width_res-40, 10); 65 | ui->pushButton_2->move(width_res-76, 10); 66 | 67 | ui->horizontalLayoutMain->setStretch(0,width_res*0.009); 68 | 69 | } 70 | 71 | // balonlari asagiya kaydirir ayni zamanda kacan balonlari kontrol eder. 72 | void MainWindow::move_update(){ 73 | 74 | int count = -1; 75 | 76 | foreach(Balon *bal, balon_list){ 77 | 78 | count++; 79 | 80 | // konum guncelleme 81 | bal->new_move(); 82 | 83 | // balon kacti 84 | if(bal->check(bal, heightH)){ 85 | 86 | kacan+=1; 87 | QString format("Kaçan Balon Sayısı : %1"); 88 | ui->label_3->setText(format.arg(QString::number(kacan))); 89 | 90 | balon_list.at(count)->getLabel()->hide(); 91 | delete balon_list.at(count); 92 | balon_list.removeAt(count); 93 | } 94 | } 95 | 96 | } 97 | 98 | // balonu belirlenen sure sonunda tamamen ortadan kaldirir (patlama efektinden sonra). 99 | void MainWindow::balon_hide(){ 100 | 101 | if(QueBalon_list.count()!=0){ 102 | 103 | QueBalon_list.at(0)->getLabel()->hide(); 104 | delete QueBalon_list.at(0); 105 | QueBalon_list.removeAt(0); 106 | } 107 | 108 | 109 | } 110 | 111 | // balona tıklanma eventi 112 | void MainWindow::click_balon(){ 113 | 114 | QObject *balon_label = QObject::sender(); 115 | 116 | int count = -1; 117 | foreach(Balon *temp, balon_list){ 118 | 119 | count+=1; 120 | 121 | // vurulan balonu&labeli bulduk 122 | if(balon_label==temp->getLabel()){ 123 | 124 | // label update 125 | vurulan+=1; 126 | QString format("Vurulan Balon Sayısı : %1"); 127 | ui->label_2->setText(format.arg(QString::number(vurulan))); 128 | 129 | // patlama efekti 130 | QPixmap pix(":/images/images/patlama.jpg"); 131 | balon_list.at(count)->getLabel()->setPixmap(pix.scaled(50,50,Qt::KeepAspectRatio)); 132 | 133 | // patlama efekti bittikten sonra silinmesi için temp bir liste 134 | QueBalon_list.append(balon_list.at(count)); 135 | 136 | // ana yapidan cikartilir 137 | balon_list.removeAt(count); 138 | 139 | // patlama efekti timeri 140 | QTimer::singleShot(2500, this, SLOT(balon_hide())); 141 | 142 | } 143 | } 144 | 145 | } 146 | 147 | // balonları random spawn 148 | void MainWindow::spawn(){ 149 | 150 | ClickableLabel *label = new ClickableLabel(this); 151 | connect(label, SIGNAL(clicked()), this, SLOT(click_balon())); 152 | 153 | Balon *bal = new Balon(label, widthW); 154 | balon_list.append(bal); 155 | 156 | } 157 | 158 | // sure labelini guncelleme fonksiyonu 159 | void MainWindow::time_update(){ 160 | 161 | QString format("Süre : %1"); 162 | ui->label->setText(format.arg(QString::number(time))); 163 | 164 | time+=1; 165 | 166 | } 167 | 168 | // ESC tusuna basilir ise oyundan cikilir 169 | // (ALT+Tab ile otomatik asagiya alir). veya sag ustteki tuslari kullanabilirsiniz. 170 | void MainWindow::keyReleaseEvent(QKeyEvent *event){ 171 | 172 | if(event->key()==Qt::Key_Escape){ 173 | exit(0); 174 | } 175 | 176 | } 177 | 178 | // pencere secilince oyun ekranini tekrardan buyultmek icin fonksiyon. 179 | // oyunun durmasini ve baslamsini saglar, boylece arka planda kendi kendine oynamaz ve kullanici balonlari kacirmaz 180 | void MainWindow::changeEvent(QEvent * event){ 181 | 182 | 183 | if(flagWindow!=3){ 184 | flagWindow+=1; 185 | } 186 | 187 | 188 | if(this->isMinimized() || (flagWindow==3 && !(this->isActiveWindow()))){ 189 | timer_time->stop(); 190 | timer_label->stop(); 191 | timer_BalonSpawn->stop(); 192 | } 193 | 194 | else if(this->isFullScreen() && flagWindow==3){ 195 | 196 | this->showFullScreen(); 197 | timer_time->start(); 198 | timer_label->start(); 199 | timer_BalonSpawn->start(); 200 | } 201 | 202 | } 203 | 204 | 205 | // oyunu (pencereyi kapatmak) 206 | void MainWindow::on_pushButton_clicked() 207 | { 208 | exit(0); 209 | } 210 | 211 | // ekrani kucultmek 212 | void MainWindow::on_pushButton_2_clicked() 213 | { 214 | 215 | timer_time->stop(); 216 | timer_label->stop(); 217 | timer_BalonSpawn->stop(); 218 | this->showMinimized(); 219 | } 220 | -------------------------------------------------------------------------------- /Odev1/Homework/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "Balon.cpp" 8 | #include "clickablelabel.h" 9 | 10 | QT_BEGIN_NAMESPACE 11 | namespace Ui { class MainWindow; } 12 | QT_END_NAMESPACE 13 | 14 | extern int heightH; 15 | extern int widthW; 16 | 17 | class MainWindow : public QMainWindow 18 | { 19 | Q_OBJECT 20 | 21 | public: 22 | MainWindow(QWidget *parent = nullptr); 23 | ~MainWindow(); 24 | 25 | protected: 26 | // ESC tusuna basinca oyundan cikmasini saglamak icin tetikleme 27 | void keyReleaseEvent(QKeyEvent *); 28 | 29 | // minimize halden tekrardan büyültülme olur ise oyunu full ekran yapma signali. 30 | void changeEvent(QEvent *); 31 | 32 | private slots: 33 | void on_pushButton_clicked(); 34 | 35 | void on_pushButton_2_clicked(); 36 | 37 | // sure labelini guncelleyen fonksiyon 38 | void time_update(); 39 | 40 | // balonların otomatik spawn olmasi 41 | void spawn(); 42 | 43 | // balonlari asagiya kaydirir. 44 | void move_update(); 45 | 46 | // balona tıklanma eventi 47 | void click_balon(); 48 | 49 | // balonu belirlenen sure sonunda tamamen ortadan kaldirir 50 | void balon_hide(); 51 | 52 | // tum ekranlar ile uyumlu olmasini sagliyorum 53 | void displaySettings(); 54 | 55 | private: 56 | Ui::MainWindow *ui; 57 | int time, vurulan, kacan, flagWindow; 58 | 59 | QList balon_list; 60 | QList QueBalon_list; 61 | 62 | QTimer *timer_time; 63 | QTimer *timer_BalonSpawn; 64 | QTimer *timer_label; 65 | }; 66 | #endif // MAINWINDOW_H 67 | -------------------------------------------------------------------------------- /Odev1/Homework/mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 1366 10 | 768 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 0 20 | 21 | 22 | 9 23 | 24 | 25 | 0 26 | 27 | 28 | 0 29 | 30 | 31 | 0 32 | 33 | 34 | 9 35 | 36 | 37 | 38 | 39 | 6 40 | 41 | 42 | 0 43 | 44 | 45 | 0 46 | 47 | 48 | 0 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 15 57 | 58 | 59 | 60 | Süre : <font color='blue'>0</font> 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 15 73 | 74 | 75 | 76 | Vurulan Balon Sayısı : <font color='green'>0</font> 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 15 85 | 86 | 87 | 88 | Kaçan Balon Sayısı : <font color='red'>0</font> 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | :/images/images/arkaplan.jpg 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 1328 111 | 10 112 | 31 113 | 21 114 | 115 | 116 | 117 | x 118 | 119 | 120 | 121 | 122 | 123 | 1290 124 | 10 125 | 31 126 | 21 127 | 128 | 129 | 130 | - 131 | 132 | 133 | label_4 134 | horizontalLayoutWidget_2 135 | pushButton_2 136 | pushButton 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /Odev2/Homework/Homework.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | QT += sql 3 | 4 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 5 | 6 | CONFIG += c++11 7 | 8 | # The following define makes your compiler emit warnings if you use 9 | # any Qt feature that has been marked deprecated (the exact warnings 10 | # depend on your compiler). Please consult the documentation of the 11 | # deprecated API in order to know how to port your code away from it. 12 | DEFINES += QT_DEPRECATED_WARNINGS 13 | 14 | # You can also make your code fail to compile if it uses deprecated APIs. 15 | # In order to do so, uncomment the following line. 16 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 17 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 18 | 19 | SOURCES += \ 20 | dersislemleri.cpp \ 21 | main.cpp \ 22 | mainwindow.cpp \ 23 | clickablelabel.cpp \ 24 | notislemleri.cpp \ 25 | ogrenciislemleri.cpp 26 | 27 | HEADERS += \ 28 | dersislemleri.h \ 29 | mainwindow.h \ 30 | clickablelabel.h \ 31 | notislemleri.h \ 32 | ogrenciislemleri.h 33 | 34 | FORMS += \ 35 | dersislemleri.ui \ 36 | mainwindow.ui \ 37 | notislemleri.ui \ 38 | ogrenciislemleri.ui 39 | 40 | # Default rules for deployment. 41 | qnx: target.path = /tmp/$${TARGET}/bin 42 | else: unix:!android: target.path = /opt/$${TARGET}/bin 43 | !isEmpty(target.path): INSTALLS += target 44 | 45 | RESOURCES += \ 46 | Images.qrc 47 | -------------------------------------------------------------------------------- /Odev2/Homework/Homework.pro.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | EnvironmentId 7 | {d69e1896-df8b-416a-9078-32ea6883fa76} 8 | 9 | 10 | ProjectExplorer.Project.ActiveTarget 11 | 0 12 | 13 | 14 | ProjectExplorer.Project.EditorSettings 15 | 16 | true 17 | false 18 | true 19 | 20 | Cpp 21 | 22 | CppGlobal 23 | 24 | 25 | 26 | QmlJS 27 | 28 | QmlJSGlobal 29 | 30 | 31 | 2 32 | UTF-8 33 | false 34 | 4 35 | false 36 | 80 37 | true 38 | true 39 | 1 40 | false 41 | true 42 | false 43 | 0 44 | true 45 | true 46 | 0 47 | 8 48 | true 49 | false 50 | 1 51 | true 52 | true 53 | true 54 | *.md, *.MD, Makefile 55 | false 56 | true 57 | 58 | 59 | 60 | ProjectExplorer.Project.PluginSettings 61 | 62 | 63 | true 64 | false 65 | true 66 | true 67 | true 68 | true 69 | 70 | 71 | 0 72 | true 73 | 74 | -fno-delayed-template-parsing 75 | 76 | true 77 | Builtin.BuildSystem 78 | 79 | true 80 | true 81 | Builtin.DefaultTidyAndClazy 82 | 4 83 | 84 | 85 | 86 | true 87 | 88 | 89 | 90 | 91 | ProjectExplorer.Project.Target.0 92 | 93 | Desktop 94 | Desktop Qt 6.1.0 MinGW 64-bit 95 | Desktop Qt 6.1.0 MinGW 64-bit 96 | qt.qt6.610.win64_mingw81_kit 97 | 0 98 | 0 99 | 0 100 | 101 | 0 102 | C:\Users\demir\Desktop\build-Homework-Desktop_Qt_6_1_0_MinGW_64_bit-Debug 103 | C:/Users/demir/Desktop/build-Homework-Desktop_Qt_6_1_0_MinGW_64_bit-Debug 104 | 105 | 106 | true 107 | QtProjectManager.QMakeBuildStep 108 | false 109 | 110 | 111 | 112 | true 113 | Qt4ProjectManager.MakeStep 114 | 115 | 2 116 | Build 117 | Build 118 | ProjectExplorer.BuildSteps.Build 119 | 120 | 121 | 122 | true 123 | Qt4ProjectManager.MakeStep 124 | clean 125 | 126 | 1 127 | Clean 128 | Clean 129 | ProjectExplorer.BuildSteps.Clean 130 | 131 | 2 132 | false 133 | 134 | 135 | Debug 136 | Qt4ProjectManager.Qt4BuildConfiguration 137 | 2 138 | 139 | 140 | C:\Users\demir\Desktop\build-Homework-Desktop_Qt_6_1_0_MinGW_64_bit-Release 141 | C:/Users/demir/Desktop/build-Homework-Desktop_Qt_6_1_0_MinGW_64_bit-Release 142 | 143 | 144 | true 145 | QtProjectManager.QMakeBuildStep 146 | false 147 | 148 | 149 | 150 | true 151 | Qt4ProjectManager.MakeStep 152 | 153 | 2 154 | Build 155 | Build 156 | ProjectExplorer.BuildSteps.Build 157 | 158 | 159 | 160 | true 161 | Qt4ProjectManager.MakeStep 162 | clean 163 | 164 | 1 165 | Clean 166 | Clean 167 | ProjectExplorer.BuildSteps.Clean 168 | 169 | 2 170 | false 171 | 172 | 173 | Release 174 | Qt4ProjectManager.Qt4BuildConfiguration 175 | 0 176 | 0 177 | 178 | 179 | 0 180 | C:\Users\demir\Desktop\build-Homework-Desktop_Qt_6_1_0_MinGW_64_bit-Profile 181 | C:/Users/demir/Desktop/build-Homework-Desktop_Qt_6_1_0_MinGW_64_bit-Profile 182 | 183 | 184 | true 185 | QtProjectManager.QMakeBuildStep 186 | false 187 | 188 | 189 | 190 | true 191 | Qt4ProjectManager.MakeStep 192 | 193 | 2 194 | Build 195 | Build 196 | ProjectExplorer.BuildSteps.Build 197 | 198 | 199 | 200 | true 201 | Qt4ProjectManager.MakeStep 202 | clean 203 | 204 | 1 205 | Clean 206 | Clean 207 | ProjectExplorer.BuildSteps.Clean 208 | 209 | 2 210 | false 211 | 212 | 213 | Profile 214 | Qt4ProjectManager.Qt4BuildConfiguration 215 | 0 216 | 0 217 | 0 218 | 219 | 3 220 | 221 | 222 | 0 223 | Deploy 224 | Deploy 225 | ProjectExplorer.BuildSteps.Deploy 226 | 227 | 1 228 | 229 | false 230 | ProjectExplorer.DefaultDeployConfiguration 231 | 232 | 1 233 | 234 | dwarf 235 | 236 | cpu-cycles 237 | 238 | 239 | 250 240 | 241 | -e 242 | cpu-cycles 243 | --call-graph 244 | dwarf,4096 245 | -F 246 | 250 247 | 248 | -F 249 | true 250 | 4096 251 | false 252 | false 253 | 1000 254 | 255 | true 256 | 257 | 258 | false 259 | false 260 | false 261 | false 262 | true 263 | 0.01 264 | 10 265 | true 266 | kcachegrind 267 | 1 268 | 269 | 25 270 | 271 | 1 272 | true 273 | false 274 | true 275 | 276 | valgrind 277 | 278 | 0 279 | 1 280 | 2 281 | 3 282 | 4 283 | 5 284 | 6 285 | 7 286 | 8 287 | 9 288 | 10 289 | 11 290 | 12 291 | 13 292 | 14 293 | 294 | 295 | 2 296 | 297 | Qt4ProjectManager.Qt4RunConfiguration:C:/Users/demir/Desktop/Homework/Homework.pro 298 | C:/Users/demir/Desktop/Homework/Homework.pro 299 | false 300 | true 301 | true 302 | false 303 | true 304 | C:/Users/demir/Desktop/build-Homework-Desktop_Qt_6_1_0_MinGW_64_bit-Debug 305 | 306 | 1 307 | 308 | 309 | 310 | ProjectExplorer.Project.TargetCount 311 | 1 312 | 313 | 314 | ProjectExplorer.Project.Updater.FileVersion 315 | 22 316 | 317 | 318 | Version 319 | 22 320 | 321 | 322 | -------------------------------------------------------------------------------- /Odev2/Homework/Homework.pro.user.0e1ded0: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | EnvironmentId 7 | {0e1ded07-4e7c-4ad6-a6dd-b1dd9a52f828} 8 | 9 | 10 | ProjectExplorer.Project.ActiveTarget 11 | 0 12 | 13 | 14 | ProjectExplorer.Project.EditorSettings 15 | 16 | true 17 | false 18 | true 19 | 20 | Cpp 21 | 22 | CppGlobal 23 | 24 | 25 | 26 | QmlJS 27 | 28 | QmlJSGlobal 29 | 30 | 31 | 2 32 | UTF-8 33 | false 34 | 4 35 | false 36 | 80 37 | true 38 | true 39 | 1 40 | true 41 | false 42 | 0 43 | true 44 | true 45 | 0 46 | 8 47 | true 48 | 1 49 | true 50 | true 51 | true 52 | false 53 | 54 | 55 | 56 | ProjectExplorer.Project.PluginSettings 57 | 58 | 59 | true 60 | 61 | 62 | 63 | ProjectExplorer.Project.Target.0 64 | 65 | Desktop Qt 5.9.9 GCC 64bit 66 | Desktop Qt 5.9.9 GCC 64bit 67 | qt.qt5.599.gcc_64_kit 68 | 0 69 | 0 70 | 0 71 | 72 | /home/demir/build-Homework-Desktop_Qt_5_9_9_GCC_64bit-Debug 73 | 74 | 75 | true 76 | QtProjectManager.QMakeBuildStep 77 | true 78 | 79 | false 80 | false 81 | false 82 | 83 | 84 | true 85 | Qt4ProjectManager.MakeStep 86 | 87 | false 88 | 89 | 90 | false 91 | 92 | 2 93 | Build 94 | Build 95 | ProjectExplorer.BuildSteps.Build 96 | 97 | 98 | 99 | true 100 | Qt4ProjectManager.MakeStep 101 | 102 | true 103 | clean 104 | 105 | false 106 | 107 | 1 108 | Clean 109 | Clean 110 | ProjectExplorer.BuildSteps.Clean 111 | 112 | 2 113 | false 114 | 115 | Debug 116 | Qt4ProjectManager.Qt4BuildConfiguration 117 | 2 118 | 119 | 120 | /home/demir/build-Homework-Desktop_Qt_5_9_9_GCC_64bit-Release 121 | 122 | 123 | true 124 | QtProjectManager.QMakeBuildStep 125 | false 126 | 127 | false 128 | false 129 | false 130 | 131 | 132 | true 133 | Qt4ProjectManager.MakeStep 134 | 135 | false 136 | 137 | 138 | false 139 | 140 | 2 141 | Build 142 | Build 143 | ProjectExplorer.BuildSteps.Build 144 | 145 | 146 | 147 | true 148 | Qt4ProjectManager.MakeStep 149 | 150 | true 151 | clean 152 | 153 | false 154 | 155 | 1 156 | Clean 157 | Clean 158 | ProjectExplorer.BuildSteps.Clean 159 | 160 | 2 161 | false 162 | 163 | Release 164 | Qt4ProjectManager.Qt4BuildConfiguration 165 | 0 166 | 167 | 168 | /home/demir/build-Homework-Desktop_Qt_5_9_9_GCC_64bit-Profile 169 | 170 | 171 | true 172 | QtProjectManager.QMakeBuildStep 173 | true 174 | 175 | false 176 | true 177 | false 178 | 179 | 180 | true 181 | Qt4ProjectManager.MakeStep 182 | 183 | false 184 | 185 | 186 | false 187 | 188 | 2 189 | Build 190 | Build 191 | ProjectExplorer.BuildSteps.Build 192 | 193 | 194 | 195 | true 196 | Qt4ProjectManager.MakeStep 197 | 198 | true 199 | clean 200 | 201 | false 202 | 203 | 1 204 | Clean 205 | Clean 206 | ProjectExplorer.BuildSteps.Clean 207 | 208 | 2 209 | false 210 | 211 | Profile 212 | Qt4ProjectManager.Qt4BuildConfiguration 213 | 0 214 | 215 | 3 216 | 217 | 218 | 0 219 | Deploy 220 | Deploy 221 | ProjectExplorer.BuildSteps.Deploy 222 | 223 | 1 224 | ProjectExplorer.DefaultDeployConfiguration 225 | 226 | 1 227 | 228 | 229 | dwarf 230 | 231 | cpu-cycles 232 | 233 | 234 | 250 235 | 236 | -e 237 | cpu-cycles 238 | --call-graph 239 | dwarf,4096 240 | -F 241 | 250 242 | 243 | -F 244 | true 245 | 4096 246 | false 247 | false 248 | 1000 249 | 250 | true 251 | 252 | false 253 | false 254 | false 255 | false 256 | true 257 | 0.01 258 | 10 259 | true 260 | kcachegrind 261 | 1 262 | 25 263 | 264 | 1 265 | true 266 | false 267 | true 268 | valgrind 269 | 270 | 0 271 | 1 272 | 2 273 | 3 274 | 4 275 | 5 276 | 6 277 | 7 278 | 8 279 | 9 280 | 10 281 | 11 282 | 12 283 | 13 284 | 14 285 | 286 | 2 287 | 288 | Qt4ProjectManager.Qt4RunConfiguration:/home/demir/Homework/Homework.pro 289 | /home/demir/Homework/Homework.pro 290 | 291 | false 292 | 293 | false 294 | true 295 | true 296 | false 297 | false 298 | true 299 | 300 | /home/demir/build-Homework-Desktop_Qt_5_9_9_GCC_64bit-Debug 301 | 302 | 1 303 | 304 | 305 | 306 | ProjectExplorer.Project.TargetCount 307 | 1 308 | 309 | 310 | ProjectExplorer.Project.Updater.FileVersion 311 | 22 312 | 313 | 314 | Version 315 | 22 316 | 317 | 318 | -------------------------------------------------------------------------------- /Odev2/Homework/Images.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/ders.jpg 4 | images/notlar.jpg 5 | images/ogr.jpg 6 | 7 | 8 | -------------------------------------------------------------------------------- /Odev2/Homework/clickablelabel.cpp: -------------------------------------------------------------------------------- 1 | #include "clickablelabel.h" 2 | 3 | ClickableLabel::ClickableLabel(QWidget* parent, Qt::WindowFlags f) 4 | : QLabel(parent) { 5 | 6 | } 7 | 8 | ClickableLabel::~ClickableLabel() {} 9 | 10 | void ClickableLabel::mousePressEvent(QMouseEvent* event) { 11 | emit clicked(); 12 | } 13 | -------------------------------------------------------------------------------- /Odev2/Homework/clickablelabel.h: -------------------------------------------------------------------------------- 1 | #ifndef CLICKABLELABEL_H 2 | #define CLICKABLELABEL_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class ClickableLabel : public QLabel { 9 | Q_OBJECT 10 | 11 | public: 12 | explicit ClickableLabel(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); 13 | ~ClickableLabel(); 14 | 15 | signals: 16 | void clicked(); 17 | 18 | protected: 19 | void mousePressEvent(QMouseEvent* event); 20 | 21 | }; 22 | 23 | #endif // CLICKABLELABEL_H 24 | -------------------------------------------------------------------------------- /Odev2/Homework/database.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmetFurkanDEMIR/Visual-programming-with-Qt/85f304e8fc9beba3d48f88fb70c7693398463b05/Odev2/Homework/database.db -------------------------------------------------------------------------------- /Odev2/Homework/dersislemleri.cpp: -------------------------------------------------------------------------------- 1 | #include "dersislemleri.h" 2 | #include "ui_dersislemleri.h" 3 | #include 4 | #include "mainwindow.h" 5 | 6 | DersIslemleri::DersIslemleri(QWidget *parent) : 7 | QDialog(parent), 8 | ui(new Ui::DersIslemleri) 9 | { 10 | 11 | ui->setupUi(this); 12 | 13 | this->setFixedSize(664, 525); 14 | ui->lineEdit->setValidator(new QIntValidator(-999999999, 999999999, this) ); 15 | 16 | model = new QSqlQueryModel(); 17 | model->setQuery("SELECT ders_kodu, ders_adi FROM dersler"); 18 | model->setHeaderData(0, Qt::Horizontal, tr("ders_kodu")); 19 | model->setHeaderData(1, Qt::Horizontal, tr("ders_adi")); 20 | ui->tableView->setModel(model); 21 | 22 | QItemSelectionModel *sm = ui->tableView->selectionModel(); 23 | connect(sm, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), 24 | this, SLOT(selected(QModelIndex,QModelIndex))); 25 | 26 | model_ogr = new QSqlQueryModel(); 27 | QString comand = QString("SELECT ogr_no, ders_kodu, vize_not, final_not, geçme_notu FROM notlar WHERE ders_kodu = ")+secili_kod; 28 | model_ogr->setQuery(comand); 29 | model_ogr->setHeaderData(0, Qt::Horizontal, tr("ogr_no")); 30 | model_ogr->setHeaderData(1, Qt::Horizontal, tr("ders_kodu")); 31 | model_ogr->setHeaderData(2, Qt::Horizontal, tr("vize_not")); 32 | model_ogr->setHeaderData(3, Qt::Horizontal, tr("final_not")); 33 | model_ogr->setHeaderData(4, Qt::Horizontal, tr("geçme_notu")); 34 | ui->tableView_2->setModel(model_ogr); 35 | 36 | } 37 | 38 | DersIslemleri::~DersIslemleri() 39 | { 40 | delete ui; 41 | } 42 | 43 | 44 | void DersIslemleri::selected(QModelIndex a,QModelIndex b){ 45 | 46 | QModelIndex index = model->index(a.row(), 0, QModelIndex()); 47 | QModelIndex index1 = model->index(a.row(), 1, QModelIndex()); 48 | secili_kod = qPrintable(ui->tableView->model()->data(index).toString()); 49 | secili_ad = qPrintable(ui->tableView->model()->data(index1).toString()); 50 | 51 | model_ogr = new QSqlQueryModel(); 52 | QString comand = QString("SELECT ogr_no, ders_kodu, vize_not, final_not, geçme_notu FROM notlar WHERE ders_kodu = ")+secili_kod; 53 | model_ogr->setQuery(comand); 54 | model_ogr->setHeaderData(0, Qt::Horizontal, tr("ogr_no")); 55 | model_ogr->setHeaderData(1, Qt::Horizontal, tr("ders_kodu")); 56 | model_ogr->setHeaderData(2, Qt::Horizontal, tr("vize_not")); 57 | model_ogr->setHeaderData(3, Qt::Horizontal, tr("final_not")); 58 | model_ogr->setHeaderData(4, Qt::Horizontal, tr("geçme_notu")); 59 | ui->tableView_2->setModel(model_ogr); 60 | 61 | ui->lineEdit->setText(secili_kod); 62 | ui->lineEdit_2->setText(secili_ad); 63 | 64 | 65 | } 66 | 67 | // Yeni kayit 68 | void DersIslemleri::on_pushButton_clicked() 69 | { 70 | 71 | if(ui->lineEdit->text()=="" || ui->lineEdit_2->text()==""){ 72 | QMessageBox messageBox; 73 | messageBox.critical(0,"HATA!","Gerekli Alanları Doldurunuz!"); 74 | 75 | return; 76 | } 77 | 78 | QSqlQuery query; 79 | query.prepare("INSERT INTO dersler(ders_kodu, ders_adi) " 80 | "VALUES (?, ?)"); 81 | 82 | query.bindValue(0, ui->lineEdit->text()); 83 | query.bindValue(1, ui->lineEdit_2->text()); 84 | 85 | if(query.exec()==1){ 86 | 87 | model = new QSqlQueryModel(); 88 | model->setQuery("SELECT ders_kodu, ders_adi FROM dersler"); 89 | model->setHeaderData(0, Qt::Horizontal, tr("ders_kodu")); 90 | model->setHeaderData(1, Qt::Horizontal, tr("ders_adi")); 91 | ui->tableView->setModel(model); 92 | 93 | QItemSelectionModel *sm = ui->tableView->selectionModel(); 94 | connect(sm, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), 95 | this, SLOT(selected(QModelIndex,QModelIndex))); 96 | 97 | QMessageBox messageBox; 98 | messageBox.information(0,"Başarılı!","Ders ekleme başarılı."); 99 | 100 | } 101 | 102 | else{ 103 | QMessageBox messageBox; 104 | messageBox.information(0,"HATA!","Bu kodda başka bir ders vardır. Farklı kodda ders ekleyiniz!"); 105 | 106 | ui->lineEdit->setText(secili_kod); 107 | ui->lineEdit_2->setText(secili_ad); 108 | } 109 | 110 | ui->lineEdit->setText(""); 111 | ui->lineEdit_2->setText(""); 112 | 113 | } 114 | 115 | // Guncelle 116 | void DersIslemleri::on_pushButton_2_clicked() 117 | { 118 | 119 | if(ui->lineEdit->text()=="" || ui->lineEdit_2->text()==""){ 120 | QMessageBox messageBox; 121 | messageBox.critical(0,"HATA!","Gerekli Alanları Doldurunuz!"); 122 | 123 | ui->lineEdit->setText(secili_kod); 124 | ui->lineEdit_2->setText(secili_ad); 125 | 126 | return; 127 | } 128 | 129 | QSqlQuery query; 130 | 131 | query.prepare("UPDATE dersler SET ders_kodu = ?, ders_adi = ? WHERE ders_kodu = ?"); 132 | query.bindValue(0, ui->lineEdit->text()); 133 | query.bindValue(1, ui->lineEdit_2->text()); 134 | query.bindValue(2, secili_kod); 135 | 136 | if(query.exec()==1){ 137 | 138 | query.prepare("UPDATE notlar SET ders_kodu = ? WHERE ders_kodu = ?"); 139 | query.bindValue(0, ui->lineEdit->text()); 140 | query.bindValue(1, secili_kod); 141 | query.exec(); 142 | 143 | model = new QSqlQueryModel(); 144 | model->setQuery("SELECT ders_kodu, ders_adi FROM dersler"); 145 | model->setHeaderData(0, Qt::Horizontal, tr("ders_kodu")); 146 | model->setHeaderData(1, Qt::Horizontal, tr("ders_adi")); 147 | ui->tableView->setModel(model); 148 | 149 | QItemSelectionModel *sm = ui->tableView->selectionModel(); 150 | connect(sm, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), 151 | this, SLOT(selected(QModelIndex,QModelIndex))); 152 | 153 | 154 | model_ogr = new QSqlQueryModel(); 155 | QString comand = QString("SELECT ogr_no, ders_kodu, vize_not, final_not, geçme_notu FROM notlar WHERE ders_kodu = ")+ui->lineEdit->text(); 156 | model_ogr->setQuery(comand); 157 | model_ogr->setHeaderData(0, Qt::Horizontal, tr("ogr_no")); 158 | model_ogr->setHeaderData(1, Qt::Horizontal, tr("ders_kodu")); 159 | model_ogr->setHeaderData(2, Qt::Horizontal, tr("vize_not")); 160 | model_ogr->setHeaderData(3, Qt::Horizontal, tr("final_not")); 161 | model_ogr->setHeaderData(4, Qt::Horizontal, tr("geçme_notu")); 162 | ui->tableView_2->setModel(model_ogr); 163 | 164 | secili_kod = ui->lineEdit->text(); 165 | secili_ad = ui->lineEdit_2->text(); 166 | 167 | QMessageBox messageBox; 168 | messageBox.information(0,"Başarılı!","Ders güncelleme başarılı."); 169 | 170 | } 171 | 172 | else{ 173 | QMessageBox messageBox; 174 | messageBox.information(0,"Hata!","Bu kodda başka bir ders vardır. Farklı kodda ders güncelleyiniz!"); 175 | } 176 | 177 | 178 | } 179 | 180 | // delete 181 | void DersIslemleri::on_pushButton_3_clicked() 182 | { 183 | 184 | if(ui->lineEdit->text()=="" || ui->lineEdit_2->text()==""){ 185 | QMessageBox messageBox; 186 | messageBox.critical(0,"HATA!","Gerekli Alanları Doldurunuz!"); 187 | 188 | ui->lineEdit->setText(secili_kod); 189 | ui->lineEdit_2->setText(secili_ad); 190 | 191 | return; 192 | } 193 | 194 | QSqlQuery query; 195 | 196 | query.prepare("SELECT ogr_no FROM notlar WHERE ders_kodu = ?"); 197 | query.bindValue(0, ui->lineEdit->text()); 198 | query.exec(); 199 | 200 | int flag=0; 201 | while (query.next()) { 202 | 203 | if(query.value(0).toString()!=""){ 204 | flag=1; 205 | } 206 | } 207 | 208 | if(flag==1){ 209 | QMessageBox messageBox; 210 | messageBox.information(0,"HATA!","Bu ders silinemez. Bu derse kayıtlı öğrenciler var!."); 211 | } 212 | 213 | else{ 214 | 215 | query.prepare("DELETE FROM dersler WHERE ders_kodu = ?"); 216 | query.bindValue(0, ui->lineEdit->text()); 217 | query.exec(); 218 | 219 | model = new QSqlQueryModel(); 220 | model->setQuery("SELECT ders_kodu, ders_adi FROM dersler"); 221 | model->setHeaderData(0, Qt::Horizontal, tr("ders_kodu")); 222 | model->setHeaderData(1, Qt::Horizontal, tr("ders_adi")); 223 | ui->tableView->setModel(model); 224 | 225 | QItemSelectionModel *sm = ui->tableView->selectionModel(); 226 | connect(sm, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), 227 | this, SLOT(selected(QModelIndex,QModelIndex))); 228 | 229 | QMessageBox messageBox; 230 | messageBox.information(0,"BASARILI!","Ders silme islemi basarili!."); 231 | } 232 | 233 | } 234 | 235 | void DersIslemleri::closeEvent(QCloseEvent *event) 236 | { 237 | 238 | QMessageBox::StandardButton resBtn = QMessageBox::question( this, "Onay", 239 | tr("Yes: Ana menüye dön\nNo: Uygulamadan ayrıl\n"), 240 | QMessageBox::No | QMessageBox::Yes, 241 | QMessageBox::Yes); 242 | 243 | if(resBtn == QMessageBox::Yes){ 244 | 245 | this->close(); 246 | MainWindow *dialog = new MainWindow(); 247 | dialog->show(); 248 | 249 | } 250 | 251 | } 252 | -------------------------------------------------------------------------------- /Odev2/Homework/dersislemleri.h: -------------------------------------------------------------------------------- 1 | #ifndef DERSISLEMLERI_H 2 | #define DERSISLEMLERI_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace Ui { 10 | class DersIslemleri; 11 | } 12 | 13 | class DersIslemleri : public QDialog 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit DersIslemleri(QWidget *parent = nullptr); 19 | ~DersIslemleri(); 20 | 21 | private slots: 22 | void selected(QModelIndex,QModelIndex); 23 | 24 | void on_pushButton_clicked(); 25 | 26 | void on_pushButton_2_clicked(); 27 | 28 | void on_pushButton_3_clicked(); 29 | 30 | void closeEvent(QCloseEvent *event); 31 | 32 | private: 33 | Ui::DersIslemleri *ui; 34 | QSqlQueryModel *model; 35 | QSqlQueryModel *model_ogr; 36 | 37 | QString secili_kod; 38 | QString secili_ad; 39 | }; 40 | 41 | #endif // DERSISLEMLERI_H 42 | -------------------------------------------------------------------------------- /Odev2/Homework/dersislemleri.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | DersIslemleri 4 | 5 | 6 | 7 | 0 8 | 0 9 | 664 10 | 525 11 | 12 | 13 | 14 | DERS İŞLEMLERİ 15 | 16 | 17 | 18 | 19 | 240 20 | 30 21 | 185 22 | 21 23 | 24 | 25 | 26 | 27 | 15 28 | 75 29 | true 30 | 31 | 32 | 33 | color: rgb(204, 0, 0); 34 | 35 | 36 | DERS İŞLEMLERİ 37 | 38 | 39 | 40 | 41 | 42 | 30 43 | 90 44 | 111 45 | 21 46 | 47 | 48 | 49 | 50 | 12 51 | 75 52 | true 53 | 54 | 55 | 56 | Tüm Dersler 57 | 58 | 59 | 60 | 61 | 62 | 30 63 | 110 64 | 281 65 | 161 66 | 67 | 68 | 69 | 70 | 71 | 72 | 30 73 | 311 74 | 411 75 | 191 76 | 77 | 78 | 79 | 80 | 81 | 82 | 30 83 | 290 84 | 261 85 | 21 86 | 87 | 88 | 89 | 90 | 12 91 | 75 92 | true 93 | 94 | 95 | 96 | Seçilen Derse Ait Öğrenciler 97 | 98 | 99 | 100 | 101 | 102 | 380 103 | 130 104 | 91 105 | 16 106 | 107 | 108 | 109 | 110 | 12 111 | 50 112 | false 113 | 114 | 115 | 116 | Ders Kodu: 117 | 118 | 119 | 120 | 121 | 122 | 380 123 | 172 124 | 91 125 | 16 126 | 127 | 128 | 129 | 130 | 12 131 | 50 132 | false 133 | 134 | 135 | 136 | Ders Adı: 137 | 138 | 139 | 140 | 141 | 142 | 480 143 | 129 144 | 113 145 | 25 146 | 147 | 148 | 149 | 150 | 151 | 152 | 480 153 | 170 154 | 113 155 | 25 156 | 157 | 158 | 159 | 160 | 161 | 162 | 360 163 | 210 164 | 83 165 | 25 166 | 167 | 168 | 169 | Yeni Kayıt 170 | 171 | 172 | 173 | 174 | 175 | 540 176 | 210 177 | 83 178 | 25 179 | 180 | 181 | 182 | Güncelle 183 | 184 | 185 | 186 | 187 | 188 | 450 189 | 250 190 | 83 191 | 25 192 | 193 | 194 | 195 | Sil 196 | 197 | 198 | 199 | 200 | 201 | 202 | -------------------------------------------------------------------------------- /Odev2/Homework/images/ders.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmetFurkanDEMIR/Visual-programming-with-Qt/85f304e8fc9beba3d48f88fb70c7693398463b05/Odev2/Homework/images/ders.jpg -------------------------------------------------------------------------------- /Odev2/Homework/images/notlar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmetFurkanDEMIR/Visual-programming-with-Qt/85f304e8fc9beba3d48f88fb70c7693398463b05/Odev2/Homework/images/notlar.jpg -------------------------------------------------------------------------------- /Odev2/Homework/images/ogr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmetFurkanDEMIR/Visual-programming-with-Qt/85f304e8fc9beba3d48f88fb70c7693398463b05/Odev2/Homework/images/ogr.jpg -------------------------------------------------------------------------------- /Odev2/Homework/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | #include 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | QApplication a(argc, argv); 8 | MainWindow w; 9 | w.show(); 10 | return a.exec(); 11 | } 12 | -------------------------------------------------------------------------------- /Odev2/Homework/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "ui_mainwindow.h" 3 | #include 4 | #include "clickablelabel.h" 5 | #include "dersislemleri.h" 6 | #include "ogrenciislemleri.h" 7 | #include "notislemleri.h" 8 | 9 | /* 10 | 11 | CREATE TABLE "dersler" ( 12 | "ders_kodu" INTEGER NOT NULL UNIQUE, 13 | "ders_adi" TEXT, 14 | PRIMARY KEY("ders_kodu") 15 | ); 16 | 17 | CREATE TABLE "notlar" ( 18 | "ogr_no" INTEGER, 19 | "ders_kodu" INTEGER, 20 | "vize_not" INTEGER, 21 | "final_not" INTEGER, 22 | "geçme_notu" INTEGER 23 | ); 24 | 25 | CREATE TABLE "öğrenci" ( 26 | "ogr_no" INTEGER NOT NULL UNIQUE, 27 | "ogr_ad" TEXT, 28 | "ogr_soyad" TEXT, 29 | PRIMARY KEY("ogr_no" AUTOINCREMENT) 30 | ); 31 | 32 | CREATE TABLE "sqlite_sequence" ( 33 | "name" , 34 | "seq" 35 | ); 36 | 37 | 38 | */ 39 | 40 | MainWindow::MainWindow(QWidget *parent) 41 | : QMainWindow(parent) 42 | , ui(new Ui::MainWindow) 43 | { 44 | ui->setupUi(this); 45 | 46 | this->setFixedSize(664, 390); 47 | this->move(382, 134); 48 | 49 | QPixmap pix1(":/Images/images/ogr.jpg"); 50 | ClickableLabel *label_ogr = new ClickableLabel(this); 51 | label_ogr->setPixmap(pix1.scaled(133,133,Qt::KeepAspectRatio)); 52 | label_ogr->move(30,110); 53 | label_ogr->setFixedWidth(161); 54 | label_ogr->setFixedHeight(161); 55 | label_ogr->show(); 56 | 57 | ClickableLabel *label_ogr_text = new ClickableLabel(this); 58 | label_ogr_text->setText(" Öğrenci İşlemleri"); 59 | label_ogr_text->move(30,270); 60 | label_ogr_text->setFixedWidth(161); 61 | label_ogr_text->setFixedHeight(31); 62 | label_ogr_text->setStyleSheet("font-weight: bold; color: black"); 63 | label_ogr_text->show(); 64 | 65 | connect(label_ogr, SIGNAL(clicked()), this, SLOT(ogrenci_islemleri())); 66 | connect(label_ogr_text, SIGNAL(clicked()), this, SLOT(ogrenci_islemleri())); 67 | 68 | 69 | 70 | QPixmap pix2(":/Images/images/ders.jpg"); 71 | ClickableLabel *label_ders = new ClickableLabel(this); 72 | label_ders->setPixmap(pix2.scaled(133,133,Qt::KeepAspectRatio)); 73 | label_ders->move(258,110); 74 | label_ders->setFixedWidth(161); 75 | label_ders->setFixedHeight(161); 76 | label_ders->show(); 77 | 78 | ClickableLabel *label_ders_text = new ClickableLabel(this); 79 | label_ders_text->setText(" Ders İşlemleri"); 80 | label_ders_text->move(258,270); 81 | label_ders_text->setFixedWidth(161); 82 | label_ders_text->setFixedHeight(31); 83 | label_ders_text->setStyleSheet("font-weight: bold; color: black"); 84 | label_ders_text->show(); 85 | 86 | connect(label_ders, SIGNAL(clicked()), this, SLOT(ders_islemleri())); 87 | connect(label_ders_text, SIGNAL(clicked()), this, SLOT(ders_islemleri())); 88 | 89 | 90 | 91 | QPixmap pix3(":/Images/images/notlar.jpg"); 92 | ClickableLabel *label_notlar = new ClickableLabel(this); 93 | label_notlar->setPixmap(pix3.scaled(150,150,Qt::KeepAspectRatio)); 94 | label_notlar->move(480,110); 95 | label_notlar->setFixedWidth(161); 96 | label_notlar->setFixedHeight(161); 97 | label_notlar->show(); 98 | 99 | ClickableLabel *label_not_text = new ClickableLabel(this); 100 | label_not_text->setText(" Not İşlemleri"); 101 | label_not_text->move(480,270); 102 | label_not_text->setFixedWidth(161); 103 | label_not_text->setFixedHeight(31); 104 | label_not_text->setStyleSheet("font-weight: bold; color: black"); 105 | label_not_text->show(); 106 | 107 | connect(label_notlar, SIGNAL(clicked()), this, SLOT(not_islemleri())); 108 | connect(label_not_text, SIGNAL(clicked()), this, SLOT(not_islemleri())); 109 | 110 | 111 | QSqlDatabase Database; 112 | Database = QSqlDatabase::addDatabase("QSQLITE"); 113 | Database.setDatabaseName("C:/Users/demir/Desktop/Homework/database.db"); 114 | 115 | if (!Database.open()) 116 | { 117 | ui->statusbar->showMessage("Error, Veri tabanına bağlanılamadı X"); 118 | } 119 | 120 | else{ 121 | ui->statusbar->showMessage("Veri tabanına bağlanıldı!"); 122 | } 123 | 124 | } 125 | 126 | MainWindow::~MainWindow() 127 | { 128 | delete ui; 129 | } 130 | 131 | void MainWindow::ogrenci_islemleri(){ 132 | 133 | hide(); 134 | OgrenciIslemleri *dialog = new OgrenciIslemleri(); 135 | dialog->show(); 136 | } 137 | 138 | void MainWindow::ders_islemleri(){ 139 | 140 | hide(); 141 | DersIslemleri *dialog = new DersIslemleri(); 142 | dialog->show(); 143 | 144 | } 145 | 146 | void MainWindow::not_islemleri(){ 147 | 148 | hide(); 149 | NotIslemleri *dialog = new NotIslemleri(); 150 | dialog->show(); 151 | } 152 | -------------------------------------------------------------------------------- /Odev2/Homework/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | 6 | QT_BEGIN_NAMESPACE 7 | namespace Ui { class MainWindow; } 8 | QT_END_NAMESPACE 9 | 10 | class MainWindow : public QMainWindow 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | MainWindow(QWidget *parent = nullptr); 16 | ~MainWindow(); 17 | 18 | private slots: 19 | void ogrenci_islemleri(); 20 | void ders_islemleri(); 21 | void not_islemleri(); 22 | 23 | private: 24 | Ui::MainWindow *ui; 25 | }; 26 | #endif // MAINWINDOW_H 27 | -------------------------------------------------------------------------------- /Odev2/Homework/mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 664 10 | 390 11 | 12 | 13 | 14 | Öğrenci Ders Otomasyonu 15 | 16 | 17 | 18 | 19 | 20 | 120 21 | 30 22 | 425 23 | 31 24 | 25 | 26 | 27 | 28 | 15 29 | 75 30 | true 31 | 32 | 33 | 34 | color: rgb(204, 0, 0); 35 | 36 | 37 | Öğrenci Ders Otomasyonuna Hoşgeldiniz ! 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Odev2/Homework/notislemleri.cpp: -------------------------------------------------------------------------------- 1 | #include "notislemleri.h" 2 | #include "ui_notislemleri.h" 3 | #include 4 | #include 5 | #include "mainwindow.h" 6 | 7 | NotIslemleri::NotIslemleri(QWidget *parent) : 8 | QDialog(parent), 9 | ui(new Ui::NotIslemleri) 10 | { 11 | ui->setupUi(this); 12 | 13 | this->setFixedSize(664, 667); 14 | ui->lineEdit_3->setValidator(new QIntValidator(-999999999, 999999999, this) ); 15 | ui->lineEdit_4->setValidator(new QIntValidator(-999999999, 999999999, this) ); 16 | 17 | model_ogr = new QSqlQueryModel(); 18 | model_ogr->setQuery("SELECT ogr_no, ogr_ad, ogr_soyad FROM öğrenci"); 19 | model_ogr->setHeaderData(0, Qt::Horizontal, tr("ogr_no")); 20 | model_ogr->setHeaderData(1, Qt::Horizontal, tr("ogr_ad")); 21 | model_ogr->setHeaderData(1, Qt::Horizontal, tr("ogr_soyad")); 22 | ui->tableView->setModel(model_ogr); 23 | 24 | QItemSelectionModel *sm_ogr = ui->tableView->selectionModel(); 25 | connect(sm_ogr, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), 26 | this, SLOT(selected_ogr(QModelIndex,QModelIndex))); 27 | 28 | model_ders = new QSqlQueryModel(); 29 | model_ders->setQuery("SELECT ders_kodu, ders_adi FROM dersler"); 30 | model_ders->setHeaderData(0, Qt::Horizontal, tr("ders_kodu")); 31 | model_ders->setHeaderData(1, Qt::Horizontal, tr("ders_adi")); 32 | ui->tableView_2->setModel(model_ders); 33 | 34 | QItemSelectionModel *sm_ders = ui->tableView_2->selectionModel(); 35 | connect(sm_ders, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), 36 | this, SLOT(selected_ders(QModelIndex,QModelIndex))); 37 | 38 | model_tum_ogr = new QSqlQueryModel(); 39 | model_tum_ogr->setQuery("SELECT ogr_no, ders_kodu, vize_not, final_not, geçme_notu FROM notlar"); 40 | model_tum_ogr->setHeaderData(0, Qt::Horizontal, tr("ogr_no")); 41 | model_tum_ogr->setHeaderData(1, Qt::Horizontal, tr("ders_kodu")); 42 | model_tum_ogr->setHeaderData(2, Qt::Horizontal, tr("vize_not")); 43 | model_tum_ogr->setHeaderData(3, Qt::Horizontal, tr("final_not")); 44 | model_tum_ogr->setHeaderData(4, Qt::Horizontal, tr("geçme_notu")); 45 | ui->tableView_3->setModel(model_tum_ogr); 46 | } 47 | 48 | NotIslemleri::~NotIslemleri() 49 | { 50 | delete ui; 51 | } 52 | 53 | // ders kayit ekle 54 | void NotIslemleri::on_pushButton_clicked() 55 | { 56 | 57 | if(ui->lineEdit->text()=="" || ui->lineEdit_2->text()=="" || ui->lineEdit_3->text()=="" || ui->lineEdit_4->text()==""){ 58 | QMessageBox messageBox; 59 | messageBox.critical(0,"HATA!","Gerekli Alanları Doldurunuz!"); 60 | 61 | return; 62 | } 63 | 64 | QSqlQuery query; 65 | query.prepare("INSERT INTO notlar(ogr_no, ders_kodu, vize_not, final_not, geçme_notu) " 66 | "VALUES (?, ?, ?, ?, ?)"); 67 | 68 | query.bindValue(0, ui->lineEdit->text()); 69 | query.bindValue(1, ui->lineEdit_2->text()); 70 | query.bindValue(2, ui->lineEdit_3->text()); 71 | query.bindValue(3, ui->lineEdit_4->text()); 72 | int gecme = ui->lineEdit_3->text().toInt()*0.40 + ui->lineEdit_4->text().toInt()*0.60; 73 | query.bindValue(4, gecme); 74 | query.exec(); 75 | 76 | model_tum_ogr = new QSqlQueryModel(); 77 | model_tum_ogr->setQuery("SELECT ogr_no, ders_kodu, vize_not, final_not, geçme_notu FROM notlar"); 78 | model_tum_ogr->setHeaderData(0, Qt::Horizontal, tr("ogr_no")); 79 | model_tum_ogr->setHeaderData(1, Qt::Horizontal, tr("ders_kodu")); 80 | model_tum_ogr->setHeaderData(2, Qt::Horizontal, tr("vize_not")); 81 | model_tum_ogr->setHeaderData(3, Qt::Horizontal, tr("final_not")); 82 | model_tum_ogr->setHeaderData(4, Qt::Horizontal, tr("geçme_notu")); 83 | ui->tableView_3->setModel(model_tum_ogr); 84 | 85 | QMessageBox messageBox; 86 | messageBox.information(0,"Başarılı!","Ders Kayit Ekleme başarılı."); 87 | 88 | } 89 | 90 | void NotIslemleri::selected_ogr(QModelIndex a,QModelIndex b){ 91 | 92 | QModelIndex index = model_ogr->index(a.row(), 0, QModelIndex()); 93 | secili_no = qPrintable(ui->tableView->model()->data(index).toString()); 94 | 95 | 96 | ui->lineEdit->setText(secili_no); 97 | 98 | } 99 | 100 | void NotIslemleri::selected_ders(QModelIndex a,QModelIndex b){ 101 | 102 | QModelIndex index = model_ders->index(a.row(), 0, QModelIndex()); 103 | secili_kod = qPrintable(ui->tableView_2->model()->data(index).toString()); 104 | 105 | ui->lineEdit_2->setText(secili_kod); 106 | 107 | } 108 | 109 | void NotIslemleri::closeEvent(QCloseEvent *event) 110 | { 111 | 112 | QMessageBox::StandardButton resBtn = QMessageBox::question( this, "Onay", 113 | tr("Yes: Ana menüye dön\nNo: Uygulamadan ayrıl\n"), 114 | QMessageBox::No | QMessageBox::Yes, 115 | QMessageBox::Yes); 116 | 117 | if(resBtn == QMessageBox::Yes){ 118 | 119 | this->close(); 120 | MainWindow *dialog = new MainWindow(); 121 | dialog->show(); 122 | 123 | } 124 | 125 | } 126 | -------------------------------------------------------------------------------- /Odev2/Homework/notislemleri.h: -------------------------------------------------------------------------------- 1 | #ifndef NOTISLEMLERI_H 2 | #define NOTISLEMLERI_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class NotIslemleri; 9 | } 10 | 11 | class NotIslemleri : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit NotIslemleri(QWidget *parent = nullptr); 17 | ~NotIslemleri(); 18 | 19 | private slots: 20 | void on_pushButton_clicked(); 21 | void selected_ogr(QModelIndex a,QModelIndex b); 22 | void selected_ders(QModelIndex a,QModelIndex b); 23 | void closeEvent(QCloseEvent *event); 24 | 25 | private: 26 | Ui::NotIslemleri *ui; 27 | QSqlQueryModel *model_ogr; 28 | QSqlQueryModel *model_ders; 29 | QSqlQueryModel *model_tum_ogr; 30 | 31 | QString secili_no; 32 | QString secili_kod; 33 | }; 34 | 35 | #endif // NOTISLEMLERI_H 36 | -------------------------------------------------------------------------------- /Odev2/Homework/notislemleri.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | NotIslemleri 4 | 5 | 6 | 7 | 0 8 | 0 9 | 664 10 | 667 11 | 12 | 13 | 14 | NOT İŞLEMLERİ 15 | 16 | 17 | 18 | 19 | 245 20 | 20 21 | 171 22 | 21 23 | 24 | 25 | 26 | 27 | 15 28 | 75 29 | true 30 | 31 | 32 | 33 | color: rgb(204, 0, 0); 34 | 35 | 36 | NOT İŞLEMLERİ 37 | 38 | 39 | 40 | 41 | 42 | 360 43 | 100 44 | 281 45 | 161 46 | 47 | 48 | 49 | 50 | 51 | 52 | 360 53 | 80 54 | 111 55 | 21 56 | 57 | 58 | 59 | 60 | 12 61 | 75 62 | true 63 | 64 | 65 | 66 | Tüm Dersler 67 | 68 | 69 | 70 | 71 | 72 | 20 73 | 80 74 | 141 75 | 21 76 | 77 | 78 | 79 | 80 | 12 81 | 75 82 | true 83 | 84 | 85 | 86 | Tüm Öğrenciler 87 | 88 | 89 | 90 | 91 | 92 | 20 93 | 100 94 | 281 95 | 161 96 | 97 | 98 | 99 | 100 | 101 | 102 | 12 103 | 460 104 | 641 105 | 191 106 | 107 | 108 | 109 | 110 | 111 | 112 | 210 113 | 439 114 | 241 115 | 21 116 | 117 | 118 | 119 | 120 | 12 121 | 75 122 | true 123 | 124 | 125 | 126 | Tüm Öğrenci Ders Kayıtları 127 | 128 | 129 | 130 | 131 | 132 | 100 133 | 300 134 | 101 135 | 21 136 | 137 | 138 | 139 | 140 | 12 141 | 142 | 143 | 144 | Öğrenci No: 145 | 146 | 147 | 148 | 149 | 150 | 100 151 | 330 152 | 91 153 | 21 154 | 155 | 156 | 157 | 158 | 12 159 | 160 | 161 | 162 | Ders Kodu: 163 | 164 | 165 | 166 | 167 | 168 | 350 169 | 300 170 | 81 171 | 21 172 | 173 | 174 | 175 | 176 | 12 177 | 178 | 179 | 180 | Vize Not: 181 | 182 | 183 | 184 | 185 | 186 | 350 187 | 330 188 | 81 189 | 21 190 | 191 | 192 | 193 | 194 | 12 195 | 196 | 197 | 198 | Final Not: 199 | 200 | 201 | 202 | 203 | false 204 | 205 | 206 | 207 | 200 208 | 300 209 | 113 210 | 25 211 | 212 | 213 | 214 | 215 | 216 | false 217 | 218 | 219 | 220 | 200 221 | 330 222 | 113 223 | 25 224 | 225 | 226 | 227 | 228 | 229 | 230 | 430 231 | 300 232 | 113 233 | 25 234 | 235 | 236 | 237 | 238 | 239 | 240 | 430 241 | 330 242 | 113 243 | 25 244 | 245 | 246 | 247 | 248 | 249 | 250 | 270 251 | 370 252 | 121 253 | 31 254 | 255 | 256 | 257 | Ders Kayıt Ekle 258 | 259 | 260 | 261 | 262 | 263 | 264 | -------------------------------------------------------------------------------- /Odev2/Homework/ogrenciislemleri.cpp: -------------------------------------------------------------------------------- 1 | #include "ogrenciislemleri.h" 2 | #include "ui_ogrenciislemleri.h" 3 | #include 4 | #include 5 | #include "mainwindow.h" 6 | 7 | OgrenciIslemleri::OgrenciIslemleri(QWidget *parent) : 8 | QDialog(parent), 9 | ui(new Ui::OgrenciIslemleri) 10 | { 11 | ui->setupUi(this); 12 | this->setFixedSize(664, 484); 13 | 14 | model = new QSqlQueryModel(); 15 | model->setQuery("SELECT ogr_no, ogr_ad, ogr_soyad FROM öğrenci"); 16 | model->setHeaderData(0, Qt::Horizontal, tr("ogr_no")); 17 | model->setHeaderData(1, Qt::Horizontal, tr("ogr_ad")); 18 | model->setHeaderData(1, Qt::Horizontal, tr("ogr_soyad")); 19 | ui->tableView->setModel(model); 20 | 21 | QItemSelectionModel *sm = ui->tableView->selectionModel(); 22 | connect(sm, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), 23 | this, SLOT(selected(QModelIndex,QModelIndex))); 24 | } 25 | 26 | OgrenciIslemleri::~OgrenciIslemleri() 27 | { 28 | delete ui; 29 | } 30 | 31 | 32 | void OgrenciIslemleri::selected(QModelIndex a,QModelIndex b){ 33 | 34 | 35 | QModelIndex index = model->index(a.row(), 0, QModelIndex()); 36 | QModelIndex index1 = model->index(a.row(), 1, QModelIndex()); 37 | QModelIndex index2 = model->index(a.row(), 2, QModelIndex()); 38 | secili_no = qPrintable(ui->tableView->model()->data(index).toString()); 39 | secili_ad = qPrintable(ui->tableView->model()->data(index1).toString()); 40 | secili_soyad = qPrintable(ui->tableView->model()->data(index2).toString()); 41 | 42 | ui->lineEdit->setText(secili_no); 43 | ui->lineEdit_2->setText(secili_ad); 44 | ui->lineEdit_3->setText(secili_soyad); 45 | 46 | } 47 | 48 | // yeni kayit 49 | void OgrenciIslemleri::on_pushButton_clicked() 50 | { 51 | 52 | if(ui->lineEdit_2->text()=="" || ui->lineEdit_3->text()==""){ 53 | QMessageBox messageBox; 54 | messageBox.critical(0,"HATA!","Gerekli Alanları Doldurunuz!"); 55 | 56 | return; 57 | } 58 | 59 | QSqlQuery query; 60 | query.prepare("INSERT INTO öğrenci(ogr_ad, ogr_soyad) " 61 | "VALUES (?, ?)"); 62 | 63 | query.bindValue(0, ui->lineEdit_2->text()); 64 | query.bindValue(1, ui->lineEdit_3->text()); 65 | query.exec(); 66 | 67 | model = new QSqlQueryModel(); 68 | model->setQuery("SELECT ogr_no, ogr_ad, ogr_soyad FROM öğrenci"); 69 | model->setHeaderData(0, Qt::Horizontal, tr("ogr_no")); 70 | model->setHeaderData(1, Qt::Horizontal, tr("ogr_ad")); 71 | model->setHeaderData(1, Qt::Horizontal, tr("ogr_soyad")); 72 | ui->tableView->setModel(model); 73 | 74 | QItemSelectionModel *sm = ui->tableView->selectionModel(); 75 | connect(sm, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), 76 | this, SLOT(selected(QModelIndex,QModelIndex))); 77 | 78 | ui->lineEdit->setText(""); 79 | ui->lineEdit_2->setText(""); 80 | ui->lineEdit_3->setText(""); 81 | 82 | QMessageBox messageBox; 83 | messageBox.information(0,"Başarılı!","Ogrenci ekleme başarılı."); 84 | } 85 | 86 | // guncelle 87 | void OgrenciIslemleri::on_pushButton_2_clicked() 88 | { 89 | 90 | if(ui->lineEdit_2->text()=="" || ui->lineEdit_3->text()==""){ 91 | QMessageBox messageBox; 92 | messageBox.critical(0,"HATA!","Gerekli Alanları Doldurunuz!"); 93 | 94 | ui->lineEdit->setText(secili_no); 95 | ui->lineEdit_2->setText(secili_ad); 96 | ui->lineEdit_3->setText(secili_soyad);; 97 | 98 | return; 99 | } 100 | 101 | QSqlQuery query; 102 | 103 | query.prepare("UPDATE öğrenci SET ogr_ad = ?, ogr_soyad = ? WHERE ogr_no = ?"); 104 | query.bindValue(0, ui->lineEdit_2->text()); 105 | query.bindValue(1, ui->lineEdit_3->text()); 106 | query.bindValue(2, secili_no); 107 | query.exec(); 108 | 109 | model = new QSqlQueryModel(); 110 | model->setQuery("SELECT ogr_no, ogr_ad, ogr_soyad FROM öğrenci"); 111 | model->setHeaderData(0, Qt::Horizontal, tr("ogr_no")); 112 | model->setHeaderData(1, Qt::Horizontal, tr("ogr_ad")); 113 | model->setHeaderData(1, Qt::Horizontal, tr("ogr_soyad")); 114 | ui->tableView->setModel(model); 115 | 116 | QItemSelectionModel *sm = ui->tableView->selectionModel(); 117 | connect(sm, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), 118 | this, SLOT(selected(QModelIndex,QModelIndex))); 119 | 120 | QMessageBox messageBox; 121 | messageBox.information(0,"Başarılı!","Ogrenci güncelleme başarılı."); 122 | 123 | } 124 | 125 | // delete 126 | void OgrenciIslemleri::on_pushButton_3_clicked() 127 | { 128 | 129 | if(ui->lineEdit_2->text()=="" || ui->lineEdit_3->text()==""){ 130 | QMessageBox messageBox; 131 | messageBox.critical(0,"HATA!","Gerekli Alanları Doldurunuz!"); 132 | 133 | ui->lineEdit->setText(secili_no); 134 | ui->lineEdit_2->setText(secili_ad); 135 | ui->lineEdit_3->setText(secili_soyad);; 136 | 137 | return; 138 | } 139 | 140 | QSqlQuery query; 141 | 142 | query.prepare("SELECT ogr_no FROM notlar WHERE ogr_no = ?"); 143 | query.bindValue(0, ui->lineEdit->text()); 144 | query.exec(); 145 | 146 | int flag=0; 147 | while (query.next()) { 148 | 149 | if(query.value(0).toString()!=""){ 150 | flag=1; 151 | } 152 | } 153 | 154 | if(flag==1){ 155 | QMessageBox messageBox; 156 | messageBox.information(0,"HATA!","Bu Ogrenci silinemez. Bu Ogrencinin üstüne tanımlanmış dersler vardır!."); 157 | } 158 | 159 | else{ 160 | 161 | query.prepare("DELETE FROM öğrenci WHERE ogr_no = ?"); 162 | query.bindValue(0, ui->lineEdit->text()); 163 | query.exec(); 164 | 165 | 166 | model = new QSqlQueryModel(); 167 | model->setQuery("SELECT ogr_no, ogr_ad, ogr_soyad FROM öğrenci"); 168 | model->setHeaderData(0, Qt::Horizontal, tr("ogr_no")); 169 | model->setHeaderData(1, Qt::Horizontal, tr("ogr_ad")); 170 | model->setHeaderData(1, Qt::Horizontal, tr("ogr_soyad")); 171 | ui->tableView->setModel(model); 172 | 173 | QItemSelectionModel *sm = ui->tableView->selectionModel(); 174 | connect(sm, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), 175 | this, SLOT(selected(QModelIndex,QModelIndex))); 176 | 177 | QMessageBox messageBox; 178 | messageBox.information(0,"Başarılı!","Ogrenci silme başarılı."); 179 | 180 | } 181 | } 182 | 183 | void OgrenciIslemleri::closeEvent(QCloseEvent *event) 184 | { 185 | 186 | QMessageBox::StandardButton resBtn = QMessageBox::question( this, "Onay", 187 | tr("Yes: Ana menüye dön\nNo: Uygulamadan ayrıl\n"), 188 | QMessageBox::No | QMessageBox::Yes, 189 | QMessageBox::Yes); 190 | 191 | if(resBtn == QMessageBox::Yes){ 192 | 193 | this->close(); 194 | MainWindow *dialog = new MainWindow(); 195 | dialog->show(); 196 | 197 | } 198 | 199 | } 200 | -------------------------------------------------------------------------------- /Odev2/Homework/ogrenciislemleri.h: -------------------------------------------------------------------------------- 1 | #ifndef OGRENCIISLEMLERI_H 2 | #define OGRENCIISLEMLERI_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class OgrenciIslemleri; 9 | } 10 | 11 | class OgrenciIslemleri : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit OgrenciIslemleri(QWidget *parent = nullptr); 17 | ~OgrenciIslemleri(); 18 | 19 | private slots: 20 | void on_pushButton_clicked(); 21 | void selected(QModelIndex a,QModelIndex b); 22 | void on_pushButton_2_clicked(); 23 | void on_pushButton_3_clicked(); 24 | void closeEvent(QCloseEvent *event); 25 | 26 | private: 27 | Ui::OgrenciIslemleri *ui; 28 | QSqlQueryModel *model; 29 | 30 | QString secili_ad; 31 | QString secili_soyad; 32 | QString secili_no; 33 | }; 34 | 35 | #endif // OGRENCIISLEMLERI_H 36 | -------------------------------------------------------------------------------- /Odev2/Homework/ogrenciislemleri.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | OgrenciIslemleri 4 | 5 | 6 | 7 | 0 8 | 0 9 | 664 10 | 484 11 | 12 | 13 | 14 | ÖĞRENCİ İŞLEMLERİ 15 | 16 | 17 | 18 | 19 | 225 20 | 20 21 | 213 22 | 24 23 | 24 | 25 | 26 | 27 | 15 28 | 75 29 | true 30 | 31 | 32 | 33 | color: rgb(204, 0, 0); 34 | 35 | 36 | ÖĞRENCİ İŞLEMLERİ 37 | 38 | 39 | 40 | 41 | 42 | 20 43 | 100 44 | 271 45 | 351 46 | 47 | 48 | 49 | 50 | 51 | 52 | 20 53 | 80 54 | 141 55 | 21 56 | 57 | 58 | 59 | 60 | 12 61 | 75 62 | true 63 | 64 | 65 | 66 | Tüm Öğrenciler 67 | 68 | 69 | 70 | 71 | 72 | 340 73 | 162 74 | 101 75 | 21 76 | 77 | 78 | 79 | 80 | 12 81 | 82 | 83 | 84 | Öğrenci No: 85 | 86 | 87 | 88 | 89 | 90 | 340 91 | 200 92 | 101 93 | 21 94 | 95 | 96 | 97 | 98 | 12 99 | 100 | 101 | 102 | Öğrenci Ad: 103 | 104 | 105 | 106 | 107 | 108 | 340 109 | 240 110 | 121 111 | 21 112 | 113 | 114 | 115 | 116 | 12 117 | 118 | 119 | 120 | Öğrenci Soyad: 121 | 122 | 123 | 124 | 125 | false 126 | 127 | 128 | 129 | 480 130 | 160 131 | 121 132 | 25 133 | 134 | 135 | 136 | 137 | 138 | 139 | 480 140 | 200 141 | 121 142 | 25 143 | 144 | 145 | 146 | 147 | 148 | 149 | 480 150 | 240 151 | 121 152 | 25 153 | 154 | 155 | 156 | 157 | 158 | 159 | 520 160 | 310 161 | 83 162 | 25 163 | 164 | 165 | 166 | Güncelle 167 | 168 | 169 | 170 | 171 | 172 | 340 173 | 310 174 | 83 175 | 25 176 | 177 | 178 | 179 | Yeni Kayıt 180 | 181 | 182 | 183 | 184 | 185 | 430 186 | 350 187 | 83 188 | 25 189 | 190 | 191 | 192 | Sil 193 | 194 | 195 | 196 | 197 | 198 | 199 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](https://img.shields.io/badge/C%2B%2B-00599C?style=for-the-badge&logo=c%2B%2B&logoColor=white) 2 | 3 | # Visual programming with Qt 4 | 5 |

6 | 7 |

8 | 9 | **-** My code repository where I share my necmettin erbakan university computer engineering 2nd year Visual programming course homework, projects and exams. 10 | 11 | * [x] [Practice Exam 1](/UygulamaSinavi1/) 12 | 13 | * [x] [Practice Exam 2](/UygulamaSinavi2/) 14 | 15 | * [x] [Homework 1](/Odev1/) 16 | 17 | * [x] [Homework 2](/Odev1/) 18 | -------------------------------------------------------------------------------- /UygulamaSinavi1/Quiz.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++11 6 | 7 | # The following define makes your compiler emit warnings if you use 8 | # any Qt feature that has been marked deprecated (the exact warnings 9 | # depend on your compiler). Please consult the documentation of the 10 | # deprecated API in order to know how to port your code away from it. 11 | DEFINES += QT_DEPRECATED_WARNINGS 12 | 13 | # You can also make your code fail to compile if it uses deprecated APIs. 14 | # In order to do so, uncomment the following line. 15 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 16 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 17 | 18 | SOURCES += \ 19 | main.cpp \ 20 | mainwindow.cpp 21 | 22 | HEADERS += \ 23 | mainwindow.h 24 | 25 | FORMS += \ 26 | mainwindow.ui 27 | 28 | # Default rules for deployment. 29 | qnx: target.path = /tmp/$${TARGET}/bin 30 | else: unix:!android: target.path = /opt/$${TARGET}/bin 31 | !isEmpty(target.path): INSTALLS += target 32 | -------------------------------------------------------------------------------- /UygulamaSinavi1/Quiz.pro.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | EnvironmentId 7 | {3e53ee9c-f593-4213-a74c-8e3cd7cba145} 8 | 9 | 10 | ProjectExplorer.Project.ActiveTarget 11 | 0 12 | 13 | 14 | ProjectExplorer.Project.EditorSettings 15 | 16 | true 17 | false 18 | true 19 | 20 | Cpp 21 | 22 | CppGlobal 23 | 24 | 25 | 26 | QmlJS 27 | 28 | QmlJSGlobal 29 | 30 | 31 | 2 32 | UTF-8 33 | false 34 | 4 35 | false 36 | 80 37 | true 38 | true 39 | 1 40 | true 41 | false 42 | 0 43 | true 44 | true 45 | 0 46 | 8 47 | true 48 | 1 49 | true 50 | true 51 | true 52 | false 53 | 54 | 55 | 56 | ProjectExplorer.Project.PluginSettings 57 | 58 | 59 | true 60 | 61 | 62 | 63 | ProjectExplorer.Project.Target.0 64 | 65 | Desktop Qt 5.9.9 GCC 64bit 66 | Desktop Qt 5.9.9 GCC 64bit 67 | qt.qt5.599.gcc_64_kit 68 | 0 69 | 0 70 | 0 71 | 72 | /home/demir/Desktop/Quiz/build-Quiz-Desktop_Qt_5_9_9_GCC_64bit-Debug 73 | 74 | 75 | true 76 | QtProjectManager.QMakeBuildStep 77 | true 78 | 79 | false 80 | false 81 | false 82 | 83 | 84 | true 85 | Qt4ProjectManager.MakeStep 86 | 87 | false 88 | 89 | 90 | false 91 | 92 | 2 93 | Build 94 | Build 95 | ProjectExplorer.BuildSteps.Build 96 | 97 | 98 | 99 | true 100 | Qt4ProjectManager.MakeStep 101 | 102 | true 103 | clean 104 | 105 | false 106 | 107 | 1 108 | Clean 109 | Clean 110 | ProjectExplorer.BuildSteps.Clean 111 | 112 | 2 113 | false 114 | 115 | Debug 116 | Qt4ProjectManager.Qt4BuildConfiguration 117 | 2 118 | 119 | 120 | /home/demir/Desktop/Quiz/build-Quiz-Desktop_Qt_5_9_9_GCC_64bit-Release 121 | 122 | 123 | true 124 | QtProjectManager.QMakeBuildStep 125 | false 126 | 127 | false 128 | false 129 | false 130 | 131 | 132 | true 133 | Qt4ProjectManager.MakeStep 134 | 135 | false 136 | 137 | 138 | false 139 | 140 | 2 141 | Build 142 | Build 143 | ProjectExplorer.BuildSteps.Build 144 | 145 | 146 | 147 | true 148 | Qt4ProjectManager.MakeStep 149 | 150 | true 151 | clean 152 | 153 | false 154 | 155 | 1 156 | Clean 157 | Clean 158 | ProjectExplorer.BuildSteps.Clean 159 | 160 | 2 161 | false 162 | 163 | Release 164 | Qt4ProjectManager.Qt4BuildConfiguration 165 | 0 166 | 167 | 168 | /home/demir/Desktop/Quiz/build-Quiz-Desktop_Qt_5_9_9_GCC_64bit-Profile 169 | 170 | 171 | true 172 | QtProjectManager.QMakeBuildStep 173 | true 174 | 175 | false 176 | true 177 | false 178 | 179 | 180 | true 181 | Qt4ProjectManager.MakeStep 182 | 183 | false 184 | 185 | 186 | false 187 | 188 | 2 189 | Build 190 | Build 191 | ProjectExplorer.BuildSteps.Build 192 | 193 | 194 | 195 | true 196 | Qt4ProjectManager.MakeStep 197 | 198 | true 199 | clean 200 | 201 | false 202 | 203 | 1 204 | Clean 205 | Clean 206 | ProjectExplorer.BuildSteps.Clean 207 | 208 | 2 209 | false 210 | 211 | Profile 212 | Qt4ProjectManager.Qt4BuildConfiguration 213 | 0 214 | 215 | 3 216 | 217 | 218 | 0 219 | Deploy 220 | Deploy 221 | ProjectExplorer.BuildSteps.Deploy 222 | 223 | 1 224 | ProjectExplorer.DefaultDeployConfiguration 225 | 226 | 1 227 | 228 | 229 | dwarf 230 | 231 | cpu-cycles 232 | 233 | 234 | 250 235 | 236 | -e 237 | cpu-cycles 238 | --call-graph 239 | dwarf,4096 240 | -F 241 | 250 242 | 243 | -F 244 | true 245 | 4096 246 | false 247 | false 248 | 1000 249 | 250 | true 251 | 252 | false 253 | false 254 | false 255 | false 256 | true 257 | 0.01 258 | 10 259 | true 260 | kcachegrind 261 | 1 262 | 25 263 | 264 | 1 265 | true 266 | false 267 | true 268 | valgrind 269 | 270 | 0 271 | 1 272 | 2 273 | 3 274 | 4 275 | 5 276 | 6 277 | 7 278 | 8 279 | 9 280 | 10 281 | 11 282 | 12 283 | 13 284 | 14 285 | 286 | 2 287 | 288 | Qt4ProjectManager.Qt4RunConfiguration:/home/demir/Downloads/19010011019/Quiz.pro 289 | /home/demir/Downloads/19010011019/Quiz.pro 290 | 291 | false 292 | 293 | false 294 | true 295 | true 296 | false 297 | false 298 | true 299 | 300 | /home/demir/Desktop/Quiz/build-Quiz-Desktop_Qt_5_9_9_GCC_64bit-Debug 301 | 302 | 1 303 | 304 | 305 | 306 | ProjectExplorer.Project.TargetCount 307 | 1 308 | 309 | 310 | ProjectExplorer.Project.Updater.FileVersion 311 | 22 312 | 313 | 314 | Version 315 | 22 316 | 317 | 318 | -------------------------------------------------------------------------------- /UygulamaSinavi1/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | #include 4 | 5 | 6 | int oyuncu1=-99; 7 | int oyuncu2=-99; 8 | 9 | int main(int argc, char *argv[]) 10 | { 11 | QApplication a(argc, argv); 12 | MainWindow w; 13 | w.show(); 14 | return a.exec(); 15 | } 16 | -------------------------------------------------------------------------------- /UygulamaSinavi1/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "ui_mainwindow.h" 3 | 4 | MainWindow::MainWindow(QWidget *parent) 5 | : QMainWindow(parent) 6 | , ui(new Ui::MainWindow) 7 | { 8 | ui->setupUi(this); 9 | 10 | foreach (QAbstractButton *temp, ui->buttonGroup->buttons()) { 11 | 12 | connect(temp, SIGNAL(clicked()), SLOT(enable())); 13 | 14 | } 15 | 16 | } 17 | 18 | MainWindow::~MainWindow() 19 | { 20 | delete ui; 21 | } 22 | 23 | 24 | void MainWindow::on_spinBox_valueChanged(int arg1) 25 | { 26 | ui->label_3->setText("0 ile "+ QString::number(arg1)+" arasında sayı tahmin oyunu basliyor..."); 27 | } 28 | 29 | 30 | void MainWindow::on_pushButton_clicked() 31 | { 32 | ran = rand() % ui->spinBox->value(); 33 | ui->label_6->setText(QString::number(ran)); 34 | 35 | } 36 | 37 | void MainWindow::enable(){ 38 | 39 | QObject *ob = sender(); 40 | 41 | foreach(QAbstractButton *btn, ui->buttonGroup->buttons()){ 42 | 43 | if(ob==btn){ 44 | 45 | if(btn->text()=="Tek oyunculu"){ 46 | ui->listWidget_2->setEnabled(false); 47 | ui->listWidget->setEnabled(true); 48 | } 49 | 50 | else{ 51 | ui->listWidget->setEnabled(true); 52 | ui->listWidget_2->setEnabled(true); 53 | } 54 | 55 | } 56 | 57 | } 58 | 59 | 60 | } 61 | 62 | void MainWindow::tahmin(int rn, int max, int id, QListWidget *widget){ 63 | 64 | int temp; 65 | int count = 0; 66 | 67 | for (;;) { 68 | 69 | count+=1; 70 | temp = rand() % max; 71 | widget->addItem(QString::number(temp)); 72 | 73 | if(temp==rn){ 74 | 75 | widget->addItem("Deneme sayisi: "+QString::number(count)); 76 | 77 | if(id==1){ 78 | 79 | oyuncu1 = count; 80 | } 81 | else if(id==2){ 82 | oyuncu2 = count; 83 | } 84 | 85 | return; 86 | 87 | } 88 | 89 | } 90 | 91 | } 92 | 93 | void MainWindow::on_pushButton_2_clicked() 94 | { 95 | 96 | ui->listWidget->clear(); 97 | ui->listWidget_2->clear(); 98 | oyuncu1=-99; 99 | oyuncu2=-99; 100 | 101 | if(ran==-1){ 102 | QMessageBox *mg; 103 | mg->critical(0,"HATA!!","Lutfen rastgele bir sayi belirleyiniz!!"); 104 | 105 | return; 106 | } 107 | 108 | else if(!ui->listWidget->isEnabled() && !(ui->listWidget_2->isEnabled())){ 109 | 110 | QMessageBox *mg; 111 | mg->critical(0,"HATA!!","Lutfen oyuncu sayisini giriniz!!"); 112 | 113 | return; 114 | 115 | } 116 | 117 | else if(ui->listWidget->isEnabled() && !(ui->listWidget_2->isEnabled())){ 118 | 119 | std::thread oyuncu1(tahmin,ran,ui->spinBox->value(),1, ui->listWidget); 120 | oyuncu1.detach(); 121 | oyuncu2=-88; 122 | 123 | } 124 | 125 | else if(ui->listWidget->isEnabled() && ui->listWidget_2->isEnabled()){ 126 | 127 | std::thread oyuncu1(tahmin,ran,ui->spinBox->value(),1, ui->listWidget); 128 | oyuncu1.detach(); 129 | 130 | std::thread oyuncu2(tahmin,ran,ui->spinBox->value(),2, ui->listWidget_2); 131 | oyuncu2.detach(); 132 | 133 | } 134 | 135 | for (;;) { 136 | 137 | if(oyuncu1!=-99 && oyuncu2!=-99){ 138 | 139 | if(oyuncu2==-88 || oyuncu1information(0,"Tebrikler!!","Tebrikler Oyuncu 1, "+QString::number(oyuncu1)+" denemede KAZANDINIZ!!!!!"); 143 | break; 144 | } 145 | 146 | else{ 147 | 148 | QMessageBox *mg; 149 | mg->information(0,"Tebrikler!!","Tebrikler Oyuncu 2, "+QString::number(oyuncu2)+" denemede KAZANDINIZ!!!!!"); 150 | break; 151 | 152 | } 153 | 154 | } 155 | } 156 | 157 | } 158 | -------------------------------------------------------------------------------- /UygulamaSinavi1/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | extern int oyuncu1; 11 | extern int oyuncu2; 12 | 13 | QT_BEGIN_NAMESPACE 14 | namespace Ui { class MainWindow; } 15 | QT_END_NAMESPACE 16 | 17 | class MainWindow : public QMainWindow 18 | { 19 | Q_OBJECT 20 | 21 | public: 22 | MainWindow(QWidget *parent = nullptr); 23 | ~MainWindow(); 24 | 25 | private slots: 26 | 27 | 28 | void on_spinBox_valueChanged(int arg1); 29 | 30 | void on_pushButton_clicked(); 31 | 32 | void enable(); 33 | 34 | void on_pushButton_2_clicked(); 35 | static void tahmin(int rn, int max, int id, QListWidget * widget); 36 | 37 | private: 38 | Ui::MainWindow *ui; 39 | int ran=-1; 40 | }; 41 | #endif // MAINWINDOW_H 42 | -------------------------------------------------------------------------------- /UygulamaSinavi1/mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 417 10 | 605 11 | 12 | 13 | 14 | Sayi Tahmin Oyunu 15 | 16 | 17 | 18 | 19 | 20 | 120 21 | 20 22 | 71 23 | 16 24 | 25 | 26 | 27 | Ust deger 28 | 29 | 30 | 31 | 32 | 33 | 120 34 | 40 35 | 61 36 | 25 37 | 38 | 39 | 40 | 10 41 | 42 | 43 | 1000 44 | 45 | 46 | 47 | 48 | 49 | 190 50 | 22 51 | 131 52 | 43 53 | 54 | 55 | 56 | Rastgele sayi uret 57 | 58 | 59 | 60 | 61 | 62 | 130 63 | 90 64 | 121 65 | 31 66 | 67 | 68 | 69 | 70 | 14 71 | 72 | 73 | 74 | Uretilen sayi : 75 | 76 | 77 | 78 | 79 | 80 | 50 81 | 130 82 | 321 83 | 41 84 | 85 | 86 | 87 | 88 | 11 89 | true 90 | 91 | 92 | 93 | 0 ile 10 arasında sayı tahmin oyunu basliyor... 94 | 95 | 96 | 97 | 98 | 99 | 140 100 | 180 101 | 151 102 | 121 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 204 112 | 0 113 | 0 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 204 123 | 0 124 | 0 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 255 134 | 255 135 | 255 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | Oyuncu 144 | 145 | 146 | 147 | 148 | 10 149 | 30 150 | 111 151 | 22 152 | 153 | 154 | 155 | Tek oyunculu 156 | 157 | 158 | buttonGroup 159 | 160 | 161 | 162 | 163 | 164 | 10 165 | 70 166 | 111 167 | 22 168 | 169 | 170 | 171 | Iki oyunculu 172 | 173 | 174 | buttonGroup 175 | 176 | 177 | 178 | 179 | 180 | false 181 | 182 | 183 | 184 | 27 185 | 340 186 | 161 187 | 192 188 | 189 | 190 | 191 | 192 | 193 | false 194 | 195 | 196 | 197 | 230 198 | 340 199 | 161 200 | 192 201 | 202 | 203 | 204 | 205 | 206 | 207 | 70 208 | 320 209 | 58 210 | 16 211 | 212 | 213 | 214 | Oyuncu 1 215 | 216 | 217 | 218 | 219 | 220 | 280 221 | 320 222 | 58 223 | 16 224 | 225 | 226 | 227 | Oyuncu 2 228 | 229 | 230 | 231 | 232 | 233 | 140 234 | 550 235 | 141 236 | 41 237 | 238 | 239 | 240 | Yarışmayı baslat 241 | 242 | 243 | 244 | 245 | 246 | 250 247 | 90 248 | 58 249 | 31 250 | 251 | 252 | 253 | 254 | 14 255 | 256 | 257 | 258 | color: rgb(204, 0, 0); 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | -------------------------------------------------------------------------------- /UygulamaSinavi2/Quiz.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | QT += sql 3 | 4 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 5 | 6 | CONFIG += c++11 7 | 8 | # You can make your code fail to compile if it uses deprecated APIs. 9 | # In order to do so, uncomment the following line. 10 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 11 | 12 | SOURCES += \ 13 | main.cpp \ 14 | mainwindow.cpp 15 | 16 | HEADERS += \ 17 | mainwindow.h 18 | 19 | FORMS += \ 20 | mainwindow.ui 21 | 22 | # Default rules for deployment. 23 | qnx: target.path = /tmp/$${TARGET}/bin 24 | else: unix:!android: target.path = /opt/$${TARGET}/bin 25 | !isEmpty(target.path): INSTALLS += target 26 | -------------------------------------------------------------------------------- /UygulamaSinavi2/Quiz.pro.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | EnvironmentId 7 | {0e1ded07-4e7c-4ad6-a6dd-b1dd9a52f828} 8 | 9 | 10 | ProjectExplorer.Project.ActiveTarget 11 | 0 12 | 13 | 14 | ProjectExplorer.Project.EditorSettings 15 | 16 | true 17 | false 18 | true 19 | 20 | Cpp 21 | 22 | CppGlobal 23 | 24 | 25 | 26 | QmlJS 27 | 28 | QmlJSGlobal 29 | 30 | 31 | 2 32 | UTF-8 33 | false 34 | 4 35 | false 36 | 80 37 | true 38 | true 39 | 1 40 | false 41 | true 42 | false 43 | 0 44 | true 45 | true 46 | 0 47 | 8 48 | true 49 | false 50 | 1 51 | true 52 | true 53 | true 54 | *.md, *.MD, Makefile 55 | false 56 | true 57 | 58 | 59 | 60 | ProjectExplorer.Project.PluginSettings 61 | 62 | 63 | true 64 | false 65 | true 66 | true 67 | true 68 | true 69 | 70 | 71 | 0 72 | true 73 | 74 | true 75 | Builtin.BuildSystem 76 | 77 | true 78 | true 79 | Builtin.DefaultTidyAndClazy 80 | 4 81 | 82 | 83 | 84 | true 85 | 86 | 87 | 88 | 89 | ProjectExplorer.Project.Target.0 90 | 91 | Desktop 92 | Desktop Qt 6.1.0 GCC 64bit 93 | Desktop Qt 6.1.0 GCC 64bit 94 | qt.qt6.610.gcc_64_kit 95 | 0 96 | 0 97 | 0 98 | 99 | 0 100 | /home/demir/build-Quiz-Desktop_Qt_6_1_0_GCC_64bit-Debug 101 | /home/demir/build-Quiz-Desktop_Qt_6_1_0_GCC_64bit-Debug 102 | 103 | 104 | true 105 | QtProjectManager.QMakeBuildStep 106 | false 107 | 108 | 109 | 110 | true 111 | Qt4ProjectManager.MakeStep 112 | 113 | 2 114 | Build 115 | Build 116 | ProjectExplorer.BuildSteps.Build 117 | 118 | 119 | 120 | true 121 | Qt4ProjectManager.MakeStep 122 | clean 123 | 124 | 1 125 | Clean 126 | Clean 127 | ProjectExplorer.BuildSteps.Clean 128 | 129 | 2 130 | false 131 | 132 | 133 | Debug 134 | Qt4ProjectManager.Qt4BuildConfiguration 135 | 2 136 | 137 | 138 | /home/demir/build-Quiz-Desktop_Qt_6_1_0_GCC_64bit-Release 139 | /home/demir/build-Quiz-Desktop_Qt_6_1_0_GCC_64bit-Release 140 | 141 | 142 | true 143 | QtProjectManager.QMakeBuildStep 144 | false 145 | 146 | 147 | 148 | true 149 | Qt4ProjectManager.MakeStep 150 | 151 | 2 152 | Build 153 | Build 154 | ProjectExplorer.BuildSteps.Build 155 | 156 | 157 | 158 | true 159 | Qt4ProjectManager.MakeStep 160 | clean 161 | 162 | 1 163 | Clean 164 | Clean 165 | ProjectExplorer.BuildSteps.Clean 166 | 167 | 2 168 | false 169 | 170 | 171 | Release 172 | Qt4ProjectManager.Qt4BuildConfiguration 173 | 0 174 | 0 175 | 176 | 177 | 0 178 | /home/demir/build-Quiz-Desktop_Qt_6_1_0_GCC_64bit-Profile 179 | /home/demir/build-Quiz-Desktop_Qt_6_1_0_GCC_64bit-Profile 180 | 181 | 182 | true 183 | QtProjectManager.QMakeBuildStep 184 | false 185 | 186 | 187 | 188 | true 189 | Qt4ProjectManager.MakeStep 190 | 191 | 2 192 | Build 193 | Build 194 | ProjectExplorer.BuildSteps.Build 195 | 196 | 197 | 198 | true 199 | Qt4ProjectManager.MakeStep 200 | clean 201 | 202 | 1 203 | Clean 204 | Clean 205 | ProjectExplorer.BuildSteps.Clean 206 | 207 | 2 208 | false 209 | 210 | 211 | Profile 212 | Qt4ProjectManager.Qt4BuildConfiguration 213 | 0 214 | 0 215 | 0 216 | 217 | 3 218 | 219 | 220 | 0 221 | Deploy 222 | Deploy 223 | ProjectExplorer.BuildSteps.Deploy 224 | 225 | 1 226 | 227 | false 228 | ProjectExplorer.DefaultDeployConfiguration 229 | 230 | 1 231 | 232 | dwarf 233 | 234 | cpu-cycles 235 | 236 | 237 | 250 238 | 239 | -e 240 | cpu-cycles 241 | --call-graph 242 | dwarf,4096 243 | -F 244 | 250 245 | 246 | -F 247 | true 248 | 4096 249 | false 250 | false 251 | 1000 252 | 253 | true 254 | 255 | 256 | false 257 | false 258 | false 259 | false 260 | true 261 | 0.01 262 | 10 263 | true 264 | kcachegrind 265 | 1 266 | 267 | 25 268 | 269 | 1 270 | true 271 | false 272 | true 273 | 274 | valgrind 275 | 276 | 0 277 | 1 278 | 2 279 | 3 280 | 4 281 | 5 282 | 6 283 | 7 284 | 8 285 | 9 286 | 10 287 | 11 288 | 12 289 | 13 290 | 14 291 | 292 | 293 | 2 294 | 295 | Qt4ProjectManager.Qt4RunConfiguration:/home/demir/Quiz/Quiz.pro 296 | /home/demir/Quiz/Quiz.pro 297 | false 298 | true 299 | true 300 | false 301 | true 302 | /home/demir/build-Quiz-Desktop_Qt_6_1_0_GCC_64bit-Debug 303 | 304 | 1 305 | 306 | 307 | 308 | ProjectExplorer.Project.TargetCount 309 | 1 310 | 311 | 312 | ProjectExplorer.Project.Updater.FileVersion 313 | 22 314 | 315 | 316 | Version 317 | 22 318 | 319 | 320 | -------------------------------------------------------------------------------- /UygulamaSinavi2/database.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AhmetFurkanDEMIR/Visual-programming-with-Qt/85f304e8fc9beba3d48f88fb70c7693398463b05/UygulamaSinavi2/database.db -------------------------------------------------------------------------------- /UygulamaSinavi2/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | 3 | #include 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | QApplication a(argc, argv); 8 | MainWindow w; 9 | w.show(); 10 | return a.exec(); 11 | } 12 | -------------------------------------------------------------------------------- /UygulamaSinavi2/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "ui_mainwindow.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | MainWindow::MainWindow(QWidget *parent) 10 | : QMainWindow(parent) 11 | , ui(new Ui::MainWindow) 12 | { 13 | ui->setupUi(this); 14 | 15 | QSqlDatabase Database; 16 | Database = QSqlDatabase::addDatabase("QSQLITE"); 17 | Database.setDatabaseName("/home/demir/Quiz/database.db"); 18 | 19 | if (!Database.open()) 20 | { 21 | ui->statusbar->showMessage("Error, Veri tabanına bağlanılamadı X"); 22 | } 23 | 24 | else{ 25 | ui->statusbar->showMessage("Veri tabanına bağlanıldı!"); 26 | } 27 | 28 | readd(); 29 | 30 | 31 | QSqlTableModel *model; 32 | QSqlTableModel *model2; 33 | 34 | model = new QSqlTableModel(); 35 | model->setTable("gecenler"); 36 | ui->tableView->setModel(model); 37 | model->select(); 38 | model2 = new QSqlTableModel(); 39 | model2->setTable("kalanlar"); 40 | ui->tableView_2->setModel(model2); 41 | model2->select(); 42 | 43 | } 44 | 45 | MainWindow::~MainWindow() 46 | { 47 | delete ui; 48 | } 49 | 50 | void MainWindow::readd(){ 51 | 52 | int flag_run = 0; 53 | 54 | QSqlQuery query("SELECT ogr_id FROM gecenler"); 55 | if(query.next()==false){ 56 | flag_run=1; 57 | 58 | } 59 | 60 | if(flag_run==1){ 61 | 62 | QFile file("/home/demir/Quiz/ogrenciler.txt"); 63 | if (!file.open(QIODevice::ReadOnly | QIODevice::Text)){ 64 | return; 65 | } 66 | 67 | QTextStream in(&file); 68 | QString line; 69 | 70 | while (!in.atEnd()) { 71 | 72 | line = in.readLine(); 73 | 74 | QStringList temp; 75 | temp = line.split(" "); 76 | 77 | int a = temp.at(3).toInt()*0.4 + temp.at(4).toInt()*0.6; 78 | 79 | if(a>=60){ 80 | 81 | query.prepare("INSERT INTO gecenler(ogr_id, ogr_ad, ogr_soyad, gecme_notu) " 82 | "VALUES (?, ?, ?, ?)"); 83 | 84 | query.bindValue(0, temp.at(0).toInt()); 85 | query.bindValue(1, temp.at(1)); 86 | query.bindValue(2, temp.at(2)); 87 | query.bindValue(3, a); 88 | query.exec(); 89 | 90 | } 91 | 92 | else{ 93 | 94 | query.prepare("INSERT INTO kalanlar(ogr_id, ogr_ad, ogr_soyad, gecme_notu) " 95 | "VALUES (?, ?, ?, ?)"); 96 | 97 | query.bindValue(0, temp.at(0).toInt()); 98 | query.bindValue(1, temp.at(1)); 99 | query.bindValue(2, temp.at(2)); 100 | query.bindValue(3, a); 101 | query.exec(); 102 | 103 | } 104 | 105 | } 106 | 107 | } 108 | 109 | 110 | } 111 | 112 | void MainWindow::on_pushButton_clicked() 113 | { 114 | 115 | if(ui->lineEdit->text()=="" || ui->lineEdit_2->text()=="" || ui->lineEdit_3->text()=="" || ui->lineEdit_4->text()==""){ 116 | 117 | QMessageBox messageBox; 118 | messageBox.critical(0,"HATA!","Gerekli Alanları Doldurunuz!"); 119 | 120 | return; 121 | } 122 | 123 | else if(ui->lineEdit_4->text().toInt()>=60){ 124 | 125 | QSqlQuery query; 126 | query.prepare("INSERT INTO gecenler(ogr_id, ogr_ad, ogr_soyad, gecme_notu) " 127 | "VALUES (?, ?, ?, ?)"); 128 | 129 | query.bindValue(0, ui->lineEdit->text()); 130 | query.bindValue(1, ui->lineEdit_2->text()); 131 | query.bindValue(2, ui->lineEdit_3->text()); 132 | query.bindValue(3, ui->lineEdit_4->text()); 133 | query.exec(); 134 | 135 | } 136 | 137 | else{ 138 | 139 | QSqlQuery query; 140 | query.prepare("INSERT INTO kalanlar(ogr_id, ogr_ad, ogr_soyad, gecme_notu) " 141 | "VALUES (?, ?, ?, ?)"); 142 | 143 | query.bindValue(0, ui->lineEdit->text()); 144 | query.bindValue(1, ui->lineEdit_2->text()); 145 | query.bindValue(2, ui->lineEdit_3->text()); 146 | query.bindValue(3, ui->lineEdit_4->text()); 147 | query.exec(); 148 | 149 | } 150 | 151 | QSqlTableModel *model; 152 | QSqlTableModel *model2; 153 | 154 | model = new QSqlTableModel(); 155 | model->setTable("gecenler"); 156 | ui->tableView->setModel(model); 157 | model->select(); 158 | model2 = new QSqlTableModel(); 159 | model2->setTable("kalanlar"); 160 | ui->tableView_2->setModel(model2); 161 | model2->select(); 162 | 163 | } 164 | 165 | -------------------------------------------------------------------------------- /UygulamaSinavi2/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | 6 | QT_BEGIN_NAMESPACE 7 | namespace Ui { class MainWindow; } 8 | QT_END_NAMESPACE 9 | 10 | class MainWindow : public QMainWindow 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | MainWindow(QWidget *parent = nullptr); 16 | ~MainWindow(); 17 | 18 | private slots: 19 | void on_pushButton_clicked(); 20 | void readd(); 21 | 22 | private: 23 | Ui::MainWindow *ui; 24 | }; 25 | #endif // MAINWINDOW_H 26 | -------------------------------------------------------------------------------- /UygulamaSinavi2/mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 691 10 | 463 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 30 21 | 10 22 | 101 23 | 17 24 | 25 | 26 | 27 | 28 | 13 29 | 75 30 | true 31 | 32 | 33 | 34 | GEÇENLER 35 | 36 | 37 | 38 | 39 | 40 | 30 41 | 215 42 | 101 43 | 17 44 | 45 | 46 | 47 | 48 | 13 49 | 75 50 | true 51 | 52 | 53 | 54 | KALANLAR 55 | 56 | 57 | 58 | 59 | 60 | 560 61 | 130 62 | 113 63 | 25 64 | 65 | 66 | 67 | 68 | 69 | 70 | 560 71 | 160 72 | 113 73 | 25 74 | 75 | 76 | 77 | 78 | 79 | 80 | 560 81 | 190 82 | 113 83 | 25 84 | 85 | 86 | 87 | 88 | 89 | 90 | 400 91 | 165 92 | 111 93 | 21 94 | 95 | 96 | 97 | 98 | 50 99 | false 100 | 101 | 102 | 103 | OGRENCI AD : 104 | 105 | 106 | 107 | 108 | 109 | 400 110 | 195 111 | 131 112 | 21 113 | 114 | 115 | 116 | 117 | 50 118 | false 119 | 120 | 121 | 122 | OGRENCI SOYAD : 123 | 124 | 125 | 126 | 127 | 128 | 400 129 | 220 130 | 181 131 | 31 132 | 133 | 134 | 135 | 136 | 50 137 | false 138 | 139 | 140 | 141 | OGRENCI GEÇMENOTU : 142 | 143 | 144 | 145 | 146 | 147 | 440 148 | 270 149 | 191 150 | 31 151 | 152 | 153 | 154 | 155 | 12 156 | 75 157 | true 158 | 159 | 160 | 161 | YENİ ÖĞRENCİ EKLE 162 | 163 | 164 | 165 | 166 | 167 | 400 168 | 135 169 | 101 170 | 21 171 | 172 | 173 | 174 | 175 | 50 176 | false 177 | 178 | 179 | 180 | OGRENCI ID : 181 | 182 | 183 | 184 | 185 | 186 | 560 187 | 220 188 | 113 189 | 25 190 | 191 | 192 | 193 | 194 | 195 | 196 | 30 197 | 30 198 | 350 199 | 150 200 | 201 | 202 | 203 | 204 | 205 | 206 | 30 207 | 240 208 | 350 209 | 150 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /UygulamaSinavi2/ogrenciler.txt: -------------------------------------------------------------------------------- 1 | 101 Ali Kara 50 80 2 | 102 Veysel Ada 80 90 3 | 103 Seda Kil 70 75 4 | 104 Zeliha Selin 40 45 5 | 105 Deniz Cam 70 30 6 | 106 Ayse Kalem 50 36 7 | 107 Ahmet Sade 88 84 --------------------------------------------------------------------------------