#include "FileDialog.h"
#include "FontLoader.h"
#include "GuiApplication.h"
+#include "GuiClickableLabel.h"
#include "GuiCommandBuffer.h"
#include "GuiCompleter.h"
#include "GuiKeySymbol.h"
}
qreal fontSize() const {
- return toqstr(lyxrc.font_sizes[FONT_SIZE_NORMAL]).toDouble();
+ return toqstr(lyxrc.font_sizes[NORMAL_SIZE]).toDouble();
}
QPointF textPosition(bool const heading) const {
typedef shared_ptr<Dialog> DialogPtr;
-
-// see https://wiki.qt.io/Clickable_QLabel
-class QClickableLabel : public QLabel {
- Q_OBJECT
-public:
- explicit QClickableLabel(QWidget * parent)
- : QLabel(parent)
- {}
-
- ~QClickableLabel() {}
-
-Q_SIGNALS:
- void clicked();
-
-protected:
- void mousePressEvent(QMouseEvent *) {
- Q_EMIT clicked();
- }
-};
-
} // namespace
setAcceptDrops(true);
// add busy indicator to statusbar
- QClickableLabel * busylabel = new QClickableLabel(statusBar());
+ GuiClickableLabel * busylabel = new GuiClickableLabel(statusBar());
statusBar()->addPermanentWidget(busylabel);
search_mode mode = theGuiApp()->imageSearchMode();
QString fn = toqstr(lyx::libFileSearch("images", "busy", "gif", mode).absFileName());
busylabel, SLOT(show()));
connect(&d.processing_thread_watcher_, SIGNAL(finished()),
busylabel, SLOT(hide()));
- connect(busylabel, SIGNAL(clicked()), this, SLOT(checkKillBackground()));
+ connect(busylabel, SIGNAL(clicked()), this, SLOT(checkCancelBackground()));
QFontMetrics const fm(statusBar()->fontMetrics());
int const iconheight = max(int(d.normalIconSize), fm.height());
}
-void GuiView::checkKillBackground()
+void GuiView::checkCancelBackground()
{
- docstring const ttl = _("Cancel background process?");
+ docstring const ttl = _("Cancel Export?");
docstring const msg = _("Do you want to cancel the background export process?");
- const int decision =
- Alert::prompt(ttl, msg, 1, 1, _("&Cancel Export"), _("Conti&nue"));
- if (decision == 0)
+ int const ret =
+ Alert::prompt(ttl, msg, 1, 1,
+ _("&Cancel export"), _("Co&ntinue"));
+ if (ret == 0)
Systemcall::killscript();
}