mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Replance Q_OS_MAC Deprecated by Q_OS_MACOS
This commit is contained in:
@@ -30,7 +30,7 @@ NameListDialog::NameListDialog(QWidget *parent) :
|
||||
|
||||
m_namelist_widget = new NameListWidget(this);
|
||||
ui->m_main_layout->insertWidget(1, m_namelist_widget);
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
this->setWindowFlags(Qt::Sheet);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ ConfigDialog::ConfigDialog(QWidget *parent) : QDialog(parent) {
|
||||
connect(buttons, SIGNAL(rejected()), this, SLOT(reject()));
|
||||
connect(pages_list, SIGNAL(currentRowChanged(int)), pages_widget, SLOT(setCurrentIndex(int)));
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
if (parent) {
|
||||
setWindowFlags(Qt::Sheet);
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ void DiagramPrintDialog::exec() {
|
||||
if (printer_choice_ -> isChecked()) {
|
||||
// affichage du dialogue d'impression standard pour parametrer l'imprimante
|
||||
QPrintDialog print_dialog(printer_, parentWidget());
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
print_dialog.setWindowFlags(Qt::Sheet);
|
||||
#endif
|
||||
print_dialog.setWindowTitle(tr("Options d'impression", "window title"));
|
||||
@@ -214,7 +214,7 @@ int DiagramPrintDialog::verticalPagesCount(Diagram *diagram, const ExportPropert
|
||||
void DiagramPrintDialog::buildPrintTypeDialog() {
|
||||
// initialisation des widgets
|
||||
dialog_ = new QDialog(parentWidget());
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
dialog_ -> setWindowFlags(Qt::Sheet);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -942,7 +942,7 @@ void DiagramView::editConductorColor(Conductor *edited_conductor)
|
||||
// prepare a color dialog showing the initial conductor color
|
||||
QColorDialog *color_dialog = new QColorDialog(this);
|
||||
color_dialog -> setWindowTitle(tr("Choisir la nouvelle couleur de ce conducteur"));
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
color_dialog -> setWindowFlags(Qt::Sheet);
|
||||
#endif
|
||||
color_dialog -> setCurrentColor(initial_properties.color);
|
||||
|
||||
@@ -688,7 +688,7 @@ void ElementScene::slot_editAuthorInformations() {
|
||||
// cree un dialogue
|
||||
QDialog dialog_author(m_element_editor);
|
||||
dialog_author.setModal(true);
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
dialog_author.setWindowFlags(Qt::Sheet);
|
||||
#endif
|
||||
dialog_author.setMinimumSize(400, 260);
|
||||
|
||||
@@ -49,7 +49,7 @@ ElementDialog::ElementDialog(uint mode, QWidget *parent) :
|
||||
void ElementDialog::setUpWidget()
|
||||
{
|
||||
setWindowModality(Qt::WindowModal);
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
setWindowFlags(Qt::Sheet);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -664,7 +664,7 @@ void ProjectView::exportProject() {
|
||||
if (!m_project) return;
|
||||
|
||||
ExportDialog ed(m_project, parentWidget());
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
ed.setWindowFlags(Qt::Sheet);
|
||||
#endif
|
||||
ed.exec();
|
||||
@@ -751,7 +751,7 @@ int ProjectView::cleanProject() {
|
||||
clean_categories -> setChecked(true);
|
||||
|
||||
QDialog clean_dialog(parentWidget());
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
clean_dialog.setWindowFlags(Qt::Sheet);
|
||||
#endif
|
||||
|
||||
@@ -838,7 +838,7 @@ void ProjectView::initLayout() {
|
||||
fallback_widget_layout_ -> addWidget(fallback_label_);
|
||||
|
||||
layout_ = new QVBoxLayout(this);
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
layout_ -> setContentsMargins(0, 8, 0, 0);
|
||||
#else
|
||||
layout_ -> setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
@@ -2210,7 +2210,7 @@ void QETDiagramEditor::generateTerminalBlock()
|
||||
//connect(process, SIGNAL(errorOcurred(int error)), this, SLOT(slot_generateTerminalBlock_error()));
|
||||
//process->start("qet_tb_generator");
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
if (openedProjects().count()){
|
||||
success = process->startDetached("/Library/Frameworks/Python.framework/Versions/3.5/bin/qet_tb_generator", {(QETDiagramEditor::currentProjectView()->project()->filePath())});
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ upgrade_ -> setVisible(true);
|
||||
upgrade_ -> setVisible(false);
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
upgrade_M -> setVisible(true);
|
||||
#else
|
||||
upgrade_M -> setVisible(false);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
@see Documentation Qt pour QMessageBox::critical
|
||||
*/
|
||||
QMessageBox::StandardButton QET::QetMessageBox::critical (QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton) {
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
QMessageBox message_box(QMessageBox::Critical, title, text, buttons, parent, Qt::Sheet);
|
||||
message_box.setWindowModality(Qt::WindowModal);
|
||||
#else
|
||||
@@ -36,7 +36,7 @@ QMessageBox::StandardButton QET::QetMessageBox::critical (QWidget *parent, con
|
||||
@see Documentation Qt pour QMessageBox::information
|
||||
*/
|
||||
QMessageBox::StandardButton QET::QetMessageBox::information(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton) {
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
QMessageBox message_box(QMessageBox::Information, title, text, buttons, parent, Qt::Sheet);
|
||||
message_box.setWindowModality(Qt::WindowModal);
|
||||
#else
|
||||
@@ -51,7 +51,7 @@ QMessageBox::StandardButton QET::QetMessageBox::information(QWidget *parent, con
|
||||
@see Documentation Qt pour QMessageBox::question
|
||||
*/
|
||||
QMessageBox::StandardButton QET::QetMessageBox::question (QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton) {
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
QMessageBox message_box(QMessageBox::Question, title, text, buttons, parent, Qt::Sheet);
|
||||
message_box.setWindowModality(Qt::WindowModal);
|
||||
#else
|
||||
@@ -66,7 +66,7 @@ QMessageBox::StandardButton QET::QetMessageBox::question (QWidget *parent, con
|
||||
@see Documentation Qt pour QMessageBox::warning
|
||||
*/
|
||||
QMessageBox::StandardButton QET::QetMessageBox::warning (QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton) {
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
QMessageBox message_box(QMessageBox::Warning, title, text, buttons, parent, Qt::Sheet);
|
||||
message_box.setWindowModality(Qt::WindowModal);
|
||||
#else
|
||||
|
||||
@@ -927,7 +927,7 @@ void QETTitleBlockTemplateEditor::editTemplateInformation() {
|
||||
|
||||
QDialog dialog_author(this);
|
||||
dialog_author.setModal(true);
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
dialog_author.setWindowFlags(Qt::Sheet);
|
||||
#endif
|
||||
dialog_author.setMinimumSize(400, 260);
|
||||
|
||||
@@ -42,7 +42,7 @@ DiagramPropertiesDialog::DiagramPropertiesDialog(Diagram *diagram, QWidget *pare
|
||||
ConductorProperties conductors = diagram -> defaultConductorProperties;
|
||||
|
||||
setWindowModality(Qt::WindowModal);
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
setWindowFlags(Qt::Sheet);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ void RotateTextsCommand::openDialog()
|
||||
//Open the dialog
|
||||
QDialog ori_text_dialog;
|
||||
ori_text_dialog.setSizeGripEnabled(false);
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_OS_MACOS
|
||||
ori_text_dialog.setWindowFlags(Qt::Sheet);
|
||||
#endif
|
||||
ori_text_dialog.setWindowTitle(QObject::tr("Orienter les textes sélectionnés", "window title"));
|
||||
|
||||
Reference in New Issue
Block a user