removed unused toggle code and ui widget

This commit is contained in:
LoudSnorer 2023-03-04 15:14:09 -05:00
parent de1f63b641
commit 5eacf5a846
3 changed files with 0 additions and 71 deletions

View File

@ -77,8 +77,6 @@ Overview::Overview(QWidget *parent, gGraphView *shared) :
shortformat.replace("yy", "yyyy");
}
ui->toggleVisibility->setVisible(false); /* get rid of tiny triangle that disables data display */
ui->dateStart->setDisplayFormat(shortformat);
ui->dateEnd->setDisplayFormat(shortformat);
@ -907,46 +905,14 @@ void Overview::on_graphCombo_activated(int index)
void Overview::updateCube()
{
if ((GraphView->visibleGraphs() == 0)) {
ui->toggleVisibility->setArrowType(Qt::UpArrow);
ui->toggleVisibility->setToolTip(tr("Show all graphs"));
ui->toggleVisibility->blockSignals(true);
ui->toggleVisibility->setChecked(true);
ui->toggleVisibility->blockSignals(false);
if (ui->graphCombo->count() > 0) {
GraphView->setEmptyText(STR_Empty_NoGraphs);
} else {
GraphView->setEmptyText(STR_Empty_NoData);
}
} else {
ui->toggleVisibility->setArrowType(Qt::DownArrow);
ui->toggleVisibility->setToolTip(tr("Hide all graphs"));
ui->toggleVisibility->blockSignals(true);
ui->toggleVisibility->setChecked(false);
ui->toggleVisibility->blockSignals(false);
}
}
void Overview::on_toggleVisibility_clicked(bool checked)
{
gGraph *g;
QString s;
QIcon *icon = checked ? icon_off : icon_on;
for (int i = 0; i < ui->graphCombo->count(); i++) {
s = ui->graphCombo->itemText(i);
ui->graphCombo->setItemIcon(i, *icon);
ui->graphCombo->setItemData(i, !checked, Qt::UserRole);
g = GraphView->findGraphTitle(s);
g->setVisible(!checked);
}
updateCube();
GraphView->updateScale();
GraphView->redraw();
}
void Overview::on_layout_clicked() {
if (!saveGraphLayoutSettings) {
saveGraphLayoutSettings= new SaveGraphLayoutSettings("overview",this);

View File

@ -139,8 +139,6 @@ class Overview : public QWidget
void on_graphCombo_activated(int index);
void on_toggleVisibility_clicked(bool checked);
void on_LineCursorUpdate(double time);
void on_RangeUpdate(double minx, double maxx);
void setGraphText ();

View File

@ -224,41 +224,6 @@ QToolButton:pressed {
<item>
<layout class="QHBoxLayout" name="dateLayout"/>
</item>
<item>
<widget class="QToolButton" name="toggleVisibility">
<property name="toolTip">
<string>Toggle Graph Visibility</string>
</property>
<property name="styleSheet">
<string notr="true">QToolButton {
background: transparent;
border-radius: 8px;
border: 2px solid transparent;
}
QToolButton:hover {
border: 2px solid #456789;
}
QToolButton:pressed {
border: 2px solid #456789;
background-color: #89abcd;
}</string>
</property>
<property name="text">
<string notr="true">...</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
<property name="arrowType">
<enum>Qt::DownArrow</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="layout">
<property name="text">