musredit 1.0.0
Loading...
Searching...
No Matches
PGetTitleBlockDialog.cpp
Go to the documentation of this file.
1/****************************************************************************
2
3 PGetTitleBlockDialog.cpp
4
5 Author: Andreas Suter
6 e-mail: andreas.suter@psi.ch
7
8*****************************************************************************/
9
10/***************************************************************************
11 * Copyright (C) 2010-2026 by Andreas Suter *
12 * andreas.suter@psi.ch *
13 * *
14 * This program is free software; you can redistribute it and/or modify *
15 * it under the terms of the GNU General Public License as published by *
16 * the Free Software Foundation; either version 2 of the License, or *
17 * (at your option) any later version. *
18 * *
19 * This program is distributed in the hope that it will be useful, *
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22 * GNU General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU General Public License *
25 * along with this program; if not, write to the *
26 * Free Software Foundation, Inc., *
27 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
28 ***************************************************************************/
29
42
43#include <QMessageBox>
44#include <QDesktopServices>
45#include <QUrl>
46
48
49//---------------------------------------------------------------------------
80{
81 setupUi(this);
82
83 setModal(true);
84}
85
86//---------------------------------------------------------------------------
116{
117 if (fHelpUrl.isEmpty()) {
118 QMessageBox::information(this, "INFO", "Will eventually show a help window");
119 } else {
120 bool ok = QDesktopServices::openUrl(QUrl(fHelpUrl, QUrl::TolerantMode));
121 if (!ok) {
122 QString msg = QString("<p>Sorry: Couldn't open default web-browser for the help.<br>Please try: <a href=\"%1\">musrfit docu</a> in your web-browser.").arg(fHelpUrl);
123 QMessageBox::critical( nullptr, tr("FATAL ERROR"), msg, QMessageBox::Close );
124 }
125 }
126}
127
128//---------------------------------------------------------------------------
129// END
130//---------------------------------------------------------------------------
Dialog for creating and editing TITLE blocks in msr files.
QString fHelpUrl
URL to the online documentation for TITLE blocks.
PGetTitleBlockDialog(const QString helpUrl)
Constructs a dialog for entering or editing a title.
void helpContent()
Opens the online help for TITLE blocks.