Compare commits

...

9 Commits

Author SHA1 Message Date
Daniel Jones
bb97304508 added verses for October November and December. Finished with database. 2024-01-03 09:10:17 -06:00
Daniel Jones
25badb424d Added July, August, and September verses 2024-01-03 08:30:32 -06:00
Daniel Jones
8a283a1034 added June verses 2024-01-02 16:24:53 -06:00
Daniel Jones
7b1359c1e7 added May verses 2024-01-02 15:24:45 -06:00
Daniel Jones
2d2c59a2f1 added April verses 2024-01-02 15:06:52 -06:00
Daniel Jones
5668857327 added March verses 2024-01-02 14:44:23 -06:00
Daniel Jones
5f10105990 added verses for February. Will add March later today. 2024-01-02 11:05:23 -06:00
Daniel Jones
89778cea08 added Bible verses for most of December. Will finish tonight and start work on February next. 2023-09-29 14:07:35 -05:00
Daniel Jones
08d97563fb checks day and month to reference database now 2023-09-19 14:39:25 -05:00
4 changed files with 27 additions and 20 deletions

View File

@ -6,7 +6,7 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)

View File

@ -8,15 +8,13 @@
#include "mainwindow.h"
#include "./ui_mainwindow.h"
#include <windows.h>
#include <iostream>
#include <random>
QString verse_display();
std::string verse_grab(int day);
std::string verse_grab();
MainWindow::MainWindow(QWidget *parent)
@ -33,19 +31,14 @@ MainWindow::~MainWindow()
delete ui;
}
//As name implies, randomly chooses a number between 1 and 100.
int random_verse(){
std::random_device rd;
std:: uniform_int_distribution<int> dist(1, 100);
return dist(rd);
}
//This is the function that will load the verse into the program.
QString verse_display()
{
std::string verse_text;
int verse_day = random_verse();
verse_text = verse_grab(verse_day);
verse_text = verse_grab();
QString returned_string = QString::fromStdString(verse_text);
@ -53,17 +46,23 @@ QString verse_display()
}
std::string verse_grab(int day){
std::string verse_grab(){
//Windows way of getting current month and time.
SYSTEMTIME st = {0};
GetLocalTime(&st);
int cur_day = st.wDay;
int cur_month = st.wMonth;
std::string my_query = "select ";
std::string my_verse;
my_verse = "Hello, this is a verse!";
return my_verse;
}
void MainWindow::on_exitButton_clicked()
{
QApplication::quit();

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>387</width>
<height>600</height>
<width>404</width>
<height>614</height>
</rect>
</property>
<property name="windowTitle">
@ -21,7 +21,7 @@
<widget class="QPushButton" name="exitButton">
<property name="geometry">
<rect>
<x>150</x>
<x>160</x>
<y>490</y>
<width>80</width>
<height>24</height>
@ -47,13 +47,15 @@
<set>Qt::AlignCenter</set>
</property>
</widget>
<zorder>verse</zorder>
<zorder>exitButton</zorder>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>387</width>
<width>404</width>
<height>21</height>
</rect>
</property>
@ -62,6 +64,7 @@
<string>File</string>
</property>
<addaction name="actionbookmark_verse"/>
<addaction name="actionGo_to_bookmarked_verse"/>
<addaction name="actionexit"/>
</widget>
<addaction name="menuDaily_Bread"/>
@ -77,6 +80,11 @@
<string>exit</string>
</property>
</action>
<action name="actionGo_to_bookmarked_verse">
<property name="text">
<string>Go to bookmarked verse</string>
</property>
</action>
</widget>
<resources/>
<connections/>

Binary file not shown.