comparison src/historywidget.cpp @ 558:d932ce55c364 find

Remove the single find widget from top, add one to each tab at the bottom instead. (Turns out you don't usually want to search for the same text in both types of widget.) Also provide sensible no-results text.
author Chris Cannam
date Mon, 27 Feb 2012 17:08:26 +0000
parents a1d210c767ab
children 533519ebc0cb
comparison
equal deleted inserted replaced
557:57a7f95ef400 558:d932ce55c364
21 #include "changesetview.h" 21 #include "changesetview.h"
22 #include "panner.h" 22 #include "panner.h"
23 #include "grapher.h" 23 #include "grapher.h"
24 #include "debug.h" 24 #include "debug.h"
25 #include "uncommitteditem.h" 25 #include "uncommitteditem.h"
26 #include "findwidget.h"
26 27
27 #include <iostream> 28 #include <iostream>
28 29
29 #include <QGridLayout> 30 #include <QGridLayout>
30 #include <QSettings> 31 #include <QSettings>
53 54
54 QSettings settings; 55 QSettings settings;
55 settings.beginGroup("Presentation"); 56 settings.beginGroup("Presentation");
56 bool showClosed = (settings.value("showclosedbranches", false).toBool()); 57 bool showClosed = (settings.value("showclosedbranches", false).toBool());
57 58
59 QWidget *opts = new QWidget;
60 QGridLayout *optLayout = new QGridLayout(opts);
61 optLayout->setMargin(0);
62 layout->addWidget(opts, ++row, 0, 1, 2);
63
64 m_findWidget = new FindWidget(this);
65 optLayout->addWidget(m_findWidget, 0, 0, Qt::AlignLeft);
66 connect(m_findWidget, SIGNAL(findTextChanged(QString)),
67 this, SLOT(setSearchText(QString)));
68
58 m_showClosedBranches = new QCheckBox(tr("Show closed branches"), this); 69 m_showClosedBranches = new QCheckBox(tr("Show closed branches"), this);
59 m_showClosedBranches->setChecked(showClosed); 70 m_showClosedBranches->setChecked(showClosed);
60 connect(m_showClosedBranches, SIGNAL(toggled(bool)), 71 connect(m_showClosedBranches, SIGNAL(toggled(bool)),
61 this, SLOT(showClosedChanged(bool))); 72 this, SLOT(showClosedChanged(bool)));
62 layout->addWidget(m_showClosedBranches, ++row, 0, Qt::AlignLeft); 73 optLayout->addWidget(m_showClosedBranches, 0, 1, Qt::AlignRight);
63 m_showClosedBranches->hide(); 74 m_showClosedBranches->hide();
64 75
65 setLayout(layout); 76 setLayout(layout);
66 } 77 }
67 78