* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include <cassert>
shared_ptr<views::ViewBase> MainWindow::add_view(const QString &title,
views::ViewType type, Session &session)
{
- QMainWindow *main_window;
+ QMainWindow *main_window = nullptr;
for (auto entry : session_windows_)
if (entry.first.get() == &session)
main_window = entry.second;
// that Qt keeps a pointer to the view around
entry.second->setParent(0);
- // Remove this entry from the container
+ // Remove this entry from the container and stop iterating.
view_docks_.erase(entry.first);
+ break;
}
}
action_view_coloured_bg_->setShortcut(QKeySequence(Qt::Key_B));
action_view_coloured_bg_->setObjectName(
QString::fromUtf8("actionViewColouredBg"));
- action_view_coloured_bg_->setText(tr("Use &coloured backgrounds"));
+ action_view_coloured_bg_->setText(tr("Use &Coloured Backgrounds"));
action_about_->setObjectName(QString::fromUtf8("actionAbout"));
- action_about_->setText(tr("&About..."));
+ action_about_->setToolTip(tr("&About..."));
// Set up the tab area
new_session_button_ = new QToolButton();
new_session_button_->setIcon(QIcon::fromTheme("document-new",
QIcon(":/icons/document-new.png")));
+ new_session_button_->setToolTip(tr("Create New Session"));
new_session_button_->setAutoRaise(true);
run_stop_button_ = new QToolButton();
run_stop_button_->setAutoRaise(true);
run_stop_button_->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
run_stop_button_->setShortcut(QKeySequence(Qt::Key_Space));
+ run_stop_button_->setToolTip(tr("Start/Stop Acquisition"));
settings_button_ = new QToolButton();
settings_button_->setIcon(QIcon::fromTheme("configure",
QIcon(":/icons/configure.png")));
+ settings_button_->setToolTip(tr("Settings"));
settings_button_->setAutoRaise(true);
QFrame *separator1 = new QFrame();