connect(refreshButton, SIGNAL(pressed()), this, SLOT(refreshButtonPushed()));
connect(restoreButton, SIGNAL(pressed()), this, SLOT(restoreButtonPushed()));
connect(jobCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(jobComboChanged(int)));
+ connect(jobCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateRefresh()));
+ connect(clientCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateRefresh()));
+ connect(fileSetCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateRefresh()));
+ connect(limitCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updateRefresh()));
+ connect(daysCheckBox, SIGNAL(stateChanged(int)), this, SLOT(updateRefresh()));
+ connect(daysSpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateRefresh()));
+ connect(limitSpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateRefresh()));
connect(directoryTree, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
this, SLOT(directoryCurrentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)));
connect(directoryTree, SIGNAL(itemExpanded(QTreeWidgetItem *)),
directoryTree->setContextMenuPolicy(Qt::ActionsContextMenu);
}
+void restoreTree::updateRefresh()
+{
+ if (mainWin->m_rtPopDirDebug) Pmsg2(000, "testing prev=\"%s\" current=\"%s\"\n", m_prevJobCombo.toUtf8().data(), jobCombo->currentText().toUtf8().data());
+ m_dropdownChanged = (m_prevJobCombo != jobCombo->currentText())
+ || (m_prevClientCombo != clientCombo->currentText())
+ || (m_prevFileSetCombo != fileSetCombo->currentText()
+ || (m_prevLimitSpinBox != limitSpinBox->value())
+ || (m_prevDaysSpinBox != daysSpinBox->value())
+ || (m_prevLimitCheckState != limitCheckBox->checkState())
+ || (m_prevDaysCheckState != daysCheckBox->checkState())
+ );
+ if (m_dropdownChanged) {
+ if (mainWin->m_rtPopDirDebug) Pmsg0(000, "In restoreTree::updateRefresh Is CHANGED\n");
+ refreshLabel->setText("Refresh From Re-Select");
+ } else {
+ if (mainWin->m_rtPopDirDebug) Pmsg0(000, "In restoreTree::updateRefresh Is not Changed\n");
+ refreshLabel->setText("Refresh From JobChecks");
+ }
+}
+
/*
* When refresh button is pushed, perform a query getting the directories and
* use parseDirectory and addDirectory to populate the directory tree with items.
QString jobComboText = jobCombo->currentText();
QString clientComboText = clientCombo->currentText();
QString fileSetComboText = fileSetCombo->currentText();
- if (mainWin->m_rtPopDirDebug) Pmsg2(000, "testing prev=\"%s\" current=\"%s\"\n", m_prevJobCombo.toUtf8().data(), jobComboText.toUtf8().data());
- bool dropdownChanged = (m_prevJobCombo != jobComboText) || (m_prevClientCombo != clientComboText) || (m_prevFileSetCombo != fileSetComboText);
+ updateRefresh();
int taskcount = 2, ontask = 1;
- if (dropdownChanged) taskcount += 1;
-// QString taskCountString = QString("%1").arg(taskcount);
+ if (m_dropdownChanged) taskcount += 1;
/* Set progress bars and repaint */
prBar1->setVisible(true);
prLabel2->setVisible(true);
repaint();
- if (dropdownChanged) {
+ if (m_dropdownChanged) {
m_prevJobCombo = jobComboText;
m_prevClientCombo = clientComboText;
m_prevFileSetCombo = fileSetComboText;
+ m_prevLimitSpinBox = limitSpinBox->value();
+ m_prevDaysSpinBox = daysSpinBox->value();
+ m_prevLimitCheckState = limitCheckBox->checkState();
+ m_prevDaysCheckState = daysCheckBox->checkState();
+ updateRefresh();
if (mainWin->m_rtPopDirDebug) Pmsg0(000, "Repopulating the Job Table\n");
QString condition = " Client.Name='" + clientCombo->itemText(clientCombo->currentIndex()) + "'";
populateJobTable();
setJobsCheckedList();
} else {
+ if (mainWin->m_rtPopDirDebug) Pmsg0(000, "Repopulating from checks in Job Table\n");
setJobsCheckedList();
}
<widget class="QWidget" native="1" name="widget" >
<property name="geometry" >
<rect>
- <x>10</x>
- <y>57</y>
- <width>791</width>
+ <x>20</x>
+ <y>23</y>
+ <width>661</width>
<height>79</height>
</rect>
</property>
<property name="maximumSize" >
<size>
- <width>950</width>
- <height>16777215</height>
+ <width>900</width>
+ <height>79</height>
</size>
</property>
<layout class="QGridLayout" >
<property name="margin" >
- <number>0</number>
+ <number>6</number>
</property>
<property name="spacing" >
- <number>6</number>
+ <number>0</number>
</property>
<item row="1" column="0" >
<layout class="QHBoxLayout" >
<property name="margin" >
- <number>3</number>
+ <number>0</number>
</property>
<property name="spacing" >
- <number>9</number>
+ <number>6</number>
</property>
<item>
- <widget class="QPushButton" name="refreshButton" >
- <property name="text" >
- <string>Refresh</string>
- </property>
- <property name="icon" >
- <iconset resource="../main.qrc" >:/images/view-refresh.svg</iconset>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="restoreButton" >
- <property name="text" >
- <string>Restore</string>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>0</number>
</property>
- <property name="icon" >
- <iconset resource="../main.qrc" >:/images/restore.png</iconset>
+ <property name="spacing" >
+ <number>6</number>
</property>
- </widget>
+ <item row="0" column="0" >
+ <widget class="QPushButton" name="refreshButton" >
+ <property name="text" >
+ <string>Refresh</string>
+ </property>
+ <property name="icon" >
+ <iconset resource="../main.qrc" >:/images/view-refresh.svg</iconset>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" colspan="2" >
+ <widget class="QLabel" name="refreshLabel" >
+ <property name="text" >
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QPushButton" name="restoreButton" >
+ <property name="text" >
+ <string>Restore</string>
+ </property>
+ <property name="icon" >
+ <iconset resource="../main.qrc" >:/images/restore.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item>
<layout class="QVBoxLayout" >