[qet] [4725] Add new action in help menu : link for download latest devel build for |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4725
Author: scorpio810
Date: 2016-09-26 02:46:02 +0200 (Mon, 26 Sep 2016)
Log Message:
-----------
Add new action in help menu : link for download latest devel build for
MAC OS (only visible on MAC OS platform)
Modified Paths:
--------------
trunk/sources/editor/graphicspart/partarc.cpp
trunk/sources/qetmainwindow.cpp
trunk/sources/qetmainwindow.h
Modified: trunk/sources/editor/graphicspart/partarc.cpp
===================================================================
--- trunk/sources/editor/graphicspart/partarc.cpp 2016-09-25 16:57:12 UTC (rev 4724)
+++ trunk/sources/editor/graphicspart/partarc.cpp 2016-09-26 00:46:02 UTC (rev 4725)
@@ -86,7 +86,7 @@
drawCross(m_rect.center(), painter);
if (scene()->selectedItems().size() == 1) {
if (m_resize_mode == 3)
- m_handler.drawHandler(painter, m_handler.pointsForArc(m_rect, m_start_angle/16, m_span_angle/16));
+ m_handler.drawHandler(painter, m_handler.pointsForArc(m_rect, m_start_angle /16, m_span_angle /16));
else
m_handler.drawHandler(painter, m_handler.pointsForRect(m_rect));
}
@@ -147,7 +147,7 @@
{
QPainterPath shape;
shape.arcMoveTo(m_rect, m_start_angle/16);
- shape.arcTo(m_rect, m_start_angle/16, m_span_angle/16);
+ shape.arcTo(m_rect, m_start_angle /16, m_span_angle /16);
QPainterPathStroker pps;
pps.setWidth(m_hovered? penWeight()+SHADOWS_HEIGHT : penWeight());
@@ -164,7 +164,7 @@
{
QPainterPath shape;
shape.arcMoveTo(m_rect, m_start_angle/16);
- shape.arcTo(m_rect, m_start_angle/16, m_span_angle/16);
+ shape.arcTo(m_rect, m_start_angle /16, m_span_angle /16);
QPainterPathStroker pps;
pps.setWidth(penWeight());
@@ -231,9 +231,9 @@
}
//resize angle
if (m_resize_mode == 3) {
- m_handler_index = m_handler.pointIsHoverHandler(event->pos(), m_handler.pointsForArc(m_rect, m_start_angle/16, m_span_angle/16));
+ m_handler_index = m_handler.pointIsHoverHandler(event->pos(), m_handler.pointsForArc(m_rect, m_start_angle /16, m_span_angle /16));
if (m_handler_index == 0) {
- m_span_point = m_handler.pointsForArc(m_rect, m_start_angle/16, m_span_angle/16).at(1);
+ m_span_point = m_handler.pointsForArc(m_rect, m_start_angle /16, m_span_angle /16).at(1);
m_undo_command = new QPropertyUndoCommand(this, "startAngle", QVariant(m_start_angle));
m_undo_command->setText(tr("Modifier un arc"));
Modified: trunk/sources/qetmainwindow.cpp
===================================================================
--- trunk/sources/qetmainwindow.cpp 2016-09-25 16:57:12 UTC (rev 4724)
+++ trunk/sources/qetmainwindow.cpp 2016-09-26 00:46:02 UTC (rev 4725)
@@ -94,11 +94,19 @@
upgrade_ = new QAction(QET::Icons::QETDownload, tr("Télécharger une nouvelle version (dev)"), this);
upgrade_ -> setStatusTip(tr("Lance le navigateur par défaut vers le dépot Nightly en ligne de QElectroTech", "status bar tip"));
+ upgrade_M = new QAction(QET::Icons::QETDownload, tr("Télécharger une nouvelle version (dev)"), this);
+ upgrade_M -> setStatusTip(tr("Lance le navigateur par défaut vers le dépot Nightly en ligne de QElectroTech", "status bar tip"));
+
connect(upgrade_, &QAction::triggered, [this](bool) {
QString link = "http://download.tuxfamily.org/qet/builds/nightly/";
QDesktopServices::openUrl(QUrl(link));
});
+ connect(upgrade_M, &QAction::triggered, [this](bool) {
+ QString link = "http://download.tuxfamily.org/qet/builds/MAC_OS_X/";
+ QDesktopServices::openUrl(QUrl(link));
+ });
+
donate_ = new QAction(QET::Icons::QETDonate, tr("Soutenir le projet par un don"), this);
donate_ -> setStatusTip(tr("Soutenir le projet QElectroTech par un don", "status bar tip"));
@@ -129,6 +137,7 @@
help_menu_ -> addAction(manual_online_);
help_menu_ -> addAction(youtube_);
help_menu_ -> addAction(upgrade_);
+ help_menu_ -> addAction(upgrade_M);
help_menu_ -> addAction(donate_);
help_menu_ -> addAction(about_qt_);
@@ -137,7 +146,13 @@
#else
upgrade_ -> setVisible(false);
#endif
-
+
+#ifdef Q_OS_MAC
+upgrade_M -> setVisible(true);
+#else
+upgrade_M -> setVisible(false);
+#endif
+
insertMenu(0, settings_menu_);
insertMenu(0, help_menu_);
}
Modified: trunk/sources/qetmainwindow.h
===================================================================
--- trunk/sources/qetmainwindow.h 2016-09-25 16:57:12 UTC (rev 4724)
+++ trunk/sources/qetmainwindow.h 2016-09-26 00:46:02 UTC (rev 4725)
@@ -58,7 +58,8 @@
QAction *about_qet_; ///< Launch the "About QElectroTech" dialog
QAction *manual_online_; ///< Launch browser on QElectroTech online manual
QAction *youtube_; ///< Launch browser on QElectroTech Youtube channel
- QAction *upgrade_; ///< Launch browser on QElectroTech Windows Nightly builds
+ QAction *upgrade_; ///< Launch browser on QElectroTech Windows Nightly builds
+ QAction *upgrade_M; ///< Launch browser on QElectroTech MAC_OS_X builds
QAction *donate_; ///< Launch browser to donate link
QAction *about_qt_; ///< launch the "About Qt" dialog
QMenu *settings_menu_; ///< Settings menu