-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new phrase ranking function, crash bug fixed in solar eclipses.
- Loading branch information
Showing
10 changed files
with
464 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "rankdialog.h" | ||
#include "ui_rankdialog.h" | ||
#include "mainwindow.h" | ||
|
||
rankDialog::rankDialog(QWidget *parent) : | ||
QDialog(parent), | ||
ui(new Ui::rankDialog) | ||
{ | ||
ui->setupUi(this); | ||
if (phrase != "<none>") ui->phrases->setText(phrase); | ||
ui->min->setValue(2); | ||
} | ||
|
||
rankDialog::~rankDialog() | ||
{ | ||
delete ui; | ||
} | ||
|
||
void rankDialog::on_buttonBox_accepted() | ||
{ | ||
phrase = ui->phrases->text(); | ||
ns = ui->min->value(); | ||
if (ui->checkBox->isChecked()) ns += 100; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef RANKDIALOG_H | ||
#define RANKDIALOG_H | ||
|
||
#include <QDialog> | ||
|
||
namespace Ui { | ||
class rankDialog; | ||
} | ||
|
||
class rankDialog : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit rankDialog(QWidget *parent = nullptr); | ||
~rankDialog(); | ||
|
||
private slots: | ||
void on_buttonBox_accepted(); | ||
|
||
private: | ||
Ui::rankDialog *ui; | ||
}; | ||
|
||
#endif // RANKDIALOG_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>rankDialog</class> | ||
<widget class="QDialog" name="rankDialog"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>352</width> | ||
<height>152</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Phrase ranking over a year.</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<item> | ||
<widget class="QLabel" name="label"> | ||
<property name="text"> | ||
<string>Enter up to two phrases sepparated by comma</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QSplitter" name="splitter_2"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<widget class="QLabel" name="label_2"> | ||
<property name="text"> | ||
<string>Phrases</string> | ||
</property> | ||
<property name="buddy"> | ||
<cstring>phrases</cstring> | ||
</property> | ||
</widget> | ||
<widget class="QLineEdit" name="phrases"/> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QSplitter" name="splitter"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<widget class="QLabel" name="label_3"> | ||
<property name="text"> | ||
<string>Minimum ocurrances</string> | ||
</property> | ||
<property name="buddy"> | ||
<cstring>min</cstring> | ||
</property> | ||
</widget> | ||
<widget class="QSpinBox" name="min"/> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QCheckBox" name="checkBox"> | ||
<property name="text"> | ||
<string>Total Solar eclipses (slow)</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QDialogButtonBox" name="buttonBox"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="standardButtons"> | ||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections> | ||
<connection> | ||
<sender>buttonBox</sender> | ||
<signal>accepted()</signal> | ||
<receiver>rankDialog</receiver> | ||
<slot>accept()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>248</x> | ||
<y>254</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>157</x> | ||
<y>274</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
<connection> | ||
<sender>buttonBox</sender> | ||
<signal>rejected()</signal> | ||
<receiver>rankDialog</receiver> | ||
<slot>reject()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>316</x> | ||
<y>260</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>286</x> | ||
<y>274</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
</connections> | ||
</ui> |