mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-06 19:20:45 +00:00
minor display changes && allow == 0 matches for events.
This commit is contained in:
parent
74960d6472
commit
b3956acb1f
@ -31,19 +31,6 @@
|
|||||||
#include "daily.h"
|
#include "daily.h"
|
||||||
|
|
||||||
|
|
||||||
//enums DO NOT WORK because due to switch statements because channelID for events are also used
|
|
||||||
#define OT_NONE 0
|
|
||||||
#define OT_DISABLED_SESSIONS 1
|
|
||||||
#define OT_NOTES 2
|
|
||||||
#define OT_NOTES_STRING 3
|
|
||||||
#define OT_BOOKMARKS 4
|
|
||||||
#define OT_BOOKMARKS_STRING 5
|
|
||||||
#define OT_AHI 6
|
|
||||||
#define OT_SESSION_LENGTH 7
|
|
||||||
#define OT_SESSIONS_QTY 8
|
|
||||||
#define OT_DAILY_USAGE 9
|
|
||||||
#define OT_BMI 10
|
|
||||||
|
|
||||||
DailySearchTab::DailySearchTab(Daily* daily , QWidget* searchTabWidget , QTabWidget* dailyTabWidget) :
|
DailySearchTab::DailySearchTab(Daily* daily , QWidget* searchTabWidget , QTabWidget* dailyTabWidget) :
|
||||||
daily(daily) , parent(daily) , searchTabWidget(searchTabWidget) ,dailyTabWidget(dailyTabWidget)
|
daily(daily) , parent(daily) , searchTabWidget(searchTabWidget) ,dailyTabWidget(dailyTabWidget)
|
||||||
{
|
{
|
||||||
@ -182,11 +169,7 @@ void DailySearchTab::createUi() {
|
|||||||
QString styleButton=QString("QPushButton { color: black; border: 1px solid black; padding: 5px ; } QPushButton:disabled { color: #606060; border: 1px solid #606060; }" );
|
QString styleButton=QString("QPushButton { color: black; border: 1px solid black; padding: 5px ; } QPushButton:disabled { color: #606060; border: 1px solid #606060; }" );
|
||||||
|
|
||||||
searchTabWidget ->setFont(baseFont);
|
searchTabWidget ->setFont(baseFont);
|
||||||
|
|
||||||
helpButton ->setFont(baseFont);
|
helpButton ->setFont(baseFont);
|
||||||
//helpButton ->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
|
|
||||||
//helpButton ->setStyleSheet(QString("QPushButton:flat {border: none }"));
|
|
||||||
//helpButton ->setStyleSheet(" text-align:left ; padding: 4;border: 1px");
|
|
||||||
|
|
||||||
helpInfo ->setText(helpStr());
|
helpInfo ->setText(helpStr());
|
||||||
helpInfo ->setFont(baseFont);
|
helpInfo ->setFont(baseFont);
|
||||||
@ -217,11 +200,8 @@ void DailySearchTab::createUi() {
|
|||||||
setOperationPopupEnabled(false);
|
setOperationPopupEnabled(false);
|
||||||
|
|
||||||
selectDouble->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
|
selectDouble->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
|
||||||
//selectDouble->hide();
|
|
||||||
selectInteger->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
|
selectInteger->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
|
||||||
//selectInteger->hide();
|
|
||||||
selectString->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
|
selectString->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
|
||||||
//selectString ->hide();
|
|
||||||
|
|
||||||
selectUnits->setText("");
|
selectUnits->setText("");
|
||||||
selectUnits->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
|
selectUnits->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
|
||||||
@ -233,7 +213,6 @@ void DailySearchTab::createUi() {
|
|||||||
helpButton ->setStyleSheet( styleButton );
|
helpButton ->setStyleSheet( styleButton );
|
||||||
|
|
||||||
|
|
||||||
//statusProgress ->show();
|
|
||||||
summaryProgress ->setFont(baseFont);
|
summaryProgress ->setFont(baseFont);
|
||||||
summaryFound ->setFont(baseFont);
|
summaryFound ->setFont(baseFont);
|
||||||
summaryMinMax ->setFont(baseFont);
|
summaryMinMax ->setFont(baseFont);
|
||||||
@ -243,10 +222,7 @@ void DailySearchTab::createUi() {
|
|||||||
summaryFound ->setStyleSheet("padding:4px;background-color: #f0f0f0;" );
|
summaryFound ->setStyleSheet("padding:4px;background-color: #f0f0f0;" );
|
||||||
summaryMinMax ->setStyleSheet("padding:4px;background-color: #ffffff;" );
|
summaryMinMax ->setStyleSheet("padding:4px;background-color: #ffffff;" );
|
||||||
|
|
||||||
//summaryProgress ->show();
|
searchTopic = ST_NONE;
|
||||||
//summaryFound ->show();
|
|
||||||
//summaryMinMax ->show();
|
|
||||||
searchType = OT_NONE;
|
|
||||||
|
|
||||||
clearButton->setText(tr("Clear"));
|
clearButton->setText(tr("Clear"));
|
||||||
startButton->setText(tr("Start Search"));
|
startButton->setText(tr("Start Search"));
|
||||||
@ -274,7 +250,6 @@ void DailySearchTab::createUi() {
|
|||||||
horizontalHeader0->setText(tr("DATE\nClick date to Restore"));
|
horizontalHeader0->setText(tr("DATE\nClick date to Restore"));
|
||||||
horizontalHeader1->setText("");
|
horizontalHeader1->setText("");
|
||||||
|
|
||||||
guiDisplayTable->horizontalHeader()->hide();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DailySearchTab::delayedCreateUi() {
|
void DailySearchTab::delayedCreateUi() {
|
||||||
@ -283,15 +258,15 @@ void DailySearchTab::delayedCreateUi() {
|
|||||||
createUiFinished = true;
|
createUiFinished = true;
|
||||||
|
|
||||||
selectCommandCombo->clear();
|
selectCommandCombo->clear();
|
||||||
selectCommandCombo->addItem(tr("Notes"),OT_NOTES);
|
selectCommandCombo->addItem(tr("Notes"),ST_NOTES);
|
||||||
selectCommandCombo->addItem(tr("Notes containing"),OT_NOTES_STRING);
|
selectCommandCombo->addItem(tr("Notes containing"),ST_NOTES_STRING);
|
||||||
selectCommandCombo->addItem(tr("Bookmarks"),OT_BOOKMARKS);
|
selectCommandCombo->addItem(tr("Bookmarks"),ST_BOOKMARKS);
|
||||||
selectCommandCombo->addItem(tr("Bookmarks containing"),OT_BOOKMARKS_STRING);
|
selectCommandCombo->addItem(tr("Bookmarks containing"),ST_BOOKMARKS_STRING);
|
||||||
selectCommandCombo->addItem(tr("AHI "),OT_AHI);
|
selectCommandCombo->addItem(tr("AHI "),ST_AHI);
|
||||||
selectCommandCombo->addItem(tr("Daily Duration"),OT_DAILY_USAGE);
|
selectCommandCombo->addItem(tr("Daily Duration"),ST_DAILY_USAGE);
|
||||||
selectCommandCombo->addItem(tr("Session Duration" ),OT_SESSION_LENGTH);
|
selectCommandCombo->addItem(tr("Session Duration" ),ST_SESSION_LENGTH);
|
||||||
selectCommandCombo->addItem(tr("Disabled Sessions"),OT_DISABLED_SESSIONS);
|
selectCommandCombo->addItem(tr("Disabled Sessions"),ST_DISABLED_SESSIONS);
|
||||||
selectCommandCombo->addItem(tr("Number of Sessions"),OT_SESSIONS_QTY);
|
selectCommandCombo->addItem(tr("Number of Sessions"),ST_SESSIONS_QTY);
|
||||||
selectCommandCombo->insertSeparator(selectCommandCombo->count()); // separate from events
|
selectCommandCombo->insertSeparator(selectCommandCombo->count()); // separate from events
|
||||||
|
|
||||||
opCodeMap.clear();
|
opCodeMap.clear();
|
||||||
@ -531,72 +506,78 @@ void DailySearchTab::on_selectCommandCombo_activated(int index) {
|
|||||||
selectOperationOpCode = OP_INVALID;
|
selectOperationOpCode = OP_INVALID;
|
||||||
|
|
||||||
// get item selected
|
// get item selected
|
||||||
searchType = selectCommandCombo->itemData(index).toInt();
|
int itemTopic = selectCommandCombo->itemData(index).toInt();
|
||||||
switch (searchType) {
|
if (itemTopic>=ST_EVENT) {
|
||||||
case OT_NONE :
|
channelId = itemTopic;
|
||||||
|
searchTopic = ST_EVENT;
|
||||||
|
} else {
|
||||||
|
searchTopic = (SearchTopic)itemTopic;
|
||||||
|
}
|
||||||
|
switch (searchTopic) {
|
||||||
|
case ST_NONE :
|
||||||
// should never get here.
|
// should never get here.
|
||||||
horizontalHeader1->setText("");
|
horizontalHeader1->setText("");
|
||||||
nextTab = TW_NONE ;
|
nextTab = TW_NONE ;
|
||||||
setSelectOperation( OP_INVALID ,notUsed);
|
setSelectOperation( OP_INVALID ,notUsed);
|
||||||
break;
|
break;
|
||||||
case OT_DISABLED_SESSIONS :
|
case ST_DISABLED_SESSIONS :
|
||||||
horizontalHeader1->setText(tr("Number Disabled Session\nJumps to Notes"));
|
horizontalHeader1->setText(tr("Number Disabled Session\nJumps to Notes"));
|
||||||
nextTab = TW_DETAILED ;
|
nextTab = TW_DETAILED ;
|
||||||
selectInteger->setValue(0);
|
selectInteger->setValue(0);
|
||||||
setSelectOperation(OP_NO_PARMS,displayWhole);
|
setSelectOperation(OP_NO_PARMS,displayWhole);
|
||||||
break;
|
break;
|
||||||
case OT_NOTES :
|
case ST_NOTES :
|
||||||
horizontalHeader1->setText(tr("Note\nJumps to Notes"));
|
horizontalHeader1->setText(tr("Note\nJumps to Notes"));
|
||||||
nextTab = TW_NOTES ;
|
nextTab = TW_NOTES ;
|
||||||
setSelectOperation( OP_NO_PARMS ,displayString);
|
setSelectOperation( OP_NO_PARMS ,displayString);
|
||||||
break;
|
break;
|
||||||
case OT_BOOKMARKS :
|
case ST_BOOKMARKS :
|
||||||
horizontalHeader1->setText(tr("Jumps to Bookmark"));
|
horizontalHeader1->setText(tr("Jumps to Bookmark"));
|
||||||
nextTab = TW_BOOKMARK ;
|
nextTab = TW_BOOKMARK ;
|
||||||
setSelectOperation( OP_NO_PARMS ,displayString);
|
setSelectOperation( OP_NO_PARMS ,displayString);
|
||||||
break;
|
break;
|
||||||
case OT_BOOKMARKS_STRING :
|
case ST_BOOKMARKS_STRING :
|
||||||
horizontalHeader1->setText(tr("Jumps to Bookmark"));
|
horizontalHeader1->setText(tr("Jumps to Bookmark"));
|
||||||
nextTab = TW_BOOKMARK ;
|
nextTab = TW_BOOKMARK ;
|
||||||
//setSelectOperation(OP_CONTAINS,opString);
|
//setSelectOperation(OP_CONTAINS,opString);
|
||||||
setSelectOperation(OP_WILDCARD,opString);
|
setSelectOperation(OP_WILDCARD,opString);
|
||||||
selectString->clear();
|
selectString->clear();
|
||||||
break;
|
break;
|
||||||
case OT_NOTES_STRING :
|
case ST_NOTES_STRING :
|
||||||
horizontalHeader1->setText(tr("Note\nJumps to Notes"));
|
horizontalHeader1->setText(tr("Note\nJumps to Notes"));
|
||||||
nextTab = TW_NOTES ;
|
nextTab = TW_NOTES ;
|
||||||
//setSelectOperation(OP_CONTAINS,opString);
|
//setSelectOperation(OP_CONTAINS,opString);
|
||||||
setSelectOperation(OP_WILDCARD,opString);
|
setSelectOperation(OP_WILDCARD,opString);
|
||||||
selectString->clear();
|
selectString->clear();
|
||||||
break;
|
break;
|
||||||
case OT_AHI :
|
case ST_AHI :
|
||||||
horizontalHeader1->setText(tr("AHI\nJumps to Details"));
|
horizontalHeader1->setText(tr("AHI\nJumps to Details"));
|
||||||
nextTab = TW_DETAILED ;
|
nextTab = TW_DETAILED ;
|
||||||
setSelectOperation(OP_GT,hundredths);
|
setSelectOperation(OP_GT,hundredths);
|
||||||
selectDouble->setValue(5.0);
|
selectDouble->setValue(5.0);
|
||||||
break;
|
break;
|
||||||
case OT_SESSION_LENGTH :
|
case ST_SESSION_LENGTH :
|
||||||
horizontalHeader1->setText(tr("Session Duration\nJumps to Details"));
|
horizontalHeader1->setText(tr("Session Duration\nJumps to Details"));
|
||||||
nextTab = TW_DETAILED ;
|
nextTab = TW_DETAILED ;
|
||||||
setSelectOperation(OP_LT,minutesToMs);
|
setSelectOperation(OP_LT,minutesToMs);
|
||||||
selectDouble->setValue(5.0);
|
selectDouble->setValue(5.0);
|
||||||
selectInteger->setValue((int)selectDouble->value()*60000.0); //convert to ms
|
selectInteger->setValue((int)selectDouble->value()*60000.0); //convert to ms
|
||||||
break;
|
break;
|
||||||
case OT_SESSIONS_QTY :
|
case ST_SESSIONS_QTY :
|
||||||
horizontalHeader1->setText(tr("Number of Sessions\nJumps to Details"));
|
horizontalHeader1->setText(tr("Number of Sessions\nJumps to Details"));
|
||||||
nextTab = TW_DETAILED ;
|
nextTab = TW_DETAILED ;
|
||||||
setSelectOperation(OP_GT,opWhole);
|
setSelectOperation(OP_GT,opWhole);
|
||||||
selectInteger->setRange(0,999);
|
selectInteger->setRange(0,999);
|
||||||
selectInteger->setValue(1);
|
selectInteger->setValue(2);
|
||||||
break;
|
break;
|
||||||
case OT_DAILY_USAGE :
|
case ST_DAILY_USAGE :
|
||||||
horizontalHeader1->setText(tr("Daily Duration\nJumps to Details"));
|
horizontalHeader1->setText(tr("Daily Duration\nJumps to Details"));
|
||||||
nextTab = TW_DETAILED ;
|
nextTab = TW_DETAILED ;
|
||||||
setSelectOperation(OP_LT,hoursToMs);
|
setSelectOperation(OP_LT,hoursToMs);
|
||||||
selectDouble->setValue(p_profile->cpap->complianceHours());
|
selectDouble->setValue(p_profile->cpap->complianceHours());
|
||||||
selectInteger->setValue((int)selectDouble->value()*3600000.0); //convert to ms
|
selectInteger->setValue((int)selectDouble->value()*3600000.0); //convert to ms
|
||||||
break;
|
break;
|
||||||
default:
|
case ST_EVENT:
|
||||||
// Have an Event
|
// Have an Event
|
||||||
horizontalHeader1->setText(tr("Number of events\nJumps to Events"));
|
horizontalHeader1->setText(tr("Number of events\nJumps to Events"));
|
||||||
nextTab = TW_EVENTS ;
|
nextTab = TW_EVENTS ;
|
||||||
@ -635,8 +616,8 @@ bool DailySearchTab::find(QDate& date,Day* day)
|
|||||||
if (!day) return false;
|
if (!day) return false;
|
||||||
bool found=false;
|
bool found=false;
|
||||||
Qt::Alignment alignment=Qt::AlignCenter;
|
Qt::Alignment alignment=Qt::AlignCenter;
|
||||||
switch (searchType) {
|
switch (searchTopic) {
|
||||||
case OT_DISABLED_SESSIONS :
|
case ST_DISABLED_SESSIONS :
|
||||||
{
|
{
|
||||||
qint32 numDisabled=0;
|
qint32 numDisabled=0;
|
||||||
QList<Session *> sessions = day->getSessions(MT_CPAP,true);
|
QList<Session *> sessions = day->getSessions(MT_CPAP,true);
|
||||||
@ -654,7 +635,7 @@ bool DailySearchTab::find(QDate& date,Day* day)
|
|||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OT_NOTES :
|
case ST_NOTES :
|
||||||
{
|
{
|
||||||
Session* journal=daily->GetJournalSession(date);
|
Session* journal=daily->GetJournalSession(date);
|
||||||
if (journal && journal->settings.contains(Journal_Notes)) {
|
if (journal && journal->settings.contains(Journal_Notes)) {
|
||||||
@ -665,7 +646,7 @@ bool DailySearchTab::find(QDate& date,Day* day)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OT_BOOKMARKS :
|
case ST_BOOKMARKS :
|
||||||
{
|
{
|
||||||
Session* journal=daily->GetJournalSession(date);
|
Session* journal=daily->GetJournalSession(date);
|
||||||
if (journal && journal->settings.contains(Bookmark_Notes)) {
|
if (journal && journal->settings.contains(Bookmark_Notes)) {
|
||||||
@ -679,7 +660,7 @@ bool DailySearchTab::find(QDate& date,Day* day)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OT_BOOKMARKS_STRING :
|
case ST_BOOKMARKS_STRING :
|
||||||
{
|
{
|
||||||
Session* journal=daily->GetJournalSession(date);
|
Session* journal=daily->GetJournalSession(date);
|
||||||
if (journal && journal->settings.contains(Bookmark_Notes)) {
|
if (journal && journal->settings.contains(Bookmark_Notes)) {
|
||||||
@ -698,7 +679,7 @@ bool DailySearchTab::find(QDate& date,Day* day)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OT_NOTES_STRING :
|
case ST_NOTES_STRING :
|
||||||
{
|
{
|
||||||
Session* journal=daily->GetJournalSession(date);
|
Session* journal=daily->GetJournalSession(date);
|
||||||
if (journal && journal->settings.contains(Journal_Notes)) {
|
if (journal && journal->settings.contains(Journal_Notes)) {
|
||||||
@ -712,7 +693,7 @@ bool DailySearchTab::find(QDate& date,Day* day)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OT_AHI :
|
case ST_AHI :
|
||||||
{
|
{
|
||||||
EventDataType dahi =calculateAhi(day);
|
EventDataType dahi =calculateAhi(day);
|
||||||
dahi += 0.005;
|
dahi += 0.005;
|
||||||
@ -722,7 +703,7 @@ bool DailySearchTab::find(QDate& date,Day* day)
|
|||||||
found = compare (ahi , selectValue);
|
found = compare (ahi , selectValue);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OT_SESSION_LENGTH :
|
case ST_SESSION_LENGTH :
|
||||||
{
|
{
|
||||||
bool valid=false;
|
bool valid=false;
|
||||||
qint64 value=0;
|
qint64 value=0;
|
||||||
@ -743,7 +724,7 @@ bool DailySearchTab::find(QDate& date,Day* day)
|
|||||||
if (valid) updateValues(value);
|
if (valid) updateValues(value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OT_SESSIONS_QTY :
|
case ST_SESSIONS_QTY :
|
||||||
{
|
{
|
||||||
QList<Session *> sessions = day->getSessions(MT_CPAP);
|
QList<Session *> sessions = day->getSessions(MT_CPAP);
|
||||||
qint32 size = sessions.size();
|
qint32 size = sessions.size();
|
||||||
@ -751,7 +732,7 @@ bool DailySearchTab::find(QDate& date,Day* day)
|
|||||||
found=compare (size , selectValue);
|
found=compare (size , selectValue);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OT_DAILY_USAGE :
|
case ST_DAILY_USAGE :
|
||||||
{
|
{
|
||||||
QList<Session *> sessions = day->getSessions(MT_CPAP);
|
QList<Session *> sessions = day->getSessions(MT_CPAP);
|
||||||
qint64 sum = 0 ;
|
qint64 sum = 0 ;
|
||||||
@ -762,15 +743,14 @@ bool DailySearchTab::find(QDate& date,Day* day)
|
|||||||
found=compare (sum , selectValue);
|
found=compare (sum , selectValue);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default :
|
case ST_EVENT :
|
||||||
{
|
{
|
||||||
qint32 count = day->count(searchType);
|
qint32 count = day->count(channelId);
|
||||||
if (count<=0) break;
|
|
||||||
updateValues(count);
|
updateValues(count);
|
||||||
found=compare (count , selectValue);
|
found=compare (count , selectValue);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OT_NONE :
|
case ST_NONE :
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -980,7 +960,9 @@ void DailySearchTab::setSelectOperation(OpCode opCode,ValueMode mode) {
|
|||||||
break;
|
break;
|
||||||
case opWhole:
|
case opWhole:
|
||||||
selectInteger->show();
|
selectInteger->show();
|
||||||
|
break;
|
||||||
case displayWhole:
|
case displayWhole:
|
||||||
|
selectInteger->hide();
|
||||||
break;
|
break;
|
||||||
case opString:
|
case opString:
|
||||||
selectOperationButton->show();
|
selectOperationButton->show();
|
||||||
@ -996,17 +978,36 @@ void DailySearchTab::setSelectOperation(OpCode opCode,ValueMode mode) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DailySearchTab::hideResults() {
|
||||||
|
|
||||||
|
guiProgressBar->hide();
|
||||||
|
// clear display table && hide
|
||||||
|
guiDisplayTable->horizontalHeader()->hide();
|
||||||
|
for (int index=0; index<guiDisplayTable->rowCount();index++) {
|
||||||
|
guiDisplayTable->setRowHidden(index,true);
|
||||||
|
}
|
||||||
|
guiDisplayTable->horizontalHeader()->hide();
|
||||||
|
|
||||||
|
// reset summary line
|
||||||
|
summaryProgress->hide();
|
||||||
|
summaryFound->hide();
|
||||||
|
summaryMinMax->hide();
|
||||||
|
|
||||||
|
statusProgress->hide();
|
||||||
|
}
|
||||||
|
|
||||||
void DailySearchTab::on_clearButton_clicked()
|
void DailySearchTab::on_clearButton_clicked()
|
||||||
{
|
{
|
||||||
// make these button text back to start.
|
// make these button text back to start.
|
||||||
selectCommandButton->setText(tr("Select Match"));
|
|
||||||
startButton->setText(tr("Start Search"));
|
startButton->setText(tr("Start Search"));
|
||||||
|
startButtonMode=true;
|
||||||
|
startButton->setEnabled( false);
|
||||||
|
|
||||||
// hide widgets
|
// hide widgets
|
||||||
//Reset Select area
|
//Reset Select area
|
||||||
selectCommandCombo->hide();
|
selectCommandCombo->hide();
|
||||||
setCommandPopupEnabled(false);
|
setCommandPopupEnabled(false);
|
||||||
|
selectCommandButton->setText(tr("Select Match"));
|
||||||
selectCommandButton->show();
|
selectCommandButton->show();
|
||||||
|
|
||||||
selectOperationCombo->hide();
|
selectOperationCombo->hide();
|
||||||
@ -1018,25 +1019,12 @@ void DailySearchTab::on_clearButton_clicked()
|
|||||||
selectString->hide();
|
selectString->hide();
|
||||||
selectUnits->hide();
|
selectUnits->hide();
|
||||||
|
|
||||||
|
hideResults();
|
||||||
//Reset Start area
|
|
||||||
startButtonMode=true;
|
|
||||||
startButton->setEnabled( false);
|
|
||||||
statusProgress->hide();
|
|
||||||
|
|
||||||
// reset summary line
|
|
||||||
summaryProgress->hide();
|
|
||||||
summaryFound->hide();
|
|
||||||
summaryMinMax->hide();
|
|
||||||
|
|
||||||
|
|
||||||
guiProgressBar->hide();
|
|
||||||
// clear display table && hide
|
|
||||||
guiDisplayTable->horizontalHeader()->hide();
|
|
||||||
for (int index=0; index<guiDisplayTable->rowCount();index++) {
|
|
||||||
guiDisplayTable->setRowHidden(index,true);
|
|
||||||
}
|
|
||||||
guiDisplayTable->horizontalHeader()->hide();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1139,14 +1127,7 @@ void DailySearchTab::criteriaChanged() {
|
|||||||
|
|
||||||
statusProgress->setText(centerLine(" ----- "));
|
statusProgress->setText(centerLine(" ----- "));
|
||||||
statusProgress->clear();
|
statusProgress->clear();
|
||||||
|
hideResults();
|
||||||
summaryProgress->clear();
|
|
||||||
summaryFound->clear();
|
|
||||||
summaryMinMax->clear();
|
|
||||||
for (int index=0; index<guiDisplayTable->rowCount();index++) {
|
|
||||||
guiDisplayTable->setRowHidden(index,true);
|
|
||||||
}
|
|
||||||
guiDisplayTable->horizontalHeader()->hide();
|
|
||||||
|
|
||||||
minMaxValid = false;
|
minMaxValid = false;
|
||||||
minInteger = 0;
|
minInteger = 0;
|
||||||
@ -1162,7 +1143,6 @@ void DailySearchTab::criteriaChanged() {
|
|||||||
startButtonMode=true;
|
startButtonMode=true;
|
||||||
|
|
||||||
//initialize progress bar.
|
//initialize progress bar.
|
||||||
guiProgressBar->hide();
|
|
||||||
guiProgressBar->setMinimum(0);
|
guiProgressBar->setMinimum(0);
|
||||||
guiProgressBar->setMaximum(daysTotal);
|
guiProgressBar->setMaximum(daysTotal);
|
||||||
guiProgressBar->setTextVisible(true);
|
guiProgressBar->setTextVisible(true);
|
||||||
@ -1227,7 +1207,9 @@ QString DailySearchTab::opCodeStr(OpCode opCode) {
|
|||||||
case OP_NE : return "!=";
|
case OP_NE : return "!=";
|
||||||
case OP_CONTAINS : return QChar(0x2208); // or use 0x220B
|
case OP_CONTAINS : return QChar(0x2208); // or use 0x220B
|
||||||
case OP_WILDCARD : return "*?";
|
case OP_WILDCARD : return "*?";
|
||||||
default:
|
case OP_INVALID:
|
||||||
|
case OP_END_NUMERIC:
|
||||||
|
case OP_NO_PARMS:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return QString();
|
return QString();
|
||||||
|
@ -60,6 +60,8 @@ private:
|
|||||||
|
|
||||||
enum ValueMode { invalidValueMode, notUsed , minutesToMs ,hoursToMs, hundredths , opWhole , displayWhole , opString, displayString};
|
enum ValueMode { invalidValueMode, notUsed , minutesToMs ,hoursToMs, hundredths , opWhole , displayWhole , opString, displayString};
|
||||||
|
|
||||||
|
enum SearchTopic { ST_NONE, ST_DISABLED_SESSIONS, ST_NOTES, ST_NOTES_STRING, ST_BOOKMARKS, ST_BOOKMARKS_STRING, ST_AHI, ST_SESSION_LENGTH, ST_SESSIONS_QTY, ST_DAILY_USAGE, ST_EVENT };
|
||||||
|
|
||||||
enum OpCode {
|
enum OpCode {
|
||||||
//DO NOT CHANGE NUMERIC OP CODES because THESE VALUES impact compare operations.
|
//DO NOT CHANGE NUMERIC OP CODES because THESE VALUES impact compare operations.
|
||||||
// start of fixed codes
|
// start of fixed codes
|
||||||
@ -133,6 +135,7 @@ enum OpCode {
|
|||||||
void setCommandPopupEnabled(bool );
|
void setCommandPopupEnabled(bool );
|
||||||
void setOperationPopupEnabled(bool );
|
void setOperationPopupEnabled(bool );
|
||||||
void setOperation( );
|
void setOperation( );
|
||||||
|
void hideResults();
|
||||||
|
|
||||||
QString helpStr();
|
QString helpStr();
|
||||||
QString centerLine(QString line);
|
QString centerLine(QString line);
|
||||||
@ -146,8 +149,9 @@ enum OpCode {
|
|||||||
|
|
||||||
bool createUiFinished=false;
|
bool createUiFinished=false;
|
||||||
bool startButtonMode=true;
|
bool startButtonMode=true;
|
||||||
int searchType;
|
SearchTopic searchTopic;
|
||||||
int nextTab;
|
int nextTab;
|
||||||
|
int channelId;
|
||||||
|
|
||||||
QDate firstDate ;
|
QDate firstDate ;
|
||||||
QDate lastDate ;
|
QDate lastDate ;
|
||||||
|
Loading…
Reference in New Issue
Block a user