From 7cf6ecf498aa3203f97bc29e53bf456cac2e0c2d Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Thu, 31 Oct 2024 09:55:52 +0300 Subject: [PATCH 01/15] Allow execute context menu on tabdiagram scrollbars --- qucs/mouseactions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qucs/mouseactions.cpp b/qucs/mouseactions.cpp index 7d1a19175..ca5acfcd9 100644 --- a/qucs/mouseactions.cpp +++ b/qucs/mouseactions.cpp @@ -2157,7 +2157,8 @@ void MouseActions::editElement(Schematic *Doc, QMouseEvent *Event) case isDiagram: dia = (Diagram *) focusElement; - if (dia->Name.at(0) == 'T') { // don't open dialog on scrollbar + if (dia->Name.at(0) == 'T' // check only on double click + && Event->type() == QMouseEvent::MouseButtonDblClick) { // don't open dialog on scrollbar if (dia->Name == "Time") { if (dia->cy < int(fY)) { if (((TimingDiagram *) focusElement)->scroll(MAx1)) From ffd7f6622e164a8c928d57613fc94e72a5680c50 Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Thu, 31 Oct 2024 10:40:56 +0300 Subject: [PATCH 02/15] Fix ASCO execution error --- qucs/dialogs/simmessage.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/qucs/dialogs/simmessage.cpp b/qucs/dialogs/simmessage.cpp index 0dbdb2b16..defb46961 100644 --- a/qucs/dialogs/simmessage.cpp +++ b/qucs/dialogs/simmessage.cpp @@ -627,7 +627,6 @@ void SimMessage::startSimulator() QFile::link(target, tmp_qucsator); // Modify environment variable - QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); QString sep = ":"; env.insert("PATH", env.value("PATH") + sep + tmpdir); #endif From 7157a8a7efdc40c2ac2ddfc28f7d5e78e9fa1a68 Mon Sep 17 00:00:00 2001 From: Anton Midyukov Date: Fri, 1 Nov 2024 04:34:15 +0300 Subject: [PATCH 03/15] translations: Update source strings in TS files Signed-off-by: Anton Midyukov --- translations/qucs_ar.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_ca.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_cs.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_de.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_en.ts | 738 +++++++++++++++++++++++-------------- translations/qucs_es.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_fr.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_he.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_hu.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_it.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_ja.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_kk.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_pl.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_pt_BR.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_pt_PT.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_ro.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_ru.ts | 732 +++++++++++++++++++++++------------- translations/qucs_sv.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_tr.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_uk.ts | 736 ++++++++++++++++++++++-------------- translations/qucs_zh_CN.ts | 736 +++++++++++++++++++++++------------- 21 files changed, 9833 insertions(+), 5621 deletions(-) diff --git a/translations/qucs_ar.ts b/translations/qucs_ar.ts index 54c5b5a8c..1317a3dfc 100644 --- a/translations/qucs_ar.ts +++ b/translations/qucs_ar.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -550,7 +550,7 @@ تحرير خصائص العنصر - + Sweep الاجتياح @@ -562,13 +562,13 @@ - + display in schematic العرض التخطيطي - + Simulation: المحاكاة : @@ -619,18 +619,18 @@ - + Step: خطوة : - + Number: العدد : - + Properties الخصائص : @@ -712,26 +712,28 @@ - + - - + + + + yes نعم - - + + - + no لا - + Select a file تحديد ملف @@ -766,7 +768,7 @@ فيريلوج ملفات - + Points per decade: نقطة لكل عقد من الزمن : @@ -833,7 +835,7 @@ DiagramDialog - + Edit Diagram Properties تعديل خصائص الشكل البياني @@ -1364,18 +1366,18 @@ محاكاة - + Stop - + Save netlist - + Exit @@ -1385,12 +1387,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2054,7 +2056,7 @@ Filter synthesis program - + Error خطأ @@ -2064,7 +2066,7 @@ Filter synthesis program - + Enter a Data File Name إدخال البيانات اسم الملف @@ -2102,7 +2104,7 @@ Filter synthesis program ...خطأ : تنسيق ملف غير معروف! يرجى التحقق من اسم الملف تمديد! - + Running command line: @@ -2112,7 +2114,7 @@ Filter synthesis program خطأ : لا يمكن بدء المحول! - + Successfully converted file! @@ -2806,7 +2808,19 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2815,7 +2829,8 @@ Node name will not be changed. مقاومة -اوم - + + Error خطأ @@ -3045,82 +3060,82 @@ but is %1 ! - - + + linear double خطية مزدوجة - - - + + + logarithmic double المزدوج لوغاريتمي - - - + + + linear integer الخطي العددي - - + + logarithmic integer لوغاريتمي العددي - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add إضافة @@ -3158,47 +3173,47 @@ but is %1 ! - - + + minimize الحد الأدنى - - - + + + maximize الحد الأقصى - - - + + + less أقل - - - + + + greater أكبر - - - + + + equal تساوي - - + + monitor رصد - + Goals الأهداف @@ -3218,16 +3233,16 @@ but is %1 ! إلغاء - + - + yes نعم - + no @@ -3942,13 +3957,13 @@ but is %1 ! إنحياز ت - + for transient simulation: inductance in Henry للمحاكات الزائلة: تأثير هنرى - + for transient simulation: capacitance in Farad للمحاكات الزائلة: سعة المكثف فاراد @@ -3968,7 +3983,7 @@ but is %1 ! - + transfer function scaling factor @@ -3984,8 +3999,8 @@ but is %1 ! القطب تقاطع ترانزستور - - + + npn transistor npn ترانزستور @@ -3998,7 +4013,7 @@ but is %1 ! - + polarity قطبية @@ -4279,7 +4294,7 @@ but is %1 ! الافتراضي لمنطقة القطبين الترانزستور - + bipolar junction transistor with substrate الترانزستور الثنائي القطب تقاطع مع الركازة @@ -4577,13 +4592,13 @@ but is %1 ! - + - + - + @@ -4893,22 +4908,22 @@ Wrong 'component' line format! الطريقة حل مصفوفة الدارة - + dc block فك - + dc Block فك - + dc feed وصول مستمر - + dc Feed وصول مستمر @@ -4942,7 +4957,7 @@ Wrong 'component' line format! - + D-FlipFlop w/ SR @@ -5138,7 +5153,7 @@ Wrong 'component' line format! المنطقة الافتراضية للصمام الثنائي - + Diode صمام ثنائي @@ -6201,18 +6216,18 @@ Wrong 'component' line format! - + current equation المعادلة الحالية - - + + charge equation شحن المعادلة - + Equation Defined Device جهاز تحديد المعادلة @@ -6707,7 +6722,7 @@ Wrong 'component' line format! JFETالسطح الإفتراضي ل - + n-JFET n-JFET @@ -7371,7 +7386,7 @@ Wrong 'component' line format! - + n-MOSFET n-MOSFET @@ -7389,7 +7404,7 @@ Wrong 'component' line format! depletion MOSFET - + zero-bias threshold voltage عتبة الفولت معدومة @@ -7579,7 +7594,15 @@ Wrong 'component' line format! - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate @@ -7902,19 +7925,19 @@ Wrong 'component' line format! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8604,19 +8627,19 @@ Wrong 'component' line format! - + parameter equation متغير المعادلة - + Equation Defined RF Device RF تحديد معادلة لجهاز - + RF RF @@ -8781,7 +8804,7 @@ Wrong 'component' line format! S منفذ-2 ملف المتغير - + file الملف @@ -8806,7 +8829,7 @@ Wrong 'component' line format! spice - + ERROR: No file name in SPICE component "%1". خطأ : لا يوجد اسم الملف في عنصر SPICE في "٪ 1". @@ -8827,7 +8850,7 @@ Wrong 'component' line format! .خطأ : لا يمكن فتح ملف سبيس"%1"ء - + Info معلومات @@ -8858,7 +8881,7 @@ Wrong 'component' line format! ."%1" SPICE تحويل ملف - + subcircuit فرع الدائرة الكهربائية @@ -8868,7 +8891,7 @@ Wrong 'component' line format! اسم الملف في المخطط - + Subcircuit فرع الدائرة الكهربائية @@ -9279,12 +9302,12 @@ Wrong 'component' line format! مصدر الفولت مسيطر الفولت - + voltage controlled resistor - + resistance gain @@ -9316,7 +9339,7 @@ Wrong 'component' line format! - + ERROR: No file name in %1 component "%2". خطأ : لايوجد اسم الملف من %1 العنصر "٪ 2". @@ -9368,7 +9391,7 @@ Wrong 'component' line format! ملف مصدر الفولت - + VHDL file VHDLملف @@ -9379,13 +9402,13 @@ Wrong 'component' line format! VHDLإسم ملف - + vhdl vhdl - - + + generic variable @@ -9614,7 +9637,7 @@ Overwrite ? - + Successfully exported @@ -9631,7 +9654,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units خطأ : الوقت غير ملائم في شكل"%1". استخدامالإجابي لعدد الوحدات @@ -9639,8 +9662,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9738,16 +9761,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9759,7 +9782,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties تعديل خصائص @@ -9784,7 +9807,7 @@ Use PNG, JPEG or SVG graphics! مطابقة2-port - + The ground potential cannot be labeled! المحتملة في الميدان لا يمكن أن توصف! @@ -9794,7 +9817,7 @@ Use PNG, JPEG or SVG graphics! السهم - + Ellipse القطع الناقص @@ -9804,7 +9827,7 @@ Use PNG, JPEG or SVG graphics! شغل القطع الناقص - + Edit Ellipse Properties تعديل خصائص القطع الناقص @@ -9814,7 +9837,7 @@ Use PNG, JPEG or SVG graphics! Elliptic Arc - + Edit Arc Properties تعديل خصائص القوس @@ -9824,7 +9847,7 @@ Use PNG, JPEG or SVG graphics! الخط - + Edit Line Properties تعديل خصائص الخط @@ -9844,7 +9867,7 @@ Use PNG, JPEG or SVG graphics! شغل مستطيل - + Edit Rectangle Properties تعديل خصائص مستطيل @@ -9863,7 +9886,7 @@ Use PNG, JPEG or SVG graphics! بدون عنوان - + Format Error: 'Painting' field is not closed! @@ -10019,8 +10042,8 @@ Wrong 'painting' line format! - - + + @@ -10045,7 +10068,7 @@ Unknown field! خطأ في تنسيق ملف :حقل مجهول! - + ERROR: Component "%1" has no analog model. خطأ : العنصر "٪ 1" ليس لديها نموذج التناظرية. @@ -11231,7 +11254,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11337,24 +11360,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11817,7 +11840,7 @@ Active Filter synthesis program QucsApp - + Schematic تخطيطي @@ -11833,47 +11856,47 @@ Active Filter synthesis program - + VHDL Sources مصادر VHDL - - + + Verilog Sources مصادر verilog - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File أية ملفات - + The schematic search path has been refreshed. - + Verilog فيريلوج @@ -11883,7 +11906,7 @@ Active Filter synthesis program VHDL - + Open file @@ -11893,7 +11916,7 @@ Active Filter synthesis program - + Open example… @@ -11908,24 +11931,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics الخطط - + New جديد @@ -11999,7 +12022,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo مضمون المشروع الحالي - + Search Components @@ -12036,8 +12059,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -12048,29 +12071,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -12079,43 +12102,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo خطأ - + Cannot open "%1". لا نستطيع فتح "%1. - + Library is corrupt. المكتبة فاسدة. - - - - - - - - - - - + + + + + + + + + + + - + Info معلومات - + Default icon not found: %1.png - + -port -الميناء @@ -12126,14 +12149,14 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! وتتضمن هذه الوثيقة التغييرات غير المحفوظة! - + Do you want to save the changes before copying? @@ -12173,17 +12196,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo لا يمكن حذف ملف مفتوح! - - - - - - + + + + + + Warning تحذير - + This will delete the file permanently! Continue ? حذف هذا الملف نهائيا! الاستمرار؟ @@ -12246,12 +12269,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! لا يمكن إنشاء دليل عمل! - + Cannot create project directory ! لا يمكن إنشاء دليل للمشروع! @@ -12264,7 +12287,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo -المشروع : - + Choose Project Directory for Opening اختيار مشروع دليل لافتتاح @@ -12274,13 +12297,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo لم يتم اختيار المشروع! - + Cannot delete file: %1 - - + + @@ -12288,12 +12311,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -12303,12 +12326,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -12343,12 +12366,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12392,35 +12415,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo تخطيطية جديدة... - - + + + - - + - + - + Ready. جاهز. - + Creating new text editor... محرر نصوص جديدة... - - + + Opening file... فتح الملف... @@ -12507,7 +12530,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo حفظ الملف... - + Closing file... إغلاق ملف... @@ -12526,7 +12549,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo & تجاهل - + untitled بدون عنوان @@ -12556,7 +12579,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12566,7 +12589,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12605,7 +12628,7 @@ Use subcircuit to crete Verilog-A module! هل تريد حقا الانسحاب؟ - + The document was modified by another program ! الوثيقة التي تم تعديلها من خلال برنامج آخر! @@ -12623,7 +12646,7 @@ Use subcircuit to crete Verilog-A module! يبقيها - + Cannot create لا نستطيع تنفيذ @@ -12638,7 +12661,7 @@ Use subcircuit to crete Verilog-A module! لا يمكن ان تبدأ "٪ 1"! - + Could not load S[1,1]. لا يمكن تحميل S[1,1]. @@ -12663,7 +12686,7 @@ Use subcircuit to crete Verilog-A module! من الخطأ الاعتماد! - + Cutting selection... قطع اختيار... @@ -12673,17 +12696,17 @@ Use subcircuit to crete Verilog-A module! نسخ إلى الحافظة اختيار... - - - - - - + + + + + + At least two elements must be selected ! يجب إختيار إثنين علي الأقل ! - + Opening aborted, file not found. @@ -12705,7 +12728,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12785,7 +12808,7 @@ Overwrite ? لا تستطيع كتابة "٪ 1"! - + Please open project with subcircuits! !يرجى فتح المشروع الدارة الفرعية @@ -12794,7 +12817,7 @@ Overwrite ? افتح أولا مشروع من فضلك! - + Please select a diagram graph! الرجاء اختيار الرسم البياني! @@ -12852,7 +12875,7 @@ Have you saved the Verilog-A symbols? - + &New &عرض @@ -13673,7 +13696,24 @@ Create Library from Subcircuits إنشاء مكتبة من Subcircuits - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S @@ -13727,7 +13767,7 @@ Convert data file to various file formats - + Export to &CSV... تصدير إلى &CSV... @@ -14022,7 +14062,7 @@ Rotates the selected component by 90� counter-clockwise - + Power combining Starts power combining calculation program @@ -14117,7 +14157,7 @@ Rotates the selected component by 90° counter-clockwise دوران العنصر المختار ب° 90 - + Mirror about X Axis مرآة المحور ْX @@ -14309,12 +14349,7 @@ Inserts a port symbol سلك - - Ctrl+E - - - - + Inserts a wire إضافة السلك @@ -14534,13 +14569,13 @@ Starts attenuator calculation program بدأ حساب البرنامج المخفف - - + + Simulate محاكاة - + Simulates the current schematic تمثيل التخطيط الحالي @@ -14840,7 +14875,7 @@ About Qt by Trolltech &أدوات - + Compact modelling @@ -14925,68 +14960,82 @@ Open QucsAttenuator + &File ‏‏&ملف + &Quit خروج& + + &Help مساعدة‏&‏ + &About + About Qt... عن كيو تي... + Topology طوبولوجيا + Input مدخلات + Attenuation: تخفيف : + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by @@ -14996,11 +15045,13 @@ Open + dB dB + Zin: Zin: @@ -15014,6 +15065,7 @@ Open + Zout: Zout: @@ -15023,11 +15075,13 @@ Open + Output يحرر + R1: R1 : @@ -15040,16 +15094,26 @@ Open + + + + + + + + -- -- + R2: R2 : + R3: R3: @@ -15059,26 +15123,31 @@ Open + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt عن كيو تي + About... حول... + Attenuator synthesis program @@ -15089,6 +15158,8 @@ Attenuator synthesis program + + Copyright (C) 2006 by حقوق الطبع محفوظة 2006 من قبل @@ -15098,6 +15169,7 @@ Attenuator synthesis program + Error: Set Attenuation less than %1 dB @@ -16562,6 +16634,134 @@ open files with an appropriate program. خط نقل من نوع غير متوفرة. + + Qucs_S_SPAR_Viewer + + + &File + ‏‏&ملف + + + + &Quit + + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + + + + + &About + + + + + About Qt... + + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + عن كيو تي + + + + About... + حول... + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + تحذير + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + خطأ + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16603,7 +16803,7 @@ open files with an appropriate program. Schematic - + Title العنوان @@ -16659,12 +16859,12 @@ Edits the symbol for this schematic تعديلات لهذا الرمز التخطيطي - + generic - + Error خطأ @@ -16682,7 +16882,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16980,7 +17180,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -17221,7 +17421,7 @@ Set the admsXml location on the application settings. جميع الملفات - + Info معلومات diff --git a/translations/qucs_ca.ts b/translations/qucs_ca.ts index 97eea33ab..d1387c0ab 100644 --- a/translations/qucs_ca.ts +++ b/translations/qucs_ca.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -582,7 +582,7 @@ Editar les propietats del component - + Sweep Escombrat @@ -594,13 +594,13 @@ - + display in schematic mostrar a l'esquema - + Simulation: Simulació: @@ -651,18 +651,18 @@ - + Step: Pas: - + Number: Número: - + Properties Propietats @@ -744,26 +744,28 @@ - + - - + + + + yes Si - - + + - + no no - + Select a file Seleccionar un fitxer @@ -798,7 +800,7 @@ Arxius verilog - + Points per decade: Punts por dècada: @@ -865,7 +867,7 @@ DiagramDialog - + Edit Diagram Properties Editar les propietats del diagrama @@ -1396,18 +1398,18 @@ Simular - + Stop - + Save netlist - + Exit Sortir @@ -1417,12 +1419,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2213,7 +2215,7 @@ Programa de síntexis de filtros Qualsevol arxiu - + Error Error @@ -2223,7 +2225,7 @@ Programa de síntexis de filtros - + Enter a Data File Name Introduiu un nom d'Fitxer de Dades @@ -2261,7 +2263,7 @@ Programa de síntexis de filtros ERROR: Format de fitxer desconegut. Comproveu l'extensió del nom del fitxer! - + Running command line: Executant línia de comandes: @@ -2271,7 +2273,7 @@ Programa de síntexis de filtros ERROR: No es pot iniciar el convertidor - + Successfully converted file! Arxiu convertit amb èxit! @@ -2971,7 +2973,19 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2980,7 +2994,8 @@ Node name will not be changed. Impedancia (ohms) - + + Error Error @@ -3235,82 +3250,82 @@ Programa de càlcul del codi de colors de resistències - - + + linear double lineal doble - - - + + + logarithmic double logarítmic doble - - - + + + linear integer - - + + logarithmic integer - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add Afegir @@ -3348,47 +3363,47 @@ Programa de càlcul del codi de colors de resistències - - + + minimize minimitzar - - - + + + maximize maximitzar - - - + + + less menor - - - + + + greater major - - - + + + equal igual - - + + monitor monitor - + Goals Objectius @@ -3408,16 +3423,16 @@ Programa de càlcul del codi de colors de resistències Cancel·lar - + - + yes sim - + no @@ -4133,13 +4148,13 @@ Programa de càlcul del codi de colors de resistències polarización t - + for transient simulation: inductance in Henry para simulación transitoria: inductancia en Henrios - + for transient simulation: capacitance in Farad para simulación transitoria: capacidad en Faradios @@ -4159,7 +4174,7 @@ Programa de càlcul del codi de colors de resistències - + transfer function scaling factor factor d'escala de la funció de transferència @@ -4175,8 +4190,8 @@ Programa de càlcul del codi de colors de resistències transistor de unión bipolar - - + + npn transistor transitor npn @@ -4189,7 +4204,7 @@ Programa de càlcul del codi de colors de resistències - + polarity polaridad @@ -4470,7 +4485,7 @@ Programa de càlcul del codi de colors de resistències area predeterminada para el transistor bipolar - + bipolar junction transistor with substrate transistor de unión bipolar amb substrato @@ -4768,13 +4783,13 @@ Programa de càlcul del codi de colors de resistències - + - + - + @@ -5084,22 +5099,22 @@ Wrong 'component' line format! método para resolver la matriz del circuito - + dc block bloque dc - + dc Block Bloque dc - + dc feed alimentación dc - + dc Feed Alimentación dc @@ -5133,7 +5148,7 @@ Wrong 'component' line format! - + D-FlipFlop w/ SR D-FlipFlop w/ SR @@ -5329,7 +5344,7 @@ Wrong 'component' line format! area predeterminada para el diodo - + Diode Diodo @@ -6244,18 +6259,18 @@ Wrong 'component' line format! - + current equation - - + + charge equation - + Equation Defined Device @@ -6750,7 +6765,7 @@ Wrong 'component' line format! area predeterminada para JFET - + n-JFET JFET-n @@ -7410,7 +7425,7 @@ Wrong 'component' line format! transistor de efecto de campo MOS - + n-MOSFET MOSFET-n @@ -7428,7 +7443,7 @@ Wrong 'component' line format! - + zero-bias threshold voltage tensión umbral de polarización @@ -7618,7 +7633,15 @@ Wrong 'component' line format! perímetro de la unión del surtidor - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate @@ -7941,19 +7964,19 @@ Wrong 'component' line format! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8643,19 +8666,19 @@ Wrong 'component' line format! - + parameter equation - + Equation Defined RF Device - + RF RF @@ -8820,7 +8843,7 @@ Wrong 'component' line format! fitxer de parámetros S de 2-conexiones - + file fitxer @@ -8845,7 +8868,7 @@ Wrong 'component' line format! spice - + ERROR: No file name in SPICE component "%1". ERROR: Sin nombre de fitxer en el componente SPICE "%1". @@ -8866,7 +8889,7 @@ Wrong 'component' line format! - + Info Información @@ -8897,7 +8920,7 @@ Wrong 'component' line format! Convertint l'arxiu de SPICE "%1". - + subcircuit subcircuit @@ -8907,7 +8930,7 @@ Wrong 'component' line format! nombre del fitxer del esquema qucs - + Subcircuit Subcircuito @@ -9318,12 +9341,12 @@ Wrong 'component' line format! fuente de tensión controlada por tensión - + voltage controlled resistor - + resistance gain @@ -9355,7 +9378,7 @@ Wrong 'component' line format! - + ERROR: No file name in %1 component "%2". @@ -9407,7 +9430,7 @@ Wrong 'component' line format! - + VHDL file Fitxer VHDL @@ -9418,13 +9441,13 @@ Wrong 'component' line format! Nom del fitxer VHDL - + vhdl vhdl - - + + generic variable @@ -9651,7 +9674,7 @@ Overwrite ? - + Successfully exported @@ -9668,7 +9691,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units Error: Formato incorrecto de fecha en "%1". Usa números positivos amb unidades @@ -9676,8 +9699,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9775,16 +9798,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9796,7 +9819,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties Editar Propietats @@ -9821,7 +9844,7 @@ Use PNG, JPEG or SVG graphics! adaptación de 2 conexiones - + The ground potential cannot be labeled! ¡El potencial de tierra no se puede etiquetar! @@ -9831,7 +9854,7 @@ Use PNG, JPEG or SVG graphics! Flecha - + Ellipse Elipse @@ -9841,7 +9864,7 @@ Use PNG, JPEG or SVG graphics! Elipse rellena - + Edit Ellipse Properties Editar les propietats de la Elipse @@ -9851,7 +9874,7 @@ Use PNG, JPEG or SVG graphics! Arco elíptico - + Edit Arc Properties Editar les propietats del Arco @@ -9861,7 +9884,7 @@ Use PNG, JPEG or SVG graphics! Línea - + Edit Line Properties Editar les propietats de la Línea @@ -9881,7 +9904,7 @@ Use PNG, JPEG or SVG graphics! Rectángulo relleno - + Edit Rectangle Properties Editar les propietats del Rectángulo @@ -9900,7 +9923,7 @@ Use PNG, JPEG or SVG graphics! sinTítulo - + Format Error: 'Painting' field is not closed! @@ -10056,8 +10079,8 @@ Wrong 'painting' line format! - - + + @@ -10082,7 +10105,7 @@ Unknown field! Error de formato de fitxer: ¡Campo desconocido! - + ERROR: Component "%1" has no analog model. ERROR: El componente "%1" no tiene modelo analógico. @@ -11268,7 +11291,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11374,24 +11397,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11854,7 +11877,7 @@ Active Filter synthesis program QucsApp - + Schematic Esquema @@ -11870,47 +11893,47 @@ Active Filter synthesis program - + VHDL Sources Fuentes VHDL - - + + Verilog Sources - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File Qualsevol Fitxer - + The schematic search path has been refreshed. - + Verilog Verilog @@ -11920,7 +11943,7 @@ Active Filter synthesis program VHDL - + Open file @@ -11930,7 +11953,7 @@ Active Filter synthesis program - + Open example… @@ -11945,24 +11968,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics Esquemas - + New Nou @@ -12036,7 +12059,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo contenido del proyecto actual - + Search Components @@ -12073,8 +12096,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -12085,29 +12108,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -12116,43 +12139,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Error - + Cannot open "%1". No puedo abrir "%1". - + Library is corrupt. La librería está corrupta. - - - - - - - - - - - + + + + + + + + + + + - + Info Información - + Default icon not found: %1.png - + -port -conexiones @@ -12163,7 +12186,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! ¡El document contiene cambios no guardados! @@ -12171,7 +12194,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Do you want to save the changes before copying? @@ -12211,17 +12234,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo ¡No puedo eliminar un fitxer abierto! - - - - - - + + + + + + Warning Aviso - + This will delete the file permanently! Continue ? ¡Esto eliminará el fitxer para siempre! ¿Continuo? @@ -12284,12 +12307,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! ¡No puedo crear el directorio de trabajo! - + Cannot create project directory ! ¡No puedo crear el directorio del proyecto! @@ -12302,7 +12325,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - Proyecto: - + Choose Project Directory for Opening Elija el directorio de proyecto a abrir @@ -12312,13 +12335,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo ¡No se ha seleccionado un proyecto! - + Cannot delete file: %1 - - + + @@ -12326,12 +12349,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -12341,12 +12364,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -12381,12 +12404,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12430,35 +12453,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Creando un nuevo esquema... - - + + + - - + - + - + Ready. Listo. - + Creating new text editor... Creando un nuevo editor de texts... - - + + Opening file... Abriendo fitxer... @@ -12545,7 +12568,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Guardando todos els fitxers... - + Closing file... Cerrando el fitxer... @@ -12564,7 +12587,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo &Descartar - + untitled sinTítulo @@ -12594,7 +12617,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12604,7 +12627,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12643,7 +12666,7 @@ Use subcircuit to crete Verilog-A module! ¿Seguro que desea salir? - + The document was modified by another program ! ¡ Otro programa ha modificado el document ! @@ -12661,7 +12684,7 @@ Use subcircuit to crete Verilog-A module! Mantenerlo - + Cannot create No puedo crear @@ -12676,7 +12699,7 @@ Use subcircuit to crete Verilog-A module! ¡No puedo arrancar "%1"! - + Could not load S[1,1]. No pude cargar S[1,1]. @@ -12701,7 +12724,7 @@ Use subcircuit to crete Verilog-A module! ¡Dependencia incorrecta! - + Cutting selection... Cortando la selección... @@ -12711,17 +12734,17 @@ Use subcircuit to crete Verilog-A module! Copiando la selección al portapapeles... - - - - - - + + + + + + At least two elements must be selected ! ¡Al menys deben seleccionarse dos elementos! - + Opening aborted, file not found. @@ -12743,7 +12766,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12823,7 +12846,7 @@ Overwrite ? ¡No puedo escribir "%1"! - + Please open project with subcircuits! ¡Abra un proyecto amb subcircuits! @@ -12832,7 +12855,7 @@ Overwrite ? ¡Abra antes un proyecto! - + Please select a diagram graph! ¡Seleccione un gráfico de diagramas! @@ -12890,7 +12913,7 @@ Have you saved the Verilog-A symbols? - + &New &Nou @@ -13707,7 +13730,24 @@ Create Library from Subcircuits Crear Biblioteca a partir de Subcircuitos - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S @@ -13761,7 +13801,7 @@ Convert data file to various file formats - + Export to &CSV... Exportar a &CSV... @@ -14056,7 +14096,7 @@ Rota el elemento seleccionado 90º en el sentido de les agujas del reloj {90�? - + Power combining Starts power combining calculation program @@ -14151,7 +14191,7 @@ Rotates the selected component by 90° counter-clockwise Rota el elemento seleccionado 90º en el sentido de les agujas del reloj - + Mirror about X Axis Reflejar sobre el eje x @@ -14343,12 +14383,7 @@ Inserta un símbolo de conexión Cable - - Ctrl+E - - - - + Inserts a wire @@ -14568,13 +14603,13 @@ Starts attenuator calculation program Arranca el programa de cálculo de atenuadores - - + + Simulate Simular - + Simulates the current schematic Simula el esquema actual @@ -14876,7 +14911,7 @@ Acerca de Qt por Trolltech &Herramientas - + Compact modelling @@ -14961,68 +14996,82 @@ Open QucsAttenuator + &File &Fitxer + &Quit &Salir + + &Help &Ajuda + &About + About Qt... Acerca de Qt... + Topology Topología + Input Entrada + Attenuation: Atenuación: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by @@ -15032,11 +15081,13 @@ Open + dB dB + Zin: Zentrada: @@ -15050,6 +15101,7 @@ Open + Zout: Zsalida: @@ -15059,11 +15111,13 @@ Open + Output Sortida + R1: R1: @@ -15076,16 +15130,26 @@ Open + + + + + + + + -- -- + R2: R2: + R3: R3: @@ -15095,26 +15159,31 @@ Open + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt Acerca de Qt + About... Acerca de... + Attenuator synthesis program @@ -15125,6 +15194,8 @@ Programa de síntesis de atenuadores + + Copyright (C) 2006 by Copyright (C) 2006 por @@ -15134,6 +15205,7 @@ Programa de síntesis de atenuadores + Error: Set Attenuation less than %1 dB @@ -16557,6 +16629,134 @@ abrir els fitxers amb el programa apropiado. No disponible ese tipo de línea de transmisión. + + Qucs_S_SPAR_Viewer + + + &File + &Fitxer + + + + &Quit + &Salir + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + &Ajuda + + + + &About + + + + + About Qt... + Acerca de Qt... + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + Acerca de Qt + + + + About... + Acerca de... + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + Aviso + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Error + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16598,7 +16798,7 @@ abrir els fitxers amb el programa apropiado. Schematic - + Title Título @@ -16654,12 +16854,12 @@ Edits the symbol for this schematic Edita els símboels de este esquema - + generic - + Error Error @@ -16677,7 +16877,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16975,7 +17175,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -17218,7 +17418,7 @@ Set the admsXml location on the application settings. Tots els Fitxers - + Info Información diff --git a/translations/qucs_cs.ts b/translations/qucs_cs.ts index 7768b7398..be61f917b 100644 --- a/translations/qucs_cs.ts +++ b/translations/qucs_cs.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -551,7 +551,7 @@ Změnit vlastnosti komponent - + Sweep Sweep @@ -563,13 +563,13 @@ - + display in schematic zobrazit ve schématu - + Simulation: simulace: @@ -620,18 +620,18 @@ - + Step: délka kroku: - + Number: počet: - + Properties Vlastnosti @@ -713,26 +713,28 @@ - + - - + + + + yes ano - - + + - + no ne - + Select a file vyber soubor @@ -767,7 +769,7 @@ Verilog soubory - + Points per decade: bodů na dekádu: @@ -834,7 +836,7 @@ DiagramDialog - + Edit Diagram Properties @@ -1361,18 +1363,18 @@ Simulovat - + Stop - + Save netlist - + Exit @@ -1382,12 +1384,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2043,7 +2045,7 @@ program pro syntézu filtru - + Error Chyba @@ -2053,7 +2055,7 @@ program pro syntézu filtru - + Enter a Data File Name Vlož jméno datového souboru @@ -2091,7 +2093,7 @@ program pro syntézu filtru CHYBA: neznámý formát souboru! Zkontrolujte příponu souboru! - + Running command line: @@ -2101,7 +2103,7 @@ program pro syntézu filtru CHYBA: Nelze spustit převaděč! - + Successfully converted file! @@ -2795,7 +2797,19 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2804,7 +2818,8 @@ Node name will not be changed. Impedance (Ohmů) - + + Error Chyba @@ -3035,82 +3050,82 @@ je ale %1 ! - - + + linear double - - - + + + logarithmic double - - - + + + linear integer - - + + logarithmic integer - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add Přidat @@ -3148,47 +3163,47 @@ je ale %1 ! - - + + minimize minimalizovat - - - + + + maximize maximalizovat - - - + + + less - - - + + + greater větší - - - + + + equal rovno - - + + monitor monitor - + Goals Cíle @@ -3208,16 +3223,16 @@ je ale %1 ! Zrušit - + - + yes ano - + no @@ -3932,13 +3947,13 @@ je ale %1 ! Bias T - + for transient simulation: inductance in Henry pro přechodovou simulaci: induktivita v Henry - + for transient simulation: capacitance in Farad pro přechodovou simulaci: kapazität ve faradech @@ -3958,7 +3973,7 @@ je ale %1 ! - + transfer function scaling factor @@ -3974,8 +3989,8 @@ je ale %1 ! bipolární tranzistor - - + + npn transistor npn tranzistor @@ -3988,7 +4003,7 @@ je ale %1 ! - + polarity polarita @@ -4269,7 +4284,7 @@ je ale %1 ! plošný faktor bipolárního tranzistoru - + bipolar junction transistor with substrate bipolární tranzistor mit Substratanschluss @@ -4567,13 +4582,13 @@ je ale %1 ! - + - + - + @@ -4883,22 +4898,22 @@ Chybný řádkový formát 'component' ! Metoda pro řešení matice zapojení obvodu - + dc block DC blokace - + dc Block DC uzávěra - + dc feed DC přívod - + dc Feed DC přívod @@ -4932,7 +4947,7 @@ Chybný řádkový formát 'component' ! - + D-FlipFlop w/ SR @@ -5128,7 +5143,7 @@ Chybný řádkový formát 'component' ! plošný faktor diody - + Diode Dioda @@ -5995,18 +6010,18 @@ Chybný řádkový formát 'component' ! - + current equation - - + + charge equation - + Equation Defined Device @@ -6501,7 +6516,7 @@ Chybný řádkový formát 'component' ! plošný faktor JFETu - + n-JFET n-JFET @@ -7161,7 +7176,7 @@ Chybný řádkový formát 'component' ! MOS polem řízený tranzistor - + n-MOSFET n-MOSFET @@ -7179,7 +7194,7 @@ Chybný řádkový formát 'component' ! MOSFET (depletion) - + zero-bias threshold voltage nulové prahové napětí @@ -7369,7 +7384,15 @@ Chybný řádkový formát 'component' ! obvod závěrného přechodu source - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate @@ -7692,19 +7715,19 @@ Chybný řádkový formát 'component' ! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8394,19 +8417,19 @@ Chybný řádkový formát 'component' ! - + parameter equation - + Equation Defined RF Device - + RF @@ -8571,7 +8594,7 @@ Chybný řádkový formát 'component' ! 2-port S parameter soubor - + file soubor @@ -8596,7 +8619,7 @@ Chybný řádkový formát 'component' ! spice - + ERROR: No file name in SPICE component "%1". CHYBA: ve SPICE-komponentě "%1" není zadán žádný název souboru. @@ -8617,7 +8640,7 @@ Chybný řádkový formát 'component' ! - + Info Info @@ -8648,7 +8671,7 @@ Chybný řádkový formát 'component' ! Převod SPICE souboru "%1". - + subcircuit podobvod @@ -8658,7 +8681,7 @@ Chybný řádkový formát 'component' ! Jméno souboru elektrického schématu formátu Qucs - + Subcircuit Podobvod @@ -9069,12 +9092,12 @@ Chybný řádkový formát 'component' ! napěťově řízený zdroj napětí - + voltage controlled resistor - + resistance gain @@ -9106,7 +9129,7 @@ Chybný řádkový formát 'component' ! - + ERROR: No file name in %1 component "%2". @@ -9158,7 +9181,7 @@ Chybný řádkový formát 'component' ! - + VHDL file VHDL soubor @@ -9169,13 +9192,13 @@ Chybný řádkový formát 'component' ! Jméno VHDL souboru - + vhdl VHDL - - + + generic variable @@ -9402,7 +9425,7 @@ Přepsat ? - + Successfully exported @@ -9419,7 +9442,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units Chyba: Chybný časový formát v "%1". Použijte kladné číslo s jednotkami @@ -9427,8 +9450,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9526,16 +9549,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9547,7 +9570,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties Upravit vlastnosti @@ -9572,7 +9595,7 @@ Use PNG, JPEG or SVG graphics! 2-port přizpůsobení - + The ground potential cannot be labeled! Uzemnění nelze pojmenovat! @@ -9582,7 +9605,7 @@ Use PNG, JPEG or SVG graphics! Šipka - + Ellipse Elipsa @@ -9592,7 +9615,7 @@ Use PNG, JPEG or SVG graphics! vyplněná elipsa - + Edit Ellipse Properties Změnit vlastnosti elipsy @@ -9602,7 +9625,7 @@ Use PNG, JPEG or SVG graphics! Eliptický oblouk - + Edit Arc Properties změnit parametry oblouku @@ -9612,7 +9635,7 @@ Use PNG, JPEG or SVG graphics! Čára - + Edit Line Properties Změnit vlastnosti čáry @@ -9632,7 +9655,7 @@ Use PNG, JPEG or SVG graphics! vyplněný obdélník - + Edit Rectangle Properties Změnit vlastnosti obdélníku @@ -9651,7 +9674,7 @@ Use PNG, JPEG or SVG graphics! nepojmenováno - + Format Error: 'Painting' field is not closed! @@ -9807,8 +9830,8 @@ Chybný formát řádku v 'grafických objektů'! - - + + @@ -9834,7 +9857,7 @@ Unknown field! Neznámá položka! - + ERROR: Component "%1" has no analog model. CHYBA: Komponenta "%1" neobsahuje žádný analogový model. @@ -11021,7 +11044,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11127,24 +11150,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11607,7 +11630,7 @@ Active Filter synthesis program QucsApp - + Schematic Schéma @@ -11623,47 +11646,47 @@ Active Filter synthesis program - + VHDL Sources VHDL zdroje - - + + Verilog Sources Verilog data - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File Všechny soubory - + The schematic search path has been refreshed. - + Verilog @@ -11673,7 +11696,7 @@ Active Filter synthesis program VHDL - + Open file @@ -11683,7 +11706,7 @@ Active Filter synthesis program - + Open example… @@ -11698,24 +11721,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics Schémata - + New Nový @@ -11789,7 +11812,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo obsah aktuálního projektu - + Search Components @@ -11826,8 +11849,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -11838,29 +11861,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -11869,43 +11892,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Chyba - + Cannot open "%1". Soubor "%1" nelze otevřít. - + Library is corrupt. Soubor s knihovnou je poškozen. - - - - - - - - - - - + + + + + + + + + + + - + Info Informace - + Default icon not found: %1.png - + -port -port @@ -11916,14 +11939,14 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! Dokument obsahuje neuložené změny! - + Do you want to save the changes before copying? @@ -11963,17 +11986,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Otevřený soubor nemůže být smazán! - - - - - - + + + + + + Warning Upozornění - + This will delete the file permanently! Continue ? Soubor bude nenávratně smazán! Pokračovat ? @@ -12036,12 +12059,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! Pracovní adresář nelze vytvořit ! - + Cannot create project directory ! Adresář s projektem nelze vytvořit ! @@ -12054,7 +12077,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - Projekt: - + Choose Project Directory for Opening Výbrat k otevření adresář s projektem @@ -12064,13 +12087,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Nejsou vybrány žádné projekty ! - + Cannot delete file: %1 - - + + @@ -12078,12 +12101,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -12093,12 +12116,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -12133,12 +12156,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12182,35 +12205,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Vytvořit nové schéma... - - + + + - - + - + - + Ready. Hotovo. - + Creating new text editor... Vytvoření nového textového editoru... - - + + Opening file... Otevřít soubor... @@ -12297,7 +12320,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Uložit všechny soubory... - + Closing file... Uzavřít soubor... @@ -12316,7 +12339,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo &Zrušit - + untitled nepojmenováno @@ -12346,7 +12369,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12356,7 +12379,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12395,7 +12418,7 @@ Use subcircuit to crete Verilog-A module! Chcete program skutečně ukončit? - + The document was modified by another program ! Dokument byl modifikován jiným programem ! @@ -12413,7 +12436,7 @@ Use subcircuit to crete Verilog-A module! Ponechat - + Cannot create nelze vytvořit @@ -12428,7 +12451,7 @@ Use subcircuit to crete Verilog-A module! Program "%1" nelze spustit! - + Could not load S[1,1]. Datovou sadu S[1,1] nelze otevřít. @@ -12453,7 +12476,7 @@ Use subcircuit to crete Verilog-A module! Chybná závislost! - + Cutting selection... Vyříznout výběr... @@ -12463,17 +12486,17 @@ Use subcircuit to crete Verilog-A module! Zkopírovat výběr do schránky... - - - - - - + + + + + + At least two elements must be selected ! K tomuto úkonu musí být vybrány minimálně dva Elementy ! - + Opening aborted, file not found. @@ -12495,7 +12518,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12575,7 +12598,7 @@ Přepsat ? Soubor "%1" nelze uložit ! - + Please open project with subcircuits! Je nutné otevřít projekt s podobvody! @@ -12584,7 +12607,7 @@ Přepsat ? Je nutné nejdříve otevřít projekt! - + Please select a diagram graph! Prosím vybrat diagram nebo graf! @@ -12642,7 +12665,7 @@ Have you saved the Verilog-A symbols? - + &New &Nový @@ -13463,7 +13486,24 @@ Create Library from Subcircuits Vytvořit knihovnu z podobvodů - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S @@ -13515,7 +13555,7 @@ Convert data file to various file formats - + Export to &CSV... Vyexportovat do &CSV... @@ -13810,7 +13850,7 @@ Otočí vybrané komponenty o 90° doleva {90�?} - + Power combining Starts power combining calculation program @@ -13905,7 +13945,7 @@ Rotates the selected component by 90° counter-clockwise Otočí vybrané komponenty o 90° doleva - + Mirror about X Axis Ozrcadlit podle x-ové osy @@ -14097,12 +14137,7 @@ Vloží symbol připojení Vodič - - Ctrl+E - - - - + Inserts a wire Vložit vodič @@ -14322,13 +14357,13 @@ Starts attenuator calculation program Spustit podprogram pro výpočet atenuátoru - - + + Simulate Simulovat - + Simulates the current schematic Simuluje aktuální obvod @@ -14630,7 +14665,7 @@ O aplikačním prostředí QT od firmy Trolltech &Nástroje - + Compact modelling @@ -14715,68 +14750,82 @@ Open QucsAttenuator + &File &Soubor + &Quit &Ukončit + + &Help &Nápověda + &About + About Qt... O prostředí Qt... + Topology Topologie + Input Vstup + Attenuation: Útlum: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by @@ -14786,11 +14835,13 @@ Open + dB + Zin: Zin: @@ -14804,6 +14855,7 @@ Open + Zout: Zout: @@ -14813,11 +14865,13 @@ Open + Output Výstup + R1: R1: @@ -14830,16 +14884,26 @@ Open + + + + + + + + -- + R2: R2: + R3: R3: @@ -14849,26 +14913,31 @@ Open + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt O prostředí Qt + About... O programu... + Attenuator synthesis program @@ -14879,6 +14948,8 @@ Program pro návrh atenuátoru + + Copyright (C) 2006 by Copyright (C) 2006 : @@ -14888,6 +14959,7 @@ Program pro návrh atenuátoru + Error: Set Attenuation less than %1 dB @@ -16359,6 +16431,134 @@ soubory automaticky otevírat s odpovídajícími programy. Tento typ vedení není k dispozici. + + Qucs_S_SPAR_Viewer + + + &File + &Soubor + + + + &Quit + &Ukončit + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + &Nápověda + + + + &About + + + + + About Qt... + + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + + + + + About... + + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Chyba + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16400,7 +16600,7 @@ soubory automaticky otevírat s odpovídajícími programy. Schematic - + Title Název @@ -16456,12 +16656,12 @@ Edits the symbol for this schematic Upraví symbol v tomto schématu - + generic - + Error Chyba @@ -16479,7 +16679,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16777,7 +16977,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -17019,7 +17219,7 @@ Set the admsXml location on the application settings. Všechny soubory - + Info Informace diff --git a/translations/qucs_de.ts b/translations/qucs_de.ts index 1472d173a..3a8f3a79f 100644 --- a/translations/qucs_de.ts +++ b/translations/qucs_de.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -551,7 +551,7 @@ Komponenteneigenschaften bearbeiten - + Sweep Durchlauf @@ -563,13 +563,13 @@ - + display in schematic im Schaltplan anzeigen - + Simulation: Simulation: @@ -620,18 +620,18 @@ - + Step: Schrittweite: - + Number: Anzahl: - + Properties Eigenschaften @@ -713,26 +713,28 @@ - + - - + + + + yes ja - - + + - + no nein - + Select a file Datei auswählen @@ -767,7 +769,7 @@ Verilog Dateien - + Points per decade: Punkte pro Dekade: @@ -834,7 +836,7 @@ DiagramDialog - + Edit Diagram Properties Diagrammeigenschaften bearbeiten @@ -1361,18 +1363,18 @@ ExternSimDialog - + Stop - + Save netlist - + Exit Verlassen @@ -1382,12 +1384,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2137,7 +2139,7 @@ Filter synthesis program Alle Dateien - + Error Fehler @@ -2147,7 +2149,7 @@ Filter synthesis program - + Enter a Data File Name Geben Sie den Namen der Datendatei ein @@ -2185,7 +2187,7 @@ Filter synthesis program FEHLER: Unbekanntes Dateiformat! Überprüfen Sie die Dateinamensendung! - + Running command line: Kommandozeile wird ausgeführt: @@ -2195,7 +2197,7 @@ Filter synthesis program FEHLER: Das Konvertierprogramm kann nicht gestartet werden! - + Successfully converted file! Die Datei wurde erfolgreich konvertiert! @@ -2889,7 +2891,19 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2898,7 +2912,8 @@ Node name will not be changed. Impedanz (Ohm) - + + Error Fehler @@ -3151,82 +3166,82 @@ Resistor color code computation program - - + + linear double linear reell - - - + + + logarithmic double logarithmisch reell - - - + + + linear integer linear ganzahlig - - + + logarithmic integer logarithmisch ganzzahlig - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add Hinzufügen @@ -3264,47 +3279,47 @@ Resistor color code computation program - - + + minimize minimieren - - - + + + maximize maximieren - - - + + + less kleiner - - - + + + greater größer - - - + + + equal gleich - - + + monitor beobachten - + Goals Ziele @@ -3324,16 +3339,16 @@ Resistor color code computation program Abbrechen - + - + yes ja - + no @@ -4048,13 +4063,13 @@ Resistor color code computation program Bias T - + for transient simulation: inductance in Henry für die Transientensimulation: Induktivität in Henry - + for transient simulation: capacitance in Farad für die Transientensimulation: Kapazität in Farad @@ -4074,7 +4089,7 @@ Resistor color code computation program - + transfer function scaling factor @@ -4090,8 +4105,8 @@ Resistor color code computation program Bipolartransistor - - + + npn transistor npn Transistor @@ -4104,7 +4119,7 @@ Resistor color code computation program - + polarity Polarität @@ -4385,7 +4400,7 @@ Resistor color code computation program Flächenfaktor für den Bipolartransistor - + bipolar junction transistor with substrate Bipolartransistor mit Substratanschluss @@ -4683,13 +4698,13 @@ Resistor color code computation program - + - + - + @@ -4999,22 +5014,22 @@ Falsches 'component' Zeilenformat! Gleichungslöser für die Schaltkreismatrix - + dc block DC-Sperre - + dc Block DC-Sperre - + dc feed DC-Zuführung - + dc Feed DC-Zuführung @@ -5048,7 +5063,7 @@ Falsches 'component' Zeilenformat! - + D-FlipFlop w/ SR @@ -5244,7 +5259,7 @@ Falsches 'component' Zeilenformat! Skalierungsfaktor der Diode - + Diode Diode @@ -6111,18 +6126,18 @@ Falsches 'component' Zeilenformat! - + current equation - - + + charge equation - + Equation Defined Device @@ -6617,7 +6632,7 @@ Falsches 'component' Zeilenformat! Flächenfaktor für den JFET - + n-JFET n-JFET @@ -7277,7 +7292,7 @@ Falsches 'component' Zeilenformat! MOS Feldeffekttransistor - + n-MOSFET n-MOSFET @@ -7295,7 +7310,7 @@ Falsches 'component' Zeilenformat! MOSFET (Verarmungstyp) - + zero-bias threshold voltage Null-Schwellenspannung @@ -7485,7 +7500,15 @@ Falsches 'component' Zeilenformat! Umfang der Source-Sperrschicht - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate @@ -7808,19 +7831,19 @@ Falsches 'component' Zeilenformat! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8510,19 +8533,19 @@ Falsches 'component' Zeilenformat! - + parameter equation - + Equation Defined RF Device - + RF @@ -8687,7 +8710,7 @@ Falsches 'component' Zeilenformat! 2-Tor S-Parameter Datei - + file Datei @@ -8712,7 +8735,7 @@ Falsches 'component' Zeilenformat! spice - + ERROR: No file name in SPICE component "%1". FEHLER: In der SPICE-Komponente "%1" ist kein Dateiname angegeben. @@ -8733,7 +8756,7 @@ Falsches 'component' Zeilenformat! - + Info Information @@ -8764,7 +8787,7 @@ Falsches 'component' Zeilenformat! - + subcircuit Teilschaltung @@ -8774,7 +8797,7 @@ Falsches 'component' Zeilenformat! Name der Qucs Schaltplandatei - + Subcircuit Schaltkreis @@ -9185,12 +9208,12 @@ Falsches 'component' Zeilenformat! spannungsgesteuerte Spannungsquelle - + voltage controlled resistor - + resistance gain Widerstands gain @@ -9222,7 +9245,7 @@ Falsches 'component' Zeilenformat! - + ERROR: No file name in %1 component "%2". @@ -9274,7 +9297,7 @@ Falsches 'component' Zeilenformat! - + VHDL file @@ -9285,13 +9308,13 @@ Falsches 'component' Zeilenformat! - + vhdl VHDL - - + + generic variable @@ -9518,7 +9541,7 @@ Overwrite ? - + Successfully exported @@ -9535,7 +9558,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units Fehler: Falsches Zeitformat in "%1". Verwende positive Zahl mit den Einheiten @@ -9543,8 +9566,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9642,16 +9665,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9663,7 +9686,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties @@ -9688,7 +9711,7 @@ Use PNG, JPEG or SVG graphics! - + The ground potential cannot be labeled! @@ -9705,7 +9728,7 @@ Setzte Octave Pfad in Einstellungen. Pfeil - + Ellipse Ellipse @@ -9715,7 +9738,7 @@ Setzte Octave Pfad in Einstellungen. gefüllte Ellipse - + Edit Ellipse Properties Ellipseneigenschaften bearbeiten @@ -9725,7 +9748,7 @@ Setzte Octave Pfad in Einstellungen. Ellipsenbogen - + Edit Arc Properties Kreisbogeneigenschaften bearbeiten @@ -9735,7 +9758,7 @@ Setzte Octave Pfad in Einstellungen. Linie - + Edit Line Properties Linieneigenschaften bearbeiten @@ -9755,7 +9778,7 @@ Setzte Octave Pfad in Einstellungen. gefülltes Rechteck - + Edit Rectangle Properties Rechteckeigenschaften bearbeiten @@ -9774,7 +9797,7 @@ Setzte Octave Pfad in Einstellungen. unbenannt - + Format Error: 'Painting' field is not closed! @@ -9930,8 +9953,8 @@ Falsches 'painting' Zeilenformat! - - + + @@ -9957,7 +9980,7 @@ Unknown field! Unbekanntes Feld! - + ERROR: Component "%1" has no analog model. FEHLER: Die Komponente "%1" besitzt kein analoges Modell. @@ -11148,7 +11171,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11254,24 +11277,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11734,7 +11757,7 @@ Active Filter synthesis program QucsApp - + Schematic Schaltkreise @@ -11750,47 +11773,47 @@ Active Filter synthesis program - + VHDL Sources VHDL Quellen - - + + Verilog Sources Verilog Quellen - - + + Verilog-A Sources Verilog-A Quellen - - + + Octave Scripts Octave Scripte - + Spice Files Spice Dateien - + Any File Alle Dateien - + The schematic search path has been refreshed. - + Verilog Verilog @@ -11800,7 +11823,7 @@ Active Filter synthesis program VHDL - + Open file @@ -11810,7 +11833,7 @@ Active Filter synthesis program - + Open example… @@ -11825,24 +11848,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics Schaltkreise - + New Neu @@ -11916,7 +11939,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo inhalt des aktuellen Projekts - + Search Components @@ -11957,8 +11980,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -11969,29 +11992,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -12000,43 +12023,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Fehler - + Cannot open "%1". Kann "%1" nicht öffnen. - + Library is corrupt. Die Bibliotheksdatei ist beschädigt. - - - - - - - - - - - + + + + + + + + + + + - + Info Information - + Default icon not found: %1.png Standardicon nicht gefunden: %1.png - + -port @@ -12047,13 +12070,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! - + Do you want to save the changes before copying? Änderungen vor dem Kopieren speichern? @@ -12097,17 +12120,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Kann keine geöffneten Daten löschen! - - - - - - + + + + + + Warning Warnung - + This will delete the file permanently! Continue ? Dies löscht die Datein endgültig! Weiter? @@ -12170,12 +12193,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Konfiguration - + Cannot create work directory ! Konnte kein Arbeitsverzeichnis erstellen! - + Cannot create project directory ! Konnte kein Projektverzeichnis erstellen! @@ -12188,7 +12211,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - Projekt: - + Choose Project Directory for Opening Projektverzeichniss zum Öffnen wählen @@ -12198,13 +12221,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Es ist kein Projekt ausgewählt! - + Cannot delete file: %1 - - + + @@ -12212,12 +12235,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -12227,12 +12250,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -12267,12 +12290,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12316,35 +12339,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Erstelle neuen Schaltkreis... - - + + + - - + - + - + Ready. Bereit. - + Creating new text editor... Erstelle neuen Text Editor... - - + + Opening file... Datei öffnen... @@ -12430,7 +12453,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Closing file... @@ -12449,7 +12472,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Verwerfen - + untitled unbenannt @@ -12479,7 +12502,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12489,7 +12512,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12524,7 +12547,7 @@ Use subcircuit to crete Verilog-A module! Beenden... - + The document was modified by another program ! @@ -12534,7 +12557,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot create @@ -12549,7 +12572,7 @@ Use subcircuit to crete Verilog-A module! - + Could not load S[1,1]. @@ -12574,7 +12597,7 @@ Use subcircuit to crete Verilog-A module! - + Cutting selection... @@ -12584,17 +12607,17 @@ Use subcircuit to crete Verilog-A module! - - - - - - + + + + + + At least two elements must be selected ! Mindestens zwei Element müssen angewählt sein! - + Opening aborted, file not found. Laden abgebrochen, Datei nicht gefunden. @@ -12618,7 +12641,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12698,7 +12721,7 @@ Overwrite ? Kann "%1" nicht schreiben! - + Please open project with subcircuits! Projekt bitte mit Teilschaltungen öffnen! @@ -12707,7 +12730,7 @@ Overwrite ? Bitte zuerst ein Projekt öffnen! - + Please select a diagram graph! @@ -12768,7 +12791,7 @@ Wurden die Verilog-A Symbole gespeichert? - + &New &Neu @@ -13513,7 +13536,24 @@ Create Library from Subcircuits - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qt @@ -13530,7 +13570,7 @@ Convert data file to various file formats - + Export to &CSV... @@ -13807,7 +13847,7 @@ Rotates the selected component by 90� counter-clockwise - + Power combining Starts power combining calculation program @@ -13890,7 +13930,7 @@ Resets the limits for all axis to auto. - + Mirror about X Axis @@ -14066,12 +14106,7 @@ Inserts a port symbol - - Ctrl+E - - - - + Inserts a wire @@ -14259,13 +14294,13 @@ Starts attenuator calculation program - - + + Simulate - + Simulates the current schematic @@ -14508,7 +14543,7 @@ About Qt by Trolltech - + Compact modelling @@ -14593,93 +14628,112 @@ Open QucsAttenuator + &File &Datei + &Quit &Beenden + + &Help &Hilfe + &About + About Qt... Über Qt... + Topology + Input + Attenuation: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by + dB + Zin: + Zout: + Output + R1: @@ -14692,26 +14746,38 @@ Open + + + + + + + + -- + R2: + R3: + Qucs Attenuator Help Qucs Attenuator Hilfe + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! @@ -14721,16 +14787,19 @@ Open + About Qt Über Qt + About... Über... + Attenuator synthesis program @@ -14739,11 +14808,14 @@ Attenuator synthesis program + + Copyright (C) 2006 by + Error: Set Attenuation less than %1 dB @@ -16102,6 +16174,134 @@ open files with an appropriate program. + + Qucs_S_SPAR_Viewer + + + &File + &Datei + + + + &Quit + &Beenden + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + &Hilfe + + + + &About + + + + + About Qt... + Über Qt... + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + Über Qt + + + + About... + Über... + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + Warnung + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Fehler + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16143,7 +16343,7 @@ open files with an appropriate program. Schematic - + Title @@ -16197,12 +16397,12 @@ Edits the symbol for this schematic - + generic - + Error Fehler @@ -16220,7 +16420,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16518,7 +16718,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -16759,7 +16959,7 @@ Set the admsXml location on the application settings. Alle Dateien - + Info Information diff --git a/translations/qucs_en.ts b/translations/qucs_en.ts index f82b4e9c8..e6966ab58 100644 --- a/translations/qucs_en.ts +++ b/translations/qucs_en.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -550,7 +550,7 @@ - + Sweep @@ -562,13 +562,13 @@ - + display in schematic - + Simulation: @@ -619,18 +619,18 @@ - + Step: - + Number: - + Properties @@ -712,26 +712,28 @@ - + - - + + + + yes - - + + - + no - + Select a file @@ -766,7 +768,7 @@ - + Points per decade: @@ -833,7 +835,7 @@ DiagramDialog - + Edit Diagram Properties @@ -1340,18 +1342,18 @@ ExternSimDialog - + Stop - + Save netlist - + Exit @@ -1361,12 +1363,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -1971,7 +1973,7 @@ - + Error @@ -1981,7 +1983,7 @@ - + Enter a Data File Name @@ -2007,7 +2009,7 @@ - + Running command line: @@ -2017,7 +2019,7 @@ - + Successfully converted file! @@ -2631,12 +2633,25 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method - + + Error @@ -2839,82 +2854,82 @@ but is %1 ! - - + + linear double - - - + + + logarithmic double - - - + + + linear integer - - + + logarithmic integer - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add @@ -2952,47 +2967,47 @@ but is %1 ! - - + + minimize - - - + + + maximize - - - + + + less - - - + + + greater - - - + + + equal - - + + monitor - + Goals @@ -3012,16 +3027,16 @@ but is %1 ! - + - + yes - + no @@ -3577,13 +3592,13 @@ but is %1 ! - + for transient simulation: inductance in Henry - + for transient simulation: capacitance in Farad @@ -3603,7 +3618,7 @@ but is %1 ! - + transfer function scaling factor @@ -3619,8 +3634,8 @@ but is %1 ! - - + + npn transistor @@ -3633,7 +3648,7 @@ but is %1 ! - + polarity @@ -3914,7 +3929,7 @@ but is %1 ! - + bipolar junction transistor with substrate @@ -4212,13 +4227,13 @@ but is %1 ! - + - + - + @@ -4522,22 +4537,22 @@ Wrong 'component' line format! - + dc block - + dc Block - + dc feed - + dc Feed @@ -4571,7 +4586,7 @@ Wrong 'component' line format! - + D-FlipFlop w/ SR @@ -4767,7 +4782,7 @@ Wrong 'component' line format! - + Diode @@ -5634,18 +5649,18 @@ Wrong 'component' line format! - + current equation - - + + charge equation - + Equation Defined Device @@ -6140,7 +6155,7 @@ Wrong 'component' line format! - + n-JFET @@ -6796,7 +6811,7 @@ Wrong 'component' line format! - + n-MOSFET @@ -6814,7 +6829,7 @@ Wrong 'component' line format! - + zero-bias threshold voltage @@ -7004,7 +7019,15 @@ Wrong 'component' line format! - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate @@ -7327,19 +7350,19 @@ Wrong 'component' line format! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8029,19 +8052,19 @@ Wrong 'component' line format! - + parameter equation - + Equation Defined RF Device - + RF @@ -8206,7 +8229,7 @@ Wrong 'component' line format! - + file @@ -8231,7 +8254,7 @@ Wrong 'component' line format! - + ERROR: No file name in SPICE component "%1". @@ -8252,7 +8275,7 @@ Wrong 'component' line format! - + Info @@ -8283,7 +8306,7 @@ Wrong 'component' line format! - + subcircuit @@ -8293,7 +8316,7 @@ Wrong 'component' line format! - + Subcircuit @@ -8704,12 +8727,12 @@ Wrong 'component' line format! - + voltage controlled resistor - + resistance gain @@ -8741,7 +8764,7 @@ Wrong 'component' line format! - + ERROR: No file name in %1 component "%2". @@ -8793,7 +8816,7 @@ Wrong 'component' line format! - + VHDL file @@ -8804,13 +8827,13 @@ Wrong 'component' line format! - + vhdl - - + + generic variable @@ -9036,7 +9059,7 @@ Overwrite ? - + Successfully exported @@ -9053,7 +9076,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units @@ -9061,8 +9084,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9160,16 +9183,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9181,7 +9204,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties @@ -9206,7 +9229,7 @@ Use PNG, JPEG or SVG graphics! - + The ground potential cannot be labeled! @@ -9216,7 +9239,7 @@ Use PNG, JPEG or SVG graphics! - + Ellipse @@ -9226,7 +9249,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Ellipse Properties @@ -9236,7 +9259,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Arc Properties @@ -9246,7 +9269,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Line Properties @@ -9266,7 +9289,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Rectangle Properties @@ -9281,7 +9304,7 @@ Use PNG, JPEG or SVG graphics! - + Format Error: 'Painting' field is not closed! @@ -9422,8 +9445,8 @@ Wrong 'painting' line format! - - + + @@ -9448,7 +9471,7 @@ Unknown field! - + ERROR: Component "%1" has no analog model. @@ -10569,7 +10592,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -10675,24 +10698,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11155,7 +11178,7 @@ Active Filter synthesis program QucsApp - + Schematic @@ -11171,47 +11194,47 @@ Active Filter synthesis program - + VHDL Sources - - + + Verilog Sources - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File - + The schematic search path has been refreshed. - + Verilog @@ -11221,7 +11244,7 @@ Active Filter synthesis program - + Open file @@ -11231,24 +11254,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics - + New @@ -11322,7 +11345,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Components @@ -11359,8 +11382,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -11371,29 +11394,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -11402,43 +11425,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot open "%1". - + Library is corrupt. - - - - - - - - - - - + + + + + + + + + + + - + Info - + Default icon not found: %1.png - + -port @@ -11449,13 +11472,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! - + Do you want to save the changes before copying? @@ -11495,17 +11518,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - - - - - + + + + + + Warning - + This will delete the file permanently! Continue ? @@ -11560,17 +11583,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! - + Cannot create project directory ! - + Choose Project Directory for Opening @@ -11580,13 +11603,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot delete file: %1 - - + + @@ -11594,12 +11617,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -11609,12 +11632,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -11649,12 +11672,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -11690,35 +11713,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + + - - + - + - + Ready. - + Creating new text editor... - - + + Opening file... @@ -11800,7 +11823,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Closing file... @@ -11815,7 +11838,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + untitled @@ -11845,7 +11868,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -11855,7 +11878,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -11886,12 +11909,12 @@ Use subcircuit to crete Verilog-A module! - + The document was modified by another program ! - + Open example… @@ -11906,12 +11929,12 @@ Use subcircuit to crete Verilog-A module! - + Do you want to reload or keep this version ? - + Cannot create @@ -11926,7 +11949,7 @@ Use subcircuit to crete Verilog-A module! - + Could not load S[1,1]. @@ -11951,7 +11974,7 @@ Use subcircuit to crete Verilog-A module! - + Cutting selection... @@ -11961,17 +11984,17 @@ Use subcircuit to crete Verilog-A module! - - - - - - + + + + + + At least two elements must be selected ! - + Opening aborted, file not found. @@ -11993,7 +12016,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12072,12 +12095,12 @@ Overwrite ? - + Please open project with subcircuits! - + Please select a diagram graph! @@ -12135,7 +12158,7 @@ Have you saved the Verilog-A symbols? - + &New @@ -12880,7 +12903,24 @@ Create Library from Subcircuits - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qt @@ -12897,7 +12937,7 @@ Convert data file to various file formats - + Export to &CSV... @@ -13174,7 +13214,7 @@ Rotates the selected component by 90� counter-clockwise - + Power combining Starts power combining calculation program @@ -13257,7 +13297,7 @@ Resets the limits for all axis to auto. - + Mirror about X Axis @@ -13433,12 +13473,7 @@ Inserts a port symbol - - Ctrl+E - - - - + Inserts a wire @@ -13626,13 +13661,13 @@ Starts attenuator calculation program - - + + Simulate - + Simulates the current schematic @@ -13871,7 +13906,7 @@ About Qt by Trolltech - + Compact modelling @@ -13956,93 +13991,112 @@ Open QucsAttenuator + &File + &Quit + + &Help + &About + About Qt... + Topology + Input + Attenuation: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by + dB + Zin: + Zout: + Output + R1: @@ -14055,41 +14109,56 @@ Open + + + + + + + + -- + R2: + R3: + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt + About... + Attenuator synthesis program @@ -14098,11 +14167,14 @@ Attenuator synthesis program + + Copyright (C) 2006 by + Error: Set Attenuation less than %1 dB @@ -15327,6 +15399,134 @@ open files with an appropriate program. + + Qucs_S_SPAR_Viewer + + + &File + + + + + &Quit + + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + + + + + &About + + + + + About Qt... + + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + + + + + About... + + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -15368,7 +15568,7 @@ open files with an appropriate program. Schematic - + Title @@ -15422,12 +15622,12 @@ Edits the symbol for this schematic - + generic - + Error @@ -15445,7 +15645,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -15743,7 +15943,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -15984,7 +16184,7 @@ Set the admsXml location on the application settings. - + Info diff --git a/translations/qucs_es.ts b/translations/qucs_es.ts index 21ae449a3..c83a3ff36 100644 --- a/translations/qucs_es.ts +++ b/translations/qucs_es.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -550,7 +550,7 @@ Editar las propiedades del componente - + Sweep Barrido @@ -562,13 +562,13 @@ - + display in schematic mostrar en el esquema - + Simulation: Simulación: @@ -619,18 +619,18 @@ - + Step: Paso: - + Number: Número: - + Properties Propiedades @@ -712,26 +712,28 @@ - + - - + + + + yes - - + + - + no no - + Select a file Seleccionar un archivo @@ -766,7 +768,7 @@ Archivos Verilog - + Points per decade: Puntos por década: @@ -833,7 +835,7 @@ DiagramDialog - + Edit Diagram Properties Editar las propiedades del diagrama @@ -1364,18 +1366,18 @@ Simular - + Stop - + Save netlist - + Exit @@ -1385,12 +1387,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2053,7 +2055,7 @@ Programa de síntexis de filtros - + Error Error @@ -2063,7 +2065,7 @@ Programa de síntexis de filtros - + Enter a Data File Name Introduzca un nombre de Archivo de Datos @@ -2101,7 +2103,7 @@ Programa de síntexis de filtros ERROR: Formato de archivo desconocido. ¡Compruebe la extensión del nombre del archivo! - + Running command line: @@ -2111,7 +2113,7 @@ Programa de síntexis de filtros ERROR: ¡No puedo iniciar el convertidor! - + Successfully converted file! @@ -2805,7 +2807,19 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2814,7 +2828,8 @@ Node name will not be changed. Impedancia (ohms) - + + Error Error @@ -3045,82 +3060,82 @@ pero es %1! - - + + linear double doble lineal - - - + + + logarithmic double doble logarítmico - - - + + + linear integer entero lineal - - + + logarithmic integer entero logarítmico - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add Añadir @@ -3158,47 +3173,47 @@ pero es %1! - - + + minimize minimizar - - - + + + maximize maximizar - - - + + + less menos - - - + + + greater mayor - - - + + + equal igual - - + + monitor monitor - + Goals Objetivos @@ -3218,16 +3233,16 @@ pero es %1! Cancelar - + - + yes - + no @@ -3943,13 +3958,13 @@ pero es %1! polarización t - + for transient simulation: inductance in Henry para simulación transitoria: inductancia en Henrios - + for transient simulation: capacitance in Farad para simulación transitoria: capacidad en Faradios @@ -3969,7 +3984,7 @@ pero es %1! - + transfer function scaling factor @@ -3985,8 +4000,8 @@ pero es %1! transistor de unión bipolar - - + + npn transistor transitor npn @@ -3999,7 +4014,7 @@ pero es %1! - + polarity polaridad @@ -4280,7 +4295,7 @@ pero es %1! area predeterminada para el transistor bipolar - + bipolar junction transistor with substrate transistor de unión bipolar con substrato @@ -4578,13 +4593,13 @@ pero es %1! - + - + - + @@ -4894,22 +4909,22 @@ Wrong 'component' line format! método para resolver la matriz del circuito - + dc block bloque dc - + dc Block Bloque dc - + dc feed alimentación dc - + dc Feed Alimentación dc @@ -4943,7 +4958,7 @@ Wrong 'component' line format! - + D-FlipFlop w/ SR @@ -5139,7 +5154,7 @@ Wrong 'component' line format! area predeterminada para el diodo - + Diode Diodo @@ -6010,18 +6025,18 @@ Wrong 'component' line format! - + current equation equación de corriente - - + + charge equation ecuación de carga - + Equation Defined Device Dispositivo de Ecuación Definida @@ -6516,7 +6531,7 @@ Wrong 'component' line format! area predeterminada para JFET - + n-JFET JFET-n @@ -7180,7 +7195,7 @@ Wrong 'component' line format! transistor de efecto de campo MOS - + n-MOSFET MOSFET-n @@ -7198,7 +7213,7 @@ Wrong 'component' line format! - + zero-bias threshold voltage tensión umbral de polarización @@ -7388,7 +7403,15 @@ Wrong 'component' line format! perímetro de la unión del surtidor - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate Transistor de efecto campo MOS con sustrato @@ -7711,19 +7734,19 @@ Wrong 'component' line format! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8413,19 +8436,19 @@ Wrong 'component' line format! - + parameter equation ecuación paramétrica - + Equation Defined RF Device Ecuación definada de componente RF - + RF RF @@ -8590,7 +8613,7 @@ Wrong 'component' line format! archivo de parámetros S de 2-conexiones - + file archivo @@ -8615,7 +8638,7 @@ Wrong 'component' line format! spice - + ERROR: No file name in SPICE component "%1". ERROR: Sin nombre de archivo en el componente SPICE "%1". @@ -8636,7 +8659,7 @@ Wrong 'component' line format! ERROR: No se pudo abrir el archivo SPICE convertido "%1". - + Info Información @@ -8667,7 +8690,7 @@ Wrong 'component' line format! Convirtiendo archivo SPICE "%1". - + subcircuit subcircuito @@ -8677,7 +8700,7 @@ Wrong 'component' line format! nombre del archivo del esquema qucs - + Subcircuit Subcircuito @@ -9088,12 +9111,12 @@ Wrong 'component' line format! fuente de tensión controlada por tensión - + voltage controlled resistor - + resistance gain @@ -9125,7 +9148,7 @@ Wrong 'component' line format! - + ERROR: No file name in %1 component "%2". ERROR: Sin nombre de archivo en %1 componente "%2". @@ -9177,7 +9200,7 @@ Wrong 'component' line format! Fuente de Tensión Basada en un Archivo - + VHDL file Archivo VHDL @@ -9188,13 +9211,13 @@ Wrong 'component' line format! Nombre del archivo VHDL - + vhdl vhdl - - + + generic variable @@ -9424,7 +9447,7 @@ Overwrite ? - + Successfully exported @@ -9441,7 +9464,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units Error: Formato incorrecto de fecha en "%1". Usa números positivos con unidades @@ -9449,8 +9472,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9548,16 +9571,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9569,7 +9592,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties Editar Propiedades @@ -9594,7 +9617,7 @@ Use PNG, JPEG or SVG graphics! adaptación de 2 conexiones - + The ground potential cannot be labeled! ¡El potencial de tierra no se puede etiquetar! @@ -9604,7 +9627,7 @@ Use PNG, JPEG or SVG graphics! Flecha - + Ellipse Elipse @@ -9614,7 +9637,7 @@ Use PNG, JPEG or SVG graphics! Elipse rellena - + Edit Ellipse Properties Editar las propiedades de la Elipse @@ -9624,7 +9647,7 @@ Use PNG, JPEG or SVG graphics! Arco elíptico - + Edit Arc Properties Editar las propiedades del Arco @@ -9634,7 +9657,7 @@ Use PNG, JPEG or SVG graphics! Línea - + Edit Line Properties Editar las propiedades de la Línea @@ -9654,7 +9677,7 @@ Use PNG, JPEG or SVG graphics! Rectángulo relleno - + Edit Rectangle Properties Editar las propiedades del Rectángulo @@ -9673,7 +9696,7 @@ Use PNG, JPEG or SVG graphics! sinTítulo - + Format Error: 'Painting' field is not closed! @@ -9829,8 +9852,8 @@ Wrong 'painting' line format! - - + + @@ -9855,7 +9878,7 @@ Unknown field! Error de formato de archivo: ¡Campo desconocido! - + ERROR: Component "%1" has no analog model. ERROR: El componente "%1" no tiene modelo analógico. @@ -11041,7 +11064,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11147,24 +11170,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11627,7 +11650,7 @@ Active Filter synthesis program QucsApp - + Schematic Esquema @@ -11643,47 +11666,47 @@ Active Filter synthesis program - + VHDL Sources Fuentes VHDL - - + + Verilog Sources Fuentes Verilog - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File Cualquier Archivo - + The schematic search path has been refreshed. - + Verilog Verilog @@ -11693,7 +11716,7 @@ Active Filter synthesis program VHDL - + Open file @@ -11703,7 +11726,7 @@ Active Filter synthesis program - + Open example… @@ -11718,24 +11741,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics Esquemas - + New Nuevo @@ -11809,7 +11832,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo contenido del proyecto actual - + Search Components @@ -11846,8 +11869,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -11858,29 +11881,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -11889,43 +11912,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Error - + Cannot open "%1". No puedo abrir "%1". - + Library is corrupt. La librería está corrupta. - - - - - - - - - - - + + + + + + + + + + + - + Info Información - + Default icon not found: %1.png - + -port -conexiones @@ -11936,7 +11959,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! ¡El documento contiene cambios no guardados! @@ -11944,7 +11967,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Do you want to save the changes before copying? @@ -11984,17 +12007,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo ¡No puedo eliminar un archivo abierto! - - - - - - + + + + + + Warning Aviso - + This will delete the file permanently! Continue ? ¡Esto eliminará el archivo para siempre! ¿Continuo? @@ -12057,12 +12080,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! ¡No puedo crear el directorio de trabajo! - + Cannot create project directory ! ¡No puedo crear el directorio del proyecto! @@ -12075,7 +12098,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - Proyecto: - + Choose Project Directory for Opening Elija el directorio de proyecto a abrir @@ -12085,13 +12108,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo ¡No se ha seleccionado un proyecto! - + Cannot delete file: %1 - - + + @@ -12099,12 +12122,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -12114,12 +12137,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -12154,12 +12177,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12203,35 +12226,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Creando un nuevo esquema... - - + + + - - + - + - + Ready. Listo. - + Creating new text editor... Creando un nuevo editor de textos... - - + + Opening file... Abriendo archivo... @@ -12318,7 +12341,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Guardando todos los archivos... - + Closing file... Cerrando el archivo... @@ -12337,7 +12360,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo &Descartar - + untitled sinTítulo @@ -12367,7 +12390,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12377,7 +12400,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12416,7 +12439,7 @@ Use subcircuit to crete Verilog-A module! ¿Seguro que desea salir? - + The document was modified by another program ! ¡ Otro programa ha modificado el documento ! @@ -12434,7 +12457,7 @@ Use subcircuit to crete Verilog-A module! Mantenerlo - + Cannot create No puedo crear @@ -12449,7 +12472,7 @@ Use subcircuit to crete Verilog-A module! ¡No puedo arrancar "%1"! - + Could not load S[1,1]. No pude cargar S[1,1]. @@ -12474,7 +12497,7 @@ Use subcircuit to crete Verilog-A module! ¡Dependencia incorrecta! - + Cutting selection... Cortando la selección... @@ -12484,17 +12507,17 @@ Use subcircuit to crete Verilog-A module! Copiando la selección al portapapeles... - - - - - - + + + + + + At least two elements must be selected ! ¡Al menos deben seleccionarse dos elementos! - + Opening aborted, file not found. @@ -12516,7 +12539,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12596,7 +12619,7 @@ Overwrite ? ¡No puedo escribir "%1"! - + Please open project with subcircuits! ¡Abra un proyecto con subcircuitos! @@ -12605,7 +12628,7 @@ Overwrite ? ¡Abra antes un proyecto! - + Please select a diagram graph! ¡Seleccione un gráfico de diagramas! @@ -12663,7 +12686,7 @@ Have you saved the Verilog-A symbols? - + &New &Nuevo @@ -13484,7 +13507,24 @@ Create Library from Subcircuits Crear Biblioteca a partir de Subcircuitos - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S @@ -13538,7 +13578,7 @@ Convert data file to various file formats - + Export to &CSV... Exportar a &CSV... @@ -13833,7 +13873,7 @@ Rota el elemento seleccionado 90º en el sentido de las agujas del reloj {90�? - + Power combining Starts power combining calculation program @@ -13928,7 +13968,7 @@ Rotates the selected component by 90° counter-clockwise Rota el elemento seleccionado 90º en el sentido de las agujas del reloj - + Mirror about X Axis Reflejar sobre el eje x @@ -14120,12 +14160,7 @@ Inserta un símbolo de conexión Cable - - Ctrl+E - - - - + Inserts a wire Inserta un cable @@ -14345,13 +14380,13 @@ Starts attenuator calculation program Arranca el programa de cálculo de atenuadores - - + + Simulate Simular - + Simulates the current schematic Simula el esquema actual @@ -14653,7 +14688,7 @@ Acerca de Qt por Trolltech &Herramientas - + Compact modelling @@ -14738,68 +14773,82 @@ Open QucsAttenuator + &File &Archivo + &Quit &Salir + + &Help &Ayuda + &About + About Qt... Acerca de Qt... + Topology Topología + Input Entrada + Attenuation: Atenuación: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by @@ -14809,11 +14858,13 @@ Open + dB dB + Zin: Zentrada: @@ -14827,6 +14878,7 @@ Open + Zout: Zsalida: @@ -14836,11 +14888,13 @@ Open + Output Salida + R1: R1: @@ -14853,16 +14907,26 @@ Open + + + + + + + + -- -- + R2: R2: + R3: R3: @@ -14872,26 +14936,31 @@ Open + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt Acerca de Qt + About... Acerca de... + Attenuator synthesis program @@ -14902,6 +14971,8 @@ Programa de síntesis de atenuadores + + Copyright (C) 2006 by Copyright (C) 2006 por @@ -14911,6 +14982,7 @@ Programa de síntesis de atenuadores + Error: Set Attenuation less than %1 dB @@ -16383,6 +16455,134 @@ abrir los archivos con el programa apropiado. No disponible ese tipo de línea de transmisión. + + Qucs_S_SPAR_Viewer + + + &File + &Archivo + + + + &Quit + &Salir + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + &Ayuda + + + + &About + + + + + About Qt... + Acerca de Qt... + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + Acerca de Qt + + + + About... + Acerca de... + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + Aviso + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Error + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16424,7 +16624,7 @@ abrir los archivos con el programa apropiado. Schematic - + Title Título @@ -16480,12 +16680,12 @@ Edits the symbol for this schematic Edita los símbolos de este esquema - + generic - + Error Error @@ -16503,7 +16703,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16801,7 +17001,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -17043,7 +17243,7 @@ Set the admsXml location on the application settings. Todos los Archivos - + Info Información diff --git a/translations/qucs_fr.ts b/translations/qucs_fr.ts index ab56e6a52..6f28c53bf 100644 --- a/translations/qucs_fr.ts +++ b/translations/qucs_fr.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -551,7 +551,7 @@ Modifier les propriétés du composant - + Sweep Variation @@ -563,13 +563,13 @@ - + display in schematic afficher dans le schéma - + Simulation: Simulation : @@ -620,18 +620,18 @@ - + Step: Pas : - + Number: Nombre : - + Properties Propriétés @@ -713,26 +713,28 @@ - + - - + + + + yes oui - - + + - + no non - + Select a file Choisir un fichier @@ -767,7 +769,7 @@ Fichiers Vérilog - + Points per decade: Points par decade : @@ -834,7 +836,7 @@ DiagramDialog - + Edit Diagram Properties Modifier les propriétés du graphique @@ -1366,18 +1368,18 @@ Simuler - + Stop - + Save netlist - + Exit @@ -1387,12 +1389,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2052,7 +2054,7 @@ Application de synthèse de filtres - + Error Erreur @@ -2062,7 +2064,7 @@ Application de synthèse de filtres - + Enter a Data File Name Saisissez un nom de fichier de données @@ -2100,7 +2102,7 @@ Application de synthèse de filtres ERREUR : format de fichier inconnu ! Vérifiez-en l'extension ! - + Running command line: @@ -2110,7 +2112,7 @@ Application de synthèse de filtres ERREUR : impossible de lancer le convertisseur ! - + Successfully converted file! @@ -2804,7 +2806,19 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2813,7 +2827,8 @@ Node name will not be changed. Impédance (Ω) - + + Error Erreur @@ -3044,82 +3059,82 @@ or elle vaut %1 ! - - + + linear double linéaire flottant - - - + + + logarithmic double logarithmique flottant - - - + + + linear integer linéaire entier - - + + logarithmic integer logarithmique entier - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add Ajouter @@ -3157,47 +3172,47 @@ or elle vaut %1 ! - - + + minimize minimiser - - - + + + maximize maximiser - - - + + + less inférieur - - - + + + greater supérieur - - - + + + equal égal à - - + + monitor suivre - + Goals Objectifs @@ -3217,16 +3232,16 @@ or elle vaut %1 ! Annuler - + - + yes oui - + no @@ -3941,13 +3956,13 @@ or elle vaut %1 ! bras de polarisation - + for transient simulation: inductance in Henry pour la simulation transitoire : inductance en henries - + for transient simulation: capacitance in Farad pour la simulation transitoire : capacité en farads @@ -3967,7 +3982,7 @@ or elle vaut %1 ! - + transfer function scaling factor @@ -3983,8 +3998,8 @@ or elle vaut %1 ! transistor bipolaire - - + + npn transistor transistor npn @@ -3997,7 +4012,7 @@ or elle vaut %1 ! - + polarity polarité @@ -4278,7 +4293,7 @@ or elle vaut %1 ! Surface par défaut des transistors bipolaires - + bipolar junction transistor with substrate transistor bipolaire avec substrat @@ -4576,13 +4591,13 @@ or elle vaut %1 ! - + - + - + @@ -4892,22 +4907,22 @@ Ligne « composant » incohérente ! méthode d'inversion matricielle - + dc block Découplage - + dc Block Découplage - + dc feed Arrivée continue - + dc Feed Polarisation @@ -4941,7 +4956,7 @@ Ligne « composant » incohérente ! - + D-FlipFlop w/ SR @@ -5137,7 +5152,7 @@ Ligne « composant » incohérente ! Surface par défaut de la diode - + Diode Diode @@ -6004,18 +6019,18 @@ Ligne « composant » incohérente ! - + current equation équation de courant - - + + charge equation équation de charge - + Equation Defined Device Composant défini par une équation @@ -6510,7 +6525,7 @@ Ligne « composant » incohérente ! Surface par défaut des JFET - + n-JFET Effet de champ de type n @@ -7170,7 +7185,7 @@ Ligne « composant » incohérente ! transistor MOS - + n-MOSFET nMOS @@ -7188,7 +7203,7 @@ Ligne « composant » incohérente ! MOS à déplétion - + zero-bias threshold voltage tension de seuil à vide @@ -7378,7 +7393,15 @@ Ligne « composant » incohérente ! périmètre de la jonction de source - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate Transistor à effet de champ MOS avec substrat @@ -7701,19 +7724,19 @@ Ligne « composant » incohérente ! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8403,19 +8426,19 @@ Ligne « composant » incohérente ! - + parameter equation - + Equation Defined RF Device - + RF @@ -8580,7 +8603,7 @@ Ligne « composant » incohérente ! Fichier de paramètres S quadripôle - + file fichier @@ -8605,7 +8628,7 @@ Ligne « composant » incohérente ! Spice - + ERROR: No file name in SPICE component "%1". ERREUR : Aucune référence de fichier dans le composant Spice "%1". @@ -8626,7 +8649,7 @@ Ligne « composant » incohérente ! ERREUR : impossible de charger le fichier Spice converti « %1 ». - + Info Info @@ -8657,7 +8680,7 @@ Ligne « composant » incohérente ! Conversion du fichier Spice « %1 ». - + subcircuit sous-circuit @@ -8667,7 +8690,7 @@ Ligne « composant » incohérente ! nom du schéma Qucs - + Subcircuit Sous-circuit @@ -9078,12 +9101,12 @@ Ligne « composant » incohérente ! source de tension contrôlée en tension - + voltage controlled resistor - + resistance gain @@ -9115,7 +9138,7 @@ Ligne « composant » incohérente ! - + ERROR: No file name in %1 component "%2". ERREUR : Aucun composant « %2 » dans le répertoire %1. @@ -9167,7 +9190,7 @@ Ligne « composant » incohérente ! Fichier de tensions - + VHDL file fichier VHDL @@ -9178,13 +9201,13 @@ Ligne « composant » incohérente ! Nom du fichier VHDL - + vhdl vhdl - - + + generic variable @@ -9414,7 +9437,7 @@ Le remplacer ? - + Successfully exported @@ -9431,7 +9454,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units Erreur ! mauvais format temporel dans "%1". Utilisez des valeurs positives avec des unités @@ -9439,8 +9462,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9538,16 +9561,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9559,7 +9582,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties Modifier les paramètres @@ -9584,7 +9607,7 @@ Use PNG, JPEG or SVG graphics! Adaptation en impédance - + The ground potential cannot be labeled! La masse ne peut être nommée ! @@ -9594,7 +9617,7 @@ Use PNG, JPEG or SVG graphics! Flèche - + Ellipse Ellipse @@ -9604,7 +9627,7 @@ Use PNG, JPEG or SVG graphics! Ellipse remplie - + Edit Ellipse Properties Modifier les paramètres de l'ellipse @@ -9614,7 +9637,7 @@ Use PNG, JPEG or SVG graphics! Arc elliptique - + Edit Arc Properties Modifier les paramètres de l'arc @@ -9624,7 +9647,7 @@ Use PNG, JPEG or SVG graphics! Ligne - + Edit Line Properties Modifier les paramètres de la ligne @@ -9644,7 +9667,7 @@ Use PNG, JPEG or SVG graphics! Rectangle rempli - + Edit Rectangle Properties Modifier les paramètres du rectangle @@ -9663,7 +9686,7 @@ Use PNG, JPEG or SVG graphics! sans nom - + Format Error: 'Painting' field is not closed! @@ -9819,8 +9842,8 @@ Ligne « painting » incohérente ! - - + + @@ -9846,7 +9869,7 @@ Unknown field! Champ inconnu ! - + ERROR: Component "%1" has no analog model. ERREUR : le composant "%1" n'a pas de modèle analogique. @@ -11033,7 +11056,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11139,24 +11162,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11619,7 +11642,7 @@ Active Filter synthesis program QucsApp - + Schematic Schéma @@ -11635,47 +11658,47 @@ Active Filter synthesis program - + VHDL Sources Sources VHDL - - + + Verilog Sources Sources Vérilog - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File Tous les fichiers - + The schematic search path has been refreshed. - + Verilog Vérilog @@ -11685,7 +11708,7 @@ Active Filter synthesis program VHDL - + Open file @@ -11695,7 +11718,7 @@ Active Filter synthesis program - + Open example… @@ -11710,24 +11733,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics Schémas - + New Nouveau @@ -11801,7 +11824,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo contenu du projet actuel - + Search Components @@ -11838,8 +11861,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -11850,29 +11873,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -11881,43 +11904,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Erreur - + Cannot open "%1". Impossible d'ouvrir "%1". - + Library is corrupt. La bibliothèque est illisible. - - - - - - - - - - - + + + + + + + + + + + - + Info Info - + Default icon not found: %1.png - + -port -port @@ -11928,14 +11951,14 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! Certaines modifications sont non sauvegardées ! - + Do you want to save the changes before copying? @@ -11979,17 +12002,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Impossible d'effacer un fichier en cours d'utilisation ! - - - - - - + + + + + + Warning Attention - + This will delete the file permanently! Continue ? Le fichier va être définitivement détruit ! Poursuivre ? @@ -12052,12 +12075,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! Ne peut créer le répertoire de travail ! - + Cannot create project directory ! Ne peut créer ce répertoire ! @@ -12070,7 +12093,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - Projet : - + Choose Project Directory for Opening Choisissez un répertoire de projet � ouvrir @@ -12080,13 +12103,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Aucun projet sélectionné ! - + Cannot delete file: %1 - - + + @@ -12094,12 +12117,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -12109,12 +12132,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -12149,12 +12172,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12198,35 +12221,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Création d'un nouveau schéma... - - + + + - - + - + - + Ready. Prêt. - + Creating new text editor... Création d'un nouvel éditeur de texte… - - + + Opening file... Ouverture du fichier... @@ -12313,7 +12336,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Sauvegarde de tous les fichiers... - + Closing file... Fermeture... @@ -12332,7 +12355,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo &Jeter - + untitled sans nom @@ -12362,7 +12385,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12372,7 +12395,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12411,7 +12434,7 @@ Use subcircuit to crete Verilog-A module! Voulez-vous vraiment terminer ? - + The document was modified by another program ! Le fichier a été modifié par un autre programme ! @@ -12429,7 +12452,7 @@ Use subcircuit to crete Verilog-A module! Garder - + Cannot create Ne peut créer @@ -12444,7 +12467,7 @@ Use subcircuit to crete Verilog-A module! Impossible de lancer "%1" ! - + Could not load S[1,1]. Impossible de trouver s11. @@ -12469,7 +12492,7 @@ Use subcircuit to crete Verilog-A module! Mauvaise interdépendance ! - + Cutting selection... Coupe la zone... @@ -12479,17 +12502,17 @@ Use subcircuit to crete Verilog-A module! Copie de la zone dans le presse-papiers... - - - - - - + + + + + + At least two elements must be selected ! Sélectionner au moins deux éléments ! - + Opening aborted, file not found. @@ -12511,7 +12534,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12591,7 +12614,7 @@ Le remplacer ? Impossible d'écrire "%1" ! - + Please open project with subcircuits! Ouvrez un projet comportant des sous-circuits ! @@ -12600,7 +12623,7 @@ Le remplacer ? Ouvrez d'abord un projet ! - + Please select a diagram graph! Sélectionnez un graphique ! @@ -12658,7 +12681,7 @@ Have you saved the Verilog-A symbols? - + &New &Nouveau @@ -13479,7 +13502,24 @@ Create Library from Subcircuits Crée une bibliothèque à partir de sous-circuits - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S @@ -13533,7 +13573,7 @@ Convert data file to various file formats - + Export to &CSV... Exporter en &CSV… @@ -13828,7 +13868,7 @@ Tourne le composant sélectionné de 90° dans le sens direct {90�?} - + Power combining Starts power combining calculation program @@ -13923,7 +13963,7 @@ Rotates the selected component by 90° counter-clockwise Tourne le composant sélectionné de 90° dans le sens direct - + Mirror about X Axis Symétrie verticale @@ -14115,12 +14155,7 @@ Ajoute un port Fil - - Ctrl+E - - - - + Inserts a wire Ajoute une équipotentielle @@ -14338,13 +14373,13 @@ Starts attenuator calculation program Lance l'application de calcul d'atténuateur - - + + Simulate Simuler - + Simulates the current schematic Simule le circuit @@ -14644,7 +14679,7 @@ Informations sur le toolkit Qt de Trolltech &Outils - + Compact modelling @@ -14729,68 +14764,82 @@ Open QucsAttenuator + &File &Fichier + &Quit &Terminer + + &Help &Aide + &About + About Qt... À propos de Qt… + Topology Topologie + Input Entrée + Attenuation: Atténuation : + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by @@ -14800,11 +14849,13 @@ Open + dB dB + Zin: Zin : @@ -14818,6 +14869,7 @@ Open + Zout: Zout : @@ -14827,11 +14879,13 @@ Open + Output Sortie + R1: R1 : @@ -14844,16 +14898,26 @@ Open + + + + + + + + -- -- + R2: R2 : + R3: R3 : @@ -14863,26 +14927,31 @@ Open + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt Info Qt + About... À propos… + Attenuator synthesis program @@ -14893,6 +14962,8 @@ Application de synthèse d'atténuateur + + Copyright (C) 2006 by Copyright © 2006 @@ -14902,6 +14973,7 @@ Application de synthèse d'atténuateur + Error: Set Attenuation less than %1 dB @@ -16375,6 +16447,134 @@ ouvrir ceux-ci avec le programme ad-hoc. Type de ligne indisponible. + + Qucs_S_SPAR_Viewer + + + &File + &Fichier + + + + &Quit + + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + &Aide + + + + &About + + + + + About Qt... + À propos de Qt… + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + Info Qt + + + + About... + + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Erreur + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16416,7 +16616,7 @@ ouvrir ceux-ci avec le programme ad-hoc. Schematic - + Title Titre @@ -16472,12 +16672,12 @@ Edits the symbol for this schematic Modifie le symbole pour ce schéma - + generic - + Error Erreur @@ -16495,7 +16695,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16793,7 +16993,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -17035,7 +17235,7 @@ Set the admsXml location on the application settings. Tous les fichiers - + Info Info diff --git a/translations/qucs_he.ts b/translations/qucs_he.ts index cb92b702b..2547ef45f 100644 --- a/translations/qucs_he.ts +++ b/translations/qucs_he.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -550,7 +550,7 @@ ערוך מאפייני רכיב - + Sweep סריקה @@ -562,13 +562,13 @@ - + display in schematic הראה בסרטוט - + Simulation: סימולציה: @@ -619,18 +619,18 @@ - + Step: צעד: - + Number: מספר: - + Properties מאפיינים @@ -713,26 +713,28 @@ - + - - + + + + yes כן - - + + - + no לא - + Select a file בחר קובץ @@ -767,7 +769,7 @@ - + Points per decade: נקודות לעשור: @@ -834,7 +836,7 @@ DiagramDialog - + Edit Diagram Properties ערוך מאפייני דיאגרמה @@ -1345,18 +1347,18 @@ ExternSimDialog - + Stop - + Save netlist - + Exit @@ -1366,12 +1368,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -1983,7 +1985,7 @@ - + Error שגיאה @@ -1993,7 +1995,7 @@ - + Enter a Data File Name @@ -2027,7 +2029,7 @@ &לא - + Running command line: @@ -2037,7 +2039,7 @@ - + Successfully converted file! @@ -2659,12 +2661,25 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method - + + Error שגיאה @@ -2874,82 +2889,82 @@ but is %1 ! - - + + linear double - - - + + + logarithmic double - - - + + + linear integer - - + + logarithmic integer - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add הוסף @@ -2987,47 +3002,47 @@ but is %1 ! - - + + minimize - - - + + + maximize - - - + + + less - - - + + + greater - - - + + + equal - - + + monitor - + Goals @@ -3047,16 +3062,16 @@ but is %1 ! בטל - + - + yes כן - + no @@ -3647,13 +3662,13 @@ but is %1 ! מתח שיחוד BIAS t - + for transient simulation: inductance in Henry - + for transient simulation: capacitance in Farad @@ -3673,7 +3688,7 @@ but is %1 ! - + transfer function scaling factor @@ -3689,8 +3704,8 @@ but is %1 ! טרנזיסטור ביפולרי - - + + npn transistor טרנזיסטור NPN @@ -3703,7 +3718,7 @@ but is %1 ! - + polarity קוטביות @@ -3984,7 +3999,7 @@ but is %1 ! - + bipolar junction transistor with substrate טרנזיסטור ביפולרי עם מצע\תשתית (SUBSTRATE) @@ -4282,13 +4297,13 @@ but is %1 ! - + - + - + @@ -4594,22 +4609,22 @@ Wrong 'component' line format! - + dc block בלוק זרם ישר - + dc Block בלוק זרם ישר - + dc feed הזנת זרם ישר - + dc Feed הזנת זרם ישר @@ -4643,7 +4658,7 @@ Wrong 'component' line format! - + D-FlipFlop w/ SR @@ -4839,7 +4854,7 @@ Wrong 'component' line format! - + Diode דיודה @@ -5706,18 +5721,18 @@ Wrong 'component' line format! - + current equation - - + + charge equation - + Equation Defined Device @@ -6212,7 +6227,7 @@ Wrong 'component' line format! - + n-JFET n-JFET @@ -6868,7 +6883,7 @@ Wrong 'component' line format! טרנזיסטור תופעת שדה MOS - MOSFET - + n-MOSFET n-MOSFET @@ -6886,7 +6901,7 @@ Wrong 'component' line format! depletion MOSFET - + zero-bias threshold voltage מתח סף למתח-שיחוד-אפס (ZERO-BIAS) @@ -7076,7 +7091,15 @@ Wrong 'component' line format! הקף צומת SOURCE - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate @@ -7399,19 +7422,19 @@ Wrong 'component' line format! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8101,19 +8124,19 @@ Wrong 'component' line format! - + parameter equation - + Equation Defined RF Device - + RF @@ -8278,7 +8301,7 @@ Wrong 'component' line format! קובץ פורט-יחיד של פרמטר S {2-?} - + file קובץ @@ -8303,7 +8326,7 @@ Wrong 'component' line format! SPICE - + ERROR: No file name in SPICE component "%1". @@ -8324,7 +8347,7 @@ Wrong 'component' line format! - + Info מידע @@ -8355,7 +8378,7 @@ Wrong 'component' line format! - + subcircuit תת-מעגל @@ -8365,7 +8388,7 @@ Wrong 'component' line format! שם קובץ סכמת QUCS - + Subcircuit @@ -8776,12 +8799,12 @@ Wrong 'component' line format! מתח מקור נשלט מתח - + voltage controlled resistor - + resistance gain @@ -8813,7 +8836,7 @@ Wrong 'component' line format! - + ERROR: No file name in %1 component "%2". @@ -8865,7 +8888,7 @@ Wrong 'component' line format! - + VHDL file @@ -8876,13 +8899,13 @@ Wrong 'component' line format! - + vhdl - - + + generic variable @@ -9108,7 +9131,7 @@ Overwrite ? - + Successfully exported @@ -9125,7 +9148,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units @@ -9133,8 +9156,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9232,16 +9255,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9253,7 +9276,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties @@ -9278,7 +9301,7 @@ Use PNG, JPEG or SVG graphics! - + The ground potential cannot be labeled! @@ -9288,7 +9311,7 @@ Use PNG, JPEG or SVG graphics! אשר - + Ellipse @@ -9298,7 +9321,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Ellipse Properties ערוך מאפייני אליפסה @@ -9308,7 +9331,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Arc Properties ערוך מאפייני קשת @@ -9318,7 +9341,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Line Properties ערוך מאפייני קו @@ -9338,7 +9361,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Rectangle Properties ערוך מאפייני מלבן @@ -9357,7 +9380,7 @@ Use PNG, JPEG or SVG graphics! ללא שם - + Format Error: 'Painting' field is not closed! @@ -9512,8 +9535,8 @@ Wrong 'painting' line format! - - + + @@ -9538,7 +9561,7 @@ Unknown field! שגיאת תבנית קובץ: שדה לא ידוע! - + ERROR: Component "%1" has no analog model. @@ -10723,7 +10746,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -10829,24 +10852,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11309,7 +11332,7 @@ Active Filter synthesis program QucsApp - + Schematic סכמה @@ -11325,47 +11348,47 @@ Active Filter synthesis program - + VHDL Sources - - + + Verilog Sources - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File כל קובץ - + The schematic search path has been refreshed. - + Verilog @@ -11375,7 +11398,7 @@ Active Filter synthesis program - + Open file @@ -11385,7 +11408,7 @@ Active Filter synthesis program - + Open example… @@ -11400,24 +11423,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics סכמות - + New חדש @@ -11491,7 +11514,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Components @@ -11528,8 +11551,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -11540,29 +11563,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -11571,43 +11594,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo שגיאה - + Cannot open "%1". - + Library is corrupt. - - - - - - - - - - - + + + + + + + + + + + - + Info מידע - + Default icon not found: %1.png - + -port -פורט @@ -11618,13 +11641,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! המסמך מכיל שינויים שלא נשמרו! - + Do you want to save the changes before copying? @@ -11664,17 +11687,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo לא יכול למחוק קובץ פתוח! - - - - - - + + + + + + Warning אזהרה - + This will delete the file permanently! Continue ? הפעולה הבאה תמחק את הקובץ לצמיתות! להמשיך? @@ -11737,12 +11760,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! לא ניתן ליצור ספריית עבודה! - + Cannot create project directory ! לא יכול ליצור ספריית פרוייקט! @@ -11755,7 +11778,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - פרוייקט: - + Choose Project Directory for Opening בחר ספריית פרוייקט לפתיחה @@ -11765,13 +11788,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo לא נבחר פרוייקט! - + Cannot delete file: %1 - - + + @@ -11779,12 +11802,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -11794,12 +11817,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -11834,12 +11857,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -11883,35 +11906,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo צור סכמה חדשה... - - + + + - - + - + - + Ready. מוכן. - + Creating new text editor... - - + + Opening file... פותח קובץ... @@ -11997,7 +12020,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo שומר את כל הקבצים... - + Closing file... סוגר קובץ... @@ -12016,7 +12039,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo &התעלם - + untitled ללא שם @@ -12046,7 +12069,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12056,7 +12079,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12095,7 +12118,7 @@ Use subcircuit to crete Verilog-A module! האם אתה באמת רוצה לצאת? - + The document was modified by another program ! @@ -12105,7 +12128,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot create לא יכול ליצור @@ -12120,7 +12143,7 @@ Use subcircuit to crete Verilog-A module! - + Could not load S[1,1]. @@ -12145,7 +12168,7 @@ Use subcircuit to crete Verilog-A module! - + Cutting selection... גוזר בחירה... @@ -12155,17 +12178,17 @@ Use subcircuit to crete Verilog-A module! מעתיק בחירה לקליפבורד... - - - - - - + + + + + + At least two elements must be selected ! - + Opening aborted, file not found. @@ -12187,7 +12210,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12266,12 +12289,12 @@ Overwrite ? - + Please open project with subcircuits! - + Please select a diagram graph! @@ -12329,7 +12352,7 @@ Have you saved the Verilog-A symbols? - + &New @@ -13076,7 +13099,24 @@ Create Library from Subcircuits - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qt @@ -13093,7 +13133,7 @@ Convert data file to various file formats - + Export to &CSV... @@ -13370,7 +13410,7 @@ Rotates the selected component by 90� counter-clockwise - + Power combining Starts power combining calculation program @@ -13453,7 +13493,7 @@ Resets the limits for all axis to auto. - + Mirror about X Axis @@ -13629,12 +13669,7 @@ Inserts a port symbol - - Ctrl+E - - - - + Inserts a wire @@ -13822,13 +13857,13 @@ Starts attenuator calculation program - - + + Simulate - + Simulates the current schematic @@ -14067,7 +14102,7 @@ About Qt by Trolltech - + Compact modelling @@ -14152,93 +14187,112 @@ Open QucsAttenuator + &File + &Quit + + &Help + &About + About Qt... + Topology + Input + Attenuation: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by + dB + Zin: + Zout: + Output + R1: @@ -14251,41 +14305,56 @@ Open + + + + + + + + -- + R2: + R3: + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt + About... אודות... + Attenuator synthesis program @@ -14294,11 +14363,14 @@ Attenuator synthesis program + + Copyright (C) 2006 by + Error: Set Attenuation less than %1 dB @@ -15628,6 +15700,134 @@ open files with an appropriate program. + + Qucs_S_SPAR_Viewer + + + &File + + + + + &Quit + + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + + + + + &About + + + + + About Qt... + + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + + + + + About... + אודות... + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + אזהרה + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + שגיאה + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -15669,7 +15869,7 @@ open files with an appropriate program. Schematic - + Title @@ -15725,12 +15925,12 @@ Edits the symbol for this schematic עורך את הסמל לסכימה זו - + generic - + Error שגיאה @@ -15748,7 +15948,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16046,7 +16246,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -16287,7 +16487,7 @@ Set the admsXml location on the application settings. כל הקבצים - + Info מידע diff --git a/translations/qucs_hu.ts b/translations/qucs_hu.ts index b483204c9..f8ee668b4 100644 --- a/translations/qucs_hu.ts +++ b/translations/qucs_hu.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -551,7 +551,7 @@ Komponens tulajdonságainak beállítása - + Sweep Léptetés @@ -563,13 +563,13 @@ - + display in schematic Kijelezve a kapcsolási rajzon - + Simulation: Szimuláció: @@ -620,18 +620,18 @@ - + Step: Léptetés: - + Number: Lépésszám: - + Properties Tulajdonságok @@ -713,26 +713,28 @@ - + - - + + + + yes igen - - + + - + no nem - + Select a file Fájl kiválasztás @@ -767,7 +769,7 @@ Verilog fájl - + Points per decade: Pont per dekád: @@ -834,7 +836,7 @@ DiagramDialog - + Edit Diagram Properties Diagram tulajdonságainak beállítása @@ -1365,18 +1367,18 @@ Szimuláció - + Stop - + Save netlist - + Exit @@ -1386,12 +1388,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2053,7 +2055,7 @@ fizikai tulajdonságait számítja ki. - + Error Hiba @@ -2063,7 +2065,7 @@ fizikai tulajdonságait számítja ki. - + Enter a Data File Name Adat fájl név @@ -2102,7 +2104,7 @@ fizikai tulajdonságait számítja ki. HIBA: Ismeretlen fájl formátum! Ellenőrizze a fájlnevet és a kiterjesztést! - + Running command line: @@ -2112,7 +2114,7 @@ fizikai tulajdonságait számítja ki. HIBA: Konverter nem indítható! - + Successfully converted file! @@ -2807,7 +2809,19 @@ Az alkatrész katalógus írása sikertelen! - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2816,7 +2830,8 @@ Az alkatrész katalógus írása sikertelen! Impedancia (Ohm) - + + Error Hiba @@ -3047,82 +3062,82 @@ de %1 ! - - + + linear double - - - + + + logarithmic double - - - + + + linear integer - - + + logarithmic integer - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add Hozzáadás @@ -3160,47 +3175,47 @@ de %1 ! - - + + minimize - - - + + + maximize - - - + + + less kisebb - - - + + + greater nagyobb - - - + + + equal egyenlő - - + + monitor - + Goals Cél @@ -3220,16 +3235,16 @@ de %1 ! Mégsem - + - + yes igen - + no @@ -3945,13 +3960,13 @@ de %1 ! - + for transient simulation: inductance in Henry - + for transient simulation: capacitance in Farad @@ -3971,7 +3986,7 @@ de %1 ! - + transfer function scaling factor @@ -3987,8 +4002,8 @@ de %1 ! bipoláris tranzisztor - - + + npn transistor npn tranzisztor @@ -4001,7 +4016,7 @@ de %1 ! - + polarity polaritás @@ -4282,7 +4297,7 @@ de %1 ! - + bipolar junction transistor with substrate bipoláris tranzisztor szubsztrátkivezetéssel @@ -4580,13 +4595,13 @@ de %1 ! - + - + - + @@ -4892,22 +4907,22 @@ Helytelen 'component' sor! - + dc block DC blokkoló - + dc Block DC Blokkoló - + dc feed AC blokkoló - + dc Feed AC Blokkoló @@ -4941,7 +4956,7 @@ Helytelen 'component' sor! - + D-FlipFlop w/ SR @@ -5138,7 +5153,7 @@ Digitális szimuláció - + Diode Dióda @@ -6005,18 +6020,18 @@ Digitális szimuláció - + current equation - - + + charge equation - + Equation Defined Device @@ -6511,7 +6526,7 @@ Digitális szimuláció - + n-JFET n-JFET @@ -7168,7 +7183,7 @@ Digitális szimuláció MOS térvezérlésű tranzisztor - + n-MOSFET n-MOSFET @@ -7186,7 +7201,7 @@ Digitális szimuláció kiürítéses MOSFET - + zero-bias threshold voltage @@ -7376,7 +7391,15 @@ Digitális szimuláció - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate @@ -7699,19 +7722,19 @@ Digitális szimuláció - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8401,19 +8424,19 @@ Digitális szimuláció - + parameter equation - + Equation Defined RF Device - + RF @@ -8578,7 +8601,7 @@ Digitális szimuláció 2-csatlakozós S paraméter fájl - + file fájl @@ -8603,7 +8626,7 @@ Digitális szimuláció spice - + ERROR: No file name in SPICE component "%1". HIBA: A "%1" SPICE komponensnek nincs fájlneve. @@ -8624,7 +8647,7 @@ Digitális szimuláció - + Info Infó @@ -8655,7 +8678,7 @@ Digitális szimuláció "%1" SPICE fájl konvertásása. - + subcircuit beágyazott kapcsolás @@ -8665,7 +8688,7 @@ Digitális szimuláció qucs kapcsolási rajz fájl neve - + Subcircuit beágyazott kapcsolás @@ -9076,12 +9099,12 @@ Digitális szimuláció feszültségvezérelt feszültséggenerátor - + voltage controlled resistor - + resistance gain @@ -9113,7 +9136,7 @@ Digitális szimuláció - + ERROR: No file name in %1 component "%2". @@ -9165,7 +9188,7 @@ Digitális szimuláció Fájl bázisú feszültség generátor - + VHDL file VHDL fájl @@ -9176,13 +9199,13 @@ Digitális szimuláció VHDL fájl neve - + vhdl vhdl - - + + generic variable @@ -9409,7 +9432,7 @@ Felülírjam? - + Successfully exported @@ -9426,7 +9449,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units @@ -9434,8 +9457,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9533,16 +9556,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9554,7 +9577,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties Tulajdonságok beállítása @@ -9579,7 +9602,7 @@ Use PNG, JPEG or SVG graphics! 2-portos illesztő - + The ground potential cannot be labeled! A földpotenciál nem lehet cimke! @@ -9589,7 +9612,7 @@ Use PNG, JPEG or SVG graphics! Nyíl - + Ellipse Elipszis @@ -9599,7 +9622,7 @@ Use PNG, JPEG or SVG graphics! Kitöltött ellipszis - + Edit Ellipse Properties Elipszis tulajdonságainak beállítása @@ -9609,7 +9632,7 @@ Use PNG, JPEG or SVG graphics! Körív - + Edit Arc Properties Körív tulajdonságainak beállítása @@ -9619,7 +9642,7 @@ Use PNG, JPEG or SVG graphics! Vonal - + Edit Line Properties Vonal tulajdonságainak beéllítása @@ -9639,7 +9662,7 @@ Use PNG, JPEG or SVG graphics! Kitöltött téglalap - + Edit Rectangle Properties Nényszög tulajdonságainak beállítása @@ -9658,7 +9681,7 @@ Use PNG, JPEG or SVG graphics! cím nélkül - + Format Error: 'Painting' field is not closed! @@ -9814,8 +9837,8 @@ Helytelen 'painting' sor! - - + + @@ -9841,7 +9864,7 @@ Unknown field! Ismeretlen mező! - + ERROR: Component "%1" has no analog model. HIBA: "%1" alkatrész nem analóg modell. @@ -11028,7 +11051,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11134,24 +11157,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11615,7 +11638,7 @@ Active Filter synthesis program QucsApp - + Schematic Kapcsolási rajz @@ -11631,47 +11654,47 @@ Active Filter synthesis program - + VHDL Sources VHDL forrás - - + + Verilog Sources Verilog forrás - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File Bármelyik fájl - + The schematic search path has been refreshed. - + Verilog Verilog @@ -11681,7 +11704,7 @@ Active Filter synthesis program VHDL - + Open file @@ -11691,7 +11714,7 @@ Active Filter synthesis program - + Open example… @@ -11706,24 +11729,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics Kapcsolási rajzok - + New Új @@ -11797,7 +11820,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo aktuális projekt tartalma - + Search Components @@ -11834,8 +11857,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -11846,29 +11869,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -11877,43 +11900,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Hiba - + Cannot open "%1". "%1" megnyitása nem sikerült. - + Library is corrupt. Alkatrész katalógus hibás. - - - - - - - - - - - + + + + + + + + + + + - + Info Infó - + Default icon not found: %1.png - + -port -csatlakozás @@ -11924,7 +11947,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! A dokumentum tartalmaz mentetlen változásokat! @@ -11932,7 +11955,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Do you want to save the changes before copying? @@ -11972,17 +11995,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Nyitott fájlt nem lehet törölni! - - - - - - + + + + + + Warning Figyelmeztetések - + This will delete the file permanently! Continue ? A fájl véglegesen törlődik! Folytatja? @@ -12045,12 +12068,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! A munkakönyvtárat nem tudtam létrehozni! - + Cannot create project directory ! Nem lehet létrehozni a projekt könyvtárat! @@ -12063,7 +12086,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - Projekt: - + Choose Project Directory for Opening Válassz projekt könyvtárat a megnyitáshoz @@ -12073,13 +12096,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Nincs kiválasztott projekt! - + Cannot delete file: %1 - - + + @@ -12087,12 +12110,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -12102,12 +12125,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -12142,12 +12165,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12191,36 +12214,36 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Új kapcsolási rajz létrehozása... - - + + + - - + - + - + Ready. Kész. - + Creating new text editor... Új szövegszerkesztő készítése... - - + + Opening file... Fájl nyitása... @@ -12307,7 +12330,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Összes fájl mentése... - + Closing file... Fájl bezárása... @@ -12326,7 +12349,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo &Eldob - + untitled cím nélkül @@ -12356,7 +12379,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12366,7 +12389,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12405,7 +12428,7 @@ Use subcircuit to crete Verilog-A module! Biztosan kilép? - + The document was modified by another program ! A dokumentumot másik program módosította! @@ -12423,7 +12446,7 @@ Use subcircuit to crete Verilog-A module! Megtart - + Cannot create Létrehozás nem sikerült @@ -12438,7 +12461,7 @@ Use subcircuit to crete Verilog-A module! "%1" nem indítható! - + Could not load S[1,1]. S[1,1] nem betölthető. @@ -12463,7 +12486,7 @@ Use subcircuit to crete Verilog-A module! Rossz függőség! - + Cutting selection... A kijelölés kivágása... @@ -12473,17 +12496,17 @@ Use subcircuit to crete Verilog-A module! A kijelölés másolása a vágólapra... - - - - - - + + + + + + At least two elements must be selected ! Legalább két elemet kell kiválasztani! - + Opening aborted, file not found. @@ -12505,7 +12528,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12585,7 +12608,7 @@ Felülírjam? "%1" nem írható! - + Please open project with subcircuits! Nyisson projektet a beágyazott kapcsoláshoz! @@ -12594,7 +12617,7 @@ Felülírjam? Először nyisson meg egy projektet! - + Please select a diagram graph! Válasszon diagram grafikont! @@ -12653,7 +12676,7 @@ Have you saved the Verilog-A symbols? - + &New Ú&j @@ -13473,7 +13496,24 @@ Create Library from Subcircuits Alkatrész-katalógust hoz létre a beágyazott kapcsoláshoz - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S @@ -13527,7 +13567,7 @@ Convert data file to various file formats - + Export to &CSV... Exportálás &CVS-be... @@ -13820,7 +13860,7 @@ Elforgatja a kiválasztott komponenst 90°-kal jobbra {90�?} - + Power combining Starts power combining calculation program @@ -13915,7 +13955,7 @@ Rotates the selected component by 90° counter-clockwise Elforgatja a kiválasztott komponenst 90°-kal jobbra - + Mirror about X Axis Tükrözés X tengelyre @@ -14107,12 +14147,7 @@ Beszúr egy csatlakozópont rajzot Vezeték - - Ctrl+E - - - - + Inserts a wire @@ -14332,13 +14367,13 @@ Starts attenuator calculation program Csillapító méretező program indítása - - + + Simulate Szimuláció - + Simulates the current schematic Szimuláció futtatása az aktuális kapcsoláson @@ -14641,7 +14676,7 @@ Qt a Trolltech-től &Eszközök - + Compact modelling @@ -14726,68 +14761,82 @@ Open QucsAttenuator + &File &Fájl + &Quit &Kilépés + + &Help &Súgó + &About + About Qt... Qt Névjegy... + Topology Topológia + Input Bemenet + Attenuation: Csillapítás: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by @@ -14797,11 +14846,13 @@ Open + dB dB + Zin: Zbe: @@ -14815,6 +14866,7 @@ Open + Zout: Zki: @@ -14824,11 +14876,13 @@ Open + Output Kimenet + R1: R1: @@ -14841,16 +14895,26 @@ Open + + + + + + + + -- -- + R2: R2: + R3: R3: @@ -14860,26 +14924,31 @@ Open + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt Qt Névjegy + About... Névjegy... + Attenuator synthesis program @@ -14890,6 +14959,8 @@ Csillapító méretező program + + Copyright (C) 2006 by Copyright (C) 2006 by @@ -14899,6 +14970,7 @@ Csillapító méretező program + Error: Set Attenuation less than %1 dB @@ -16373,6 +16445,134 @@ a fájlt a megfelelő program nyissa meg. Tápvonal típus nem élérhető. + + Qucs_S_SPAR_Viewer + + + &File + &Fájl + + + + &Quit + &Kilépés + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + &Súgó + + + + &About + + + + + About Qt... + Qt Névjegy... + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + Qt Névjegy + + + + About... + Névjegy... + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Hiba + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16414,7 +16614,7 @@ a fájlt a megfelelő program nyissa meg. Schematic - + Title Cím @@ -16470,12 +16670,12 @@ Edits the symbol for this schematic Szerkeszti az áramköri szimbólumot a kapcsoláshoz - + generic - + Error Hiba @@ -16493,7 +16693,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16792,7 +16992,7 @@ Rács megjelenítése - + ERROR: Cannot start @@ -17035,7 +17235,7 @@ Rács megjelenítése Minden fájl - + Info Infó diff --git a/translations/qucs_it.ts b/translations/qucs_it.ts index d67cadadd..8cd472da2 100644 --- a/translations/qucs_it.ts +++ b/translations/qucs_it.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -551,7 +551,7 @@ Modifica Proprietà Componente - + Sweep Sweep @@ -563,13 +563,13 @@ - + display in schematic mostra nello schema - + Simulation: Simulazione: @@ -620,18 +620,18 @@ - + Step: Passo: - + Number: Numero: - + Properties Proprietà @@ -713,26 +713,28 @@ - + - - + + + + yes - - + + - + no no - + Select a file Seleziona un file @@ -767,7 +769,7 @@ File Verilog - + Points per decade: Punti per decade: @@ -834,7 +836,7 @@ DiagramDialog - + Edit Diagram Properties Modifica Proprietà Diagramma @@ -1365,18 +1367,18 @@ Simula - + Stop - + Save netlist - + Exit @@ -1386,12 +1388,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2052,7 +2054,7 @@ Programma di sintesi dei filtri - + Error Errore @@ -2062,7 +2064,7 @@ Programma di sintesi dei filtri - + Enter a Data File Name Inserisci un Nome di File Dati @@ -2100,7 +2102,7 @@ Programma di sintesi dei filtri ERRORE: Formato di file sconosciuto! Controllare l'estensione del nome del file! - + Running command line: @@ -2110,7 +2112,7 @@ Programma di sintesi dei filtri ERRORE: Impossibile avviare il convertitore! - + Successfully converted file! @@ -2805,7 +2807,19 @@ Scrittura della nuova libreria fallita! - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2814,7 +2828,8 @@ Scrittura della nuova libreria fallita! impedenza (ohm) - + + Error Errore @@ -3045,82 +3060,82 @@ ma è %1 ! - - + + linear double double lineare - - - + + + logarithmic double double logaritmico - - - + + + linear integer intero lineare - - + + logarithmic integer intero logaritmico - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add Aggiungi @@ -3158,47 +3173,47 @@ ma è %1 ! - - + + minimize minimizza - - - + + + maximize massimizza - - - + + + less minore - - - + + + greater maggiore - - - + + + equal uguale - - + + monitor monitor - + Goals Obiettivi @@ -3218,16 +3233,16 @@ ma è %1 ! Annulla - + - + yes - + no @@ -3944,13 +3959,13 @@ Package estratto con successo! bias T - + for transient simulation: inductance in Henry per simulazione transitorio: induttanza in Henry - + for transient simulation: capacitance in Farad per simulazione transitorio: capacità in Farad @@ -3970,7 +3985,7 @@ Package estratto con successo! - + transfer function scaling factor @@ -3986,8 +4001,8 @@ Package estratto con successo! transistore a giunzione bipolare - - + + npn transistor transistor npn @@ -4000,7 +4015,7 @@ Package estratto con successo! - + polarity polarità @@ -4281,7 +4296,7 @@ Package estratto con successo! area predefinita per il transistore bipolare - + bipolar junction transistor with substrate transistore a giunzione bipolare con substrato @@ -4579,13 +4594,13 @@ Package estratto con successo! - + - + - + @@ -4895,22 +4910,22 @@ Formato della linea 'component' errato! metodo per risolvere la matrice del circuito - + dc block blocco dc - + dc Block dc Block - + dc feed dc feed - + dc Feed dc Feed @@ -4944,7 +4959,7 @@ Formato della linea 'component' errato! - + D-FlipFlop w/ SR @@ -5140,7 +5155,7 @@ Formato della linea 'component' errato! area predefinita per il diodo - + Diode Diodo @@ -6007,18 +6022,18 @@ Formato della linea 'component' errato! - + current equation equazione in corrente - - + + charge equation equazione in carica - + Equation Defined Device @@ -6513,7 +6528,7 @@ Formato della linea 'component' errato! area predefinita per JFET - + n-JFET n-JFET @@ -7173,7 +7188,7 @@ Formato della linea 'component' errato! transistore MOS a effetto di campo - + n-MOSFET n-MOSFET @@ -7191,7 +7206,7 @@ Formato della linea 'component' errato! MOSFET a svuotamento - + zero-bias threshold voltage tensione di soglia con polarizzazione zero @@ -7381,7 +7396,15 @@ Formato della linea 'component' errato! perimetro giunzione di source - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate transistore MOS a effetto di campo con substrato @@ -7704,19 +7727,19 @@ Formato della linea 'component' errato! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8406,19 +8429,19 @@ Formato della linea 'component' errato! - + parameter equation - + Equation Defined RF Device - + RF @@ -8583,7 +8606,7 @@ Formato della linea 'component' errato! file parametri S a 2 porte - + file file @@ -8608,7 +8631,7 @@ Formato della linea 'component' errato! spice - + ERROR: No file name in SPICE component "%1". ERRORE: Nome file assente nel componente SPICE "%1". @@ -8629,7 +8652,7 @@ Formato della linea 'component' errato! ERRORE: Impossibile aprire il file SPICE convertito "%1". - + Info Informazioni @@ -8660,7 +8683,7 @@ Formato della linea 'component' errato! Conversione file SPICE "%1". - + subcircuit sottocircuito @@ -8670,7 +8693,7 @@ Formato della linea 'component' errato! nome del file schema di qucs - + Subcircuit Sottocircuito @@ -9081,12 +9104,12 @@ Formato della linea 'component' errato! generatore di tensione controllato in tensione - + voltage controlled resistor - + resistance gain @@ -9118,7 +9141,7 @@ Formato della linea 'component' errato! - + ERROR: No file name in %1 component "%2". @@ -9170,7 +9193,7 @@ Formato della linea 'component' errato! Generatore di Tensione descritto da File - + VHDL file File VHDL @@ -9181,13 +9204,13 @@ Formato della linea 'component' errato! Nome del file VHDL - + vhdl vhdl - - + + generic variable @@ -9417,7 +9440,7 @@ Sovrascrivere ? - + Successfully exported @@ -9434,7 +9457,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units Errore: Formato del tempo errato in "%1". Usare numeri positivi con le unità @@ -9442,8 +9465,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9541,16 +9564,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9562,7 +9585,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties Modifica proprietà @@ -9587,7 +9610,7 @@ Use PNG, JPEG or SVG graphics! adattamento su due porte - + The ground potential cannot be labeled! Il potenziale di terra non può essere etichettato! @@ -9597,7 +9620,7 @@ Use PNG, JPEG or SVG graphics! Freccia - + Ellipse Ellisse @@ -9607,7 +9630,7 @@ Use PNG, JPEG or SVG graphics! Ellisse riempita - + Edit Ellipse Properties Modifica Proprietà Ellisse @@ -9617,7 +9640,7 @@ Use PNG, JPEG or SVG graphics! Arco ellittico - + Edit Arc Properties Modifica Proprietà Arco @@ -9627,7 +9650,7 @@ Use PNG, JPEG or SVG graphics! Linea - + Edit Line Properties Modifica Proprietà Linea @@ -9647,7 +9670,7 @@ Use PNG, JPEG or SVG graphics! Rettangolo riempito - + Edit Rectangle Properties Modifica Proprietà Rettangolo @@ -9666,7 +9689,7 @@ Use PNG, JPEG or SVG graphics! senza titolo - + Format Error: 'Painting' field is not closed! @@ -9822,8 +9845,8 @@ Formato della linea 'painting' errato! - - + + @@ -9849,7 +9872,7 @@ Unknown field! Campo sconosciuto! - + ERROR: Component "%1" has no analog model. ERRORE: Il componente "%1" non ha un modello analogico. @@ -11034,7 +11057,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11140,24 +11163,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11621,7 +11644,7 @@ Active Filter synthesis program QucsApp - + Schematic Schema @@ -11637,47 +11660,47 @@ Active Filter synthesis program - + VHDL Sources Sorgenti VHDL - - + + Verilog Sources Sorgenti Verilog - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File Qualsiasi file - + The schematic search path has been refreshed. - + Verilog Verilog @@ -11687,7 +11710,7 @@ Active Filter synthesis program VHDL - + Open file @@ -11697,7 +11720,7 @@ Active Filter synthesis program - + Open example… @@ -11712,24 +11735,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics Schemi - + New Nuovo @@ -11803,7 +11826,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo contenuto del progetto corrente - + Search Components @@ -11840,8 +11863,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -11852,29 +11875,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -11883,43 +11906,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Errore - + Cannot open "%1". Impossibile aprire "%1". - + Library is corrupt. La Libreria è danneggiata. - - - - - - - - - - - + + + + + + + + + + + - + Info Informazioni - + Default icon not found: %1.png - + -port -porta @@ -11930,14 +11953,14 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! Il documento contiene modifiche non salvate! - + Do you want to save the changes before copying? @@ -11977,17 +12000,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Impossibile cancellare un file aperto! - - - - - - + + + + + + Warning Attenzione - + This will delete the file permanently! Continue ? Questo canceller�definitivamente il file! Continuare? @@ -12050,12 +12073,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! Impossibile creare directory di lavoro ! - + Cannot create project directory ! Impossibile creare la directory del progetto ! @@ -12068,7 +12091,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - Progetto: - + Choose Project Directory for Opening Scegliere Directory del Progetto da Aprire @@ -12078,13 +12101,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Nessun progetto selezionato ! - + Cannot delete file: %1 - - + + @@ -12092,12 +12115,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -12107,12 +12130,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -12147,12 +12170,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12196,35 +12219,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Creazione nuovo schema... - - + + + - - + - + - + Ready. Pronto. - + Creating new text editor... Creazione nuovo editor di testo... - - + + Opening file... Apertura file... @@ -12311,7 +12334,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Salvataggio di tutti i file... - + Closing file... Chiusura file... @@ -12330,7 +12353,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo &Abbandona - + untitled senza titolo @@ -12360,7 +12383,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12370,7 +12393,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12409,7 +12432,7 @@ Use subcircuit to crete Verilog-A module! Vuoi davvero uscire? - + The document was modified by another program ! Il documento è stato modificato da un altro programma! @@ -12427,7 +12450,7 @@ Use subcircuit to crete Verilog-A module! Mantieni - + Cannot create Impossibile creare @@ -12442,7 +12465,7 @@ Use subcircuit to crete Verilog-A module! Impossibile avviare "%1"! - + Could not load S[1,1]. Impossibile caricare S[1,1]. @@ -12467,7 +12490,7 @@ Use subcircuit to crete Verilog-A module! Dipendenza errata! - + Cutting selection... Taglio selezione... @@ -12477,17 +12500,17 @@ Use subcircuit to crete Verilog-A module! Copia della selezione negli appunti... - - - - - - + + + + + + At least two elements must be selected ! Almeno due elementi devono essere selezionati! - + Opening aborted, file not found. @@ -12509,7 +12532,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12589,7 +12612,7 @@ Sovrascrivere ? Impossibile scrivere "%1" ! - + Please open project with subcircuits! Apri progetto con i sottocircuiti! @@ -12598,7 +12621,7 @@ Sovrascrivere ? Apri il progetto per primo! - + Please select a diagram graph! Seleziona un diagramma! @@ -12656,7 +12679,7 @@ Have you saved the Verilog-A symbols? - + &New &Nuovo @@ -13477,7 +13500,24 @@ Create Library from Subcircuits Crea libreria dai Sottocircuiti - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S @@ -13531,7 +13571,7 @@ Convert data file to various file formats - + Export to &CSV... Esporta in &CSV... @@ -13826,7 +13866,7 @@ Ruota il componente selezionato di 90° in senso antiorario {90�?} - + Power combining Starts power combining calculation program @@ -13921,7 +13961,7 @@ Rotates the selected component by 90° counter-clockwise Ruota il componente selezionato di 90° in senso antiorario - + Mirror about X Axis Ribalta sull'asse X @@ -14113,12 +14153,7 @@ Inserisce il simbolo di una porta Filo - - Ctrl+E - - - - + Inserts a wire Inserisce un filo @@ -14338,13 +14373,13 @@ Starts attenuator calculation program Avvia il programma di calcolo attenuatori - - + + Simulate Simula - + Simulates the current schematic Simula lo schema corrente @@ -14644,7 +14679,7 @@ Informazioni su Qt di Trolltech Strumen&ti - + Compact modelling @@ -14729,68 +14764,82 @@ Open QucsAttenuator + &File &File + &Quit &Esci + + &Help &Aiuto + &About + About Qt... Informazioni su Qt... + Topology Topologia + Input Ingresso + Attenuation: Atenuazione: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by @@ -14800,11 +14849,13 @@ Open + dB dB + Zin: Zin: @@ -14818,6 +14869,7 @@ Open + Zout: Zout: @@ -14827,11 +14879,13 @@ Open + Output Uscita + R1: R1: @@ -14844,16 +14898,26 @@ Open + + + + + + + + -- -- + R2: R2: + R3: R3: @@ -14863,26 +14927,31 @@ Open + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt Informazioni su Qt + About... Informazioni... + Attenuator synthesis program @@ -14893,6 +14962,8 @@ Programma di sintesi attenuatori + + Copyright (C) 2006 by Copyright (C) 2006 di @@ -14903,6 +14974,7 @@ Programma di sintesi attenuatori + Error: Set Attenuation less than %1 dB @@ -16378,6 +16450,134 @@ fine di aprirli utilizzando il programma appropriato. Tipo di linea di trasmissione non disponibile. + + Qucs_S_SPAR_Viewer + + + &File + &File + + + + &Quit + &Esci + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + &Aiuto + + + + &About + + + + + About Qt... + + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + Informazioni su Qt + + + + About... + + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + Attenzione + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Errore + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16419,7 +16619,7 @@ fine di aprirli utilizzando il programma appropriato. Schematic - + Title Titolo @@ -16475,12 +16675,12 @@ Edits the symbol for this schematic Modifica il simbolo per questo schema - + generic - + Error Errore @@ -16498,7 +16698,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16797,7 +16997,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -17038,7 +17238,7 @@ Set the admsXml location on the application settings. Tutti i file - + Info Informazioni diff --git a/translations/qucs_ja.ts b/translations/qucs_ja.ts index 76d535c58..a7940072e 100644 --- a/translations/qucs_ja.ts +++ b/translations/qucs_ja.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -550,7 +550,7 @@ 部品プロパティー編集 - + Sweep スイープ @@ -562,13 +562,13 @@ - + display in schematic 回路図に表示 - + Simulation: シミュレーション: @@ -619,18 +619,18 @@ - + Step: ステップ: - + Number: ステップ数: - + Properties プロパティー @@ -712,26 +712,28 @@ - + - - + + + + yes はい - - + + - + no いいえ - + Select a file 選択されたファイル @@ -766,7 +768,7 @@ Verilog ファイル - + Points per decade: ポイント数: @@ -833,7 +835,7 @@ DiagramDialog - + Edit Diagram Properties グラフプロパティー編集 @@ -1356,18 +1358,18 @@ シミュレート - + Stop - + Save netlist - + Exit @@ -1377,12 +1379,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2028,7 +2030,7 @@ Filter synthesis program その他ファイル - + Error エラー @@ -2038,7 +2040,7 @@ Filter synthesis program - + Enter a Data File Name データファイル名を入力 @@ -2076,7 +2078,7 @@ Filter synthesis program エラー; 未知のファイルフォーマットです!拡張子を確認してください! - + Running command line: コマンドライン実行中: @@ -2086,7 +2088,7 @@ Filter synthesis program エラー; コンバータを開始出来ません! - + Successfully converted file! ファイル変換成功! @@ -2780,7 +2782,19 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2789,7 +2803,8 @@ Node name will not be changed. インピーダンス(オーム) - + + Error エラー @@ -3020,82 +3035,82 @@ but is %1 ! - - + + linear double リニア DOUBLE - - - + + + logarithmic double 対数 Double - - - + + + linear integer リニア整数 - - + + logarithmic integer ログ整数 - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add 追加 @@ -3133,47 +3148,47 @@ but is %1 ! - - + + minimize 最小化 - - - + + + maximize 最大化 - - - + + + less 以下 - - - + + + greater 以上 - - - + + + equal 等しい - - + + monitor モニタ - + Goals ゴール値 @@ -3193,16 +3208,16 @@ but is %1 ! キャンセル - + - + yes はい - + no @@ -3917,13 +3932,13 @@ but is %1 ! バイアスティー - + for transient simulation: inductance in Henry トランジェントシミュレーション:インダクタンス(H) - + for transient simulation: capacitance in Farad トランジェントシミュレーション:容量(F) @@ -3943,7 +3958,7 @@ but is %1 ! - + transfer function scaling factor @@ -3959,8 +3974,8 @@ but is %1 ! バイポーラジャンクショントランジスタ - - + + npn transistor NPNトランジスタ @@ -3973,7 +3988,7 @@ but is %1 ! - + polarity 極性 @@ -4254,7 +4269,7 @@ but is %1 ! - + bipolar junction transistor with substrate BJT(基板情報含む) @@ -4552,13 +4567,13 @@ but is %1 ! - + - + - + @@ -4868,22 +4883,22 @@ Wrong 'component' line format! 回路行列を解くための方式 - + dc block DCブロック - + dc Block DCブロック - + dc feed 電圧付加 - + dc Feed 電圧付加 @@ -4917,7 +4932,7 @@ Wrong 'component' line format! - + D-FlipFlop w/ SR @@ -5113,7 +5128,7 @@ Wrong 'component' line format! - + Diode ダイオード @@ -5992,18 +6007,18 @@ Wrong 'component' line format! - + current equation - - + + charge equation - + Equation Defined Device 方程式定義済デバイス @@ -6498,7 +6513,7 @@ Wrong 'component' line format! - + n-JFET n-JFET @@ -7158,7 +7173,7 @@ Wrong 'component' line format! MOS-FET - + n-MOSFET @@ -7176,7 +7191,7 @@ Wrong 'component' line format! - + zero-bias threshold voltage ゼロバイアス スレッショルド電圧 @@ -7366,7 +7381,15 @@ Wrong 'component' line format! ソース接合周囲長 - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate @@ -7689,19 +7712,19 @@ Wrong 'component' line format! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8391,19 +8414,19 @@ Wrong 'component' line format! - + parameter equation パラメータ方程式 - + Equation Defined RF Device 方程式の定義されたRFデバイス - + RF RF @@ -8568,7 +8591,7 @@ Wrong 'component' line format! 2-ポート Sパラメータファイル - + file ファイル @@ -8593,7 +8616,7 @@ Wrong 'component' line format! spice - + ERROR: No file name in SPICE component "%1". エラー:SPICE部品"%1"というファイル名がありません. @@ -8614,7 +8637,7 @@ Wrong 'component' line format! エラー; 変換済みスパイスファイル"%1"を開けません. - + Info 情報 @@ -8645,7 +8668,7 @@ Wrong 'component' line format! スパイスファイル"%1"を変換しています. - + subcircuit サブサーキット @@ -8655,7 +8678,7 @@ Wrong 'component' line format! Qucs回路図ファイル名 - + Subcircuit サブサーキット @@ -9066,12 +9089,12 @@ Wrong 'component' line format! 電圧制御電圧源 - + voltage controlled resistor - + resistance gain @@ -9103,7 +9126,7 @@ Wrong 'component' line format! - + ERROR: No file name in %1 component "%2". エラー:%1に部品¨%2¨というファイル名がありません. @@ -9155,7 +9178,7 @@ Wrong 'component' line format! ファイルによる電圧源 - + VHDL file VHDLファイル @@ -9166,13 +9189,13 @@ Wrong 'component' line format! VHDLファイル名 - + vhdl vhdl - - + + generic variable @@ -9399,7 +9422,7 @@ Overwrite ? - + Successfully exported @@ -9416,7 +9439,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units エラー:"%1"中の時間フォーマットが間違っています。正の数を使ってください @@ -9424,8 +9447,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9523,16 +9546,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9544,7 +9567,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties プロパティ編集 @@ -9569,7 +9592,7 @@ Use PNG, JPEG or SVG graphics! 2-portマッチング - + The ground potential cannot be labeled! グラウンドにはラベルを付けられません ! @@ -9579,7 +9602,7 @@ Use PNG, JPEG or SVG graphics! 矢印 - + Ellipse 楕円 @@ -9589,7 +9612,7 @@ Use PNG, JPEG or SVG graphics! 塗りつぶし楕円 - + Edit Ellipse Properties 楕円プロパティー編集 @@ -9599,7 +9622,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Arc Properties 弧プロパティー編集 @@ -9609,7 +9632,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Line Properties 線プロパティー編集 @@ -9629,7 +9652,7 @@ Use PNG, JPEG or SVG graphics! 塗りつぶし長方形 - + Edit Rectangle Properties 長方形プロパティー編集 @@ -9648,7 +9671,7 @@ Use PNG, JPEG or SVG graphics! タイトル無し - + Format Error: 'Painting' field is not closed! @@ -9804,8 +9827,8 @@ Wrong 'painting' line format! - - + + @@ -9831,7 +9854,7 @@ Unknown field! 未知のフィールドです! - + ERROR: Component "%1" has no analog model. エラー:部品"%1"はアナログモデルがありません. @@ -10996,7 +11019,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11102,24 +11125,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11582,7 +11605,7 @@ Active Filter synthesis program QucsApp - + Schematic 回路図 @@ -11598,47 +11621,47 @@ Active Filter synthesis program - + VHDL Sources VHDLソース - - + + Verilog Sources Verilogソース - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File いずれかのファイル - + The schematic search path has been refreshed. - + Verilog @@ -11648,7 +11671,7 @@ Active Filter synthesis program VHDL - + Open file @@ -11658,7 +11681,7 @@ Active Filter synthesis program - + Open example… @@ -11673,24 +11696,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics 回路図 - + New 新規 @@ -11764,7 +11787,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 現在のプロジェクトの内容 - + Search Components @@ -11801,8 +11824,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -11813,29 +11836,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -11844,43 +11867,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo エラー - + Cannot open "%1". 開けません"%1". - + Library is corrupt. ライブラリが壊れています. - - - - - - - - - - - + + + + + + + + + + + - + Info 情報 - + Default icon not found: %1.png - + -port -port @@ -11891,13 +11914,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! ドキュメントに保存されていない変更があります! - + Do you want to save the changes before copying? @@ -11937,17 +11960,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo ファイルを削除できません! - - - - - - + + + + + + Warning 注意 - + This will delete the file permanently! Continue ? 完全にファイルを削除します! 続けますか? @@ -12010,12 +12033,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! ワークディレクトリを作成できません ! - + Cannot create project directory ! プロジェクトディレクトリを作成できません ! @@ -12028,7 +12051,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo -Project: - + Choose Project Directory for Opening 開始時のプロジェクトディレクトリを選択 @@ -12038,13 +12061,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo プロジェクトが選択されていません! - + Cannot delete file: %1 - - + + @@ -12052,12 +12075,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -12067,12 +12090,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -12107,12 +12130,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12156,35 +12179,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 新しい回路図を作成しています... - - + + + - - + - + - + Ready. 準備完了. - + Creating new text editor... 新しいテキストエディタを作成しています... - - + + Opening file... ファイルを開いています... @@ -12270,7 +12293,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 全てのファイルを保存しています... - + Closing file... ファイルを閉じています... @@ -12289,7 +12312,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 破棄(&D) - + untitled タイトル無し @@ -12319,7 +12342,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12329,7 +12352,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12368,7 +12391,7 @@ Use subcircuit to crete Verilog-A module! 本当に終了しますか? - + The document was modified by another program ! このドキュメントは他のプログラムによって変更されています! @@ -12386,7 +12409,7 @@ Use subcircuit to crete Verilog-A module! そのまま - + Cannot create 作成できません @@ -12401,7 +12424,7 @@ Use subcircuit to crete Verilog-A module! "%1" を開始できません! - + Could not load S[1,1]. S[1,1]がロードできません. @@ -12426,7 +12449,7 @@ Use subcircuit to crete Verilog-A module! 誤った属性です! - + Cutting selection... 選択を切り取っています... @@ -12436,17 +12459,17 @@ Use subcircuit to crete Verilog-A module! 選択をクリップボードにコピーしています... - - - - - - + + + + + + At least two elements must be selected ! 少なくとも二つ以上の要素を選択してください! - + Opening aborted, file not found. @@ -12468,7 +12491,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12548,7 +12571,7 @@ Overwrite ? "%1"を書き込みできません! - + Please open project with subcircuits! サブサーキットと共にプロジェクトを開いてください! @@ -12557,7 +12580,7 @@ Overwrite ? プロジェクトファイルを先に開いてください! - + Please select a diagram graph! 表を先に選択してください! @@ -12615,7 +12638,7 @@ Have you saved the Verilog-A symbols? - + &New 新規(&N) @@ -13437,7 +13460,24 @@ Create Library from Subcircuits サブサーキットよりライブラリ作成 - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S @@ -13499,7 +13539,7 @@ Convert data file to various file formats データファイルをいろいろなファイルにインポート/エクスポート - + Export to &CSV... CSVファイルに変換(&C)... @@ -13794,7 +13834,7 @@ Rotates the selected component by 90� counter-clockwise - + Power combining Starts power combining calculation program @@ -13889,7 +13929,7 @@ Rotates the selected component by 90° counter-clockwise 選択された部品を時計周りに90°回転 - + Mirror about X Axis X軸で反転 @@ -14081,12 +14121,7 @@ Inserts a port symbol ワイア - - Ctrl+E - - - - + Inserts a wire ワイアを挿入 @@ -14304,13 +14339,13 @@ Starts attenuator calculation program アッテネータ計算プログラムを開始 - - + + Simulate シミュレート - + Simulates the current schematic 現在の回路図をシミュレートする @@ -14611,7 +14646,7 @@ TrolltechによるQtについて ツール(&T) - + Compact modelling @@ -14696,83 +14731,100 @@ Open QucsAttenuator + &File ファイル(&F) + &Quit 閉じる(&Q) + + &Help ヘルプ(&H) + &About + About Qt... Qtについて... + Topology + Input 入力 + Attenuation: 減衰値: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by + dB + Zin: Zin: + Zout: Zout: @@ -14782,11 +14834,13 @@ Open + Output 出力 + R1: R1: @@ -14799,16 +14853,26 @@ Open + + + + + + + + -- -- + R2: R2: + R3: R3: @@ -14818,26 +14882,31 @@ Open + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt Qtについて + About... About... + Attenuator synthesis program @@ -14848,6 +14917,8 @@ Attenuator synthesis program + + Copyright (C) 2006 by @@ -14857,6 +14928,7 @@ Attenuator synthesis program + Error: Set Attenuation less than %1 dB @@ -16316,6 +16388,134 @@ open files with an appropriate program. 利用できない伝送線路タイプです. + + Qucs_S_SPAR_Viewer + + + &File + ファイル(&F) + + + + &Quit + 閉じる(&Q) + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + ヘルプ(&H) + + + + &About + + + + + About Qt... + Qtについて... + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + Qtについて + + + + About... + + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + 注意 + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + エラー + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16357,7 +16557,7 @@ open files with an appropriate program. Schematic - + Title タイトル @@ -16413,12 +16613,12 @@ Edits the symbol for this schematic この回路図の為のシンボルを編集 - + generic - + Error エラー @@ -16436,7 +16636,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16734,7 +16934,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -16975,7 +17175,7 @@ Set the admsXml location on the application settings. 全てのファイル - + Info 情報 diff --git a/translations/qucs_kk.ts b/translations/qucs_kk.ts index 6fc66ca42..f9e67566e 100644 --- a/translations/qucs_kk.ts +++ b/translations/qucs_kk.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -550,7 +550,7 @@ Компоненттердің қасиетін өзгерту - + Sweep бұрап ашу @@ -562,13 +562,13 @@ - + display in schematic сұлбада көрсету - + Simulation: Моделдеу: @@ -619,18 +619,18 @@ - + Step: Қадам: - + Number: Сан: - + Properties Қасиеті @@ -712,26 +712,28 @@ - + - - + + + + yes ия - - + + - + no жоқ - + Select a file Файлды таңдау @@ -766,7 +768,7 @@ Verilog файлдары - + Points per decade: Бір ондыққа шақ келетін нүктелер саны: @@ -833,7 +835,7 @@ DiagramDialog - + Edit Diagram Properties Диаграмма қасиетін өзгерту @@ -1364,18 +1366,18 @@ Модельдеу - + Stop - + Save netlist - + Exit @@ -1385,12 +1387,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2054,7 +2056,7 @@ Filter synthesis program Басқа файлдар - + Error Қате @@ -2064,7 +2066,7 @@ Filter synthesis program - + Enter a Data File Name Файл атының енгізілген уақыты @@ -2102,7 +2104,7 @@ Filter synthesis program Қате: Файлдың пішімі белгісіз! Файл атының кеңейтілуін тексеріңіз! - + Running command line: Бұйрықты іске асыру: @@ -2112,7 +2114,7 @@ Filter synthesis program Қате: Түрлендірушіні іске қосу мүмкін емес! - + Successfully converted file! Файл түрленді! @@ -2806,7 +2808,19 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2815,7 +2829,8 @@ Node name will not be changed. Тізбектің толық кедергісі(Ом) - + + Error Қате @@ -3045,82 +3060,82 @@ but is %1 ! - - + + linear double сызықтық затты тип - - - + + + logarithmic double логарифмдік заттық тип - - - + + + linear integer сызықтық бүтін тип - - + + logarithmic integer логарифмдік бүтін тип - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add Қосу @@ -3158,47 +3173,47 @@ but is %1 ! - - + + minimize минимум - - - + + + maximize максимум - - - + + + less Азырақ - - - + + + greater көбірек - - - + + + equal бірдей - - + + monitor бақылау - + Goals Мақсаттар @@ -3218,16 +3233,16 @@ but is %1 ! Артқа қайтару - + - + yes ия - + no @@ -3942,13 +3957,13 @@ but is %1 ! t ығысу - + for transient simulation: inductance in Henry өтпелі процестерді моделдеу үшін: индуктивтілікті генримен өлшеу - + for transient simulation: capacitance in Farad өтпелі процестерді моделдеу үшін: сыйымдылықты фарадпен өлшеу @@ -3968,7 +3983,7 @@ but is %1 ! - + transfer function scaling factor масштаб коэффициентінің беріліс функциясы @@ -3984,8 +3999,8 @@ but is %1 ! биполярлы транзистор - - + + npn transistor npn транзистор @@ -3998,7 +4013,7 @@ but is %1 ! - + polarity полярлану @@ -4279,7 +4294,7 @@ but is %1 ! биполяр транзистор үшін үндестік бойынша аймақ - + bipolar junction transistor with substrate салымшасы және биполяр өтпелі бар транзистор @@ -4577,13 +4592,13 @@ but is %1 ! - + - + - + @@ -4892,22 +4907,22 @@ Wrong 'component' line format! сұлбадағы матрицаны шешетін әдіс - + dc block тұрақты тоқтағы бөгет - + dc Block Тұрақты тоқтағы жол айырымы - + dc feed тұрақты токты қамтамасыз ету - + dc Feed Тұрақты токты қамтамасыз ету @@ -4941,7 +4956,7 @@ Wrong 'component' line format! қиылысқан байланыстың уақыттық кідірісі - + D-FlipFlop w/ SR Д-триггері сым/SR @@ -5137,7 +5152,7 @@ Wrong 'component' line format! Диод үшін үндестік бойынша берілген аумақ - + Diode Диод @@ -6200,18 +6215,18 @@ Wrong 'component' line format! - + current equation ағынның теңдігі - - + + charge equation теңдік заряд - + Equation Defined Device Математикалық теңдеуді анықтайтын құрылғы @@ -6706,7 +6721,7 @@ Wrong 'component' line format! п-н өткелімен басқарылатын өрістік транзистор үшін үндестік бойынша берілген аумақ - + n-JFET n-JFET @@ -7370,7 +7385,7 @@ Wrong 'component' line format! МОП өрістік транзистор - + n-MOSFET n-МОП @@ -7388,7 +7403,7 @@ Wrong 'component' line format! МОП кедейленген өрістік транзистор типі - + zero-bias threshold voltage нөлдік ығысу кезіндегі табалдырықтық кернеу @@ -7578,7 +7593,15 @@ Wrong 'component' line format! бастау өткелінің периметрі - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate МОП салымшасы бар өрістік транзистор @@ -7901,19 +7924,19 @@ Wrong 'component' line format! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8603,19 +8626,19 @@ Wrong 'component' line format! - + parameter equation параметрлік теңдеу - + Equation Defined RF Device RF құрылғысы үшін әртүрлі теңдеулер - + RF RF @@ -8780,7 +8803,7 @@ Wrong 'component' line format! 2 портты S-параметрлері бар файл - + file файл @@ -8805,7 +8828,7 @@ Wrong 'component' line format! SPICE - + ERROR: No file name in SPICE component "%1". ҚАТЕ: "%1"SPICE компонентінің аты жоқ. @@ -8826,7 +8849,7 @@ Wrong 'component' line format! Қате: Түрлендірілген SPICE "%1" файлды ашу мүмкін емес . - + Info Ақпарат @@ -8857,7 +8880,7 @@ Wrong 'component' line format! SPICE файл "%1"түрленді. - + subcircuit сұлба @@ -8867,7 +8890,7 @@ Wrong 'component' line format! qucs сұлба файлының аты - + Subcircuit Сұлба @@ -9278,12 +9301,12 @@ Wrong 'component' line format! кернеумен басқарылатын кернеу көзі - + voltage controlled resistor - + resistance gain @@ -9315,7 +9338,7 @@ Wrong 'component' line format! - + ERROR: No file name in %1 component "%2". ҚАТЕ: "%1"және"%2" компоненттерінің аты жоқ. @@ -9367,7 +9390,7 @@ Wrong 'component' line format! Кернеу қорек көзінің базалық файлы - + VHDL file VHDL файлы @@ -9378,13 +9401,13 @@ Wrong 'component' line format! VHDL файлдың аты - + vhdl VHDL - - + + generic variable айнымалыларды генерирлеу @@ -9610,7 +9633,7 @@ Overwrite ? - + Successfully exported @@ -9627,7 +9650,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units Қате: Уақыттың пішімі белгісіз "%1". Өлшем бірліктермен қоса оң сандарды қолданыңыз @@ -9635,8 +9658,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9734,16 +9757,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9755,7 +9778,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties Қасиеттерін Өзгерту @@ -9780,7 +9803,7 @@ Use PNG, JPEG or SVG graphics! төрт полюсті сәйкестендіру - + The ground potential cannot be labeled! Жердің потенциалында түртпе болу мүмкін емес!! @@ -9790,7 +9813,7 @@ Use PNG, JPEG or SVG graphics! Бағыттауыш - + Ellipse Эллипс @@ -9800,7 +9823,7 @@ Use PNG, JPEG or SVG graphics! іші толтырылған эллипс - + Edit Ellipse Properties Эллипс қасиеттерін өзгерту @@ -9810,7 +9833,7 @@ Use PNG, JPEG or SVG graphics! Эллиптік доға - + Edit Arc Properties Доғаның қасиетін өзгерту @@ -9820,7 +9843,7 @@ Use PNG, JPEG or SVG graphics! Сызық - + Edit Line Properties Сызық қасиетін өзгерту @@ -9840,7 +9863,7 @@ Use PNG, JPEG or SVG graphics! іші толтырылған тіктөртбұрыш - + Edit Rectangle Properties Тіктөртбұрыш қасиеттерін өзгерту @@ -9859,7 +9882,7 @@ Use PNG, JPEG or SVG graphics! аты жоқ - + Format Error: 'Painting' field is not closed! @@ -10015,8 +10038,8 @@ Wrong 'painting' line format! - - + + @@ -10041,7 +10064,7 @@ Unknown field! Файл пішімінде қате бар: Белгісіз өріс! - + ERROR: Component "%1" has no analog model. ҚАТЕ: "%1" компонентінің аналогтық моделі жоқ. @@ -11225,7 +11248,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11331,24 +11354,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11811,7 +11834,7 @@ Active Filter synthesis program QucsApp - + Schematic Сұлба @@ -11827,47 +11850,47 @@ Active Filter synthesis program - + VHDL Sources VHDL қорек көздері - - + + Verilog Sources Verilog қорек көздері - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File Басқа файл - + The schematic search path has been refreshed. - + Verilog Verilog @@ -11877,7 +11900,7 @@ Active Filter synthesis program VHDL - + Open file @@ -11887,7 +11910,7 @@ Active Filter synthesis program - + Open example… @@ -11902,24 +11925,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics Сұлбалар - + New Құру @@ -11993,7 +12016,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo қолданыстағы проекттің мазмұны - + Search Components @@ -12030,8 +12053,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -12042,29 +12065,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -12073,43 +12096,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Қате - + Cannot open "%1". Ашуға мүмкіндік болмады"%1". - + Library is corrupt. Кітапхана бұзылған. - - - - - - - - - - - + + + + + + + + + + + - + Info Ақпарат - + Default icon not found: %1.png - + -port -порттық @@ -12120,14 +12143,14 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! Құжатта сақталмаған өзгертулер бар! - + Do you want to save the changes before copying? @@ -12167,17 +12190,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Ашық файлды жою мүмкін емес! - - - - - - + + + + + + Warning Ескерту - + This will delete the file permanently! Continue ? Файлды жою қайтарылмайды! Жалғастырасыз ба? @@ -12240,12 +12263,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! Жұмыс папкасы құрылмады ! - + Cannot create project directory ! Проект папкасын құру мүмкін емес ! @@ -12258,7 +12281,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - Проект: - + Choose Project Directory for Opening Ашу үшін проекттің бір папкасын таңдаңыз @@ -12268,13 +12291,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Проект таңдалған жоқ ! - + Cannot delete file: %1 - - + + @@ -12282,12 +12305,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -12297,12 +12320,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -12337,12 +12360,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12386,35 +12409,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Жаңа сұлбаны құру... - - + + + - - + - + - + Ready. Дайын. - + Creating new text editor... Жаңа мәтіндік редакторды құру... - - + + Opening file... Файлды ашу... @@ -12501,7 +12524,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Барлық файлдарды сақтау... - + Closing file... Файлды жабу... @@ -12520,7 +12543,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo &Сақтаусыз жабу - + untitled аты жоқ @@ -12550,7 +12573,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12560,7 +12583,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12599,7 +12622,7 @@ Use subcircuit to crete Verilog-A module! Бағдарламалық қамтамадан шыққыңыз келеді ма? - + The document was modified by another program ! Бұл құжат басқа бағдарламалық қамтамамен өзгертілген! @@ -12617,7 +12640,7 @@ Use subcircuit to crete Verilog-A module! Қалдыру - + Cannot create Құру мүмкін емес @@ -12632,7 +12655,7 @@ Use subcircuit to crete Verilog-A module! Файлды бастау"%1" мүмкін емес! - + Could not load S[1,1]. S[1,1] элементін енгізу мүмкін емес. @@ -12657,7 +12680,7 @@ Use subcircuit to crete Verilog-A module! Тәуелділік дұрыс емес! - + Cutting selection... Ерекшеленгенді кесіп алу... @@ -12667,17 +12690,17 @@ Use subcircuit to crete Verilog-A module! Ерекшеленген аумақты алмастыру буферіне көшіру... - - - - - - + + + + + + At least two elements must be selected ! Кем дегенде екі элемент таңдалуы тиіс ! - + Opening aborted, file not found. @@ -12699,7 +12722,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12778,7 +12801,7 @@ Overwrite ? Жазу мүмкін емес"%1"! - + Please open project with subcircuits! Сұлбасы бар проектті ашыңыз! @@ -12787,7 +12810,7 @@ Overwrite ? Алдымен проектті ашыңыз! - + Please select a diagram graph! Диаграмма графигін таңдаңыз! @@ -12845,7 +12868,7 @@ Have you saved the Verilog-A symbols? - + &New &Құру @@ -13669,7 +13692,24 @@ Create Library from Subcircuits Сұлбалардан кітапхананы құру - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S @@ -13729,7 +13769,7 @@ Convert data file to various file formats Мәліметтер файлын Qucs мәліметтер файлына түрлендіру - + Export to &CSV... &CSV-ға экспорттау... @@ -14024,7 +14064,7 @@ Rotates the selected component by 90� counter-clockwise - + Power combining Starts power combining calculation program @@ -14119,7 +14159,7 @@ Rotates the selected component by 90° counter-clockwise Ерекшеленген компонентті сағат тіліне қарсы 90°-қа бұрады - + Mirror about X Axis X өсіне байланысты бейнелеу @@ -14311,12 +14351,7 @@ Inserts a port symbol Өткізгіш - - Ctrl+E - - - - + Inserts a wire Өткізгішті енгізеді @@ -14536,13 +14571,13 @@ Starts attenuator calculation program Аттеньюаторларды есептейтін бағдарламаны іске қосады - - + + Simulate Модельдеу - + Simulates the current schematic Қоданыстағы сұлбаны моделдейді @@ -14844,7 +14879,7 @@ Trolltech Qt жайлы &Құралдар - + Compact modelling @@ -14929,68 +14964,82 @@ Open QucsAttenuator + &File &Файл + &Quit &Шығу + + &Help &Көмек + &About + About Qt... Qt жайлы... + Topology Топология + Input Кіріс + Attenuation: Бәсеңдеу: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by @@ -15000,11 +15049,13 @@ Open + dB дБ + Zin: Zin: @@ -15018,6 +15069,7 @@ Open + Zout: Zout: @@ -15027,11 +15079,13 @@ Open + Output Шығыс + R1: R1: @@ -15044,16 +15098,26 @@ Open + + + + + + + + -- -- + R2: R2: + R3: R3: @@ -15063,26 +15127,31 @@ Open + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt Qt жайлы + About... Жайлы... + Attenuator synthesis program @@ -15093,6 +15162,8 @@ Attenuator synthesis program + + Copyright (C) 2006 by Copyright (C) 2006 by @@ -15102,6 +15173,7 @@ Attenuator synthesis program + Error: Set Attenuation less than %1 dB @@ -16563,6 +16635,134 @@ open files with an appropriate program. Беріліс арнаның типі қол жеткісіз. + + Qucs_S_SPAR_Viewer + + + &File + &Файл + + + + &Quit + &Шығу + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + &Көмек + + + + &About + + + + + About Qt... + Qt жайлы... + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + Qt жайлы + + + + About... + Жайлы... + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + Ескерту + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Қате + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16604,7 +16804,7 @@ open files with an appropriate program. Schematic - + Title Аты @@ -16660,12 +16860,12 @@ Edits the symbol for this schematic Бұл сұлбаның белгісін өзгерту - + generic - + Error Қате @@ -16683,7 +16883,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16981,7 +17181,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -17222,7 +17422,7 @@ Set the admsXml location on the application settings. Барлық файлдар - + Info Ақпарат diff --git a/translations/qucs_pl.ts b/translations/qucs_pl.ts index aa91cd844..8d9eb4331 100644 --- a/translations/qucs_pl.ts +++ b/translations/qucs_pl.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -551,7 +551,7 @@ Edytuj właściwości elementu - + Sweep Przemiatanie @@ -563,13 +563,13 @@ - + display in schematic wyświetlaj na schemacie - + Simulation: Symulacja: @@ -620,18 +620,18 @@ - + Step: Krok: - + Number: Liczba: - + Properties Właściwości @@ -713,26 +713,28 @@ - + - - + + + + yes tak - - + + - + no nie - + Select a file Wybierz plik @@ -767,7 +769,7 @@ Plik Verilog - + Points per decade: Liczba punktów w dekadzie: @@ -834,7 +836,7 @@ DiagramDialog - + Edit Diagram Properties Edycja właściwości wykresu @@ -1361,18 +1363,18 @@ Sumuluj - + Stop - + Save netlist - + Exit @@ -1382,12 +1384,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2048,7 +2050,7 @@ Program syntezy filtrów - + Error Błąd @@ -2058,7 +2060,7 @@ Program syntezy filtrów - + Enter a Data File Name Podaj nazwę pliku @@ -2096,7 +2098,7 @@ Program syntezy filtrów BŁĄ|D: Nieznany format pliku. Sprawdź rozszerzenie pliku! - + Running command line: @@ -2106,7 +2108,7 @@ Program syntezy filtrów BŁĄD: Nie można uruchomić konwertera! - + Successfully converted file! @@ -2800,7 +2802,19 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2809,7 +2823,8 @@ Node name will not be changed. Impedancja (w ohmach) - + + Error Błąd @@ -3040,82 +3055,82 @@ a jest %1 ! - - + + linear double podwójnie liniowa - - - + + + logarithmic double podwójnie logarytmiczna - - - + + + linear integer liniowa całkowita - - + + logarithmic integer logarytmiczna całkowita - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add Dodaj @@ -3153,47 +3168,47 @@ a jest %1 ! - - + + minimize minimalizuj - - - + + + maximize maksymalizuj - - - + + + less mniej niż - - - + + + greater więcej niż - - - + + + equal równe - - + + monitor monitor - + Goals Cele @@ -3213,16 +3228,16 @@ a jest %1 ! Porzuć - + - + yes tak - + no @@ -3937,13 +3952,13 @@ a jest %1 ! Trójnik zasilający - + for transient simulation: inductance in Henry dla symulacji czasowej: indukcyjność w Henrach - + for transient simulation: capacitance in Farad dla symulacji czasowej: pojemność w Faradach @@ -3963,7 +3978,7 @@ a jest %1 ! - + transfer function scaling factor @@ -3979,8 +3994,8 @@ a jest %1 ! tranzystor złączowy bipolarny - - + + npn transistor tranzystor npn @@ -3993,7 +4008,7 @@ a jest %1 ! - + polarity polarność @@ -4274,7 +4289,7 @@ a jest %1 ! domyślny obszar transystora bipolarnego - + bipolar junction transistor with substrate tranzystor złączowy bipolarny z podłożem @@ -4572,13 +4587,13 @@ a jest %1 ! - + - + - + @@ -4888,22 +4903,22 @@ Błędny format lini 'component'! metoda rozwiązania macierzy układu - + dc block zapora dc - + dc Block Zapora dc - + dc feed dławik - + dc Feed Dławik @@ -4937,7 +4952,7 @@ Błędny format lini 'component'! - + D-FlipFlop w/ SR @@ -5133,7 +5148,7 @@ Błędny format lini 'component'! domyślny obszar diody - + Diode Dioda @@ -6000,18 +6015,18 @@ Błędny format lini 'component'! - + current equation równanie prądowe - - + + charge equation równanie ładunkowe - + Equation Defined Device Element Opisany Równaniem @@ -6506,7 +6521,7 @@ Błędny format lini 'component'! domyślny obszar transystora JFET - + n-JFET n-JFET @@ -7166,7 +7181,7 @@ Błędny format lini 'component'! tranzystor polowy MOS - + n-MOSFET n-MOSFET @@ -7184,7 +7199,7 @@ Błędny format lini 'component'! zubażany MOSFET - + zero-bias threshold voltage napięcie progowe (zero-bias) @@ -7374,7 +7389,15 @@ Błędny format lini 'component'! - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate MOS tranzystor polowy z podłożem @@ -7697,19 +7720,19 @@ Błędny format lini 'component'! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8399,19 +8422,19 @@ Błędny format lini 'component'! - + parameter equation - + Equation Defined RF Device - + RF @@ -8576,7 +8599,7 @@ Błędny format lini 'component'! plik z parameterami S dwuwrotnika - + file plik @@ -8601,7 +8624,7 @@ Błędny format lini 'component'! spice - + ERROR: No file name in SPICE component "%1". BŁĄD: Komponent SPICE "%1" nie ma nazwy pliku. @@ -8622,7 +8645,7 @@ Błędny format lini 'component'! BŁĄD: Nie można otworzyć przekonwertowanego pliku "%1". - + Info Informacja @@ -8653,7 +8676,7 @@ Błędny format lini 'component'! Konwersja pliku SPICE "%1". - + subcircuit podukład @@ -8663,7 +8686,7 @@ Błędny format lini 'component'! nazwa pliku ze schematem programu qucs - + Subcircuit Podukład @@ -9074,12 +9097,12 @@ Błędny format lini 'component'! źródło napięciowe sterowane napięciem - + voltage controlled resistor - + resistance gain @@ -9111,7 +9134,7 @@ Błędny format lini 'component'! - + ERROR: No file name in %1 component "%2". BŁĄD: Coś nie tak z %1 i "%2". @@ -9164,7 +9187,7 @@ Błędny format lini 'component'! - + VHDL file Plik VHDL @@ -9175,13 +9198,13 @@ Błędny format lini 'component'! Nazwa pliku VHDL - + vhdl VHDL - - + + generic variable @@ -9411,7 +9434,7 @@ Nadpisać ? - + Successfully exported @@ -9428,7 +9451,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units Błąd: Zły format czasu w "%1". Użyj wartości dodatnich z jednostką @@ -9436,8 +9459,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9535,16 +9558,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9556,7 +9579,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties Edytuj właściwości @@ -9581,7 +9604,7 @@ Use PNG, JPEG or SVG graphics! dopasowanie dwuwrotowe - + The ground potential cannot be labeled! Nie można przypisać nazwy do potencjału masy! @@ -9591,7 +9614,7 @@ Use PNG, JPEG or SVG graphics! Strzałka - + Ellipse Elipsa @@ -9601,7 +9624,7 @@ Use PNG, JPEG or SVG graphics! wypełniona elipsa - + Edit Ellipse Properties Zmień właściwości elipsy @@ -9611,7 +9634,7 @@ Use PNG, JPEG or SVG graphics! Wycinek elipsy - + Edit Arc Properties Edytuj właściwości łuku @@ -9621,7 +9644,7 @@ Use PNG, JPEG or SVG graphics! Linia - + Edit Line Properties Zmień właściwości linii @@ -9641,7 +9664,7 @@ Use PNG, JPEG or SVG graphics! wypełniony prostokąt - + Edit Rectangle Properties Zmień właściwości kwadratu @@ -9660,7 +9683,7 @@ Use PNG, JPEG or SVG graphics! bez nazwy - + Format Error: 'Painting' field is not closed! @@ -9816,8 +9839,8 @@ Błędny format lini 'painting'! - - + + @@ -9843,7 +9866,7 @@ Unknown field! Nieznane pole! - + ERROR: Component "%1" has no analog model. BŁĄD: Komponent "%1" nie ma modelu analogowego. @@ -11030,7 +11053,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11136,24 +11159,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11616,7 +11639,7 @@ Active Filter synthesis program QucsApp - + Schematic Schemat @@ -11632,47 +11655,47 @@ Active Filter synthesis program - + VHDL Sources Źródła VHDL - - + + Verilog Sources Źródła Verilog - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File Dowolny Plik - + The schematic search path has been refreshed. - + Verilog Verilog @@ -11682,7 +11705,7 @@ Active Filter synthesis program VHDL - + Open file @@ -11692,7 +11715,7 @@ Active Filter synthesis program - + Open example… @@ -11707,24 +11730,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics Schematy - + New Nowy @@ -11798,7 +11821,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo zawartość aktaualnego projektu - + Search Components @@ -11835,8 +11858,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -11847,29 +11870,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -11878,43 +11901,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Błąd - + Cannot open "%1". Nie można otworzyć "%1". - + Library is corrupt. Biblioteka jest uszkodzona. - - - - - - - - - - - + + + + + + + + + + + - + Info Informacja - + Default icon not found: %1.png - + -port -wrota @@ -11925,14 +11948,14 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! Dokument zawiera niezapisane zmiany! - + Do you want to save the changes before copying? @@ -11972,17 +11995,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Nie mogę usunąć otwartego pliku ! - - - - - - + + + + + + Warning Ostrzeżenia - + This will delete the file permanently! Continue ? Ta operacja usunie bezpowrotnie plik! Czy chcesz kontynuować ? @@ -12045,12 +12068,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! Nie mogę stworzyć katalogu roboczego! - + Cannot create project directory ! Nie mogę utworzyć katalogu projektowego ! @@ -12063,7 +12086,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - Projekt: - + Choose Project Directory for Opening Wybierz katalog projektowy do otwarcia @@ -12073,13 +12096,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Nie wybrano projektu ! - + Cannot delete file: %1 - - + + @@ -12087,12 +12110,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -12102,12 +12125,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -12142,12 +12165,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12191,35 +12214,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Tworzenie nowego schematu... - - + + + - - + - + - + Ready. Gotowy. - + Creating new text editor... Tworzenie nowego tekstu... - - + + Opening file... Otwieranie pliku... @@ -12306,7 +12329,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Zapisywanie wszystkich plików... - + Closing file... Zamykanie pliku... @@ -12325,7 +12348,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo &Zaniechaj - + untitled bez nazwy @@ -12355,7 +12378,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12365,7 +12388,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12404,7 +12427,7 @@ Use subcircuit to crete Verilog-A module! Czy rzeczywiście chcesz zakończyć? - + The document was modified by another program ! Dokument został zmodyfikowany przez inny program ! @@ -12422,7 +12445,7 @@ Use subcircuit to crete Verilog-A module! Pozostaw - + Cannot create Nie można utworzyć @@ -12437,7 +12460,7 @@ Use subcircuit to crete Verilog-A module! Nie można uruchomić "%1"! - + Could not load S[1,1]. Nie można załadować S[1,1]. @@ -12462,7 +12485,7 @@ Use subcircuit to crete Verilog-A module! Zła zależność! - + Cutting selection... Wycinanie zaznaczenia... @@ -12472,17 +12495,17 @@ Use subcircuit to crete Verilog-A module! Kopiowanie zaznaczenia do schowka... - - - - - - + + + + + + At least two elements must be selected ! Przynajmniej dwa elementy muszą być wybrane ! - + Opening aborted, file not found. @@ -12504,7 +12527,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12584,7 +12607,7 @@ Nadpisać ? Nie można pisać do "%1" ! - + Please open project with subcircuits! Proszę otworzyć projekt z podukładami! @@ -12593,7 +12616,7 @@ Nadpisać ? Proszę najpierw otworzyć projekt! - + Please select a diagram graph! Proszę wybrać wykres! @@ -12651,7 +12674,7 @@ Have you saved the Verilog-A symbols? - + &New &Nowy @@ -13473,7 +13496,24 @@ Create Library from Subcircuits tworzenie biblioteki z podukładów - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S @@ -13527,7 +13567,7 @@ Convert data file to various file formats - + Export to &CSV... Exportuj do &CSV... @@ -13822,7 +13862,7 @@ Obraca wybrany elelement o 90 stopni zgodnie z ruchem wskazówek zegara {90�?} - + Power combining Starts power combining calculation program @@ -13917,7 +13957,7 @@ Rotates the selected component by 90° counter-clockwise Obraca wybrany elelement o 90 stopni zgodnie z ruchem wskazówek zegara - + Mirror about X Axis Odbicie wzdłuż osi X @@ -14110,12 +14150,7 @@ Wstawia symbol portu Drut - - Ctrl+E - - - - + Inserts a wire Wstaw drut @@ -14335,13 +14370,13 @@ Starts attenuator calculation program Uruchamia program syntezy tłumików - - + + Simulate Sumuluj - + Simulates the current schematic Symuluje bieżący schemat @@ -14642,7 +14677,7 @@ O bibliotece QT firmy Trolltech &Narzędzia - + Compact modelling @@ -14727,68 +14762,82 @@ Open QucsAttenuator + &File &Plik + &Quit &Wyjście + + &Help &Pomoc + &About + About Qt... O bibliotece QT... + Topology Topologia + Input Wejście + Attenuation: Tłumienie: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by @@ -14798,11 +14847,13 @@ Open + dB dB + Zin: Zin: @@ -14816,6 +14867,7 @@ Open + Zout: Zout: @@ -14825,11 +14877,13 @@ Open + Output Wyjście + R1: R1: @@ -14842,16 +14896,26 @@ Open + + + + + + + + -- - + R2: R2: + R3: R3: @@ -14861,26 +14925,31 @@ Open + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt O QT + About... O... + Attenuator synthesis program @@ -14891,6 +14960,8 @@ Program syntezy tłumików + + Copyright (C) 2006 by Copyright (C) 2006 by @@ -14900,6 +14971,7 @@ Program syntezy tłumików + Error: Set Attenuation less than %1 dB @@ -16375,6 +16447,134 @@ otworzyć ten plik odpowiednim programem. Niedostępny rodzaj linii transmisyjnej. + + Qucs_S_SPAR_Viewer + + + &File + &Plik + + + + &Quit + &Wyjście + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + &Pomoc + + + + &About + + + + + About Qt... + O bibliotece QT... + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + O QT + + + + About... + O... + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Błąd + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16416,7 +16616,7 @@ otworzyć ten plik odpowiednim programem. Schematic - + Title @@ -16472,12 +16672,12 @@ Edits the symbol for this schematic Edytuj szmbol dla tego schematu - + generic - + Error Błąd @@ -16495,7 +16695,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16793,7 +16993,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -17034,7 +17234,7 @@ Set the admsXml location on the application settings. Wszystkie pliki - + Info Informacja diff --git a/translations/qucs_pt_BR.ts b/translations/qucs_pt_BR.ts index c5f1301c0..bc266c8b4 100644 --- a/translations/qucs_pt_BR.ts +++ b/translations/qucs_pt_BR.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -583,7 +583,7 @@ Editar Propriedades do Componente - + Sweep Varrer @@ -595,13 +595,13 @@ - + display in schematic mostrar no esquemático - + Simulation: Simulação: @@ -652,18 +652,18 @@ - + Step: Passo: - + Number: Número: - + Properties Propriedades @@ -745,26 +745,28 @@ - + - - + + + + yes sim - - + + - + no não - + Select a file Selecione um arquivo @@ -799,7 +801,7 @@ Arquivos VHDL - + Points per decade: Pontos por década: @@ -866,7 +868,7 @@ DiagramDialog - + Edit Diagram Properties Editar Propriedades do Diagrama @@ -1397,18 +1399,18 @@ Simular - + Stop - + Save netlist - + Exit Sair @@ -1418,12 +1420,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2225,7 +2227,7 @@ Filter synthesis program Qualquer arquivo - + Error Erro @@ -2235,7 +2237,7 @@ Filter synthesis program - + Enter a Data File Name Inserir Nome para o Arquivo de Dados @@ -2273,7 +2275,7 @@ Filter synthesis program ERRO: Formato de arquivo desconhecido! Por favor, verifique a extensão do nome do arquivo! - + Running command line: Executando linha de comando: @@ -2283,7 +2285,7 @@ Filter synthesis program ERRO: Não é possível iniciar o conversor! - + Successfully converted file! Arquivo convertido com sucesso! @@ -2977,7 +2979,19 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2986,7 +3000,8 @@ Node name will not be changed. Impedância (Ohms) - + + Error Erro @@ -3241,82 +3256,82 @@ Programa de computação de código de cores de resistor - - + + linear double linear double - - - + + + logarithmic double logarítmico double - - - + + + linear integer linear integer - - + + logarithmic integer logarítmico integer - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add Adicionar @@ -3354,47 +3369,47 @@ Programa de computação de código de cores de resistor - - + + minimize minimizar - - - + + + maximize maximizar - - - + + + less menor - - - + + + greater maior - - - + + + equal igual - - + + monitor monitor - + Goals Objetivos @@ -3414,16 +3429,16 @@ Programa de computação de código de cores de resistor Cancelar - + - + yes sim - + no @@ -4138,13 +4153,13 @@ Programa de computação de código de cores de resistor bias t - + for transient simulation: inductance in Henry para simulação transiente: indutância em Henry - + for transient simulation: capacitance in Farad para simulação transiente: capacitância em Farad @@ -4164,7 +4179,7 @@ Programa de computação de código de cores de resistor - + transfer function scaling factor fator de escala função de transferência @@ -4180,8 +4195,8 @@ Programa de computação de código de cores de resistor transistor de junção bipolar - - + + npn transistor transistor npn @@ -4194,7 +4209,7 @@ Programa de computação de código de cores de resistor - + polarity polaridade @@ -4475,7 +4490,7 @@ Programa de computação de código de cores de resistor - + bipolar junction transistor with substrate transistor de junção bipolar com substrato @@ -4773,13 +4788,13 @@ Programa de computação de código de cores de resistor - + - + - + @@ -5096,22 +5111,22 @@ Formato da linha 'componente' errado! - + dc block dc block - + dc Block dc Block - + dc feed dc feed - + dc Feed dc Feed @@ -5145,7 +5160,7 @@ Formato da linha 'componente' errado! - + D-FlipFlop w/ SR @@ -5341,7 +5356,7 @@ Formato da linha 'componente' errado! - + Diode Diodo @@ -6260,18 +6275,18 @@ Formato da linha 'componente' errado! - + current equation - - + + charge equation - + Equation Defined Device @@ -6766,7 +6781,7 @@ Formato da linha 'componente' errado! - + n-JFET JFET tipo n @@ -7422,7 +7437,7 @@ Formato da linha 'componente' errado! transistor MOS de efeito de campo - + n-MOSFET n-MOSFET @@ -7440,7 +7455,7 @@ Formato da linha 'componente' errado! MOSFET depleção - + zero-bias threshold voltage @@ -7630,7 +7645,15 @@ Formato da linha 'componente' errado! - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate @@ -7953,19 +7976,19 @@ Formato da linha 'componente' errado! - - + + inductance of coil indutância da bobina - - + + coupling factor between coil %1 and coil %2 fator de acoplamento entre bobina %1 e %2 de bobina - + N Mutual Inductors N Indutores de Mútuos @@ -8655,19 +8678,19 @@ Formato da linha 'componente' errado! - + parameter equation - + Equation Defined RF Device - + RF @@ -8832,7 +8855,7 @@ Formato da linha 'componente' errado! - + file arquivo @@ -8857,7 +8880,7 @@ Formato da linha 'componente' errado! - + ERROR: No file name in SPICE component "%1". ERRO: Sem nome de arquivo no componente SPICE %1". @@ -8878,7 +8901,7 @@ Formato da linha 'componente' errado! ERRO: Não é possível abrir arquivo SPICE convertido "%1". - + Info Informação @@ -8909,7 +8932,7 @@ Formato da linha 'componente' errado! Convertendo arquivo SPICE "%1". - + subcircuit subcircuito @@ -8919,7 +8942,7 @@ Formato da linha 'componente' errado! nome do arquivo esquemático do qucs - + Subcircuit Sub-circuito @@ -9330,12 +9353,12 @@ Formato da linha 'componente' errado! fonte de tensão controlada por tensão - + voltage controlled resistor - + resistance gain @@ -9367,7 +9390,7 @@ Formato da linha 'componente' errado! - + ERROR: No file name in %1 component "%2". ERRO: Sem nome de arquivo em %1 componente "%2". @@ -9419,7 +9442,7 @@ Formato da linha 'componente' errado! - + VHDL file @@ -9430,13 +9453,13 @@ Formato da linha 'componente' errado! - + vhdl VHDL - - + + generic variable variável genérica @@ -9663,7 +9686,7 @@ Sobrescrever? - + Successfully exported @@ -9681,7 +9704,7 @@ Use PNG, JPEG or SVG graphics! Use gráficos PNG, JPEG ou SVG! - + Error: Wrong time format in "%1". Use positive number with units ERRO: Formato de tempo errado em "%1". Use um número positivo com unidades @@ -9689,8 +9712,8 @@ Use gráficos PNG, JPEG ou SVG! - - + + verilog-a user devices @@ -9788,16 +9811,16 @@ Use gráficos PNG, JPEG ou SVG! - - - + + + diagrams diagramas - + paintings @@ -9809,7 +9832,7 @@ Use gráficos PNG, JPEG ou SVG! - + Edit Properties Editar Propriedades @@ -9834,7 +9857,7 @@ Use gráficos PNG, JPEG ou SVG! casamento 2-portas - + The ground potential cannot be labeled! O nó de terra não pode ser rotulado! @@ -9851,7 +9874,7 @@ Defina a localização do Octave nas configurações do aplicativo.Flexa - + Ellipse Elipse @@ -9861,7 +9884,7 @@ Defina a localização do Octave nas configurações do aplicativo.Elipse preenchida - + Edit Ellipse Properties Editar Propriedades de Elipse @@ -9871,7 +9894,7 @@ Defina a localização do Octave nas configurações do aplicativo.Arco Elíptico - + Edit Arc Properties Editar Propriedades de Arco @@ -9881,7 +9904,7 @@ Defina a localização do Octave nas configurações do aplicativo.Linha - + Edit Line Properties Editar Propriedades de Linha @@ -9901,7 +9924,7 @@ Defina a localização do Octave nas configurações do aplicativo.Retangulo preenchido - + Edit Rectangle Properties Editar Propriedades de Retângulo @@ -9920,7 +9943,7 @@ Defina a localização do Octave nas configurações do aplicativo.Sem título - + Format Error: 'Painting' field is not closed! @@ -10077,8 +10100,8 @@ Formato de linha 'descrição' errado! - - + + @@ -10105,7 +10128,7 @@ Unknown field! Campo desconhecido! - + ERROR: Component "%1" has no analog model. ERRO: Componente "%1" não possui modelo analógico. @@ -11247,7 +11270,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11353,24 +11376,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11835,7 +11858,7 @@ Programa de síntese de filtro ativo QucsApp - + Schematic Esquema elétrico @@ -11851,47 +11874,47 @@ Programa de síntese de filtro ativo - + VHDL Sources Fontes VHDL - - + + Verilog Sources Fontes Verilog - - + + Verilog-A Sources Fontes Verilog-A - - + + Octave Scripts Scripts Octave: - + Spice Files Arquivos Spice - + Any File Qualquer Arquivo - + The schematic search path has been refreshed. - + Verilog Verilog @@ -11901,7 +11924,7 @@ Programa de síntese de filtro ativo VHDL - + Open file @@ -11911,7 +11934,7 @@ Programa de síntese de filtro ativo - + Open example… @@ -11926,24 +11949,24 @@ Programa de síntese de filtro ativo - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics Esquema elétrico - + New Novo @@ -12017,7 +12040,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo conteúdo do projeto atual - + Search Components Buscar Componentes @@ -12058,8 +12081,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -12070,29 +12093,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -12101,43 +12124,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Erro - + Cannot open "%1". Não é possível abrir "%1". - + Library is corrupt. Biblioteca corrupta. - - - - - - - - - - - + + + + + + + + + + + - + Info Informação - + Default icon not found: %1.png - + -port -porta @@ -12148,13 +12171,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! Este documento contém modificações a salvar! - + Do you want to save the changes before copying? @@ -12194,17 +12217,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Não é possível apagar um arquivo aberto! - - - - - - + + + + + + Warning Aviso - + This will delete the file permanently! Continue ? Isto irá apagar o arquivo permanentemente! Continuar? @@ -12267,12 +12290,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo configuração - + Cannot create work directory ! Não pôde criar diretório de trabalho! - + Cannot create project directory ! Não pôde criar diretório de projeto! @@ -12285,7 +12308,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - Projeto: - + Choose Project Directory for Opening Escolher o Diretório de Projeto para Abrir @@ -12295,13 +12318,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Nenhum projeto selecionado! - + Cannot delete file: %1 - - + + @@ -12309,12 +12332,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -12324,12 +12347,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -12364,12 +12387,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12413,35 +12436,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Criando novo esquemático... - - + + + - - + - + - + Ready. Pronto. - + Creating new text editor... Criando novo editor de texto... - - + + Opening file... Abrindo arquivo... @@ -12528,7 +12551,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Salvando todos arquivos... - + Closing file... Fechando arquivo... @@ -12551,7 +12574,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Abrir diretório de exemplos - + untitled Sem título @@ -12581,7 +12604,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12591,7 +12614,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12630,7 +12653,7 @@ Use subcircuit to crete Verilog-A module! Você realmente quer sair? - + The document was modified by another program ! O documento foi modificado por outro programa! @@ -12648,7 +12671,7 @@ Use subcircuit to crete Verilog-A module! Manter - + Cannot create Não é possível criar @@ -12663,7 +12686,7 @@ Use subcircuit to crete Verilog-A module! Não é possível iniciar "%1"! - + Could not load S[1,1]. Não pôde carregar S[1,1]. @@ -12688,7 +12711,7 @@ Use subcircuit to crete Verilog-A module! Dependência incorreta! - + Cutting selection... Cortando a seleção... @@ -12698,17 +12721,17 @@ Use subcircuit to crete Verilog-A module! Copiando a seleção para a área de transferência... - - - - - - + + + + + + At least two elements must be selected ! Ao menos dois elementos devem ser selecionados! - + Opening aborted, file not found. Operação abrir abortada, arquivo não encontrado. @@ -12730,7 +12753,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12810,7 +12833,7 @@ Sobrescrever? Não é possível escrever "%1"! - + Please open project with subcircuits! Por favor abra um projeto com subcircuitos! @@ -12819,7 +12842,7 @@ Sobrescrever? Por favor, primeiro abra um projeto! - + Please select a diagram graph! Por favor selecione um diagrama gráfico! @@ -12877,7 +12900,7 @@ Have you saved the Verilog-A symbols? - + &New &Novo @@ -13709,7 +13732,24 @@ Create Library from Subcircuits Cria uma Biblioteca dos Subcircuitos - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S @@ -13769,7 +13809,7 @@ Convert data file to various file formats Converte arquivos de dados file para varios formatos - + Export to &CSV... Exportar para &CSV... @@ -14064,7 +14104,7 @@ Gira o componente selecionado 90° anti-horário {90�?} - + Power combining Starts power combining calculation program @@ -14159,7 +14199,7 @@ Rotates the selected component by 90° counter-clockwise Gira o componente selecionado 90° anti-horário - + Mirror about X Axis Inverter Verticalmente @@ -14351,12 +14391,7 @@ Insere um símbolo para porta Fio - - Ctrl+E - - - - + Inserts a wire Insere um fio @@ -14592,13 +14627,13 @@ Starts standard resistor color code computation program inicia programa de computação de código de cor resistor padrão - - + + Simulate Simular - + Simulates the current schematic Simula o esquemático atual @@ -14901,7 +14936,7 @@ Sobre Qt da Trolltech &Ferramentas - + Compact modelling @@ -14986,68 +15021,82 @@ Open QucsAttenuator + &File &Arquivo + &Quit Sair(&Q) + + &Help Ajuda + &About Sobre + About Qt... Sobre Qt... + Topology Topologia + Input Entrada + Attenuation: Atenuação: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by @@ -15057,11 +15106,13 @@ Open + dB dB + Zin: Zin: @@ -15075,6 +15126,7 @@ Open + Zout: Zout: @@ -15084,11 +15136,13 @@ Open + Output Saída + R1: R1: @@ -15101,16 +15155,26 @@ Open + + + + + + + + -- -- + R2: R2: + R3: R3: @@ -15120,11 +15184,13 @@ Open + Qucs Attenuator Help Ajuda Qucs Atenuador + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! @@ -15134,16 +15200,19 @@ Open + About Qt Sobre Qt + About... Sobre... + Attenuator synthesis program @@ -15152,6 +15221,8 @@ Attenuator synthesis program + + Copyright (C) 2006 by Direitos autorais (C) 2006 by @@ -15161,6 +15232,7 @@ Attenuator synthesis program + Error: Set Attenuation less than %1 dB ERRO: Atenuação definida menos que %1 dB @@ -16626,6 +16698,134 @@ open files with an appropriate program. Tipo de linha de transmissão não disponível. + + Qucs_S_SPAR_Viewer + + + &File + + + + + &Quit + Sair(&Q) + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + + + + + &About + Sobre + + + + About Qt... + Sobre Qt... + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + Sobre Qt + + + + About... + Sobre... + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + Aviso + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Erro + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16667,7 +16867,7 @@ open files with an appropriate program. Schematic - + Title Título @@ -16741,12 +16941,12 @@ Edits the symbol for this schematic Edita o símbolo para este esquemático - + generic genérico - + Error Erro @@ -16766,7 +16966,7 @@ Definir o local de admsXml sobre as configurações do aplicativo. Status - + Netlist error @@ -17065,7 +17265,7 @@ Definir o local de admsXml sobre as configurações do aplicativo. ERRO: Não é possível criar "%1"! - + ERROR: Cannot start ERRO: Não é possível iniciar @@ -17307,7 +17507,7 @@ Definir o local de admsXml sobre as configurações do aplicativo. Todos os arquivos - + Info Informação diff --git a/translations/qucs_pt_PT.ts b/translations/qucs_pt_PT.ts index d1a38b707..9405a1bd5 100644 --- a/translations/qucs_pt_PT.ts +++ b/translations/qucs_pt_PT.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -550,7 +550,7 @@ Editar Propriedades do Componente - + Sweep Varrer @@ -562,13 +562,13 @@ - + display in schematic mostrar no esquemático - + Simulation: Simulação: @@ -619,18 +619,18 @@ - + Step: Passo: - + Number: Número de passos: - + Properties Propriedades @@ -712,26 +712,28 @@ - + - - + + + + yes sim - - + + - + no não - + Select a file Escolher ficheiro @@ -766,7 +768,7 @@ Ficheiros Verilog - + Points per decade: Pontos por década: @@ -833,7 +835,7 @@ DiagramDialog - + Edit Diagram Properties Editar as Propriedades do Diagrama @@ -1360,18 +1362,18 @@ Simular - + Stop - + Save netlist - + Exit @@ -1381,12 +1383,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2018,7 +2020,7 @@ Qualquer ficheiro - + Error Erro @@ -2028,7 +2030,7 @@ - + Enter a Data File Name Introduza o nome de um ficheiro de dados @@ -2066,7 +2068,7 @@ ERRO: Formato desconhecido! Por favor confira a extensão do ficheiro! - + Running command line: Linha de comandos adicional: @@ -2076,7 +2078,7 @@ ERRO: Impossível iniciar conversor! - + Successfully converted file! Ficheiro convertido com sucesso! @@ -2718,7 +2720,19 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2727,7 +2741,8 @@ Node name will not be changed. Impedância (Ohms) - + + Error Erro @@ -2957,82 +2972,82 @@ but is %1 ! - - + + linear double "double" linear - - - + + + logarithmic double "double" logarítmico - - - + + + linear integer "integer" linear - - + + logarithmic integer "integer" logarítmico - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add Adicionar @@ -3070,47 +3085,47 @@ but is %1 ! - - + + minimize minimizar - - - + + + maximize maximizar - - - + + + less menor que - - - + + + greater maior que - - - + + + equal igual a - - + + monitor - + Goals Objectivos @@ -3130,16 +3145,16 @@ but is %1 ! Cancelar - + - + yes sim - + no @@ -3854,13 +3869,13 @@ but is %1 ! Bias T - + for transient simulation: inductance in Henry (apenas para transiente) Inductância em Henry - + for transient simulation: capacitance in Farad (apenas para transiente) Capacidade em Farad @@ -3880,7 +3895,7 @@ but is %1 ! - + transfer function scaling factor @@ -3896,8 +3911,8 @@ but is %1 ! Transístor Bipolar - - + + npn transistor Transístor NPN @@ -3910,7 +3925,7 @@ but is %1 ! - + polarity Polaridade @@ -4191,7 +4206,7 @@ but is %1 ! - + bipolar junction transistor with substrate @@ -4489,13 +4504,13 @@ but is %1 ! - + - + - + @@ -4799,22 +4814,22 @@ Wrong 'component' line format! Método de resolução da matriz - + dc block - + dc Block DC Block - + dc feed DC Feed - + dc Feed DC Feed @@ -4848,7 +4863,7 @@ Wrong 'component' line format! - + D-FlipFlop w/ SR @@ -5044,7 +5059,7 @@ Wrong 'component' line format! - + Diode Díodo @@ -5911,18 +5926,18 @@ Wrong 'component' line format! - + current equation Equação de corrente - - + + charge equation Equação de carga - + Equation Defined Device Dispositivo Definido por Equações @@ -6418,7 +6433,7 @@ Externo - + n-JFET @@ -7074,7 +7089,7 @@ Externo - + n-MOSFET @@ -7092,7 +7107,7 @@ Externo - + zero-bias threshold voltage @@ -7282,7 +7297,15 @@ Externo - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate @@ -7605,19 +7628,19 @@ Externo - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8307,19 +8330,19 @@ Externo - + parameter equation Equação - + Equation Defined RF Device Dispositivo de RF definido por equações - + RF RF @@ -8484,7 +8507,7 @@ Externo Ficheiro de parâmetros S para um diporto {2-?} - + file @@ -8509,7 +8532,7 @@ Externo - + ERROR: No file name in SPICE component "%1". @@ -8530,7 +8553,7 @@ Externo - + Info Info @@ -8561,7 +8584,7 @@ Externo Convertendo ficheiro SPICE "%1". - + subcircuit @@ -8571,7 +8594,7 @@ Externo - + Subcircuit @@ -8982,12 +9005,12 @@ Externo Fonte de Tensão Controlada por Tensão - + voltage controlled resistor - + resistance gain Ganho de Transimpedância @@ -9019,7 +9042,7 @@ Externo - + ERROR: No file name in %1 component "%2". @@ -9071,7 +9094,7 @@ Externo Fonte de Tensão Baseada em Ficheiro - + VHDL file Ficheiro VHDL @@ -9082,13 +9105,13 @@ Externo Nome do Ficheiro VHDL - + vhdl VHDL - - + + generic variable @@ -9314,7 +9337,7 @@ Overwrite ? - + Successfully exported @@ -9331,7 +9354,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units @@ -9339,8 +9362,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9438,16 +9461,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams Diagramas - + paintings @@ -9459,7 +9482,7 @@ Use PNG, JPEG or SVG graphics! Componentes Externos - + Edit Properties Editar Propriedades @@ -9484,7 +9507,7 @@ Use PNG, JPEG or SVG graphics! Adaptação de quadripolos - + The ground potential cannot be labeled! Não se pode legendar um nó de massa! @@ -9502,7 +9525,7 @@ Defina a localização do Octave nas Definições do Programa. Seta - + Ellipse Elipse @@ -9512,7 +9535,7 @@ Defina a localização do Octave nas Definições do Programa. Elipse Preenchida - + Edit Ellipse Properties Editar Propriedades da Elipse @@ -9522,7 +9545,7 @@ Defina a localização do Octave nas Definições do Programa. Arco Elíptico - + Edit Arc Properties Editar Propriedades do Arco @@ -9532,7 +9555,7 @@ Defina a localização do Octave nas Definições do Programa. Linha - + Edit Line Properties Editar Propriedades da Linha @@ -9552,7 +9575,7 @@ Defina a localização do Octave nas Definições do Programa. Rectângulo Preenchido - + Edit Rectangle Properties Editar Propriedades do Rectângulo @@ -9571,7 +9594,7 @@ Defina a localização do Octave nas Definições do Programa. SemNome - + Format Error: 'Painting' field is not closed! @@ -9725,8 +9748,8 @@ Campo 'paiting' com formato de linha inválido! - - + + @@ -9752,7 +9775,7 @@ Unknown field! Campo desconhecido! - + ERROR: Component "%1" has no analog model. ERRO: O componente "%1" não tem um modelo analógico. @@ -10873,7 +10896,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -10979,24 +11002,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11459,7 +11482,7 @@ Active Filter synthesis program QucsApp - + Schematic Esquemático @@ -11475,47 +11498,47 @@ Active Filter synthesis program - + VHDL Sources Fontes VHDL - - + + Verilog Sources Fontes Verilog - - + + Verilog-A Sources Fontes Verilog-A - - + + Octave Scripts Scripts de Octave - + Spice Files Ficheiros SPICE - + Any File Qualquer ficheiro - + The schematic search path has been refreshed. - + Verilog Verilog @@ -11525,7 +11548,7 @@ Active Filter synthesis program VHDL - + Open file @@ -11535,7 +11558,7 @@ Active Filter synthesis program - + Open example… @@ -11550,24 +11573,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics Esquemáticos - + New Novo @@ -11641,7 +11664,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Conteúdo do projecto actual - + Search Components @@ -11682,8 +11705,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -11694,29 +11717,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -11725,44 +11748,44 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Erro - + Cannot open "%1". Impossível abrir "%1". - + Library is corrupt. A biblioteca está corrompida. - - - - - - - - - - - + + + + + + + + + + + - + Info Info - + Default icon not found: %1.png Impossível encontrar icon por defeito: %1.png - + -port -portos @@ -11773,13 +11796,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! O documento contém alterações por guardar! - + Do you want to save the changes before copying? Deseja guardar as alterações antes de copiar? @@ -11823,17 +11846,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Impossível apagar um ficheiro aberto! - - - - - - + + + + + + Warning Aviso - + This will delete the file permanently! Continue ? O ficheiro será apagado de forma irreversível! Continuar? @@ -11896,12 +11919,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Configuração - + Cannot create work directory ! Impossível criar directório de trabalho! - + Cannot create project directory ! Impossível criar directório de projecto! @@ -11914,7 +11937,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - Projecto: - + Choose Project Directory for Opening Escolha o directório de projecto para abrir @@ -11924,13 +11947,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Nenhum projecto selecionado! - + Cannot delete file: %1 - - + + @@ -11938,12 +11961,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -11953,12 +11976,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -11993,12 +12016,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12042,35 +12065,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Criando novo esquemático... - - + + + - - + - + - + Ready. Pronto. - + Creating new text editor... A criar novo editor de texto... - - + + Opening file... Abrindo ficheiro... @@ -12156,7 +12179,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Guardando todos os ficheiros... - + Closing file... Fechando ficheiro... @@ -12179,7 +12202,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Abrir directório de exemplos... - + untitled SemNome @@ -12209,7 +12232,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12219,7 +12242,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12258,7 +12281,7 @@ Use subcircuit to crete Verilog-A module! Deseja mesmo sair? - + The document was modified by another program ! O documento foi alterado por outro programa! @@ -12276,7 +12299,7 @@ Use subcircuit to crete Verilog-A module! Manter - + Cannot create Impossível criar @@ -12291,7 +12314,7 @@ Use subcircuit to crete Verilog-A module! Impossível iniciar "%1"! - + Could not load S[1,1]. @@ -12316,7 +12339,7 @@ Use subcircuit to crete Verilog-A module! Dependência errada! - + Cutting selection... Cortando a selecção... @@ -12326,17 +12349,17 @@ Use subcircuit to crete Verilog-A module! Copiando a selecção... - - - - - - + + + + + + At least two elements must be selected ! Pelo menos dois elementos devem ser selecionados! - + Opening aborted, file not found. Abertura cancelada, ficheiro não encontrado. @@ -12358,7 +12381,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12437,7 +12460,7 @@ Overwrite ? Impossível escrever "%1"! - + Please open project with subcircuits! Por favor abra um projecto com sub-circuitos! @@ -12446,7 +12469,7 @@ Overwrite ? Por favor abra um projecto primeiro! - + Please select a diagram graph! Por favor selecione um gráfico! @@ -12507,7 +12530,7 @@ Gravou os símbolos de Verilog-A? - + &New &Novo @@ -13342,7 +13365,24 @@ Create Library from Subcircuits Cria uma Biblioteca a partir de sub-circuitos - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S @@ -13402,7 +13442,7 @@ Convert data file to various file formats Permite importar e exportar os dados para outros formatos - + Export to &CSV... Exportar para &CSV... @@ -13697,7 +13737,7 @@ Roda a selecção por 90º {90�?} - + Power combining Starts power combining calculation program @@ -13792,7 +13832,7 @@ Rotates the selected component by 90° counter-clockwise Roda a selecção por 90º - + Mirror about X Axis Espelhar em torno do Eixo do X @@ -13984,12 +14024,7 @@ Insere um símbolo de porto Conductor - - Ctrl+E - - - - + Inserts a wire Insere um conductor @@ -14209,13 +14244,13 @@ Starts attenuator calculation program Inicia o programa de síntese de atenuadores QucsAttenuator - - + + Simulate Simular - + Simulates the current schematic Simula o esquemático actual @@ -14519,7 +14554,7 @@ Acerca do Qt, da Trolltech Ferramen&tas - + Compact modelling @@ -14604,93 +14639,112 @@ Open QucsAttenuator + &File &Ficheiro + &Quit + + &Help &Ajuda + &About + About Qt... Acerca do Qt... + Topology + Input + Attenuation: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by + dB + Zin: + Zout: + Output + R1: @@ -14703,41 +14757,56 @@ Open + + + + + + + + -- + R2: + R3: + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt Acerca do Qt + About... Acerca... + Attenuator synthesis program @@ -14746,11 +14815,14 @@ Attenuator synthesis program + + Copyright (C) 2006 by + Error: Set Attenuation less than %1 dB @@ -16052,6 +16124,134 @@ open files with an appropriate program. + + Qucs_S_SPAR_Viewer + + + &File + &Ficheiro + + + + &Quit + + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + &Ajuda + + + + &About + + + + + About Qt... + Acerca do Qt... + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + Acerca do Qt + + + + About... + Acerca... + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + Aviso + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Erro + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16093,7 +16293,7 @@ open files with an appropriate program. Schematic - + Title Título @@ -16167,12 +16367,12 @@ Edits the symbol for this schematic Permite editar o símbolo para este esquemático - + generic genérico - + Error Erro @@ -16192,7 +16392,7 @@ Defina a localização do admsXml nas definições da aplicação. Estado - + Netlist error @@ -16490,7 +16690,7 @@ Defina a localização do admsXml nas definições da aplicação. - + ERROR: Cannot start @@ -16732,7 +16932,7 @@ Defina a localização do admsXml nas definições da aplicação. Todos os Ficheiros - + Info Info diff --git a/translations/qucs_ro.ts b/translations/qucs_ro.ts index 5f6a9062f..859ebfff8 100644 --- a/translations/qucs_ro.ts +++ b/translations/qucs_ro.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -550,7 +550,7 @@ Editează Proprietăţile Componentei - + Sweep @@ -562,13 +562,13 @@ - + display in schematic afişează in schemă - + Simulation: @@ -619,18 +619,18 @@ - + Step: - + Number: - + Properties Proprietăţi @@ -712,26 +712,28 @@ - + - - + + + + yes da - - + + - + no nu - + Select a file Selectează un fişier @@ -766,7 +768,7 @@ - + Points per decade: @@ -833,7 +835,7 @@ DiagramDialog - + Edit Diagram Properties Editează Propietăţile Diagramei @@ -1344,18 +1346,18 @@ ExternSimDialog - + Stop - + Save netlist - + Exit @@ -1365,12 +1367,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -1982,7 +1984,7 @@ - + Error Eroare @@ -1992,7 +1994,7 @@ - + Enter a Data File Name @@ -2026,7 +2028,7 @@ &Nu - + Running command line: @@ -2036,7 +2038,7 @@ - + Successfully converted file! @@ -2658,12 +2660,25 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method - + + Error Eroare @@ -2873,82 +2888,82 @@ but is %1 ! - - + + linear double - - - + + + logarithmic double - - - + + + linear integer - - + + logarithmic integer - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add Adaugă @@ -2986,47 +3001,47 @@ but is %1 ! - - + + minimize - - - + + + maximize - - - + + + less - - - + + + greater - - - + + + equal - - + + monitor - + Goals @@ -3046,16 +3061,16 @@ but is %1 ! Revocare - + - + yes da - + no @@ -3642,13 +3657,13 @@ but is %1 ! bias t - + for transient simulation: inductance in Henry - + for transient simulation: capacitance in Farad @@ -3668,7 +3683,7 @@ but is %1 ! - + transfer function scaling factor @@ -3684,8 +3699,8 @@ but is %1 ! tranzistorul bipolar - - + + npn transistor Tranzistor npn @@ -3698,7 +3713,7 @@ but is %1 ! - + polarity polaritate @@ -3979,7 +3994,7 @@ but is %1 ! - + bipolar junction transistor with substrate tranzistorul bipolar cu substrat @@ -4277,13 +4292,13 @@ but is %1 ! - + - + - + @@ -4589,22 +4604,22 @@ Fals format de linie a 'component'! - + dc block bloc dc - + dc Block Bloc DC - + dc feed alimentare dc - + dc Feed Alimentare dc @@ -4638,7 +4653,7 @@ Fals format de linie a 'component'! - + D-FlipFlop w/ SR @@ -4834,7 +4849,7 @@ Fals format de linie a 'component'! - + Diode Diodă @@ -5701,18 +5716,18 @@ Fals format de linie a 'component'! - + current equation - - + + charge equation - + Equation Defined Device @@ -6207,7 +6222,7 @@ Fals format de linie a 'component'! - + n-JFET n-JFET @@ -6863,7 +6878,7 @@ Fals format de linie a 'component'! tranzistor cu efect de câmp MOS - + n-MOSFET n-MOSFET @@ -6881,7 +6896,7 @@ Fals format de linie a 'component'! MOSFET cu depleţie - + zero-bias threshold voltage tensiunea de prag la bias nul @@ -7071,7 +7086,15 @@ Fals format de linie a 'component'! perimetrul joncţiunii de sursă - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate @@ -7394,19 +7417,19 @@ Fals format de linie a 'component'! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8096,19 +8119,19 @@ Fals format de linie a 'component'! - + parameter equation - + Equation Defined RF Device - + RF @@ -8273,7 +8296,7 @@ Fals format de linie a 'component'! Fisier parametrii S 1-port {2-?} - + file fişier @@ -8298,7 +8321,7 @@ Fals format de linie a 'component'! - + ERROR: No file name in SPICE component "%1". @@ -8319,7 +8342,7 @@ Fals format de linie a 'component'! - + Info Info @@ -8350,7 +8373,7 @@ Fals format de linie a 'component'! - + subcircuit subcircuit @@ -8360,7 +8383,7 @@ Fals format de linie a 'component'! numele fişierului schema qucs - + Subcircuit @@ -8771,12 +8794,12 @@ Fals format de linie a 'component'! sursa de tensiune controlată în tensiune - + voltage controlled resistor - + resistance gain @@ -8808,7 +8831,7 @@ Fals format de linie a 'component'! - + ERROR: No file name in %1 component "%2". @@ -8860,7 +8883,7 @@ Fals format de linie a 'component'! - + VHDL file @@ -8871,13 +8894,13 @@ Fals format de linie a 'component'! - + vhdl - - + + generic variable @@ -9103,7 +9126,7 @@ Overwrite ? - + Successfully exported @@ -9120,7 +9143,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units @@ -9128,8 +9151,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9227,16 +9250,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9248,7 +9271,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties @@ -9273,7 +9296,7 @@ Use PNG, JPEG or SVG graphics! - + The ground potential cannot be labeled! @@ -9283,7 +9306,7 @@ Use PNG, JPEG or SVG graphics! OK - + Ellipse @@ -9293,7 +9316,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Ellipse Properties Editează Proprietăţile Elipsei @@ -9303,7 +9326,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Arc Properties Editează Proprietăţile Arcului @@ -9313,7 +9336,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Line Properties Editeaza Proprietăţile Liniei @@ -9333,7 +9356,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Rectangle Properties Editează Proprietăţile Rectanglului @@ -9352,7 +9375,7 @@ Use PNG, JPEG or SVG graphics! fara titlu - + Format Error: 'Painting' field is not closed! @@ -9508,8 +9531,8 @@ Fals format al liniei 'painting'! - - + + @@ -9535,7 +9558,7 @@ Unknown field! Câmp necunoscut! - + ERROR: Component "%1" has no analog model. @@ -10716,7 +10739,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -10822,24 +10845,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11302,7 +11325,7 @@ Active Filter synthesis program QucsApp - + Schematic Schemă @@ -11318,47 +11341,47 @@ Active Filter synthesis program - + VHDL Sources - - + + Verilog Sources - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File Orice Fişier - + The schematic search path has been refreshed. - + Verilog @@ -11368,7 +11391,7 @@ Active Filter synthesis program - + Open file @@ -11378,7 +11401,7 @@ Active Filter synthesis program - + Open example… @@ -11393,24 +11416,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics Scheme - + New Nou @@ -11484,7 +11507,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Components @@ -11521,8 +11544,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -11533,29 +11556,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -11564,43 +11587,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Eroare - + Cannot open "%1". - + Library is corrupt. - - - - - - - - - - - + + + + + + + + + + + - + Info Info - + Default icon not found: %1.png - + -port -port @@ -11611,14 +11634,14 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! Documentul conţine modificări nesalvate! - + Do you want to save the changes before copying? @@ -11658,17 +11681,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Fişierul deschis nu poate fi şters! - - - - - - + + + + + + Warning Avertisment - + This will delete the file permanently! Continue ? Fişierul va fii şters definitiv! Continuaţi? @@ -11731,12 +11754,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! Nou director de lucru nu poate fi creat! - + Cannot create project directory ! Directorul de proiect nu poate fi creat! @@ -11749,7 +11772,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - Proiect: - + Choose Project Directory for Opening Alege Directorul de Proiect pentru Deschidere @@ -11759,13 +11782,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Nici un proiect nu este selectat! - + Cannot delete file: %1 - - + + @@ -11773,12 +11796,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -11788,12 +11811,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -11828,12 +11851,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -11877,35 +11900,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Crează schemă nouă... - - + + + - - + - + - + Ready. Terminat. - + Creating new text editor... - - + + Opening file... Deschide fişier... @@ -11992,7 +12015,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Salvare toate fişierele... - + Closing file... Inchidere fişiere... @@ -12011,7 +12034,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo &Renunţare - + untitled fara titlu @@ -12041,7 +12064,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12051,7 +12074,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12090,7 +12113,7 @@ Use subcircuit to crete Verilog-A module! Doriţi să terminaţi? - + The document was modified by another program ! @@ -12100,7 +12123,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot create Nu poate fi creat @@ -12115,7 +12138,7 @@ Use subcircuit to crete Verilog-A module! - + Could not load S[1,1]. @@ -12140,7 +12163,7 @@ Use subcircuit to crete Verilog-A module! - + Cutting selection... Tăiere selecţie... @@ -12150,17 +12173,17 @@ Use subcircuit to crete Verilog-A module! Copiază selecţia în memoria temporară... - - - - - - + + + + + + At least two elements must be selected ! - + Opening aborted, file not found. @@ -12182,7 +12205,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12261,12 +12284,12 @@ Overwrite ? - + Please open project with subcircuits! - + Please select a diagram graph! @@ -12324,7 +12347,7 @@ Have you saved the Verilog-A symbols? - + &New @@ -13071,7 +13094,24 @@ Create Library from Subcircuits - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qt @@ -13088,7 +13128,7 @@ Convert data file to various file formats - + Export to &CSV... @@ -13365,7 +13405,7 @@ Rotates the selected component by 90� counter-clockwise - + Power combining Starts power combining calculation program @@ -13448,7 +13488,7 @@ Resets the limits for all axis to auto. - + Mirror about X Axis @@ -13624,12 +13664,7 @@ Inserts a port symbol - - Ctrl+E - - - - + Inserts a wire @@ -13817,13 +13852,13 @@ Starts attenuator calculation program - - + + Simulate - + Simulates the current schematic @@ -14062,7 +14097,7 @@ About Qt by Trolltech - + Compact modelling @@ -14147,93 +14182,112 @@ Open QucsAttenuator + &File + &Quit + + &Help + &About + About Qt... + Topology + Input + Attenuation: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by + dB + Zin: + Zout: + Output + R1: @@ -14246,41 +14300,56 @@ Open + + + + + + + + -- + R2: + R3: + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt + About... Despre... + Attenuator synthesis program @@ -14289,11 +14358,14 @@ Attenuator synthesis program + + Copyright (C) 2006 by + Error: Set Attenuation less than %1 dB @@ -15613,6 +15685,134 @@ open files with an appropriate program. + + Qucs_S_SPAR_Viewer + + + &File + + + + + &Quit + + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + + + + + &About + + + + + About Qt... + + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + + + + + About... + Despre... + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + Avertisment + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Eroare + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -15654,7 +15854,7 @@ open files with an appropriate program. Schematic - + Title @@ -15710,12 +15910,12 @@ Edits the symbol for this schematic Editează simbolul pentru aceasta schemă - + generic - + Error Eroare @@ -15733,7 +15933,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16031,7 +16231,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -16272,7 +16472,7 @@ Set the admsXml location on the application settings. Toate Fişierele - + Info Info diff --git a/translations/qucs_ru.ts b/translations/qucs_ru.ts index 86819af34..964241266 100644 --- a/translations/qucs_ru.ts +++ b/translations/qucs_ru.ts @@ -56,7 +56,12 @@ цифровая симуляция, общие улучшения - + + CI setup, build system, MacOS support + + + + testing, general bugfixes тестирование, общее исправление ошибок @@ -107,12 +112,11 @@ Движок схематической визуализации, рефакторинг - CI setup, build system - Настройка CI, система сборки + Настройка CI, система сборки - + Refactoring, general improvements Рефакторинг, общие улучшения @@ -583,7 +587,7 @@ Изменение свойств компонента - + Sweep Развёртка @@ -595,13 +599,13 @@ - + display in schematic показывать на схеме - + Simulation: Моделирование: @@ -652,18 +656,18 @@ - + Step: Шаг: - + Number: Количество: - + Properties Свойства @@ -745,26 +749,28 @@ - + - - + + + + yes да - - + + - + no нет - + Select a file Выбрать файл @@ -799,7 +805,7 @@ Файлы Verilog - + Points per decade: Число точек на декаду: @@ -870,7 +876,7 @@ DiagramDialog - + Edit Diagram Properties Изменить свойства диаграммы @@ -1401,18 +1407,18 @@ Моделировать - + Stop Остановить - + Save netlist Сохранить список цепей - + Exit Выход @@ -1422,12 +1428,12 @@ Консоль моделирования - + Simulate with external simulator Моделировать с помощью внешнего симулятора - + There were simulation errors. Please check log. Были ошибки моделирования. Пожалуйста, проверьте журнал. @@ -2237,7 +2243,7 @@ Filter synthesis program Любой файл - + Error Ошибка @@ -2247,7 +2253,7 @@ Filter synthesis program Не удаётся открыть файл: - + Enter a Data File Name Введите имя файла данных @@ -2285,7 +2291,7 @@ Filter synthesis program ОШИБКА: Неизвестный формат файла! Проверьте расширение имени файла! - + Running command line: Запуск командной строки: @@ -2295,7 +2301,7 @@ Filter synthesis program ОШИБКА: Не удаётся запустить конвертер! - + Successfully converted file! Файл преобразован успешно! @@ -2998,7 +3004,19 @@ Node name will not be changed. Полное сопротивление (Ом) - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method Невозможно согласовать эту нагрузку с помощью двухшлейфового метода @@ -3007,7 +3025,8 @@ Node name will not be changed. Полное сопротивление (Ом) - + + Error Ошибка @@ -3260,82 +3279,82 @@ Resistor color code computation program - - + + linear double линейное вещественное - - - + + + logarithmic double логарифмическое вещественное - - - + + + linear integer линейное целое - - + + logarithmic integer логарифмическое целое - - - + + + E3 series Ряд E3 - - - + + + E6 series Ряд E6 - - - + + + E12 series Ряд E12 - - - + + + E24 series Ряд E24 - - - + + + E48 series Ряд E48 - - - + + + E96 series Ряд E96 - - - + + + E192 series Ряд E192 - + Add Добавить @@ -3373,47 +3392,47 @@ Resistor color code computation program - - + + minimize минимум - - - + + + maximize максимум - - - + + + less меньше - - - + + + greater больше - - - + + + equal равно - - + + monitor следить - + Goals Цели @@ -3433,16 +3452,16 @@ Resistor color code computation program Отменить - + - + yes да - + no @@ -4161,13 +4180,13 @@ Resistor color code computation program смещение T - + for transient simulation: inductance in Henry для моделирования переходных процессов: индуктивность в генри - + for transient simulation: capacitance in Farad для моделирования переходных процессов: ёмкость в фарадах @@ -4187,7 +4206,7 @@ Resistor color code computation program - + transfer function scaling factor масштабный коэффициент передаточной функции @@ -4203,8 +4222,8 @@ Resistor color code computation program биполярный транзистор - - + + npn transistor npn транзистор @@ -4217,7 +4236,7 @@ Resistor color code computation program - + polarity полярность @@ -4498,7 +4517,7 @@ Resistor color code computation program площадь по умолчанию для биполярного транзистора - + bipolar junction transistor with substrate биполярный транзистор с подложкой @@ -4796,13 +4815,13 @@ Resistor color code computation program - + - + - + @@ -5130,22 +5149,22 @@ Wrong 'component' line format! метод решения матрицы схемы - + dc block развязка от постоянного тока - + dc Block развязка от постоянного тока - + dc feed подача постоянного тока - + dc Feed подача постоянного тока @@ -5179,7 +5198,7 @@ Wrong 'component' line format! задержка затвора с перекрёстными связями - + D-FlipFlop w/ SR D-триггер с SR @@ -5375,7 +5394,7 @@ Wrong 'component' line format! площадь по умолчанию для диода - + Diode Диод @@ -6438,18 +6457,18 @@ Wrong 'component' line format! - + current equation уравнение тока - - + + charge equation уравнение заряда - + Equation Defined Device Модель, заданная уравнением @@ -6948,7 +6967,7 @@ Wrong 'component' line format! площадь по умолчанию для полевого транзистора с управляющим pn-переходом - + n-JFET n-JFET @@ -7612,7 +7631,7 @@ Wrong 'component' line format! МОП полевой транзистор - + n-MOSFET МОП полевой транзистор с n-каналом @@ -7630,7 +7649,7 @@ Wrong 'component' line format! МОП полевой транзистор обеднённого типа - + zero-bias threshold voltage пороговое напряжение при нулевом смещении @@ -7820,7 +7839,15 @@ Wrong 'component' line format! периметр истокового перехода - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate МОП полевой транзистор с подложкой @@ -8143,19 +8170,19 @@ Wrong 'component' line format! - - + + inductance of coil индуктивность обмотки - - + + coupling factor between coil %1 and coil %2 коэффициент связи между обмоткой %1 и обмоткой %2 - + N Mutual Inductors N индуктивно связанных катушек @@ -8845,19 +8872,19 @@ Wrong 'component' line format! - + parameter equation параметрическое уравнение - + Equation Defined RF Device ВЧ модель, заданная уравнением - + RF ВЧ @@ -9022,7 +9049,7 @@ Wrong 'component' line format! файл S-параметров четырехполюсника - + file файл @@ -9047,7 +9074,7 @@ Wrong 'component' line format! spice - + ERROR: No file name in SPICE component "%1". ОШИБКА: Нет имени файла в компоненте SPICE "%1". @@ -9068,7 +9095,7 @@ Wrong 'component' line format! ОШИБКА: Не удаётся открыть преобразованный SPICE-файл "%1". - + Info Информация @@ -9099,7 +9126,7 @@ Wrong 'component' line format! Преобразование SPICE-файла "%1". - + subcircuit подсхема @@ -9109,7 +9136,7 @@ Wrong 'component' line format! имя схемного файла Qucs - + Subcircuit Подсхема @@ -9525,12 +9552,12 @@ Wrong 'component' line format! источник напряжения, управляемый напряжением - + voltage controlled resistor управляемый напряжением резистор - + resistance gain возрастание сопротивления @@ -9562,7 +9589,7 @@ Wrong 'component' line format! - + ERROR: No file name in %1 component "%2". ОШИБКА: Нет имени файла в %1 компоненте "%2". @@ -9614,7 +9641,7 @@ Wrong 'component' line format! Источник напряжения на основе файла - + VHDL file Файл VHDL @@ -9625,13 +9652,13 @@ Wrong 'component' line format! Имя файла VHDL - + vhdl VHDL - - + + generic variable обобщённая переменная @@ -9861,7 +9888,7 @@ Overwrite ? Ошибка запуска Inkscape! - + Successfully exported Успешно экспортировано @@ -9879,7 +9906,7 @@ Use PNG, JPEG or SVG graphics! Используйте форматы SVG, PNG или JPEG! - + Error: Wrong time format in "%1". Use positive number with units Ошибка: Неправильный формат времени в "%1". Используйте положительное число с единицами измерения @@ -9887,8 +9914,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices пользовательские модели verilog-a @@ -9990,16 +10017,16 @@ Use PNG, JPEG or SVG graphics! устаревшие устройства Qucs - - - + + + diagrams диаграммы - + paintings @@ -10011,7 +10038,7 @@ Use PNG, JPEG or SVG graphics! внешние компоненты моделирования - + Edit Properties Изменить свойства @@ -10036,7 +10063,7 @@ Use PNG, JPEG or SVG graphics! согласование четырёхполюсника - + The ground potential cannot be labeled! Потенциал земли не может иметь метку! @@ -10054,7 +10081,7 @@ Set the Octave location on the application settings. Стрелка - + Ellipse Эллипс @@ -10064,7 +10091,7 @@ Set the Octave location on the application settings. заполненный эллипс - + Edit Ellipse Properties Изменение свойств эллипса @@ -10074,7 +10101,7 @@ Set the Octave location on the application settings. Эллиптическая дуга - + Edit Arc Properties Изменение свойств дуги @@ -10084,7 +10111,7 @@ Set the Octave location on the application settings. Линия - + Edit Line Properties Изменение свойств линии @@ -10104,7 +10131,7 @@ Set the Octave location on the application settings. заполненный прямоугольник - + Edit Rectangle Properties Изменение свойств прямоугольника @@ -10123,7 +10150,7 @@ Set the Octave location on the application settings. без названия - + Format Error: 'Painting' field is not closed! @@ -10279,8 +10306,8 @@ Wrong 'painting' line format! - - + + @@ -10307,7 +10334,7 @@ Unknown field! Неизвестное поле! - + ERROR: Component "%1" has no analog model. ОШИБКА: У компонента "%1" нет аналоговой модели. @@ -11566,7 +11593,7 @@ Leave continuation lines blank when NOT in use. Q(PNP) 5 выводов - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11682,24 +11709,24 @@ Leave continuation lines blank when NOT in use. Конденсатор с добротностью - + The load has not resistive part. It cannot be matched using the quarter wavelength method У нагрузки нет резистивной части. Её нельзя согласовать с помощью четвертьволнового метода - + Reactive loads cannot be matched. Only the real part will be matched Реактивные нагрузки нельзя согласовать. Будет согласована только действительная часть - + Chebyshev weighting for N>7 is not available Взвешивание Чебышева для N>7 недоступно - + The load is reactive. It cannot be matched using the quarter wavelength method Нагрузка является реактивной. Её нельзя согласовать с помощью четвертьволнового метода @@ -12167,7 +12194,7 @@ Active Filter synthesis program QucsApp - + Schematic Схема @@ -12188,47 +12215,47 @@ Active Filter synthesis program - + VHDL Sources Исходные тексты VHDL - - + + Verilog Sources Исходные тексты Verilog - - + + Verilog-A Sources Исходные тексты Verilog-A - - + + Octave Scripts Скрипты Octave - + Spice Files Файлы Spice - + Any File Любой файл - + The schematic search path has been refreshed. Путь для поиска файла схемы был обновлён. - + Verilog Verilog @@ -12238,7 +12265,7 @@ Active Filter synthesis program VHDL - + QucsatorRF found at: QucsatorRF найден в: @@ -12265,7 +12292,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Симуляторы не найдены автоматически. Пожалуйста, укажите симуляторы в следующем диалоговом окне. - + Open file Открыть файл @@ -12275,7 +12302,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Документ открыт в режиме только для чтения! Моделирование не будет работать. Скопируйте документ в каталог, для которого у вас есть права на запись! - + Open example… Открыть пример… @@ -12290,24 +12317,24 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Открытие примера отменено - - + + Simulate schematic Моделировать схему - + DC bias simulation mode is not supported for digital schematic! Режим симуляции рабочей точки по постоянному току не поддерживается для цифровой схемы! - + Schematics Схемы - + New Создать @@ -12364,7 +12391,7 @@ and simple press Apply button содержимое текущего проекта - + Search Components Компоненты для поиска @@ -12405,8 +12432,8 @@ and simple press Apply button Прикрепляемое окно Octave - - + + @@ -12417,29 +12444,29 @@ and simple press Apply button - - + + - + - - + + - + - + - + @@ -12448,44 +12475,44 @@ and simple press Apply button Ошибка - + Cannot open "%1". Не удаётся открыть "%1". - + Library is corrupt. Библиотека повреждена. - - - - - - - - - - - + + + + + + + + + + + - + Info Информация - + Default icon not found: %1.png Значок по умолчанию не найден: %1.png - + -port -портовый @@ -12496,14 +12523,14 @@ and simple press Apply button - + The document contains unsaved changes! В документе есть несохранённые изменения! - + Do you want to save the changes before copying? Хотите сохранить изменения перед копированием? @@ -12547,17 +12574,17 @@ and simple press Apply button Невозможно удалить открытый файл! - - - - - - + + + + + + Warning Предупреждение - + This will delete the file permanently! Continue ? Это безвозвратно удалит файл! Продолжить ? @@ -12620,12 +12647,12 @@ and simple press Apply button конфигурация - + Cannot create work directory ! Не удаётся создать рабочий каталог! - + Cannot create project directory ! Не удаётся создать каталог проекта! @@ -12638,7 +12665,7 @@ and simple press Apply button - Проект: - + Choose Project Directory for Opening Выберите каталог проекта для открытия @@ -12652,13 +12679,13 @@ and simple press Apply button Не удалось удалить каталог: %1 - + Cannot delete file: %1 Не удалось удалить файл: %1 - - + + @@ -12666,7 +12693,7 @@ and simple press Apply button Результаты поиска - + Set simulator Установить симулятор @@ -12684,7 +12711,7 @@ and simple press Apply button Ngspice не найден автоматически. Пожалуйста, укажите симуляторы в следующем диалоговом окне. - + Search Lib Components Поиск библиотечных компонентов @@ -12694,7 +12721,7 @@ and simple press Apply button Показать модель - + verilog-a user devices пользовательские модели verilog-a @@ -12729,7 +12756,7 @@ and simple press Apply button Имя каталога проекта не заканчивается на '_prj'(%1) - + Project: Проект: @@ -12738,7 +12765,7 @@ and simple press Apply button Нет проекта - + Project directory name does not end in '_prj' (%1) Имя каталога проекта не заканчивается на '_prj'(%1) @@ -12782,35 +12809,35 @@ and simple press Apply button Создание новой схемы... - - + + + - - + - + - + Ready. Готово. - + Creating new text editor... Создание нового текстового редактора... - - + + Opening file... Открытие файла... @@ -12897,7 +12924,7 @@ and simple press Apply button Сохранение всех файлов... - + Closing file... Закрытие файла... @@ -12920,7 +12947,7 @@ and simple press Apply button Отрыть каталог с примерами... - + untitled без названия @@ -12950,7 +12977,7 @@ and simple press Apply button Без диаграмм тюнинг не имеет никакого эффекта. Добавьте хотя бы одну диаграмму в схему. - + Symbol editing supported only for schematics and Verilog-A documents! Редактирование символов поддерживается только для схем и документов Verilog-A! @@ -12960,7 +12987,7 @@ and simple press Apply button Функция добавления символов к исходным текстам Verilog-A устарела и не рекомендуется к использованию в новых проектах. Воспользуйтесь типовым устройством SPICE. Подробные сведения доступны в документации. - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! Схема не сохранена! Невозможно смоделировать несохранённую схему. Сначала выполните сохранение схемы! @@ -13000,7 +13027,7 @@ Use subcircuit to crete Verilog-A module! Действительно хотите выйти из приложения? - + The document was modified by another program ! Этот документ изменён другой программой! @@ -13018,7 +13045,7 @@ Use subcircuit to crete Verilog-A module! Оставить - + Cannot create Не удаётся создать @@ -13033,7 +13060,7 @@ Use subcircuit to crete Verilog-A module! Не удаётся запустить программу "%1"! - + Could not load S[1,1]. Невозможно загрузить S[1,1]. @@ -13058,7 +13085,7 @@ Use subcircuit to crete Verilog-A module! Неправильная зависимость! - + Cutting selection... Вырезание выделенной области... @@ -13068,17 +13095,17 @@ Use subcircuit to crete Verilog-A module! Копирование выбранной области в буфер обмена... - - - - - - + + + + + + At least two elements must be selected ! Должно быть выбрано хотя бы два элемента! - + Opening aborted, file not found. Невозможно открыть файл. Файл не найден. @@ -13102,7 +13129,7 @@ Use subcircuit to crete Verilog-A module! Не является вкладкой схемы! - + Cannot start %1 program! (%2) @@ -13185,7 +13212,7 @@ Overwrite ? Не удаётся записать файл "%1" ! - + Please open project with subcircuits! Откройте проект с подсхемами! @@ -13194,7 +13221,7 @@ Overwrite ? Сначала откройте проект! - + Please select a diagram graph! Выберите график диаграммы! @@ -13255,7 +13282,7 @@ Have you saved the Verilog-A symbols? Прикрепляемое окно OpenVAF - + &New &Создать @@ -14092,7 +14119,24 @@ Create Library from Subcircuits Создать библиотеку из подсхем - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S &О программе Qucs-S @@ -14164,7 +14208,7 @@ Convert data file to various file formats Преобразование файла данных в различные форматы - + Export to &CSV... Экспортировать в &CSV... @@ -14467,7 +14511,7 @@ Rotates the selected component by 90� counter-clockwise - + Power combining Starts power combining calculation program @@ -14574,7 +14618,7 @@ Rotates the selected component by 90° counter-clockwise Поворачивает выделенный компонент на 90° против часовой стрелки - + Mirror about X Axis Развернуть по оси X @@ -14766,12 +14810,11 @@ Inserts a port symbol Проводник - Ctrl+E - Ctrl+E + Ctrl+E - + Inserts a wire Вставляет проводник @@ -15009,13 +15052,13 @@ Starts standard resistor color code computation program Запуск стандартной программы расчёта цветовой маркировки резисторов - - + + Simulate Моделировать - + Simulates the current schematic Моделирует текущую схему @@ -15323,7 +15366,7 @@ About Qt by Trolltech &Инструменты - + Compact modelling Компактное моделирование @@ -15410,68 +15453,82 @@ Open QucsAttenuator + &File &Файл + &Quit &Выход + + &Help &Справка + &About &О программе + About Qt... О Qt... + Topology Схемотехника + Input Ввод + Attenuation: Ослабление: + Pin: Вывод: + Freq: Частота: + Put into Clipboard Поместить в буфер обмена + R4: R4: + Copyright (C) 2024 by Copyright (C) 2024 @@ -15481,11 +15538,13 @@ Open + dB дБ + Zin: Zвх: @@ -15499,6 +15558,7 @@ Open + Zout: Zвых: @@ -15508,11 +15568,13 @@ Open + Output Вывод + R1: R1: @@ -15525,16 +15587,26 @@ Open + + + + + + + + -- -- + R2: R2: + R3: R3: @@ -15544,11 +15616,13 @@ Open + Qucs Attenuator Help Справка Qucs по аттенюатору + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! QucsAttenuator — это программа синтеза аттенюаторов. Для создания аттенюатора нужно просто ввести все входные параметры и нажать кнопку расчёта. Сразу после этого схема аттенюатора рассчитывается и помещается в буфер обмена. Теперь нужно перейти в Qucs, открыть документ схемы и нажать CTRL-V (вставить из буфера обмена). Схема аттенюатра теперь может быть вставлена. Удачи! @@ -15558,16 +15632,19 @@ Open + About Qt О Qt + About... О... + Attenuator synthesis program @@ -15578,6 +15655,8 @@ Attenuator synthesis program + + Copyright (C) 2006 by Copyright (C) 2006 @@ -15587,6 +15666,7 @@ Attenuator synthesis program + Error: Set Attenuation less than %1 dB Ошибка: Установите ослабление меньше чем %1 дБ @@ -17114,6 +17194,134 @@ open files with an appropriate program. Тип линии передачи не доступен. + + Qucs_S_SPAR_Viewer + + + &File + &Файл + + + + &Quit + &Выход + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + &Справка + + + + &About + &О программе + + + + About Qt... + О Qt... + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + О Qt + + + + About... + О... + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + Предупреждение + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Ошибка + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -17155,7 +17363,7 @@ open files with an appropriate program. Schematic - + Title Название @@ -17228,12 +17436,12 @@ Edits the symbol for this schematic Правка обозначения для этой схемы - + generic обобщённый - + Error Ошибка @@ -17253,7 +17461,7 @@ Set the admsXml location on the application settings. Статус - + Netlist error Ошибка списка цепей @@ -17552,7 +17760,7 @@ Set the admsXml location on the application settings. ОШИБКА: Не удаётся создать "%1"! - + ERROR: Cannot start ОШИБКА: Невозможно запустить @@ -17829,7 +18037,7 @@ Please restart Qucs to affect changes! Все файлы - + Info Информация diff --git a/translations/qucs_sv.ts b/translations/qucs_sv.ts index 6fad8569f..3e7ce0204 100644 --- a/translations/qucs_sv.ts +++ b/translations/qucs_sv.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -551,7 +551,7 @@ Redigera komponentegenskaper - + Sweep Svep @@ -563,13 +563,13 @@ - + display in schematic visa schema - + Simulation: Simulering: @@ -620,18 +620,18 @@ - + Step: Steg: - + Number: Antal: - + Properties Egenskaper @@ -713,26 +713,28 @@ - + - - + + + + yes ja - - + + - + no nej - + Select a file Välj en fil @@ -767,7 +769,7 @@ - + Points per decade: Punkter per dekad: @@ -834,7 +836,7 @@ DiagramDialog - + Edit Diagram Properties Redigera diagramegenskaper @@ -1357,18 +1359,18 @@ Simulera - + Stop - + Save netlist - + Exit @@ -1378,12 +1380,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2043,7 +2045,7 @@ Filtersyntesprogram - + Error Fel @@ -2053,7 +2055,7 @@ Filtersyntesprogram - + Enter a Data File Name @@ -2087,7 +2089,7 @@ Filtersyntesprogram &Nej - + Running command line: @@ -2097,7 +2099,7 @@ Filtersyntesprogram - + Successfully converted file! @@ -2731,7 +2733,19 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2740,7 +2754,8 @@ Node name will not be changed. Impedans (ohm) - + + Error Fel @@ -2971,82 +2986,82 @@ men är nu %1 ! - - + + linear double - - - + + + logarithmic double - - - + + + linear integer - - + + logarithmic integer - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add Lägg till @@ -3084,47 +3099,47 @@ men är nu %1 ! - - + + minimize - - - + + + maximize - - - + + + less - - - + + + greater - - - + + + equal - - + + monitor - + Goals @@ -3144,16 +3159,16 @@ men är nu %1 ! Avbryt - + - + yes sim - + no @@ -3788,13 +3803,13 @@ men är nu %1 ! bias t - + for transient simulation: inductance in Henry för transientsimulering: induktans i H - + for transient simulation: capacitance in Farad för transientsimulering: kapacitans i C @@ -3814,7 +3829,7 @@ men är nu %1 ! - + transfer function scaling factor @@ -3830,8 +3845,8 @@ men är nu %1 ! bipolär transistor - - + + npn transistor npn-transistor @@ -3844,7 +3859,7 @@ men är nu %1 ! - + polarity polaritet @@ -4125,7 +4140,7 @@ men är nu %1 ! standardyta för bipolär transistor - + bipolar junction transistor with substrate bipolär junction-transistor med substrat @@ -4423,13 +4438,13 @@ men är nu %1 ! - + - + - + @@ -4735,22 +4750,22 @@ Felaktigt komponentsradsformat! metod för att lösa en kretsmatris - + dc block dc-blockering - + dc Block dc-blockering - + dc feed dc-matning - + dc Feed dc-matning @@ -4784,7 +4799,7 @@ Felaktigt komponentsradsformat! - + D-FlipFlop w/ SR @@ -4980,7 +4995,7 @@ Felaktigt komponentsradsformat! standardyta för diod - + Diode Diod @@ -5851,18 +5866,18 @@ Felaktigt komponentsradsformat! - + current equation - - + + charge equation - + Equation Defined Device @@ -6357,7 +6372,7 @@ Felaktigt komponentsradsformat! standardyta för JFET - + n-JFET n-JFET @@ -7014,7 +7029,7 @@ Felaktigt komponentsradsformat! MOS fälteffektransistor - + n-MOSFET n-MOSFET @@ -7032,7 +7047,7 @@ Felaktigt komponentsradsformat! - + zero-bias threshold voltage @@ -7222,7 +7237,15 @@ Felaktigt komponentsradsformat! - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate @@ -7545,19 +7568,19 @@ Felaktigt komponentsradsformat! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors N ömsesidiga induktanser @@ -8247,19 +8270,19 @@ Felaktigt komponentsradsformat! - + parameter equation - + Equation Defined RF Device - + RF @@ -8424,7 +8447,7 @@ Felaktigt komponentsradsformat! 2-ports S-parameterfil - + file fil @@ -8449,7 +8472,7 @@ Felaktigt komponentsradsformat! spice - + ERROR: No file name in SPICE component "%1". FEL: Inget filnamn i SPICE-komponent "%1". @@ -8470,7 +8493,7 @@ Felaktigt komponentsradsformat! - + Info Information @@ -8501,7 +8524,7 @@ Felaktigt komponentsradsformat! - + subcircuit delkrets @@ -8511,7 +8534,7 @@ Felaktigt komponentsradsformat! namn på qucs schemafil - + Subcircuit Delkrets @@ -8922,12 +8945,12 @@ Felaktigt komponentsradsformat! spänningsstyrd spänningskälla - + voltage controlled resistor - + resistance gain @@ -8959,7 +8982,7 @@ Felaktigt komponentsradsformat! - + ERROR: No file name in %1 component "%2". @@ -9011,7 +9034,7 @@ Felaktigt komponentsradsformat! - + VHDL file VHDL-fil @@ -9022,13 +9045,13 @@ Felaktigt komponentsradsformat! Namn på VHDL-fil - + vhdl vhdl - - + + generic variable @@ -9255,7 +9278,7 @@ Skriva över? - + Successfully exported @@ -9272,7 +9295,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units Fel: Fel tidsformat i "%1". Använd positivt tal utan enhet @@ -9280,8 +9303,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9379,16 +9402,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9400,7 +9423,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties Redigera egenskaper @@ -9425,7 +9448,7 @@ Use PNG, JPEG or SVG graphics! 2-ports-matchning - + The ground potential cannot be labeled! Jordpotentialen kan ej få etikett! @@ -9435,7 +9458,7 @@ Use PNG, JPEG or SVG graphics! Pil - + Ellipse Ellips @@ -9445,7 +9468,7 @@ Use PNG, JPEG or SVG graphics! fylld ellips - + Edit Ellipse Properties Redigera ellipsegenskaper @@ -9455,7 +9478,7 @@ Use PNG, JPEG or SVG graphics! Elliptisk båge - + Edit Arc Properties Redigera bågegenskaper @@ -9465,7 +9488,7 @@ Use PNG, JPEG or SVG graphics! Linje - + Edit Line Properties Redigera linjeegenskaper @@ -9485,7 +9508,7 @@ Use PNG, JPEG or SVG graphics! fylld rektangel - + Edit Rectangle Properties Redigera rektangelegenskaper @@ -9504,7 +9527,7 @@ Use PNG, JPEG or SVG graphics! Namnlös - + Format Error: 'Painting' field is not closed! @@ -9659,8 +9682,8 @@ Felaktig 'färgläggnings'-radsformat! - - + + @@ -9686,7 +9709,7 @@ Unknown field! Okänt fält! - + ERROR: Component "%1" has no analog model. FEL: Komponent "%1" har ingen analog modell. @@ -10869,7 +10892,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -10975,24 +10998,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11455,7 +11478,7 @@ Active Filter synthesis program QucsApp - + Schematic Schema @@ -11471,47 +11494,47 @@ Active Filter synthesis program - + VHDL Sources VHDL-källor - - + + Verilog Sources - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File Alla filer - + The schematic search path has been refreshed. - + Verilog @@ -11521,7 +11544,7 @@ Active Filter synthesis program VHDL - + Open file @@ -11531,7 +11554,7 @@ Active Filter synthesis program - + Open example… @@ -11546,24 +11569,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics Scheman - + New Ny @@ -11637,7 +11660,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo innehål i aktuellt projekt - + Search Components @@ -11674,8 +11697,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -11686,29 +11709,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -11717,43 +11740,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Fel - + Cannot open "%1". Kan ej öppna "%1". - + Library is corrupt. Bibliotek är förstört. - - - - - - - - - - - + + + + + + + + + + + - + Info Information - + Default icon not found: %1.png - + -port -port @@ -11764,14 +11787,14 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! Dokumentet innehåller osparade ändringr! - + Do you want to save the changes before copying? @@ -11815,17 +11838,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Kan ej ta bort en öppen fil! - - - - - - + + + + + + Warning Varning - + This will delete the file permanently! Continue ? Detta kommer att ta bort filen för gott! Fortsätta? @@ -11888,12 +11911,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! Kan ej skapa arbetsmapp! - + Cannot create project directory ! Kan ej skapa projektmapp! @@ -11906,7 +11929,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo -Projekt: - + Choose Project Directory for Opening Välj projektmapp att öppna @@ -11916,13 +11939,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Inget projekt är valt! - + Cannot delete file: %1 - - + + @@ -11930,12 +11953,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -11945,12 +11968,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -11985,12 +12008,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12034,35 +12057,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Skapar nytt schema... - - + + + - - + - + - + Ready. Klar. - + Creating new text editor... Skapar ny textredigerare... - - + + Opening file... Öppnar fil... @@ -12149,7 +12172,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Spara alla filer... - + Closing file... Stänger fil... @@ -12168,7 +12191,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo &Kasta - + untitled Namnlös @@ -12198,7 +12221,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12208,7 +12231,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12247,7 +12270,7 @@ Use subcircuit to crete Verilog-A module! Vill du verkligen avsluta? - + The document was modified by another program ! Dokumentet har ändrats av ett annat program! @@ -12265,7 +12288,7 @@ Use subcircuit to crete Verilog-A module! Behålla den - + Cannot create Kan ej skapa @@ -12280,7 +12303,7 @@ Use subcircuit to crete Verilog-A module! kan ej starta "%1"! - + Could not load S[1,1]. Kunde inte ladda S[1,1]. @@ -12305,7 +12328,7 @@ Use subcircuit to crete Verilog-A module! Fel beroende! - + Cutting selection... Klipper ur urvalet... @@ -12315,17 +12338,17 @@ Use subcircuit to crete Verilog-A module! Kopierar urvalet till Urklipp... - - - - - - + + + + + + At least two elements must be selected ! Åtminstone två element måste väljas! - + Opening aborted, file not found. @@ -12347,7 +12370,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12427,12 +12450,12 @@ Skriva över? Kan ej skriva "%1" ! - + Please open project with subcircuits! - + Please select a diagram graph! @@ -12490,7 +12513,7 @@ Have you saved the Verilog-A symbols? - + &New &Ny @@ -13303,7 +13326,24 @@ Create Library from Subcircuits - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S @@ -13325,7 +13365,7 @@ Convert data file to various file formats - + Export to &CSV... @@ -13614,7 +13654,7 @@ Rotates the selected component by 90� counter-clockwise - + Power combining Starts power combining calculation program @@ -13697,7 +13737,7 @@ Resets the limits for all axis to auto. - + Mirror about X Axis Spegla i X-axel @@ -13889,12 +13929,7 @@ Skjuter in en portsymbol Ledare - - Ctrl+E - - - - + Inserts a wire @@ -14110,13 +14145,13 @@ Starts attenuator calculation program - - + + Simulate Simulera - + Simulates the current schematic Simulerar aktuellt schema @@ -14416,7 +14451,7 @@ Om Qt från Trolltech &Verktyg - + Compact modelling @@ -14501,83 +14536,100 @@ Open QucsAttenuator + &File &Fil + &Quit &Avsluta + + &Help &Hjälp + &About + About Qt... Om Qt... + Topology + Input + Attenuation: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by + dB + Zin: + Zout: @@ -14587,11 +14639,13 @@ Open + Output + R1: @@ -14604,16 +14658,26 @@ Open + + + + + + + + -- + R2: + R3: @@ -14623,26 +14687,31 @@ Open + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt Om Qt + About... Om... + Attenuator synthesis program @@ -14651,11 +14720,14 @@ Attenuator synthesis program + + Copyright (C) 2006 by Copyright (C) 2005, 2006 by {2006 ?} + Error: Set Attenuation less than %1 dB @@ -16064,6 +16136,134 @@ open files with an appropriate program. Transmissionsledningstyp ej tillgänglig. + + Qucs_S_SPAR_Viewer + + + &File + &Fil + + + + &Quit + &Avsluta + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + &Hjälp + + + + &About + + + + + About Qt... + Om Qt... + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + Om Qt + + + + About... + Om... + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + Varning + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Fel + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16105,7 +16305,7 @@ open files with an appropriate program. Schematic - + Title @@ -16161,12 +16361,12 @@ Edits the symbol for this schematic Redigerar symbolen för detta schema - + generic - + Error Fel @@ -16184,7 +16384,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16482,7 +16682,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -16723,7 +16923,7 @@ Set the admsXml location on the application settings. Alla filer - + Info Information diff --git a/translations/qucs_tr.ts b/translations/qucs_tr.ts index eece41991..0b2a7397f 100644 --- a/translations/qucs_tr.ts +++ b/translations/qucs_tr.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -551,7 +551,7 @@ Bileşen Özelliklerini Değiştir - + Sweep Süpür @@ -563,13 +563,13 @@ - + display in schematic Tasarıda göster - + Simulation: Benzetim: @@ -620,18 +620,18 @@ - + Step: Adım: - + Number: Sayı: - + Properties Özelliler @@ -713,26 +713,28 @@ - + - - + + + + yes evet - - + + - + no hayır - + Select a file Kütük seç @@ -767,7 +769,7 @@ Verilog kütükleri - + Points per decade: Ters üstel (log) için nokta sayısı: @@ -834,7 +836,7 @@ DiagramDialog - + Edit Diagram Properties Diyagram Özelliklerini Değiştir @@ -1365,18 +1367,18 @@ Benzetimi Başlat - + Stop - + Save netlist - + Exit @@ -1386,12 +1388,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2055,7 +2057,7 @@ Süzgeç tasarım yazılımı - + Error Hata @@ -2065,7 +2067,7 @@ Süzgeç tasarım yazılımı - + Enter a Data File Name Veri Kütügünün Adını Girin @@ -2103,7 +2105,7 @@ Süzgeç tasarım yazılımı HATA: Bilinmeyen kütük biçimi! Lütfen kütük uzantısını denetleyin! - + Running command line: @@ -2113,7 +2115,7 @@ Süzgeç tasarım yazılımı HATA: Çevirici açılamıyor ! - + Successfully converted file! @@ -2807,7 +2809,19 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2816,7 +2830,8 @@ Node name will not be changed. Sanal Direnç (ohm) - + + Error Hata @@ -3047,82 +3062,82 @@ olmalı fakat şu anda %1 ! - - + + linear double doğrusal çift duyarlıklı - - - + + + logarithmic double üstel çift duyarlıklı - - - + + + linear integer doğrusal tam sayı - - + + logarithmic integer üstel tam sayı - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add Ekle @@ -3160,47 +3175,47 @@ olmalı fakat şu anda %1 ! - - + + minimize en küçüğü bul - - - + + + maximize en büyüğü bul - - - + + + less az - - - + + + greater daha büyük - - - + + + equal eşit - - + + monitor izle - + Goals Amaçlar @@ -3220,16 +3235,16 @@ olmalı fakat şu anda %1 ! İptal - + - + yes evet - + no @@ -3944,13 +3959,13 @@ olmalı fakat şu anda %1 ! kutuplama t - + for transient simulation: inductance in Henry kalımsız benzetim için: Henri cinsinden sargı etkisi - + for transient simulation: capacitance in Farad kalımsız benzetim için: Farad cinsinden sığa @@ -3970,7 +3985,7 @@ olmalı fakat şu anda %1 ! - + transfer function scaling factor @@ -3986,8 +4001,8 @@ olmalı fakat şu anda %1 ! çift kutuplu eklem transistör (bjt) - - + + npn transistor npn transistör @@ -4000,7 +4015,7 @@ olmalı fakat şu anda %1 ! - + polarity kutuplanma @@ -4281,7 +4296,7 @@ olmalı fakat şu anda %1 ! çift kutuplu eklem transistör (bjt) için varsayılan alan - + bipolar junction transistor with substrate alttabakalı çift kutuplu eklem transistör @@ -4579,13 +4594,13 @@ olmalı fakat şu anda %1 ! - + - + - + @@ -4895,22 +4910,22 @@ Yanlış "bileşen-component" satır biçimi! devre tablosu çözüm yöntemi - + dc block dc kalıp - + dc Block dc Kalıp - + dc feed dc besleme - + dc Feed dc Besleme @@ -4944,7 +4959,7 @@ Yanlış "bileşen-component" satır biçimi! - + D-FlipFlop w/ SR @@ -5140,7 +5155,7 @@ Yanlış "bileşen-component" satır biçimi! diyot için varsayılan alan - + Diode Diyot @@ -6011,18 +6026,18 @@ Yanlış "bileşen-component" satır biçimi! - + current equation akım eşitliği - - + + charge equation yük eşitliği - + Equation Defined Device Eşitlikle Tanımlanmış Cihaz @@ -6517,7 +6532,7 @@ Yanlış "bileşen-component" satır biçimi! JFET için varsayılan alan - + n-JFET n-JFET @@ -7177,7 +7192,7 @@ Yanlış "bileşen-component" satır biçimi! MOS alan etkili transistör - + n-MOSFET n-MOSFET @@ -7195,7 +7210,7 @@ Yanlış "bileşen-component" satır biçimi! bosaltım MOSFET - + zero-bias threshold voltage sıfır-kutuplama eşik gerilimi @@ -7385,7 +7400,15 @@ Yanlış "bileşen-component" satır biçimi! kaynak eklemi çevresi - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate Alt tabakalı MOS alan etkili transistör @@ -7708,19 +7731,19 @@ Yanlış "bileşen-component" satır biçimi! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8410,19 +8433,19 @@ Yanlış "bileşen-component" satır biçimi! - + parameter equation değişken eşitliği - + Equation Defined RF Device Eşitlikle Tanımlanmış RF Devre Elemanı - + RF RF @@ -8587,7 +8610,7 @@ Yanlış "bileşen-component" satır biçimi! 2 girişli S değişken kütüğü - + file kütük @@ -8612,7 +8635,7 @@ Yanlış "bileşen-component" satır biçimi! spice - + ERROR: No file name in SPICE component "%1". HATA: SPICE bileşeni "%1" de kütük ismi yok. @@ -8633,7 +8656,7 @@ Yanlış "bileşen-component" satır biçimi! HATA: Çevrilmiş SPICE kütügü "%1" açılamıyor. - + Info Bilgi @@ -8664,7 +8687,7 @@ Yanlış "bileşen-component" satır biçimi! "%1" SPICE kütüğü çevriliyor. - + subcircuit alt-devre @@ -8674,7 +8697,7 @@ Yanlış "bileşen-component" satır biçimi! qucs tasarı kütüğünün ismi - + Subcircuit Altdevre @@ -9085,12 +9108,12 @@ Yanlış "bileşen-component" satır biçimi! gerilim denetimli gerilim kaynağı - + voltage controlled resistor - + resistance gain @@ -9122,7 +9145,7 @@ Yanlış "bileşen-component" satır biçimi! - + ERROR: No file name in %1 component "%2". HATA: %1 bileşeni "%2" de kütük ismi yok. @@ -9175,7 +9198,7 @@ Yanlış "bileşen-component" satır biçimi! Kütüğe Dayalı Gerilim Kaynağı - + VHDL file VHDL kütüğü @@ -9186,13 +9209,13 @@ Yanlış "bileşen-component" satır biçimi! VHDL kütüğünün ismi - + vhdl vhdl - - + + generic variable @@ -9422,7 +9445,7 @@ Overwrite ? - + Successfully exported @@ -9439,7 +9462,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units Hata: "%1" de zaman biçimi yanlış. Birimi olan artı değerlikli sayı kulanın @@ -9447,8 +9470,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9546,16 +9569,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9567,7 +9590,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties Özellikleri Düzenle @@ -9592,7 +9615,7 @@ Use PNG, JPEG or SVG graphics! 2-uç uyumu - + The ground potential cannot be labeled! Toprak gerilimi yaftalanamaz! @@ -9602,7 +9625,7 @@ Use PNG, JPEG or SVG graphics! Ok - + Ellipse Elips @@ -9612,7 +9635,7 @@ Use PNG, JPEG or SVG graphics! içi dolu elips - + Edit Ellipse Properties Elips Özelliklerini Değiştir @@ -9622,7 +9645,7 @@ Use PNG, JPEG or SVG graphics! Elips şeklinde yay - + Edit Arc Properties Yay Özelliklerini Değiştir @@ -9632,7 +9655,7 @@ Use PNG, JPEG or SVG graphics! Hat - + Edit Line Properties Hat Özelliklerini Değiştir @@ -9652,7 +9675,7 @@ Use PNG, JPEG or SVG graphics! içi dolu dik dörtgen - + Edit Rectangle Properties Dik dörtgen özelliklerini değiştir @@ -9671,7 +9694,7 @@ Use PNG, JPEG or SVG graphics! isimsiz - + Format Error: 'Painting' field is not closed! @@ -9827,8 +9850,8 @@ Yanlış 'boyama - painting' satır biçimi! - - + + @@ -9854,7 +9877,7 @@ Unknown field! Bilinmeyen alan! - + ERROR: Component "%1" has no analog model. HATA: Bileşen "%1" in analog bir modeli yok. @@ -11041,7 +11064,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11147,24 +11170,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11627,7 +11650,7 @@ Active Filter synthesis program QucsApp - + Schematic Tasarım @@ -11643,47 +11666,47 @@ Active Filter synthesis program - + VHDL Sources VHDL Kaynakları - - + + Verilog Sources Verilog Kaynakları - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File Herhangi Bir Kütük - + The schematic search path has been refreshed. - + Verilog Verilog @@ -11693,7 +11716,7 @@ Active Filter synthesis program VHDL - + Open file @@ -11703,7 +11726,7 @@ Active Filter synthesis program - + Open example… @@ -11718,24 +11741,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics Tasarılar - + New Yeni @@ -11809,7 +11832,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo geçerli tasarının içeriği - + Search Components @@ -11846,8 +11869,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -11858,29 +11881,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -11889,43 +11912,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Hata - + Cannot open "%1". "%1" açılamıyor. - + Library is corrupt. Kütüphane bozuk. - - - - - - - - - - - + + + + + + + + + + + - + Info Bilgi - + Default icon not found: %1.png - + -port -uç @@ -11936,14 +11959,14 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! Belge kaydedilmemiş değişiklikler içeriyor! - + Do you want to save the changes before copying? @@ -11983,17 +12006,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Açık bir kütük silinemez! - - - - - - + + + + + + Warning Uyarı - + This will delete the file permanently! Continue ? Kütük kalıcı olarak silinecek! Devam ? @@ -12056,12 +12079,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! Çalışma dizini oluşturulamıyor ! - + Cannot create project directory ! Tasarım dizini oluşturulamıyor ! @@ -12074,7 +12097,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - Tasarım: - + Choose Project Directory for Opening Açılacak Tasarım Dizinini Seçin @@ -12084,13 +12107,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Seçili Tasarım yok ! - + Cannot delete file: %1 - - + + @@ -12098,12 +12121,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -12113,12 +12136,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -12153,12 +12176,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12202,35 +12225,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Yeni tasarı oluşturuluyor... - - + + + - - + - + - + Ready. Hazır. - + Creating new text editor... Yeni metin düzenleyici oluşturuluyor... - - + + Opening file... Kütük açılıyor... @@ -12317,7 +12340,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Tüm kütükler kaydediliyor... - + Closing file... Kütük kapatılıyor... @@ -12336,7 +12359,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo &Gözardı et - + untitled isimsiz @@ -12366,7 +12389,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12376,7 +12399,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12415,7 +12438,7 @@ Use subcircuit to crete Verilog-A module! Uygulamadan gerçekten çıkmak mı istiyorsunuz? - + The document was modified by another program ! Belge başka bir yazılım tarafından değiştirilmiş ! @@ -12433,7 +12456,7 @@ Use subcircuit to crete Verilog-A module! Tut - + Cannot create Oluşturulamıyor @@ -12448,7 +12471,7 @@ Use subcircuit to crete Verilog-A module! "%1" başlatılamıyor! - + Could not load S[1,1]. Yüklenemiyor S(1.1). @@ -12473,7 +12496,7 @@ Use subcircuit to crete Verilog-A module! Yanlış dayanak! - + Cutting selection... Seçili kesiliyor... @@ -12483,17 +12506,17 @@ Use subcircuit to crete Verilog-A module! Seçili not tahtasına çoğaltılıyor... - - - - - - + + + + + + At least two elements must be selected ! En az iki eleman seçilmeli ! - + Opening aborted, file not found. @@ -12515,7 +12538,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12595,7 +12618,7 @@ Overwrite ? "%1" yazılamıyor ! - + Please open project with subcircuits! Lütfen alt devre tasarımını açın! @@ -12604,7 +12627,7 @@ Overwrite ? Önce tasarımı açın lütfen! - + Please select a diagram graph! Lütfen bir çizge grafigi seçin! @@ -12662,7 +12685,7 @@ Have you saved the Verilog-A symbols? - + &New &Yeni @@ -13484,7 +13507,24 @@ Create Library from Subcircuits Alt devrelerden bir kütüphane olusturur - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S @@ -13538,7 +13578,7 @@ Convert data file to various file formats - + Export to &CSV... &CVS'e aktar... @@ -13833,7 +13873,7 @@ Seçili bileşeni saatin tersi yönde 90° çevirir {90�?} - + Power combining Starts power combining calculation program @@ -13928,7 +13968,7 @@ Rotates the selected component by 90° counter-clockwise Seçili bileşeni saatin tersi yönde 90° çevirir - + Mirror about X Axis X Ekseni Etrafında Aynala @@ -14120,12 +14160,7 @@ Giriş/çıkış ayak(uç/port) simgesi ekler Bağlantı Hattı - - Ctrl+E - - - - + Inserts a wire Bağlantı teli ekler @@ -14345,13 +14380,13 @@ Starts attenuator calculation program Zayıflatıcı olusturma yazılımını baslatır - - + + Simulate Benzetimi Başlat - + Simulates the current schematic Geçerli tasarıyı benzetime tabi tutar @@ -14653,7 +14688,7 @@ Trolltech tarafından Qt hakkında &Araçlar - + Compact modelling @@ -14738,68 +14773,82 @@ Open QucsAttenuator + &File &Kütük + &Quit &Çıkış + + &Help &Yardım + &About + About Qt... Qt Hakkında... + Topology Topoloji + Input Giris + Attenuation: Zayıflama çarpanı: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by @@ -14809,11 +14858,13 @@ Open + dB dB + Zin: Zin: @@ -14827,6 +14878,7 @@ Open + Zout: Zout: @@ -14836,11 +14888,13 @@ Open + Output Çıkıs + R1: R1: @@ -14853,16 +14907,26 @@ Open + + + + + + + + -- -- + R2: R2: + R3: R3: @@ -14872,26 +14936,31 @@ Open + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt Qt Hakkında + About... Hakkında... + Attenuator synthesis program @@ -14902,6 +14971,8 @@ Zayıflatıcı tasarım yazılımı + + Copyright (C) 2006 by Çoğaltma hakkı/Telif (Ç) 2006 @@ -14911,6 +14982,7 @@ Zayıflatıcı tasarım yazılımı + Error: Set Attenuation less than %1 dB @@ -16384,6 +16456,134 @@ uygun bir uygulama ile açılabilsinler. İletim hattı çeşidi kullanılabilir değil. + + Qucs_S_SPAR_Viewer + + + &File + &Kütük + + + + &Quit + &Çıkış + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + &Yardım + + + + &About + + + + + About Qt... + Qt Hakkında... + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + Qt Hakkında + + + + About... + Hakkında... + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + Uyarı + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Hata + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16425,7 +16625,7 @@ uygun bir uygulama ile açılabilsinler. Schematic - + Title Baslık @@ -16481,12 +16681,12 @@ Edits the symbol for this schematic Bu tasarının simgesini düzenler - + generic - + Error Hata @@ -16504,7 +16704,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16802,7 +17002,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -17044,7 +17244,7 @@ Set the admsXml location on the application settings. Tüm Kütükler - + Info Bilgi diff --git a/translations/qucs_uk.ts b/translations/qucs_uk.ts index ea98c04f2..029978b06 100644 --- a/translations/qucs_uk.ts +++ b/translations/qucs_uk.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -551,7 +551,7 @@ Зміна властивостей компоненту - + Sweep Розгортка @@ -563,13 +563,13 @@ - + display in schematic показувати на схемі - + Simulation: Моделювання: @@ -620,18 +620,18 @@ - + Step: Крок: - + Number: Кількість: - + Properties Властивості @@ -713,26 +713,28 @@ - + - - + + + + yes так - - + + - + no ні - + Select a file Вибрати файл @@ -767,7 +769,7 @@ Файли Verilog - + Points per decade: Кількість точок на декаду: @@ -834,7 +836,7 @@ DiagramDialog - + Edit Diagram Properties Редагувати властивості діаграми @@ -1365,18 +1367,18 @@ Моделювати - + Stop - + Save netlist - + Exit @@ -1386,12 +1388,12 @@ - + Simulate with external simulator - + There were simulation errors. Please check log. @@ -2051,7 +2053,7 @@ Filter synthesis program - + Error Помилка @@ -2061,7 +2063,7 @@ Filter synthesis program - + Enter a Data File Name Введіть ім'я файлу даних @@ -2099,7 +2101,7 @@ Filter synthesis program ПОМИЛКА: Невідомий формат файлу! Перевірте розширення імені файла! - + Running command line: @@ -2109,7 +2111,7 @@ Filter synthesis program ПОМИЛКА: Неможливо запустити конвертор! - + Successfully converted file! @@ -2803,7 +2805,19 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2812,7 +2826,8 @@ Node name will not be changed. Повний опір (Ом) - + + Error Помилка @@ -3043,82 +3058,82 @@ but is %1 ! - - + + linear double лінійне дійсне - - - + + + logarithmic double логарифмічне дійсне - - - + + + linear integer лінійне ціле - - + + logarithmic integer логарифмічне ціле - - - + + + E3 series - - - + + + E6 series - - - + + + E12 series - - - + + + E24 series - - - + + + E48 series - - - + + + E96 series - - - + + + E192 series - + Add Додати @@ -3156,47 +3171,47 @@ but is %1 ! - - + + minimize мінімізувати - - - + + + maximize максимізувати - - - + + + less менше - - - + + + greater більше - - - + + + equal дорівнює - - + + monitor стежити - + Goals Цілі @@ -3216,16 +3231,16 @@ but is %1 ! Скасувати - + - + yes так - + no @@ -3940,13 +3955,13 @@ but is %1 ! усунення T - + for transient simulation: inductance in Henry для моделювання перехідних процесів: індуктивність в генрі - + for transient simulation: capacitance in Farad для моделювання перехідних процесів: ємність в фарадах @@ -3966,7 +3981,7 @@ but is %1 ! - + transfer function scaling factor @@ -3982,8 +3997,8 @@ but is %1 ! біполярний транзистор - - + + npn transistor npn транзистор @@ -3996,7 +4011,7 @@ but is %1 ! - + polarity полярність @@ -4277,7 +4292,7 @@ but is %1 ! площа за замовчуванням для біполярного транзистора - + bipolar junction transistor with substrate біполярний транзистор з підкладкою @@ -4575,13 +4590,13 @@ but is %1 ! - + - + - + @@ -4891,22 +4906,22 @@ Wrong 'component' line format! метод рішення матриці схеми - + dc block розв'язка - + dc Block розв'язка від постійного струму - + dc feed подача постійного струму - + dc Feed підвід постійного струму @@ -4940,7 +4955,7 @@ Wrong 'component' line format! - + D-FlipFlop w/ SR @@ -5136,7 +5151,7 @@ Wrong 'component' line format! площа за замовчуванням для діода - + Diode Діод @@ -6003,18 +6018,18 @@ Wrong 'component' line format! - + current equation рівняння струму - - + + charge equation рівняння заряду - + Equation Defined Device Заданий рівнянням пристрій @@ -6509,7 +6524,7 @@ Wrong 'component' line format! площа за замовчуванням для польового транзистора із керуючим pn-переходом - + n-JFET n-JFET @@ -7169,7 +7184,7 @@ Wrong 'component' line format! МОП польовий транзистор - + n-MOSFET n-МОП @@ -7187,7 +7202,7 @@ Wrong 'component' line format! МОП польовий транзистор збідненого типу - + zero-bias threshold voltage гранична напруга при нульовому зміщенні @@ -7377,7 +7392,15 @@ Wrong 'component' line format! периметр витокового переходу - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate МОП польовий транзистор з підкладкою @@ -7700,19 +7723,19 @@ Wrong 'component' line format! - - + + inductance of coil - - + + coupling factor between coil %1 and coil %2 - + N Mutual Inductors @@ -8402,19 +8425,19 @@ Wrong 'component' line format! - + parameter equation - + Equation Defined RF Device - + RF @@ -8579,7 +8602,7 @@ Wrong 'component' line format! файл S-параметрів чотирьохполюсника - + file файл @@ -8604,7 +8627,7 @@ Wrong 'component' line format! Spice - + ERROR: No file name in SPICE component "%1". ПОМИЛКА: Немає імені файла в компоненті SPICE "%1". @@ -8625,7 +8648,7 @@ Wrong 'component' line format! ПОМИЛКА: Неможливо відкрити конвертований SPICE-файл "%1". - + Info Інформація @@ -8656,7 +8679,7 @@ Wrong 'component' line format! Перетворення SPICE-файлу "%1". - + subcircuit підсхема @@ -8666,7 +8689,7 @@ Wrong 'component' line format! ім'я схемного файла Qucs - + Subcircuit Підсхема @@ -9077,12 +9100,12 @@ Wrong 'component' line format! джерело напруги, кероване напругою - + voltage controlled resistor - + resistance gain @@ -9114,7 +9137,7 @@ Wrong 'component' line format! - + ERROR: No file name in %1 component "%2". ПОМИЛКА: Немає імені файла %1 в компоненті "%2". @@ -9166,7 +9189,7 @@ Wrong 'component' line format! Файл Оснований на Джерелах Напруг - + VHDL file Файл VHDL @@ -9177,13 +9200,13 @@ Wrong 'component' line format! Ім'я файла VHDL - + vhdl VHDL - - + + generic variable @@ -9413,7 +9436,7 @@ Overwrite ? - + Successfully exported @@ -9430,7 +9453,7 @@ Use PNG, JPEG or SVG graphics! - + Error: Wrong time format in "%1". Use positive number with units Помилка: Невірний формат часу у "%1". Використовуйте позитивне число з одиницями виміру @@ -9438,8 +9461,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices @@ -9537,16 +9560,16 @@ Use PNG, JPEG or SVG graphics! - - - + + + diagrams - + paintings @@ -9558,7 +9581,7 @@ Use PNG, JPEG or SVG graphics! - + Edit Properties Змінити властивості @@ -9583,7 +9606,7 @@ Use PNG, JPEG or SVG graphics! узгодження чотирьохполюсника - + The ground potential cannot be labeled! Потенціал заземлення може мати мітку! @@ -9593,7 +9616,7 @@ Use PNG, JPEG or SVG graphics! Стрілка - + Ellipse Еліпс @@ -9603,7 +9626,7 @@ Use PNG, JPEG or SVG graphics! заповнений еліпс - + Edit Ellipse Properties Зміна властивостей еліпса @@ -9613,7 +9636,7 @@ Use PNG, JPEG or SVG graphics! Еліптична дуга - + Edit Arc Properties Редагування властивостей дуги @@ -9623,7 +9646,7 @@ Use PNG, JPEG or SVG graphics! Лінія - + Edit Line Properties Зміна властивостей лінії @@ -9643,7 +9666,7 @@ Use PNG, JPEG or SVG graphics! заповнений прямокутник - + Edit Rectangle Properties Зміна властивостей прямокутника @@ -9662,7 +9685,7 @@ Use PNG, JPEG or SVG graphics! без назви - + Format Error: 'Painting' field is not closed! @@ -9818,8 +9841,8 @@ Wrong 'painting' line format! - - + + @@ -9845,7 +9868,7 @@ Unknown field! Невідоме поле! - + ERROR: Component "%1" has no analog model. ПОМИЛКА: У компонента "%1" немає аналогової моделі. @@ -11032,7 +11055,7 @@ Leave continuation lines blank when NOT in use. - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11138,24 +11161,24 @@ Leave continuation lines blank when NOT in use. - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11618,7 +11641,7 @@ Active Filter synthesis program QucsApp - + Schematic Схема @@ -11634,47 +11657,47 @@ Active Filter synthesis program - + VHDL Sources Вихідні тексти VHDL - - + + Verilog Sources Вихідний код Verilog - - + + Verilog-A Sources - - + + Octave Scripts - + Spice Files - + Any File Будь-який файл - + The schematic search path has been refreshed. - + Verilog Verilog @@ -11684,7 +11707,7 @@ Active Filter synthesis program VHDL - + Open file @@ -11694,7 +11717,7 @@ Active Filter synthesis program - + Open example… @@ -11709,24 +11732,24 @@ Active Filter synthesis program - - + + Simulate schematic - + DC bias simulation mode is not supported for digital schematic! - + Schematics Схеми - + New Створити @@ -11800,7 +11823,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo вміст поточного проекту - + Search Components @@ -11837,8 +11860,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + @@ -11849,29 +11872,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -11880,43 +11903,43 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Помилка - + Cannot open "%1". Неможливо відкрити файл "%1". - + Library is corrupt. Бібліотечний файл пошкоджений. - - - - - - - - - - - + + + + + + + + + + + - + Info Інформація - + Default icon not found: %1.png - + -port -виводи @@ -11927,14 +11950,14 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! У документі є незбережені зміни! - + Do you want to save the changes before copying? @@ -11974,17 +11997,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Неможливо видалити відкритий файл! - - - - - - + + + + + + Warning Попередження - + This will delete the file permanently! Continue ? Це безповоротно видалить файл! Продовжити ? @@ -12047,12 +12070,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Cannot create work directory ! Неможливо створити робочу теку ! - + Cannot create project directory ! Неможливо створити теку проекту ! @@ -12065,7 +12088,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - Проект: - + Choose Project Directory for Opening Виберіть для відкривання теку проекту @@ -12075,13 +12098,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Проект не обраний ! - + Cannot delete file: %1 - - + + @@ -12089,12 +12112,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Search Lib Components - + Set simulator @@ -12104,12 +12127,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Show model - + verilog-a user devices @@ -12144,12 +12167,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Project: - + Project directory name does not end in '_prj' (%1) @@ -12193,35 +12216,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Створення нової схеми... - - + + + - - + - + - + Ready. Готово. - + Creating new text editor... Створення нового текстового редактора... - - + + Opening file... Відкриття файлу... @@ -12308,7 +12331,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Збереження всіх файлів... - + Closing file... Закриття файлу... @@ -12327,7 +12350,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo &Закрити без збереження - + untitled без назви @@ -12357,7 +12380,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12367,7 +12390,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! @@ -12406,7 +12429,7 @@ Use subcircuit to crete Verilog-A module! Справді хочете вийти з програми? - + The document was modified by another program ! Документ змінено іншою програмою! @@ -12424,7 +12447,7 @@ Use subcircuit to crete Verilog-A module! Залишити - + Cannot create Неможливо створити @@ -12439,7 +12462,7 @@ Use subcircuit to crete Verilog-A module! Неможливо запустити програму "%1"! - + Could not load S[1,1]. Неможливо завантажити S[1,1]. @@ -12464,7 +12487,7 @@ Use subcircuit to crete Verilog-A module! Неправильна залежність! - + Cutting selection... Вирізання виділеної області... @@ -12474,17 +12497,17 @@ Use subcircuit to crete Verilog-A module! Копіювання обраної області у буфер обміну... - - - - - - + + + + + + At least two elements must be selected ! Потрібно вибрати щонайменше два елемента! - + Opening aborted, file not found. @@ -12506,7 +12529,7 @@ Use subcircuit to crete Verilog-A module! - + Cannot start %1 program! (%2) @@ -12586,7 +12609,7 @@ Overwrite ? Неможливо записати файл "%1" ! - + Please open project with subcircuits! Відкрийте проект з підсхемами! @@ -12595,7 +12618,7 @@ Overwrite ? Спочатку відкрийте проект! - + Please select a diagram graph! Виберіть графік діаграми! @@ -12653,7 +12676,7 @@ Have you saved the Verilog-A symbols? - + &New &Створити @@ -13475,7 +13498,24 @@ Create Library from Subcircuits Створити бібліотеку з підсхем - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qucs-S @@ -13529,7 +13569,7 @@ Convert data file to various file formats - + Export to &CSV... Експортувати в &CSV... @@ -13824,7 +13864,7 @@ Rotates the selected component by 90� counter-clockwise - + Power combining Starts power combining calculation program @@ -13919,7 +13959,7 @@ Rotates the selected component by 90° counter-clockwise Повертає виділений компонент на 90° проти годинникової стрілки - + Mirror about X Axis Віддзеркалити щодо осі X @@ -14111,12 +14151,7 @@ Inserts a port symbol Провідник - - Ctrl+E - - - - + Inserts a wire Вставляє провідник @@ -14336,13 +14371,13 @@ Starts attenuator calculation program Моделює поточну схему - - + + Simulate Моделювати - + Simulates the current schematic Моделює поточну схему @@ -14644,7 +14679,7 @@ About Qt by Trolltech &Інструменти - + Compact modelling @@ -14729,68 +14764,82 @@ Open QucsAttenuator + &File &Файл + &Quit &Вихід + + &Help &Довідка + &About + About Qt... Про програму Qt... + Topology Топологія + Input Вхід + Attenuation: Розрідження: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by @@ -14800,11 +14849,13 @@ Open + dB дБ + Zin: Zin: @@ -14818,6 +14869,7 @@ Open + Zout: Zout: @@ -14827,11 +14879,13 @@ Open + Output Вихід + R1: R1: @@ -14844,16 +14898,26 @@ Open + + + + + + + + -- -- + R2: R2: + R3: R3: @@ -14863,26 +14927,31 @@ Open + Qucs Attenuator Help + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt Про програму Qt + About... Про... + Attenuator synthesis program @@ -14893,6 +14962,8 @@ Attenuator synthesis program + + Copyright (C) 2006 by Copyright (С) 2006 @@ -14902,6 +14973,7 @@ Attenuator synthesis program + Error: Set Attenuation less than %1 dB @@ -16374,6 +16446,134 @@ open files with an appropriate program. Тип лінії передачі недоступний. + + Qucs_S_SPAR_Viewer + + + &File + &Файл + + + + &Quit + &Вихід + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + &Довідка + + + + &About + + + + + About Qt... + Про програму Qt... + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + Про програму Qt + + + + About... + Про... + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + Попередження + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + Помилка + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16415,7 +16615,7 @@ open files with an appropriate program. Schematic - + Title Назва @@ -16471,12 +16671,12 @@ Edits the symbol for this schematic Правка позначення для цієї схеми - + generic - + Error Помилка @@ -16494,7 +16694,7 @@ Set the admsXml location on the application settings. - + Netlist error @@ -16792,7 +16992,7 @@ Set the admsXml location on the application settings. - + ERROR: Cannot start @@ -17034,7 +17234,7 @@ Set the admsXml location on the application settings. Усі файли - + Info Інформація diff --git a/translations/qucs_zh_CN.ts b/translations/qucs_zh_CN.ts index d24896362..d5076e9fe 100644 --- a/translations/qucs_zh_CN.ts +++ b/translations/qucs_zh_CN.ts @@ -56,7 +56,12 @@ - + + CI setup, build system, MacOS support + + + + testing, general bugfixes @@ -107,12 +112,7 @@ - - CI setup, build system - - - - + Refactoring, general improvements @@ -551,7 +551,7 @@ 编辑元件属性 - + Sweep 扫描 @@ -563,13 +563,13 @@ - + display in schematic 在原理图中显示 - + Simulation: 仿真 @@ -620,18 +620,18 @@ - + Step: 步进值 - + Number: 点数 - + Properties 属性 @@ -713,26 +713,28 @@ - + - - + + + + yes - - + + - + no - + Select a file 选择文件 @@ -767,7 +769,7 @@ Verilog文件 - + Points per decade: 每十倍频程的点数: @@ -838,7 +840,7 @@ DiagramDialog - + Edit Diagram Properties 编辑图表属性 @@ -1365,18 +1367,18 @@ ExternSimDialog - + Stop 停止 - + Save netlist 保存网表 - + Exit 退出 @@ -1386,12 +1388,12 @@ 在控制台中仿真 - + Simulate with external simulator 使用外部仿真器仿真 - + There were simulation errors. Please check log. 仿真出错,请检查日志 @@ -2132,7 +2134,7 @@ Filter synthesis program 任何文件 - + Error 错误 @@ -2142,7 +2144,7 @@ Filter synthesis program - + Enter a Data File Name 输入数据文件名 @@ -2172,7 +2174,7 @@ Filter synthesis program 错误:未知的文件格式!请检查文件扩展名! - + Running command line: 运行命令行: @@ -2182,7 +2184,7 @@ Filter synthesis program 错误:无法启动转换器! - + Successfully converted file! 文件转换成功! @@ -2833,7 +2835,19 @@ Node name will not be changed. - + + The device is not unconditionally stable: + +K = %1 +|%2| = %3 + +It is not possible to synthesize a matching network. + +Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) + + + + It is not possible to match this load using the double stub method @@ -2842,7 +2856,8 @@ Node name will not be changed. 阻抗(Ω) - + + Error 错误 @@ -3061,82 +3076,82 @@ but is %1 ! - - + + linear double 线性双精度 - - - + + + logarithmic double 对数双精度 - - - + + + linear integer 线性整数 - - + + logarithmic integer 对数整数 - - - + + + E3 series E3系列 - - - + + + E6 series E6系列 - - - + + + E12 series E12系列 - - - + + + E24 series E24系列 - - - + + + E48 series E48系列 - - - + + + E96 series E96系列 - - - + + + E192 series E192系列 - + Add 添加 @@ -3174,47 +3189,47 @@ but is %1 ! - - + + minimize 最小化 - - - + + + maximize 最大化 - - - + + + less 少于 - - - + + + greater 多于 - - - + + + equal 等于 - - + + monitor 监视 - + Goals 目标 @@ -3234,16 +3249,16 @@ but is %1 ! 取消 - + - + yes - + no @@ -3954,13 +3969,13 @@ but is %1 ! bias t - + for transient simulation: inductance in Henry 用于瞬态仿真:电感(H) - + for transient simulation: capacitance in Farad 用于瞬态仿真:电容(F) @@ -3980,7 +3995,7 @@ but is %1 ! - + transfer function scaling factor 传递函数比例因子 @@ -3996,8 +4011,8 @@ but is %1 ! 双极结型晶体管 - - + + npn transistor npn三极管 @@ -4010,7 +4025,7 @@ but is %1 ! - + polarity 极性 @@ -4291,7 +4306,7 @@ but is %1 ! 双极晶体管的默认区域 - + bipolar junction transistor with substrate 带衬底的双极结型晶体管 @@ -4589,13 +4604,13 @@ but is %1 ! - + - + - + @@ -4907,22 +4922,22 @@ Wrong 'component' line format! 求解电路矩阵的方法 - + dc block 直流隔离 - + dc Block 直流隔离 - + dc feed 直流导通 - + dc Feed 直流导通 @@ -4956,7 +4971,7 @@ Wrong 'component' line format! 交叉耦合栅极延迟 - + D-FlipFlop w/ SR 带置位和复位的D触发器 @@ -5152,7 +5167,7 @@ Wrong 'component' line format! 二极管的默认面积 - + Diode 二极管 @@ -6019,18 +6034,18 @@ Wrong 'component' line format! - + current equation 电流方程 - - + + charge equation 电荷方程 - + Equation Defined Device 方程定义设备 @@ -6529,7 +6544,7 @@ Wrong 'component' line format! JFET的默认面积 - + n-JFET n-JFET @@ -7185,7 +7200,7 @@ Wrong 'component' line format! MOS场效应晶体管 - + n-MOSFET n-MOSFET @@ -7203,7 +7218,7 @@ Wrong 'component' line format! 耗尽型MOSFET - + zero-bias threshold voltage 零偏置阈值电压 @@ -7393,7 +7408,15 @@ Wrong 'component' line format! 源结周长 - + + + + + Use global SPICE temperature + + + + MOS field-effect transistor with substrate 带衬底的MOS场效应晶体管 @@ -7716,19 +7739,19 @@ Wrong 'component' line format! - - + + inductance of coil 线圈电感 - - + + coupling factor between coil %1 and coil %2 线圈%1和线圈%2之间的耦合系数 - + N Mutual Inductors N线圈互感器 @@ -8418,19 +8441,19 @@ Wrong 'component' line format! - + parameter equation 参数方程 - + Equation Defined RF Device 方程定义的RF器件 - + RF RF @@ -8595,7 +8618,7 @@ Wrong 'component' line format! 2端口S参数文件 - + file 文件 @@ -8620,7 +8643,7 @@ Wrong 'component' line format! spice - + ERROR: No file name in SPICE component "%1". 错误:SPICE元件中没有文件名"%1" @@ -8641,7 +8664,7 @@ Wrong 'component' line format! 错误:无法转换SPICE文件"%1" - + Info 信息 @@ -8672,7 +8695,7 @@ Wrong 'component' line format! 转换SPICE文件"%1" - + subcircuit 子电路 @@ -8682,7 +8705,7 @@ Wrong 'component' line format! Qucs原理图文件名 - + Subcircuit 子电路 @@ -9097,12 +9120,12 @@ Wrong 'component' line format! 电压控制电压源 - + voltage controlled resistor 压控电阻 - + resistance gain 跨阻增益 @@ -9134,7 +9157,7 @@ Wrong 'component' line format! - + ERROR: No file name in %1 component "%2". 错误:%1元件中没有文件名"%2" @@ -9186,7 +9209,7 @@ Wrong 'component' line format! 基于文件的电压源 - + VHDL file VHDL文件 @@ -9197,13 +9220,13 @@ Wrong 'component' line format! VHDL文件名 - + vhdl VHDL - - + + generic variable 通用变量 @@ -9433,7 +9456,7 @@ Overwrite ? Inkscape启动错误! - + Successfully exported Successfully exported @@ -9451,7 +9474,7 @@ Use PNG, JPEG or SVG graphics! 使用PNG、JPEG或SVG格式! - + Error: Wrong time format in "%1". Use positive number with units 错误:"%1"中的时间格式错误。使用正数和单位 @@ -9459,8 +9482,8 @@ Use PNG, JPEG or SVG graphics! - - + + verilog-a user devices verilog-a用户元件 @@ -9562,16 +9585,16 @@ Use PNG, JPEG or SVG graphics! Qucslegacy设备 - - - + + + diagrams 图表 - + paintings @@ -9583,7 +9606,7 @@ Use PNG, JPEG or SVG graphics! 外部信号元件 - + Edit Properties 编辑属性 @@ -9608,7 +9631,7 @@ Use PNG, JPEG or SVG graphics! 2端口匹配 - + The ground potential cannot be labeled! 接地电位无法标记! @@ -9618,7 +9641,7 @@ Use PNG, JPEG or SVG graphics! 箭头 - + Ellipse 椭圆 @@ -9628,7 +9651,7 @@ Use PNG, JPEG or SVG graphics! 椭圆(实心) - + Edit Ellipse Properties 编辑椭圆属性 @@ -9638,7 +9661,7 @@ Use PNG, JPEG or SVG graphics! 椭圆弧 - + Edit Arc Properties 编辑椭圆弧属性 @@ -9648,7 +9671,7 @@ Use PNG, JPEG or SVG graphics! 线 - + Edit Line Properties 编辑线属性 @@ -9668,7 +9691,7 @@ Use PNG, JPEG or SVG graphics! 矩形(实心) - + Edit Rectangle Properties 编辑矩形属性 @@ -9683,7 +9706,7 @@ Use PNG, JPEG or SVG graphics! 无法创建输出文件! - + Format Error: 'Painting' field is not closed! @@ -9839,8 +9862,8 @@ Wrong 'painting' line format! - - + + @@ -9867,7 +9890,7 @@ Unknown field! 未知的字段! - + ERROR: Component "%1" has no analog model. 错误:组件"%1"没有模拟模型 @@ -10997,7 +11020,7 @@ Leave continuation lines blank when NOT in use. Q(PNP) 5 pin - + The schematic name and dataset/display file name is not matching! This may happen if schematic was copied using the file manager instead of using File->SaveAs. Correct dataset and display names automatically? @@ -11105,24 +11128,24 @@ Leave continuation lines blank when NOT in use. 带Q的电容器 - + The load has not resistive part. It cannot be matched using the quarter wavelength method - + Reactive loads cannot be matched. Only the real part will be matched - + Chebyshev weighting for N>7 is not available N>7的Chebyshev权重不可用 - + The load is reactive. It cannot be matched using the quarter wavelength method @@ -11594,7 +11617,7 @@ Active Filter synthesis program QucsApp - + Schematic 原理图 @@ -11610,47 +11633,47 @@ Active Filter synthesis program - + VHDL Sources VHDL源代码 - - + + Verilog Sources Verilog源代码 - - + + Verilog-A Sources Verilog-A源代码 - - + + Octave Scripts Octave脚本 - + Spice Files SPICE文件 - + Any File 任何文件 - + The schematic search path has been refreshed. 原理图搜索路径已刷新 - + Verilog Verilog @@ -11660,7 +11683,7 @@ Active Filter synthesis program VHDL - + Open file 打开文件 @@ -11670,24 +11693,24 @@ Active Filter synthesis program 文档以只读模式打开!仿真器将无法工作。请将文档复制到您有写入权限的目录! - - + + Simulate schematic 仿真原理图 - + DC bias simulation mode is not supported for digital schematic! 数字原理图不支持直流偏置仿真模式! - + Schematics 原理图 - + New 新建 @@ -11761,7 +11784,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 当前项目内容 - + Search Components 搜索元件 @@ -11798,8 +11821,8 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo Octave窗口 - - + + @@ -11810,29 +11833,29 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - - + + - + - - + + - + - + - + @@ -11841,44 +11864,44 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 错误 - + Cannot open "%1". 无法打开"%1" - + Library is corrupt. 库已损坏 - - - - - - - - - - - + + + + + + + + + + + - + Info 信息 - + Default icon not found: %1.png 默认图标未找到: %1.png - + -port -端口 @@ -11889,14 +11912,14 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + The document contains unsaved changes! 文档包含未保存的更改! - + Do you want to save the changes before copying? 是否要在复制之前保存更改? @@ -11936,17 +11959,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 无法删除一个打开的文件! - - - - - - + + + + + + Warning 警告 - + This will delete the file permanently! Continue ? 这将永久删除该文件!继续吗? @@ -12005,17 +12028,17 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 配置 - + Cannot create work directory ! 无法创建工作目录! - + Cannot create project directory ! 无法创建项目目录! - + Choose Project Directory for Opening 选择要打开的项目的目录 @@ -12025,13 +12048,13 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 未选择项目! - + Cannot delete file: %1 无法删除文件:%1 - - + + @@ -12039,12 +12062,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 搜索结果 - + Search Lib Components 搜索库元件 - + Set simulator 设置仿真器 @@ -12062,12 +12085,12 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 未找到Ngspice。请在指定仿真器的位置 - + Show model 显示模型 - + verilog-a user devices verilog-a用户设备 @@ -12102,7 +12125,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 项目目录名称不以'_prj'结尾(%1) - + Project: 项目: @@ -12111,7 +12134,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 无项目 - + Project directory name does not end in '_prj' (%1) 项目目录的名称不应以'_prj'结尾 (%1) @@ -12147,35 +12170,35 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 创建新的原理图... - - + + + - - + - + - + Ready. 准备 - + Creating new text editor... 创建新的文本编辑器... - - + + Opening file... 打开文件... @@ -12262,7 +12285,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 保存所有文件... - + Closing file... 关闭文件... @@ -12281,7 +12304,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 打开示例目录... - + untitled untitled @@ -12311,7 +12334,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo 在没有图表的情况下调整将没有效果。在原理图上添加至少一个图表 - + Symbol editing supported only for schematics and Verilog-A documents! @@ -12321,7 +12344,7 @@ NOTE: Only QucsatorRF found. This simulator is not recommended for general purpo - + Schematic not saved! Simulation of unsaved schematic not possible. Save schematic first! 原理图未保存!无法仿真未保存的原理图。请先保存原理图! @@ -12353,12 +12376,12 @@ Use subcircuit to crete Verilog-A module! 使用子电路来构建Verilog-A模块! - + The document was modified by another program ! 该文档被另一个程序修改了! - + Open example… @@ -12373,12 +12396,12 @@ Use subcircuit to crete Verilog-A module! - + Do you want to reload or keep this version ? 重新加载还是保留此版本? - + Cannot create 无法创建 @@ -12393,7 +12416,7 @@ Use subcircuit to crete Verilog-A module! 无法启动"%1"! - + Could not load S[1,1]. 无法加载 S[1,1] @@ -12418,7 +12441,7 @@ Use subcircuit to crete Verilog-A module! 错误的依赖! - + Cutting selection... 切割选择... @@ -12428,17 +12451,17 @@ Use subcircuit to crete Verilog-A module! 正在将所选内容复制到剪贴板... - - - - - - + + + + + + At least two elements must be selected ! 必须至少选择两个元素! - + Opening aborted, file not found. 打开中止,找不到文件 @@ -12462,7 +12485,7 @@ Use subcircuit to crete Verilog-A module! 不是原理图的选项卡! - + Cannot start %1 program! (%2) @@ -12544,7 +12567,7 @@ Overwrite ? 无法写入"%1"! - + Please open project with subcircuits! 请打开带有子电路的项目! @@ -12553,7 +12576,7 @@ Overwrite ? 请先打开项目! - + Please select a diagram graph! 请选择一个图表! @@ -12614,7 +12637,7 @@ Have you saved the Verilog-A symbols? OpenVAF窗口 - + &New 新建 @@ -13451,7 +13474,24 @@ Create Library from Subcircuits 从子电路创建库 - + + S-parameter Viewer + + + + + Starts S-parameter viewer + + + + + S-parameter Viewer + +Starts S-parameter viewer + + + + &About Qt @@ -13518,7 +13558,7 @@ Convert data file to various file formats 将数据文件转换为各种文件格式 - + Export to &CSV... 导出为CSV... @@ -13816,7 +13856,7 @@ Rotates the selected component by 90� counter-clockwise - + Power combining Starts power combining calculation program @@ -13907,7 +13947,7 @@ Resets the limits for all axis to auto. 关于Qucs-S... - + Mirror about X Axis 垂直翻转 @@ -14099,12 +14139,11 @@ Inserts a port symbol 导线 - Ctrl+E - Ctrl+E + Ctrl+E - + Inserts a wire 绘制导线 @@ -14310,13 +14349,13 @@ Starts attenuator calculation program 启动QucsAttenuator衰减器设计程序 - - + + Simulate 仿真 - + Simulates the current schematic 仿真当前原理图 @@ -14613,7 +14652,7 @@ About Qt by Trolltech 工具 - + Compact modelling 紧凑型模型 @@ -14700,68 +14739,82 @@ Open QucsAttenuator + &File 文件 + &Quit 退出 + + &Help 帮助 + &About 关于 + About Qt... 关于Qt + Topology 拓扑 + Input 输入 + Attenuation: 衰减: + Pin: + Freq: + Put into Clipboard + R4: + Copyright (C) 2024 by @@ -14771,11 +14824,13 @@ Open + dB dB + Zin: Zin: @@ -14789,6 +14844,7 @@ Open + Zout: Zout: @@ -14798,11 +14854,13 @@ Open + Output 输出 + R1: R1: @@ -14815,16 +14873,26 @@ Open + + + + + + + + -- -- + R2: R2: + R3: R3: @@ -14834,26 +14902,31 @@ Open + Qucs Attenuator Help Qucs Attenuator帮助 + QucsAttenuator is an attenuator synthesis program. To create a attenuator, simply enter all the input parameters and press the calculation button. Immediately, the schematic of the attenuator is calculated and put into the clipboard. Now go to Qucs, open an schematic and press CTRL-V (paste from clipboard). The attenuator schematic can now be inserted. Have lots of fun! + About Qt 关于Qt + About... 关于 + Attenuator synthesis program @@ -14864,6 +14937,8 @@ Attenuator synthesis program + + Copyright (C) 2006 by Copyright (C) 2006 by @@ -14873,6 +14948,7 @@ Attenuator synthesis program + Error: Set Attenuation less than %1 dB 错误:设置衰减小于 %1 dB @@ -16142,6 +16218,134 @@ open files with an appropriate program. 传输线类型不可用 + + Qucs_S_SPAR_Viewer + + + &File + 文件 + + + + &Quit + 退出 + + + + &Open session file + + + + + &Save session as ... + + + + + &Save session + + + + + + &Help + 帮助 + + + + &About + 关于 + + + + About Qt... + 关于Qt + + + + Qucs-S S-parameter Help + + + + + This is a simple viewer for S-parameter data. +It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. + + + + + About Qt + 关于Qt + + + + About... + 关于 + + + + +Copyright (C) 2024 by + + + + + S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) + + + + + + + + Warning + 警告 + + + + This file is already in the dataset. + + + + + This trace is already shown + + + + + + The display contains no traces. + + + + + + Error + 错误 + + + + + Nothing to save: No data was loaded. + + + + + Save session + + + + + + Qucs-S snp viewer session (*.spar); + + + + + Open S-parameter Viewer Session + + + SaveDialog @@ -16183,7 +16387,7 @@ open files with an appropriate program. Schematic - + Title 标题 @@ -16257,12 +16461,12 @@ Edits the symbol for this schematic 编辑此原理图的电路符号 - + generic 通用 - + Error 错误 @@ -16282,7 +16486,7 @@ Set the admsXml location on the application settings. 状态 - + Netlist error 网表错误 @@ -16581,7 +16785,7 @@ Set the admsXml location on the application settings. 错误:无法创建"%1"! - + ERROR: Cannot start 错误:无法启动 @@ -16832,7 +17036,7 @@ Set the admsXml location on the application settings. 所有文件 - + Info 信息 From 925fab1fdfe8be89fcff3bdfad1d7a71cf847d77 Mon Sep 17 00:00:00 2001 From: Anton Midyukov Date: Fri, 1 Nov 2024 05:58:21 +0300 Subject: [PATCH 04/15] Update Russian translation Signed-off-by: Anton Midyukov --- translations/qucs_ru.ts | 80 +++++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/translations/qucs_ru.ts b/translations/qucs_ru.ts index 964241266..a35727e26 100644 --- a/translations/qucs_ru.ts +++ b/translations/qucs_ru.ts @@ -1,6 +1,6 @@ - + AboutDialog @@ -58,7 +58,7 @@ CI setup, build system, MacOS support - + Настройка CI, система сборки, поддержка MacOS @@ -1081,7 +1081,7 @@ Grid Style: - Стиль сетки: + Стиль сетки: @@ -2624,7 +2624,7 @@ Node name will not be changed. Load Verilog-A symbols - Загрузить обозначения Verilog-A... + Загрузить обозначения Verilog-A @@ -3013,7 +3013,14 @@ K = %1 It is not possible to synthesize a matching network. Consider adding resistive losses and/or feedback to reach unconditional stability (K > 1 and |%2| < 1) - + Устройство не является безусловно устойчивым: + +K = %1 +|%2| = %3 + +Невозможно синтезировать соответствующую сеть. + +Рассмотрите возможность добавления резистивных потерь и/или обратной связи для достижения безусловной устойчивости (K > 1 и |%2| < 1) @@ -7844,7 +7851,7 @@ Wrong 'component' line format! Use global SPICE temperature - + Использовать глобальную температуру SPICE @@ -14121,19 +14128,21 @@ Create Library from Subcircuits S-parameter Viewer - + Просмотрщик S-параметров Starts S-parameter viewer - + Запускает просмотрщик S-параметров S-parameter Viewer Starts S-parameter viewer - + Просмотрщик S-параметров + +Запускает просмотрщик S-параметров @@ -15658,7 +15667,7 @@ Attenuator synthesis program Copyright (C) 2006 by - Copyright (C) 2006 + Copyright (C) 2006 Success! @@ -15916,7 +15925,7 @@ Filter synthesis program Copyright (C) 2005, 2006 by - Copyright (C) 2005, 2006 + Copyright (C) 2005, 2006 @@ -17116,7 +17125,6 @@ open files with an appropriate program. Copyright (C) 2008 by Michael Margraf Copyright (C) 2008 Michael Margraf - @@ -17199,75 +17207,77 @@ open files with an appropriate program. &File - &Файл + &Файл &Quit - &Выход + &Выход &Open session file - + &Открыть файл сеанса &Save session as ... - + &Cохранить сеанс как... &Save session - + &Cохранить сеанс &Help - &Справка + &Справка &About - &О программе + &О программе About Qt... - О Qt... + О Qt... Qucs-S S-parameter Help - + Помощь по S-параметрам Qucs-S This is a simple viewer for S-parameter data. It can show several .snp files at a time in the same diagram. Trace markers can also be added so that the user can read the trace value at at an specific frequency. - + Это простой просмотрщик данных S-параметров. +Он может отображать несколько файлов .snp одновременно на одной диаграмме. Также можно добавлять маркеры трассировки, чтобы пользователь мог считывать значение трассировки на определенной частоте. About Qt - О Qt + О Qt About... - О... + О... Copyright (C) 2024 by - + +Copyright (C) 2024 S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*) - + Файлы S-параметров (*.s1p *.s2p *.s3p *.s4p);;Все файлы (*.*) @@ -17275,51 +17285,51 @@ Copyright (C) 2024 by Warning - Предупреждение + Предупреждение This file is already in the dataset. - + Этот файл уже есть в наборе данных. This trace is already shown - + Эта трассировка уже показана The display contains no traces. - + Экран не содержит трассировок. Error - Ошибка + Ошибка Nothing to save: No data was loaded. - + Нечего сохранять: данные не загружены. Save session - + Cохранить сеанс Qucs-S snp viewer session (*.spar); - + Сеанс просмотра Qucs-S snp (*.spar); Open S-parameter Viewer Session - + Открыть сеанс просмотра S-параметров From beaed2596fa9794ec5073e80bd6592e449224bf3 Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Fri, 1 Nov 2024 08:57:17 +0300 Subject: [PATCH 05/15] Fix hardcoded version in Cauer LC filter --- qucs-filter/qf_filter.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qucs-filter/qf_filter.cpp b/qucs-filter/qf_filter.cpp index 668c88374..2c0592e84 100644 --- a/qucs-filter/qf_filter.cpp +++ b/qucs-filter/qf_filter.cpp @@ -14,6 +14,10 @@ * (at your option) any later version. * * * ***************************************************************************/ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include #include @@ -271,7 +275,7 @@ QString filter::to_qucs() { wires += QString("<%1 200 %1 260 \"\" 0 0 0>\n").arg(x); QString s = ""; - s += "\n"; + s += QString("\n"); s += "\n"; s += compos; From af80d21a229c0d6a86282027d3c4131c8f3cd8b4 Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Fri, 1 Nov 2024 17:46:52 +0300 Subject: [PATCH 06/15] Fix continous build version in deploy.yml --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4b1240148..ba3217a20 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,7 +11,7 @@ on: env: APP_NAME: "Qucs-S" - CI_VERSION: 24.3.99 + CI_VERSION: 24.4.99 EXECUTABLE_NAME: "qucs-s" PUBLISHER_NAME: "The Qucs-S Team" BUILD_TYPE: Release From b6fbdcefca723372998110b254d35a1b6426b507 Mon Sep 17 00:00:00 2001 From: Iwbnwif Yiw Date: Sat, 2 Nov 2024 18:39:31 +0000 Subject: [PATCH 07/15] Introduce bound line edit and use it to provide the component name functionality. --- qucs/components/componentdialog.cpp | 734 +++++++++++++++------------- qucs/components/componentdialog.h | 16 +- 2 files changed, 410 insertions(+), 340 deletions(-) diff --git a/qucs/components/componentdialog.cpp b/qucs/components/componentdialog.cpp index 0562e78dc..ac60477cf 100644 --- a/qucs/components/componentdialog.cpp +++ b/qucs/components/componentdialog.cpp @@ -39,32 +39,89 @@ #include #include -ComponentDialog::ComponentDialog(Component *c, Schematic *d) - : QDialog(d) + +// Convenience base class to add a label, name, checkbox and bind them to a variable. +class BoundControl +{ + public: + BoundControl(const QString& label, bool& boundCheck, QValidator* validator, QVBoxLayout* layout) + { + mpValidator = validator; + mpParentLayout = layout; + + mpShowNameCheck = new QCheckBox("display in schematic"); + + // qDebug() << layout->metaObject()->className(); + + // Either add widgets to a new QHBoxLayout or to an existing QGridLayout. + if (layout->metaObject()->className() != QString("QGridLayout")) + { + mpBoundLayout = new QHBoxLayout; + mpBoundLayout->setSpacing(5); + mpParentLayout->addLayout(mpBoundLayout); + + // Add a label if a string is provided. + if (!label.isEmpty()) + mpBoundLayout->addWidget(new QLabel(label)); + + // Add the show parameter checkbox. + mpShowNameCheck->setCheckState(boundCheck ? Qt::Checked : Qt::Unchecked); + mpBoundLayout->addWidget(mpShowNameCheck); + } + } + + protected: + QValidator* mpValidator; + QVBoxLayout* mpParentLayout; + QHBoxLayout* mpBoundLayout = nullptr; + QCheckBox* mpShowNameCheck; +}; + +// Line edit version of bound control. Has label | line | checkbox. +class BoundLineEdit : public QLineEdit, BoundControl { - // qDebug() << "Restore: " << _settings::Get().value("ComponentDialog/geometry").toByteArray(); - // qDebug() << "Settings: " << _settings::Get().organizationName() << " " << _settings::Get().applicationName(); - // qDebug() << "Default test (found)" << _settings::Get().item("Foo"); - // qDebug() << "Default test (not found int type)" << _settings::Get().item("Bar"); - // qDebug() << "Default test (found wrong type)" << _settings::Get().item("Foo"); - // qDebug() << "Default test (not found string type)" << _settings::Get().item("Bar"); + public: + BoundLineEdit(const QString& label, QString& boundValue, bool& boundCheck, + QVBoxLayout* layout, QValidator* validator = nullptr) + : BoundControl(label, boundCheck, validator, layout) + { + if (validator) + setValidator(validator); + + if (mpBoundLayout) + mpBoundLayout->insertWidget(1, this); + + else + mpParentLayout->addWidget(this); + + setText(boundValue); + + // Update the bound values whenever the user makes a change. + connect(this, &QLineEdit::textChanged, [&boundValue](const QString& text) { boundValue = text; }); + connect(mpShowNameCheck, &QCheckBox::stateChanged, [&boundCheck](int state) mutable { boundCheck = state; }); + } +}; + +ComponentDialog::ComponentDialog(Component* component, Schematic* document) + : QDialog(document), localComponent(*component) +{ + m_pComponent = component; + m_pDocument = document; + + restoreGeometry(_settings::Get().item("ComponentDialog/geometry")); + setWindowTitle(tr("Edit Component Properties") + " - " + m_pComponent->Description.toUpper()); - setWindowTitle(tr("Edit Component Properties")); - Comp = c; - Doc = d; - QString s; + // TODO: Get rid of these setAllVisible = true; // state when toggling properties visibility - compIsSimulation = false; - all = new QVBoxLayout; // to provide necessary size - this->setLayout(all); - all->setContentsMargins(1,1,1,1); - QGridLayout *gp1; + // Setup dialog layout. + QVBoxLayout* mainLayout = new QVBoxLayout(this); + QGridLayout* propertiesPageLayout; + // Setup validators. ValInteger = new QIntValidator(1, 1000000, this); - Expr.setPattern("[^\"=]*"); // valid expression for property 'edit' Validator = new QRegularExpressionValidator(Expr, this); Expr.setPattern("[^\"]*"); // valid expression for property 'edit' @@ -74,141 +131,157 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d) Expr.setPattern("[A-Za-z][A-Za-z0-9_]+"); ValName = new QRegularExpressionValidator(Expr,this); + mpNameLineEdit = new BoundLineEdit("Name:", localComponent.Name, localComponent.showName, mainLayout, Validator); + + changed = false; + + // TODO: Get rid of these checkSim = nullptr; comboSim = nullptr; comboType = nullptr; checkParam = nullptr; editStart = nullptr; editStop = nullptr; editNumber = nullptr; - // last property shown elsewhere outside the properties table, not to put in TableView - auto pp = Comp->Props.begin(); + // last property shown elsewhere outside the properties table, not to put in TableView ? + auto pp = m_pComponent->Props.begin(); // ........................................................... // if simulation component: .TR, .AC, .SW, (.SP ?) - if((Comp->Model[0] == '.') && - (Comp->Model != ".DC") && (Comp->Model != ".HB") && - (Comp->Model != ".Digi") && (Comp->Model != ".ETR") && - (Comp->Model != ".FOURIER") && (Comp->Model != ".FFT") && - (Comp->Model != ".PZ") && (Comp->Model != ".SENS") && - (Comp->Model != ".SENS_AC") && (Comp->Model != ".SENS_XYCE") && - (Comp->Model != ".SENS_TR_XYCE")) { + // if((m_pComponent->Model[0] == '.') && + // (m_pComponent->Model != ".DC") && (m_pComponent->Model != ".HB") && + // (m_pComponent->Model != ".Digi") && (m_pComponent->Model != ".ETR") && + // (m_pComponent->Model != ".FOURIER") && (m_pComponent->Model != ".FFT") && + // (m_pComponent->Model != ".PZ") && (m_pComponent->Model != ".SENS") && + // (m_pComponent->Model != ".SENS_AC") && (m_pComponent->Model != ".SENS_XYCE") && + // (m_pComponent->Model != ".SENS_TR_XYCE")) + + // { + + if (m_pComponent->isSimulation && + (m_pComponent->Model == ".SW" || + m_pComponent->Model == ".SW" || + m_pComponent->Model == ".AC")) + { + // TODO: Get rid of this compIsSimulation = true; - QTabWidget *t = new QTabWidget(this); - all->addWidget(t); - QWidget *Tab1 = new QWidget(t); - t->addTab(Tab1, tr("Sweep")); - QGridLayout *gp = new QGridLayout; - Tab1->setLayout(gp); + // Create tab widget to hold both sweep and parameter pages. + QTabWidget* pageTabs = new QTabWidget(this); + layout()->addWidget(pageTabs); - gp->addWidget(new QLabel(Comp->Description, Tab1), 0,0,1,2); + // Simulations have a separate sweep page. + QWidget* sweepPage = new QWidget(pageTabs); + pageTabs->addTab(sweepPage, tr("Sweep")); + QGridLayout* sweepPageLayout = new QGridLayout; + sweepPage->setLayout(sweepPageLayout); int row=1; - editParam = new QLineEdit(Tab1); - if (Comp->Model != ".SW") editParam->setValidator(ValRestrict); + editParam = new QLineEdit(sweepPage); + if (m_pComponent->Model != ".SW") editParam->setValidator(ValRestrict); connect(editParam, SIGNAL(returnPressed()), SLOT(slotParamEntered())); - checkParam = new QCheckBox(tr("display in schematic"), Tab1); + checkParam = new QCheckBox(tr("display in schematic"), sweepPage); - if(Comp->Model == ".SW") { // parameter sweep - textSim = new QLabel(tr("Simulation:"), Tab1); - gp->addWidget(textSim, row,0); - comboSim = new QComboBox(Tab1); + if(m_pComponent->Model == ".SW") { // parameter sweep + textSim = new QLabel(tr("Simulation:"), sweepPage); + sweepPageLayout->addWidget(textSim, row,0); + comboSim = new QComboBox(sweepPage); comboSim->setEditable(true); connect(comboSim, SIGNAL(activated(int)), SLOT(slotSimEntered(int))); - gp->addWidget(comboSim, row,1); - checkSim = new QCheckBox(tr("display in schematic"), Tab1); - gp->addWidget(checkSim, row++,2); + sweepPageLayout->addWidget(comboSim, row,1); + checkSim = new QCheckBox(tr("display in schematic"), sweepPage); + sweepPageLayout->addWidget(checkSim, row++,2); } else { editParam->setReadOnly(true); checkParam->setDisabled(true); - if(Comp->Model == ".TR") // transient simulation ? + if(m_pComponent->Model == ".TR") // transient simulation ? editParam->setText("time"); else { - if(Comp->Model == ".AC") // AC simulation ? + if(m_pComponent->Model == ".AC") // AC simulation ? editParam->setText("acfrequency"); else editParam->setText("frequency"); } } - gp->addWidget(new QLabel(tr("Sweep Parameter:"), Tab1), row,0); - gp->addWidget(editParam, row,1); - gp->addWidget(checkParam, row++,2); + sweepPageLayout->addWidget(new QLabel(tr("Sweep Parameter:"), sweepPage), row,0); + sweepPageLayout->addWidget(editParam, row,1); + sweepPageLayout->addWidget(checkParam, row++,2); - textType = new QLabel(tr("Type:"), Tab1); - gp->addWidget(textType, row,0); - comboType = new QComboBox(Tab1); - - QStringList sweeptypes; - sweeptypes << tr("linear") - << tr("logarithmic") - << tr("list") - << tr("constant"); - comboType->insertItems(0, sweeptypes); + textType = new QLabel(tr("Type:"), sweepPage); + sweepPageLayout->addWidget(textType, row,0); + + comboType = new QComboBox(sweepPage); + comboType->insertItems(0, QStringList({"linear", "logarithmic", "list", "constant"})); - gp->addWidget(comboType, row,1); + sweepPageLayout->addWidget(comboType, row,1); connect(comboType, SIGNAL(activated(int)), SLOT(slotSimTypeChange(int))); - checkType = new QCheckBox(tr("display in schematic"), Tab1); - gp->addWidget(checkType, row++,2); + checkType = new QCheckBox(tr("display in schematic"), sweepPage); + sweepPageLayout->addWidget(checkType, row++,2); - textValues = new QLabel(tr("Values:"), Tab1); - gp->addWidget(textValues, row,0); - editValues = new QLineEdit(Tab1); + textValues = new QLabel(tr("Values:"), sweepPage); + sweepPageLayout->addWidget(textValues, row,0); + editValues = new QLineEdit(sweepPage); editValues->setValidator(Validator); connect(editValues, SIGNAL(returnPressed()), SLOT(slotValuesEntered())); - gp->addWidget(editValues, row,1); - checkValues = new QCheckBox(tr("display in schematic"), Tab1); - gp->addWidget(checkValues, row++,2); + sweepPageLayout->addWidget(editValues, row,1); + checkValues = new QCheckBox(tr("display in schematic"), sweepPage); + sweepPageLayout->addWidget(checkValues, row++,2); - textStart = new QLabel(tr("Start:"), Tab1); - gp->addWidget(textStart, row,0); - editStart = new QLineEdit(Tab1); + textStart = new QLabel(tr("Start:"), sweepPage); + sweepPageLayout->addWidget(textStart, row,0); + editStart = new QLineEdit(sweepPage); editStart->setValidator(Validator); connect(editStart, SIGNAL(returnPressed()), SLOT(slotStartEntered())); - gp->addWidget(editStart, row,1); - checkStart = new QCheckBox(tr("display in schematic"), Tab1); - gp->addWidget(checkStart, row++,2); + sweepPageLayout->addWidget(editStart, row,1); + checkStart = new QCheckBox(tr("display in schematic"), sweepPage); + sweepPageLayout->addWidget(checkStart, row++,2); - textStop = new QLabel(tr("Stop:"), Tab1); - gp->addWidget(textStop, row,0); - editStop = new QLineEdit(Tab1); + textStop = new QLabel(tr("Stop:"), sweepPage); + sweepPageLayout->addWidget(textStop, row,0); + editStop = new QLineEdit(sweepPage); editStop->setValidator(Validator); connect(editStop, SIGNAL(returnPressed()), SLOT(slotStopEntered())); - gp->addWidget(editStop, row,1); - checkStop = new QCheckBox(tr("display in schematic"), Tab1); - gp->addWidget(checkStop, row++,2); + sweepPageLayout->addWidget(editStop, row,1); + checkStop = new QCheckBox(tr("display in schematic"), sweepPage); + sweepPageLayout->addWidget(checkStop, row++,2); - textStep = new QLabel(tr("Step:"), Tab1); - gp->addWidget(textStep, row,0); - editStep = new QLineEdit(Tab1); + textStep = new QLabel(tr("Step:"), sweepPage); + sweepPageLayout->addWidget(textStep, row,0); + editStep = new QLineEdit(sweepPage); editStep->setValidator(Validator); connect(editStep, SIGNAL(returnPressed()), SLOT(slotStepEntered())); - gp->addWidget(editStep, row++,1); + sweepPageLayout->addWidget(editStep, row++,1); - textNumber = new QLabel(tr("Number:"), Tab1); - gp->addWidget(textNumber, row,0); - editNumber = new QLineEdit(Tab1); + textNumber = new QLabel(tr("Number:"), sweepPage); + sweepPageLayout->addWidget(textNumber, row,0); + editNumber = new QLineEdit(sweepPage); editNumber->setValidator(ValInteger); connect(editNumber, SIGNAL(returnPressed()), SLOT(slotNumberEntered())); - gp->addWidget(editNumber, row,1); - checkNumber = new QCheckBox(tr("display in schematic"), Tab1); - gp->addWidget(checkNumber, row++,2); - - - if(Comp->Model == ".SW") { // parameter sweep - Component *pc; - for(pc=Doc->Components->first(); pc!=0; pc=Doc->Components->next()) { - // insert all schematic available simulations in the Simulation combo box - if(pc != Comp) - if(pc->Model[0] == '.') - comboSim->insertItem(comboSim->count(), pc->Name); + sweepPageLayout->addWidget(editNumber, row,1); + checkNumber = new QCheckBox(tr("display in schematic"), sweepPage); + sweepPageLayout->addWidget(checkNumber, row++,2); + + + // TODO: Get rid of this. + QString s; + + // Parameter sweep. + if(m_pComponent->Model == ".SW") + { + // Add all sweep components (starting with a .) to the combo box. + Component* component; + for (component = m_pDocument->Components->first(); component != 0; m_pDocument->Components->next()) + { + if (component != m_pComponent && component->Model[0] == '.') + comboSim->insertItem(comboSim->count(), component->Name); } + qDebug() << "[]" << (*pp)->Value; // set selected simulations in combo box to the currently used one int i = comboSim->findText((*pp)->Value); if (i != -1) // current simulation is in the available simulations list (normal case) - comboSim->setCurrentIndex(i); + comboSim->setCurrentIndex(i); else // current simulation not in the available simulations list comboSim->setEditText((*pp)->Value); @@ -274,43 +347,25 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d) connect(checkStop, SIGNAL(stateChanged(int)), SLOT(slotSetChanged(int))); connect(checkNumber, SIGNAL(stateChanged(int)), SLOT(slotSetChanged(int)));*/ - - QWidget *tabProperties = new QWidget(t); - t->addTab(tabProperties, tr("Properties")); - //gp1 = new QGridLayout(tabProperties, 9,2,5,5); - gp1 = new QGridLayout(tabProperties); + // Create the properties page and add it to the tab widget. + QWidget* propertiesPage = new QWidget(pageTabs); + pageTabs->addTab(propertiesPage, tr("Properties")); + propertiesPageLayout = new QGridLayout(propertiesPage); } - else { // no simulation component - //gp1 = new QGridLayout(0, 9,2,5,5); - gp1 = new QGridLayout(); - all->addLayout(gp1); + + else + { + // If this component does not have sweep settings, add properties directly to the dialog itself. + propertiesPageLayout = new QGridLayout(this); + static_cast(layout())->addLayout(propertiesPageLayout); } - // ........................................................... - gp1->addWidget(new QLabel(Comp->Description), 0,0,1,2); - - QHBoxLayout *h5 = new QHBoxLayout; - h5->setSpacing(5); - - h5->addWidget(new QLabel(tr("Name:")) ); - - CompNameEdit = new QLineEdit; - h5->addWidget(CompNameEdit); - - CompNameEdit->setValidator(ValName); - connect(CompNameEdit, SIGNAL(returnPressed()), SLOT(slotButtOK())); - - showName = new QCheckBox(tr("display in schematic")); - h5->addWidget(showName); - - QWidget *hTop = new QWidget; - hTop->setLayout(h5); + // Create the properties matrix (table). - gp1->addWidget(hTop,1,0); QGroupBox *PropertyBox = new QGroupBox(tr("Properties")); - gp1->addWidget(PropertyBox,2,0); + propertiesPageLayout->addWidget(PropertyBox,2,0); // H layout inside the GroupBox QHBoxLayout *hProps = new QHBoxLayout; @@ -322,19 +377,19 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d) vboxPropsL->setLayout(vL); /// \todo column min width - prop = new QTableWidget(0,4); //initialize - vL->addWidget(prop); - prop->verticalHeader()->setVisible(false); - prop->setSelectionBehavior(QAbstractItemView::SelectRows); - prop->setSelectionMode(QAbstractItemView::SingleSelection); - prop->setMinimumSize(200, 150); - prop->horizontalHeader()->setStretchLastSection(true); + m_pPropertyTable = new QTableWidget(0,4); //initialize + vL->addWidget(m_pPropertyTable); + m_pPropertyTable->verticalHeader()->setVisible(false); + m_pPropertyTable->setSelectionBehavior(QAbstractItemView::SelectRows); + m_pPropertyTable->setSelectionMode(QAbstractItemView::SingleSelection); + m_pPropertyTable->setMinimumSize(200, 150); + m_pPropertyTable->horizontalHeader()->setStretchLastSection(true); // set automatic resize so all content will be visible, // horizontal scrollbar will appear if table becomes too large - prop->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); - prop->horizontalHeader()->setSectionsClickable(false); // no action when clicking on the header + m_pPropertyTable->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); + m_pPropertyTable->horizontalHeader()->setSectionsClickable(false); // no action when clicking on the header - connect(prop->horizontalHeader(),SIGNAL(sectionDoubleClicked(int)), + connect(m_pPropertyTable->horizontalHeader(),SIGNAL(sectionDoubleClicked(int)), this, SLOT(slotHHeaderClicked(int))); QStringList headers; @@ -342,7 +397,7 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d) << tr("Value") << tr("display") << tr("Description"); - prop->setHorizontalHeaderLabels(headers); + m_pPropertyTable->setHorizontalHeaderLabels(headers); // right pane QWidget *vboxPropsR = new QWidget; @@ -424,7 +479,7 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d) QStringList allowedFillFromSPICE; allowedFillFromSPICE<<"_BJT"<<"JFET"<<"MOSFET"<<"_MOSFET"<<"Diode"<<"BJT"; ButtFillFromSpice = new QPushButton(tr("Fill from SPICE .MODEL")); - if (!allowedFillFromSPICE.contains(Comp->Model)) { + if (!allowedFillFromSPICE.contains(m_pComponent->Model)) { ButtFillFromSpice->setEnabled(false); } bg->addWidget(ButtFillFromSpice,2,0,1,2); @@ -435,7 +490,7 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d) QWidget * hbox2 = new QWidget; hbox2->setLayout(h2); h2->setSpacing(5); - all->addWidget(hbox2); + layout()->addWidget(hbox2); QPushButton *ok = new QPushButton(tr("OK")); QPushButton *apply = new QPushButton(tr("Apply")); QPushButton *cancel = new QPushButton(tr("Cancel")); @@ -447,66 +502,78 @@ ComponentDialog::ComponentDialog(Component *c, Schematic *d) connect(cancel, SIGNAL(clicked()), SLOT(slotButtCancel())); // ------------------------------------------------------------ - CompNameEdit->setText(Comp->Name); - showName->setChecked(Comp->showName); - changed = false; - Comp->textSize(tx_Dist, ty_Dist); - int tmp = Comp->tx+tx_Dist - Comp->x1; + + m_pComponent->textSize(tx_Dist, ty_Dist); + int tmp = m_pComponent->tx+tx_Dist - m_pComponent->x1; if((tmp > 0) || (tmp < -6)) tx_Dist = 0; // remember the text position - tmp = Comp->ty+ty_Dist - Comp->y1; + tmp = m_pComponent->ty+ty_Dist - m_pComponent->y1; if((tmp > 0) || (tmp < -6)) ty_Dist = 0; - /*! Insert all \a Comp properties into the dialog \a prop list */ + /*! Insert all \a m_pComponent properties into the dialog \a m_pPropertyTable list */ int row=0; // row counter - for(auto p = pp; p != Comp->Props.end(); ++p) { + for(auto p = pp; p != m_pComponent->Props.end(); ++p) { // do not insert if already on first tab // this is the reason it was originally from back to front... // the 'pp' is the lasted property stepped over while filling the Swep tab // if(p == pp) // break; + + QString yesno; if((*p)->display) - s = tr("yes"); + yesno = tr("yes"); else - s = tr("no"); + yesno = tr("no"); // add Props into TableWidget - qDebug() << " Loading Comp->Props :" << (*p)->Name << (*p)->Value << (*p)->display << (*p)->Description ; + qDebug() << " Loading m_pComponent->Props :" << (*p)->Name << (*p)->Value << (*p)->display << (*p)->Description ; + + m_pPropertyTable->setRowCount(m_pPropertyTable->rowCount()+1); + + /* + m_pPropertyTable->setCellWidget(row, 0, new QLineEdit); - prop->setRowCount(prop->rowCount()+1); + QStringList lines; + lines << "First" << "Second" << "Third"; + + QComboBox* options = new QComboBox(); + options->addItems(lines); + + m_pPropertyTable->setCellWidget(row, 1, options); + */ QTableWidgetItem *cell; cell = new QTableWidgetItem((*p)->Name); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - prop->setItem(row, 0, cell); + m_pPropertyTable->setItem(row, 0, cell); cell = new QTableWidgetItem((*p)->Value); + cell->setCheckState(Qt::Checked); + // cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); + m_pPropertyTable->setItem(row, 1, cell); + cell = new QTableWidgetItem(yesno); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - prop->setItem(row, 1, cell); - cell = new QTableWidgetItem(s); - cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - prop->setItem(row, 2, cell); + m_pPropertyTable->setItem(row, 2, cell); cell = new QTableWidgetItem((*p)->Description); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - prop->setItem(row, 3, cell); + m_pPropertyTable->setItem(row, 3, cell); row++; } - if(prop->rowCount() > 0) { - prop->setCurrentItem(prop->item(0,0)); - slotSelectProperty(prop->item(0,0)); + if(m_pPropertyTable->rowCount() > 0) { + m_pPropertyTable->setCurrentItem(m_pPropertyTable->item(0,0)); + slotSelectProperty(m_pPropertyTable->item(0,0)); } - /// \todo add key up/down browse and select prop - connect(prop, SIGNAL(itemClicked(QTableWidgetItem*)), + /// \todo add key up/down browse and select m_pPropertyTable + connect(m_pPropertyTable, SIGNAL(itemClicked(QTableWidgetItem*)), SLOT(slotSelectProperty(QTableWidgetItem*))); } ComponentDialog::~ComponentDialog() { - delete all; delete Validator; delete Validator2; delete ValRestrict; @@ -537,10 +604,10 @@ void ComponentDialog::updateCompPropsList() int last_prop=0; // last property not to put in ListView // ........................................................... // if simulation component: .TR, .AC, .SW, (.SP ?) - if((Comp->Model[0] == '.') && - (Comp->Model != ".DC") && (Comp->Model != ".HB") && - (Comp->Model != ".Digi") && (Comp->Model != ".ETR")) { - if(Comp->Model == ".SW") { // parameter sweep + if((m_pComponent->Model[0] == '.') && + (m_pComponent->Model != ".DC") && (m_pComponent->Model != ".HB") && + (m_pComponent->Model != ".Digi") && (m_pComponent->Model != ".ETR")) { + if(m_pComponent->Model == ".SW") { // parameter sweep last_prop = 2; } else { last_prop = 0; @@ -550,8 +617,8 @@ void ComponentDialog::updateCompPropsList() QString s; int row=0; // row counter - //for(Property *p = Comp->Props.first(); p != 0; p = Comp->Props.next()) { - auto &p = Comp->Props; + //for(Property *p = m_pComponent->Props.first(); p != 0; p = m_pComponent->Props.next()) { + auto &p = m_pComponent->Props; for(int i = last_prop; i< p.size();i++) { // do not insert if already on first tab @@ -565,36 +632,36 @@ void ComponentDialog::updateCompPropsList() s = tr("no"); // add Props into TableWidget - qDebug() << " Loading Comp->Props :" << p.at(i)->Name << p.at(i)->Value << p.at(i)->display << p.at(i)->Description ; + qDebug() << " Loading m_pComponent->Props :" << p.at(i)->Name << p.at(i)->Value << p.at(i)->display << p.at(i)->Description ; - if (row > prop->rowCount()-1) { // Add new rows - prop->setRowCount(prop->rowCount()+1); + if (row > m_pPropertyTable->rowCount()-1) { // Add new rows + m_pPropertyTable->setRowCount(m_pPropertyTable->rowCount()+1); } QTableWidgetItem *cell; cell = new QTableWidgetItem(p.at(i)->Name); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - prop->setItem(row, 0, cell); + m_pPropertyTable->setItem(row, 0, cell); cell = new QTableWidgetItem(p.at(i)->Value); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - prop->setItem(row, 1, cell); + m_pPropertyTable->setItem(row, 1, cell); cell = new QTableWidgetItem(s); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - prop->setItem(row, 2, cell); + m_pPropertyTable->setItem(row, 2, cell); cell = new QTableWidgetItem(p.at(i)->Description); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - prop->setItem(row, 3, cell); + m_pPropertyTable->setItem(row, 3, cell); row++; } - if(prop->rowCount() > 0) { - prop->setCurrentItem(prop->item(0,0)); - slotSelectProperty(prop->item(0,0)); + if(m_pPropertyTable->rowCount() > 0) { + m_pPropertyTable->setCurrentItem(m_pPropertyTable->item(0,0)); + slotSelectProperty(m_pPropertyTable->item(0,0)); } - if (row < prop->rowCount()-1) { - prop->setRowCount(row); + if (row < m_pPropertyTable->rowCount()-1) { + m_pPropertyTable->setRowCount(row); } } @@ -609,10 +676,10 @@ void ComponentDialog::slotSelectProperty(QTableWidgetItem *item) qDebug() << "row " << item->row(); //<< item->text() - QString name = prop->item(item->row(),0)->text(); - QString value = prop->item(item->row(),1)->text(); - QString show = prop->item(item->row(),2)->text(); - QString desc = prop->item(item->row(),3)->text(); + QString name = m_pPropertyTable->item(item->row(),0)->text(); + QString value = m_pPropertyTable->item(item->row(),1)->text(); + QString show = m_pPropertyTable->item(item->row(),2)->text(); + QString desc = m_pPropertyTable->item(item->row(),3)->text(); if(show == tr("yes")) disp->setChecked(true); @@ -639,7 +706,7 @@ void ComponentDialog::slotSelectProperty(QTableWidgetItem *item) eqns_mods<<"Eqn"<<"SpicePar"<<"SpGlobPar" <<"SpiceIC"<<"SpiceNodeset"<<"NutmegEq"; // enable Up/Down buttons only for the Equation component - if (eqns_mods.contains(Comp->Model)) { + if (eqns_mods.contains(m_pComponent->Model)) { ButtUp->setEnabled(true); ButtDown->setEnabled(true); } @@ -706,7 +773,7 @@ void ComponentDialog::slotSelectProperty(QTableWidgetItem *item) desc = desc.left(desc.length()-5) + "...."; } - if (Comp->SpiceModel == "NutmegEq" && name == "Simulation") { // simulation selection required + if (m_pComponent->SpiceModel == "NutmegEq" && name == "Simulation") { // simulation selection required List = getSimulationList(); } @@ -738,7 +805,7 @@ void ComponentDialog::slotApplyChange(int idx) { /// \bug what if the table have no items? // pick selected row - QList items = prop->selectedItems(); + QList items = m_pPropertyTable->selectedItems(); Q_ASSERT(!items.isEmpty()); QTableWidgetItem *item = items.first(); @@ -747,14 +814,14 @@ void ComponentDialog::slotApplyChange(int idx) auto Text = ComboEdit->itemText(idx); edit->setText(Text); // apply edit line - prop->item(row, 1)->setText(Text); + m_pPropertyTable->item(row, 1)->setText(Text); ComboEdit->setFocus(); // step to next item if not at the last line - if ( row < (prop->rowCount() - 1)) { - prop->setCurrentItem(prop->item(row+1,0)); - slotSelectProperty(prop->item(row+1,0)); + if ( row < (m_pPropertyTable->rowCount() - 1)) { + m_pPropertyTable->setCurrentItem(m_pPropertyTable->item(row+1,0)); + slotSelectProperty(m_pPropertyTable->item(row+1,0)); } } @@ -766,15 +833,15 @@ void ComponentDialog::slotApplyChange(int idx) void ComponentDialog::slotApplyProperty() { // pick selected row - QTableWidgetItem *item = prop->currentItem(); + QTableWidgetItem *item = m_pPropertyTable->currentItem(); if(!item) return; int row = item->row(); - QString name = prop->item(row, 0)->text(); - QString value = prop->item(row, 1)->text(); + QString name = m_pPropertyTable->item(row, 0)->text(); + QString value = m_pPropertyTable->item(row, 1)->text(); @@ -783,7 +850,7 @@ void ComponentDialog::slotApplyProperty() // apply edit line if(value != edit->text()) { - prop->item(row, 1)->setText(edit->text()); + m_pPropertyTable->item(row, 1)->setText(edit->text()); } if (!NameEdit->isHidden()) // also apply property name ? @@ -792,13 +859,13 @@ void ComponentDialog::slotApplyProperty() // item->setText(0, "Export_"); // name must not be "Export" !!! // else // item->setText(0, NameEdit->text()); // apply property name - prop->item(row, 0)->setText(NameEdit->text()); + m_pPropertyTable->item(row, 0)->setText(NameEdit->text()); } // step to next item - if ( row < prop->rowCount()-1) { - prop->setCurrentItem(prop->item(row+1,0)); - slotSelectProperty(prop->item(row+1,0)); + if ( row < m_pPropertyTable->rowCount()-1) { + m_pPropertyTable->setCurrentItem(m_pPropertyTable->item(row+1,0)); + slotSelectProperty(m_pPropertyTable->item(row+1,0)); } else { slotButtOK(); // close dialog, if it was the last property @@ -811,10 +878,10 @@ void ComponentDialog::slotApplyProperty() void ComponentDialog::slotApplyPropName() { // pick selected row - QTableWidgetItem *item = prop->selectedItems()[0]; + QTableWidgetItem *item = m_pPropertyTable->selectedItems()[0]; int row = item->row(); - QString name = prop->item(row, 0)->text(); + QString name = m_pPropertyTable->item(row, 0)->text(); if(name != NameEdit->text()) { // if(NameEdit->text() == "Export") { @@ -822,7 +889,7 @@ void ComponentDialog::slotApplyPropName() // NameEdit->setText("Export_"); // } // else - prop->item(row, 0)->setText(NameEdit->text()); + m_pPropertyTable->item(row, 0)->setText(NameEdit->text()); } edit->setFocus(); // cursor into "edit" widget } @@ -832,11 +899,11 @@ void ComponentDialog::slotApplyPropName() void ComponentDialog::slotApplyState(int State) { // pick selected row - if (prop->rowCount() == 0) return; - QTableWidgetItem *item = prop->selectedItems()[0]; + if (m_pPropertyTable->rowCount() == 0) return; + QTableWidgetItem *item = m_pPropertyTable->selectedItems()[0]; int row = item->row(); - QString disp = prop->item(row, 2)->text(); + QString disp = m_pPropertyTable->item(row, 2)->text(); if(item == 0) return; @@ -847,7 +914,7 @@ void ComponentDialog::slotApplyState(int State) ButtonState = tr("no"); if(disp != ButtonState) { - prop->item(row, 2)->setText(ButtonState); + m_pPropertyTable->item(row, 2)->setText(ButtonState); } } @@ -881,47 +948,44 @@ void ComponentDialog::reject() // Is called, if the "Apply"-button is pressed. void ComponentDialog::slotApplyInput() { - qDebug() << " \n == Apply "; - if(Comp->showName != showName->isChecked()) { - Comp->showName = showName->isChecked(); - changed = true; - } - QString tmp; - Component *pc; - if (CompNameEdit->text().isEmpty()) { - CompNameEdit->setText(Comp->Name); - } else if(CompNameEdit->text() != Comp->Name) { - pc = Doc->getComponentByName(CompNameEdit->text()); - if (pc != nullptr) { - CompNameEdit->setText(Comp->Name); - } else { - Comp->Name = CompNameEdit->text(); - changed = true; - } + // Check the new name is not empty and not a duplicate. + if (localComponent.Name.isEmpty() || + m_pDocument->getComponentByName(localComponent.Name) != nullptr) + { + // Reset to the current name if a conflict is found. + localComponent.Name = m_pComponent->Name; + mpNameLineEdit->setText(localComponent.Name); } - /*! Walk the original Comp->Props and compare with the + m_pComponent->Name = localComponent.Name; + m_pComponent->showName = localComponent.showName; + changed = true; + + /*! Walk the original m_pComponent->Props and compare with the * data in the dialog. * The pointers to the combo, edits,... are set to 0. * Only check if the widgets were created (pointers checks are 'true') */ - //auto pp = Comp->Props.begin(); + //auto pp = m_pComponent->Props.begin(); // apply all the new property values + QString tmp; + Component *pc; + int idxStart = 1; - if (Comp->Model == ".SW") { + if (m_pComponent->Model == ".SW") { idxStart = 3; } if(comboSim != nullptr) { - auto pp = Comp->getProperty("Sim"); + auto pp = m_pComponent->getProperty("Sim"); bool display = checkSim->isChecked(); QString value = comboSim->currentText(); updateProperty(pp,value,display); } if(comboType != nullptr) { bool display = checkType->isChecked(); - auto pp = Comp->getProperty("Type"); + auto pp = m_pComponent->getProperty("Type"); switch(comboType->currentIndex()) { case 1: tmp = "log"; break; case 2: tmp = "list"; break; @@ -932,7 +996,7 @@ void ComponentDialog::slotApplyInput() } if(checkParam != nullptr) { if(checkParam->isEnabled()) { - auto pp = Comp->getProperty("Param"); + auto pp = m_pComponent->getProperty("Param"); bool display = checkParam->isChecked(); QString value = editParam->text(); updateProperty(pp,value,display); @@ -940,19 +1004,19 @@ void ComponentDialog::slotApplyInput() } if(editStart != nullptr) { if(comboType->currentIndex() < 2 ) { - Property *pp = Comp->Props.at(idxStart); // Start + Property *pp = m_pComponent->Props.at(idxStart); // Start bool display = checkStart->isChecked(); QString value = editStart->text(); updateProperty(pp,value,display); pp->Name = "Start"; - pp = Comp->Props.at(idxStart+1); // Stop + pp = m_pComponent->Props.at(idxStart+1); // Stop display = checkStop->isChecked(); value = editStop->text(); updateProperty(pp,value,display); pp->Name = "Stop"; - pp = Comp->Props.at(idxStart+2); + pp = m_pComponent->Props.at(idxStart+2); if (pp != nullptr) { // Points/Values display = checkNumber->isChecked(); value = editNumber->text(); @@ -963,14 +1027,14 @@ void ComponentDialog::slotApplyInput() } else { // If a value list is used, the properties "Start" and "Stop" are not // used. -> Call them "Symbol" to omit them in the netlist. - Property *pp = Comp->Props.at(idxStart); + Property *pp = m_pComponent->Props.at(idxStart); pp->Name = "Symbol"; pp->display = false; - pp = Comp->Props.at(idxStart+1); + pp = m_pComponent->Props.at(idxStart+1); pp->Name = "Symbol"; pp->display = false; - pp = Comp->Props.at(idxStart+2); + pp = m_pComponent->Props.at(idxStart+2); bool display = checkValues->isChecked(); QString value = "["+editValues->text()+"]"; @@ -991,32 +1055,32 @@ void ComponentDialog::slotApplyInput() QTableWidgetItem *item = nullptr; // make sure we have one item, take selected - if (prop->selectedItems().size() != 0) { - item = prop->selectedItems()[0]; + if (m_pPropertyTable->selectedItems().size() != 0) { + item = m_pPropertyTable->selectedItems()[0]; } - /*! Walk the dialog list of 'prop' + /*! Walk the dialog list of 'm_pPropertyTable' */ if(item != nullptr) { int row = item->row(); - QString name = prop->item(row, 0)->text(); - QString value = prop->item(row, 1)->text(); + QString name = m_pPropertyTable->item(row, 0)->text(); + QString value = m_pPropertyTable->item(row, 1)->text(); // apply edit line if(value != edit->text()) { - prop->item(row, 1)->setText(edit->text()); + m_pPropertyTable->item(row, 1)->setText(edit->text()); } // apply property name if (!NameEdit->isHidden()) { if (name != NameEdit->text()) { - prop->item(row, 0)->setText(NameEdit->text()); + m_pPropertyTable->item(row, 0)->setText(NameEdit->text()); } } } // apply all the new property values in the ListView - if (Comp->isEquation) { + if (m_pComponent->isEquation) { recreatePropsFromTable(); } else { fillPropsFromTable(); @@ -1024,20 +1088,20 @@ void ComponentDialog::slotApplyInput() if(changed) { int dx, dy; - Comp->textSize(dx, dy); + m_pComponent->textSize(dx, dy); if(tx_Dist != 0) { - Comp->tx += tx_Dist-dx; + m_pComponent->tx += tx_Dist-dx; tx_Dist = dx; } if(ty_Dist != 0) { - Comp->ty += ty_Dist-dy; + m_pComponent->ty += ty_Dist-dy; ty_Dist = dy; } - Doc->recreateComponent(Comp); - Doc->viewport()->repaint(); - if ( (int) Comp->Props.count() != prop->rowCount()) { // If props count was changed after recreation - Q_ASSERT(prop->rowCount() >= 0); + m_pDocument->recreateComponent(m_pComponent); + m_pDocument->viewport()->repaint(); + if ( (int) m_pComponent->Props.count() != m_pPropertyTable->rowCount()) { // If props count was changed after recreation + Q_ASSERT(m_pPropertyTable->rowCount() >= 0); updateCompPropsList(); // of component we need to update properties } } @@ -1048,10 +1112,10 @@ void ComponentDialog::slotApplyInput() void ComponentDialog::slotBrowseFile() { // current file name from the component properties - QString currFileName = prop->item(prop->currentRow(), 1)->text(); + QString currFileName = m_pPropertyTable->item(m_pPropertyTable->currentRow(), 1)->text(); QFileInfo currFileInfo(currFileName); // name of the schematic where component is instantiated (may be empty) - QFileInfo schematicFileInfo = Comp->getSchematic()->getFileInfo(); + QFileInfo schematicFileInfo = m_pComponent->getSchematic()->getFileInfo(); QString schematicFileName = schematicFileInfo.fileName(); // directory to use for the file open dialog QString currDir; @@ -1104,15 +1168,15 @@ void ComponentDialog::slotBrowseFile() } } edit->setText(s); - int row = prop->currentRow(); - prop->item(row,1)->setText(s); + int row = m_pPropertyTable->currentRow(); + m_pPropertyTable->item(row,1)->setText(s); } } // ------------------------------------------------------------------------- void ComponentDialog::slotEditFile() { - Doc->App->editFile(misc::properAbsFileName(edit->text(), Doc)); + m_pDocument->App->editFile(misc::properAbsFileName(edit->text(), m_pDocument)); } /*! @@ -1139,11 +1203,11 @@ void ComponentDialog::slotEditFile() void ComponentDialog::slotButtAdd() { // Set existing equation into focus, return - for(int row=0; row < prop->rowCount(); row++) { - QString name = prop->item(row, 0)->text(); + for(int row=0; row < m_pPropertyTable->rowCount(); row++) { + QString name = m_pPropertyTable->item(row, 0)->text(); if( name == NameEdit->text()) { - prop->setCurrentItem(prop->item(row,0)); - slotSelectProperty(prop->item(row,0)); + m_pPropertyTable->setCurrentItem(m_pPropertyTable->item(row,0)); + slotSelectProperty(m_pPropertyTable->item(row,0)); return; } } @@ -1154,30 +1218,30 @@ void ComponentDialog::slotButtAdd() s = tr("yes"); // get number for selected row - int curRow = prop->currentRow(); + int curRow = m_pPropertyTable->currentRow(); // insert new row under current int insRow = curRow+1; - prop->insertRow(insRow); + m_pPropertyTable->insertRow(insRow); // append new row QTableWidgetItem *cell; cell = new QTableWidgetItem(NameEdit->text()); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - prop->setItem(insRow, 0, cell); + m_pPropertyTable->setItem(insRow, 0, cell); cell = new QTableWidgetItem(edit->text()); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - prop->setItem(insRow, 1, cell); + m_pPropertyTable->setItem(insRow, 1, cell); cell = new QTableWidgetItem(s); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - prop->setItem(insRow, 2, cell); + m_pPropertyTable->setItem(insRow, 2, cell); // no description? add empty cell cell = new QTableWidgetItem(""); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - prop->setItem(insRow, 3, cell); + m_pPropertyTable->setItem(insRow, 3, cell); // select new row - prop->selectRow(insRow); + m_pPropertyTable->selectRow(insRow); } /*! @@ -1188,27 +1252,27 @@ void ComponentDialog::slotButtAdd() */ void ComponentDialog::slotButtRem() { - if ((prop->rowCount() < 3)&& - (Comp->Model=="Eqn"||Comp->Model=="NutmegEq")) + if ((m_pPropertyTable->rowCount() < 3)&& + (m_pComponent->Model=="Eqn"||m_pComponent->Model=="NutmegEq")) return; // the last property cannot be removed - if (prop->rowCount() < 2) + if (m_pPropertyTable->rowCount() < 2) return; // the last property cannot be removed - QTableWidgetItem *item = prop->selectedItems()[0]; + QTableWidgetItem *item = m_pPropertyTable->selectedItems()[0]; int row = item->row(); if(item == 0) return; // peek next, delete current, set next current - if ( row < prop->rowCount()) { - prop->setCurrentItem(prop->item(row-1,0)); // Shift selection up - slotSelectProperty(prop->item(row-1,0)); - prop->removeRow(row); - if (!prop->selectedItems().size()) { // The first item was removed - prop->setCurrentItem(prop->item(0,0)); // Select the first item - slotSelectProperty(prop->item(0,0)); + if ( row < m_pPropertyTable->rowCount()) { + m_pPropertyTable->setCurrentItem(m_pPropertyTable->item(row-1,0)); // Shift selection up + slotSelectProperty(m_pPropertyTable->item(row-1,0)); + m_pPropertyTable->removeRow(row); + if (!m_pPropertyTable->selectedItems().size()) { // The first item was removed + m_pPropertyTable->setCurrentItem(m_pPropertyTable->item(0,0)); // Select the first item + slotSelectProperty(m_pPropertyTable->item(0,0)); } } } @@ -1219,27 +1283,27 @@ void ComponentDialog::slotButtRem() */ void ComponentDialog::slotButtUp() { - qDebug() << "slotButtUp" << prop->currentRow() << prop->rowCount(); + qDebug() << "slotButtUp" << m_pPropertyTable->currentRow() << m_pPropertyTable->rowCount(); - int curRow = prop->currentRow(); + int curRow = m_pPropertyTable->currentRow(); if (curRow == 0) return; - if ((curRow == 1)&&(Comp->Model=="NutmegEq")) + if ((curRow == 1)&&(m_pComponent->Model=="NutmegEq")) return; // swap current and row above it - QTableWidgetItem *source = prop->takeItem(curRow ,0); - QTableWidgetItem *target = prop->takeItem(curRow-1,0); - prop->setItem(curRow-1, 0, source); - prop->setItem(curRow, 0, target); - source = prop->takeItem(curRow ,1); - target = prop->takeItem(curRow-1,1); - prop->setItem(curRow-1, 1, source); - prop->setItem(curRow, 1, target); + QTableWidgetItem *source = m_pPropertyTable->takeItem(curRow ,0); + QTableWidgetItem *target = m_pPropertyTable->takeItem(curRow-1,0); + m_pPropertyTable->setItem(curRow-1, 0, source); + m_pPropertyTable->setItem(curRow, 0, target); + source = m_pPropertyTable->takeItem(curRow ,1); + target = m_pPropertyTable->takeItem(curRow-1,1); + m_pPropertyTable->setItem(curRow-1, 1, source); + m_pPropertyTable->setItem(curRow, 1, target); // select moved row - prop->selectRow(curRow-1); + m_pPropertyTable->selectRow(curRow-1); } /*! @@ -1248,29 +1312,29 @@ void ComponentDialog::slotButtUp() */ void ComponentDialog::slotButtDown() { - qDebug() << "slotButtDown" << prop->currentRow() << prop->rowCount(); + qDebug() << "slotButtDown" << m_pPropertyTable->currentRow() << m_pPropertyTable->rowCount(); - int curRow = prop->currentRow(); + int curRow = m_pPropertyTable->currentRow(); // Leave Export as last - if ((curRow == prop->rowCount()-2)&&(Comp->Model=="Eqn")) + if ((curRow == m_pPropertyTable->rowCount()-2)&&(m_pComponent->Model=="Eqn")) return; - if ((curRow == 0)&&(Comp->Model=="NutmegEq")) // Don't let to shift the first property "Simulation=" + if ((curRow == 0)&&(m_pComponent->Model=="NutmegEq")) // Don't let to shift the first property "Simulation=" return; - if ((curRow == prop->rowCount()-1)) // Last property + if ((curRow == m_pPropertyTable->rowCount()-1)) // Last property return; // swap current and row below it - QTableWidgetItem *source = prop->takeItem(curRow,0); - QTableWidgetItem *target = prop->takeItem(curRow+1,0); - prop->setItem(curRow+1, 0, source); - prop->setItem(curRow, 0, target); - source = prop->takeItem(curRow,1); - target = prop->takeItem(curRow+1,1); - prop->setItem(curRow+1, 1, source); - prop->setItem(curRow, 1, target); + QTableWidgetItem *source = m_pPropertyTable->takeItem(curRow,0); + QTableWidgetItem *target = m_pPropertyTable->takeItem(curRow+1,0); + m_pPropertyTable->setItem(curRow+1, 0, source); + m_pPropertyTable->setItem(curRow, 0, target); + source = m_pPropertyTable->takeItem(curRow,1); + target = m_pPropertyTable->takeItem(curRow+1,1); + m_pPropertyTable->setItem(curRow+1, 1, source); + m_pPropertyTable->setItem(curRow, 1, target); // select moved row - prop->selectRow(curRow+1); + m_pPropertyTable->selectRow(curRow+1); } // ------------------------------------------------------------------------- @@ -1474,8 +1538,8 @@ void ComponentDialog::slotHHeaderClicked(int headerIdx) } // go through all the properties table and set the visibility cell - for (int row = 0; row < prop->rowCount(); row++) { - cell = prop->item(row, 2); + for (int row = 0; row < m_pPropertyTable->rowCount(); row++) { + cell = m_pPropertyTable->item(row, 2); cell->setText(s); } setAllVisible = not setAllVisible; // toggle visibility for the next double-click @@ -1485,7 +1549,7 @@ void ComponentDialog::slotHHeaderClicked(int headerIdx) QStringList ComponentDialog::getSimulationList() { QStringList sim_lst; - Schematic *sch = Comp->getSchematic(); + Schematic *sch = m_pComponent->getSchematic(); if (sch == nullptr) { return sim_lst; } @@ -1516,7 +1580,7 @@ QStringList ComponentDialog::getSimulationList() void ComponentDialog::slotFillFromSpice() { - fillFromSpiceDialog *dlg = new fillFromSpiceDialog(Comp, this); + fillFromSpiceDialog *dlg = new fillFromSpiceDialog(m_pComponent, this); auto r = dlg->exec(); if (r == QDialog::Accepted) { updateCompPropsList(); @@ -1527,22 +1591,22 @@ void ComponentDialog::slotFillFromSpice() void ComponentDialog::fillPropsFromTable() { - for( int row = 0; row < prop->rowCount(); row++ ) { - QString name = prop->item(row, 0)->text(); - QString value = prop->item(row, 1)->text(); - QString disp = prop->item(row, 2)->text(); - QString desc = prop->item(row, 3)->text(); + for( int row = 0; row < m_pPropertyTable->rowCount(); row++ ) { + QString name = m_pPropertyTable->item(row, 0)->text(); + QString value = m_pPropertyTable->item(row, 1)->text(); + QString disp = m_pPropertyTable->item(row, 2)->text(); + QString desc = m_pPropertyTable->item(row, 3)->text(); bool display = (disp == tr("yes")); if (compIsSimulation) { // Get property by name - auto pp = Comp->getProperty(name); + auto pp = m_pComponent->getProperty(name); if (pp != nullptr) { updateProperty(pp,value,display); } } else { // Other components may have properties with duplicate names - if (row < Comp->Props.count()) { - auto pp = Comp->Props[row]; + if (row < m_pComponent->Props.count()) { + auto pp = m_pComponent->Props[row]; if (pp->Name == name) { updateProperty(pp,value,display); } @@ -1553,17 +1617,17 @@ void ComponentDialog::fillPropsFromTable() void ComponentDialog::recreatePropsFromTable() { - if (!Comp->isEquation) return; // add / remove properties allowed only for equations + if (!m_pComponent->isEquation) return; // add / remove properties allowed only for equations - if (Comp->Props.size() != prop->rowCount()) { + if (m_pComponent->Props.size() != m_pPropertyTable->rowCount()) { changed = true; // Added or removed properties } else { - for( int row = 0; row < prop->rowCount(); row++ ) { - QString name = prop->item(row, 0)->text(); - QString value = prop->item(row, 1)->text(); - QString disp = prop->item(row, 2)->text(); + for( int row = 0; row < m_pPropertyTable->rowCount(); row++ ) { + QString name = m_pPropertyTable->item(row, 0)->text(); + QString value = m_pPropertyTable->item(row, 1)->text(); + QString disp = m_pPropertyTable->item(row, 2)->text(); bool display = (disp == tr("yes")); - auto pp = Comp->Props.at(row); + auto pp = m_pComponent->Props.at(row); if ((pp->Name != name) || (pp->Value != value) || (pp->display != display)) { changed = true; // reordered or edited properties @@ -1576,16 +1640,16 @@ void ComponentDialog::recreatePropsFromTable() return; } - for (auto pp: Comp->Props) { + for (auto pp: m_pComponent->Props) { delete pp; pp = nullptr; } - Comp->Props.clear(); - for( int row = 0; row < prop->rowCount(); row++ ) { - QString name = prop->item(row, 0)->text(); - QString value = prop->item(row, 1)->text(); - QString disp = prop->item(row, 2)->text(); - QString desc = prop->item(row, 3)->text(); + m_pComponent->Props.clear(); + for( int row = 0; row < m_pPropertyTable->rowCount(); row++ ) { + QString name = m_pPropertyTable->item(row, 0)->text(); + QString value = m_pPropertyTable->item(row, 1)->text(); + QString disp = m_pPropertyTable->item(row, 2)->text(); + QString desc = m_pPropertyTable->item(row, 3)->text(); bool display = (disp == tr("yes")); Property *pp = new Property; @@ -1593,7 +1657,7 @@ void ComponentDialog::recreatePropsFromTable() pp->Value = value; pp->display = display; pp->Description = desc; - Comp->Props.append(pp); + m_pComponent->Props.append(pp); } } diff --git a/qucs/components/componentdialog.h b/qucs/components/componentdialog.h index 194b2b950..af3aa5b49 100644 --- a/qucs/components/componentdialog.h +++ b/qucs/components/componentdialog.h @@ -36,7 +36,8 @@ class QCheckBox; class QRegExp; class QComboBox; class QPushButton; -class QVBoxLayout; + +class BoundLineEdit; class ComponentDialog : public QDialog { @@ -82,12 +83,18 @@ protected slots: bool eventFilter(QObject *obj, QEvent *event); private: - QVBoxLayout *all; // the mother of all widgets QValidator *Validator, *ValRestrict, *Validator2, *ValName; QRegularExpression Expr; QIntValidator *ValInteger; - QTableWidget *prop; + + QTableWidget *m_pPropertyTable; + Component *m_pComponent; + Schematic *m_pDocument; + Component localComponent; + + BoundLineEdit* mpNameLineEdit; + QLineEdit *edit, *NameEdit, *CompNameEdit; QComboBox *ComboEdit; QLabel *Name, *Description; @@ -95,8 +102,7 @@ protected slots: QPushButton *ButtUp, *ButtDown; QPushButton *ButtFillFromSpice; QCheckBox *disp; - Component *Comp; - Schematic *Doc; + bool changed; int tx_Dist, ty_Dist; // remember the text position bool setAllVisible; // used for toggling visibility of properties From 25bf41ed6e78c3d87fb083b6b924ff1b171e9dc0 Mon Sep 17 00:00:00 2001 From: Iwbnwif Yiw Date: Sat, 2 Nov 2024 22:49:34 +0000 Subject: [PATCH 08/15] Add a BoundComboBox class and implement the .SW Sim property using it. --- qucs/components/componentdialog.cpp | 121 ++++++++++++++++++++++++---- 1 file changed, 105 insertions(+), 16 deletions(-) diff --git a/qucs/components/componentdialog.cpp b/qucs/components/componentdialog.cpp index ac60477cf..ffff92224 100644 --- a/qucs/components/componentdialog.cpp +++ b/qucs/components/componentdialog.cpp @@ -44,9 +44,8 @@ class BoundControl { public: - BoundControl(const QString& label, bool& boundCheck, QValidator* validator, QVBoxLayout* layout) + BoundControl(const QString& label, bool& boundCheck, QLayout* layout) { - mpValidator = validator; mpParentLayout = layout; mpShowNameCheck = new QCheckBox("display in schematic"); @@ -54,25 +53,32 @@ class BoundControl // qDebug() << layout->metaObject()->className(); // Either add widgets to a new QHBoxLayout or to an existing QGridLayout. - if (layout->metaObject()->className() != QString("QGridLayout")) + if (layout->metaObject()->className() == QString("QVBoxLayout")) { mpBoundLayout = new QHBoxLayout; mpBoundLayout->setSpacing(5); - mpParentLayout->addLayout(mpBoundLayout); + static_cast(mpParentLayout)->addLayout(mpBoundLayout); - // Add a label if a string is provided. if (!label.isEmpty()) mpBoundLayout->addWidget(new QLabel(label)); - // Add the show parameter checkbox. mpShowNameCheck->setCheckState(boundCheck ? Qt::Checked : Qt::Unchecked); mpBoundLayout->addWidget(mpShowNameCheck); } + + else + { + QGridLayout* grid = static_cast(mpParentLayout); + int row = grid->rowCount(); + grid->addWidget(new QLabel("MR: " + label + ":"), row, 0); + + mpShowNameCheck->setCheckState(boundCheck ? Qt::Checked : Qt::Unchecked); + grid->addWidget(mpShowNameCheck, row, 2); + } } protected: - QValidator* mpValidator; - QVBoxLayout* mpParentLayout; + QLayout* mpParentLayout; QHBoxLayout* mpBoundLayout = nullptr; QCheckBox* mpShowNameCheck; }; @@ -81,16 +87,16 @@ class BoundControl class BoundLineEdit : public QLineEdit, BoundControl { public: + // Direct QString editing. BoundLineEdit(const QString& label, QString& boundValue, bool& boundCheck, - QVBoxLayout* layout, QValidator* validator = nullptr) - : BoundControl(label, boundCheck, validator, layout) + QLayout* layout, QValidator* validator = nullptr) + : BoundControl(label, boundCheck, layout) { if (validator) setValidator(validator); if (mpBoundLayout) mpBoundLayout->insertWidget(1, this); - else mpParentLayout->addWidget(this); @@ -100,15 +106,53 @@ class BoundLineEdit : public QLineEdit, BoundControl connect(this, &QLineEdit::textChanged, [&boundValue](const QString& text) { boundValue = text; }); connect(mpShowNameCheck, &QCheckBox::stateChanged, [&boundCheck](int state) mutable { boundCheck = state; }); } + + // Parameter property editing. + BoundLineEdit(Property* property, QLayout* layout, QValidator* validator = nullptr) + : BoundControl(property->Name, property->display, layout) + { + if (validator) + setValidator(validator); + + QGridLayout* grid = static_cast(mpParentLayout); + grid->addWidget(this, grid->rowCount() - 1, 1); + setText(property->Value); + + // Update the bound values whenever the user makes a change. + // connect(this, &QLineEdit::textChanged, [&boundValue](const QString& text) { boundValue = text; }); + // connect(mpShowNameCheck, &QCheckBox::stateChanged, [&boundCheck](int state) mutable { boundCheck = state; }); + } +}; + +// Combo box version of bound control. Has label | combo box | checkbox. +class BoundComboBox : public QComboBox, BoundControl +{ + public: + // Parameter property editing. + BoundComboBox(Property* property, const QStringList& options, QLayout* layout) + : BoundControl(property->Name, property->display, layout) + { + addItems(options); + setCurrentIndex(findText(property->Value)); + + QGridLayout* grid = static_cast(mpParentLayout); + grid->addWidget(this, grid->rowCount() - 1, 1); + + QString& temp(property->Value); + + // Update the bound values whenever the user makes a change. + connect(this, &QComboBox::currentTextChanged, [&temp](const QString& text) { temp = text; qDebug() << temp; }); + // connect(mpShowNameCheck, &QCheckBox::stateChanged, [&boundCheck](int state) mutable { boundCheck = state; }); + } }; + ComponentDialog::ComponentDialog(Component* component, Schematic* document) : QDialog(document), localComponent(*component) { m_pComponent = component; m_pDocument = document; - restoreGeometry(_settings::Get().item("ComponentDialog/geometry")); setWindowTitle(tr("Edit Component Properties") + " - " + m_pComponent->Description.toUpper()); @@ -156,10 +200,13 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* document) // { + qDebug() << m_pComponent->Model; + if (m_pComponent->isSimulation && (m_pComponent->Model == ".SW" || - m_pComponent->Model == ".SW" || - m_pComponent->Model == ".AC")) + m_pComponent->Model == ".SP" || + m_pComponent->Model == ".AC" || + m_pComponent->Model == ".NOISE")) { // TODO: Get rid of this compIsSimulation = true; @@ -174,7 +221,36 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* document) QGridLayout* sweepPageLayout = new QGridLayout; sweepPage->setLayout(sweepPageLayout); - int row=1; + + int row=10; + + for (Property* property : localComponent.Props) + { + qDebug() << "Prop: " << property->Name; + + // Special case where a simulation is assigned (e.g., parameter sweep). + if (property->Name == "Sim") + { + // Search components for simulations (model name begins with a '.'). + Q3PtrListIterator it(*m_pDocument->Components); + Component* component; + QStringList simulations; + while((component = it.current()) != 0) + { + if (component->Model[0] == '.' && component->Model != ".SW") + simulations << component->Name; + ++it; + } + + new BoundComboBox(property, simulations, sweepPageLayout); + } + + // new BoundLineEdit(property, sweepPageLayout, Validator); + } + + + /* + editParam = new QLineEdit(sweepPage); if (m_pComponent->Model != ".SW") editParam->setValidator(ValRestrict); connect(editParam, SIGNAL(returnPressed()), SLOT(slotParamEntered())); @@ -208,6 +284,9 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* document) sweepPageLayout->addWidget(editParam, row,1); sweepPageLayout->addWidget(checkParam, row++,2); +*/ + + textType = new QLabel(tr("Type:"), sweepPage); sweepPageLayout->addWidget(textType, row,0); @@ -261,15 +340,17 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* document) sweepPageLayout->addWidget(editNumber, row,1); checkNumber = new QCheckBox(tr("display in schematic"), sweepPage); sweepPageLayout->addWidget(checkNumber, row++,2); + // TODO: Get rid of this. QString s; // Parameter sweep. - if(m_pComponent->Model == ".SW") + if(false) // m_pComponent->Model == ".SW") { // Add all sweep components (starting with a .) to the combo box. + Component* component; for (component = m_pDocument->Components->first(); component != 0; m_pDocument->Components->next()) { @@ -958,6 +1039,11 @@ void ComponentDialog::slotApplyInput() mpNameLineEdit->setText(localComponent.Name); } + for (auto& property : localComponent.Props) + { + qDebug() << property->Name << " : " << property->Value; + } + m_pComponent->Name = localComponent.Name; m_pComponent->showName = localComponent.showName; changed = true; @@ -977,12 +1063,15 @@ void ComponentDialog::slotApplyInput() idxStart = 3; } + /* if(comboSim != nullptr) { auto pp = m_pComponent->getProperty("Sim"); bool display = checkSim->isChecked(); QString value = comboSim->currentText(); updateProperty(pp,value,display); } + */ + if(comboType != nullptr) { bool display = checkType->isChecked(); auto pp = m_pComponent->getProperty("Type"); From 30f8ddd58391a73bea98a70e36db4a54a1ff4f83 Mon Sep 17 00:00:00 2001 From: Integral Date: Mon, 4 Nov 2024 15:53:11 +0800 Subject: [PATCH 09/15] refactor: replace non-empty QString constructors with QStringLiteral() --- qucs-activefilter/filter.cpp | 62 +- qucs-activefilter/main.cpp | 2 +- qucs-activefilter/mfbfilter.cpp | 168 ++-- qucs-activefilter/sallenkey.cpp | 216 ++--- qucs-activefilter/schcauer.cpp | 108 +-- qucs-attenuator/attenuatorfunc.cpp | 184 ++-- qucs-attenuator/main.cpp | 2 +- qucs-attenuator/qucsattenuator.cpp | 34 +- qucs-filter/cline_filter.cpp | 44 +- qucs-filter/eqn_filter.cpp | 46 +- qucs-filter/filter.cpp | 24 +- qucs-filter/lc_filter.cpp | 106 +-- qucs-filter/line_filter.cpp | 44 +- qucs-filter/main.cpp | 2 +- qucs-filter/qf_filter.cpp | 94 +- qucs-filter/quarterwave_filter.cpp | 28 +- qucs-filter/qucsfilter.cpp | 2 +- qucs-filter/stepz_filter.cpp | 40 +- qucs-powercombining/main.cpp | 2 +- .../qucspowercombiningtool.cpp | 834 +++++++++--------- qucs-s-spar-viewer/main.cpp | 2 +- qucs-s-spar-viewer/qucs-s-spar-viewer.cpp | 112 +-- qucs-s-spar-viewer/qucsattenuator.cpp | 34 +- qucs-transcalc/main.cpp | 2 +- qucs-transcalc/qucstrans.cpp | 32 +- qucs/components/ac_sim.cpp | 6 +- qucs/components/ampere_ac.cpp | 4 +- qucs/components/ampere_dc.cpp | 2 +- qucs/components/ampere_noise.cpp | 4 +- qucs/components/biast.cpp | 4 +- qucs/components/bjt.cpp | 6 +- qucs/components/bjtsub.cpp | 6 +- qucs/components/capacitor.cpp | 4 +- qucs/components/capq.cpp | 10 +- qucs/components/cccs.cpp | 12 +- qucs/components/ccvs.cpp | 12 +- qucs/components/component.cpp | 10 +- qucs/components/d_flipflop.cpp | 4 +- qucs/components/dcblock.cpp | 2 +- qucs/components/dcfeed.cpp | 2 +- qucs/components/dff_SR.cpp | 2 +- qucs/components/digi_source.cpp | 12 +- qucs/components/diode.cpp | 10 +- qucs/components/eqndefined.cpp | 20 +- qucs/components/equation.cpp | 10 +- qucs/components/gyrator.cpp | 4 +- qucs/components/hb_sim.cpp | 4 +- qucs/components/iexp.cpp | 2 +- qucs/components/ifile.cpp | 4 +- qucs/components/indq.cpp | 12 +- qucs/components/inductor.cpp | 4 +- qucs/components/iprobe.cpp | 6 +- qucs/components/ipulse.cpp | 2 +- qucs/components/irect.cpp | 2 +- qucs/components/jfet.cpp | 6 +- qucs/components/jkff_SR.cpp | 2 +- qucs/components/logical_buf.cpp | 2 +- qucs/components/logical_inv.cpp | 2 +- qucs/components/mosfet.cpp | 6 +- qucs/components/mosfet_sub.cpp | 6 +- qucs/components/mutual.cpp | 6 +- qucs/components/mutual2.cpp | 12 +- qucs/components/mutualx.cpp | 6 +- qucs/components/opamp.cpp | 6 +- qucs/components/optimizedialog.cpp | 4 +- qucs/components/param_sweep.cpp | 36 +- qucs/components/potentiometer.cpp | 4 +- qucs/components/relais.cpp | 4 +- qucs/components/resistor.cpp | 12 +- qucs/components/rlcg.cpp | 4 +- qucs/components/source_ac.cpp | 18 +- qucs/components/sp_sim.cpp | 30 +- qucs/components/sparamfile.cpp | 6 +- qucs/components/spicedialog.cpp | 2 +- qucs/components/spicefile.cpp | 8 +- qucs/components/subcircuit.cpp | 2 +- qucs/components/switch.cpp | 18 +- qucs/components/tff_SR.cpp | 2 +- qucs/components/tr_sim.cpp | 2 +- qucs/components/vacomponent.cpp | 6 +- qucs/components/vccs.cpp | 6 +- qucs/components/vcresistor.cpp | 12 +- qucs/components/vcvs.cpp | 6 +- qucs/components/vexp.cpp | 2 +- qucs/components/vfile.cpp | 4 +- qucs/components/volt_ac.cpp | 2 +- qucs/components/volt_dc.cpp | 2 +- qucs/components/vprobe.cpp | 2 +- qucs/components/vpulse.cpp | 2 +- qucs/components/vrect.cpp | 2 +- qucs/diagrams/diagramdialog.cpp | 10 +- qucs/dialogs/aboutdialog.cpp | 2 +- qucs/dialogs/exportdialog.cpp | 12 +- qucs/dialogs/importdialog.cpp | 4 +- qucs/dialogs/librarydialog.cpp | 2 +- qucs/dialogs/loaddialog.cpp | 2 +- qucs/dialogs/matchdialog.cpp | 178 ++-- qucs/dialogs/simmessage.cpp | 2 +- qucs/dialogs/sweepdialog.cpp | 2 +- qucs/extsimkernels/abstractspicekernel.cpp | 18 +- qucs/extsimkernels/customsimdialog.cpp | 2 +- qucs/extsimkernels/ngspice.cpp | 34 +- qucs/extsimkernels/qucs2spice.cpp | 40 +- qucs/extsimkernels/s2spice.cpp | 14 +- qucs/extsimkernels/spicecompat.cpp | 10 +- qucs/extsimkernels/verilogawriter.cpp | 22 +- qucs/extsimkernels/xyce.cpp | 22 +- qucs/main.cpp | 12 +- qucs/misc.cpp | 6 +- qucs/mouseactions.cpp | 4 +- qucs/paintings/arrow.cpp | 2 +- qucs/paintings/ellipse.cpp | 2 +- qucs/paintings/graphictext.cpp | 4 +- qucs/paintings/rectangle.cpp | 2 +- qucs/qucs.cpp | 10 +- qucs/qucs_actions.cpp | 24 +- qucs/qucslib_common.h | 18 +- qucs/schematic_file.cpp | 26 +- qucs/spicecomponents/BJT_SPICE.cpp | 10 +- qucs/spicecomponents/C_SPICE.cpp | 10 +- qucs/spicecomponents/DIODE_SPICE.cpp | 10 +- qucs/spicecomponents/Icouple.cpp | 4 +- qucs/spicecomponents/K_SPICE.cpp | 2 +- qucs/spicecomponents/LTL_SPICE.cpp | 10 +- qucs/spicecomponents/LTRA_SPICE.cpp | 10 +- qucs/spicecomponents/L_SPICE.cpp | 10 +- qucs/spicecomponents/MESFET_SPICE.cpp | 10 +- qucs/spicecomponents/MOS_SPICE.cpp | 10 +- qucs/spicecomponents/NJF_SPICE.cpp | 10 +- qucs/spicecomponents/NMOS_SPICE.cpp | 10 +- qucs/spicecomponents/NPN_SPICE.cpp | 10 +- qucs/spicecomponents/PJF_SPICE.cpp | 10 +- qucs/spicecomponents/PMF_MESFET_SPICE.cpp | 10 +- qucs/spicecomponents/PMOS_SPICE.cpp | 10 +- qucs/spicecomponents/PNP_SPICE.cpp | 10 +- qucs/spicecomponents/R_SPICE.cpp | 10 +- qucs/spicecomponents/S4Q_I.cpp | 10 +- qucs/spicecomponents/S4Q_Ieqndef.cpp | 14 +- qucs/spicecomponents/S4Q_S.cpp | 10 +- qucs/spicecomponents/S4Q_V.cpp | 10 +- qucs/spicecomponents/S4Q_W.cpp | 10 +- qucs/spicecomponents/SDTF.cpp | 14 +- qucs/spicecomponents/UDRCTL_SPICE.cpp | 10 +- qucs/spicecomponents/XAPWL.cpp | 14 +- qucs/spicecomponents/core.cpp | 14 +- qucs/spicecomponents/eNL.cpp | 10 +- qucs/spicecomponents/gNL.cpp | 10 +- qucs/spicecomponents/iAmpMod.cpp | 2 +- qucs/spicecomponents/iPWL.cpp | 20 +- qucs/spicecomponents/iTRNOISE.cpp | 2 +- qucs/spicecomponents/isffm.cpp | 2 +- qucs/spicecomponents/sp_disto.cpp | 2 +- qucs/spicecomponents/sp_fourier.cpp | 6 +- qucs/spicecomponents/sp_func.cpp | 4 +- qucs/spicecomponents/sp_globalpar.cpp | 2 +- qucs/spicecomponents/sp_ic.cpp | 2 +- qucs/spicecomponents/sp_include.cpp | 4 +- qucs/spicecomponents/sp_lib.cpp | 2 +- qucs/spicecomponents/sp_nodeset.cpp | 2 +- qucs/spicecomponents/sp_noise.cpp | 4 +- qucs/spicecomponents/sp_nutmeg.cpp | 2 +- qucs/spicecomponents/sp_options.cpp | 6 +- qucs/spicecomponents/sp_parameter.cpp | 2 +- qucs/spicecomponents/sp_pz.cpp | 6 +- qucs/spicecomponents/sp_sens.cpp | 24 +- qucs/spicecomponents/sp_sens_ac.cpp | 4 +- qucs/spicecomponents/sp_sens_tr_xyce.cpp | 6 +- qucs/spicecomponents/sp_sens_xyce.cpp | 2 +- qucs/spicecomponents/sp_spectrum.cpp | 6 +- qucs/spicecomponents/spicelibcomp.cpp | 8 +- qucs/spicecomponents/src_eqndef.cpp | 14 +- qucs/spicecomponents/vAmpMod.cpp | 2 +- qucs/spicecomponents/vPWL.cpp | 20 +- qucs/spicecomponents/vTRNOISE.cpp | 2 +- qucs/spicecomponents/vTRRANDOM.cpp | 2 +- qucs/spicecomponents/volt_ac_SPICE.cpp | 10 +- qucs/spicecomponents/vsffm.cpp | 2 +- qucs/spicecomponents/xspicegeneric.cpp | 4 +- 178 files changed, 1806 insertions(+), 1806 deletions(-) diff --git a/qucs-activefilter/filter.cpp b/qucs-activefilter/filter.cpp index f421be781..c6141b623 100644 --- a/qucs-activefilter/filter.cpp +++ b/qucs-activefilter/filter.cpp @@ -235,7 +235,7 @@ void Filter::calcFirstOrder() void Filter::createPartList(QStringList &lst) { lst << QObject::tr("Part list"); - lst << QString("%1%2%3%4%5%6%7%8%9").arg("Stage#",6) + lst << QStringLiteral("%1%2%3%4%5%6%7%8%9").arg("Stage#",6) .arg("C1",12).arg("C2",12).arg("R1(kOhm)",10).arg("R2(kOhm)",10).arg("R3(kOhm)",10).arg("R4(kOhm)",10) .arg("R5(kOhm)",10).arg("R6(kOhm)",10); @@ -244,7 +244,7 @@ void Filter::createPartList(QStringList &lst) { double C1 = autoscaleCapacitor(stage.C1, suff1); double C2 = autoscaleCapacitor(stage.C2, suff2); - lst << QString("%1%2%3%4%5%6%7%8%9%10%11") + lst << QStringLiteral("%1%2%3%4%5%6%7%8%9%10%11") .arg(stage.N, 6) .arg(C1, 10, 'f', 3) .arg(suff1) @@ -283,13 +283,13 @@ void Filter::createFirstOrderComponentsHPF(QString &s,RC_elements stage,int dx) { QString suf; double C1 = autoscaleCapacitor(stage.C1,suf); - s += QString("\n").arg(Nopamp+1).arg(270+dx); - s += QString("\n").arg(170+dx); - s += QString("\n").arg(220+dx); - s += QString("\n").arg(Nr+2).arg(220+dx).arg(stage.R2,0,'f',3); - s += QString("\n").arg(Nr+1).arg(170+dx).arg(stage.R1,0,'f',3); - s += QString("\n").arg(Nr+3).arg(310+dx).arg(stage.R3,0,'f',3); - s += QString("\n").arg(Nc+1).arg(100+dx).arg(C1,0,'f',3).arg(suf); + s += QStringLiteral("\n").arg(Nopamp+1).arg(270+dx); + s += QStringLiteral("\n").arg(170+dx); + s += QStringLiteral("\n").arg(220+dx); + s += QStringLiteral("\n").arg(Nr+2).arg(220+dx).arg(stage.R2,0,'f',3); + s += QStringLiteral("\n").arg(Nr+1).arg(170+dx).arg(stage.R1,0,'f',3); + s += QStringLiteral("\n").arg(Nr+3).arg(310+dx).arg(stage.R3,0,'f',3); + s += QStringLiteral("\n").arg(Nc+1).arg(100+dx).arg(C1,0,'f',3).arg(suf); } @@ -297,32 +297,32 @@ void Filter::createFirstOrderComponentsLPF(QString &s,RC_elements stage,int dx) { QString suf; double C1 = autoscaleCapacitor(stage.C1,suf); - s += QString("\n").arg(Nopamp+1).arg(270+dx); - s += QString("\n").arg(170+dx); - s += QString("\n").arg(220+dx); - s += QString("\n").arg(Nr+2).arg(220+dx).arg(stage.R2,0,'f',3); - s += QString("\n").arg(Nr+1).arg(100+dx).arg(stage.R1,0,'f',3); - s += QString("\n").arg(Nr+3).arg(310+dx).arg(stage.R3,0,'f',3); - s += QString("\n").arg(Nc+1).arg(170+dx).arg(C1,0,'f',3).arg(suf); + s += QStringLiteral("\n").arg(Nopamp+1).arg(270+dx); + s += QStringLiteral("\n").arg(170+dx); + s += QStringLiteral("\n").arg(220+dx); + s += QStringLiteral("\n").arg(Nr+2).arg(220+dx).arg(stage.R2,0,'f',3); + s += QStringLiteral("\n").arg(Nr+1).arg(100+dx).arg(stage.R1,0,'f',3); + s += QStringLiteral("\n").arg(Nr+3).arg(310+dx).arg(stage.R3,0,'f',3); + s += QStringLiteral("\n").arg(Nc+1).arg(170+dx).arg(C1,0,'f',3).arg(suf); } void Filter::createFirstOrderWires(QString &s, int dx, int y) { - s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx); - s += QString("<%1 190 %2 %3 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20).arg(y); - s += QString("<%1 %2 %3 %4 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(y).arg(dx-50).arg(y); - - s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(170+dx); - s += QString("<%1 160 %2 160 \"out\" %3 130 39 \"\">\n").arg(310+dx).arg(360+dx).arg(380+dx); - s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(340+dx).arg(360+dx); - s += QString("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx); - s += QString("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(170+dx).arg(170+dx); - s += QString("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(170+dx).arg(170+dx); - s += QString("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(170+dx).arg(240+dx); - s += QString("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx); - s += QString("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(240+dx); - s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(280+dx); - s += QString("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx); + s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx); + s += QStringLiteral("<%1 190 %2 %3 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20).arg(y); + s += QStringLiteral("<%1 %2 %3 %4 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(y).arg(dx-50).arg(y); + + s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(170+dx); + s += QStringLiteral("<%1 160 %2 160 \"out\" %3 130 39 \"\">\n").arg(310+dx).arg(360+dx).arg(380+dx); + s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(340+dx).arg(360+dx); + s += QStringLiteral("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx); + s += QStringLiteral("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(170+dx).arg(170+dx); + s += QStringLiteral("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(170+dx).arg(170+dx); + s += QStringLiteral("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(170+dx).arg(240+dx); + s += QStringLiteral("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx); + s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(240+dx); + s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(280+dx); + s += QStringLiteral("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx); } diff --git a/qucs-activefilter/main.cpp b/qucs-activefilter/main.cpp index 9ae35db5a..6e6077a18 100644 --- a/qucs-activefilter/main.cpp +++ b/qucs-activefilter/main.cpp @@ -89,7 +89,7 @@ int main(int argc, char *argv[]) QString Lang = QucsSettings.Language; if(Lang.isEmpty()) Lang = QString(QLocale::system().name()); - tor.load( QString("qucs_") + Lang, LangDir); + tor.load( QStringLiteral("qucs_") + Lang, LangDir); a.installTranslator( &tor ); QucsActiveFilter *w = new QucsActiveFilter(); diff --git a/qucs-activefilter/mfbfilter.cpp b/qucs-activefilter/mfbfilter.cpp index 6f848d7f6..3b243dd70 100644 --- a/qucs-activefilter/mfbfilter.cpp +++ b/qucs-activefilter/mfbfilter.cpp @@ -59,24 +59,24 @@ void MFBfilter::createLowPassSchematic(QString &s) s += PACKAGE_VERSION; s += ">\n"; s += "\n"; - s += QString("<.AC AC1 1 300 440 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0); + s += QStringLiteral("<.AC AC1 1 300 440 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0); s += "<.DC DC1 1 60 440 0 61 0 0 \"26.85\" 0 \"0.001\" 0 \"1 pA\" 0 \"1 uV\" 0 \"no\" 0 \"150\" 0 \"no\" 0 \"none\" 0 \"CroutLU\" 0>\n"; s += "\n"; - s += QString("\n").arg(70+dx); - s += QString("\n").arg(70+dx); + s += QStringLiteral("\n").arg(70+dx); + s += QStringLiteral("\n").arg(70+dx); for (int i=1; i<=N2ord; i++) { stage = Sections.at(i-1); QString suffix1, suffix2; double C1 = autoscaleCapacitor(stage.C1,suffix1); double C2 = autoscaleCapacitor(stage.C2,suffix2); - s += QString("\n").arg(200+dx); - s += QString("\n").arg(360+dx); - s += QString("\n").arg(1+(i-1)*Nop1).arg(390+dx); - s += QString("\n").arg(2+(i-1)*Nc1).arg(200+dx).arg(C2,0,'f',3).arg(suffix2); - s += QString("\n").arg(1+(i-1)*Nc1).arg(320+dx).arg(C1,0,'f',3).arg(suffix1); - s += QString("\n").arg(1+(i-1)*Nr1).arg(200+dx).arg(stage.R1,0,'f',3); - s += QString("\n").arg(2+(i-1)*Nr1).arg(150+dx).arg(stage.R2,0,'f',3); - s += QString("\n").arg(3+(i-1)*Nr1).arg(250+dx).arg(stage.R3,0,'f',3); + s += QStringLiteral("\n").arg(200+dx); + s += QStringLiteral("\n").arg(360+dx); + s += QStringLiteral("\n").arg(1+(i-1)*Nop1).arg(390+dx); + s += QStringLiteral("\n").arg(2+(i-1)*Nc1).arg(200+dx).arg(C2,0,'f',3).arg(suffix2); + s += QStringLiteral("\n").arg(1+(i-1)*Nc1).arg(320+dx).arg(C1,0,'f',3).arg(suffix1); + s += QStringLiteral("\n").arg(1+(i-1)*Nr1).arg(200+dx).arg(stage.R1,0,'f',3); + s += QStringLiteral("\n").arg(2+(i-1)*Nr1).arg(150+dx).arg(stage.R2,0,'f',3); + s += QStringLiteral("\n").arg(3+(i-1)*Nr1).arg(250+dx).arg(stage.R3,0,'f',3); dx += 510; } @@ -91,26 +91,26 @@ void MFBfilter::createLowPassSchematic(QString &s) s += "<70 250 70 300 \"\" 0 0 0 \"\">\n"; for (int i=1; i<=N2ord; i++) { if (i!=1) { - s += QString("<%1 250 %2 270 \"\" 0 0 0 \"\">\n").arg(120+dx).arg(120+dx); - s += QString("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(dx-40).arg(120+dx); + s += QStringLiteral("<%1 250 %2 270 \"\" 0 0 0 \"\">\n").arg(120+dx).arg(120+dx); + s += QStringLiteral("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(dx-40).arg(120+dx); } - s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(180+dx).arg(200+dx); - s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(220+dx); - s += QString("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); - s += QString("<%1 250 %2 320 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); - s += QString("<%1 290 %2 350 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx); - s += QString("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); - s += QString("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(320+dx); - s += QString("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); - s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(280+dx).arg(320+dx); - s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(360+dx); - s += QString("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); - s += QString("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(470+dx); - s += QString("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(430+dx).arg(470+dx); + s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(180+dx).arg(200+dx); + s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(220+dx); + s += QStringLiteral("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); + s += QStringLiteral("<%1 250 %2 320 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); + s += QStringLiteral("<%1 290 %2 350 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx); + s += QStringLiteral("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); + s += QStringLiteral("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(320+dx); + s += QStringLiteral("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); + s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(280+dx).arg(320+dx); + s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(360+dx); + s += QStringLiteral("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); + s += QStringLiteral("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(470+dx); + s += QStringLiteral("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(430+dx).arg(470+dx); if ((2*i)==order) { - s += QString("<%1 130 %2 270 \"out\" %3 170 70 \"\">\n").arg(470+dx).arg(470+dx).arg(500+dx); + s += QStringLiteral("<%1 130 %2 270 \"out\" %3 170 70 \"\">\n").arg(470+dx).arg(470+dx).arg(500+dx); } else { - s += QString("<%1 130 %2 270 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(470+dx); + s += QStringLiteral("<%1 130 %2 270 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(470+dx); } dx += 510; } @@ -133,24 +133,24 @@ void MFBfilter::createHighPassSchematic(QString &s) s += PACKAGE_VERSION; s += ">\n"; s += "\n"; - s += QString("<.AC AC1 1 300 440 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0); + s += QStringLiteral("<.AC AC1 1 300 440 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0); s += "<.DC DC1 1 60 440 0 61 0 0 \"26.85\" 0 \"0.001\" 0 \"1 pA\" 0 \"1 uV\" 0 \"no\" 0 \"150\" 0 \"no\" 0 \"none\" 0 \"CroutLU\" 0>\n"; s += "\n"; - s += QString("\n").arg(70+dx); - s += QString("\n").arg(70+dx); + s += QStringLiteral("\n").arg(70+dx); + s += QStringLiteral("\n").arg(70+dx); for (int i=1; i<=N2ord; i++) { stage = Sections.at(i-1); QString suffix1, suffix2; double C1 = autoscaleCapacitor(stage.C1,suffix1); double C2 = autoscaleCapacitor(stage.C2,suffix2); - s += QString("\n").arg(200+dx); - s += QString("\n").arg(360+dx); - s += QString("\n").arg(1+(i-1)*Nop1).arg(390+dx); - s += QString("\n").arg(1+(i-1)*Nr1).arg(200+dx).arg(stage.R1,0,'f',3); - s += QString("\n").arg(2+(i-1)*Nr1).arg(320+dx).arg(stage.R2,0,'f',3); - s += QString("\n").arg(1+(i-1)*Nc1).arg(200+dx).arg(C1,0,'f',3).arg(suffix1); - s += QString("\n").arg(2+(i-1)*Nc1).arg(150+dx).arg(C2,0,'f',3).arg(suffix2); - s += QString("\n").arg(3+(i-1)*Nc1).arg(250+dx).arg(C1,0,'f',3).arg(suffix1); + s += QStringLiteral("\n").arg(200+dx); + s += QStringLiteral("\n").arg(360+dx); + s += QStringLiteral("\n").arg(1+(i-1)*Nop1).arg(390+dx); + s += QStringLiteral("\n").arg(1+(i-1)*Nr1).arg(200+dx).arg(stage.R1,0,'f',3); + s += QStringLiteral("\n").arg(2+(i-1)*Nr1).arg(320+dx).arg(stage.R2,0,'f',3); + s += QStringLiteral("\n").arg(1+(i-1)*Nc1).arg(200+dx).arg(C1,0,'f',3).arg(suffix1); + s += QStringLiteral("\n").arg(2+(i-1)*Nc1).arg(150+dx).arg(C2,0,'f',3).arg(suffix2); + s += QStringLiteral("\n").arg(3+(i-1)*Nc1).arg(250+dx).arg(C1,0,'f',3).arg(suffix1); dx += 510; } @@ -165,26 +165,26 @@ void MFBfilter::createHighPassSchematic(QString &s) s += "<70 250 70 300 \"\" 0 0 0 \"\">\n"; for (int i=1; i<=N2ord; i++) { if (i!=1) { - s += QString("<%1 250 %2 270 \"\" 0 0 0 \"\">\n").arg(120+dx).arg(120+dx); - s += QString("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(dx-40).arg(120+dx); + s += QStringLiteral("<%1 250 %2 270 \"\" 0 0 0 \"\">\n").arg(120+dx).arg(120+dx); + s += QStringLiteral("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(dx-40).arg(120+dx); } - s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(180+dx).arg(200+dx); - s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(220+dx); - s += QString("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); - s += QString("<%1 250 %2 320 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); - s += QString("<%1 290 %2 350 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx); - s += QString("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); - s += QString("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(320+dx); - s += QString("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); - s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(280+dx).arg(320+dx); - s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(360+dx); - s += QString("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); - s += QString("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(470+dx); - s += QString("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(430+dx).arg(470+dx); + s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(180+dx).arg(200+dx); + s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(220+dx); + s += QStringLiteral("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); + s += QStringLiteral("<%1 250 %2 320 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); + s += QStringLiteral("<%1 290 %2 350 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx); + s += QStringLiteral("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); + s += QStringLiteral("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(320+dx); + s += QStringLiteral("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); + s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(280+dx).arg(320+dx); + s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(360+dx); + s += QStringLiteral("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); + s += QStringLiteral("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(470+dx); + s += QStringLiteral("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(430+dx).arg(470+dx); if ((2*i)==order) { - s += QString("<%1 130 %2 270 \"out\" %3 170 70 \"\">\n").arg(470+dx).arg(470+dx).arg(500+dx); + s += QStringLiteral("<%1 130 %2 270 \"out\" %3 170 70 \"\">\n").arg(470+dx).arg(470+dx).arg(500+dx); } else { - s += QString("<%1 130 %2 270 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(470+dx); + s += QStringLiteral("<%1 130 %2 270 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(470+dx); } dx += 510; } @@ -205,24 +205,24 @@ void MFBfilter::createBandPassSchematic(QString &s) s += PACKAGE_VERSION; s += ">\n"; s += "\n"; - s += QString("<.AC AC1 1 300 440 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((Fu+1000)/1000.0); + s += QStringLiteral("<.AC AC1 1 300 440 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((Fu+1000)/1000.0); s += "<.DC DC1 1 60 440 0 61 0 0 \"26.85\" 0 \"0.001\" 0 \"1 pA\" 0 \"1 uV\" 0 \"no\" 0 \"150\" 0 \"no\" 0 \"none\" 0 \"CroutLU\" 0>\n"; s += "\n"; - s += QString("\n").arg(70+dx); - s += QString("\n").arg(70+dx); + s += QStringLiteral("\n").arg(70+dx); + s += QStringLiteral("\n").arg(70+dx); for (int i=1; i<=Sections.count(); i++) { stage = Sections.at(i-1); QString suffix1, suffix2; double C1 = autoscaleCapacitor(stage.C1,suffix1); double C2 = autoscaleCapacitor(stage.C2,suffix2); - s += QString("\n").arg(200+dx); - s += QString("\n").arg(360+dx); - s += QString("\n").arg(1+(i-1)*Nop1).arg(390+dx); - s += QString("\n").arg(1+(i-1)*Nc1).arg(200+dx).arg(C1,0,'f',3).arg(suffix1); - s += QString("\n").arg(2+(i-1)*Nc1).arg(250+dx).arg(C2,0,'f',3).arg(suffix2); - s += QString("\n").arg(1+(i-1)*Nr1).arg(150+dx).arg(stage.R1,0,'f',3); - s += QString("\n").arg(2+(i-1)*Nr1).arg(200+dx).arg(stage.R2,0,'f',3); - s += QString("\n").arg(3+(i-1)*Nr1).arg(320+dx).arg(stage.R3,0,'f',3); + s += QStringLiteral("\n").arg(200+dx); + s += QStringLiteral("\n").arg(360+dx); + s += QStringLiteral("\n").arg(1+(i-1)*Nop1).arg(390+dx); + s += QStringLiteral("\n").arg(1+(i-1)*Nc1).arg(200+dx).arg(C1,0,'f',3).arg(suffix1); + s += QStringLiteral("\n").arg(2+(i-1)*Nc1).arg(250+dx).arg(C2,0,'f',3).arg(suffix2); + s += QStringLiteral("\n").arg(1+(i-1)*Nr1).arg(150+dx).arg(stage.R1,0,'f',3); + s += QStringLiteral("\n").arg(2+(i-1)*Nr1).arg(200+dx).arg(stage.R2,0,'f',3); + s += QStringLiteral("\n").arg(3+(i-1)*Nr1).arg(320+dx).arg(stage.R3,0,'f',3); dx += 400; } @@ -234,26 +234,26 @@ void MFBfilter::createBandPassSchematic(QString &s) s += "<70 250 70 300 \"\" 0 0 0 \"\">\n"; for (int i=1; i<=Sections.count(); i++) { if (i!=1) { - s += QString("<%1 250 %2 270 \"\" 0 0 0 \"\">\n").arg(120+dx).arg(120+dx); - s += QString("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(dx+70).arg(120+dx); + s += QStringLiteral("<%1 250 %2 270 \"\" 0 0 0 \"\">\n").arg(120+dx).arg(120+dx); + s += QStringLiteral("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(dx+70).arg(120+dx); } - s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(180+dx).arg(200+dx); - s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(220+dx); - s += QString("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); - s += QString("<%1 250 %2 320 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); - s += QString("<%1 290 %2 350 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx); - s += QString("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); - s += QString("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(320+dx); - s += QString("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); - s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(280+dx).arg(320+dx); - s += QString("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(360+dx); - s += QString("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); - s += QString("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(470+dx); - s += QString("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(430+dx).arg(470+dx); + s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(180+dx).arg(200+dx); + s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(220+dx); + s += QStringLiteral("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); + s += QStringLiteral("<%1 250 %2 320 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); + s += QStringLiteral("<%1 290 %2 350 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(360+dx); + s += QStringLiteral("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(200+dx); + s += QStringLiteral("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(200+dx).arg(320+dx); + s += QStringLiteral("<%1 130 %2 150 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); + s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(280+dx).arg(320+dx); + s += QStringLiteral("<%1 250 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(360+dx); + s += QStringLiteral("<%1 210 %2 250 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); + s += QStringLiteral("<%1 130 %2 130 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(470+dx); + s += QStringLiteral("<%1 270 %2 270 \"\" 0 0 0 \"\">\n").arg(430+dx).arg(470+dx); if (i==order) { - s += QString("<%1 130 %2 270 \"out\" %3 170 70 \"\">\n").arg(470+dx).arg(470+dx).arg(500+dx); + s += QStringLiteral("<%1 130 %2 270 \"out\" %3 170 70 \"\">\n").arg(470+dx).arg(470+dx).arg(500+dx); } else { - s += QString("<%1 130 %2 270 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(470+dx); + s += QStringLiteral("<%1 130 %2 270 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(470+dx); } dx += 400; } diff --git a/qucs-activefilter/sallenkey.cpp b/qucs-activefilter/sallenkey.cpp index 357c0b50f..c713a2c31 100644 --- a/qucs-activefilter/sallenkey.cpp +++ b/qucs-activefilter/sallenkey.cpp @@ -267,25 +267,25 @@ void SallenKey::createHighPassSchematic(QString &s) s += PACKAGE_VERSION; s += ">\n"; s += "\n"; - s += QString("<.AC AC1 1 30 410 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0); + s += QStringLiteral("<.AC AC1 1 30 410 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0); s += "<.DC DC1 1 280 410 0 61 0 0 \"26.85\" 0 \"0.001\" 0 \"1 pA\" 0 \"1 uV\" 0 \"no\" 0 \"150\" 0 \"no\" 0 \"none\" 0 \"CroutLU\" 0>\n"; s += "\n"; - s += QString("\n").arg(20+dx); - s += QString("\n").arg(20+dx); + s += QStringLiteral("\n").arg(20+dx); + s += QStringLiteral("\n").arg(20+dx); for (int i=1; i<=N2ord; i++) { stage = Sections.at(i-1); QString suffix1, suffix2; double C1 = autoscaleCapacitor(stage.C1,suffix1); double C2 = autoscaleCapacitor(stage.C2,suffix2); - s += QString("\n").arg(stage.N).arg(370+dx); - s += QString("\n").arg(270+dx); - s += QString("\n").arg(320+dx); - s += QString("\n").arg(3+(i-1)*N_R).arg(320+dx).arg(stage.R3,0,'f',3); - s += QString("\n").arg(2+(i-1)*N_C).arg(200+dx).arg(C2,0,'f',3).arg(suffix2); - s += QString("\n").arg(1+(i-1)*N_C).arg(100+dx).arg(C1,0,'f',3).arg(suffix1); - s += QString("\n").arg(2+(i-1)*N_R).arg(270+dx).arg(stage.R2,0,'f',3); - s += QString("\n").arg(1+(i-1)*N_R).arg(330+dx).arg(stage.R1,0,'f',3); - s += QString("\n").arg(4+(i-1)*N_R).arg(410+dx).arg(stage.R4,0,'f',3); + s += QStringLiteral("\n").arg(stage.N).arg(370+dx); + s += QStringLiteral("\n").arg(270+dx); + s += QStringLiteral("\n").arg(320+dx); + s += QStringLiteral("\n").arg(3+(i-1)*N_R).arg(320+dx).arg(stage.R3,0,'f',3); + s += QStringLiteral("\n").arg(2+(i-1)*N_C).arg(200+dx).arg(C2,0,'f',3).arg(suffix2); + s += QStringLiteral("\n").arg(1+(i-1)*N_C).arg(100+dx).arg(C1,0,'f',3).arg(suffix1); + s += QStringLiteral("\n").arg(2+(i-1)*N_R).arg(270+dx).arg(stage.R2,0,'f',3); + s += QStringLiteral("\n").arg(1+(i-1)*N_R).arg(330+dx).arg(stage.R1,0,'f',3); + s += QStringLiteral("\n").arg(4+(i-1)*N_R).arg(410+dx).arg(stage.R4,0,'f',3); dx += 510; } @@ -296,35 +296,35 @@ void SallenKey::createHighPassSchematic(QString &s) s += "\n"; s += "\n"; dx = 0; - s += QString("<%1 190 %2 230 \"\" 0 0 0 \"\">\n").arg(20+dx).arg(20+dx); - s += QString("<%1 190 %2 190 \"in\" %3 160 18 \"\">\n").arg(20+dx).arg(70+dx).arg(70+dx); + s += QStringLiteral("<%1 190 %2 230 \"\" 0 0 0 \"\">\n").arg(20+dx).arg(20+dx); + s += QStringLiteral("<%1 190 %2 190 \"in\" %3 160 18 \"\">\n").arg(20+dx).arg(70+dx).arg(70+dx); for (int i=1; i<=N2ord; i++) { if (i!=1) { - s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx); - s += QString("<%1 190 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20); - s += QString("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-50); + s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx); + s += QStringLiteral("<%1 190 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20); + s += QStringLiteral("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-50); } - s += QString("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(460+dx); + s += QStringLiteral("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(460+dx); if ((2*i)==order) { - s += QString("<%1 70 %2 160 \"out\" %3 90 51 \"\">\n").arg(460+dx).arg(460+dx).arg(490+dx); + s += QStringLiteral("<%1 70 %2 160 \"out\" %3 90 51 \"\">\n").arg(460+dx).arg(460+dx).arg(490+dx); } else { - s += QString("<%1 70 %2 160 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx); + s += QStringLiteral("<%1 70 %2 160 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx); } - s += QString("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(410+dx).arg(460+dx); - s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(460+dx); - s += QString("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx); - s += QString("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx); - s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(230+dx).arg(270+dx); - s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(150+dx); - s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(170+dx); - s += QString("<%1 70 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx); - s += QString("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(300+dx); - s += QString("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx); - s += QString("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(340+dx); - s += QString("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); - s += QString("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(340+dx); - s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(380+dx); - s += QString("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); + s += QStringLiteral("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(410+dx).arg(460+dx); + s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(460+dx); + s += QStringLiteral("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx); + s += QStringLiteral("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx); + s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(230+dx).arg(270+dx); + s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(150+dx); + s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(170+dx); + s += QStringLiteral("<%1 70 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx); + s += QStringLiteral("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(300+dx); + s += QStringLiteral("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx); + s += QStringLiteral("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(340+dx); + s += QStringLiteral("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); + s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(340+dx); + s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(380+dx); + s += QStringLiteral("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); dx += 510; } @@ -348,26 +348,26 @@ void SallenKey::createLowPassSchematic(QString &s) s += PACKAGE_VERSION; s += ">\n"; s += "\n"; - s += QString("<.AC AC1 1 30 410 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0); + s += QStringLiteral("<.AC AC1 1 30 410 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((10.0*Fc)/1000.0); s += "<.DC DC1 1 280 410 0 61 0 0 \"26.85\" 0 \"0.001\" 0 \"1 pA\" 0 \"1 uV\" 0 \"no\" 0 \"150\" 0 \"no\" 0 \"none\" 0 \"CroutLU\" 0>\n"; s += "\n"; - s += QString("\n").arg(20+dx); - s += QString("\n").arg(20+dx); + s += QStringLiteral("\n").arg(20+dx); + s += QStringLiteral("\n").arg(20+dx); for (int i=1; i<=N2ord; i++) { stage = Sections.at(i-1); //qDebug()<\n").arg(stage.N).arg(370+dx); - s += QString("\n").arg(270+dx); - s += QString("\n").arg(320+dx); - s += QString("\n").arg(2+(i-1)*N_C).arg(330+dx).arg(C2,0,'f',3).arg(suffix2); - s += QString("\n").arg(1+(i-1)*N_C).arg(270+dx).arg(C1,0,'f',3).arg(suffix1); - s += QString("\n").arg(2+(i-1)*N_R).arg(200+dx).arg(stage.R2,0,'f',3); - s += QString("\n").arg(1+(i-1)*N_R).arg(100+dx).arg(stage.R1,0,'f',3); - s += QString("\n").arg(3+(i-1)*N_R).arg(320+dx).arg(stage.R3,0,'f',3); - s += QString("\n").arg(4+(i-1)*N_R).arg(410+dx).arg(stage.R4,0,'f',3); + s += QStringLiteral("\n").arg(stage.N).arg(370+dx); + s += QStringLiteral("\n").arg(270+dx); + s += QStringLiteral("\n").arg(320+dx); + s += QStringLiteral("\n").arg(2+(i-1)*N_C).arg(330+dx).arg(C2,0,'f',3).arg(suffix2); + s += QStringLiteral("\n").arg(1+(i-1)*N_C).arg(270+dx).arg(C1,0,'f',3).arg(suffix1); + s += QStringLiteral("\n").arg(2+(i-1)*N_R).arg(200+dx).arg(stage.R2,0,'f',3); + s += QStringLiteral("\n").arg(1+(i-1)*N_R).arg(100+dx).arg(stage.R1,0,'f',3); + s += QStringLiteral("\n").arg(3+(i-1)*N_R).arg(320+dx).arg(stage.R3,0,'f',3); + s += QStringLiteral("\n").arg(4+(i-1)*N_R).arg(410+dx).arg(stage.R4,0,'f',3); dx += 510; } @@ -378,35 +378,35 @@ void SallenKey::createLowPassSchematic(QString &s) s += "\n"; s += "\n"; dx = 0; - s += QString("<%1 190 %2 230 \"\" 0 0 0 \"\">\n").arg(20+dx).arg(20+dx); - s += QString("<%1 190 %2 190 \"in\" %3 160 18 \"\">\n").arg(20+dx).arg(70+dx).arg(70+dx); + s += QStringLiteral("<%1 190 %2 230 \"\" 0 0 0 \"\">\n").arg(20+dx).arg(20+dx); + s += QStringLiteral("<%1 190 %2 190 \"in\" %3 160 18 \"\">\n").arg(20+dx).arg(70+dx).arg(70+dx); for (int i=1; i<=N2ord; i++) { if (i!=1) { - s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx); - s += QString("<%1 190 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20); - s += QString("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-50); + s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx); + s += QStringLiteral("<%1 190 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20); + s += QStringLiteral("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-50); } - s += QString("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(460+dx); + s += QStringLiteral("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(460+dx); if ((2*i)==order) { - s += QString("<%1 70 %2 160 \"out\" %3 90 51 \"\">\n").arg(460+dx).arg(460+dx).arg(490+dx); + s += QStringLiteral("<%1 70 %2 160 \"out\" %3 90 51 \"\">\n").arg(460+dx).arg(460+dx).arg(490+dx); } else { - s += QString("<%1 70 %2 160 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx); + s += QStringLiteral("<%1 70 %2 160 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx); } - s += QString("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(410+dx).arg(460+dx); - s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(460+dx); - s += QString("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx); - s += QString("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx); - s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(230+dx).arg(270+dx); - s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(150+dx); - s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(170+dx); - s += QString("<%1 70 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx); - s += QString("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(300+dx); - s += QString("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx); - s += QString("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(340+dx); - s += QString("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); - s += QString("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(340+dx); - s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(380+dx); - s += QString("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); + s += QStringLiteral("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(410+dx).arg(460+dx); + s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(460+dx); + s += QStringLiteral("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx); + s += QStringLiteral("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx); + s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(230+dx).arg(270+dx); + s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(150+dx); + s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(170+dx); + s += QStringLiteral("<%1 70 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx); + s += QStringLiteral("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(300+dx); + s += QStringLiteral("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx); + s += QStringLiteral("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(340+dx); + s += QStringLiteral("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); + s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(340+dx); + s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(380+dx); + s += QStringLiteral("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); dx += 510; } @@ -426,28 +426,28 @@ void SallenKey::createBandPassSchematic(QString &s) s += PACKAGE_VERSION; s += ">\n"; s += "\n"; - s += QString("<.AC AC1 1 30 410 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((Fu+1000)/1000.0); + s += QStringLiteral("<.AC AC1 1 30 410 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"501\" 1 \"no\" 0>\n").arg((Fu+1000)/1000.0); s += "<.DC DC1 1 280 410 0 61 0 0 \"26.85\" 0 \"0.001\" 0 \"1 pA\" 0 \"1 uV\" 0 \"no\" 0 \"150\" 0 \"no\" 0 \"none\" 0 \"CroutLU\" 0>\n"; s += "\n"; - s += QString("\n").arg(20+dx); - s += QString("\n").arg(20+dx); + s += QStringLiteral("\n").arg(20+dx); + s += QStringLiteral("\n").arg(20+dx); for (int i=1; i<=Sections.count(); i++) { stage = Sections.at(i-1); //qDebug()<\n").arg(stage.N).arg(370+dx); - s += QString("\n").arg(270+dx); - s += QString("\n").arg(320+dx); - s += QString("\n").arg(150+dx); - s += QString("\n").arg(1+(i-1)*Nc1).arg(150+dx).arg(C1,0,'f',3).arg(suffix1); - s += QString("\n").arg(2+(i-1)*Nr1).arg(200+dx).arg(C2,0,'f',3).arg(suffix2); - s += QString("\n").arg(1+(i-1)*Nr1).arg(100+dx).arg(stage.R1,0,'f',3); - s += QString("\n").arg(2+(i-1)*Nr1).arg(330+dx).arg(stage.R2,0,'f',3); - s += QString("\n").arg(3+(i-1)*Nr1).arg(270+dx).arg(stage.R3,0,'f',3); - s += QString("\n").arg(4+(i-1)*Nr1).arg(320+dx).arg(stage.R4,0,'f',3); - s += QString("\n").arg(5+(i-1)*Nr1).arg(410+dx).arg(stage.R4,0,'f',3); + s += QStringLiteral("\n").arg(stage.N).arg(370+dx); + s += QStringLiteral("\n").arg(270+dx); + s += QStringLiteral("\n").arg(320+dx); + s += QStringLiteral("\n").arg(150+dx); + s += QStringLiteral("\n").arg(1+(i-1)*Nc1).arg(150+dx).arg(C1,0,'f',3).arg(suffix1); + s += QStringLiteral("\n").arg(2+(i-1)*Nr1).arg(200+dx).arg(C2,0,'f',3).arg(suffix2); + s += QStringLiteral("\n").arg(1+(i-1)*Nr1).arg(100+dx).arg(stage.R1,0,'f',3); + s += QStringLiteral("\n").arg(2+(i-1)*Nr1).arg(330+dx).arg(stage.R2,0,'f',3); + s += QStringLiteral("\n").arg(3+(i-1)*Nr1).arg(270+dx).arg(stage.R3,0,'f',3); + s += QStringLiteral("\n").arg(4+(i-1)*Nr1).arg(320+dx).arg(stage.R4,0,'f',3); + s += QStringLiteral("\n").arg(5+(i-1)*Nr1).arg(410+dx).arg(stage.R4,0,'f',3); dx += 510; } @@ -455,36 +455,36 @@ void SallenKey::createBandPassSchematic(QString &s) s += "\n"; s += "\n"; dx = 0; - s += QString("<%1 190 %2 230 \"\" 0 0 0 \"\">\n").arg(20+dx).arg(20+dx); - s += QString("<%1 190 %2 190 \"in\" %3 160 18 \"\">\n").arg(20+dx).arg(70+dx).arg(70+dx); + s += QStringLiteral("<%1 190 %2 230 \"\" 0 0 0 \"\">\n").arg(20+dx).arg(20+dx); + s += QStringLiteral("<%1 190 %2 190 \"in\" %3 160 18 \"\">\n").arg(20+dx).arg(70+dx).arg(70+dx); for (int i=1; i<=Sections.count(); i++) { if (i!=1) { - s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx); - s += QString("<%1 190 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20); - s += QString("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-50); + s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(70+dx); + s += QStringLiteral("<%1 190 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-20); + s += QStringLiteral("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(dx-20).arg(dx-50); } - s += QString("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(460+dx); + s += QStringLiteral("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(460+dx); if (i==order) { - s += QString("<%1 70 %2 160 \"out\" %3 90 51 \"\">\n").arg(460+dx).arg(460+dx).arg(490+dx); + s += QStringLiteral("<%1 70 %2 160 \"out\" %3 90 51 \"\">\n").arg(460+dx).arg(460+dx).arg(490+dx); } else { - s += QString("<%1 70 %2 160 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx); + s += QStringLiteral("<%1 70 %2 160 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx); } - s += QString("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(410+dx).arg(460+dx); - s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(460+dx); - s += QString("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx); - s += QString("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx); - s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(230+dx).arg(270+dx); - s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(150+dx); - s += QString("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(170+dx); - s += QString("<%1 70 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx); - s += QString("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(300+dx); - s += QString("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx); - s += QString("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(340+dx); - s += QString("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); - s += QString("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(340+dx); - s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(380+dx); - s += QString("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); - s += QString("<%1 190 %2 250 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx); + s += QStringLiteral("<%1 160 %2 160 \"\" 0 0 0 \"\">\n").arg(410+dx).arg(460+dx); + s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(460+dx); + s += QStringLiteral("<%1 160 %2 260 \"\" 0 0 0 \"\">\n").arg(460+dx).arg(460+dx); + s += QStringLiteral("<%1 190 %2 210 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx); + s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(230+dx).arg(270+dx); + s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(130+dx).arg(150+dx); + s += QStringLiteral("<%1 190 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(170+dx); + s += QStringLiteral("<%1 70 %2 190 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx); + s += QStringLiteral("<%1 70 %2 70 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(300+dx); + s += QStringLiteral("<%1 140 %2 190 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(270+dx); + s += QStringLiteral("<%1 140 %2 140 \"\" 0 0 0 \"\">\n").arg(270+dx).arg(340+dx); + s += QStringLiteral("<%1 180 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); + s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(340+dx); + s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(380+dx); + s += QStringLiteral("<%1 260 %2 310 \"\" 0 0 0 \"\">\n").arg(320+dx).arg(320+dx); + s += QStringLiteral("<%1 190 %2 250 \"\" 0 0 0 \"\">\n").arg(150+dx).arg(150+dx); dx += 510; } diff --git a/qucs-activefilter/schcauer.cpp b/qucs-activefilter/schcauer.cpp index 45a8f2090..883746181 100644 --- a/qucs-activefilter/schcauer.cpp +++ b/qucs-activefilter/schcauer.cpp @@ -318,7 +318,7 @@ void SchCauer::createGenericSchematic(QString &s) s += "\n"; s += "<.DC DC1 1 40 510 0 61 0 0 \"26.85\" 0 \"0.001\" 0 \"1 pA\" 0 \"1 uV\" 0 \"no\" 0 \"150\" 0 \"no\" 0 \"none\" 0 \"CroutLU\" 0>\n"; s += "\n"; - s += QString("<.AC AC1 1 320 510 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"1001\" 1 \"no\" 0>\n").arg(Fac); + s += QStringLiteral("<.AC AC1 1 320 510 0 61 0 0 \"lin\" 1 \"1 Hz\" 1 \"%1 kHz\" 1 \"1001\" 1 \"no\" 0>\n").arg(Fac); s += "\n"; for (int i=1; i<=N2ord; i++) { @@ -326,23 +326,23 @@ void SchCauer::createGenericSchematic(QString &s) QString suffix1, suffix2; double C1 = autoscaleCapacitor(stage.C1,suffix1); double C2 = autoscaleCapacitor(stage.C2,suffix2); - s += QString("\n").arg(1+(i-1)*Nop1).arg(270+dx); - s += QString("\n").arg(2+(i-1)*Nop1).arg(300+dx); - s += QString("\n").arg(3+(i-1)*Nop1).arg(560+dx); - s += QString("\n").arg(1+(i-1)*Nc1).arg(330+dx).arg(C1,0,'f',3).arg(suffix1); - s += QString("\n").arg(2+(i-1)*Nc1).arg(450+dx).arg(C2,0,'f',3).arg(suffix2); - s += QString("\n").arg(1+(i-1)*Nr1).arg(180+dx).arg(stage.R1,0,'f',3); - s += QString("\n").arg(2+(i-1)*Nr1).arg(410+dx).arg(stage.R2,0,'f',3); - s += QString("\n").arg(3+(i-1)*Nr1).arg(440+dx).arg(stage.R3,0,'f',3); - s += QString("\n").arg(4+(i-1)*Nr1).arg(360+dx).arg(stage.R4,0,'f',3); - s += QString("\n").arg(5+(i-1)*Nr1).arg(190+dx).arg(stage.R5,0,'f',3); - s += QString("\n").arg(240+dx); - s += QString("\n").arg(250+dx); + s += QStringLiteral("\n").arg(1+(i-1)*Nop1).arg(270+dx); + s += QStringLiteral("\n").arg(2+(i-1)*Nop1).arg(300+dx); + s += QStringLiteral("\n").arg(3+(i-1)*Nop1).arg(560+dx); + s += QStringLiteral("\n").arg(1+(i-1)*Nc1).arg(330+dx).arg(C1,0,'f',3).arg(suffix1); + s += QStringLiteral("\n").arg(2+(i-1)*Nc1).arg(450+dx).arg(C2,0,'f',3).arg(suffix2); + s += QStringLiteral("\n").arg(1+(i-1)*Nr1).arg(180+dx).arg(stage.R1,0,'f',3); + s += QStringLiteral("\n").arg(2+(i-1)*Nr1).arg(410+dx).arg(stage.R2,0,'f',3); + s += QStringLiteral("\n").arg(3+(i-1)*Nr1).arg(440+dx).arg(stage.R3,0,'f',3); + s += QStringLiteral("\n").arg(4+(i-1)*Nr1).arg(360+dx).arg(stage.R4,0,'f',3); + s += QStringLiteral("\n").arg(5+(i-1)*Nr1).arg(190+dx).arg(stage.R5,0,'f',3); + s += QStringLiteral("\n").arg(240+dx); + s += QStringLiteral("\n").arg(250+dx); if ((ftype==Filter::BandPass)||(ftype==Filter::BandStop)) { - s += QString("\n").arg(500+dx); - s += QString("\n").arg(6+(i-1)*Nr1).arg(570+dx).arg(stage.R6,0,'f',3); - s += QString("\n").arg(7+(i+1)*Nr1).arg(500+dx).arg(stage.R6,0,'f',3); + s += QStringLiteral("\n").arg(500+dx); + s += QStringLiteral("\n").arg(6+(i-1)*Nr1).arg(570+dx).arg(stage.R6,0,'f',3); + s += QStringLiteral("\n").arg(7+(i+1)*Nr1).arg(500+dx).arg(stage.R6,0,'f',3); } dx += 580; @@ -369,32 +369,32 @@ void SchCauer::createGenericSchematic(QString &s) for (int i=1; i<=N2ord; i++) { if (i!=1) { - s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(dx+30).arg(140+dx); + s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(dx+30).arg(140+dx); } - s += QString("<%1 220 %2 220 \"\" 0 0 0 \"\">\n").arg(210+dx).arg(220+dx); - s += QString("<%1 280 %2 370 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(500+dx); - s += QString("<%1 280 %2 280 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(530+dx); - s += QString("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(600+dx).arg(610+dx); - s += QString("<%1 260 %2 370 \"\" 0 0 0 \"\">\n").arg(610+dx).arg(610+dx); + s += QStringLiteral("<%1 220 %2 220 \"\" 0 0 0 \"\">\n").arg(210+dx).arg(220+dx); + s += QStringLiteral("<%1 280 %2 370 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(500+dx); + s += QStringLiteral("<%1 280 %2 280 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(530+dx); + s += QStringLiteral("<%1 260 %2 260 \"\" 0 0 0 \"\">\n").arg(600+dx).arg(610+dx); + s += QStringLiteral("<%1 260 %2 370 \"\" 0 0 0 \"\">\n").arg(610+dx).arg(610+dx); if ((ftype==Filter::BandPass)||(ftype==Filter::BandStop)) { - s += QString("<%1 370 %2 410 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(500+dx); - s += QString("<%1 370 %2 370 \"\" 0 0 0 \"\">\n").arg(600+dx).arg(610+dx); - s += QString("<%1 370 %2 370 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(540+dx); + s += QStringLiteral("<%1 370 %2 410 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(500+dx); + s += QStringLiteral("<%1 370 %2 370 \"\" 0 0 0 \"\">\n").arg(600+dx).arg(610+dx); + s += QStringLiteral("<%1 370 %2 370 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(540+dx); } else { - s += QString("<%1 370 %2 370 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(610+dx); + s += QStringLiteral("<%1 370 %2 370 \"\" 0 0 0 \"\">\n").arg(500+dx).arg(610+dx); } - s += QString("<%1 240 %2 240 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(480+dx); - s += QString("<%1 400 %2 400 \"\" 0 0 0 \"\">\n").arg(340+dx).arg(420+dx); - s += QString("<%1 380 %2 380 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(260+dx); - s += QString("<%1 380 %2 380 \"\" 0 0 0 \"\">\n").arg(260+dx).arg(270+dx); - s += QString("<%1 150 %2 220 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx); - s += QString("<%1 150 %2 150 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(300+dx); - s += QString("<%1 240 %2 240 \"\" 0 0 0 \"\">\n").arg(310+dx).arg(380+dx); - s += QString("<%1 260 %2 290 \"\" 0 0 0 \"\">\n").arg(240+dx).arg(240+dx); - s += QString("<%1 220 %2 220 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(240+dx); - s += QString("<%1 420 %2 420 \"\" 0 0 0 \"\">\n").arg(250+dx).arg(270+dx); - s += QString("<%1 420 %2 440 \"\" 0 0 0 \"\">\n").arg(250+dx).arg(250+dx); + s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0 \"\">\n").arg(440+dx).arg(480+dx); + s += QStringLiteral("<%1 400 %2 400 \"\" 0 0 0 \"\">\n").arg(340+dx).arg(420+dx); + s += QStringLiteral("<%1 380 %2 380 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(260+dx); + s += QStringLiteral("<%1 380 %2 380 \"\" 0 0 0 \"\">\n").arg(260+dx).arg(270+dx); + s += QStringLiteral("<%1 150 %2 220 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx); + s += QStringLiteral("<%1 150 %2 150 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(300+dx); + s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0 \"\">\n").arg(310+dx).arg(380+dx); + s += QStringLiteral("<%1 260 %2 290 \"\" 0 0 0 \"\">\n").arg(240+dx).arg(240+dx); + s += QStringLiteral("<%1 220 %2 220 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(240+dx); + s += QStringLiteral("<%1 420 %2 420 \"\" 0 0 0 \"\">\n").arg(250+dx).arg(270+dx); + s += QStringLiteral("<%1 420 %2 440 \"\" 0 0 0 \"\">\n").arg(250+dx).arg(250+dx); int n; if ((ftype==Filter::BandPass)||(ftype==Filter::BandStop)) { @@ -403,25 +403,25 @@ void SchCauer::createGenericSchematic(QString &s) n = 2*i; } if (n==order) { - s += QString("<%1 110 %2 260 \"out\" %3 160 101 \"\">\n").arg(610+dx).arg(610+dx).arg(540+dx); + s += QStringLiteral("<%1 110 %2 260 \"out\" %3 160 101 \"\">\n").arg(610+dx).arg(610+dx).arg(540+dx); } else { - s += QString("<%1 110 %2 260 \"\" 0 0 0 \"\">\n").arg(610+dx).arg(610+dx); + s += QStringLiteral("<%1 110 %2 260 \"\" 0 0 0 \"\">\n").arg(610+dx).arg(610+dx); } - s += QString("<%1 110 %2 110 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(610+dx); - s += QString("<%1 110 %2 150 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx); - s += QString("<%1 110 %2 110 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(410+dx); - s += QString("<%1 220 %2 220 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(150+dx); - s += QString("<%1 220 %2 260 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(140+dx); - s += QString("<%1 260 %2 380 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(140+dx); - s += QString("<%1 380 %2 380 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(160+dx); - s += QString("<%1 240 %2 240 \"\" 0 0 0 \"\">\n").arg(480+dx).arg(530+dx); - s += QString("<%1 240 %2 400 \"\" 0 0 0 \"\">\n").arg(480+dx).arg(480+dx); - s += QString("<%1 320 %2 400 \"\" 0 0 0 \"\">\n").arg(420+dx).arg(420+dx); - s += QString("<%1 320 %2 320 \"\" 0 0 0 \"\">\n").arg(390+dx).arg(420+dx); - s += QString("<%1 320 %2 380 \"\" 0 0 0 \"\">\n").arg(260+dx).arg(260+dx); - s += QString("<%1 320 %2 320 \"\" 0 0 0 \"\">\n").arg(260+dx).arg(330+dx); - s += QString("<%1 150 %2 150 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(380+dx); - s += QString("<%1 150 %2 240 \"\" 0 0 0 \"\">\n").arg(380+dx).arg(380+dx); + s += QStringLiteral("<%1 110 %2 110 \"\" 0 0 0 \"\">\n").arg(470+dx).arg(610+dx); + s += QStringLiteral("<%1 110 %2 150 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(220+dx); + s += QStringLiteral("<%1 110 %2 110 \"\" 0 0 0 \"\">\n").arg(220+dx).arg(410+dx); + s += QStringLiteral("<%1 220 %2 220 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(150+dx); + s += QStringLiteral("<%1 220 %2 260 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(140+dx); + s += QStringLiteral("<%1 260 %2 380 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(140+dx); + s += QStringLiteral("<%1 380 %2 380 \"\" 0 0 0 \"\">\n").arg(140+dx).arg(160+dx); + s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0 \"\">\n").arg(480+dx).arg(530+dx); + s += QStringLiteral("<%1 240 %2 400 \"\" 0 0 0 \"\">\n").arg(480+dx).arg(480+dx); + s += QStringLiteral("<%1 320 %2 400 \"\" 0 0 0 \"\">\n").arg(420+dx).arg(420+dx); + s += QStringLiteral("<%1 320 %2 320 \"\" 0 0 0 \"\">\n").arg(390+dx).arg(420+dx); + s += QStringLiteral("<%1 320 %2 380 \"\" 0 0 0 \"\">\n").arg(260+dx).arg(260+dx); + s += QStringLiteral("<%1 320 %2 320 \"\" 0 0 0 \"\">\n").arg(260+dx).arg(330+dx); + s += QStringLiteral("<%1 150 %2 150 \"\" 0 0 0 \"\">\n").arg(360+dx).arg(380+dx); + s += QStringLiteral("<%1 150 %2 240 \"\" 0 0 0 \"\">\n").arg(380+dx).arg(380+dx); dx +=580; } diff --git a/qucs-attenuator/attenuatorfunc.cpp b/qucs-attenuator/attenuatorfunc.cpp index 5f5cf16fe..bc2274d2d 100644 --- a/qucs-attenuator/attenuatorfunc.cpp +++ b/qucs-attenuator/attenuatorfunc.cpp @@ -199,9 +199,9 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) switch(ATT->Topology) { case PI_TYPE: - *s += QString("\n").arg(QString::number(ATT->R1, 'f', 1)); - *s += QString("\n").arg(QString::number(ATT->R2, 'f', 1)); - *s += QString("\n").arg(QString::number(ATT->R3, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R1, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R2, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R3, 'f', 1)); *s += "\n"; *s += "\n"; if (SP_box) @@ -216,11 +216,11 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; // Input term - *s += QString("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zin); *s += "\n"; // Output term - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zout); *s += "\n"; } *s += "\n"; @@ -244,20 +244,20 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; *s += "\n"; *s += "\n"; - *s += QString("\n").arg(ATT->Attenuation); + *s += QStringLiteral("\n").arg(ATT->Attenuation); if (!SP_box) {// If the SP simulation box option is activated, then the input and output ports are attached. // Thus, it doesn't make sense to have a text field indicating the input/output impedance - *s += QString("\n").arg(ATT->Zin); - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zout); } *s += "\n"; break; case TEE_TYPE: - *s += QString("\n").arg(QString::number(ATT->R1, 'f', 1)); - *s += QString("\n").arg(QString::number(ATT->R2, 'f', 1)); - *s += QString("\n").arg(QString::number(ATT->R3, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R1, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R2, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R3, 'f', 1)); *s += "\n"; if (SP_box) { @@ -271,11 +271,11 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; // Input term - *s += QString("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zin); *s += "\n"; // Output term - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zout); *s += "\n"; } *s +="\n"; @@ -298,21 +298,21 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; *s += "\n"; *s += "\n"; - *s += QString("\n").arg(ATT->Attenuation); + *s += QStringLiteral("\n").arg(ATT->Attenuation); if (!SP_box) {// If the SP simulation box option is activated, then the input and output ports are attached. // Thus, it doesn't make sense to have a text field indicating the input/output impedance - *s += QString("\n").arg(ATT->Zin); - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zout); } *s += "\n"; break; case BRIDGE_TYPE: - *s += QString("\n").arg(QString::number(ATT->R1, 'f', 1)); - *s += QString("\n").arg(ATT->Zin); - *s += QString("\n").arg(ATT->Zout); - *s += QString("\n").arg(QString::number(ATT->R2, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R1, 'f', 1)); + *s += QStringLiteral("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(QString::number(ATT->R2, 'f', 1)); *s += "\n"; if (SP_box) { @@ -326,11 +326,11 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; // Input term - *s += QString("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zin); *s += "\n"; // Output term - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zout); *s += "\n"; } *s += "\n"; @@ -355,21 +355,21 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; *s += "\n"; *s += "\n"; - *s += QString("\n").arg(ATT->Attenuation); + *s += QStringLiteral("\n").arg(ATT->Attenuation); if (!SP_box) {// If the SP simulation box option is activated, then the input and output ports are attached. // Thus, it doesn't make sense to have a text field indicating the input/output impedance - *s += QString("\n").arg(ATT->Zin); - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zout); } *s += "\n"; break; case REFLECTION_TYPE: - *s += QString("\n").arg(QString::number(ATT->R1, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R1, 'f', 1)); *s += "\n"; - *s += QString("\n").arg(ATT->Zin); - *s += QString("\n").arg(QString::number(ATT->R1, 'f', 1)); + *s += QStringLiteral("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(QString::number(ATT->R1, 'f', 1)); *s += "\n"; if (SP_box) @@ -378,17 +378,17 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) //----------------------------- // Resistor attenuators are broadband ckts, so it's pointless to ask the user to input the analysis freq sweep. Let's do a wideband // sweep and then the user can modify that in the schematic - *s += QString("<.SP SP1 1 80 400 0 83 0 0 \"lin\" 1 \"50 MHz\" 1 \"3 GHz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0 \"no\" 0 \"no\" 0>\n"); + *s += QStringLiteral("<.SP SP1 1 80 400 0 83 0 0 \"lin\" 1 \"50 MHz\" 1 \"3 GHz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0 \"no\" 0 \"no\" 0>\n"); // Equations *s += "\n"; // Input term - *s += QString("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zin); *s += "\n"; // Output term - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zout); *s += "\n"; } *s += "\n"; @@ -421,12 +421,12 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; *s += "\n"; *s += "\n"; - *s += QString("\n").arg(ATT->Attenuation); + *s += QStringLiteral("\n").arg(ATT->Attenuation); if (!SP_box) {// If the SP simulation box option is activated, then the input and output ports are attached. // Thus, it doesn't make sense to have a text field indicating the input/output impedance - *s += QString("\n").arg(ATT->Zin); - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zout); } *s += "\n"; @@ -436,20 +436,20 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) if (ATT->useLumped) { double w = 2*PI*ATT->freq; - *s += QString("\n").arg(num2str(ATT->Zin/w)); - *s += QString("\n").arg(num2str(1/(ATT->Zin*w))); + *s += QStringLiteral("\n").arg(num2str(ATT->Zin/w)); + *s += QStringLiteral("\n").arg(num2str(1/(ATT->Zin*w))); *s += "\n"; - *s += QString("\n").arg(num2str(1/(ATT->Zin*w))); + *s += QStringLiteral("\n").arg(num2str(1/(ATT->Zin*w))); *s += "\n"; } else { - *s += QString("\n").arg(ATT->Zin).arg(QString::number(ATT->L*1e3, 'f', 1)); + *s += QStringLiteral("\n").arg(ATT->Zin).arg(QString::number(ATT->L*1e3, 'f', 1)); } - *s += QString("\n").arg(QString::number(ATT->R1, 'f', 1)); - *s += QString("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(QString::number(ATT->R1, 'f', 1)); + *s += QStringLiteral("\n").arg(ATT->Zin); *s += "\n"; - *s += QString("\n").arg(QString::number(ATT->R1, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R1, 'f', 1)); *s += "\n"; if (SP_box) @@ -457,19 +457,19 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) // S-parameter simulation block //----------------------------- // The quarter-wave line is a narrowband device... so let's set the SP sweep from f0/2 to 3*f0/2 - QString freq_start = QString("%1").arg(0.5*ATT->freq*1e-6);//MHz - QString freq_stop = QString("%1").arg(1.5*ATT->freq*1e-6);//MHz - *s += QString("<.SP SP1 1 100 270 0 83 0 0 \"lin\" 1 \"%1 MHz\" 1 \"%2 MHz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0 \"no\" 0 \"no\" 0>\n").arg(freq_start).arg(freq_stop); + QString freq_start = QStringLiteral("%1").arg(0.5*ATT->freq*1e-6);//MHz + QString freq_stop = QStringLiteral("%1").arg(1.5*ATT->freq*1e-6);//MHz + *s += QStringLiteral("<.SP SP1 1 100 270 0 83 0 0 \"lin\" 1 \"%1 MHz\" 1 \"%2 MHz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0 \"no\" 0 \"no\" 0>\n").arg(freq_start).arg(freq_stop); // Equations *s += "\n"; // Input term - *s += QString("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zin); *s += "\n"; // Output term - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zout); *s += "\n"; } *s += "\n"; @@ -502,14 +502,14 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; //In the case of the Pi-equivalent of the quarter wavelength line it is needed to put the title slighly higher. - if (ATT->useLumped) *s += QString("\n").arg(ATT->Attenuation).arg(num2str(ATT->freq)); - else *s += QString("\n").arg(ATT->Attenuation).arg(num2str(ATT->freq)); + if (ATT->useLumped) *s += QStringLiteral("\n").arg(ATT->Attenuation).arg(num2str(ATT->freq)); + else *s += QStringLiteral("\n").arg(ATT->Attenuation).arg(num2str(ATT->freq)); if (!SP_box) {// If the SP simulation box option is activated, then the input and output ports are attached. // Thus, it doesn't make sense to have a text field indicating the input/output impedance - *s += QString("\n").arg(ATT->Zin); - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zout); } *s += "\n"; break; @@ -517,40 +517,40 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) if (ATT->useLumped) { double w = 2*PI*ATT->freq; - *s += QString("\n").arg(num2str(ATT->Zin/w)); - *s += QString("\n").arg(num2str(1/(ATT->Zin*w))); + *s += QStringLiteral("\n").arg(num2str(ATT->Zin/w)); + *s += QStringLiteral("\n").arg(num2str(1/(ATT->Zin*w))); *s += "\n"; - *s += QString("\n").arg(num2str(1/(ATT->Zin*w))); + *s += QStringLiteral("\n").arg(num2str(1/(ATT->Zin*w))); *s += "\n"; } else { - *s += QString("\n").arg(ATT->Zin).arg(QString::number(ATT->L*1e3, 'f', 1)); + *s += QStringLiteral("\n").arg(ATT->Zin).arg(QString::number(ATT->L*1e3, 'f', 1)); } - *s += QString("\n").arg(QString::number(ATT->R1, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R1, 'f', 1)); *s += "\n"; - *s += QString("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zin); *s += "\n"; - *s += QString("\n").arg(QString::number(ATT->R1, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R1, 'f', 1)); if (SP_box) { // S-parameter simulation block //----------------------------- // The quarter-wave line is a narrowband device... so let's set the SP sweep from f0/2 to 3*f0/2 - QString freq_start = QString("%1").arg(0.5*ATT->freq*1e-6);//MHz - QString freq_stop = QString("%1").arg(1.5*ATT->freq*1e-6);//MHz - *s += QString("<.SP SP1 1 100 270 0 83 0 0 \"lin\" 1 \"%1 MHz\" 1 \"%2 MHz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0 \"no\" 0 \"no\" 0>\n").arg(freq_start).arg(freq_stop); + QString freq_start = QStringLiteral("%1").arg(0.5*ATT->freq*1e-6);//MHz + QString freq_stop = QStringLiteral("%1").arg(1.5*ATT->freq*1e-6);//MHz + *s += QStringLiteral("<.SP SP1 1 100 270 0 83 0 0 \"lin\" 1 \"%1 MHz\" 1 \"%2 MHz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0 \"no\" 0 \"no\" 0>\n").arg(freq_start).arg(freq_stop); // Equations *s += "\n"; // Input term - *s += QString("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zin); *s += "\n"; // Output term - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zout); *s += "\n"; } *s += "\n"; @@ -594,20 +594,20 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; //Put the title a little bit higher because of the shunt cpa - if (ATT->useLumped) *s += QString("\n").arg(ATT->Attenuation).arg(num2str(ATT->freq)); - else *s += QString("\n").arg(ATT->Attenuation).arg(num2str(ATT->freq)); + if (ATT->useLumped) *s += QStringLiteral("\n").arg(ATT->Attenuation).arg(num2str(ATT->freq)); + else *s += QStringLiteral("\n").arg(ATT->Attenuation).arg(num2str(ATT->freq)); if (!SP_box) {// If the SP simulation box option is activated, then the input and output ports are attached. // Thus, it doesn't make sense to have a text field indicating the input/output impedance - *s += QString("\n").arg(ATT->Zin); - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zout); } *s += "\n"; break; case L_PAD_1ST_SERIES: - *s += QString("\n").arg(QString::number(ATT->R1, 'f', 1)); - *s += QString("\n").arg(QString::number(ATT->R2, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R1, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R2, 'f', 1)); *s += "\n"; if (SP_box) { @@ -621,11 +621,11 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; // Input term - *s += QString("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zin); *s += "\n"; // Output term - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zout); *s += "\n"; } *s += "\n"; @@ -648,19 +648,19 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; *s += "\n"; *s += "\n"; - *s += QString("\n").arg(ATT->Attenuation); + *s += QStringLiteral("\n").arg(ATT->Attenuation); if (!SP_box) {// If the SP simulation box option is activated, then the input and output ports are attached. // Thus, it doesn't make sense to have a text field indicating the input/output impedance - *s += QString("\n").arg(ATT->Zin); - *s += QString("\n").arg(QString::number(ATT->R3, 'f', 1)); + *s += QStringLiteral("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(QString::number(ATT->R3, 'f', 1)); } *s += "\n"; break; case L_PAD_1ST_SHUNT: - *s += QString("\n").arg(QString::number(ATT->R1, 'f', 1)); - *s += QString("\n").arg(QString::number(ATT->R2, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R1, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R2, 'f', 1)); *s += "\n"; if (SP_box) @@ -675,11 +675,11 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; // Input term - *s += QString("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zin); *s += "\n"; // Output term - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zout); *s += "\n"; } *s += "\n"; @@ -702,17 +702,17 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; *s += "\n"; *s += "\n"; - *s += QString("\n").arg(ATT->Attenuation); + *s += QStringLiteral("\n").arg(ATT->Attenuation); if (!SP_box) {// If the SP simulation box option is activated, then the input and output ports are attached. // Thus, it doesn't make sense to have a text field indicating the input/output impedance - *s += QString("\n").arg(ATT->Zin); - *s += QString("\n").arg(QString::number(ATT->R3, 'f', 1)); + *s += QStringLiteral("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(QString::number(ATT->R3, 'f', 1)); } *s += "\n"; break; case R_SERIES: - *s += QString("\n").arg(QString::number(ATT->R1, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R1, 'f', 1)); if (SP_box) { // S-parameter simulation block @@ -725,11 +725,11 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; // Input term - *s += QString("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zin); *s += "\n"; // Output term - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zout); *s += "\n"; } *s += "\n"; @@ -752,19 +752,19 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; *s += "\n"; *s += "\n"; - *s += QString("\n").arg(ATT->Attenuation); + *s += QStringLiteral("\n").arg(ATT->Attenuation); if (!SP_box) {// If the SP simulation box option is activated, then the input and output ports are attached. // Thus, it doesn't make sense to have a text field indicating the input/output impedance - *s += QString("\n").arg(ATT->Zin); - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zout); } *s += "\n"; break; case R_SHUNT: - *s += QString("\n").arg(QString::number(ATT->R1, 'f', 1)); + *s += QStringLiteral("\n").arg(QString::number(ATT->R1, 'f', 1)); *s += "\n"; if (SP_box) { @@ -778,11 +778,11 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; // Input term - *s += QString("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zin); *s += "\n"; // Output term - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zout); *s += "\n"; } *s += "\n"; @@ -804,12 +804,12 @@ QString* QUCS_Att::createSchematic(tagATT *ATT, bool SP_box) *s += "\n"; *s += "\n"; *s += "\n"; - *s += QString("\n").arg(ATT->Attenuation); + *s += QStringLiteral("\n").arg(ATT->Attenuation); if (!SP_box) {// If the SP simulation box option is activated, then the input and output ports are attached. // Thus, it doesn't make sense to have a text field indicating the input/output impedance - *s += QString("\n").arg(ATT->Zin); - *s += QString("\n").arg(ATT->Zout); + *s += QStringLiteral("\n").arg(ATT->Zin); + *s += QStringLiteral("\n").arg(ATT->Zout); } *s += "\n"; break; diff --git a/qucs-attenuator/main.cpp b/qucs-attenuator/main.cpp index 6dae9febb..4fb3b4f7b 100644 --- a/qucs-attenuator/main.cpp +++ b/qucs-attenuator/main.cpp @@ -94,7 +94,7 @@ int main( int argc, char ** argv ) QString lang = QucsSettings.Language; if(lang.isEmpty()) lang = QString(QLocale::system().name()); - tor.load( QString("qucs_") + lang, QucsSettings.LangDir); + tor.load( QStringLiteral("qucs_") + lang, QucsSettings.LangDir); a.installTranslator( &tor ); QucsAttenuator *qucs = new QucsAttenuator(); diff --git a/qucs-attenuator/qucsattenuator.cpp b/qucs-attenuator/qucsattenuator.cpp index 73f4f6fbd..68ec7af05 100644 --- a/qucs-attenuator/qucsattenuator.cpp +++ b/qucs-attenuator/qucsattenuator.cpp @@ -171,10 +171,10 @@ QucsAttenuator::QucsAttenuator() powerunits.append("mW"); powerunits.append("W"); powerunits.append("dBm"); - powerunits.append(QString("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))); - powerunits.append(QString("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))); - powerunits.append(QString("dBmV [75%1]").arg(QChar(0xa9, 0x03))); - powerunits.append(QString("dBmV [50%1]").arg(QChar(0xa9, 0x03))); + powerunits.append(QStringLiteral("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))); + powerunits.append(QStringLiteral("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))); + powerunits.append(QStringLiteral("dBmV [75%1]").arg(QChar(0xa9, 0x03))); + powerunits.append(QStringLiteral("dBmV [50%1]").arg(QChar(0xa9, 0x03))); Combo_InputPowerUnits = new QComboBox(); Combo_InputPowerUnits->addItems(powerunits); Combo_InputPowerUnits->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred); @@ -696,7 +696,7 @@ void QucsAttenuator::slotCalculate() lineEdit_R3->setText(QString::number(Values.R3, 'f', 1)); lineEdit_R4->setText(QString::number(Values.R4, 'f', 1)); - lineEdit_R1_Pdiss->setText(QString::number(ConvertPowerUnits(Values.PR1, QString("W"), ComboR1_PowerUnits->currentText()), 'f', 5)); + lineEdit_R1_Pdiss->setText(QString::number(ConvertPowerUnits(Values.PR1, QStringLiteral("W"), ComboR1_PowerUnits->currentText()), 'f', 5)); lineEdit_R2_Pdiss->setText(QString::number(ConvertPowerUnits(Values.PR2, "W", ComboR2_PowerUnits->currentText()), 'f', 5)); lineEdit_R3_Pdiss->setText(QString::number(ConvertPowerUnits(Values.PR3, "W", ComboR3_PowerUnits->currentText()), 'f', 5)); lineEdit_R4_Pdiss->setText(QString::number(ConvertPowerUnits(Values.PR4, "W", ComboR4_PowerUnits->currentText()), 'f', 5)); @@ -744,7 +744,7 @@ void QucsAttenuator::slot_ComboR1PowerUnits_Changed(const QString& new_units) //Convert power double P = lineEdit_R1_Pdiss->text().toDouble(); P =ConvertPowerUnits(P, LastUnits[1], new_units); - lineEdit_R1_Pdiss->setText(QString("%1").arg(P)); + lineEdit_R1_Pdiss->setText(QStringLiteral("%1").arg(P)); LastUnits[1] = new_units; //Change lineedit input policy @@ -761,7 +761,7 @@ void QucsAttenuator::slot_ComboR2PowerUnits_Changed(const QString& new_units) //Convert power double P = lineEdit_R2_Pdiss->text().toDouble(); P =ConvertPowerUnits(P, LastUnits[2], new_units); - lineEdit_R2_Pdiss->setText(QString("%1").arg(P)); + lineEdit_R2_Pdiss->setText(QStringLiteral("%1").arg(P)); LastUnits[2] = new_units; //Change lineedit input policy @@ -778,7 +778,7 @@ void QucsAttenuator::slot_ComboR3PowerUnits_Changed(const QString& new_units) //Convert power double P = lineEdit_R3_Pdiss->text().toDouble(); P =ConvertPowerUnits(P, LastUnits[3], new_units); - lineEdit_R3_Pdiss->setText(QString("%1").arg(P)); + lineEdit_R3_Pdiss->setText(QStringLiteral("%1").arg(P)); LastUnits[3] = new_units; //Change lineedit input policy @@ -795,7 +795,7 @@ void QucsAttenuator::slot_ComboR4PowerUnits_Changed(const QString& new_units) //Convert power double P = lineEdit_R4_Pdiss->text().toDouble(); P =ConvertPowerUnits(P, LastUnits[4], new_units); - lineEdit_R4_Pdiss->setText(QString("%1").arg(P)); + lineEdit_R4_Pdiss->setText(QStringLiteral("%1").arg(P)); LastUnits[4] = new_units; //Change lineedit input policy @@ -817,16 +817,16 @@ double QucsAttenuator::ConvertPowerUnits(double Pin, QString from_units, QString if (from_units == "dBm") Pin = pow(10, 0.1*(Pin-30));//dBm -> W else - if (from_units == QString("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) + if (from_units == QStringLiteral("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) Pin = pow(10, (0.1*Pin-12))/75;//dBuV [75Ohm] -> W else - if (from_units == QString("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) + if (from_units == QStringLiteral("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) Pin = pow(10, (0.1*Pin-12))/50;//dBuV [50Ohm] -> W else - if (from_units == QString("dBmV [75%2]").arg(QChar(0xa9, 0x03))) + if (from_units == QStringLiteral("dBmV [75%2]").arg(QChar(0xa9, 0x03))) Pin = pow(10, (0.1*Pin-6))/75;//dBmV [75Ohm] -> W else - if (from_units == QString("dBmV [50%2]").arg(QChar(0xa9, 0x03))) + if (from_units == QStringLiteral("dBmV [50%2]").arg(QChar(0xa9, 0x03))) Pin = pow(10, (0.1*Pin-6))/50;//dBmV [50Ohm] -> W else if (from_units == "mW") @@ -842,16 +842,16 @@ double QucsAttenuator::ConvertPowerUnits(double Pin, QString from_units, QString if (to_units == "dBm") return Pin;//Already done else - if (to_units == QString("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) + if (to_units == QStringLiteral("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) Pin += 108.7506126339170004686755011380612925566374910126647878220;//W -> dBuV [75Ohm] else - if (to_units == QString("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) + if (to_units == QStringLiteral("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) Pin += 106.9897000433601880478626110527550697323181011853789145868;//W -> dBuV [50Ohm] else - if (to_units == QString("dBmV [75%2]").arg(QChar(0xa9, 0x03))) + if (to_units == QStringLiteral("dBmV [75%2]").arg(QChar(0xa9, 0x03))) Pin += 48.7506126339170004686755011380612925566374910126647878220;//W -> dBmV [75Ohm] else - if (to_units == QString("dBmV [50%2]").arg(QChar(0xa9, 0x03))) + if (to_units == QStringLiteral("dBmV [50%2]").arg(QChar(0xa9, 0x03))) Pin += 46.9897000433601880478626110527550697323181011853789145868;//W -> dBmV [50Ohm] return Pin; diff --git a/qucs-filter/cline_filter.cpp b/qucs-filter/cline_filter.cpp index c6b257c69..834392c61 100644 --- a/qucs-filter/cline_filter.cpp +++ b/qucs-filter/cline_filter.cpp @@ -39,8 +39,8 @@ QString* CoupledLine_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr x = 60; *s += "\n"; - *s += QString("\n").arg(x).arg(Filter->Impedance); - *s += QString("\n").arg(x); + *s += QStringLiteral("\n").arg(x).arg(Filter->Impedance); + *s += QStringLiteral("\n").arg(x); x -= 30; y = 170; @@ -79,15 +79,15 @@ QString* CoupledLine_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr if(isMicrostrip) { y += 40; len -= dl * Substrate->height; - *s += QString("\n").arg(x).arg(y).arg(num2str(width)).arg(num2str(len)).arg(num2str(gap)); - *s += QString("\n").arg(x-60).arg(y+30).arg(num2str(width)); - *s += QString("\n").arg(x+60).arg(y-30).arg(num2str(width)); + *s += QStringLiteral("\n").arg(x).arg(y).arg(num2str(width)).arg(num2str(len)).arg(num2str(gap)); + *s += QStringLiteral("\n").arg(x-60).arg(y+30).arg(num2str(width)); + *s += QStringLiteral("\n").arg(x+60).arg(y-30).arg(num2str(width)); y += 20; x += 60; } else { y += 20; - *s += QString("\n").arg(x).arg(y).arg(Z0e).arg(Z0o).arg(num2str(len)); + *s += QStringLiteral("\n").arg(x).arg(y).arg(Z0e).arg(Z0o).arg(num2str(len)); } } @@ -96,25 +96,25 @@ QString* CoupledLine_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr x += 20; else x += 80; - *s += QString("\n").arg(x).arg(y+70).arg(Filter->Impedance); - *s += QString("\n").arg(x).arg(y+100); + *s += QStringLiteral("\n").arg(x).arg(y+70).arg(Filter->Impedance); + *s += QStringLiteral("\n").arg(x).arg(y+100); - *s += QString("<.SP SP1 1 70 460 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(2.0 * Filter->Frequency - Filter->Frequency2)).arg(num2str(2.0 * Filter->Frequency2 - Filter->Frequency)); + *s += QStringLiteral("<.SP SP1 1 70 460 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(2.0 * Filter->Frequency - Filter->Frequency2)).arg(num2str(2.0 * Filter->Frequency2 - Filter->Frequency)); if(isMicrostrip) - *s += QString("\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness); - *s += QString("\n"); + *s += QStringLiteral("\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness); + *s += QStringLiteral("\n"); *s += "\n"; *s += "\n"; // connect left source - *s += QString("<60 180 60 350 \"\" 0 0 0>\n"); - *s += QString("<60 180 90 180 \"\" 0 0 0>\n"); + *s += QStringLiteral("<60 180 60 350 \"\" 0 0 0>\n"); + *s += QStringLiteral("<60 180 90 180 \"\" 0 0 0>\n"); // connect right source y += 10; - *s += QString("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x).arg(y).arg(x).arg(y+30); - *s += QString("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x-50).arg(y).arg(x).arg(y); + *s += QStringLiteral("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x).arg(y).arg(x).arg(y+30); + *s += QStringLiteral("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x-50).arg(y).arg(x).arg(y); // wires between components x = 150; @@ -125,7 +125,7 @@ QString* CoupledLine_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr y += 40; } for(i = 0; i < Filter->Order; i++) { - *s += QString("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x).arg(y).arg(x+dx).arg(y); + *s += QStringLiteral("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x).arg(y).arg(x+dx).arg(y); if(isMicrostrip) { x += 150; y += 60; @@ -143,15 +143,15 @@ QString* CoupledLine_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr *s += "\n"; - *s += QString("Type) { - case TYPE_BESSEL: *s += QString("Bessel"); break; - case TYPE_BUTTERWORTH: *s += QString("Butterworth"); break; - case TYPE_CHEBYSHEV: *s += QString("Chebyshev"); break; + case TYPE_BESSEL: *s += QStringLiteral("Bessel"); break; + case TYPE_BUTTERWORTH: *s += QStringLiteral("Butterworth"); break; + case TYPE_CHEBYSHEV: *s += QStringLiteral("Chebyshev"); break; } - *s += QString(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); - *s += QString("Impedance matching %3 Ohm\">\n").arg(Filter->Impedance); + *s += QStringLiteral(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); + *s += QStringLiteral("Impedance matching %3 Ohm\">\n").arg(Filter->Impedance); *s += "\n"; return s; diff --git a/qucs-filter/eqn_filter.cpp b/qucs-filter/eqn_filter.cpp index 4300828c4..beeb238e6 100644 --- a/qucs-filter/eqn_filter.cpp +++ b/qucs-filter/eqn_filter.cpp @@ -50,11 +50,11 @@ QString* Equation_Filter::createSchematic(tFilter *Filter) } // create the Qucs schematic - QString *s = new QString("\n"); + QString *s = new QString("\n"); *s += "\n"; - *s += QString("\n").arg(Filter->Impedance); - *s += QString("\n"); + *s += QStringLiteral("\n").arg(Filter->Impedance); + *s += QStringLiteral("\n"); QString eqn = "2"; // because of 50ohms input and output @@ -77,11 +77,11 @@ QString* Equation_Filter::createSchematic(tFilter *Filter) Omega = 1.0 / Omega; break; case CLASS_BANDPASS: // transform to bandpass - varS = QString("*(S+%1/S)").arg(Omega*Omega); + varS = QStringLiteral("*(S+%1/S)").arg(Omega*Omega); Omega = 0.5 / pi / fabs(Filter->Frequency2 - Filter->Frequency); break; case CLASS_BANDSTOP: // transform to bandstop - varS = QString("/(S+%1/S)").arg(Omega*Omega); + varS = QStringLiteral("/(S+%1/S)").arg(Omega*Omega); Omega = 2.0 * pi * fabs(Filter->Frequency2 - Filter->Frequency); break; } @@ -89,35 +89,35 @@ QString* Equation_Filter::createSchematic(tFilter *Filter) if(Filter->Order & 1) { a = getQuadraticNormValues(0, Filter, b); - eqn += QString(" / (1 + %1%2)").arg(a / Omega).arg(varS); + eqn += QStringLiteral(" / (1 + %1%2)").arg(a / Omega).arg(varS); } for(i = 1; i <= Filter->Order/2; i++) { a = getQuadraticNormValues(i, Filter, b); - eqn += QString(" / (1 + %1%2 + %3%4%5)") + eqn += QStringLiteral(" / (1 + %1%2 + %3%4%5)") .arg(a/Omega).arg(varS).arg(b/Omega/Omega).arg(varS).arg(varS); } - *s += QString("\n").arg(1.0/Filter->Impedance).arg(eqn).arg(Filter->Impedance); + *s += QStringLiteral("\n").arg(1.0/Filter->Impedance).arg(eqn).arg(Filter->Impedance); - *s += QString("\n").arg(Filter->Impedance); - *s += QString("\n"); + *s += QStringLiteral("\n").arg(Filter->Impedance); + *s += QStringLiteral("\n"); if((Filter->Class == CLASS_BANDPASS) || (Filter->Class == CLASS_BANDSTOP)) a = 10.0 * Filter->Frequency2; else a = 10.0 * Filter->Frequency; - *s += QString("<.SP SP1 1 110 160 0 67 0 0 \"log\" 1 \"%1Hz\" 1 \"%2Hz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(0.1*Filter->Frequency)).arg(num2str(a)); - *s += QString("\n"); + *s += QStringLiteral("<.SP SP1 1 110 160 0 67 0 0 \"log\" 1 \"%1Hz\" 1 \"%2Hz\" 1 \"200\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(0.1*Filter->Frequency)).arg(num2str(a)); + *s += QStringLiteral("\n"); *s += "\n"; *s += "\n"; // connect left source - *s += QString("<100 0 230 0 \"\" 0 0 0>\n"); + *s += QStringLiteral("<100 0 230 0 \"\" 0 0 0>\n"); // connect right source - *s += QString("<290 0 400 0 \"\" 0 0 0>\n"); + *s += QStringLiteral("<290 0 400 0 \"\" 0 0 0>\n"); *s += "\n"; @@ -126,24 +126,24 @@ QString* Equation_Filter::createSchematic(tFilter *Filter) *s += "\n"; - *s += QString("Type) { - case TYPE_BESSEL: *s += QString("Bessel "); break; - case TYPE_BUTTERWORTH: *s += QString("Butterworth "); break; - case TYPE_CHEBYSHEV: *s += QString("Chebyshev "); break; + case TYPE_BESSEL: *s += QStringLiteral("Bessel "); break; + case TYPE_BUTTERWORTH: *s += QStringLiteral("Butterworth "); break; + case TYPE_CHEBYSHEV: *s += QStringLiteral("Chebyshev "); break; } switch(Filter->Class) { case CLASS_LOWPASS: - *s += QString("low-pass filter, %1Hz cutoff").arg(num2str(Filter->Frequency)); break; + *s += QStringLiteral("low-pass filter, %1Hz cutoff").arg(num2str(Filter->Frequency)); break; case CLASS_HIGHPASS: - *s += QString("high-pass filter, %1Hz cutoff").arg(num2str(Filter->Frequency)); break; + *s += QStringLiteral("high-pass filter, %1Hz cutoff").arg(num2str(Filter->Frequency)); break; case CLASS_BANDPASS: - *s += QString("band-pass filter, %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break; + *s += QStringLiteral("band-pass filter, %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break; case CLASS_BANDSTOP: - *s += QString("band-reject filter, %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break; + *s += QStringLiteral("band-reject filter, %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break; } - *s += QString(" \\n PI-type, impedance matching %1 Ohm\">\n").arg(Filter->Impedance); + *s += QStringLiteral(" \\n PI-type, impedance matching %1 Ohm\">\n").arg(Filter->Impedance); *s += "\n"; return s; diff --git a/qucs-filter/filter.cpp b/qucs-filter/filter.cpp index f8881a444..ae1396c9d 100644 --- a/qucs-filter/filter.cpp +++ b/qucs-filter/filter.cpp @@ -369,7 +369,7 @@ QString Filter::getLineString(bool isMicrostrip, double width_or_impedance, doub text_x = -30; text_y = -70; } - code = QString("\n") + code = QStringLiteral("\n") .arg(x).arg(y).arg(text_x).arg(text_y).arg(rotate) .arg(QString::number(width_or_impedance*1e3, 'f', 2)).arg(QString::number(l*1e3, 'f', 2)); } @@ -385,7 +385,7 @@ QString Filter::getLineString(bool isMicrostrip, double width_or_impedance, doub text_x = -30; text_y = -60; } - code = QString("\n") + code = QStringLiteral("\n") .arg(x).arg(y).arg(text_x).arg(text_y).arg(rotate).arg(QString::number(width_or_impedance, 'f', 1)).arg(QString::number(l*1e3, 'f', 2)); } return code; @@ -397,19 +397,19 @@ QString Filter::getMS_Via(double height, int x, int y, int rotate) switch (rotate) { case 0: // No rotation - code = QString("\n").arg(x).arg(y).arg(height); + code = QStringLiteral("\n").arg(x).arg(y).arg(height); break; case 1: // CTRL+R - code = QString("\n").arg(x).arg(y).arg(height); + code = QStringLiteral("\n").arg(x).arg(y).arg(height); break; case 2: // 2 x (CTRL+R) - code = QString("\n").arg(x).arg(y).arg(height); + code = QStringLiteral("\n").arg(x).arg(y).arg(height); break; case 3: // 3 x (CTRL+R) - code = QString("\n").arg(x).arg(y).arg(height); + code = QStringLiteral("\n").arg(x).arg(y).arg(height); break; } return code; @@ -421,19 +421,19 @@ QString Filter::getMS_Open(double width, int x, int y, int rotate) switch (rotate) { case 0: // No rotation - code = QString("\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2)); + code = QStringLiteral("\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2)); break; case 1: // CTRL+R - code = QString("\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2)); + code = QStringLiteral("\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2)); break; case 2: // 2 x (CTRL+R) - code = QString("\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2)); + code = QStringLiteral("\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2)); break; case 3: // 3 x (CTRL+R) - code = QString("\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2)); + code = QStringLiteral("\n").arg(x).arg(y).arg(QString::number(width*1e3, 'f', 2)); break; } return code; @@ -441,10 +441,10 @@ QString Filter::getMS_Open(double width, int x, int y, int rotate) QString Filter::getWireString(int x1, int y1, int x2, int y2) { - return QString("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x1).arg(y1).arg(x2).arg(y2); + return QStringLiteral("<%1 %2 %3 %4 \"\" 0 0 0>\n").arg(x1).arg(y1).arg(x2).arg(y2); } QString Filter::getTeeString(int x, int y, double width1, double width2, double width3) { - return QString("\n") + return QStringLiteral("\n") .arg(x).arg(y).arg(QString::number(width1*1e3, 'f', 2)).arg(QString::number(width2*1e3, 'f', 2)).arg(QString::number(width3*1e3, 'f', 2)); } diff --git a/qucs-filter/lc_filter.cpp b/qucs-filter/lc_filter.cpp index cfb77d3d9..334cc172f 100644 --- a/qucs-filter/lc_filter.cpp +++ b/qucs-filter/lc_filter.cpp @@ -66,8 +66,8 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType) x = 20; if(Filter->Class != CLASS_BANDPASS) x += 40; *s += "\n"; - *s += QString("\n").arg(x).arg(Filter->Impedance); - *s += QString("\n").arg(x); + *s += QStringLiteral("\n").arg(x).arg(Filter->Impedance); + *s += QStringLiteral("\n").arg(x); for(i = 0; i < Filter->Order; i++) { x = 100 +((i+1) * 70); @@ -93,18 +93,18 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType) case CLASS_LOWPASS: if(i & 1) - *s += QString("\n").arg(x).arg(yl).arg(num2str(Value)); + *s += QStringLiteral("\n").arg(x).arg(yl).arg(num2str(Value)); else - *s += QString("\n").arg(x).arg(yc).arg(num2str(Value)); + *s += QStringLiteral("\n").arg(x).arg(yc).arg(num2str(Value)); break; case CLASS_HIGHPASS: Value = 1.0 / Omega / Omega / Value; // transform to highpass if(i & 1) - *s += QString("\n").arg(x).arg(yl).arg(num2str(Value)); + *s += QStringLiteral("\n").arg(x).arg(yl).arg(num2str(Value)); else - *s += QString("\n").arg(x).arg(yc).arg(num2str(Value)); + *s += QStringLiteral("\n").arg(x).arg(yc).arg(num2str(Value)); break; @@ -112,12 +112,12 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType) Value /= Bandwidth; // transform to bandpass Value2 = 0.25 / Filter->Frequency / Filter->Frequency2 / pi / pi / Value; if(i & 1) { - *s += QString("\n").arg(x+40).arg(yl).arg(num2str(Value)); - *s += QString("\n").arg(x-20).arg(yl).arg(num2str(Value2)); + *s += QStringLiteral("\n").arg(x+40).arg(yl).arg(num2str(Value)); + *s += QStringLiteral("\n").arg(x-20).arg(yl).arg(num2str(Value2)); } else { - *s += QString("\n").arg(x).arg(yc).arg(num2str(Value2)); - *s += QString("\n").arg(x-30).arg(yc).arg(num2str(Value)); + *s += QStringLiteral("\n").arg(x).arg(yc).arg(num2str(Value2)); + *s += QStringLiteral("\n").arg(x-30).arg(yc).arg(num2str(Value)); } break; @@ -126,12 +126,12 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType) Value2 = 1.0 / Omega / Omega / Bandwidth / Value; // transform to bandstop Value *= 0.5 * fabs(Filter->Frequency2/Filter->Frequency - Filter->Frequency/Filter->Frequency2); if(i & 1) { - *s += QString("\n").arg(x).arg(yl-35).arg(num2str(Value)); - *s += QString("\n").arg(x).arg(yl).arg(num2str(Value2)); + *s += QStringLiteral("\n").arg(x).arg(yl-35).arg(num2str(Value)); + *s += QStringLiteral("\n").arg(x).arg(yl).arg(num2str(Value2)); } else { - *s += QString("\n").arg(x).arg(yc).arg(num2str(Value2)); - *s += QString("\n").arg(x).arg(yc+60).arg(num2str(Value)); + *s += QStringLiteral("\n").arg(x).arg(yc).arg(num2str(Value2)); + *s += QStringLiteral("\n").arg(x).arg(yc+60).arg(num2str(Value)); } yc += 60; break; @@ -139,7 +139,7 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType) } if((i & 1) == 0) - *s += QString("\n").arg(x).arg(yc + 30); + *s += QStringLiteral("\n").arg(x).arg(yc + 30); if(!piType) i--; @@ -155,8 +155,8 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType) if((Filter->Order & 1) == 0) x += 70; } - *s += QString("\n").arg(x).arg(Filter->Impedance); - *s += QString("\n").arg(x); + *s += QStringLiteral("\n").arg(x).arg(Filter->Impedance); + *s += QStringLiteral("\n").arg(x); yc += 100; Value = Filter->Frequency / 10.0; @@ -164,15 +164,15 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType) Value2 = 10.0 * Filter->Frequency2; else Value2 = 10.0 * Filter->Frequency; - *s += QString("<.SP SP1 1 70 %1 0 67 0 0 \"log\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"201\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(yc).arg(num2str(Value)).arg(num2str(Value2)); + *s += QStringLiteral("<.SP SP1 1 70 %1 0 67 0 0 \"log\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"201\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(yc).arg(num2str(Value)).arg(num2str(Value2)); QString eqn_string; switch (QucsSettings.DefaultSimulator) { case spicecompat::simQucsator: - eqn_string = QString("\n").arg(yc+10); + eqn_string = QStringLiteral("\n").arg(yc+10); break; case spicecompat::simNgspice : - eqn_string = QString("\n").arg(yc+10); + eqn_string = QStringLiteral("\n").arg(yc+10); break; case spicecompat::simSpiceOpus: case spicecompat::simXyce: @@ -188,13 +188,13 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType) x = 20; if(Filter->Class != CLASS_BANDPASS) x += 40; - *s += QString("<%1 240 %2 290 \"\" 0 0 0>\n").arg(x).arg(x); + *s += QStringLiteral("<%1 240 %2 290 \"\" 0 0 0>\n").arg(x).arg(x); if(piType) - *s += QString("<%1 240 170 240 \"\" 0 0 0>\n").arg(x); + *s += QStringLiteral("<%1 240 170 240 \"\" 0 0 0>\n").arg(x); else if(Filter->Class == CLASS_BANDPASS) - *s += QString("<%1 240 120 240 \"\" 0 0 0>\n").arg(x); + *s += QStringLiteral("<%1 240 120 240 \"\" 0 0 0>\n").arg(x); else - *s += QString("<%1 240 140 240 \"\" 0 0 0>\n").arg(x); + *s += QStringLiteral("<%1 240 140 240 \"\" 0 0 0>\n").arg(x); // wires down to shunt components x = 30; @@ -202,7 +202,7 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType) x += 70; for(i = 0; i < (Filter->Order / 2) + 1; i++) { x += 140; - *s += QString("<%1 240 %2 290 \"\" 0 0 0>\n").arg(x).arg(x); + *s += QStringLiteral("<%1 240 %2 290 \"\" 0 0 0>\n").arg(x).arg(x); } // horizontal wires for series components @@ -210,32 +210,32 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType) if(piType) { for(i = 0; i < (Filter->Order / 2); i++) { x = 170 + (i * 140); - *s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x).arg(x+20); - *s += QString("<%1 290 %2 290 \"\" 0 0 0>\n").arg(x-30).arg(x); - *s += QString("<%1 350 %2 350 \"\" 0 0 0>\n").arg(x-30).arg(x); + *s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x).arg(x+20); + *s += QStringLiteral("<%1 290 %2 290 \"\" 0 0 0>\n").arg(x-30).arg(x); + *s += QStringLiteral("<%1 350 %2 350 \"\" 0 0 0>\n").arg(x-30).arg(x); } if(Filter->Order & 1) { - *s += QString("<%1 290 %2 290 \"\" 0 0 0>\n").arg(x+110).arg(x+140); - *s += QString("<%1 350 %2 350 \"\" 0 0 0>\n").arg(x+110).arg(x+140); + *s += QStringLiteral("<%1 290 %2 290 \"\" 0 0 0>\n").arg(x+110).arg(x+140); + *s += QStringLiteral("<%1 350 %2 350 \"\" 0 0 0>\n").arg(x+110).arg(x+140); } } else for(i = 0; i < (Filter->Order / 2); i++) { x = 240 + (i * 140); - *s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x).arg(x+20); - *s += QString("<%1 290 %2 290 \"\" 0 0 0>\n").arg(x-30).arg(x); - *s += QString("<%1 350 %2 350 \"\" 0 0 0>\n").arg(x-30).arg(x); + *s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x).arg(x+20); + *s += QStringLiteral("<%1 290 %2 290 \"\" 0 0 0>\n").arg(x-30).arg(x); + *s += QStringLiteral("<%1 350 %2 350 \"\" 0 0 0>\n").arg(x-30).arg(x); } } else for(i = 0; i < (Filter->Order / 2); i++) { x = 170 + (i * 140); if(piType) { - *s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x).arg(x+40); - *s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+100).arg(x+140); + *s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x).arg(x+40); + *s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+100).arg(x+140); } else - *s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+30).arg(x+110); + *s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+30).arg(x+110); } // vertical wires for connecting the second series component @@ -249,8 +249,8 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType) i = (Filter->Order+1) / 2 - 1; for(; i>=0; i--) { x += 140; - *s += QString("<%1 240 %2 205 \"\" 0 0 0>\n").arg(x).arg(x); - *s += QString("<%1 240 %2 205 \"\" 0 0 0>\n").arg(x+60).arg(x+60); + *s += QStringLiteral("<%1 240 %2 205 \"\" 0 0 0>\n").arg(x).arg(x); + *s += QStringLiteral("<%1 240 %2 205 \"\" 0 0 0>\n").arg(x+60).arg(x+60); } if(piType) x -= 40; @@ -262,20 +262,20 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType) if(piType) { if(Filter->Order & 1) { x += 140 + 110; - *s += QString("<%1 240 %2 290 \"\" 0 0 0>\n").arg(x).arg(x); - *s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x-110).arg(x); + *s += QStringLiteral("<%1 240 %2 290 \"\" 0 0 0>\n").arg(x).arg(x); + *s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x-110).arg(x); } } else { if(Filter->Class == CLASS_BANDPASS) { if((Filter->Order & 1) == 0) - *s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+20).arg(x+140); + *s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+20).arg(x+140); } else { if(Filter->Order & 1) - *s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+170).arg(x+210); + *s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+170).arg(x+210); else - *s += QString("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+110).arg(x+210); + *s += QStringLiteral("<%1 240 %2 240 \"\" 0 0 0>\n").arg(x+110).arg(x+210); } } *s += "\n"; @@ -285,27 +285,27 @@ QString* LC_Filter::createSchematic(tFilter *Filter, bool piType) *s += "\n"; - *s += QString("Type) { - case TYPE_BESSEL: *s += QString("Bessel "); break; - case TYPE_BUTTERWORTH: *s += QString("Butterworth "); break; - case TYPE_CHEBYSHEV: *s += QString("Chebyshev "); break; + case TYPE_BESSEL: *s += QStringLiteral("Bessel "); break; + case TYPE_BUTTERWORTH: *s += QStringLiteral("Butterworth "); break; + case TYPE_CHEBYSHEV: *s += QStringLiteral("Chebyshev "); break; } switch(Filter->Class) { case CLASS_LOWPASS: - *s += QString("low-pass filter \\n %1Hz cutoff").arg(num2str(Filter->Frequency)); break; + *s += QStringLiteral("low-pass filter \\n %1Hz cutoff").arg(num2str(Filter->Frequency)); break; case CLASS_HIGHPASS: - *s += QString("high-pass filter \\n %1Hz cutoff").arg(num2str(Filter->Frequency)); break; + *s += QStringLiteral("high-pass filter \\n %1Hz cutoff").arg(num2str(Filter->Frequency)); break; case CLASS_BANDPASS: - *s += QString("band-pass filter \\n %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break; + *s += QStringLiteral("band-pass filter \\n %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break; case CLASS_BANDSTOP: - *s += QString("band-stop filter \\n %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break; + *s += QStringLiteral("band-stop filter \\n %1Hz...%2Hz").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); break; } if (piType == true) - *s += QString(", pi-type, \\n impedance matching %1 Ohm\">\n").arg(Filter->Impedance); + *s += QStringLiteral(", pi-type, \\n impedance matching %1 Ohm\">\n").arg(Filter->Impedance); else - *s += QString(", tee-type, \\n impedance matching %1 Ohm\">\n").arg(Filter->Impedance); + *s += QStringLiteral(", tee-type, \\n impedance matching %1 Ohm\">\n").arg(Filter->Impedance); *s += "\n"; return s; diff --git a/qucs-filter/line_filter.cpp b/qucs-filter/line_filter.cpp index 71181dd18..abdc459a4 100644 --- a/qucs-filter/line_filter.cpp +++ b/qucs-filter/line_filter.cpp @@ -46,8 +46,8 @@ QString* Line_Filter::createSchematic(tFilter *Filter, tSubstrate *Substrate, bo int i, x, yc; x = 60; *s += "\n"; - *s += QString("\n").arg(x).arg(Filter->Impedance); - *s += QString("\n").arg(x); + *s += QStringLiteral("\n").arg(x).arg(Filter->Impedance); + *s += QStringLiteral("\n").arg(x); x -= 30; yc = 180; @@ -114,45 +114,45 @@ QString* Line_Filter::createSchematic(tFilter *Filter, tSubstrate *Substrate, bo if(i > 0) { len -= dl; if(isMicrostrip) - *s += QString("\n").arg(x).arg(yc).arg(num2str(width)).arg(num2str(len)); + *s += QStringLiteral("\n").arg(x).arg(yc).arg(num2str(width)).arg(num2str(len)); else - *s += QString("\n").arg(x).arg(yc).arg(Filter->Impedance).arg(num2str(len)); + *s += QStringLiteral("\n").arg(x).arg(yc).arg(Filter->Impedance).arg(num2str(len)); x += 90; } if(isMicrostrip) - *s += QString("\n").arg(x).arg(yc).arg(num2str(width)).arg(num2str(width)).arg(num2str(gap)); + *s += QStringLiteral("\n").arg(x).arg(yc).arg(num2str(width)).arg(num2str(width)).arg(num2str(gap)); else - *s += QString("\n").arg(x).arg(yc).arg(num2str(gap)); + *s += QStringLiteral("\n").arg(x).arg(yc).arg(num2str(gap)); } x += 80; - *s += QString("\n").arg(x).arg(Filter->Impedance); - *s += QString("\n").arg(x); + *s += QStringLiteral("\n").arg(x).arg(Filter->Impedance); + *s += QStringLiteral("\n").arg(x); Value = 2.0 * Filter->Frequency - Filter->Frequency2; Value2 = 2.0 * Filter->Frequency2 - Filter->Frequency; - *s += QString("<.SP SP1 1 70 420 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(Value)).arg(num2str(Value2)); + *s += QStringLiteral("<.SP SP1 1 70 420 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(Value)).arg(num2str(Value2)); if(isMicrostrip) - *s += QString("\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness); - *s += QString("\n"); + *s += QStringLiteral("\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness); + *s += QStringLiteral("\n"); *s += "\n"; *s += "\n"; // connect left source - *s += QString("<60 180 60 290 \"\" 0 0 0>\n"); - *s += QString("<60 180 90 180 \"\" 0 0 0>\n"); + *s += QStringLiteral("<60 180 60 290 \"\" 0 0 0>\n"); + *s += QStringLiteral("<60 180 90 180 \"\" 0 0 0>\n"); // connect right source - *s += QString("<%1 180 %2 290 \"\" 0 0 0>\n").arg(x).arg(x); - *s += QString("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x-50).arg(x); + *s += QStringLiteral("<%1 180 %2 290 \"\" 0 0 0>\n").arg(x).arg(x); + *s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x-50).arg(x); // wires between components x = 150; for(i = 0; i < 2*Filter->Order; i++) { - *s += QString("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x).arg(x+30); + *s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x).arg(x+30); x += 90; } @@ -163,15 +163,15 @@ QString* Line_Filter::createSchematic(tFilter *Filter, tSubstrate *Substrate, bo *s += "\n"; - *s += QString("Type) { - case TYPE_BESSEL: *s += QString("Bessel"); break; - case TYPE_BUTTERWORTH: *s += QString("Butterworth"); break; - case TYPE_CHEBYSHEV: *s += QString("Chebyshev"); break; + case TYPE_BESSEL: *s += QStringLiteral("Bessel"); break; + case TYPE_BUTTERWORTH: *s += QStringLiteral("Butterworth"); break; + case TYPE_CHEBYSHEV: *s += QStringLiteral("Chebyshev"); break; } - *s += QString(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); - *s += QString("impedance matching %3 Ohm\">\n").arg(Filter->Impedance); + *s += QStringLiteral(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); + *s += QStringLiteral("impedance matching %3 Ohm\">\n").arg(Filter->Impedance); *s += "\n"; return s; diff --git a/qucs-filter/main.cpp b/qucs-filter/main.cpp index 146962dc6..2373baca6 100644 --- a/qucs-filter/main.cpp +++ b/qucs-filter/main.cpp @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) QString lang = QucsSettings.Language; if(lang.isEmpty()) lang = QString(QLocale::system().name()); - tor.load( QString("qucs_") + lang, QucsSettings.LangDir); + tor.load( QStringLiteral("qucs_") + lang, QucsSettings.LangDir); a.installTranslator( &tor ); QucsFilter *qucs = new QucsFilter(); diff --git a/qucs-filter/qf_filter.cpp b/qucs-filter/qf_filter.cpp index 2c0592e84..3d4fd5410 100644 --- a/qucs-filter/qf_filter.cpp +++ b/qucs-filter/qf_filter.cpp @@ -148,134 +148,134 @@ QString filter::to_qucs() { int x = 0; // Draw left power source - compos += QString("\n") .arg(x) .arg((double)imp_); - compos += QString("\n").arg(x); - wires += QString("<0 200 %1 200 \"\" 0 0 0>\n").arg(space / 2); - wires += QString("<%1 200 %1 260 \"\" 0 0 0>\n").arg(x); + compos += QStringLiteral("\n").arg(x); + wires += QStringLiteral("<0 200 %1 200 \"\" 0 0 0>\n").arg(space / 2); + wires += QStringLiteral("<%1 200 %1 260 \"\" 0 0 0>\n").arg(x); // Draw filter sections for (auto& subsec : subsecs_) { x += space; if (subsec.wiring == SERIES) { if (subsec.content == INDUC) { wires += - QString("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30); - compos += QString("\n") + QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30); + compos += QStringLiteral("\n") .arg(x) .arg(200) .arg(num2str(subsec.indc_v)); wires += - QString("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2); + QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2); } else if (subsec.content == CAPA) { wires += - QString("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30); - compos += QString("\n") + QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30); + compos += QStringLiteral("\n") .arg(x) .arg(200) .arg(num2str(subsec.capa_v)); wires += - QString("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2); + QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2); } else if (subsec.content == PARA_CAPA_INDUC) { wires += - QString("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30); - compos += QString("\n") + QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30); + compos += QStringLiteral("\n") .arg(x) .arg(200) .arg(num2str(subsec.capa_v)); - wires += QString("<%1 %2 %1 %3 0 0 0>\n").arg(x - 30).arg(200).arg(170); - wires += QString("<%1 %2 %1 %3 0 0 0>\n").arg(x + 30).arg(200).arg(170); - compos += QString("\n") + wires += QStringLiteral("<%1 %2 %1 %3 0 0 0>\n").arg(x - 30).arg(200).arg(170); + wires += QStringLiteral("<%1 %2 %1 %3 0 0 0>\n").arg(x + 30).arg(200).arg(170); + compos += QStringLiteral("\n") .arg(x) .arg(170) .arg(num2str(subsec.indc_v)); wires += - QString("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2); + QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2); } else if (subsec.content == SERIES_CAPA_INDUC) { wires += - QString("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30); - compos += QString("\n") + QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30); + compos += QStringLiteral("\n") .arg(x) .arg(200) .arg(num2str(subsec.capa_v)); wires += - QString("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2); + QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2); x += space; wires += - QString("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30); - compos += QString("\n") + QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x - 30); + compos += QStringLiteral("\n") .arg(x) .arg(200) .arg(num2str(subsec.indc_v)); wires += - QString("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2); + QStringLiteral("<%1 200 %2 200 0 0 0>\n").arg(x + 30).arg(x + space / 2); } } else if (subsec.wiring == SHUNT) { if (subsec.content == INDUC) { - wires += QString("<%1 200 %2 200 0 0 0>\n") + wires += QStringLiteral("<%1 200 %2 200 0 0 0>\n") .arg(x - space / 2) .arg(x + space / 2); - wires += QString("<%1 %2 %1 %3 0 0 0>\n").arg(x).arg(200).arg(260); - compos += QString("\n") + wires += QStringLiteral("<%1 %2 %1 %3 0 0 0>\n").arg(x).arg(200).arg(260); + compos += QStringLiteral("\n") .arg(x) .arg(290) .arg(num2str(subsec.indc_v)); - compos += QString("\n").arg(x); + compos += QStringLiteral("\n").arg(x); } else if (subsec.content == CAPA) { - wires += QString("<%1 200 %2 200 0 0 0>\n") + wires += QStringLiteral("<%1 200 %2 200 0 0 0>\n") .arg(x - space / 2) .arg(x + space / 2); - wires += QString("<%1 %2 %1 %3 0 0 0>\n").arg(x).arg(200).arg(260); - compos += QString("\n") + wires += QStringLiteral("<%1 %2 %1 %3 0 0 0>\n").arg(x).arg(200).arg(260); + compos += QStringLiteral("\n") .arg(x) .arg(290) .arg(num2str(subsec.capa_v)); - compos += QString("\n").arg(x); + compos += QStringLiteral("\n").arg(x); } else if (subsec.content == SERIES_CAPA_INDUC) { - wires += QString("<%1 200 %2 200 0 0 0>\n") + wires += QStringLiteral("<%1 200 %2 200 0 0 0>\n") .arg(x - space / 2) .arg(x + space / 2); - compos += QString("\n") + compos += QStringLiteral("\n") .arg(x) .arg(230) .arg(num2str(subsec.indc_v)); - compos += QString("\n") + compos += QStringLiteral("\n") .arg(x) .arg(290) .arg(num2str(subsec.capa_v)); - compos += QString("\n").arg(x); + compos += QStringLiteral("\n").arg(x); } else if (subsec.content == PARA_CAPA_INDUC) { - wires += QString("<%1 200 %2 200 0 0 0>\n") + wires += QStringLiteral("<%1 200 %2 200 0 0 0>\n") .arg(x - space / 2) .arg(x + space / 2); - wires += QString("<%1 %2 %1 %3 0 0 0>\n").arg(x).arg(200).arg(260); - compos += QString("\n") + wires += QStringLiteral("<%1 %2 %1 %3 0 0 0>\n").arg(x).arg(200).arg(260); + compos += QStringLiteral("\n") .arg(x) .arg(290) .arg(num2str(subsec.indc_v)); - wires += QString("<%1 260 %2 260 0 0 0>\n").arg(x).arg(x + 30); - compos += QString("\n") + wires += QStringLiteral("<%1 260 %2 260 0 0 0>\n").arg(x).arg(x + 30); + compos += QStringLiteral("\n") .arg(x + 30) .arg(290) .arg(num2str(subsec.capa_v)); - wires += QString("<%1 320 %2 320 0 0 0>\n").arg(x).arg(x + 30); - compos += QString("\n").arg(x); + wires += QStringLiteral("<%1 320 %2 320 0 0 0>\n").arg(x).arg(x + 30); + compos += QStringLiteral("\n").arg(x); } } } // Draw right power source x += space; - wires += QString("<%1 200 %2 200 0 0 0>\n").arg(x - space / 2).arg(x); - compos += QString("\n").arg(x - space / 2).arg(x); + compos += QStringLiteral("\n") .arg(x) .arg((double)imp_); - compos += QString("\n").arg(x); - wires += QString("<%1 200 %1 260 \"\" 0 0 0>\n").arg(x); + compos += QStringLiteral("\n").arg(x); + wires += QStringLiteral("<%1 200 %1 260 \"\" 0 0 0>\n").arg(x); QString s = ""; - s += QString("\n"); + s += QStringLiteral("\n"); s += "\n"; s += compos; @@ -293,7 +293,7 @@ QString filter::to_qucs() { eqn_string += "\"dBS11=dB(S[1,1])\" 1 \"yes\" 0>\n"; break; case spicecompat::simNgspice : - eqn_string = QString("\n"); + eqn_string = QStringLiteral("\n"); break; case spicecompat::simSpiceOpus: case spicecompat::simXyce: diff --git a/qucs-filter/quarterwave_filter.cpp b/qucs-filter/quarterwave_filter.cpp index fe2a29094..081a0179f 100644 --- a/qucs-filter/quarterwave_filter.cpp +++ b/qucs-filter/quarterwave_filter.cpp @@ -64,8 +64,8 @@ QString *QuarterWave_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr int x_space = 50; // First power and ground - c_s += QString("\n").arg(x).arg(Filter->Impedance); - c_s += QString("\n").arg(x); + c_s += QStringLiteral("\n").arg(x).arg(Filter->Impedance); + c_s += QStringLiteral("\n").arg(x); w_s += getWireString(60, 180, 60, 300); w_s += getWireString(60, 180, 90, 180); x += 60; @@ -116,7 +116,7 @@ QString *QuarterWave_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr c_s += getMS_Via(0.5, x+40 + x_space, 30, 2); // MS via diameter = 0.5 mm } else{ - c_s += QString("\n").arg(x + 60 + x_space); + c_s += QStringLiteral("\n").arg(x + 60 + x_space); } } @@ -135,30 +135,30 @@ QString *QuarterWave_Filter::createSchematic(tFilter *Filter, tSubstrate *Substr // Last power and ground x += 80; - c_s += QString("\n").arg(x).arg(Filter->Impedance); - c_s += QString("\n").arg(x); + c_s += QStringLiteral("\n").arg(x).arg(Filter->Impedance); + c_s += QStringLiteral("\n").arg(x); w_s += getWireString(x, 180, x, 300); w_s += getWireString(x-50, 180, x, 180); // Components footer - c_s += QString("<.SP SP1 1 70 460 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(0.1 * Filter->Frequency)).arg(num2str(10.0 * Filter->Frequency)); + c_s += QStringLiteral("<.SP SP1 1 70 460 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(0.1 * Filter->Frequency)).arg(num2str(10.0 * Filter->Frequency)); if (isMicrostrip) - c_s += QString("\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness); - c_s += QString("\n"); + c_s += QStringLiteral("\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness); + c_s += QStringLiteral("\n"); *s += c_s + "\n"; *s += w_s + "\n"; // Footer *s += "\n"; *s += "\n"; *s += "\n"; - *s += QString("Type) { - case TYPE_BESSEL: *s += QString("Bessel"); break; - case TYPE_BUTTERWORTH: *s += QString("Butterworth"); break; - case TYPE_CHEBYSHEV: *s += QString("Chebyshev"); break; + case TYPE_BESSEL: *s += QStringLiteral("Bessel"); break; + case TYPE_BUTTERWORTH: *s += QStringLiteral("Butterworth"); break; + case TYPE_CHEBYSHEV: *s += QStringLiteral("Chebyshev"); break; } - *s += QString(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); - *s += QString("Impedance matching %3 Ohm\">\n").arg(Filter->Impedance); + *s += QStringLiteral(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); + *s += QStringLiteral("Impedance matching %3 Ohm\">\n").arg(Filter->Impedance); *s += "\n"; return s; } diff --git a/qucs-filter/qucsfilter.cpp b/qucs-filter/qucsfilter.cpp index fb9fd4686..2c6c700e5 100644 --- a/qucs-filter/qucsfilter.cpp +++ b/qucs-filter/qucsfilter.cpp @@ -511,7 +511,7 @@ void QucsFilter::slotShowResult() ResultState++; if(ResultState & 1) c = 0xFF; else c = 0x80; - QString s = QString(" ").arg(c, 2, 16); + QString s = QStringLiteral(" ").arg(c, 2, 16); LabelResult->setText(tr("Result:") + s + tr("Successful") + ""); c = 500; diff --git a/qucs-filter/stepz_filter.cpp b/qucs-filter/stepz_filter.cpp index a5b93e740..1e0c05800 100644 --- a/qucs-filter/stepz_filter.cpp +++ b/qucs-filter/stepz_filter.cpp @@ -53,8 +53,8 @@ QString* StepImpedance_Filter::createSchematic(tFilter *Filter, tSubstrate *Subs x = 60; *s += "\n"; - *s += QString("\n").arg(x).arg(Filter->Impedance); - *s += QString("\n").arg(x); + *s += QStringLiteral("\n").arg(x).arg(Filter->Impedance); + *s += QStringLiteral("\n").arg(x); x -= 30; for(i = 0; i < Filter->Order; i++) { @@ -85,36 +85,36 @@ QString* StepImpedance_Filter::createSchematic(tFilter *Filter, tSubstrate *Subs } if(isMicrostrip) - *s += QString("\n").arg(x).arg(num2str(width)).arg(num2str(len)); + *s += QStringLiteral("\n").arg(x).arg(num2str(width)).arg(num2str(len)); else - *s += QString("\n").arg(x).arg(Z0).arg(num2str(len)); + *s += QStringLiteral("\n").arg(x).arg(Z0).arg(num2str(len)); } x += 80; - *s += QString("\n").arg(x).arg(Filter->Impedance); - *s += QString("\n").arg(x); + *s += QStringLiteral("\n").arg(x).arg(Filter->Impedance); + *s += QStringLiteral("\n").arg(x); - *s += QString("<.SP SP1 1 70 460 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(0.1 * Filter->Frequency)).arg(num2str(10.0 * Filter->Frequency)); + *s += QStringLiteral("<.SP SP1 1 70 460 0 67 0 0 \"lin\" 1 \"%2Hz\" 1 \"%3Hz\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(num2str(0.1 * Filter->Frequency)).arg(num2str(10.0 * Filter->Frequency)); if(isMicrostrip) - *s += QString("\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness); - *s += QString("\n"); + *s += QStringLiteral("\n").arg(Substrate->er).arg(num2str(Substrate->height)).arg(num2str(Substrate->thickness)).arg(Substrate->tand).arg(Substrate->resistivity).arg(Substrate->roughness); + *s += QStringLiteral("\n"); *s += "\n"; *s += "\n"; // connect left source - *s += QString("<60 180 60 300 \"\" 0 0 0>\n"); - *s += QString("<60 180 90 180 \"\" 0 0 0>\n"); + *s += QStringLiteral("<60 180 60 300 \"\" 0 0 0>\n"); + *s += QStringLiteral("<60 180 90 180 \"\" 0 0 0>\n"); // connect right source - *s += QString("<%1 180 %2 300 \"\" 0 0 0>\n").arg(x).arg(x); - *s += QString("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x-50).arg(x); + *s += QStringLiteral("<%1 180 %2 300 \"\" 0 0 0>\n").arg(x).arg(x); + *s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x-50).arg(x); // wires between components x = 150; for(i = 1; i < Filter->Order; i++) { - *s += QString("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x).arg(x+30); + *s += QStringLiteral("<%1 180 %2 180 \"\" 0 0 0>\n").arg(x).arg(x+30); x += 90; } @@ -125,15 +125,15 @@ QString* StepImpedance_Filter::createSchematic(tFilter *Filter, tSubstrate *Subs *s += "\n"; - *s += QString("Type) { - case TYPE_BESSEL: *s += QString("Bessel"); break; - case TYPE_BUTTERWORTH: *s += QString("Butterworth"); break; - case TYPE_CHEBYSHEV: *s += QString("Chebyshev"); break; + case TYPE_BESSEL: *s += QStringLiteral("Bessel"); break; + case TYPE_BUTTERWORTH: *s += QStringLiteral("Butterworth"); break; + case TYPE_CHEBYSHEV: *s += QStringLiteral("Chebyshev"); break; } - *s += QString(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); - *s += QString("impedance matching %3 Ohm\">\n").arg(Filter->Impedance); + *s += QStringLiteral(" %1Hz...%2Hz \\n ").arg(num2str(Filter->Frequency)).arg(num2str(Filter->Frequency2)); + *s += QStringLiteral("impedance matching %3 Ohm\">\n").arg(Filter->Impedance); *s += "\n"; return s; diff --git a/qucs-powercombining/main.cpp b/qucs-powercombining/main.cpp index 8df5a88e2..f58a85502 100644 --- a/qucs-powercombining/main.cpp +++ b/qucs-powercombining/main.cpp @@ -74,7 +74,7 @@ int main(int argc, char *argv[]) QString lang = QucsSettings.Language; if(lang.isEmpty()) lang = QString(QLocale::system().name()); - tor.load( QString("qucs_") + lang, QucsSettings.LangDir); + tor.load( QStringLiteral("qucs_") + lang, QucsSettings.LangDir); app.installTranslator( &tor ); QucsPowerCombiningTool *PowerCombiningTool = new QucsPowerCombiningTool(); diff --git a/qucs-powercombining/qucspowercombiningtool.cpp b/qucs-powercombining/qucspowercombiningtool.cpp index fba602ea5..72d65469e 100644 --- a/qucs-powercombining/qucspowercombiningtool.cpp +++ b/qucs-powercombining/qucspowercombiningtool.cpp @@ -355,54 +355,54 @@ void QucsPowerCombiningTool::UpdateImage() case 0: //Wilkinson if (lumpedImplementation) { - imgWidget->load(QString(":/bitmaps/WilkinsonLC.svg")); + imgWidget->load(QStringLiteral(":/bitmaps/WilkinsonLC.svg")); } else { - (microstripImplementation) ? imgWidget->load(QString(":/bitmaps/Wilkinson_microstrip.svg")) - : imgWidget->load(QString(":/bitmaps/Wilkinson_idealTL.svg")); + (microstripImplementation) ? imgWidget->load(QStringLiteral(":/bitmaps/Wilkinson_microstrip.svg")) + : imgWidget->load(QStringLiteral(":/bitmaps/Wilkinson_idealTL.svg")); } break; case 1: //Mutistage Wilkinson if (lumpedImplementation) { - imgWidget->load(QString(":/bitmaps/MultistageWilkinsonLC.svg")); + imgWidget->load(QStringLiteral(":/bitmaps/MultistageWilkinsonLC.svg")); } else { - (microstripImplementation) ? imgWidget->load(QString(":/bitmaps/MultistageWilkinson_microstrip.svg")) - : imgWidget->load(QString(":/bitmaps/MultistageWilkinson_idealTL.svg")); + (microstripImplementation) ? imgWidget->load(QStringLiteral(":/bitmaps/MultistageWilkinson_microstrip.svg")) + : imgWidget->load(QStringLiteral(":/bitmaps/MultistageWilkinson_idealTL.svg")); } break; case 2: //Tee - (microstripImplementation) ? imgWidget->load(QString(":/bitmaps/Tee_microstrip.svg")) - : imgWidget->load(QString(":/bitmaps/Tee_idealTL.svg")); + (microstripImplementation) ? imgWidget->load(QStringLiteral(":/bitmaps/Tee_microstrip.svg")) + : imgWidget->load(QStringLiteral(":/bitmaps/Tee_idealTL.svg")); break; case 3: //Branch-line - (microstripImplementation) ? imgWidget->load(QString(":/bitmaps/Branchline_microstrip.svg")) - : imgWidget->load(QString(":/bitmaps/Branchline_idealTL.svg")); + (microstripImplementation) ? imgWidget->load(QStringLiteral(":/bitmaps/Branchline_microstrip.svg")) + : imgWidget->load(QStringLiteral(":/bitmaps/Branchline_idealTL.svg")); break; case 4: //Double-box branch-line - (microstripImplementation) ? imgWidget->load(QString(":/bitmaps/DoubleBoxBranchline_microstrip.svg")) - : imgWidget->load(QString(":/bitmaps/DoubleBoxBranchline_idealTL.svg")); + (microstripImplementation) ? imgWidget->load(QStringLiteral(":/bitmaps/DoubleBoxBranchline_microstrip.svg")) + : imgWidget->load(QStringLiteral(":/bitmaps/DoubleBoxBranchline_idealTL.svg")); break; case 5: //Bagley power combiner - (microstripImplementation) ? imgWidget->load(QString(":/bitmaps/Bagley_microstrip.svg")) - : imgWidget->load(QString(":/bitmaps/Bagley_idealTL.svg")); + (microstripImplementation) ? imgWidget->load(QStringLiteral(":/bitmaps/Bagley_microstrip.svg")) + : imgWidget->load(QStringLiteral(":/bitmaps/Bagley_idealTL.svg")); break; case 6: //Gysel power combiner - (microstripImplementation) ? imgWidget->load(QString(":/bitmaps/Gysel_microstrip.svg")) - : imgWidget->load(QString(":/bitmaps/Gysel_idealTL.svg")); + (microstripImplementation) ? imgWidget->load(QStringLiteral(":/bitmaps/Gysel_microstrip.svg")) + : imgWidget->load(QStringLiteral(":/bitmaps/Gysel_idealTL.svg")); break; // ------------- CORPORATE COMBINERS ----------------- case 7: //Travelling wave - (microstripImplementation) ? imgWidget->load(QString(":/bitmaps/TravellingWave_microstrip.svg")) - : imgWidget->load(QString(":/bitmaps/TravellingWave_idealTL.svg")); + (microstripImplementation) ? imgWidget->load(QStringLiteral(":/bitmaps/TravellingWave_microstrip.svg")) + : imgWidget->load(QStringLiteral(":/bitmaps/TravellingWave_idealTL.svg")); break; case 8: //Tree - (microstripImplementation) ? imgWidget->load(QString(":/bitmaps/Tree_microstrip.svg")) - : imgWidget->load(QString(":/bitmaps/Tree_idealTL.svg")); + (microstripImplementation) ? imgWidget->load(QStringLiteral(":/bitmaps/Tree_microstrip.svg")) + : imgWidget->load(QStringLiteral(":/bitmaps/Tree_idealTL.svg")); break; } } @@ -589,7 +589,7 @@ QString QucsPowerCombiningTool::CalculateWilkinson(double Z0, double K) double R=Z0*((K2+1)/K); double R2 = Z0*K; double R3 = Z0/K; - return QString("%1;%2;%3;%4;%5").arg(Z2).arg(Z3).arg(R).arg(R2).arg(R3); + return QStringLiteral("%1;%2;%3;%4;%5").arg(Z2).arg(Z3).arg(R).arg(R2).arg(R3); } //----------------------------------------------------- @@ -636,70 +636,70 @@ int QucsPowerCombiningTool::Wilkinson(double Z0, double Freq, double K, bool SP_ if (SP_block) { //Source - s += QString("\n").arg(Z0); - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); //Output port 1 - s += QString("\n").arg(Z0); - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); //Output port 2 - s += QString("\n").arg(Z0); - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); //S-parameter analysis component - QString freq_start = QString("%1%2").arg(0.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - QString freq_stop = QString("%1%2").arg(1.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - s += QString("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg((freq_start)).arg((freq_stop)); + QString freq_start = QStringLiteral("%1%2").arg(0.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + QString freq_stop = QStringLiteral("%1%2").arg(1.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + s += QStringLiteral("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg((freq_start)).arg((freq_stop)); s += getSPEquationString(50,200); - if (microcheck)s += QString("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); + if (microcheck)s += QStringLiteral("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); } if (microcheck)//Microstrip implementation { er = Substrate.er; getMicrostrip(Z0, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(Z2, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(Z3, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); } else { if (LumpedElements)// CLC equivalent { //First capacitor - s += QString("\n").arg(num2str(CC)); - s += QString("\n"); + s += QStringLiteral("\n").arg(num2str(CC)); + s += QStringLiteral("\n"); //Upper branch - s += QString("\n").arg(num2str(C2)); - s += QString("\n"); - s += QString("\n").arg(num2str(L2)); + s += QStringLiteral("\n").arg(num2str(C2)); + s += QStringLiteral("\n"); + s += QStringLiteral("\n").arg(num2str(L2)); //Lower branch - s += QString("\n").arg(num2str(C3)); - s += QString("\n"); - s += QString("\n").arg(num2str(L3)); + s += QStringLiteral("\n").arg(num2str(C3)); + s += QStringLiteral("\n"); + s += QStringLiteral("\n").arg(num2str(L3)); } else { - s += QString("\n").arg(RoundVariablePrecision(Z0)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Z0 line - s += QString("\n").arg(RoundVariablePrecision(Z2)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 1 - s += QString("\n").arg(RoundVariablePrecision(Z3)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 2 + s += QStringLiteral("\n").arg(RoundVariablePrecision(Z0)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Z0 line + s += QStringLiteral("\n").arg(RoundVariablePrecision(Z2)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 1 + s += QStringLiteral("\n").arg(RoundVariablePrecision(Z3)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 2 } } - s += QString("\n").arg(R);//Isolation resistor + s += QStringLiteral("\n").arg(R);//Isolation resistor if (K!=1) {// An unequal power ratio implies that the load impedance != 50, so it requires matching if (microcheck)//Microstrip { er = Substrate.er; getMicrostrip(sqrt(Z0*R2), Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(sqrt(Z0*R3), Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); } else @@ -707,19 +707,19 @@ int QucsPowerCombiningTool::Wilkinson(double Z0, double Freq, double K, bool SP_ if (LumpedElements)//CLC equivalent { // Upper branch - s += QString("\n").arg(num2str(L2_)); - s += QString("\n").arg(num2str(C2_)); - s += QString("\n"); + s += QStringLiteral("\n").arg(num2str(L2_)); + s += QStringLiteral("\n").arg(num2str(C2_)); + s += QStringLiteral("\n"); // Lower branch - s += QString("\n").arg(num2str(L3_)); - s += QString("\n").arg(num2str(C3_)); - s += QString("\n"); + s += QStringLiteral("\n").arg(num2str(L3_)); + s += QStringLiteral("\n").arg(num2str(C3_)); + s += QStringLiteral("\n"); } else { - s += QString("\n").arg(RoundVariablePrecision(sqrt(Z0*R2))).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Quarter wave matching output branch 1 - s += QString("\n").arg(RoundVariablePrecision(sqrt(Z0*R3))).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Quarter wave matching output branch 2 + s += QStringLiteral("\n").arg(RoundVariablePrecision(sqrt(Z0*R2))).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Quarter wave matching output branch 1 + s += QStringLiteral("\n").arg(RoundVariablePrecision(sqrt(Z0*R3))).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Quarter wave matching output branch 2 } } } @@ -727,47 +727,47 @@ int QucsPowerCombiningTool::Wilkinson(double Z0, double Freq, double K, bool SP_ //Wiring s += "\n"; - s += QString("<0 -30 100 -30 \"\" 0 0 0>\n");//Source to Z0 line - s += QString("<160 -30 190 -30 \"\" 0 0 0 \"\">\n");//Z0 line to branches - s += QString("<190 -90 190 -30 \"\" 0 0 0 \"\">\n");//Z0 line to upper branch - s += QString("<190 -90 230 -90 \"\" 0 0 0 \"\">\n");//Z0 line (corner) to upper branch - s += QString("<290 -90 340 -90 \"\" 0 0 0 \"\">\n");//Upper branch to isolation resistor - s += QString("<340 -90 340 -50 \"\" 0 0 0 \"\">\n");//Upper branch (corner) to isolation resistor - s += QString("<190 -30 190 30 \"\" 0 0 0 \"\">\n");//Z0 line to lower branch - s += QString("<190 30 230 30 \"\" 0 0 0 \"\">\n");//Z0 line (corner) to lower branch - s += QString("<290 30 340 30 \"\" 0 0 0 \"\">\n");//Lower branch to isolation resistor - s += QString("<340 10 340 30 \"\" 0 0 0 \"\">\n");//Lower branch (corner) to isolation resistor + s += QStringLiteral("<0 -30 100 -30 \"\" 0 0 0>\n");//Source to Z0 line + s += QStringLiteral("<160 -30 190 -30 \"\" 0 0 0 \"\">\n");//Z0 line to branches + s += QStringLiteral("<190 -90 190 -30 \"\" 0 0 0 \"\">\n");//Z0 line to upper branch + s += QStringLiteral("<190 -90 230 -90 \"\" 0 0 0 \"\">\n");//Z0 line (corner) to upper branch + s += QStringLiteral("<290 -90 340 -90 \"\" 0 0 0 \"\">\n");//Upper branch to isolation resistor + s += QStringLiteral("<340 -90 340 -50 \"\" 0 0 0 \"\">\n");//Upper branch (corner) to isolation resistor + s += QStringLiteral("<190 -30 190 30 \"\" 0 0 0 \"\">\n");//Z0 line to lower branch + s += QStringLiteral("<190 30 230 30 \"\" 0 0 0 \"\">\n");//Z0 line (corner) to lower branch + s += QStringLiteral("<290 30 340 30 \"\" 0 0 0 \"\">\n");//Lower branch to isolation resistor + s += QStringLiteral("<340 10 340 30 \"\" 0 0 0 \"\">\n");//Lower branch (corner) to isolation resistor if (LumpedElements) { - s += QString("<90 -30 180 -30 \"\" 0 0 0>\n"); - s += QString("<310 -110 310 -90 \"\" 0 0 0>\n");//Upper branch - s += QString("<310 30 310 50 \"\" 0 0 0>\n");//Lower branch + s += QStringLiteral("<90 -30 180 -30 \"\" 0 0 0>\n"); + s += QStringLiteral("<310 -110 310 -90 \"\" 0 0 0>\n");//Upper branch + s += QStringLiteral("<310 30 310 50 \"\" 0 0 0>\n");//Lower branch } if (K!=1)//Unequal power split ratio => need additional matching { if (LumpedElements) { - s += QString("<340 -90 380 -90 \"\" 0 0 0 \"\">\n");//Upper branch, R to L - s += QString("<440 -90 500 -90 \"\" 0 0 0 \"\">\n");//Upper branch, L to port - s += QString("<450 -110 450 -90 \"\" 0 0 0 \"\">\n");//Upper branch, L to C - s += QString("<340 30 380 30 \"\" 0 0 0 \"\">\n");//Lower branch, R to L - s += QString("<440 30 500 30 \"\" 0 0 0 \"\">\n");//Lower branch, L to port - s += QString("<450 30 450 60 \"\" 0 0 0 \"\">\n");//Lower branch, L to C + s += QStringLiteral("<340 -90 380 -90 \"\" 0 0 0 \"\">\n");//Upper branch, R to L + s += QStringLiteral("<440 -90 500 -90 \"\" 0 0 0 \"\">\n");//Upper branch, L to port + s += QStringLiteral("<450 -110 450 -90 \"\" 0 0 0 \"\">\n");//Upper branch, L to C + s += QStringLiteral("<340 30 380 30 \"\" 0 0 0 \"\">\n");//Lower branch, R to L + s += QStringLiteral("<440 30 500 30 \"\" 0 0 0 \"\">\n");//Lower branch, L to port + s += QStringLiteral("<450 30 450 60 \"\" 0 0 0 \"\">\n");//Lower branch, L to C } else//Transmission lines { - s += QString("<340 -90 380 -90 \"\" 0 0 0 \"\">\n");//Isolation resistor to matching line. Upper branch - s += QString("<440 -90 500 -90 \"\" 0 0 0 \"\">\n");//Matching line to port 2. Upper branch - s += QString("<340 30 380 30 \"\" 0 0 0 \"\">\n");//Isolation resistor to matching line. Lowe branch - s += QString("<440 30 500 30 \"\" 0 0 0 \"\">\n");//Matching line to port 2. Lower branch + s += QStringLiteral("<340 -90 380 -90 \"\" 0 0 0 \"\">\n");//Isolation resistor to matching line. Upper branch + s += QStringLiteral("<440 -90 500 -90 \"\" 0 0 0 \"\">\n");//Matching line to port 2. Upper branch + s += QStringLiteral("<340 30 380 30 \"\" 0 0 0 \"\">\n");//Isolation resistor to matching line. Lowe branch + s += QStringLiteral("<440 30 500 30 \"\" 0 0 0 \"\">\n");//Matching line to port 2. Lower branch } } else//Equal power split ratio { - s += QString("<340 -90 500 -90 \"\" 0 0 0 \"\">\n");//Branch 2 to Port 2 - s += QString("<340 30 500 30 \"\" 0 0 0 \"\">\n");//Branch 2 to Port 3 + s += QStringLiteral("<340 -90 500 -90 \"\" 0 0 0 \"\">\n");//Branch 2 to Port 2 + s += QStringLiteral("<340 30 500 30 \"\" 0 0 0 \"\">\n");//Branch 2 to Port 3 } s += "\n"; @@ -847,7 +847,7 @@ QString QucsPowerCombiningTool::calcChebyLines(double RL, double Z0, double gamm { (RL\n").arg(Z0); - s += QString("\n"); - wirestr +=QString("<0 0 0 -30 \"\" 0 0 0>\n");//Vertical wire - wirestr +=QString("<0 -30 70 -30 \"\" 0 0 0>\n");//Horizontal wire + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); + wirestr +=QStringLiteral("<0 0 0 -30 \"\" 0 0 0>\n");//Vertical wire + wirestr +=QStringLiteral("<0 -30 70 -30 \"\" 0 0 0>\n");//Horizontal wire //S-parameter analysis component - QString freq_start = QString("%1%2").arg((1/NStages)*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - QString freq_stop = QString("%1%2").arg((2+1/NStages)*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - s += QString("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop); - str += QString("\"S11_dB=dB(S[1,1])\" 1 "); - str += QString("\"S22_dB=dB(S[2,2])\" 1 "); - str += QString("\"S33_dB=dB(S[3,3])\" 1 "); - str += QString("\"S21_dB=dB(S[2,1])\" 1 "); - str +=QString("\"S31_dB=dB(S[3,1])\" 1 "); + QString freq_start = QStringLiteral("%1%2").arg((1/NStages)*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + QString freq_stop = QStringLiteral("%1%2").arg((2+1/NStages)*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + s += QStringLiteral("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop); + str += QStringLiteral("\"S11_dB=dB(S[1,1])\" 1 "); + str += QStringLiteral("\"S22_dB=dB(S[2,2])\" 1 "); + str += QStringLiteral("\"S33_dB=dB(S[3,3])\" 1 "); + str += QStringLiteral("\"S21_dB=dB(S[2,1])\" 1 "); + str +=QStringLiteral("\"S31_dB=dB(S[3,1])\" 1 "); s += getSPEquationString(50,200); - if (microcheck)s += QString("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); + if (microcheck)s += QStringLiteral("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); } @@ -947,28 +947,28 @@ int QucsPowerCombiningTool::MultistageWilkinson(double Z0, double Freq, int NSta { er = Substrate.er; getMicrostrip(Z0, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x); } else { if (LumpedElements)//LC elements. Pi CLC equivalent of a lambda/4 line { //First capacitor - s += QString("\n").arg(num2str(2*C[0])).arg(x); - s += QString("\n").arg(x); - wirestr +=QString("<%1 -30 %2 -30 \"\" 0 0 0>\n").arg(x-30).arg(x+30); + s += QStringLiteral("\n").arg(num2str(2*C[0])).arg(x); + s += QStringLiteral("\n").arg(x); + wirestr +=QStringLiteral("<%1 -30 %2 -30 \"\" 0 0 0>\n").arg(x-30).arg(x+30); } else//Ideal transmission lines { - s += QString("\n").arg(x).arg(RoundVariablePrecision(Z0)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Z0 line + s += QStringLiteral("\n").arg(x).arg(RoundVariablePrecision(Z0)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Z0 line } } x+=50;//Separation between the source transmission line and the beginning of the output branches - wirestr +=QString("<%1 -30 %2 -30 \"\" 0 0 0>\n").arg(x-20).arg(x+30);//Vertical line joining the output branches - wirestr +=QString("<%1 -90 %1 30 \"\" 0 0 0>\n").arg(x+30);//Vertical line joining the output branches + wirestr +=QStringLiteral("<%1 -30 %2 -30 \"\" 0 0 0>\n").arg(x-20).arg(x+30);//Vertical line joining the output branches + wirestr +=QStringLiteral("<%1 -90 %1 30 \"\" 0 0 0>\n").arg(x+30);//Vertical line joining the output branches @@ -978,24 +978,24 @@ int QucsPowerCombiningTool::MultistageWilkinson(double Z0, double Freq, int NSta Zi = Zlines.section(';', i, i).toDouble(); Ri = Risol.section(';', (NStages-1)-i, (NStages-1)-i).toDouble(); - wirestr +=QString("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+30).arg(x+70); - wirestr +=QString("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+30).arg(x+70); + wirestr +=QStringLiteral("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+30).arg(x+70); + wirestr +=QStringLiteral("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+30).arg(x+70); - wirestr +=QString("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+130).arg(x+180); - wirestr +=QString("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+130).arg(x+180); + wirestr +=QStringLiteral("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+130).arg(x+180); + wirestr +=QStringLiteral("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+130).arg(x+180); //Wiring the isolation resistor - wirestr +=QString("<%1 30 %1 10 \"\" 0 0 0>\n").arg(x+160); - wirestr +=QString("<%1 -90 %1 -50 \"\" 0 0 0>\n").arg(x+160); + wirestr +=QStringLiteral("<%1 30 %1 10 \"\" 0 0 0>\n").arg(x+160); + wirestr +=QStringLiteral("<%1 -90 %1 -50 \"\" 0 0 0>\n").arg(x+160); if (microcheck) { er = Substrate.er; getMicrostrip(Zi, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x+100); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x+100); er = Substrate.er; getMicrostrip(Zi, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x+100); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x+100); } else { @@ -1004,50 +1004,50 @@ int QucsPowerCombiningTool::MultistageWilkinson(double Z0, double Freq, int NSta if (i == 0)//Last element { // Upper branch - s += QString("\n").arg(num2str(L[aux-1])).arg(x+100); - s += QString("\n").arg(num2str(C[aux-1])).arg(x+160); - wirestr +=QString("<%1 -90 %1 -120 \"\" 0 0 0>\n").arg(x+160); - s += QString("\n").arg(x+160); + s += QStringLiteral("\n").arg(num2str(L[aux-1])).arg(x+100); + s += QStringLiteral("\n").arg(num2str(C[aux-1])).arg(x+160); + wirestr +=QStringLiteral("<%1 -90 %1 -120 \"\" 0 0 0>\n").arg(x+160); + s += QStringLiteral("\n").arg(x+160); // Lower branch - s += QString("\n").arg(num2str(L[aux-1])).arg(x+100); - s += QString("\n").arg(num2str(C[aux-1])).arg(x+160); - wirestr +=QString("<%1 30 %1 60 \"\" 0 0 0>\n").arg(x+160); - s += QString("\n").arg(x+160); + s += QStringLiteral("\n").arg(num2str(L[aux-1])).arg(x+100); + s += QStringLiteral("\n").arg(num2str(C[aux-1])).arg(x+160); + wirestr +=QStringLiteral("<%1 30 %1 60 \"\" 0 0 0>\n").arg(x+160); + s += QStringLiteral("\n").arg(x+160); } else { // Upper branch - s += QString("\n").arg(num2str(L[aux-1])).arg(x+100); - s += QString("\n").arg(num2str(C[aux]+C[aux-1])).arg(x+160); - wirestr +=QString("<%1 -90 %1 -120 \"\" 0 0 0>\n").arg(x+160); - s += QString("\n").arg(x+160); + s += QStringLiteral("\n").arg(num2str(L[aux-1])).arg(x+100); + s += QStringLiteral("\n").arg(num2str(C[aux]+C[aux-1])).arg(x+160); + wirestr +=QStringLiteral("<%1 -90 %1 -120 \"\" 0 0 0>\n").arg(x+160); + s += QStringLiteral("\n").arg(x+160); // Lower branch - s += QString("\n").arg(num2str(L[aux-1])).arg(x+100); - s += QString("\n").arg(num2str(C[aux]+C[aux-1])).arg(x+160); - wirestr +=QString("<%1 30 %1 60 \"\" 0 0 0>\n").arg(x+160); - s += QString("\n").arg(x+160); + s += QStringLiteral("\n").arg(num2str(L[aux-1])).arg(x+100); + s += QStringLiteral("\n").arg(num2str(C[aux]+C[aux-1])).arg(x+160); + wirestr +=QStringLiteral("<%1 30 %1 60 \"\" 0 0 0>\n").arg(x+160); + s += QStringLiteral("\n").arg(x+160); } } else//Ideal transmission lines { - s += QString("\n").arg(x+100).arg(RoundVariablePrecision(Zi)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Upper branch - s += QString("\n").arg(x+100).arg(RoundVariablePrecision(Zi)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Lower branch + s += QStringLiteral("\n").arg(x+100).arg(RoundVariablePrecision(Zi)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Upper branch + s += QStringLiteral("\n").arg(x+100).arg(RoundVariablePrecision(Zi)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Lower branch } } - s += QString("\n").arg(x+160).arg(RoundVariablePrecision(Ri));//Isolation resistor + s += QStringLiteral("\n").arg(x+160).arg(RoundVariablePrecision(Ri));//Isolation resistor x+=spacing; if(SP_block && (i==1))//Add output ports at the last stage { - s += QString("\n").arg(x+300).arg(Z0); - s += QString("\n").arg(x+300); - wirestr +=QString("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+150).arg(x+300); - s += QString("\n").arg(x+300).arg(Z0); - s += QString("\n").arg(x+300); - wirestr +=QString("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+150).arg(x+300); + s += QStringLiteral("\n").arg(x+300).arg(Z0); + s += QStringLiteral("\n").arg(x+300); + wirestr +=QStringLiteral("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+150).arg(x+300); + s += QStringLiteral("\n").arg(x+300).arg(Z0); + s += QStringLiteral("\n").arg(x+300); + wirestr +=QStringLiteral("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+150).arg(x+300); } } s += "\n"; @@ -1069,20 +1069,20 @@ int QucsPowerCombiningTool::Tee(double Z0, double Freq, double K, bool SP_block, if (SP_block) { //Source - s += QString("\n").arg(Z0); - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); //Output port 1 - s += QString("\n").arg(2*Z0); - s += QString("\n"); + s += QStringLiteral("\n").arg(2*Z0); + s += QStringLiteral("\n"); //Output port 2 - s += QString("\n").arg(2*Z0); - s += QString("\n"); + s += QStringLiteral("\n").arg(2*Z0); + s += QStringLiteral("\n"); //S-parameter analysis component - QString freq_start = QString("%1%2").arg(0.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - QString freq_stop = QString("%1%2").arg(1.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - s += QString("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop); - s += QString("\n"); - if (microcheck)s += QString("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); + QString freq_start = QStringLiteral("%1%2").arg(0.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + QString freq_stop = QStringLiteral("%1%2").arg(1.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + s += QStringLiteral("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop); + s += QStringLiteral("\n"); + if (microcheck)s += QStringLiteral("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); } @@ -1090,19 +1090,19 @@ int QucsPowerCombiningTool::Tee(double Z0, double Freq, double K, bool SP_block, { er = Substrate.er; getMicrostrip(Z0, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(Z0*(K+1), Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(Z0*(K+1)/K, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); } else { - s += QString("\n").arg(RoundVariablePrecision(Z0)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Z0 line - s += QString("\n").arg(RoundVariablePrecision(Z0*(K+1))).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 1 - s += QString("\n").arg(RoundVariablePrecision(Z0*(K+1)/K)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 2 + s += QStringLiteral("\n").arg(RoundVariablePrecision(Z0)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Z0 line + s += QStringLiteral("\n").arg(RoundVariablePrecision(Z0*(K+1))).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 1 + s += QStringLiteral("\n").arg(RoundVariablePrecision(Z0*(K+1)/K)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 2 } if (K!=1) {// An unequal power ratio implies that the load impedance != 50, so it requires matching @@ -1110,39 +1110,39 @@ int QucsPowerCombiningTool::Tee(double Z0, double Freq, double K, bool SP_block, { er = Substrate.er; getMicrostrip(sqrt(2*Z0*Z0*(K+1)), Freq, &Substrate, width, er); - s += QString("\n").arg(width).arg(lambda4/sqrt(er)); + s += QStringLiteral("\n").arg(width).arg(lambda4/sqrt(er)); er = Substrate.er; getMicrostrip(sqrt(Z0*Z0*(K+1)/K), Freq, &Substrate, width, er); - s += QString("\n").arg(width).arg(lambda4/sqrt(er)); + s += QStringLiteral("\n").arg(width).arg(lambda4/sqrt(er)); } else { - s += QString("\n").arg(RoundVariablePrecision(sqrt(2*Z0*Z0*(K+1)))).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Quarter wave matching output branch 1 - s += QString("\n").arg(RoundVariablePrecision(sqrt(2*Z0*Z0*(K+1)/K))).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Quarter wave matching output branch 2 + s += QStringLiteral("\n").arg(RoundVariablePrecision(sqrt(2*Z0*Z0*(K+1)))).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Quarter wave matching output branch 1 + s += QStringLiteral("\n").arg(RoundVariablePrecision(sqrt(2*Z0*Z0*(K+1)/K))).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Quarter wave matching output branch 2 } } s += "\n"; //Wiring s += "\n"; - s += QString("<0 -30 90 -30 \"\" 0 0 0>\n");//Source to Z0 line - s += QString("<150 -30 200 -30 \"\" 0 0 0>\n");//Source to Z0 line - s += QString("<200 30 200 -90 \"\" 0 0 0>\n");//Z0 line to branches - s += QString("<200 30 240 30 \"\" 0 0 0>\n");//Z0 line to branch 1 - s += QString("<200 -90 240 -90 \"\" 0 0 0>\n");//Z0 line to branch 2 - - s += QString("<300 30 340 30 \"\" 0 0 0>\n");//Branch 2to R - s += QString("<300 -90 340 -90 \"\" 0 0 0>\n");//Branch 1 to R + s += QStringLiteral("<0 -30 90 -30 \"\" 0 0 0>\n");//Source to Z0 line + s += QStringLiteral("<150 -30 200 -30 \"\" 0 0 0>\n");//Source to Z0 line + s += QStringLiteral("<200 30 200 -90 \"\" 0 0 0>\n");//Z0 line to branches + s += QStringLiteral("<200 30 240 30 \"\" 0 0 0>\n");//Z0 line to branch 1 + s += QStringLiteral("<200 -90 240 -90 \"\" 0 0 0>\n");//Z0 line to branch 2 + + s += QStringLiteral("<300 30 340 30 \"\" 0 0 0>\n");//Branch 2to R + s += QStringLiteral("<300 -90 340 -90 \"\" 0 0 0>\n");//Branch 1 to R if (K!=1) { - s += QString("<400 30 450 30 \"\" 0 0 0>\n");//Branch 2 to Port 2 - s += QString("<400 -90 450 -90 \"\" 0 0 0>\n");//Branch 2 to Port 3 + s += QStringLiteral("<400 30 450 30 \"\" 0 0 0>\n");//Branch 2 to Port 2 + s += QStringLiteral("<400 -90 450 -90 \"\" 0 0 0>\n");//Branch 2 to Port 3 } else { - s += QString("<340 30 450 30 \"\" 0 0 0>\n");//Branch 2 to Port 2 - s += QString("<340 -90 450 -90 \"\" 0 0 0>\n");//Branch 2 to Port 3 + s += QStringLiteral("<340 30 450 30 \"\" 0 0 0>\n");//Branch 2 to Port 2 + s += QStringLiteral("<340 -90 450 -90 \"\" 0 0 0>\n");//Branch 2 to Port 3 } s += "\n"; @@ -1164,20 +1164,20 @@ int QucsPowerCombiningTool::Branchline(double Z0, double Freq, double K, bool SP if (SP_block) { //Source - s += QString("\n").arg(Z0); - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); //Output port 1 - s += QString("\n").arg(Z0); - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); //Output port 2 - s += QString("\n").arg(Z0); - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); //S-parameter analysis component - QString freq_start = QString("%1%2").arg(0.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - QString freq_stop = QString("%1%2").arg(1.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - s += QString("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop); - s += QString("\n"); - if (microcheck)s += QString("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); + QString freq_start = QStringLiteral("%1%2").arg(0.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + QString freq_stop = QStringLiteral("%1%2").arg(1.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + s += QStringLiteral("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop); + s += QStringLiteral("\n"); + if (microcheck)s += QStringLiteral("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); } @@ -1186,47 +1186,47 @@ int QucsPowerCombiningTool::Branchline(double Z0, double Freq, double K, bool SP { er = Substrate.er; getMicrostrip(ZA, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(ZA, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(ZB, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(ZB, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); } else { - s += QString("\n").arg(RoundVariablePrecision(ZA)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Z0 line - s += QString("\n").arg(RoundVariablePrecision(ZA)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 1 - s += QString("\n").arg(RoundVariablePrecision(ZB)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 2 - s += QString("\n").arg(RoundVariablePrecision(ZB)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 2 + s += QStringLiteral("\n").arg(RoundVariablePrecision(ZA)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Z0 line + s += QStringLiteral("\n").arg(RoundVariablePrecision(ZA)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 1 + s += QStringLiteral("\n").arg(RoundVariablePrecision(ZB)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 2 + s += QStringLiteral("\n").arg(RoundVariablePrecision(ZB)).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 2 } - s += QString("\n").arg(Z0);//Isolated port - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0);//Isolated port + s += QStringLiteral("\n"); s += "\n"; //Wiring s += "\n"; - s += QString("<150 -90 190 -90 \"\" 0 0 0 \"\">\n"); - s += QString("<150 -90 150 -50 \"\" 0 0 0 \"\">\n"); - s += QString("<290 -90 290 -50 \"\" 0 0 0 \"\">\n"); - s += QString("<250 -90 290 -90 \"\" 0 0 0 \"\">\n"); - s += QString("<250 30 290 30 \"\" 0 0 0 \"\">\n"); - s += QString("<290 10 290 30 \"\" 0 0 0 \"\">\n"); - s += QString("<150 30 190 30 \"\" 0 0 0 \"\">\n"); - s += QString("<150 10 150 30 \"\" 0 0 0 \"\">\n"); - s += QString("<290 -150 290 -90 \"\" 0 0 0 \"\">\n"); - s += QString("<290 -150 400 -150 \"\" 0 0 0 \"\">\n"); - s += QString("<150 -150 150 -90 \"\" 0 0 0 \"\">\n"); - s += QString("<50 -150 150 -150 \"\" 0 0 0 \"\">\n"); - s += QString("<150 30 150 60 \"\" 0 0 0 \"\">\n"); - s += QString("<150 30 150 60 \"\" 0 0 0 \"\">\n"); - s += QString("<50 60 150 60 \"\" 0 0 0 \"\">\n"); - s += QString("<290 30 290 60 \"\" 0 0 0 \"\">\n"); - s += QString("<290 60 400 60 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<150 -90 190 -90 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<150 -90 150 -50 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<290 -90 290 -50 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<250 -90 290 -90 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<250 30 290 30 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<290 10 290 30 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<150 30 190 30 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<150 10 150 30 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<290 -150 290 -90 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<290 -150 400 -150 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<150 -150 150 -90 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<50 -150 150 -150 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<150 30 150 60 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<150 30 150 60 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<50 60 150 60 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<290 30 290 60 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<290 60 400 60 \"\" 0 0 0 \"\">\n"); s += "\n"; @@ -1253,20 +1253,20 @@ int QucsPowerCombiningTool::DoubleBoxBranchline(double Z0, double Freq, double K if (SP_block) { //Source - s += QString("\n").arg(Z0); - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); //Output port 1 - s += QString("\n").arg(Z0); - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); //Output port 2 - s += QString("\n").arg(Z0); - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); //S-parameter analysis component - QString freq_start = QString("%1%2").arg(0.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - QString freq_stop = QString("%1%2").arg(1.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - s += QString("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop); - s += QString("\n"); - if (microcheck)s += QString("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); + QString freq_start = QStringLiteral("%1%2").arg(0.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + QString freq_stop = QStringLiteral("%1%2").arg(1.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + s += QStringLiteral("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop); + s += QStringLiteral("\n"); + if (microcheck)s += QStringLiteral("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); } @@ -1275,71 +1275,71 @@ int QucsPowerCombiningTool::DoubleBoxBranchline(double Z0, double Freq, double K { er = Substrate.er; getMicrostrip(ZB, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(ZB, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(ZB, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(ZB, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(ZB, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(ZA, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(ZD, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); } else { - s += QString("\n").arg(RoundVariablePrecision(ZB)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); - s += QString("\n").arg(RoundVariablePrecision(ZB)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); + s += QStringLiteral("\n").arg(RoundVariablePrecision(ZB)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); + s += QStringLiteral("\n").arg(RoundVariablePrecision(ZB)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); - s += QString("\n").arg(RoundVariablePrecision(ZB)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); + s += QStringLiteral("\n").arg(RoundVariablePrecision(ZB)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); - s += QString("\n").arg(RoundVariablePrecision(ZB)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); - s += QString("\n").arg(RoundVariablePrecision(ZB)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); + s += QStringLiteral("\n").arg(RoundVariablePrecision(ZB)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); + s += QStringLiteral("\n").arg(RoundVariablePrecision(ZB)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); - s += QString("\n").arg(RoundVariablePrecision(ZA)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); - s += QString("\n").arg(RoundVariablePrecision(ZD)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); + s += QStringLiteral("\n").arg(RoundVariablePrecision(ZA)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); + s += QStringLiteral("\n").arg(RoundVariablePrecision(ZD)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); } - s += QString("\n").arg(Z0);//Isolated port - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0);//Isolated port + s += QStringLiteral("\n"); s += "\n"; //Wiring s += "\n"; - s += QString("<290 -90 290 -50 \"\" 0 0 0 \"\">\n"); - s += QString("<290 10 290 30 \"\" 0 0 0 \"\">\n"); - s += QString("<290 -90 320 -90 \"\" 0 0 0 \"\">\n"); - s += QString("<250 -90 290 -90 \"\" 0 0 0 \"\">\n"); - s += QString("<290 30 320 30 \"\" 0 0 0 \"\">\n"); - s += QString("<250 30 290 30 \"\" 0 0 0 \"\">\n"); - s += QString("<380 -90 420 -90 \"\" 0 0 0 \"\">\n"); - s += QString("<420 -90 420 -50 \"\" 0 0 0 \"\">\n"); - s += QString("<380 30 420 30 \"\" 0 0 0 \"\">\n"); - s += QString("<420 10 420 30 \"\" 0 0 0 \"\">\n"); - s += QString("<40 30 40 60 \"\" 0 0 0 \"\">\n"); - s += QString("<40 30 150 30 \"\" 0 0 0 \"\">\n"); - s += QString("<150 30 190 30 \"\" 0 0 0 \"\">\n"); - s += QString("<150 10 150 30 \"\" 0 0 0 \"\">\n"); - s += QString("<150 -90 150 -50 \"\" 0 0 0 \"\">\n"); - s += QString("<150 -90 190 -90 \"\" 0 0 0 \"\">\n"); - s += QString("<420 -160 420 -90 \"\" 0 0 0 \"\">\n"); - s += QString("<420 -160 500 -160 \"\" 0 0 0 \"\">\n"); - s += QString("<500 -160 500 -130 \"\" 0 0 0 \"\">\n"); - s += QString("<500 30 500 60 \"\" 0 0 0 \"\">\n"); - s += QString("<420 30 500 30 \"\" 0 0 0 \"\">\n"); - s += QString("<130 -160 150 -90 \"\" 0 0 0 \"\">\n"); - s += QString("<40 -160 150 -160 \"\" 0 0 0 \"\">\n"); - s += QString("<40 -160 40 -130 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<290 -90 290 -50 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<290 10 290 30 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<290 -90 320 -90 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<250 -90 290 -90 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<290 30 320 30 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<250 30 290 30 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<380 -90 420 -90 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<420 -90 420 -50 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<380 30 420 30 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<420 10 420 30 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<40 30 40 60 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<40 30 150 30 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<150 30 190 30 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<150 10 150 30 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<150 -90 150 -50 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<150 -90 190 -90 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<420 -160 420 -90 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<420 -160 500 -160 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<500 -160 500 -130 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<500 30 500 60 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<420 30 500 30 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<130 -160 150 -90 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<40 -160 150 -160 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<40 -160 40 -130 \"\" 0 0 0 \"\">\n"); s += "\n"; @@ -1356,7 +1356,7 @@ int QucsPowerCombiningTool::Bagley(double Z0, double Freq, int N, bool SP_block, if (N % 2 == 0) { N++; - QString str = QString("The number of outputs must be an odd number. N=%1 will be used instead").arg(N); + QString str = QStringLiteral("The number of outputs must be an odd number. N=%1 will be used instead").arg(N); QMessageBox::warning(this, tr("Bagley"), str, QMessageBox::Close); } double er, width; @@ -1369,20 +1369,20 @@ int QucsPowerCombiningTool::Bagley(double Z0, double Freq, int N, bool SP_block, if (SP_block) { //Source - s += QString("\n").arg(Z0); - s += QString("\n"); - QString freq_start = QString("%1%2").arg(0.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - QString freq_stop = QString("%1%2").arg(1.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - s += QString("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop); + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); + QString freq_start = QStringLiteral("%1%2").arg(0.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + QString freq_stop = QStringLiteral("%1%2").arg(1.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + s += QStringLiteral("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop); //Equations - QString str = QString(" \"S11_dB=dB(S[1,1])\" 1 "); + QString str = QStringLiteral(" \"S11_dB=dB(S[1,1])\" 1 "); for (int i=2;i<=N+1; i++) { - str += QString("\"S%1%2_dB=dB(S[%1,1])\" 1 ").arg(i).arg(1); - str += QString("\"S%1%1_dB=dB(S[%1,%1])\" 1 ").arg(i); + str += QStringLiteral("\"S%1%2_dB=dB(S[%1,1])\" 1 ").arg(i).arg(1); + str += QStringLiteral("\"S%1%1_dB=dB(S[%1,%1])\" 1 ").arg(i); } - s += QString("\n"); - if (microcheck)s += QString("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); + s += QStringLiteral("\n"); + if (microcheck)s += QStringLiteral("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); } //Input section @@ -1390,39 +1390,39 @@ int QucsPowerCombiningTool::Bagley(double Z0, double Freq, int N, bool SP_block, { er = Substrate.er; getMicrostrip(Zbranch, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(Zbranch, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); } else { - s += QString("\n").arg(RoundVariablePrecision(Zbranch)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); - s += QString("\n").arg(RoundVariablePrecision(Zbranch)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); + s += QStringLiteral("\n").arg(RoundVariablePrecision(Zbranch)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); + s += QStringLiteral("\n").arg(RoundVariablePrecision(Zbranch)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); } //Output branches int x = 240; - s += QString("\n").arg(x-100).arg(Z0); - s += QString("\n").arg(x-100); + s += QStringLiteral("\n").arg(x-100).arg(Z0); + s += QStringLiteral("\n").arg(x-100); for (int i=1;i\n").arg(x).arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda2/sqrt(er))); + s += QStringLiteral("\n").arg(x).arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda2/sqrt(er))); } else { - s += QString("\n").arg(x).arg(RoundVariablePrecision(Zbranch)).arg(ConvertLengthFromM(lambda2)).arg(Alpha); + s += QStringLiteral("\n").arg(x).arg(RoundVariablePrecision(Zbranch)).arg(ConvertLengthFromM(lambda2)).arg(Alpha); } x+=100; if (SP_block) { //i-th output port - s += QString("\n").arg(x).arg(Z0); - s += QString("\n").arg(x); + s += QStringLiteral("\n").arg(x).arg(Z0); + s += QStringLiteral("\n").arg(x); } x+=100; } @@ -1432,24 +1432,24 @@ int QucsPowerCombiningTool::Bagley(double Z0, double Freq, int N, bool SP_block, //Wiring s += "\n"; - s += QString("<0 -90 100 -90 \"\" 0 0 0>\n");//Source to lambda/4 lines - s += QString("<100 -110 100 -60 \"\" 0 0 0>\n");//lambda/4 lines - s += QString("<100 30 140 30 \"\" 0 0 0>\n");//Lower lambda/4 line to the first lambda/2 section - s += QString("<100 30 100 0 \"\" 0 0 0>\n");//Lower lambda/4 line to the first lambda/2 section + s += QStringLiteral("<0 -90 100 -90 \"\" 0 0 0>\n");//Source to lambda/4 lines + s += QStringLiteral("<100 -110 100 -60 \"\" 0 0 0>\n");//lambda/4 lines + s += QStringLiteral("<100 30 140 30 \"\" 0 0 0>\n");//Lower lambda/4 line to the first lambda/2 section + s += QStringLiteral("<100 30 100 0 \"\" 0 0 0>\n");//Lower lambda/4 line to the first lambda/2 section //Wiring the rest of the lambda/2 sections x=140; for (int i=1;i\n").arg(x).arg(x+70); - s += QString("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+130).arg(x+200); + s += QStringLiteral("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x).arg(x+70); + s += QStringLiteral("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+130).arg(x+200); x+=200; } - s += QString("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x).arg(x+30); - s += QString("<%1 30 %1 -200 \"\" 0 0 0>\n").arg(x+30);//Final lambda/2 section to the upper lambda/4 section. Vertical line - s += QString("<100 -200 %1 -200 \"\" 0 0 0>\n").arg(x+30);//Final lambda/2 section to the upper lambda/4 section. Horizontal line - s += QString("<100 -170 100 -200 \"\" 0 0 0>\n"); + s += QStringLiteral("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x).arg(x+30); + s += QStringLiteral("<%1 30 %1 -200 \"\" 0 0 0>\n").arg(x+30);//Final lambda/2 section to the upper lambda/4 section. Vertical line + s += QStringLiteral("<100 -200 %1 -200 \"\" 0 0 0>\n").arg(x+30);//Final lambda/2 section to the upper lambda/4 section. Horizontal line + s += QStringLiteral("<100 -170 100 -200 \"\" 0 0 0>\n"); s += "\n"; @@ -1470,22 +1470,22 @@ int QucsPowerCombiningTool::Gysel(double Z0, double Freq, bool SP_block, bool mi if (SP_block) { //Source - s += QString("\n").arg(Z0); - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); //Output port 1 - s += QString("\n").arg(Z0); - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); //Output port 2 - s += QString("\n").arg(Z0); - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); //S-parameter analysis component - QString freq_start = QString("%1%2").arg(0.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - QString freq_stop = QString("%1%2").arg(1.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - s += QString("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop); - s += QString("\n"); + QString freq_start = QStringLiteral("%1%2").arg(0.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + QString freq_stop = QStringLiteral("%1%2").arg(1.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + s += QStringLiteral("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop); + s += QStringLiteral("\n"); - if (microcheck)s += QString("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); + if (microcheck)s += QStringLiteral("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); } @@ -1494,58 +1494,58 @@ int QucsPowerCombiningTool::Gysel(double Z0, double Freq, bool SP_block, bool mi { er = Substrate.er; getMicrostrip(sqrt(2)*Z0, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(sqrt(2)*Z0, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(Z0, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(Z0, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))); er = Substrate.er; getMicrostrip(Z0/sqrt(2), Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(2*lambda4/sqrt(er))); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(2*lambda4/sqrt(er))); } else { - s += QString("\n").arg(RoundVariablePrecision(sqrt(2)*Z0)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); - s += QString("\n").arg(RoundVariablePrecision(sqrt(2)*Z0)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); - s += QString("\n").arg(Z0).arg(ConvertLengthFromM(lambda4)).arg(Alpha); - s += QString("\n").arg(Z0).arg(ConvertLengthFromM(lambda4)).arg(Alpha); - s += QString("\n").arg(RoundVariablePrecision(Z0/sqrt(2))).arg(ConvertLengthFromM(2*lambda4)).arg(Alpha); + s += QStringLiteral("\n").arg(RoundVariablePrecision(sqrt(2)*Z0)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); + s += QStringLiteral("\n").arg(RoundVariablePrecision(sqrt(2)*Z0)).arg(ConvertLengthFromM(lambda4)).arg(Alpha); + s += QStringLiteral("\n").arg(Z0).arg(ConvertLengthFromM(lambda4)).arg(Alpha); + s += QStringLiteral("\n").arg(Z0).arg(ConvertLengthFromM(lambda4)).arg(Alpha); + s += QStringLiteral("\n").arg(RoundVariablePrecision(Z0/sqrt(2))).arg(ConvertLengthFromM(2*lambda4)).arg(Alpha); } //Resistors - s += QString("\n").arg(Z0);//Isolation resistor - s += QString("\n"); - s += QString("\n").arg(Z0);//Isolation resistor - s += QString("\n"); + s += QStringLiteral("\n").arg(Z0);//Isolation resistor + s += QStringLiteral("\n"); + s += QStringLiteral("\n").arg(Z0);//Isolation resistor + s += QStringLiteral("\n"); s += "\n"; s += "\n"; - s += QString("<120 70 120 100 \"\" 0 0 0 \"\">\n");//Source to the lines at the input - s += QString("<120 -130 120 -100 \"\" 0 0 0 \"\">\n");//Line between the two lines at the input - s += QString("<120 -130 190 -130 \"\" 0 0 0 \"\">\n"); - s += QString("<120 -200 120 -130 \"\" 0 0 0 \"\">\n"); - s += QString("<250 -130 320 -130 \"\" 0 0 0 \"\">\n"); - s += QString("<320 -130 320 -50 \"\" 0 0 0 \"\">\n"); - s += QString("<120 100 190 100 \"\" 0 0 0 \"\">\n");//Line between the line on the top to the upper resistor - s += QString("<250 100 320 100 \"\" 0 0 0 \"\">\n");//Line between the line on the top to the lower resistor - s += QString("<320 10 320 100 \"\" 0 0 0 \"\">\n"); - s += QString("<30 -200 120 -200 \"\" 0 0 0 \"\">\n"); - s += QString("<30 -200 30 -190 \"\" 0 0 0 \"\">\n"); - s += QString("<400 -200 400 -190 \"\" 0 0 0 \"\">\n"); - s += QString("<320 -200 320 -130 \"\" 0 0 0 \"\">\n"); - s += QString("<320 -200 400 -200 \"\" 0 0 0 \"\">\n"); - s += QString("<320 100 400 100 \"\" 0 0 0 \"\">\n"); - s += QString("<30 100 120 100 \"\" 0 0 0 \"\">\n"); - s += QString("<30 100 30 110 \"\" 0 0 0 \"\">\n"); - s += QString("<120 -40 120 -30 \"\" 0 0 0 \"\">\n"); - s += QString("<120 -30 120 10 \"\" 0 0 0 \"\">\n"); - s += QString("<0 -30 120 -30 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<120 70 120 100 \"\" 0 0 0 \"\">\n");//Source to the lines at the input + s += QStringLiteral("<120 -130 120 -100 \"\" 0 0 0 \"\">\n");//Line between the two lines at the input + s += QStringLiteral("<120 -130 190 -130 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<120 -200 120 -130 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<250 -130 320 -130 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<320 -130 320 -50 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<120 100 190 100 \"\" 0 0 0 \"\">\n");//Line between the line on the top to the upper resistor + s += QStringLiteral("<250 100 320 100 \"\" 0 0 0 \"\">\n");//Line between the line on the top to the lower resistor + s += QStringLiteral("<320 10 320 100 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<30 -200 120 -200 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<30 -200 30 -190 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<400 -200 400 -190 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<320 -200 320 -130 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<320 -200 400 -200 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<320 100 400 100 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<30 100 120 100 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<30 100 30 110 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<120 -40 120 -30 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<120 -30 120 10 \"\" 0 0 0 \"\">\n"); + s += QStringLiteral("<0 -30 120 -30 \"\" 0 0 0 \"\">\n"); s += "\n"; QApplication::clipboard()->setText(s, QClipboard::Clipboard); @@ -1563,23 +1563,23 @@ int QucsPowerCombiningTool::TravellingWave(double Z0, double Freq, int N, bool S if (SP_block) { //Source - s += QString("\n").arg(Z0); - s += QString("\n"); - wirestr +=QString("<0 0 0 -30 \"\" 0 0 0>\n");//Vertical wire - wirestr +=QString("<0 -30 40 -30 \"\" 0 0 0>\n");//Horizontal wire + s += QStringLiteral("\n").arg(Z0); + s += QStringLiteral("\n"); + wirestr +=QStringLiteral("<0 0 0 -30 \"\" 0 0 0>\n");//Vertical wire + wirestr +=QStringLiteral("<0 -30 40 -30 \"\" 0 0 0>\n");//Horizontal wire //S-parameter analysis component - QString freq_start = QString("%1%2").arg(0.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - QString freq_stop = QString("%1%2").arg(1.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - s += QString("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop); + QString freq_start = QStringLiteral("%1%2").arg(0.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + QString freq_stop = QStringLiteral("%1%2").arg(1.5*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + s += QStringLiteral("<.SP SP1 1 200 200 0 67 0 0 \"lin\" 1 \"%2\" 1 \"%3\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop); // Equations - str = QString("\"S11_dB=dB(S[1,1])\" 1 "); + str = QStringLiteral("\"S11_dB=dB(S[1,1])\" 1 "); for (int i=2;i<=N+1; i++) { - str += QString("\"S%1%2_dB=dB(S[%1,1])\" 1 ").arg(i).arg(1); - str += QString("\"S%1%1_dB=dB(S[%1,%1])\" 1 ").arg(i); + str += QStringLiteral("\"S%1%2_dB=dB(S[%1,1])\" 1 ").arg(i).arg(1); + str += QStringLiteral("\"S%1%1_dB=dB(S[%1,%1])\" 1 ").arg(i); } - s += QString("\n"); - if (microcheck)s += QString("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); + s += QStringLiteral("\n"); + if (microcheck)s += QStringLiteral("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); } @@ -1596,48 +1596,48 @@ int QucsPowerCombiningTool::TravellingWave(double Z0, double Freq, int N, bool S R2 = wilkstr.section(';', 3, 3).toDouble(); R3 = wilkstr.section(';', 4, 4).toDouble(); - wirestr +=QString("<%1 -30 %2 -30 \"\" 0 0 0>\n").arg(x-60).arg(x-30); - wirestr +=QString("<%1 -30 %2 -30 \"\" 0 0 0>\n").arg(x+30).arg(x+60); + wirestr +=QStringLiteral("<%1 -30 %2 -30 \"\" 0 0 0>\n").arg(x-60).arg(x-30); + wirestr +=QStringLiteral("<%1 -30 %2 -30 \"\" 0 0 0>\n").arg(x+30).arg(x+60); - wirestr +=QString("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+60).arg(x+100); - wirestr +=QString("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+60).arg(x+100); + wirestr +=QStringLiteral("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+60).arg(x+100); + wirestr +=QStringLiteral("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+60).arg(x+100); - wirestr +=QString("<%1 -90 %1 30 \"\" 0 0 0>\n").arg(x+60); + wirestr +=QStringLiteral("<%1 -90 %1 30 \"\" 0 0 0>\n").arg(x+60); - wirestr +=QString("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+160).arg(x+200); - wirestr +=QString("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+160).arg(x+200); + wirestr +=QStringLiteral("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+160).arg(x+200); + wirestr +=QStringLiteral("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+160).arg(x+200); - wirestr +=QString("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+260).arg(x+350); - wirestr +=QString("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+260).arg(x+290); - wirestr +=QString("<%1 30 %1 60 \"\" 0 0 0>\n").arg(x+350); + wirestr +=QStringLiteral("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+260).arg(x+350); + wirestr +=QStringLiteral("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+260).arg(x+290); + wirestr +=QStringLiteral("<%1 30 %1 60 \"\" 0 0 0>\n").arg(x+350); //Wiring the isolation resistor - wirestr +=QString("<%1 30 %1 10 \"\" 0 0 0>\n").arg(x+190); - wirestr +=QString("<%1 -90 %1 -50 \"\" 0 0 0>\n").arg(x+190); + wirestr +=QStringLiteral("<%1 30 %1 10 \"\" 0 0 0>\n").arg(x+190); + wirestr +=QStringLiteral("<%1 -90 %1 -50 \"\" 0 0 0>\n").arg(x+190); - if(n>1)wirestr +=QString("<%1 -90 %1 -30 \"\" 0 0 0>\n").arg(x+290); - if(n==1)wirestr +=QString("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+290).arg(x+350);//Last power combiner + if(n>1)wirestr +=QStringLiteral("<%1 -90 %1 -30 \"\" 0 0 0>\n").arg(x+290); + if(n==1)wirestr +=QStringLiteral("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+290).arg(x+350);//Last power combiner if (microcheck) { er = Substrate.er; getMicrostrip(Z0, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x); er = Substrate.er; getMicrostrip(Z3, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x+130); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x+130); er = Substrate.er; getMicrostrip(Z2, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x+130); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x+130); } else { aux_str = ConvertLengthFromM(lambda4); - s += QString("\n").arg(x).arg(Z0).arg(aux_str).arg(Alpha);//Z0 line - s += QString("\n").arg(x+130).arg(RoundVariablePrecision(Z3)).arg(aux_str).arg(Alpha);//Output branch 1 - s += QString("\n").arg(x+130).arg(RoundVariablePrecision(Z2)).arg(aux_str).arg(Alpha);//Output branch 2 + s += QStringLiteral("\n").arg(x).arg(Z0).arg(aux_str).arg(Alpha);//Z0 line + s += QStringLiteral("\n").arg(x+130).arg(RoundVariablePrecision(Z3)).arg(aux_str).arg(Alpha);//Output branch 1 + s += QStringLiteral("\n").arg(x+130).arg(RoundVariablePrecision(Z2)).arg(aux_str).arg(Alpha);//Output branch 2 } - s += QString("\n").arg(x+190).arg(RoundVariablePrecision(R));//Isolation resistor + s += QStringLiteral("\n").arg(x+190).arg(RoundVariablePrecision(R));//Isolation resistor if ((R2!=50)||(R3 != 50)) {// An unequal power ratio implies that the load impedance != 50, so it requires matching. @@ -1647,37 +1647,37 @@ int QucsPowerCombiningTool::TravellingWave(double Z0, double Freq, int N, bool S getMicrostrip(sqrt(Z0*R3), Freq, &Substrate, width, er); aux_str = ConvertLengthFromM(lambda4/sqrt(er)); aux_str_2 = ConvertLengthFromM(width); - s += QString("\n").arg(aux_str_2).arg(aux_str).arg(x+230); + s += QStringLiteral("\n").arg(aux_str_2).arg(aux_str).arg(x+230); er = Substrate.er; getMicrostrip(sqrt(Z0*R2), Freq, &Substrate, width, er); aux_str = ConvertLengthFromM(lambda4/sqrt(er)); aux_str_2 = ConvertLengthFromM(width); - s += QString("\n").arg(aux_str_2).arg(aux_str).arg(x+230); + s += QStringLiteral("\n").arg(aux_str_2).arg(aux_str).arg(x+230); } else { - s += QString("\n").arg(x+230).arg(RoundVariablePrecision(sqrt(Z0*R3))).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Quarter wave matching output branch 1 - s += QString("\n").arg(x+230).arg(RoundVariablePrecision(sqrt(Z0*R2))).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Quarter wave matching output branch 2 + s += QStringLiteral("\n").arg(x+230).arg(RoundVariablePrecision(sqrt(Z0*R3))).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Quarter wave matching output branch 1 + s += QStringLiteral("\n").arg(x+230).arg(RoundVariablePrecision(sqrt(Z0*R2))).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Quarter wave matching output branch 2 } } else { - wirestr +=QString("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+200).arg(x+260); - wirestr +=QString("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+200).arg(x+260); + wirestr +=QStringLiteral("<%1 30 %2 30 \"\" 0 0 0>\n").arg(x+200).arg(x+260); + wirestr +=QStringLiteral("<%1 -90 %2 -90 \"\" 0 0 0>\n").arg(x+200).arg(x+260); } x+=spacing; if(SP_block)//Add output terms { - s += QString("\n").arg(x).arg(Z0); - s += QString("\n").arg(x); + s += QStringLiteral("\n").arg(x).arg(Z0); + s += QStringLiteral("\n").arg(x); if(n==1)//The last Wilkinson divider { - s += QString("\n").arg(x).arg(Z0); - s += QString("\n").arg(x); + s += QStringLiteral("\n").arg(x).arg(Z0); + s += QStringLiteral("\n").arg(x); } } @@ -1696,7 +1696,7 @@ int QucsPowerCombiningTool::Tree(double Z0, double Freq, int N, bool SP_block, b if ((N & (N - 1)) != 0)//Checking if the number of outputs is power of 2 { N = pow(2, ceil(log(N)/log(2)));//Rounding to the next power of 2 - QString str = QString("The number of outputs must be a power of 2. A %1-way combiner will be designed").arg(N); + QString str = QStringLiteral("The number of outputs must be a power of 2. A %1-way combiner will be designed").arg(N); QMessageBox::warning(this, tr("Tree combiner"), str, QMessageBox::Close); } double er, width; @@ -1724,69 +1724,69 @@ int QucsPowerCombiningTool::Tree(double Z0, double Freq, int N, bool SP_block, b { er = Substrate.er; getMicrostrip(Z0, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x).arg(offset); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x).arg(offset); er = Substrate.er; getMicrostrip(Zbranch, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x+100).arg(y+offset); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x+100).arg(y+offset); er = Substrate.er; getMicrostrip(Zbranch, Freq, &Substrate, width, er); - s += QString("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x+100).arg(-y+offset); + s += QStringLiteral("\n").arg(ConvertLengthFromM(width)).arg(ConvertLengthFromM(lambda4/sqrt(er))).arg(x+100).arg(-y+offset); } else { - s += QString("\n").arg(x).arg(offset).arg(Z0).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Z0 line - s += QString("\n").arg(x+100).arg(y+offset).arg(Zbranch).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 1 - s += QString("\n").arg(x+100).arg(-y+offset).arg(Zbranch).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 2 + s += QStringLiteral("\n").arg(x).arg(offset).arg(Z0).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Z0 line + s += QStringLiteral("\n").arg(x+100).arg(y+offset).arg(Zbranch).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 1 + s += QStringLiteral("\n").arg(x+100).arg(-y+offset).arg(Zbranch).arg(ConvertLengthFromM(lambda4)).arg(Alpha);//Output branch 2 } - s += QString("\n").arg(x+160).arg(offset).arg(2*Z0);//Isolation resistor + s += QStringLiteral("\n").arg(x+160).arg(offset).arg(2*Z0);//Isolation resistor - wirestr +=QString("<%1 %3 %2 %3 \"\" 0 0 0>\n").arg(x+30).arg(x+70).arg(y+offset); - wirestr +=QString("<%1 %3 %2 %3 \"\" 0 0 0>\n").arg(x+30).arg(x+70).arg(-y+offset); + wirestr +=QStringLiteral("<%1 %3 %2 %3 \"\" 0 0 0>\n").arg(x+30).arg(x+70).arg(y+offset); + wirestr +=QStringLiteral("<%1 %3 %2 %3 \"\" 0 0 0>\n").arg(x+30).arg(x+70).arg(-y+offset); - wirestr +=QString("<%1 %2 %1 %3 \"\" 0 0 0>\n").arg(x+30).arg(y+offset).arg(-y+offset); + wirestr +=QStringLiteral("<%1 %2 %1 %3 \"\" 0 0 0>\n").arg(x+30).arg(y+offset).arg(-y+offset); - wirestr +=QString("<%1 %3 %2 %3 \"\" 0 0 0>\n").arg(x+130).arg(x+170).arg(y+offset); - wirestr +=QString("<%1 %3 %2 %3 \"\" 0 0 0>\n").arg(x+130).arg(x+170).arg(-y+offset); + wirestr +=QStringLiteral("<%1 %3 %2 %3 \"\" 0 0 0>\n").arg(x+130).arg(x+170).arg(y+offset); + wirestr +=QStringLiteral("<%1 %3 %2 %3 \"\" 0 0 0>\n").arg(x+130).arg(x+170).arg(-y+offset); //Wiring the isolation resistor - wirestr +=QString("<%1 %2 %1 %3 \"\" 0 0 0>\n").arg(x+160).arg(y+offset).arg(offset+30); - wirestr +=QString("<%1 %2 %1 %3 \"\" 0 0 0>\n").arg(x+160).arg(-y+offset).arg(offset-30); + wirestr +=QStringLiteral("<%1 %2 %1 %3 \"\" 0 0 0>\n").arg(x+160).arg(y+offset).arg(offset+30); + wirestr +=QStringLiteral("<%1 %2 %1 %3 \"\" 0 0 0>\n").arg(x+160).arg(-y+offset).arg(offset-30); if (SP_block) { if (n==1)//Source { int sindex=s.indexOf("\n"); - s.insert(sindex+13, QString("\n").arg(Z0).arg(x-100).arg(offset+50)); - s += QString("\n").arg(x-100).arg(offset+80); - wirestr +=QString("<%1 %2 %1 %3 \"\" 0 0 0>\n").arg(x-100).arg(offset+20).arg(offset);//Vertical wire - wirestr +=QString("<%2 %1 %3 %1 \"\" 0 0 0>\n").arg(offset).arg(x-100).arg(x-30);//Horizontal wire + s.insert(sindex+13, QStringLiteral("\n").arg(Z0).arg(x-100).arg(offset+50)); + s += QStringLiteral("\n").arg(x-100).arg(offset+80); + wirestr +=QStringLiteral("<%1 %2 %1 %3 \"\" 0 0 0>\n").arg(x-100).arg(offset+20).arg(offset);//Vertical wire + wirestr +=QStringLiteral("<%2 %1 %3 %1 \"\" 0 0 0>\n").arg(offset).arg(x-100).arg(x-30);//Horizontal wire //S-parameter analysis component - QString freq_start = QString("%1%2").arg((1/N)*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - QString freq_stop = QString("%1%2").arg((2+1/N)*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); - s += QString("<.SP SP1 1 %3 %4 0 67 0 0 \"lin\" 1 \"%1\" 1 \"%2\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop).arg(x-200).arg(offset+200); + QString freq_start = QStringLiteral("%1%2").arg((1/N)*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + QString freq_stop = QStringLiteral("%1%2").arg((2+1/N)*FreqlineEdit->text().toDouble()).arg(FreqScaleCombo->currentText()); + s += QStringLiteral("<.SP SP1 1 %3 %4 0 67 0 0 \"lin\" 1 \"%1\" 1 \"%2\" 1 \"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n").arg(freq_start).arg(freq_stop).arg(x-200).arg(offset+200); // Equations - str = QString("\"S11_dB=dB(S[1,1])\" 1 "); + str = QStringLiteral("\"S11_dB=dB(S[1,1])\" 1 "); for (int i=2;i<=N+1; i++) { - str += QString("\"S%1%2_dB=dB(S[%1,1])\" 1 ").arg(i).arg(1); - str += QString("\"S%1%1_dB=dB(S[%1,%1])\" 1 ").arg(i); + str += QStringLiteral("\"S%1%2_dB=dB(S[%1,1])\" 1 ").arg(i).arg(1); + str += QStringLiteral("\"S%1%1_dB=dB(S[%1,%1])\" 1 ").arg(i); } - s += QString("\n"); - if (microcheck)s += QString("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); + s += QStringLiteral("\n"); + if (microcheck)s += QStringLiteral("\n").arg(Substrate.er).arg(Substrate.height*1e3).arg(Substrate.thickness*1e6).arg(Substrate.tand).arg(Substrate.resistivity).arg(Substrate.roughness); } if(n==N/2)//Loads { - s += QString("\n").arg(Z0).arg(x+200).arg(offset+y); - s += QString("\n").arg(x+230).arg(offset+y); - s += QString("\n").arg(Z0).arg(x+200).arg(offset-y); - s += QString("\n").arg(x+230).arg(offset-y); + s += QStringLiteral("\n").arg(Z0).arg(x+200).arg(offset+y); + s += QStringLiteral("\n").arg(x+230).arg(offset+y); + s += QStringLiteral("\n").arg(Z0).arg(x+200).arg(offset-y); + s += QStringLiteral("\n").arg(x+230).arg(offset-y); } } @@ -1995,7 +1995,7 @@ QString QucsPowerCombiningTool::ConvertLengthFromM(double len) index = 2;//microns break; } - return QString("%1 mil").arg(RoundVariablePrecision(conv)); + return QStringLiteral("%1 mil").arg(RoundVariablePrecision(conv)); case 2: //microns conv *= 1e6; if (conv > 999.99) @@ -2008,7 +2008,7 @@ QString QucsPowerCombiningTool::ConvertLengthFromM(double len) index = 3;//nanometers break; } - return QString("%1 um").arg(RoundVariablePrecision(conv)); + return QStringLiteral("%1 um").arg(RoundVariablePrecision(conv)); case 3: //nanometers conv *= 1e9; if (conv > 999.99) @@ -2016,7 +2016,7 @@ QString QucsPowerCombiningTool::ConvertLengthFromM(double len) index = 2;//microns break; } - return QString("%1 nm").arg(RoundVariablePrecision(conv)); + return QStringLiteral("%1 nm").arg(RoundVariablePrecision(conv)); case 4: //inch conv *= 39.3701; if (conv > 999.99) @@ -2029,7 +2029,7 @@ QString QucsPowerCombiningTool::ConvertLengthFromM(double len) index = 1;//mils break; } - return QString("%1 in").arg(RoundVariablePrecision(conv)); + return QStringLiteral("%1 in").arg(RoundVariablePrecision(conv)); case 5: //ft conv *= 3.280841666667; if (conv > 999.99) @@ -2042,14 +2042,14 @@ QString QucsPowerCombiningTool::ConvertLengthFromM(double len) index = 4;//inches break; } - return QString("%1 ft").arg(RoundVariablePrecision(conv)); + return QStringLiteral("%1 ft").arg(RoundVariablePrecision(conv)); case 6: //m if(conv < 1) { index = 0;//mm break; } - return QString("%1").arg(RoundVariablePrecision(len)); + return QStringLiteral("%1").arg(RoundVariablePrecision(len)); default: //milimeters conv *=1e3; if (conv > 999.99) @@ -2062,7 +2062,7 @@ QString QucsPowerCombiningTool::ConvertLengthFromM(double len) index = 2;//microns break; } - return QString("%1 mm").arg(RoundVariablePrecision(conv)); + return QStringLiteral("%1 mm").arg(RoundVariablePrecision(conv)); } }while(true); return QString(); @@ -2106,10 +2106,10 @@ QString QucsPowerCombiningTool::getSPEquationString(int x, int y) { QString s; if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) { - s = QString("\n").arg(x).arg(y); } else if (QucsSettings.DefaultSimulator == spicecompat::simNgspice) { - s = QString("\n").arg(x).arg(y); } return s; diff --git a/qucs-s-spar-viewer/main.cpp b/qucs-s-spar-viewer/main.cpp index 0d17f59a3..161cc962d 100644 --- a/qucs-s-spar-viewer/main.cpp +++ b/qucs-s-spar-viewer/main.cpp @@ -99,7 +99,7 @@ int main( int argc, char ** argv ) QString lang = QucsSettings.Language; if(lang.isEmpty()) lang = QString(QLocale::system().name()); - tor.load( QString("qucs_") + lang, QucsSettings.LangDir); + tor.load( QStringLiteral("qucs_") + lang, QucsSettings.LangDir); a.installTranslator( &tor ); Qucs_S_SPAR_Viewer *qucs = new Qucs_S_SPAR_Viewer(); diff --git a/qucs-s-spar-viewer/qucs-s-spar-viewer.cpp b/qucs-s-spar-viewer/qucs-s-spar-viewer.cpp index bd1bd2654..acd6f00e2 100644 --- a/qucs-s-spar-viewer/qucs-s-spar-viewer.cpp +++ b/qucs-s-spar-viewer/qucs-s-spar-viewer.cpp @@ -575,7 +575,7 @@ void Qucs_S_SPAR_Viewer::slotQuit() void Qucs_S_SPAR_Viewer::addFile() { - QFileDialog dialog(this, QString("Select S-parameter data files (.snp)"), QDir::homePath(), + QFileDialog dialog(this, QStringLiteral("Select S-parameter data files (.snp)"), QDir::homePath(), tr("S-Parameter Files (*.s1p *.s2p *.s3p *.s4p);;All Files (*.*)")); dialog.setFileMode(QFileDialog::ExistingFiles); @@ -630,13 +630,13 @@ void Qucs_S_SPAR_Viewer::addFiles(QStringList fileNames) filename = QFileInfo(fileNames.at(i-existing_files)).fileName(); QLabel * Filename_Label = new QLabel(filename.left(filename.lastIndexOf('.'))); - Filename_Label->setObjectName(QString("File_") + QString::number(i)); + Filename_Label->setObjectName(QStringLiteral("File_") + QString::number(i)); List_FileNames.append(Filename_Label); this->FilesGrid->addWidget(List_FileNames.last(), i,0,1,1); // Create the "Remove" button QToolButton * RemoveButton = new QToolButton(); - RemoveButton->setObjectName(QString("Remove_") + QString::number(i)); + RemoveButton->setObjectName(QStringLiteral("Remove_") + QString::number(i)); QIcon icon(":/bitmaps/trash.png"); // Use a resource path or a relative path RemoveButton->setIcon(icon); @@ -753,7 +753,7 @@ void Qucs_S_SPAR_Viewer::addFiles(QStringList fileNames) for (int i = 1; i<=number_of_ports; i++){ for (int j = 1; j<=number_of_ports; j++){ - s1 = QString("S") + QString::number(j) + QString::number(i) + QString("_dB"); + s1 = QStringLiteral("S") + QString::number(j) + QString::number(i) + QStringLiteral("_dB"); s2 = s1.mid(0, s1.length() - 2).append("ang"); s3 = s1.mid(0, s1.length() - 2).append("re"); s4 = s1.mid(0, s1.length() - 2).append("im"); @@ -849,7 +849,7 @@ void Qucs_S_SPAR_Viewer::addFiles(QStringList fileNames) // Default behavior: If there's no more data loaded and a single S1P file is selected, then automatically plot S11 if ((fileNames.length() == 1) && (fileNames.first().toLower().endsWith(".s1p")) && (datasets.size() == 1)){ - this->addTrace(filename, QString("S11"), Qt::red); + this->addTrace(filename, QStringLiteral("S11"), Qt::red); adjust_x_axis_to_file(filename); adjust_y_axis_to_trace(filename, "S11"); @@ -857,9 +857,9 @@ void Qucs_S_SPAR_Viewer::addFiles(QStringList fileNames) // Default behavior: If there's no more data loaded and a single S2P file is selected, then automatically plot S21, S11 and S22 if ((fileNames.length() == 1) && (fileNames.first().toLower().endsWith(".s2p")) && (datasets.size() == 1)){ - this->addTrace(filename, QString("S21"), Qt::red); - this->addTrace(filename, QString("S11"), Qt::blue); - this->addTrace(filename, QString("S22"), Qt::darkGreen); + this->addTrace(filename, QStringLiteral("S21"), Qt::red); + this->addTrace(filename, QStringLiteral("S11"), Qt::blue); + this->addTrace(filename, QStringLiteral("S22"), Qt::darkGreen); adjust_x_axis_to_file(filename); adjust_y_axis_to_trace(filename, "S11"); @@ -882,7 +882,7 @@ void Qucs_S_SPAR_Viewer::addFiles(QStringList fileNames) filename = filename.left(filename.lastIndexOf('.')); // Pick a random color QColor trace_color = QColor(QRandomGenerator::global()->bounded(256), QRandomGenerator::global()->bounded(256), QRandomGenerator::global()->bounded(256)); - this->addTrace(filename, QString("S21"), trace_color); + this->addTrace(filename, QStringLiteral("S21"), trace_color); adjust_y_axis_to_trace(filename, "S21"); } // Update the frequency setting to fit the last s2p file @@ -1210,15 +1210,15 @@ void Qucs_S_SPAR_Viewer::addTrace(QString selected_dataset, QString selected_tra // Label QLabel * new_trace_label = new QLabel(trace_name); - new_trace_label->setObjectName(QString("Trace_Name_") + trace_name); + new_trace_label->setObjectName(QStringLiteral("Trace_Name_") + trace_name); List_TraceNames.append(new_trace_label); this->TracesGrid->addWidget(new_trace_label, n_trace, 0); // Color picker QPushButton * new_trace_color = new QPushButton(); - new_trace_color->setObjectName(QString("Trace_Color_") + trace_name); + new_trace_color->setObjectName(QStringLiteral("Trace_Color_") + trace_name); connect(new_trace_color, SIGNAL(clicked()), SLOT(changeTraceColor())); - QString styleSheet = QString("QPushButton { background-color: %1; }").arg(trace_color.name()); + QString styleSheet = QStringLiteral("QPushButton { background-color: %1; }").arg(trace_color.name()); new_trace_color->setStyleSheet(styleSheet); new_trace_color->setAttribute(Qt::WA_TranslucentBackground); // Needed for Windows buttons to behave as they should List_Trace_Color.append(new_trace_color); @@ -1226,7 +1226,7 @@ void Qucs_S_SPAR_Viewer::addTrace(QString selected_dataset, QString selected_tra // Line Style QComboBox * new_trace_linestyle = new QComboBox(); - new_trace_linestyle->setObjectName(QString("Trace_LineStyle_") + trace_name); + new_trace_linestyle->setObjectName(QStringLiteral("Trace_LineStyle_") + trace_name); new_trace_linestyle->addItem("Solid"); new_trace_linestyle->addItem("- - - -"); new_trace_linestyle->addItem("·······"); @@ -1240,7 +1240,7 @@ void Qucs_S_SPAR_Viewer::addTrace(QString selected_dataset, QString selected_tra // Line width QSpinBox * new_trace_width = new QSpinBox(); - new_trace_width->setObjectName(QString("Trace_Width_") + trace_name); + new_trace_width->setObjectName(QStringLiteral("Trace_Width_") + trace_name); new_trace_width->setValue(trace_width); connect(new_trace_width, SIGNAL(valueChanged(int)), SLOT(changeTraceWidth())); List_TraceWidth.append(new_trace_width); @@ -1249,7 +1249,7 @@ void Qucs_S_SPAR_Viewer::addTrace(QString selected_dataset, QString selected_tra // Remove button QToolButton * new_trace_removebutton = new QToolButton(); - new_trace_removebutton->setObjectName(QString("Trace_RemoveButton_") + trace_name); + new_trace_removebutton->setObjectName(QStringLiteral("Trace_RemoveButton_") + trace_name); QIcon icon(":/bitmaps/trash.png"); // Use a resource path or a relative path new_trace_removebutton->setIcon(icon); new_trace_removebutton->setStyleSheet(R"( @@ -1291,7 +1291,7 @@ void Qucs_S_SPAR_Viewer::updateTracesCombo() for (int i=1; i<=n_ports; i++){ for (int j=1; j<=n_ports; j++){ - traces.append(QString("S") + QString::number(i) + QString::number(j)); + traces.append(QStringLiteral("S") + QString::number(i) + QString::number(j)); } } @@ -1303,10 +1303,10 @@ void Qucs_S_SPAR_Viewer::updateTracesCombo() if(n_ports == 2){ // Additional traces - traces.append(QString("|%1|").arg(QChar(0x0394))); + traces.append(QStringLiteral("|%1|").arg(QChar(0x0394))); traces.append("K"); - traces.append(QString("%1%2").arg(QChar(0x03BC)).arg(QChar(0x209B))); - traces.append(QString("%1%2").arg(QChar(0x03BC)).arg(QChar(0x209A))); + traces.append(QStringLiteral("%1%2").arg(QChar(0x03BC)).arg(QChar(0x209B))); + traces.append(QStringLiteral("%1%2").arg(QChar(0x03BC)).arg(QChar(0x209A))); traces.append("MAG"); traces.append("MSG"); traces.append("Re{Zin}"); @@ -1327,7 +1327,7 @@ void Qucs_S_SPAR_Viewer::changeTraceColor() // For example, set the background color of the button QPushButton *button = qobject_cast(sender()); if (button) { - QString styleSheet = QString("QPushButton { background-color: %1; }").arg(color.name()); + QString styleSheet = QStringLiteral("QPushButton { background-color: %1; }").arg(color.name()); button->setStyleSheet(styleSheet); QString ID = button->objectName(); @@ -1584,15 +1584,15 @@ void Qucs_S_SPAR_Viewer::updateTraces() QString trace_file = trace_name_parts[1]; if (trace_file.at(0) == 'S'){ - trace_file = trace_file + QString("_dB"); + trace_file = trace_file + QStringLiteral("_dB"); } - if (trace_file == QString("|%1|").arg(QChar(0x0394))){ + if (trace_file == QStringLiteral("|%1|").arg(QChar(0x0394))){ trace_file = "delta"; } - if (trace_file == QString("%1%2").arg(QChar(0x03BC)).arg(QChar(0x209B))){ + if (trace_file == QStringLiteral("%1%2").arg(QChar(0x03BC)).arg(QChar(0x209B))){ trace_file = "mu"; } - if (trace_file == QString("%1%2").arg(QChar(0x03BC)).arg(QChar(0x209A))){ + if (trace_file == QStringLiteral("%1%2").arg(QChar(0x03BC)).arg(QChar(0x209A))){ trace_file = "mu_p"; } @@ -1653,7 +1653,7 @@ void Qucs_S_SPAR_Viewer::updateTraces() marker_series->append(x, y); } QString trace_name = tableMarkers->horizontalHeaderItem(c)->text(); - QString marker_series_name = QString("Mkr_%1").arg(trace_name); + QString marker_series_name = QStringLiteral("Mkr_%1").arg(trace_name); marker_series->setName(marker_series_name); seriesList.append(marker_series); } @@ -1674,14 +1674,14 @@ void Qucs_S_SPAR_Viewer::updateTraces() verticalLine->append(x, y_axis_max); verticalLine->setPen(QPen(Qt::black, 1, Qt::DashLine)); - QString verticalLine_name = QString("Mkr_%1").arg(r); + QString verticalLine_name = QStringLiteral("Mkr_%1").arg(r); verticalLine->setName(verticalLine_name); seriesList.append(verticalLine); QGraphicsTextItem *textItem = new QGraphicsTextItem(chart); QString freq_marker = tableMarkers->item(r,0)->text(); - textItem->setPlainText(QString("%1").arg(freq_marker)); + textItem->setPlainText(QStringLiteral("%1").arg(freq_marker)); textItem->setFont(QFont("Arial", 8)); // Get the axes @@ -1732,7 +1732,7 @@ void Qucs_S_SPAR_Viewer::updateTraces() limitLine->append(fstop, val_stop); limitLine->setPen(QPen(Qt::black, 2)); - QString limitLine_name = QString("Limit_%1").arg(i); + QString limitLine_name = QStringLiteral("Limit_%1").arg(i); limitLine->setName(limitLine_name); seriesList.append(limitLine); @@ -1841,15 +1841,15 @@ void Qucs_S_SPAR_Viewer::adjust_y_axis_to_trace(QString filename, QString tracen qreal minX, maxX, minY, maxY; if (tracename.at(0) == 'S'){ - tracename = tracename + QString("_dB"); + tracename = tracename + QStringLiteral("_dB"); } - if (tracename == QString("|%1|").arg(QChar(0x0394))){ + if (tracename == QStringLiteral("|%1|").arg(QChar(0x0394))){ tracename = "delta"; } - if (tracename == QString("%1%2").arg(QChar(0x03BC)).arg(QChar(0x209B))){ + if (tracename == QStringLiteral("%1%2").arg(QChar(0x03BC)).arg(QChar(0x209B))){ tracename = "mu"; } - if (tracename == QString("%1%2").arg(QChar(0x03BC)).arg(QChar(0x209A))){ + if (tracename == QStringLiteral("%1%2").arg(QChar(0x03BC)).arg(QChar(0x209A))){ tracename = "mu_p"; } @@ -1992,13 +1992,13 @@ void Qucs_S_SPAR_Viewer::addMarker(double freq){ int n_markers = List_MarkerNames.size(); n_markers++; - QString new_marker_name = QString("Mkr%1").arg(n_markers); + QString new_marker_name = QStringLiteral("Mkr%1").arg(n_markers); QLabel * new_marker_label = new QLabel(new_marker_name); new_marker_label->setObjectName(new_marker_name); List_MarkerNames.append(new_marker_label); this->MarkersGrid->addWidget(new_marker_label, n_markers, 0); - QString SpinBox_name = QString("Mkr_SpinBox%1").arg(n_markers); + QString SpinBox_name = QStringLiteral("Mkr_SpinBox%1").arg(n_markers); QDoubleSpinBox * new_marker_Spinbox = new QDoubleSpinBox(); new_marker_Spinbox->setObjectName(SpinBox_name); new_marker_Spinbox->setMaximum(QSpinBox_x_axis_max->minimum()); @@ -2008,7 +2008,7 @@ void Qucs_S_SPAR_Viewer::addMarker(double freq){ List_MarkerFreq.append(new_marker_Spinbox); this->MarkersGrid->addWidget(new_marker_Spinbox, n_markers, 1); - QString Combobox_name = QString("Mkr_ComboBox%1").arg(n_markers); + QString Combobox_name = QStringLiteral("Mkr_ComboBox%1").arg(n_markers); QComboBox * new_marker_Combo = new QComboBox(); new_marker_Combo->setObjectName(Combobox_name); new_marker_Combo->addItems(frequency_units); @@ -2018,7 +2018,7 @@ void Qucs_S_SPAR_Viewer::addMarker(double freq){ this->MarkersGrid->addWidget(new_marker_Combo, n_markers, 2); // Remove button - QString DeleteButton_name = QString("Mkr_Delete_Btn%1").arg(n_markers); + QString DeleteButton_name = QStringLiteral("Mkr_Delete_Btn%1").arg(n_markers); QToolButton * new_marker_removebutton = new QToolButton(); new_marker_removebutton->setObjectName(DeleteButton_name); QIcon icon(":/bitmaps/trash.png"); // Use a resource path or a relative path @@ -2036,7 +2036,7 @@ void Qucs_S_SPAR_Viewer::addMarker(double freq){ // Add new entry to the table tableMarkers->setRowCount(n_markers); - QString new_freq = QString("%1 ").arg(QString::number(f_marker, 'f', 2)) + Freq_Marker_Scale; + QString new_freq = QStringLiteral("%1 ").arg(QString::number(f_marker, 'f', 2)) + Freq_Marker_Scale; QTableWidgetItem *newfreq = new QTableWidgetItem(new_freq); tableMarkers->setItem(n_markers-1, 0, newfreq); @@ -2085,7 +2085,7 @@ void Qucs_S_SPAR_Viewer::updateMarkerTable(){ // Columns are traces. Rows are markers for (int c = 0; ccolumnCount(); c++){//Traces for (int r = 0; rrowCount(); r++){//Marker - freq_marker = QString("%1 ").arg(QString::number(List_MarkerFreq[r]->value(), 'f', 1)) + List_MarkerScale[r]->currentText(); + freq_marker = QStringLiteral("%1 ").arg(QString::number(List_MarkerFreq[r]->value(), 'f', 1)) + List_MarkerScale[r]->currentText(); if (c==0){ // First column @@ -2107,7 +2107,7 @@ void Qucs_S_SPAR_Viewer::updateMarkerTable(){ trace.append("_dB"); } P = findClosestPoint(datasets[file]["frequency"], datasets[file][trace], targetX); - new_val = QString("%1").arg(QString::number(P.y(), 'f', 2)); + new_val = QStringLiteral("%1").arg(QString::number(P.y(), 'f', 2)); QTableWidgetItem *new_item = new QTableWidgetItem(new_val); tableMarkers->setItem(r, c, new_item); } @@ -2235,7 +2235,7 @@ void Qucs_S_SPAR_Viewer::updateMarkerNames() int n_markers = List_MarkerNames.size(); for (int i = 0; i < n_markers; i++) { QLabel * MarkerLabel = List_MarkerNames[i]; - MarkerLabel->setText(QString("Mkr%1").arg(i+1)); + MarkerLabel->setText(QStringLiteral("Mkr%1").arg(i+1)); } } @@ -2245,7 +2245,7 @@ void Qucs_S_SPAR_Viewer::updateLimitNames() int n_limits = List_LimitNames.size(); for (int i = 0; i < n_limits; i++) { QLabel * LimitLabel = List_LimitNames[i]; - LimitLabel->setText(QString("Limit %1").arg(i+1)); + LimitLabel->setText(QStringLiteral("Limit %1").arg(i+1)); } } @@ -2567,13 +2567,13 @@ void Qucs_S_SPAR_Viewer::addLimit(double f_limit1, QString f_limit1_unit, double QString tooltip_message; - QString new_limit_name = QString("Limit %1").arg(n_limits); + QString new_limit_name = QStringLiteral("Limit %1").arg(n_limits); QLabel * new_limit_label = new QLabel(new_limit_name); new_limit_label->setObjectName(new_limit_name); List_LimitNames.append(new_limit_label); this->LimitsGrid->addWidget(new_limit_label, limit_index, 0); - QString SpinBox_fstart_name = QString("Lmt_Freq_Start_SpinBox_%1").arg(new_limit_name); + QString SpinBox_fstart_name = QStringLiteral("Lmt_Freq_Start_SpinBox_%1").arg(new_limit_name); QDoubleSpinBox * new_limit_fstart_Spinbox = new QDoubleSpinBox(); new_limit_fstart_Spinbox->setObjectName(SpinBox_fstart_name); new_limit_fstart_Spinbox->setMaximum(QSpinBox_x_axis_max->minimum()); @@ -2584,7 +2584,7 @@ void Qucs_S_SPAR_Viewer::addLimit(double f_limit1, QString f_limit1_unit, double List_Limit_Start_Freq.append(new_limit_fstart_Spinbox); this->LimitsGrid->addWidget(new_limit_fstart_Spinbox, limit_index, 1); - QString Combobox_start_name = QString("Lmt_Start_ComboBox_%1").arg(new_limit_name); + QString Combobox_start_name = QStringLiteral("Lmt_Start_ComboBox_%1").arg(new_limit_name); QComboBox * new_start_limit_Combo = new QComboBox(); new_start_limit_Combo->setObjectName(Combobox_start_name); new_start_limit_Combo->addItems(frequency_units); @@ -2598,7 +2598,7 @@ void Qucs_S_SPAR_Viewer::addLimit(double f_limit1, QString f_limit1_unit, double List_Limit_Start_Freq_Scale.append(new_start_limit_Combo); this->LimitsGrid->addWidget(new_start_limit_Combo, limit_index, 2); - QString SpinBox_fstop_name = QString("Lmt_Freq_Stop_SpinBox_%1").arg(new_limit_name); + QString SpinBox_fstop_name = QStringLiteral("Lmt_Freq_Stop_SpinBox_%1").arg(new_limit_name); QDoubleSpinBox * new_limit_fstop_Spinbox = new QDoubleSpinBox(); new_limit_fstop_Spinbox->setObjectName(SpinBox_fstop_name); new_limit_fstop_Spinbox->setMaximum(QSpinBox_x_axis_max->minimum()); @@ -2609,7 +2609,7 @@ void Qucs_S_SPAR_Viewer::addLimit(double f_limit1, QString f_limit1_unit, double List_Limit_Stop_Freq.append(new_limit_fstop_Spinbox); this->LimitsGrid->addWidget(new_limit_fstop_Spinbox, limit_index, 3); - QString Combobox_stop_name = QString("Lmt_Stop_ComboBox_%1").arg(new_limit_name); + QString Combobox_stop_name = QStringLiteral("Lmt_Stop_ComboBox_%1").arg(new_limit_name); QComboBox * new_stop_limit_Combo = new QComboBox(); new_stop_limit_Combo->setObjectName(Combobox_stop_name); new_stop_limit_Combo->addItems(frequency_units); @@ -2625,10 +2625,10 @@ void Qucs_S_SPAR_Viewer::addLimit(double f_limit1, QString f_limit1_unit, double this->LimitsGrid->addWidget(new_stop_limit_Combo, limit_index, 4); // Remove button - QString DeleteButton_name = QString("Lmt_Delete_Btn_%1").arg(new_limit_name); + QString DeleteButton_name = QStringLiteral("Lmt_Delete_Btn_%1").arg(new_limit_name); QToolButton * new_limit_removebutton = new QToolButton(); new_limit_removebutton->setObjectName(DeleteButton_name); - tooltip_message = QString("Remove this limit"); + tooltip_message = QStringLiteral("Remove this limit"); new_limit_removebutton->setToolTip(tooltip_message); QIcon icon(":/bitmaps/trash.png"); new_limit_removebutton->setIcon(icon); @@ -2643,7 +2643,7 @@ void Qucs_S_SPAR_Viewer::addLimit(double f_limit1, QString f_limit1_unit, double List_Button_Delete_Limit.append(new_limit_removebutton); this->LimitsGrid->addWidget(new_limit_removebutton, limit_index, 5, Qt::AlignCenter); - QString SpinBox_val_start_name = QString("Lmt_Val_Start_SpinBox_%1").arg(new_limit_name); + QString SpinBox_val_start_name = QStringLiteral("Lmt_Val_Start_SpinBox_%1").arg(new_limit_name); QDoubleSpinBox * new_limit_val_start_Spinbox = new QDoubleSpinBox(); new_limit_val_start_Spinbox->setObjectName(SpinBox_val_start_name); new_limit_val_start_Spinbox->setMaximum(QSpinBox_y_axis_max->minimum()); @@ -2655,17 +2655,17 @@ void Qucs_S_SPAR_Viewer::addLimit(double f_limit1, QString f_limit1_unit, double this->LimitsGrid->addWidget(new_limit_val_start_Spinbox, limit_index+1, 1); // Coupled spinbox value - QString CoupleButton_name = QString("Lmt_Couple_Btn_%1").arg(new_limit_name); + QString CoupleButton_name = QStringLiteral("Lmt_Couple_Btn_%1").arg(new_limit_name); QPushButton * new_limit_CoupleButton = new QPushButton("<--->"); new_limit_CoupleButton->setObjectName(CoupleButton_name); new_limit_CoupleButton->setChecked(coupled); - tooltip_message = QString("Couple start and stop values"); + tooltip_message = QStringLiteral("Couple start and stop values"); new_limit_CoupleButton->setToolTip(tooltip_message); connect(new_limit_CoupleButton, SIGNAL(clicked(bool)), SLOT(coupleSpinBoxes())); List_Couple_Value.append(new_limit_CoupleButton); this->LimitsGrid->addWidget(new_limit_CoupleButton, limit_index+1, 2); - QString SpinBox_val_stop_name = QString("Lmt_Val_Stop_SpinBox_%1").arg(new_limit_name); + QString SpinBox_val_stop_name = QStringLiteral("Lmt_Val_Stop_SpinBox_%1").arg(new_limit_name); QDoubleSpinBox * new_limit_val_stop_Spinbox = new QDoubleSpinBox(); new_limit_val_stop_Spinbox->setObjectName(SpinBox_val_stop_name); new_limit_val_stop_Spinbox->setMaximum(QSpinBox_y_axis_max->minimum()); @@ -2683,7 +2683,7 @@ void Qucs_S_SPAR_Viewer::addLimit(double f_limit1, QString f_limit1_unit, double } new_limit_CoupleButton->click(); - QString Separator_name = QString("Lmt_Separator_%1").arg(new_limit_name); + QString Separator_name = QStringLiteral("Lmt_Separator_%1").arg(new_limit_name); QFrame * new_Separator = new QFrame(); new_Separator->setObjectName(Separator_name); new_Separator->setFrameShape(QFrame::HLine); @@ -2716,7 +2716,7 @@ void Qucs_S_SPAR_Viewer::coupleSpinBoxes(){ if (button->text() == "<--->"){ button->setText("<-X->"); - QString tooltip_message = QString("Uncouple start and stop values"); + QString tooltip_message = QStringLiteral("Uncouple start and stop values"); button->setToolTip(tooltip_message); QDoubleSpinBox * lower_limit_spinbox = List_Limit_Start_Value.at(index); upper_limit_spinbox->setValue(lower_limit_spinbox->value()); @@ -3105,13 +3105,13 @@ void Qucs_S_SPAR_Viewer::loadSession(QString session_file) // Add file management widgets // Label QLabel * Filename_Label = new QLabel(file); - Filename_Label->setObjectName(QString("File_") + QString::number(i)); + Filename_Label->setObjectName(QStringLiteral("File_") + QString::number(i)); List_FileNames.append(Filename_Label); this->FilesGrid->addWidget(List_FileNames.last(), i, 0, 1, 1); // Create the "Remove" button QToolButton * RemoveButton = new QToolButton(); - RemoveButton->setObjectName(QString("Remove_") + QString::number(i)); + RemoveButton->setObjectName(QStringLiteral("Remove_") + QString::number(i)); QIcon icon(":/bitmaps/trash.png"); // Use a resource path or a relative path RemoveButton->setIcon(icon); diff --git a/qucs-s-spar-viewer/qucsattenuator.cpp b/qucs-s-spar-viewer/qucsattenuator.cpp index 7c17f3961..c5a20d746 100644 --- a/qucs-s-spar-viewer/qucsattenuator.cpp +++ b/qucs-s-spar-viewer/qucsattenuator.cpp @@ -175,10 +175,10 @@ QucsAttenuator::QucsAttenuator() powerunits.append("mW"); powerunits.append("W"); powerunits.append("dBm"); - powerunits.append(QString("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))); - powerunits.append(QString("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))); - powerunits.append(QString("dBmV [75%1]").arg(QChar(0xa9, 0x03))); - powerunits.append(QString("dBmV [50%1]").arg(QChar(0xa9, 0x03))); + powerunits.append(QStringLiteral("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))); + powerunits.append(QStringLiteral("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))); + powerunits.append(QStringLiteral("dBmV [75%1]").arg(QChar(0xa9, 0x03))); + powerunits.append(QStringLiteral("dBmV [50%1]").arg(QChar(0xa9, 0x03))); Combo_InputPowerUnits = new QComboBox(); Combo_InputPowerUnits->addItems(powerunits); Combo_InputPowerUnits->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred); @@ -695,7 +695,7 @@ void QucsAttenuator::slotCalculate() lineEdit_R3->setText(QString::number(Values.R3, 'f', 1)); lineEdit_R4->setText(QString::number(Values.R4, 'f', 1)); - lineEdit_R1_Pdiss->setText(QString::number(ConvertPowerUnits(Values.PR1, QString("W"), ComboR1_PowerUnits->currentText()), 'f', 5)); + lineEdit_R1_Pdiss->setText(QString::number(ConvertPowerUnits(Values.PR1, QStringLiteral("W"), ComboR1_PowerUnits->currentText()), 'f', 5)); lineEdit_R2_Pdiss->setText(QString::number(ConvertPowerUnits(Values.PR2, "W", ComboR2_PowerUnits->currentText()), 'f', 5)); lineEdit_R3_Pdiss->setText(QString::number(ConvertPowerUnits(Values.PR3, "W", ComboR3_PowerUnits->currentText()), 'f', 5)); lineEdit_R4_Pdiss->setText(QString::number(ConvertPowerUnits(Values.PR4, "W", ComboR4_PowerUnits->currentText()), 'f', 5)); @@ -743,7 +743,7 @@ void QucsAttenuator::slot_ComboR1PowerUnits_Changed(const QString& new_units) //Convert power double P = lineEdit_R1_Pdiss->text().toDouble(); P =ConvertPowerUnits(P, LastUnits[1], new_units); - lineEdit_R1_Pdiss->setText(QString("%1").arg(P)); + lineEdit_R1_Pdiss->setText(QStringLiteral("%1").arg(P)); LastUnits[1] = new_units; //Change lineedit input policy @@ -760,7 +760,7 @@ void QucsAttenuator::slot_ComboR2PowerUnits_Changed(const QString& new_units) //Convert power double P = lineEdit_R2_Pdiss->text().toDouble(); P =ConvertPowerUnits(P, LastUnits[2], new_units); - lineEdit_R2_Pdiss->setText(QString("%1").arg(P)); + lineEdit_R2_Pdiss->setText(QStringLiteral("%1").arg(P)); LastUnits[2] = new_units; //Change lineedit input policy @@ -777,7 +777,7 @@ void QucsAttenuator::slot_ComboR3PowerUnits_Changed(const QString& new_units) //Convert power double P = lineEdit_R3_Pdiss->text().toDouble(); P =ConvertPowerUnits(P, LastUnits[3], new_units); - lineEdit_R3_Pdiss->setText(QString("%1").arg(P)); + lineEdit_R3_Pdiss->setText(QStringLiteral("%1").arg(P)); LastUnits[3] = new_units; //Change lineedit input policy @@ -794,7 +794,7 @@ void QucsAttenuator::slot_ComboR4PowerUnits_Changed(const QString& new_units) //Convert power double P = lineEdit_R4_Pdiss->text().toDouble(); P =ConvertPowerUnits(P, LastUnits[4], new_units); - lineEdit_R4_Pdiss->setText(QString("%1").arg(P)); + lineEdit_R4_Pdiss->setText(QStringLiteral("%1").arg(P)); LastUnits[4] = new_units; //Change lineedit input policy @@ -816,16 +816,16 @@ double QucsAttenuator::ConvertPowerUnits(double Pin, QString from_units, QString if (from_units == "dBm") Pin = pow(10, 0.1*(Pin-30));//dBm -> W else - if (from_units == QString("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) + if (from_units == QStringLiteral("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) Pin = pow(10, (0.1*Pin-12))/75;//dBuV [75Ohm] -> W else - if (from_units == QString("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) + if (from_units == QStringLiteral("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) Pin = pow(10, (0.1*Pin-12))/50;//dBuV [50Ohm] -> W else - if (from_units == QString("dBmV [75%2]").arg(QChar(0xa9, 0x03))) + if (from_units == QStringLiteral("dBmV [75%2]").arg(QChar(0xa9, 0x03))) Pin = pow(10, (0.1*Pin-6))/75;//dBmV [75Ohm] -> W else - if (from_units == QString("dBmV [50%2]").arg(QChar(0xa9, 0x03))) + if (from_units == QStringLiteral("dBmV [50%2]").arg(QChar(0xa9, 0x03))) Pin = pow(10, (0.1*Pin-6))/50;//dBmV [50Ohm] -> W else if (from_units == "mW") @@ -841,16 +841,16 @@ double QucsAttenuator::ConvertPowerUnits(double Pin, QString from_units, QString if (to_units == "dBm") return Pin;//Already done else - if (to_units == QString("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) + if (to_units == QStringLiteral("dB%1V [75%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) Pin += 108.7506126339170004686755011380612925566374910126647878220;//W -> dBuV [75Ohm] else - if (to_units == QString("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) + if (to_units == QStringLiteral("dB%1V [50%2]").arg(QChar(0xbc, 0x03)).arg(QChar(0xa9, 0x03))) Pin += 106.9897000433601880478626110527550697323181011853789145868;//W -> dBuV [50Ohm] else - if (to_units == QString("dBmV [75%2]").arg(QChar(0xa9, 0x03))) + if (to_units == QStringLiteral("dBmV [75%2]").arg(QChar(0xa9, 0x03))) Pin += 48.7506126339170004686755011380612925566374910126647878220;//W -> dBmV [75Ohm] else - if (to_units == QString("dBmV [50%2]").arg(QChar(0xa9, 0x03))) + if (to_units == QStringLiteral("dBmV [50%2]").arg(QChar(0xa9, 0x03))) Pin += 46.9897000433601880478626110527550697323181011853789145868;//W -> dBmV [50Ohm] return Pin; diff --git a/qucs-transcalc/main.cpp b/qucs-transcalc/main.cpp index e9b32670a..0f161dee4 100644 --- a/qucs-transcalc/main.cpp +++ b/qucs-transcalc/main.cpp @@ -136,7 +136,7 @@ int main(int argc, char *argv[]) QString lang = QucsSettings.Language; if(lang.isEmpty()) lang = QString(QLocale::system().name()); - tor.load( QString("qucs_") + lang, QucsSettings.LangDir); + tor.load( QStringLiteral("qucs_") + lang, QucsSettings.LangDir); a.installTranslator( &tor ); QucsTranscalc *qucs = new QucsTranscalc(); diff --git a/qucs-transcalc/qucstrans.cpp b/qucs-transcalc/qucstrans.cpp index b83cc374e..508b65743 100644 --- a/qucs-transcalc/qucstrans.cpp +++ b/qucs-transcalc/qucstrans.cpp @@ -1282,7 +1282,7 @@ void QucsTranscalc::slotCopyToClipBoard() s +=" \n"; s += " \n"; s += " \n"; - s += QString(" \n"). + s += QStringLiteral(" \n"). arg(l->getProperty("Er")). arg(l->getProperty("H", UNIT_LENGTH, LENGTH_MM)). arg(l->getProperty("T", UNIT_LENGTH, LENGTH_UM)). @@ -1292,12 +1292,12 @@ void QucsTranscalc::slotCopyToClipBoard() s += " <.SP SPTC1 1 90 240 0 51 0 0 "; double freq = l->getProperty("Freq", UNIT_FREQ, FREQ_GHZ); if (freq > 0) - s += QString("\"log\" 1 \"%1 GHz\" 1 \"%2 GHz\" 1 "). + s += QStringLiteral("\"log\" 1 \"%1 GHz\" 1 \"%2 GHz\" 1 "). arg(freq / 10).arg(freq * 10); else s += "\"lin\" 1 \"0 GHz\" 1 \"10 GHz\" 1 "; s += "\"51\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n"; - s += QString(" \n"). + s += QStringLiteral(" \n"). arg(l->getProperty("W", UNIT_LENGTH, LENGTH_MM)). arg(l->getProperty("L", UNIT_LENGTH, LENGTH_MM)); s += " \n"; @@ -1323,7 +1323,7 @@ void QucsTranscalc::slotCopyToClipBoard() s += " \n"; s += " \n"; s += " \n"; - s += QString(" \n"). + s += QStringLiteral(" \n"). arg(l->getProperty("Er")). arg(l->getProperty("H", UNIT_LENGTH, LENGTH_MM)). arg(l->getProperty("T", UNIT_LENGTH, LENGTH_UM)). @@ -1333,12 +1333,12 @@ void QucsTranscalc::slotCopyToClipBoard() s += " <.SP SPTC1 1 100 290 0 51 0 0 "; double freq = l->getProperty("Freq", UNIT_FREQ, FREQ_GHZ); if (freq > 0) - s += QString("\"log\" 1 \"%1 GHz\" 1 \"%2 GHz\" 1 "). + s += QStringLiteral("\"log\" 1 \"%1 GHz\" 1 \"%2 GHz\" 1 "). arg(freq / 10).arg(freq * 10); else s += "\"lin\" 1 \"0 GHz\" 1 \"10 GHz\" 1 "; s += "\"51\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n"; - s += QString(" \n"). + s += QStringLiteral(" \n"). arg(l->getProperty("W", UNIT_LENGTH, LENGTH_MM)). arg(l->getProperty("L", UNIT_LENGTH, LENGTH_MM)). arg(l->getProperty("S", UNIT_LENGTH, LENGTH_MM)); @@ -1367,12 +1367,12 @@ void QucsTranscalc::slotCopyToClipBoard() s += " <.SP SPTC1 1 90 240 0 51 0 0 "; double freq = l->getProperty("Freq", UNIT_FREQ, FREQ_GHZ); if (freq > 0) - s += QString("\"log\" 1 \"%1 GHz\" 1 \"%2 GHz\" 1 "). + s += QStringLiteral("\"log\" 1 \"%1 GHz\" 1 \"%2 GHz\" 1 "). arg(freq / 10).arg(freq * 10); else s += "\"lin\" 1 \"0 GHz\" 1 \"10 GHz\" 1 "; s += "\"51\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n"; - s += QString(" \n"). + s += QStringLiteral(" \n"). arg(l->getProperty("Er")). arg(1 / l->getProperty("Sigma")). arg(l->getProperty("Mur")). @@ -1398,7 +1398,7 @@ void QucsTranscalc::slotCopyToClipBoard() s +=" \n"; s += " \n"; s += " \n"; - s += QString(" \n"). + s += QStringLiteral(" \n"). arg(l->getProperty("Er")). arg(l->getProperty("H", UNIT_LENGTH, LENGTH_MM)). arg(l->getProperty("T", UNIT_LENGTH, LENGTH_UM)). @@ -1407,12 +1407,12 @@ void QucsTranscalc::slotCopyToClipBoard() s += " <.SP SPTC1 1 90 240 0 51 0 0 "; double freq = l->getProperty("Freq", UNIT_FREQ, FREQ_GHZ); if (freq > 0) - s += QString("\"log\" 1 \"%1 GHz\" 1 \"%2 GHz\" 1 "). + s += QStringLiteral("\"log\" 1 \"%1 GHz\" 1 \"%2 GHz\" 1 "). arg(freq / 10).arg(freq * 10); else s += "\"lin\" 1 \"0 GHz\" 1 \"10 GHz\" 1 "; s += "\"51\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n"; - s += QString(" \n"). + s += QStringLiteral(" \n"). arg(l->getProperty("W", UNIT_LENGTH, LENGTH_MM)). arg(l->getProperty("S", UNIT_LENGTH, LENGTH_MM)). arg(l->getProperty("L", UNIT_LENGTH, LENGTH_MM)); @@ -1435,7 +1435,7 @@ void QucsTranscalc::slotCopyToClipBoard() s +=" \n"; s += " \n"; s += " \n"; - s += QString(" \n"). + s += QStringLiteral(" \n"). arg(l->getProperty("Er")). arg(l->getProperty("H", UNIT_LENGTH, LENGTH_MM)). arg(l->getProperty("T", UNIT_LENGTH, LENGTH_UM)). @@ -1444,12 +1444,12 @@ void QucsTranscalc::slotCopyToClipBoard() s += " <.SP SPTC1 1 90 240 0 51 0 0 "; double freq = l->getProperty("Freq", UNIT_FREQ, FREQ_GHZ); if (freq > 0) - s += QString("\"log\" 1 \"%1 GHz\" 1 \"%2 GHz\" 1 "). + s += QStringLiteral("\"log\" 1 \"%1 GHz\" 1 \"%2 GHz\" 1 "). arg(freq / 10).arg(freq * 10); else s += "\"lin\" 1 \"0 GHz\" 1 \"10 GHz\" 1 "; s += "\"51\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n"; - s += QString(" \n"). + s += QStringLiteral(" \n"). arg(l->getProperty("W", UNIT_LENGTH, LENGTH_MM)). arg(l->getProperty("S", UNIT_LENGTH, LENGTH_MM)). arg(l->getProperty("L", UNIT_LENGTH, LENGTH_MM)); @@ -1475,12 +1475,12 @@ void QucsTranscalc::slotCopyToClipBoard() s += " <.SP SPTC1 1 90 240 0 51 0 0 "; double freq = l->getProperty("Freq", UNIT_FREQ, FREQ_GHZ); if (freq > 0) - s += QString("\"log\" 1 \"%1 GHz\" 1 \"%2 GHz\" 1 "). + s += QStringLiteral("\"log\" 1 \"%1 GHz\" 1 \"%2 GHz\" 1 "). arg(freq / 10).arg(freq * 10); else s += "\"lin\" 1 \"0 GHz\" 1 \"10 GHz\" 1 "; s += "\"51\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n"; - s += QString(" \n"). + s += QStringLiteral(" \n"). arg(l->getProperty("a", UNIT_LENGTH, LENGTH_MM)). arg(l->getProperty("b", UNIT_LENGTH, LENGTH_MM)). arg(l->getProperty("L", UNIT_LENGTH, LENGTH_MM)). diff --git a/qucs/components/ac_sim.cpp b/qucs/components/ac_sim.cpp index a3a8b8df6..24cceb5cd 100644 --- a/qucs/components/ac_sim.cpp +++ b/qucs/components/ac_sim.cpp @@ -93,13 +93,13 @@ QString AC_Sim::spice_netlist(bool isXyce) Fstop *= fac; double Nd = ceil(log10(Fstop/Fstart)); // number of decades double Npd = ceil((Np - 1)/Nd); // points per decade - s += QString("DEC %1 ").arg(Npd); + s += QStringLiteral("DEC %1 ").arg(Npd); } else { // no need conversion - s += QString("LIN %1 ").arg(Props.at(3)->Value); + s += QStringLiteral("LIN %1 ").arg(Props.at(3)->Value); } QString fstart = spicecompat::normalize_value(Props.at(1)->Value); // Start freq. QString fstop = spicecompat::normalize_value(Props.at(2)->Value); // Stop freq. - s += QString("%1 %2 \n").arg(fstart).arg(fstop); + s += QStringLiteral("%1 %2 \n").arg(fstart).arg(fstop); if (!isXyce) s.remove(0,1); return s.toLower(); diff --git a/qucs/components/ampere_ac.cpp b/qucs/components/ampere_ac.cpp index 0f08c0d5d..d56e848cc 100644 --- a/qucs/components/ampere_ac.cpp +++ b/qucs/components/ampere_ac.cpp @@ -84,7 +84,7 @@ QString Ampere_ac::spice_netlist(bool) QString plus = spicecompat::normalize_node_name(Ports.at(1)->Connection->Name); QString minus = spicecompat::normalize_node_name(Ports.at(0)->Connection->Name); - s += QString(" %1 %2 ").arg(plus).arg(minus); + s += QStringLiteral(" %1 %2 ").arg(plus).arg(minus); QString amperes = spicecompat::normalize_value(Props.at(0)->Value); QString freq = spicecompat::normalize_value(Props.at(1)->Value); @@ -96,6 +96,6 @@ QString Ampere_ac::spice_netlist(bool) QString theta = Props.at(3)->Value; theta.remove(' '); if (theta.isEmpty()) theta="0"; - s += QString(" DC 0 SIN(0 %1 %2 0 %3 %4) AC %5 ACPHASE %6\n").arg(amperes).arg(freq).arg(theta).arg(phase).arg(amperes).arg(phase); + s += QStringLiteral(" DC 0 SIN(0 %1 %2 0 %3 %4) AC %5 ACPHASE %6\n").arg(amperes).arg(freq).arg(theta).arg(phase).arg(amperes).arg(phase); return s; } diff --git a/qucs/components/ampere_dc.cpp b/qucs/components/ampere_dc.cpp index ec7fe2d7b..c14d21c20 100644 --- a/qucs/components/ampere_dc.cpp +++ b/qucs/components/ampere_dc.cpp @@ -64,7 +64,7 @@ QString Ampere_dc::spice_netlist(bool) if (plus=="gnd") plus = "0"; QString minus = Ports.at(0)->Connection->Name; if (minus=="gnd") minus = "0"; - s += QString(" %1 %2 DC %3\n").arg(plus).arg(minus) + s += QStringLiteral(" %1 %2 DC %3\n").arg(plus).arg(minus) .arg(spicecompat::normalize_value(Props.at(0)->Value)); return s; } diff --git a/qucs/components/ampere_noise.cpp b/qucs/components/ampere_noise.cpp index 26903ed8d..2b3828e27 100644 --- a/qucs/components/ampere_noise.cpp +++ b/qucs/components/ampere_noise.cpp @@ -96,11 +96,11 @@ QString Ampere_noise::va_code() if ( e == "0" ) { - s += QString("%1 <+ white_noise(%2,\"shot\" );\n").arg(Ipm).arg(u); + s += QStringLiteral("%1 <+ white_noise(%2,\"shot\" );\n").arg(Ipm).arg(u); } else { - s += QString("%1 <+ flicker_noise(%2, %3, \"flicker\" );\n" ).arg(Ipm).arg(u).arg(e); + s += QStringLiteral("%1 <+ flicker_noise(%2, %3, \"flicker\" );\n" ).arg(Ipm).arg(u).arg(e); } return s; diff --git a/qucs/components/biast.cpp b/qucs/components/biast.cpp index d34e72875..b3f7735c3 100644 --- a/qucs/components/biast.cpp +++ b/qucs/components/biast.cpp @@ -89,7 +89,7 @@ QString BiasT::spice_netlist(bool isXyce) QString pin1 = spicecompat::normalize_node_name(Ports.at(0)->Connection->Name); QString pin2 = spicecompat::normalize_node_name(Ports.at(1)->Connection->Name); QString pin3 = spicecompat::normalize_node_name(Ports.at(2)->Connection->Name); - s += QString("C_%1 %2 %3 %4\n").arg(Name).arg(pin1).arg(pin2).arg(C); - s += QString("L_%1 %2 %3 %4\n").arg(Name).arg(pin2).arg(pin3).arg(L); + s += QStringLiteral("C_%1 %2 %3 %4\n").arg(Name).arg(pin1).arg(pin2).arg(C); + s += QStringLiteral("L_%1 %2 %3 %4\n").arg(Name).arg(pin2).arg(pin3).arg(L); return s; } diff --git a/qucs/components/bjt.cpp b/qucs/components/bjt.cpp index 5ab6f0462..b65a425b1 100644 --- a/qucs/components/bjt.cpp +++ b/qucs/components/bjt.cpp @@ -61,12 +61,12 @@ QString BJT::spice_netlist(bool) QString par_str = form_spice_param_list(spice_incompat,spice_tr); if (getProperty("UseGlobTemp")->Value == "yes") { - s += QString(" QMOD_%1 AREA=%2\n").arg(Name).arg(getProperty("Area")->Value); + s += QStringLiteral(" QMOD_%1 AREA=%2\n").arg(Name).arg(getProperty("Area")->Value); } else { - s += QString(" QMOD_%1 AREA=%2 TEMP=%3\n").arg(Name).arg(getProperty("Area")->Value) + s += QStringLiteral(" QMOD_%1 AREA=%2 TEMP=%3\n").arg(Name).arg(getProperty("Area")->Value) .arg(getProperty("Temp")->Value); } - s += QString(".MODEL QMOD_%1 %2 (%3)\n").arg(Name).arg(getProperty("Type")->Value).arg(par_str); + s += QStringLiteral(".MODEL QMOD_%1 %2 (%3)\n").arg(Name).arg(getProperty("Type")->Value).arg(par_str); return s; } diff --git a/qucs/components/bjtsub.cpp b/qucs/components/bjtsub.cpp index e6ab22ead..c955e222e 100644 --- a/qucs/components/bjtsub.cpp +++ b/qucs/components/bjtsub.cpp @@ -220,13 +220,13 @@ QString BJTsub::spice_netlist(bool) QString par_str = form_spice_param_list(spice_incompat,spice_tr); if (getProperty("UseGlobTemp")->Value == "yes") { - s += QString(" QMOD_%1 AREA=%2\n").arg(Name).arg(getProperty("Area")->Value); + s += QStringLiteral(" QMOD_%1 AREA=%2\n").arg(Name).arg(getProperty("Area")->Value); } else { - s += QString(" QMOD_%1 AREA=%2 TEMP=%3\n").arg(Name).arg(getProperty("Area")->Value) + s += QStringLiteral(" QMOD_%1 AREA=%2 TEMP=%3\n").arg(Name).arg(getProperty("Area")->Value) .arg(getProperty("Temp")->Value); } - s += QString(".MODEL QMOD_%1 %2 (%3)\n").arg(Name).arg(getProperty("Type")->Value).arg(par_str); + s += QStringLiteral(".MODEL QMOD_%1 %2 (%3)\n").arg(Name).arg(getProperty("Type")->Value).arg(par_str); return s; } diff --git a/qucs/components/capacitor.cpp b/qucs/components/capacitor.cpp index 6a4f3d296..14377aa22 100644 --- a/qucs/components/capacitor.cpp +++ b/qucs/components/capacitor.cpp @@ -57,7 +57,7 @@ QString Capacitor::spice_netlist(bool) { QString s = spicecompat::check_refdes(Name,SpiceModel); - s += QString(" %1 %2 ").arg(Ports.at(0)->Connection->Name) + s += QStringLiteral(" %1 %2 ").arg(Ports.at(0)->Connection->Name) .arg(Ports.at(1)->Connection->Name); // output nodes s.replace(" gnd ", " 0 "); @@ -80,7 +80,7 @@ QString Capacitor::va_code() QString Vpm = vacompat::normalize_voltage(plus,minus); if (Vpm.startsWith("(-")) Vpm.remove(1,1); // Make capacitor unipolar, remove starting minus QString Ipm = vacompat::normalize_current(plus,minus,true); - s += QString("%1 <+ ddt( %2 * %3 );\n").arg(Ipm).arg(Vpm).arg(val); + s += QStringLiteral("%1 <+ ddt( %2 * %3 );\n").arg(Ipm).arg(Vpm).arg(val); return s; } diff --git a/qucs/components/capq.cpp b/qucs/components/capq.cpp index f1691cfd8..cbf32b558 100644 --- a/qucs/components/capq.cpp +++ b/qucs/components/capq.cpp @@ -112,15 +112,15 @@ QString CapQ::spice_netlist(bool isXyce) QString double_pi = "8*atan(1)"; QString mode = getProperty("Mode")->Value; if (mode == "Constant") { - res_eq = QString("%1*(%2)*hertz/(%3)").arg(double_pi).arg(C).arg(Q); + res_eq = QStringLiteral("%1*(%2)*hertz/(%3)").arg(double_pi).arg(C).arg(Q); } else if (mode == "Linear") { - res_eq = QString("%1*(%2)*(%3)/(%4)").arg(double_pi).arg(C).arg(f0).arg(Q); + res_eq = QStringLiteral("%1*(%2)*(%3)/(%4)").arg(double_pi).arg(C).arg(f0).arg(Q); } else if (mode == "SquareRoot") { - res_eq = QString("%1*(%2)*sqrt(hertz*(%3))/(%4)").arg(double_pi).arg(C).arg(f0).arg(Q); + res_eq = QStringLiteral("%1*(%2)*sqrt(hertz*(%3))/(%4)").arg(double_pi).arg(C).arg(f0).arg(Q); } - s = QString("%1 %2 %3 C='%4'\n").arg(Cname).arg(pin1).arg(pin2).arg(C); - s += QString("%1 %2 %3 R='1/((%4)+1e-8)'\n").arg(Rname).arg(pin1).arg(pin2).arg(res_eq); + s = QStringLiteral("%1 %2 %3 C='%4'\n").arg(Cname).arg(pin1).arg(pin2).arg(C); + s += QStringLiteral("%1 %2 %3 R='1/((%4)+1e-8)'\n").arg(Rname).arg(pin1).arg(pin2).arg(res_eq); return s; } diff --git a/qucs/components/cccs.cpp b/qucs/components/cccs.cpp index eeb86a320..2244d16d3 100644 --- a/qucs/components/cccs.cpp +++ b/qucs/components/cccs.cpp @@ -93,11 +93,11 @@ QString CCCS::va_code() QString Vpm = vacompat::normalize_voltage(P1,P2); QString Ipm = vacompat::normalize_current(P1,P2,true); - s += QString(" %1 <+ %2 * 1e3;\n").arg(Ipm).arg(Vpm); + s += QStringLiteral(" %1 <+ %2 * 1e3;\n").arg(Ipm).arg(Vpm); QString Vpm2 = vacompat::normalize_voltage(P4,P3); QString Ipm2 = vacompat::normalize_current(P4,P3,true); - s += QString("%1 <+ %2 * 1e-9;\n").arg(Ipm2).arg(Vpm2); - s += QString("%1 <+ %2 * 1e3 * %3 ;\n").arg(Ipm2).arg(Vpm).arg(Gain); + s += QStringLiteral("%1 <+ %2 * 1e-9;\n").arg(Ipm2).arg(Vpm2); + s += QStringLiteral("%1 <+ %2 * 1e3 * %3 ;\n").arg(Ipm2).arg(Vpm).arg(Gain); return s; } @@ -106,11 +106,11 @@ QString CCCS::spice_netlist(bool) QString s = spicecompat::check_refdes(Name,SpiceModel); // spice CCCS consists two sources: output source // and zero value controlling source QString val = spicecompat::normalize_value(Props.at(0)->Value); - s += QString(" %1 %2 ").arg(Ports.at(1)->Connection->Name) + s += QStringLiteral(" %1 %2 ").arg(Ports.at(1)->Connection->Name) .arg(Ports.at(2)->Connection->Name); // output source nodes s.replace(" gnd ", " 0 "); - s += QString(" V%1 %2\n").arg(Name).arg(val); - s += QString("V%1 %2 %3 DC 0\n").arg(Name).arg(Ports.at(0)->Connection->Name) + s += QStringLiteral(" V%1 %2\n").arg(Name).arg(val); + s += QStringLiteral("V%1 %2 %3 DC 0\n").arg(Name).arg(Ports.at(0)->Connection->Name) .arg(Ports.at(3)->Connection->Name); // controlling 0V source return s; diff --git a/qucs/components/ccvs.cpp b/qucs/components/ccvs.cpp index cec8a1582..108bde52b 100644 --- a/qucs/components/ccvs.cpp +++ b/qucs/components/ccvs.cpp @@ -92,11 +92,11 @@ QString CCVS::va_code() QString Vpm = vacompat::normalize_voltage(P1,P2); QString Ipm = vacompat::normalize_current(P1,P2,true); - s += QString(" %1 <+ %2 * 1e3;\n").arg(Ipm).arg(Vpm); + s += QStringLiteral(" %1 <+ %2 * 1e3;\n").arg(Ipm).arg(Vpm); QString Vpm2 = vacompat::normalize_voltage(P3,P4); QString Ipm2 = vacompat::normalize_current(P3,P4,true); - s += QString("%1 <+ -(%2 * 1e3);\n").arg(Ipm2).arg(Vpm2); - s += QString("%1 <+ -(%2 * 1e6* %3) ;\n").arg(Ipm2).arg(Vpm).arg(Gain); + s += QStringLiteral("%1 <+ -(%2 * 1e3);\n").arg(Ipm2).arg(Vpm2); + s += QStringLiteral("%1 <+ -(%2 * 1e6* %3) ;\n").arg(Ipm2).arg(Vpm).arg(Gain); return s; } @@ -107,11 +107,11 @@ QString CCVS::spice_netlist(bool) QString s = spicecompat::check_refdes(Name,SpiceModel); // spice CCVS consists two sources: output source // and zero value controlling source QString val = spicecompat::normalize_value(Props.at(0)->Value); - s += QString(" %1 %2 ").arg(Ports.at(1)->Connection->Name) + s += QStringLiteral(" %1 %2 ").arg(Ports.at(1)->Connection->Name) .arg(Ports.at(2)->Connection->Name); // output source nodes s.replace(" gnd ", " 0 "); - s += QString(" V%1 %2\n").arg(Name).arg(val); - s += QString("V%1 %2 %3 DC 0 \n").arg(Name).arg(Ports.at(0)->Connection->Name) + s += QStringLiteral(" V%1 %2\n").arg(Name).arg(val); + s += QStringLiteral("V%1 %2 %3 DC 0 \n").arg(Name).arg(Ports.at(0)->Connection->Name) .arg(Ports.at(3)->Connection->Name); // controlling 0V source return s; diff --git a/qucs/components/component.cpp b/qucs/components/component.cpp index c05f2d4e8..9490d1eaa 100644 --- a/qucs/components/component.cpp +++ b/qucs/components/component.cpp @@ -750,7 +750,7 @@ QString Component::form_spice_param_list(QStringList &ignore_list, QStringList & nam = Props.at(i)->Name; } QString val = spicecompat::normalize_value(Props.at(i)->Value); - par_str += QString("%1=%2 ").arg(nam).arg(val); + par_str += QStringLiteral("%1=%2 ").arg(nam).arg(val); } } @@ -759,7 +759,7 @@ QString Component::form_spice_param_list(QStringList &ignore_list, QStringList & } QString Component::spice_netlist(bool) { - return QString("\n"); // ignore if not implemented + return QStringLiteral("\n"); // ignore if not implemented } QString Component::va_code() { @@ -1551,7 +1551,7 @@ QString GateComponent::spice_netlist(bool isXyce) { } s += "] " + Ports.at(0)->Connection->Name; s += " " + tmp_model + "\n"; - s += QString(".model %1 %2(rise_delay=%3 fall_delay=%3 input_load=5e-13)\n") + s += QStringLiteral(".model %1 %2(rise_delay=%3 fall_delay=%3 input_load=5e-13)\n") .arg(tmp_model).arg(type).arg(td); return s; } @@ -1801,11 +1801,11 @@ Component *getComponentFromName(QString &Line, Schematic *p) { c = new Subcircuit(); // Hack: insert dummy File property before the first property int pos1 = Line.indexOf('"'); - QString filestr = QString("\"%1.sch\" 1 ").arg(cstr); + QString filestr = QStringLiteral("\"%1.sch\" 1 ").arg(cstr); Line.insert(pos1, filestr); } else return 0; } else { - QString err_msg = QString("Schematic loading error! Unknown device %1").arg(cstr); + QString err_msg = QStringLiteral("Schematic loading error! Unknown device %1").arg(cstr); qCritical() << err_msg; return 0; } diff --git a/qucs/components/d_flipflop.cpp b/qucs/components/d_flipflop.cpp index 40076cec3..2296881de 100644 --- a/qucs/components/d_flipflop.cpp +++ b/qucs/components/d_flipflop.cpp @@ -138,9 +138,9 @@ QString D_FlipFlop::spice_netlist(bool isXyce) s += " " + D + " " + CLK + " " + SET + " " + RESET + " " + Q + " " + QB; s += " " + tmp_model + "\n"; - s += QString(".model %1 d_dff(clk_delay=%2 set_delay=%2 reset_delay=%2 rise_delay=%2 fall_delay=%2)\n") + s += QStringLiteral(".model %1 d_dff(clk_delay=%2 set_delay=%2 reset_delay=%2 rise_delay=%2 fall_delay=%2)\n") .arg(tmp_model).arg(td); - s += QString("C%1 QB_%1 0 1e-9 \n").arg(Name); // capacitor load for unused QB pin + s += QStringLiteral("C%1 QB_%1 0 1e-9 \n").arg(Name); // capacitor load for unused QB pin return s; } diff --git a/qucs/components/dcblock.cpp b/qucs/components/dcblock.cpp index f545b06ac..b82173448 100644 --- a/qucs/components/dcblock.cpp +++ b/qucs/components/dcblock.cpp @@ -76,6 +76,6 @@ QString dcBlock::spice_netlist(bool isXyce) QString val = spicecompat::normalize_value(getProperty("C")->Value); QString s; QString name = spicecompat::check_refdes(Name, SpiceModel); - s = QString("%1 %2 %3 %4\n").arg(name, p1, p2, val); + s = QStringLiteral("%1 %2 %3 %4\n").arg(name, p1, p2, val); return s; } diff --git a/qucs/components/dcfeed.cpp b/qucs/components/dcfeed.cpp index 4c3d9fca6..63b4dceba 100644 --- a/qucs/components/dcfeed.cpp +++ b/qucs/components/dcfeed.cpp @@ -77,6 +77,6 @@ QString dcFeed::spice_netlist(bool isXyce) QString val = spicecompat::normalize_value(getProperty("L")->Value); QString s; QString name = spicecompat::check_refdes(Name, SpiceModel); - s = QString("%1 %2 %3 %4\n").arg(name, p1, p2, val); + s = QStringLiteral("%1 %2 %3 %4\n").arg(name, p1, p2, val); return s; } diff --git a/qucs/components/dff_SR.cpp b/qucs/components/dff_SR.cpp index d93427fbb..c72ca211a 100644 --- a/qucs/components/dff_SR.cpp +++ b/qucs/components/dff_SR.cpp @@ -193,7 +193,7 @@ QString dff_SR::spice_netlist(bool isXyce) s += " " + D + " " + CLK + " " + SET + " " + RESET + " " + Q + " " + QB; s += " " + tmp_model + "\n"; - s += QString(".model %1 d_dff(clk_delay=%2 set_delay=%2 reset_delay=%2 rise_delay=%2 fall_delay=%2)\n") + s += QStringLiteral(".model %1 d_dff(clk_delay=%2 set_delay=%2 reset_delay=%2 rise_delay=%2 fall_delay=%2)\n") .arg(tmp_model).arg(td); return s; } diff --git a/qucs/components/digi_source.cpp b/qucs/components/digi_source.cpp index 8ff0518ad..acf3a975a 100644 --- a/qucs/components/digi_source.cpp +++ b/qucs/components/digi_source.cpp @@ -222,7 +222,7 @@ QString Digi_Source::spice_netlist(bool) evenValue = V; } - s += QString("DC %1 PWL(0 ").arg(evenValue); + s += QStringLiteral("DC %1 PWL(0 ").arg(evenValue); s += evenValue; for (int i = 0; i < timesList.size(); i++) { @@ -232,7 +232,7 @@ QString Digi_Source::spice_netlist(bool) if (i == 0) { // first time step - s += QString(" %1 %2").arg(timeValue).arg(evenValue); + s += QStringLiteral(" %1 %2").arg(timeValue).arg(evenValue); time += timeValue; } else { @@ -241,7 +241,7 @@ QString Digi_Source::spice_netlist(bool) risingTime = time + changingTime; time += timeValue; - s += QString(" %1 %2 %3 %2") + s += QStringLiteral(" %1 %2 %3 %2") .arg(risingTime) .arg(oddValue) .arg(time) @@ -249,7 +249,7 @@ QString Digi_Source::spice_netlist(bool) // last time step if (timeStep == timesList.last().toLower()) { fallingTime = time + changingTime; - s += QString(" %1 0 %2 0") + s += QStringLiteral(" %1 0 %2 0") .arg(fallingTime) .arg(fallingTime + changingTime) .toUpper(); @@ -258,7 +258,7 @@ QString Digi_Source::spice_netlist(bool) // times of even time step fallingTime = time + changingTime; time += timeValue; - s += QString(" %1 %2 %3 %2") + s += QStringLiteral(" %1 %2 %3 %2") .arg(fallingTime) .arg(evenValue) .arg(time) @@ -266,7 +266,7 @@ QString Digi_Source::spice_netlist(bool) // last time step if (timeStep == timesList.last().toLower()) { fallingTime = time + changingTime; - s += QString(" %1 0 %2 0") + s += QStringLiteral(" %1 0 %2 0") .arg(fallingTime) .arg(fallingTime + changingTime) .toUpper(); diff --git a/qucs/components/diode.cpp b/qucs/components/diode.cpp index f5fd45127..7e76446ee 100644 --- a/qucs/components/diode.cpp +++ b/qucs/components/diode.cpp @@ -136,23 +136,23 @@ QString Diode::spice_netlist(bool isXyce) } else { nam = Props.at(i)->Name; } - par_str += QString("%1=%2 ") + par_str += QStringLiteral("%1=%2 ") .arg(nam, spicecompat::normalize_value(Props.at(i)->Value)); } } if (getProperty("UseGlobTemp")->Value == "yes") { - s += QString(" DMOD_%1 AREA=%2\n").arg(Name).arg(getProperty("Area")->Value); + s += QStringLiteral(" DMOD_%1 AREA=%2\n").arg(Name).arg(getProperty("Area")->Value); } else { - s += QString(" DMOD_%1 AREA=%2 Temp=%3\n").arg(Name).arg(getProperty("Area")->Value) + s += QStringLiteral(" DMOD_%1 AREA=%2 Temp=%3\n").arg(Name).arg(getProperty("Area")->Value) .arg(getProperty("Temp")->Value); } if (isXyce) { - s += QString(".MODEL DMOD_%1 D (LEVEL = 2 %2)\n").arg(Name).arg(par_str); + s += QStringLiteral(".MODEL DMOD_%1 D (LEVEL = 2 %2)\n").arg(Name).arg(par_str); } else { - s += QString(".MODEL DMOD_%1 D (%2)\n").arg(Name).arg(par_str); + s += QStringLiteral(".MODEL DMOD_%1 D (%2)\n").arg(Name).arg(par_str); } diff --git a/qucs/components/eqndefined.cpp b/qucs/components/eqndefined.cpp index ed7599318..bd5de38eb 100644 --- a/qucs/components/eqndefined.cpp +++ b/qucs/components/eqndefined.cpp @@ -129,10 +129,10 @@ QString EqnDefined::spice_netlist(bool isXyce) QString plus = Ports.at(2*i)->Connection->Name; QString minus = Ports.at(2*i+1)->Connection->Name; if (used_currents.contains(i)) { // if current is used add sensing source V=0 - s += QString("V_%1sens_%2 %3 %4 DC 0\n").arg(Name).arg(i).arg(plus).arg(plus+"_sens"); + s += QStringLiteral("V_%1sens_%2 %3 %4 DC 0\n").arg(Name).arg(i).arg(plus).arg(plus+"_sens"); plus = plus+"_sens"; } - s += QString("B%1I%2 %3 %4 I=%5\n").arg(Name).arg(i).arg(plus) + s += QStringLiteral("B%1I%2 %3 %4 I=%5\n").arg(Name).arg(i).arg(plus) .arg(minus).arg(Itokens.join("")); QString Qeqn = Props.at(2*(i+1)+1)->Value; // parse charge equation only for Xyce @@ -144,9 +144,9 @@ QString EqnDefined::spice_netlist(bool isXyce) spicecompat::convert_functions(Qtokens,isXyce); subsVoltages(Qtokens,Nbranch); subsCurrents(Qtokens); - s += QString("G%1Q%2 %3 %4 n%1Q%2 %4 1.0\n").arg(Name).arg(i).arg(plus).arg(minus); - s += QString("L%1Q%2 n%1Q%2 %3 1.0\n").arg(Name).arg(i).arg(minus); - s += QString("B%1Q%2 n%1Q%2 %3 I=-(%4)\n").arg(Name).arg(i).arg(minus).arg(Qtokens.join("")); + s += QStringLiteral("G%1Q%2 %3 %4 n%1Q%2 %4 1.0\n").arg(Name).arg(i).arg(plus).arg(minus); + s += QStringLiteral("L%1Q%2 n%1Q%2 %3 1.0\n").arg(Name).arg(i).arg(minus); + s += QStringLiteral("B%1Q%2 n%1Q%2 %3 I=-(%4)\n").arg(Name).arg(i).arg(minus).arg(Qtokens.join("")); } } } else { @@ -172,8 +172,8 @@ QString EqnDefined::va_code() spicecompat::splitEqn(Ieqn,Itokens); vacompat::convert_functions(Itokens); subsVoltages(Itokens,Nbranch); - if (plus=="gnd") s += QString("%1 <+ -(%2);\n").arg(Ipm).arg(Itokens.join("")); - else s += QString("%1 <+ %2;\n").arg(Ipm).arg(Itokens.join("")); + if (plus=="gnd") s += QStringLiteral("%1 <+ -(%2);\n").arg(Ipm).arg(Itokens.join("")); + else s += QStringLiteral("%1 <+ %2;\n").arg(Ipm).arg(Itokens.join("")); } QString Qeqn = Props.at(2*(i+1)+1)->Value; // parse charge equation only for Xyce if (Qeqn!="0") { @@ -181,8 +181,8 @@ QString EqnDefined::va_code() spicecompat::splitEqn(Qeqn,Qtokens); vacompat::convert_functions(Qtokens); subsVoltages(Qtokens,Nbranch); - if (plus=="gnd") s += QString("%1 <+ -ddt( %2 );\n").arg(Ipm).arg(Qtokens.join("")); - else s += QString("%1 <+ ddt( %2 );\n").arg(Ipm).arg(Qtokens.join("")); + if (plus=="gnd") s += QStringLiteral("%1 <+ -ddt( %2 );\n").arg(Ipm).arg(Qtokens.join("")); + else s += QStringLiteral("%1 <+ ddt( %2 );\n").arg(Ipm).arg(Qtokens.join("")); } } } else { @@ -245,7 +245,7 @@ void EqnDefined::subsCurrents(QStringList &tokens) if (curr_pattern.match(*it).hasMatch()) { QString curr = *it; int branch = curr.remove('I').toInt(); - *it = QString("i(V_%1sens_%2)").arg(Name).arg(branch-1); + *it = QStringLiteral("i(V_%1sens_%2)").arg(Name).arg(branch-1); } } } diff --git a/qucs/components/equation.cpp b/qucs/components/equation.cpp index b45432f8a..b15673331 100644 --- a/qucs/components/equation.cpp +++ b/qucs/components/equation.cpp @@ -101,7 +101,7 @@ QString Equation::getVAvariables() vars.append(Props.at(i)->Name); } - return QString("real %1;\n").arg(vars.join(", ")); + return QStringLiteral("real %1;\n").arg(vars.join(", ")); } QString Equation::getVAExpressions() @@ -111,7 +111,7 @@ QString Equation::getVAExpressions() QStringList tokens; spicecompat::splitEqn(Props.at(i)->Value,tokens); vacompat::convert_functions(tokens); - s += QString("%1=%2;\n").arg(Props.at(i)->Name).arg(tokens.join("")); + s += QStringLiteral("%1=%2;\n").arg(Props.at(i)->Name).arg(tokens.join("")); } return s; } @@ -155,7 +155,7 @@ QString Equation::getExpression(bool isXyce) } if (!spicecompat::containNodes(tokens,ng_vars)) { - s += QString(".PARAM %1=%2\n").arg(Props.at(i)->Name).arg(eqn); + s += QStringLiteral(".PARAM %1=%2\n").arg(Props.at(i)->Name).arg(eqn); } } return s; @@ -194,7 +194,7 @@ QString Equation::getEquations(QString sim, QStringList &dep_vars) if ( used_sim.toLower() == "tran" ) used_sim = "tr"; if ( (sim.startsWith(used_sim.toLower())) || (used_sim=="all") ) { eqn = tokens.join(""); - s += QString("let %1=%2\n").arg(Props.at(i)->Name).arg(eqn); + s += QStringLiteral("let %1=%2\n").arg(Props.at(i)->Name).arg(eqn); dep_vars.append(Props.at(i)->Name); } } @@ -224,7 +224,7 @@ QString Equation::getNgspiceScript() eqn = tokens.join(""); if (!spicecompat::containNodes(tokens,ng_vars)) { - s += QString("let %1=%2\n").arg(Props.at(i)->Name).arg(eqn); + s += QStringLiteral("let %1=%2\n").arg(Props.at(i)->Name).arg(eqn); } } return s; diff --git a/qucs/components/gyrator.cpp b/qucs/components/gyrator.cpp index 9ec885761..c3625605c 100644 --- a/qucs/components/gyrator.cpp +++ b/qucs/components/gyrator.cpp @@ -91,7 +91,7 @@ QString Gyrator::spice_netlist(bool) if (n3=="gnd") n3="0"; QString n4 = Ports.at(3)->Connection->Name; if (n4=="gnd") n4="0"; - s += QString("B%1_1 %2 %3 I=(1/(%4))*(V(%5)-V(%6))\n").arg(Name).arg(n1).arg(n4).arg(R).arg(n2).arg(n3); - s += QString("B%1_2 %2 %3 I=-1.0*(1/(%4))*(V(%5)-V(%6))\n").arg(Name).arg(n2).arg(n3).arg(R).arg(n1).arg(n4); + s += QStringLiteral("B%1_1 %2 %3 I=(1/(%4))*(V(%5)-V(%6))\n").arg(Name).arg(n1).arg(n4).arg(R).arg(n2).arg(n3); + s += QStringLiteral("B%1_2 %2 %3 I=-1.0*(1/(%4))*(V(%5)-V(%6))\n").arg(Name).arg(n2).arg(n3).arg(R).arg(n1).arg(n4); return s; } diff --git a/qucs/components/hb_sim.cpp b/qucs/components/hb_sim.cpp index c99892039..f95abd55b 100644 --- a/qucs/components/hb_sim.cpp +++ b/qucs/components/hb_sim.cpp @@ -67,13 +67,13 @@ QString HB_Sim::spice_netlist(bool isXyce) { QString s=""; if (isXyce) { // Only in Xyce - s += QString(".options hbint numfreq=%1 STARTUPPERIODS=2\n").arg(Props.at(1)->Value); + s += QStringLiteral(".options hbint numfreq=%1 STARTUPPERIODS=2\n").arg(Props.at(1)->Value); QStringList freqs = Props.at(0)->Value.split(QRegularExpression("\\s+(?=[0-9])")); // split frequencyes list by space before digit for (QStringList::iterator it = freqs.begin();it != freqs.end(); it++) { (*it) = spicecompat::normalize_value(*it); } - s += QString(".HB %1\n").arg(freqs.join(" ")); + s += QStringLiteral(".HB %1\n").arg(freqs.join(" ")); } return s; } diff --git a/qucs/components/iexp.cpp b/qucs/components/iexp.cpp index be55ba7e6..2ba26d5ae 100644 --- a/qucs/components/iexp.cpp +++ b/qucs/components/iexp.cpp @@ -101,7 +101,7 @@ QString iExp::spice_netlist(bool) QString Tr = spicecompat::normalize_value(Props.at(4)->Value); QString Tf = spicecompat::normalize_value(Props.at(5)->Value); - s += QString(" DC 0 EXP(%1 %2 %3 %4 %5 %6) AC 0\n").arg(U1).arg(U2).arg(T1).arg(Tr).arg(T2).arg(Tf); + s += QStringLiteral(" DC 0 EXP(%1 %2 %3 %4 %5 %6) AC 0\n").arg(U1).arg(U2).arg(T1).arg(Tr).arg(T2).arg(Tf); return s; } diff --git a/qucs/components/ifile.cpp b/qucs/components/ifile.cpp index 1cf4dac71..cce85f493 100644 --- a/qucs/components/ifile.cpp +++ b/qucs/components/ifile.cpp @@ -116,13 +116,13 @@ QString iFile::spice_netlist(bool isXyce) QString modname = "mod_" + Model + Name; QString p1 = spicecompat::normalize_node_name(Ports.at(0)->Connection->Name); QString p2 = spicecompat::normalize_node_name(Ports.at(1)->Connection->Name); - s += QString(" %id([%1 %2]) %3\n").arg(p2).arg(p1).arg(modname); + s += QStringLiteral(" %id([%1 %2]) %3\n").arg(p2).arg(p1).arg(modname); QString file = getSubcircuitFile(); QString sc = getProperty("G")->Value; QString step = "false"; QString delay = getProperty("T")->Value; if (getProperty("Interpolator")->Value != "linear") step = "true"; - s += QString(".MODEL %1 filesource (file=\"%2\" amplscale=[%3] amplstep=%4 " + s += QStringLiteral(".MODEL %1 filesource (file=\"%2\" amplscale=[%3] amplstep=%4 " "amploffset=[0] timeoffset=%5 timescale=1)\n") .arg(modname).arg(file).arg(sc).arg(step).arg(delay); diff --git a/qucs/components/indq.cpp b/qucs/components/indq.cpp index 646ad1111..89cabdb32 100644 --- a/qucs/components/indq.cpp +++ b/qucs/components/indq.cpp @@ -100,7 +100,7 @@ QString IndQ::spice_netlist(bool isXyce) pin1 = spicecompat::normalize_node_name(pin1); QString pin2 = Ports.at(1)->Connection->Name; pin2 = spicecompat::normalize_node_name(pin2); - QString pin_int = QString("_net_%1").arg(Name); + QString pin_int = QStringLiteral("_net_%1").arg(Name); QString Lname = spicecompat::check_refdes(Name, SpiceModel); QString Rname = "R" + Name; @@ -114,15 +114,15 @@ QString IndQ::spice_netlist(bool isXyce) QString double_pi = "8*atan(1)"; QString mode = getProperty("Mode")->Value; if (mode == "Constant") { - res_eq = QString("%1*(%2)*hertz/(%3)").arg(double_pi).arg(L).arg(Q); + res_eq = QStringLiteral("%1*(%2)*hertz/(%3)").arg(double_pi).arg(L).arg(Q); } else if (mode == "Linear") { - res_eq = QString("%1*(%2)*(%3)/(%4)").arg(double_pi).arg(L).arg(f0).arg(Q); + res_eq = QStringLiteral("%1*(%2)*(%3)/(%4)").arg(double_pi).arg(L).arg(f0).arg(Q); } else if (mode == "SquareRoot") { - res_eq = QString("%1*(%2)*sqrt(hertz*(%3))/(%4)").arg(double_pi).arg(L).arg(f0).arg(Q); + res_eq = QStringLiteral("%1*(%2)*sqrt(hertz*(%3))/(%4)").arg(double_pi).arg(L).arg(f0).arg(Q); } - s = QString("%1 %2 %3 L='%4'\n").arg(Lname).arg(pin1).arg(pin_int).arg(L); - s += QString("%1 %2 %3 R='%4'\n").arg(Rname).arg(pin_int).arg(pin2).arg(res_eq); + s = QStringLiteral("%1 %2 %3 L='%4'\n").arg(Lname).arg(pin1).arg(pin_int).arg(L); + s += QStringLiteral("%1 %2 %3 R='%4'\n").arg(Rname).arg(pin_int).arg(pin2).arg(res_eq); return s; } diff --git a/qucs/components/inductor.cpp b/qucs/components/inductor.cpp index 8bdec84f6..a41e4e377 100644 --- a/qucs/components/inductor.cpp +++ b/qucs/components/inductor.cpp @@ -62,7 +62,7 @@ QString Inductor::spice_netlist(bool) { QString s = spicecompat::check_refdes(Name,SpiceModel); - s += QString(" %1 %2 ").arg(Ports.at(0)->Connection->Name) + s += QStringLiteral(" %1 %2 ").arg(Ports.at(0)->Connection->Name) .arg(Ports.at(1)->Connection->Name); // output source nodes s.replace(" gnd ", " 0 "); @@ -85,7 +85,7 @@ QString Inductor::va_code() QString s = ""; QString Vpm = vacompat::normalize_voltage(plus,minus,true); QString Ipm = vacompat::normalize_current(plus,minus); - s += QString("%1 <+ ddt( %2 * %3 );\n").arg(Vpm).arg(Ipm).arg(val); + s += QStringLiteral("%1 <+ ddt( %2 * %3 );\n").arg(Vpm).arg(Ipm).arg(val); return s; } diff --git a/qucs/components/iprobe.cpp b/qucs/components/iprobe.cpp index 5642ca619..162875431 100644 --- a/qucs/components/iprobe.cpp +++ b/qucs/components/iprobe.cpp @@ -81,7 +81,7 @@ Element* iProbe::info(QString& Name, char* &BitmapFile, bool getNewOne) QString iProbe::spice_netlist(bool) { - QString s = QString("V%1 %2 %3 DC 0\n").arg(Name).arg(Ports.at(0)->Connection->Name) + QString s = QStringLiteral("V%1 %2 %3 DC 0\n").arg(Name).arg(Ports.at(0)->Connection->Name) .arg(Ports.at(1)->Connection->Name); return s; } @@ -95,9 +95,9 @@ QString iProbe::getProbeVariable(bool isXyce) { QString s; if (isXyce) { - s = QString("I(V%1)").arg(Name); + s = QStringLiteral("I(V%1)").arg(Name); } else { - s = QString("V%1#branch").arg(Name); + s = QStringLiteral("V%1#branch").arg(Name); } return s; } diff --git a/qucs/components/ipulse.cpp b/qucs/components/ipulse.cpp index 4bbf39016..72fd07c67 100644 --- a/qucs/components/ipulse.cpp +++ b/qucs/components/ipulse.cpp @@ -117,7 +117,7 @@ QString iPulse::spice_netlist(bool) Pw = Pw - TfVal*fac; Per = 1.0e9*Pw; - s += QString(" DC 0 PULSE(%1 %2 %3 %4 %5 %6 %7) AC 0\n").arg(VL).arg(VH).arg(T1).arg(Tr).arg(Tf).arg(Pw).arg(Per); + s += QStringLiteral(" DC 0 PULSE(%1 %2 %3 %4 %5 %6 %7) AC 0\n").arg(VL).arg(VH).arg(T1).arg(Tr).arg(Tf).arg(Pw).arg(Per); return s; } diff --git a/qucs/components/irect.cpp b/qucs/components/irect.cpp index 830aa8ff9..ea721b104 100644 --- a/qucs/components/irect.cpp +++ b/qucs/components/irect.cpp @@ -106,7 +106,7 @@ QString iRect::spice_netlist(bool) misc::str2num(Props.at(4)->Value,Tfval,unit,fac); T = Tfval*fac+T; - s += QString(" DC 0 PULSE( 0 -%1 %2 %3 %4 %5 %6) AC 0\n").arg(U).arg(Td).arg(Tr).arg(Tf).arg(TH).arg(T); + s += QStringLiteral(" DC 0 PULSE( 0 -%1 %2 %3 %4 %5 %6) AC 0\n").arg(U).arg(Td).arg(Tr).arg(Tf).arg(TH).arg(T); return s; } diff --git a/qucs/components/jfet.cpp b/qucs/components/jfet.cpp index aa7851f3c..a49ac7e44 100644 --- a/qucs/components/jfet.cpp +++ b/qucs/components/jfet.cpp @@ -125,13 +125,13 @@ QString JFET::spice_netlist(bool isXyce) QString jfet_type = getProperty("Type")->Value.at(0).toUpper(); if (getProperty("UseGlobTemp")->Value == "yes") { - s += QString(" JMOD_%1 %2\n").arg(Name).arg(getProperty("Area")->Value); + s += QStringLiteral(" JMOD_%1 %2\n").arg(Name).arg(getProperty("Area")->Value); } else { - s += QString(" JMOD_%1 %2 TEMP=%3\n").arg(Name).arg(getProperty("Area")->Value) + s += QStringLiteral(" JMOD_%1 %2 TEMP=%3\n").arg(Name).arg(getProperty("Area")->Value) .arg(getProperty("Temp")->Value); } - s += QString(".MODEL JMOD_%1 %2JF (%3)\n").arg(Name).arg(jfet_type).arg(par_str); + s += QStringLiteral(".MODEL JMOD_%1 %2JF (%3)\n").arg(Name).arg(jfet_type).arg(par_str); return s; } diff --git a/qucs/components/jkff_SR.cpp b/qucs/components/jkff_SR.cpp index 28ac2bd70..ebc71ee7d 100644 --- a/qucs/components/jkff_SR.cpp +++ b/qucs/components/jkff_SR.cpp @@ -203,7 +203,7 @@ QString jkff_SR::spice_netlist(bool isXyce) s += " " + J + " " + K + " " + CLK + " " + SET + " " + RESET + " " + Q + " " + QB; s += " " + tmp_model + "\n"; - s += QString(".model %1 d_jkff(clk_delay=%2 set_delay=%2 reset_delay=%2 rise_delay=%2 fall_delay=%2)\n") + s += QStringLiteral(".model %1 d_jkff(clk_delay=%2 set_delay=%2 reset_delay=%2 rise_delay=%2 fall_delay=%2)\n") .arg(tmp_model).arg(td); return s; } diff --git a/qucs/components/logical_buf.cpp b/qucs/components/logical_buf.cpp index 219e659d2..849ebd158 100644 --- a/qucs/components/logical_buf.cpp +++ b/qucs/components/logical_buf.cpp @@ -145,7 +145,7 @@ QString Logical_Buf::spice_netlist(bool isXyce) s += " " + Ports.at(1)->Connection->Name; s += " " + Ports.at(0)->Connection->Name; s += " " + tmp_model + "\n"; - s += QString(".model %1 d_buffer(rise_delay=%2 fall_delay=%2 input_load=5e-13)\n") + s += QStringLiteral(".model %1 d_buffer(rise_delay=%2 fall_delay=%2 input_load=5e-13)\n") .arg(tmp_model).arg(td); return s; } diff --git a/qucs/components/logical_inv.cpp b/qucs/components/logical_inv.cpp index 158735b10..5489b34a7 100644 --- a/qucs/components/logical_inv.cpp +++ b/qucs/components/logical_inv.cpp @@ -162,7 +162,7 @@ QString Logical_Inv::spice_netlist(bool isXyce) s += " " + Ports.at(1)->Connection->Name; s += " " + Ports.at(0)->Connection->Name; s += " " + tmp_model + "\n"; - s += QString(".model %1 d_inverter(rise_delay=%2 fall_delay=%2 input_load=5e-13)\n") + s += QStringLiteral(".model %1 d_inverter(rise_delay=%2 fall_delay=%2 input_load=5e-13)\n") .arg(tmp_model).arg(td); return s; } diff --git a/qucs/components/mosfet.cpp b/qucs/components/mosfet.cpp index 86bac3413..8668ba32e 100644 --- a/qucs/components/mosfet.cpp +++ b/qucs/components/mosfet.cpp @@ -193,13 +193,13 @@ QString MOSFET::spice_netlist(bool isXyce) ps *= fac; if (getProperty("UseGlobTemp")->Value == "yes") { - s += QString(" MMOD_%1 L=%2 W=%3 Ad=%4 As=%5 Pd=%6 Ps=%7\n") + s += QStringLiteral(" MMOD_%1 L=%2 W=%3 Ad=%4 As=%5 Pd=%6 Ps=%7\n") .arg(Name).arg(l).arg(w).arg(ad).arg(as).arg(pd).arg(ps); } else { - s += QString(" MMOD_%1 L=%2 W=%3 Ad=%4 As=%5 Pd=%6 Ps=%7 Temp=%8\n") + s += QStringLiteral(" MMOD_%1 L=%2 W=%3 Ad=%4 As=%5 Pd=%6 Ps=%7 Temp=%8\n") .arg(Name).arg(l).arg(w).arg(ad).arg(as).arg(pd).arg(ps).arg(getProperty("Temp")->Value); } - s += QString(".MODEL MMOD_%1 %2MOS (%3)\n").arg(Name).arg(mosfet_type).arg(par_str); + s += QStringLiteral(".MODEL MMOD_%1 %2MOS (%3)\n").arg(Name).arg(mosfet_type).arg(par_str); return s; } diff --git a/qucs/components/mosfet_sub.cpp b/qucs/components/mosfet_sub.cpp index db16ee4f0..841638c8b 100644 --- a/qucs/components/mosfet_sub.cpp +++ b/qucs/components/mosfet_sub.cpp @@ -202,13 +202,13 @@ QString MOSFET_sub::spice_netlist(bool isXyce) ps *= fac; if (getProperty("UseGlobTemp")->Value == "yes") { - s += QString(" MMOD_%1 L=%2 W=%3 Ad=%4 As=%5 Pd=%6 Ps=%7\n") + s += QStringLiteral(" MMOD_%1 L=%2 W=%3 Ad=%4 As=%5 Pd=%6 Ps=%7\n") .arg(Name).arg(l).arg(w).arg(ad).arg(as).arg(pd).arg(ps); } else { - s += QString(" MMOD_%1 L=%2 W=%3 Ad=%4 As=%5 Pd=%6 Ps=%7 Temp=%8\n") + s += QStringLiteral(" MMOD_%1 L=%2 W=%3 Ad=%4 As=%5 Pd=%6 Ps=%7 Temp=%8\n") .arg(Name).arg(l).arg(w).arg(ad).arg(as).arg(pd).arg(ps).arg(getProperty("Temp")->Value); } - s += QString(".MODEL MMOD_%1 %2MOS (%3)\n").arg(Name).arg(mosfet_type).arg(par_str); + s += QStringLiteral(".MODEL MMOD_%1 %2MOS (%3)\n").arg(Name).arg(mosfet_type).arg(par_str); return s; } diff --git a/qucs/components/mutual.cpp b/qucs/components/mutual.cpp index 33a9ce45f..1b6edeb52 100644 --- a/qucs/components/mutual.cpp +++ b/qucs/components/mutual.cpp @@ -92,15 +92,15 @@ QString Mutual::spice_netlist(bool isXyce) QString k1 = "K" + Name; QString ind1 = spicecompat::normalize_value(getProperty("L1")->Value); QString ind2 = spicecompat::normalize_value(getProperty("L2")->Value); - QString s = QString("%1 %2 %3 %4\n").arg(l1) + QString s = QStringLiteral("%1 %2 %3 %4\n").arg(l1) .arg(spicecompat::normalize_node_name(Ports.at(0)->Connection->Name)) .arg(spicecompat::normalize_node_name(Ports.at(3)->Connection->Name)) .arg(ind1); - s += QString("%1 %2 %3 %4\n").arg(l2) + s += QStringLiteral("%1 %2 %3 %4\n").arg(l2) .arg(spicecompat::normalize_node_name(Ports.at(1)->Connection->Name)) .arg(spicecompat::normalize_node_name(Ports.at(2)->Connection->Name)) .arg(ind2); - s += QString("%1 %2 %3 %4\n").arg(k1).arg(l1).arg(l2) + s += QStringLiteral("%1 %2 %3 %4\n").arg(k1).arg(l1).arg(l2) .arg(spicecompat::normalize_value(getProperty("k")->Value)); return s; } diff --git a/qucs/components/mutual2.cpp b/qucs/components/mutual2.cpp index 83f4390d6..d18b20f25 100644 --- a/qucs/components/mutual2.cpp +++ b/qucs/components/mutual2.cpp @@ -127,23 +127,23 @@ QString Mutual2::spice_netlist(bool isXyce) QString ind1 = spicecompat::normalize_value(getProperty("L1")->Value); QString ind2 = spicecompat::normalize_value(getProperty("L2")->Value); QString ind3 = spicecompat::normalize_value(getProperty("L3")->Value); - QString s = QString("%1 %2 %3 %4\n").arg(l1) + QString s = QStringLiteral("%1 %2 %3 %4\n").arg(l1) .arg(spicecompat::normalize_node_name(Ports.at(0)->Connection->Name)) .arg(spicecompat::normalize_node_name(Ports.at(5)->Connection->Name)) .arg(ind1); - s += QString("%1 %2 %3 %4\n").arg(l2) + s += QStringLiteral("%1 %2 %3 %4\n").arg(l2) .arg(spicecompat::normalize_node_name(Ports.at(4)->Connection->Name)) .arg(spicecompat::normalize_node_name(Ports.at(3)->Connection->Name)) .arg(ind2); - s += QString("%1 %2 %3 %4\n").arg(l3) + s += QStringLiteral("%1 %2 %3 %4\n").arg(l3) .arg(spicecompat::normalize_node_name(Ports.at(1)->Connection->Name)) .arg(spicecompat::normalize_node_name(Ports.at(2)->Connection->Name)) .arg(ind3); - s += QString("%1 %2 %3 %4\n").arg(k12).arg(l1).arg(l2) + s += QStringLiteral("%1 %2 %3 %4\n").arg(k12).arg(l1).arg(l2) .arg(spicecompat::normalize_value(getProperty("k12")->Value)); - s += QString("%1 %2 %3 %4\n").arg(k13).arg(l1).arg(l3) + s += QStringLiteral("%1 %2 %3 %4\n").arg(k13).arg(l1).arg(l3) .arg(spicecompat::normalize_value(getProperty("k12")->Value)); - s += QString("%1 %2 %3 %4\n").arg(k23).arg(l2).arg(l3) + s += QStringLiteral("%1 %2 %3 %4\n").arg(k23).arg(l2).arg(l3) .arg(spicecompat::normalize_value(getProperty("k23")->Value)); return s; } diff --git a/qucs/components/mutualx.cpp b/qucs/components/mutualx.cpp index d29e06d22..3b5695598 100644 --- a/qucs/components/mutualx.cpp +++ b/qucs/components/mutualx.cpp @@ -128,7 +128,7 @@ QString MutualX::netlist() delete [] k_matrix; - s += QString(" L=\"[%1]\" k=\"[%2]\"\n").arg(L,k); + s += QStringLiteral(" L=\"[%1]\" k=\"[%2]\"\n").arg(L,k); return s; } @@ -239,7 +239,7 @@ QString MutualX::spice_netlist(bool isXyce) QString li = "L" + Name + "_L" + QString::number(i+1); QString prop_l = "L" + QString::number(i+1); QString ind = spicecompat::normalize_value(getProperty(prop_l)->Value); - s += QString("%1 %2 %3 %4\n").arg(li) + s += QStringLiteral("%1 %2 %3 %4\n").arg(li) .arg(spicecompat::normalize_node_name(Ports.at(2*i)->Connection->Name)) .arg(spicecompat::normalize_node_name(Ports.at(2*i+1)->Connection->Name)) .arg(ind); @@ -254,7 +254,7 @@ QString MutualX::spice_netlist(bool isXyce) auto pp = getProperty("k" + QString::number(i+1) + QString::number(j+1)); if (pp == nullptr) continue; QString val_k = spicecompat::normalize_value(pp->Value); - s += QString("%1 %2 %3 %4\n").arg(kij).arg(li).arg(lj).arg(val_k); + s += QStringLiteral("%1 %2 %3 %4\n").arg(kij).arg(li).arg(lj).arg(val_k); } } return s; diff --git a/qucs/components/opamp.cpp b/qucs/components/opamp.cpp index aac9f1439..4a58029bf 100644 --- a/qucs/components/opamp.cpp +++ b/qucs/components/opamp.cpp @@ -87,14 +87,14 @@ QString OpAmp::spice_netlist(bool isXyce) QString Vmax = spicecompat::normalize_value(Props.at(1)->Value); QString s; - s = QString("B_%1 %2 0 V = ").arg(Name).arg(out); + s = QStringLiteral("B_%1 %2 0 V = ").arg(Name).arg(out); if (isXyce) { - s += QString("%1*V(%2,%3)*stp(%4-%1*V(%2,%3))*stp(%1*V(%2,%3)-(-%4))" + s += QStringLiteral("%1*V(%2,%3)*stp(%4-%1*V(%2,%3))*stp(%1*V(%2,%3)-(-%4))" "+%4*stp(%1*V(%2,%3)-%4)" "+(-%4)*stp((-%4)-%1*V(%2,%3))\n").arg(G).arg(in_p).arg(in_m).arg(Vmax); } else { - s += QString("%1*V(%2,%3)*u(%4-%1*V(%2,%3))*u(%1*V(%2,%3)-(-%4))" + s += QStringLiteral("%1*V(%2,%3)*u(%4-%1*V(%2,%3))*u(%1*V(%2,%3)-(-%4))" "+%4*u(%1*V(%2,%3)-%4)" "+(-%4)*u((-%4)-%1*V(%2,%3))\n").arg(G).arg(in_p).arg(in_m).arg(Vmax); } diff --git a/qucs/components/optimizedialog.cpp b/qucs/components/optimizedialog.cpp index e8a52cce4..f2372c920 100644 --- a/qucs/components/optimizedialog.cpp +++ b/qucs/components/optimizedialog.cpp @@ -91,7 +91,7 @@ OptimizeDialog::OptimizeDialog(Optimize_Sim *c_, Schematic *d_) Tab2->setLayout(gp2); MethodCombo = new QComboBox(); - MethodCombo->insertItems(-1, QString("DE/best/1/exp;" + MethodCombo->insertItems(-1, QStringLiteral("DE/best/1/exp;" "DE/rand/1/exp;" "DE/rand-to-best/1/exp;" "DE/best/2/exp;" @@ -887,7 +887,7 @@ void OptimizeDialog::slotCreateEqn() } } - s += QString("\"yes\" 0>\n" // Export yes, no display + s += QStringLiteral("\"yes\" 0>\n" // Export yes, no display "\n" "\n" "\n" diff --git a/qucs/components/param_sweep.cpp b/qucs/components/param_sweep.cpp index 411c940e6..b6010da8c 100644 --- a/qucs/components/param_sweep.cpp +++ b/qucs/components/param_sweep.cpp @@ -91,11 +91,11 @@ QString Param_Sweep::getNgspiceBeforeSim(QString sim, int lvl) step_var.remove(QRegularExpression("[\\.\\[\\]@:]")); s = "option interp\n"; - s += QString("let number_%1 = 0\n").arg(step_var); - if (lvl==0) s += QString("echo \"STEP %1.%2\" > spice4qucs.%3.cir.res\n").arg(sim).arg(step_var).arg(sim); - else s += QString("echo \"STEP %1.%2\" > spice4qucs.%3.cir.res%4\n").arg(sim).arg(step_var).arg(sim).arg(lvl); + s += QStringLiteral("let number_%1 = 0\n").arg(step_var); + if (lvl==0) s += QStringLiteral("echo \"STEP %1.%2\" > spice4qucs.%3.cir.res\n").arg(sim).arg(step_var).arg(sim); + else s += QStringLiteral("echo \"STEP %1.%2\" > spice4qucs.%3.cir.res%4\n").arg(sim).arg(step_var).arg(sim).arg(lvl); - s += QString("foreach %1_act ").arg(step_var); + s += QStringLiteral("foreach %1_act ").arg(step_var); if((type == "list") || (type == "const")) { QString list_str = getProperty("Values")->Value; @@ -103,7 +103,7 @@ QString Param_Sweep::getNgspiceBeforeSim(QString sim, int lvl) list_str.chop(1); QStringList List = list_str.split(";"); for(int i = 0; i < List.length(); i++) { - s += QString("%1 ").arg(List[i]); + s += QStringLiteral("%1 ").arg(List[i]); } } else { double start,stop,step,fac,points,ostart,ostop; @@ -120,7 +120,7 @@ QString Param_Sweep::getNgspiceBeforeSim(QString sim, int lvl) if(type == "lin") { step = (stop-start)/(points-1); while ( points > 0 ) { - s += QString("%1 ").arg(start); + s += QStringLiteral("%1 ").arg(start); start += step; points -= 1; } @@ -130,7 +130,7 @@ QString Param_Sweep::getNgspiceBeforeSim(QString sim, int lvl) step = (stop - start)/(points - 1); while ( points > 0 ) { - s += QString("%1 ").arg(pow(10, start)); + s += QStringLiteral("%1 ").arg(pow(10, start)); start += step; points -= 1; } @@ -152,13 +152,13 @@ QString Param_Sweep::getNgspiceBeforeSim(QString sim, int lvl) if (step_var == "temp" || step_var == "temper") temper_sweep = true; if (temper_sweep) { // Sweep temperature - s += QString("option temp = $%1_act%2").arg(step_var).arg(nline_char); + s += QStringLiteral("option temp = $%1_act%2").arg(step_var).arg(nline_char); } else if (compfound) { // Sweep device - s += QString("alter %1 = $%2_act%3").arg(par).arg(step_var).arg(nline_char); + s += QStringLiteral("alter %1 = $%2_act%3").arg(par).arg(step_var).arg(nline_char); } else if (par.startsWith("@")) { // Sweep model - s += QString("altermod %1 = $%2_act%3").arg(par).arg(step_var).arg(nline_char); + s += QStringLiteral("altermod %1 = $%2_act%3").arg(par).arg(step_var).arg(nline_char); } else { // Sweep .PARAM variable - s += QString("alterparam %1 = $%2_act%3reset%3").arg(par).arg(step_var).arg(nline_char); + s += QStringLiteral("alterparam %1 = $%2_act%3reset%3").arg(par).arg(step_var).arg(nline_char); } } return s; @@ -176,9 +176,9 @@ QString Param_Sweep::getNgspiceAfterSim(QString sim, int lvl) s = "set appendwrite\n"; - if (lvl==0) s += QString("echo \"$&number_%1 $%2_act\" >> spice4qucs.%3.cir.res\n").arg(par).arg(par).arg(sim); - else s += QString("echo \"$&number_%1\" $%1_act >> spice4qucs.%2.cir.res%3\n").arg(par).arg(sim).arg(lvl); - s += QString("let number_%1 = number_%1 + 1\n").arg(par); + if (lvl==0) s += QStringLiteral("echo \"$&number_%1 $%2_act\" >> spice4qucs.%3.cir.res\n").arg(par).arg(par).arg(sim); + else s += QStringLiteral("echo \"$&number_%1\" $%1_act >> spice4qucs.%2.cir.res%3\n").arg(par).arg(sim).arg(lvl); + s += QStringLiteral("let number_%1 = number_%1 + 1\n").arg(par); s += "end\n"; s += "unset appendwrite\n"; @@ -189,7 +189,7 @@ QString Param_Sweep::getCounterVar() { QString par = getProperty("Param")->Value; par.remove(QRegularExpression("[\\.\\[\\]@:]")); - QString s = QString("number_%1").arg(par); + QString s = QStringLiteral("number_%1").arg(par); return s; } @@ -205,7 +205,7 @@ QString Param_Sweep::spice_netlist(bool isXyce) QString list = getProperty("Values")->Value; list.remove('[').remove(']'); list = list.split(';').join(" "); - s = QString(".STEP %1 LIST %2\n").arg(var).arg(list); + s = QStringLiteral(".STEP %1 LIST %2\n").arg(var).arg(list); return s.toLower(); } } @@ -221,11 +221,11 @@ QString Param_Sweep::spice_netlist(bool isXyce) if (Props.at(0)->Value.toLower().startsWith("dc")) { QString src = getProperty("Param")->Value; - s = QString("DC %1 %2 %3 %4\n").arg(src).arg(start).arg(stop).arg(step); + s = QStringLiteral("DC %1 %2 %3 %4\n").arg(src).arg(start).arg(stop).arg(step); if (isXyce) s.prepend('.'); } else if (isXyce) { QString var = getProperty("Param")->Value; - s = QString(".STEP %1 %2 %3 %4\n").arg(var).arg(start).arg(stop).arg(step); + s = QStringLiteral(".STEP %1 %2 %3 %4\n").arg(var).arg(start).arg(stop).arg(step); } else { s = ""; } diff --git a/qucs/components/potentiometer.cpp b/qucs/components/potentiometer.cpp index c8ff23857..7c2a5aa5f 100644 --- a/qucs/components/potentiometer.cpp +++ b/qucs/components/potentiometer.cpp @@ -121,7 +121,7 @@ QString potentiometer::spice_netlist(bool isXyce) QString pin1 = spicecompat::normalize_node_name(Ports.at(0)->Connection->Name); QString pin2 = spicecompat::normalize_node_name(Ports.at(1)->Connection->Name); QString pin3 = spicecompat::normalize_node_name(Ports.at(2)->Connection->Name); - s += QString("R%1_1 %2 %3 R='(%4)*(%5)/(%6)'\n").arg(Name).arg(pin1).arg(pin2).arg(R).arg(rot).arg(max_rot); - s += QString("R%1_2 %2 %3 R='(%4)*(1.0-(%5)/(%6))'\n").arg(Name).arg(pin2).arg(pin3).arg(R).arg(rot).arg(max_rot); + s += QStringLiteral("R%1_1 %2 %3 R='(%4)*(%5)/(%6)'\n").arg(Name).arg(pin1).arg(pin2).arg(R).arg(rot).arg(max_rot); + s += QStringLiteral("R%1_2 %2 %3 R='(%4)*(1.0-(%5)/(%6))'\n").arg(Name).arg(pin2).arg(pin3).arg(R).arg(rot).arg(max_rot); return s; } diff --git a/qucs/components/relais.cpp b/qucs/components/relais.cpp index 759669d9f..98d3cde99 100644 --- a/qucs/components/relais.cpp +++ b/qucs/components/relais.cpp @@ -115,9 +115,9 @@ QString Relais::spice_netlist(bool isXyce) QString Roff = spicecompat::normalize_value(Props.at(3)->Value); if (isXyce) { - s += QString(".MODEL %1 vswitch von=%2 voff=%3 ron=%4 roff=%5 \n").arg(model).arg(Vt).arg(Vt-Vh).arg(Ron).arg(Roff); + s += QStringLiteral(".MODEL %1 vswitch von=%2 voff=%3 ron=%4 roff=%5 \n").arg(model).arg(Vt).arg(Vt-Vh).arg(Ron).arg(Roff); } else { - s += QString(".MODEL %1 sw vt=%2 vh=%3 ron=%4 roff=%5 \n").arg(model).arg(Vt).arg(Vh).arg(Ron).arg(Roff); + s += QStringLiteral(".MODEL %1 sw vt=%2 vh=%3 ron=%4 roff=%5 \n").arg(model).arg(Vt).arg(Vh).arg(Ron).arg(Roff); } return s; diff --git a/qucs/components/resistor.cpp b/qucs/components/resistor.cpp index 20549ea42..fa477cb35 100644 --- a/qucs/components/resistor.cpp +++ b/qucs/components/resistor.cpp @@ -57,14 +57,14 @@ QString Resistor::spice_netlist(bool ) { QString s = spicecompat::check_refdes(Name,SpiceModel); - s += QString(" %1 %2 ").arg(Ports.at(0)->Connection->Name) + s += QStringLiteral(" %1 %2 ").arg(Ports.at(0)->Connection->Name) .arg(Ports.at(1)->Connection->Name); // output 2 nodes s.replace(" gnd ", " 0 "); QString Tc1 = getProperty("Tc1")->Value; QString Tc2 = getProperty("Tc2")->Value; - s += QString(" %1").arg(spicecompat::normalize_value(Props.at(0)->Value)); + s += QStringLiteral(" %1").arg(spicecompat::normalize_value(Props.at(0)->Value)); if (!Tc1.isEmpty()) { s += " tc1=" + Tc1; @@ -74,7 +74,7 @@ QString Resistor::spice_netlist(bool ) s += " tc2=" + Tc2; } - s += QString(" \n"); + s += QStringLiteral(" \n"); return s; } @@ -89,9 +89,9 @@ QString Resistor::va_code() QString Vpm = vacompat::normalize_voltage(plus,minus); QString Ipm = vacompat::normalize_current(plus,minus,true); - if (plus=="gnd") s += QString("%1 <+ -(%2/( %3 ));\n").arg(Ipm).arg(Vpm).arg(val); - else s+= QString("%1 <+ %2/( %3 );\n").arg(Ipm).arg(Vpm).arg(val); - s += QString("%1 <+ white_noise( 4.0*`P_K*( %2 + 273.15) / ( %3 ), \"thermal\" );\n") + if (plus=="gnd") s += QStringLiteral("%1 <+ -(%2/( %3 ));\n").arg(Ipm).arg(Vpm).arg(val); + else s+= QStringLiteral("%1 <+ %2/( %3 );\n").arg(Ipm).arg(Vpm).arg(val); + s += QStringLiteral("%1 <+ white_noise( 4.0*`P_K*( %2 + 273.15) / ( %3 ), \"thermal\" );\n") .arg(Ipm).arg(valTemp).arg(val); return s; diff --git a/qucs/components/rlcg.cpp b/qucs/components/rlcg.cpp index e7186ced5..ded850ea5 100644 --- a/qucs/components/rlcg.cpp +++ b/qucs/components/rlcg.cpp @@ -105,8 +105,8 @@ QString RLCG::spice_netlist(bool isXyce) QString G = spicecompat::normalize_value(getProperty("G")->Value); QString LEN = spicecompat::normalize_value(getProperty("Length")->Value); QString modname = "mod_" + Name; - s += QString("O%1 %2 0 %3 0 %4\n").arg(Name).arg(in).arg(out).arg(modname); - s += QString(".MODEL %1 LTRA(R=%2 C=%3 L=%4 G=%5 LEN=%6)\n") + s += QStringLiteral("O%1 %2 0 %3 0 %4\n").arg(Name).arg(in).arg(out).arg(modname); + s += QStringLiteral(".MODEL %1 LTRA(R=%2 C=%3 L=%4 G=%5 LEN=%6)\n") .arg(modname).arg(R).arg(C).arg(L).arg(G).arg(LEN); return s; } diff --git a/qucs/components/source_ac.cpp b/qucs/components/source_ac.cpp index 18a8a341e..1025f66a9 100644 --- a/qucs/components/source_ac.cpp +++ b/qucs/components/source_ac.cpp @@ -96,7 +96,7 @@ Element* Source_ac::info(QString& Name, char* &BitmapFile, bool getNewOne) QString Source_ac::ngspice_netlist() { - QString s = QString("V%1").arg(Name); + QString s = QStringLiteral("V%1").arg(Name); for (Port *p1 : Ports) { QString nam = p1->Connection->Name; if (nam=="gnd") nam = "0"; @@ -116,12 +116,12 @@ QString Source_ac::ngspice_netlist() en_tran = false; } - s += QString(" dc 0 ac %1").arg(vamp); + s += QStringLiteral(" dc 0 ac %1").arg(vamp); if (en_tran) { - s += QString(" SIN(0 %1 %2)").arg(vamp).arg(f); + s += QStringLiteral(" SIN(0 %1 %2)").arg(vamp).arg(f); } - s += QString(" portnum %1").arg(getProperty("Num")->Value); - s += QString(" z0 %1").arg(z0); + s += QStringLiteral(" portnum %1").arg(getProperty("Num")->Value); + s += QStringLiteral(" z0 %1").arg(z0); s += "\n"; return s; } @@ -134,7 +134,7 @@ QString Source_ac::xyce_netlist() if (nam=="gnd") nam = "0"; s += " "+ nam; // node names } - s += QString(" port=%1 ").arg(getProperty("Num")->Value); + s += QStringLiteral(" port=%1 ").arg(getProperty("Num")->Value); QString s_z0 = spicecompat::normalize_value(getProperty("Z")->Value); double z0 = s_z0.toDouble(); QString s_p = spicecompat::normalize_value(getProperty("P")->Value); @@ -149,11 +149,11 @@ QString Source_ac::xyce_netlist() en_tran = false; } - s += QString(" z0=%1 ").arg(s_z0); + s += QStringLiteral(" z0=%1 ").arg(s_z0); QString f = spicecompat::normalize_value(getProperty("f")->Value); - s += QString(" AC %1 ").arg(vamp); + s += QStringLiteral(" AC %1 ").arg(vamp); if (en_tran) { - s += QString(" SIN 0 %1 %2").arg(vamp).arg(f); + s += QStringLiteral(" SIN 0 %1 %2").arg(vamp).arg(f); } s += "\n"; return s; diff --git a/qucs/components/sp_sim.cpp b/qucs/components/sp_sim.cpp index c14e4fa8d..919727ea7 100644 --- a/qucs/components/sp_sim.cpp +++ b/qucs/components/sp_sim.cpp @@ -122,12 +122,12 @@ QStringList SP_Sim::getNgspiceExtraVariables() int port_number = getSPortsNumber(); for (int i = 0; i < port_number; i++) { for (int j = 0; j < port_number; j++) { - QString tail = QString("_%1_%2").arg(i+1).arg(j+1); - vars.append(QString("S%1").arg(tail)); - vars.append(QString("Y%1").arg(tail)); - vars.append(QString("Z%1").arg(tail)); + QString tail = QStringLiteral("_%1_%2").arg(i+1).arg(j+1); + vars.append(QStringLiteral("S%1").arg(tail)); + vars.append(QStringLiteral("Y%1").arg(tail)); + vars.append(QStringLiteral("Z%1").arg(tail)); if (donoise) { - vars.append(QString("Cy%1").arg(tail)); + vars.append(QStringLiteral("Cy%1").arg(tail)); } } } @@ -146,12 +146,12 @@ QStringList SP_Sim::getXyceExtraVariables() int ports_num = getSPortsNumber(); for (int i = 0; i < ports_num; i++) { for (int j = 0; j < ports_num; j++) { - QString tail = QString("(%1,%2)").arg(i+1).arg(j+1); - vars.append(QString("sdb%1").arg(tail)); - vars.append(QString("s%1").arg(tail)); - vars.append(QString("sp%1").arg(tail)); - vars.append(QString("y%1").arg(tail)); - vars.append(QString("z%1").arg(tail)); + QString tail = QStringLiteral("(%1,%2)").arg(i+1).arg(j+1); + vars.append(QStringLiteral("sdb%1").arg(tail)); + vars.append(QStringLiteral("s%1").arg(tail)); + vars.append(QStringLiteral("sp%1").arg(tail)); + vars.append(QStringLiteral("y%1").arg(tail)); + vars.append(QStringLiteral("z%1").arg(tail)); } } return vars; @@ -171,13 +171,13 @@ QString SP_Sim::getSweepString() Fstop *= fac; double Nd = ceil(log10(Fstop/Fstart)); // number of decades double Npd = ceil((Np - 1)/Nd); // points per decade - s += QString("DEC %1 ").arg(Npd); + s += QStringLiteral("DEC %1 ").arg(Npd); } else { // no need conversion - s += QString("LIN %1 ").arg(Props.at(3)->Value); + s += QStringLiteral("LIN %1 ").arg(Props.at(3)->Value); } QString fstart = spicecompat::normalize_value(Props.at(1)->Value); // Start freq. QString fstop = spicecompat::normalize_value(Props.at(2)->Value); // Stop freq. - s += QString("%1 %2").arg(fstart).arg(fstop); + s += QStringLiteral("%1 %2").arg(fstart).arg(fstop); return s; } @@ -199,7 +199,7 @@ QString SP_Sim::xyce_netlist() s += ".PRINT ac format=std file=spice4qucs_sparam.prn "; for (int i = 0; i < ports_num; i++) { for (int j = 0; j < ports_num; j++) { - s += QString(" sdb(%1,%2) s(%1,%2) sp(%1,%2) y(%1,%2) z(%1,%2) ").arg(i+1).arg(j+1); + s += QStringLiteral(" sdb(%1,%2) s(%1,%2) sp(%1,%2) y(%1,%2) z(%1,%2) ").arg(i+1).arg(j+1); } } s += "\n";*/ diff --git a/qucs/components/sparamfile.cpp b/qucs/components/sparamfile.cpp index 809fd6f66..ba92265eb 100644 --- a/qucs/components/sparamfile.cpp +++ b/qucs/components/sparamfile.cpp @@ -206,10 +206,10 @@ QString SParamFile::spice_netlist(bool isXyce) for(int i = 0; i < Np; i++) { QString p_in = spicecompat::normalize_node_name(Ports.at(i)->Connection->Name); QString p_com = spicecompat::normalize_node_name(Ports.at(Np)->Connection->Name); - s += QString(" %1 %2").arg(p_in).arg(p_com); + s += QStringLiteral(" %1 %2").arg(p_in).arg(p_com); } - s += QString(" %1\n").arg(s_mod); - s += QString(".MODEL %1 LIN TSTONEFILE=%2\n").arg(s_mod) + s += QStringLiteral(" %1\n").arg(s_mod); + s += QStringLiteral(".MODEL %1 LIN TSTONEFILE=%2\n").arg(s_mod) .arg(getSubcircuitFile()); } else { s += SpiceModel+Name; diff --git a/qucs/components/spicedialog.cpp b/qucs/components/spicedialog.cpp index 7376ee7d4..7b0859183 100644 --- a/qucs/components/spicedialog.cpp +++ b/qucs/components/spicedialog.cpp @@ -309,7 +309,7 @@ void SpiceDialog::slotButtBrowse() this, tr("Select a file"), currDir, - tr("SPICE netlist") + QString(" (") + QucsSettings.spiceExtensions.join(" ") + QString(");;") + tr("SPICE netlist") + QStringLiteral(" (") + QucsSettings.spiceExtensions.join(" ") + QStringLiteral(");;") + tr("All Files") + " (*.*)"); if(!s.isEmpty()) { diff --git a/qucs/components/spicefile.cpp b/qucs/components/spicefile.cpp index 3fbd7edef..ef84d255c 100644 --- a/qucs/components/spicefile.cpp +++ b/qucs/components/spicefile.cpp @@ -43,10 +43,10 @@ SpiceFile::SpiceFile() { Description = QObject::tr("SPICE netlist file"); // Property descriptions not needed, but must not be empty ! - Props.append(new Property("File", "", true, QString("x"))); - Props.append(new Property("Ports", "", false, QString("x"))); - Props.append(new Property("Sim", "yes", false, QString("x"))); - Props.append(new Property("Preprocessor", "none", false, QString("x"))); + Props.append(new Property("File", "", true, QStringLiteral("x"))); + Props.append(new Property("Ports", "", false, QStringLiteral("x"))); + Props.append(new Property("Sim", "yes", false, QStringLiteral("x"))); + Props.append(new Property("Preprocessor", "none", false, QStringLiteral("x"))); withSim = false; Model = "SPICE"; diff --git a/qucs/components/subcircuit.cpp b/qucs/components/subcircuit.cpp index ca9beae95..1bb0e92d8 100644 --- a/qucs/components/subcircuit.cpp +++ b/qucs/components/subcircuit.cpp @@ -231,7 +231,7 @@ QString Subcircuit::spice_netlist(bool) { } s += " " + misc::properName(f); for (qsizetype i = 1; i < Props.size(); i++) { - s += QString(" %1=%2").arg( + s += QStringLiteral(" %1=%2").arg( Props.at(i)->Name, spicecompat::normalize_value(Props.at(i)->Value)); } s += "\n"; diff --git a/qucs/components/switch.cpp b/qucs/components/switch.cpp index 7d242f5d2..b14c083b7 100644 --- a/qucs/components/switch.cpp +++ b/qucs/components/switch.cpp @@ -90,7 +90,7 @@ QString Switch::spice_netlist(bool) QString port1 = spicecompat::normalize_node_name(Ports.at(0)->Connection->Name); QString port2 = spicecompat::normalize_node_name(Ports.at(1)->Connection->Name); - s += QString(" %1 %2 control_net%3 0 switch_model%3\n").arg(port1).arg(port2).arg(Name); + s += QStringLiteral(" %1 %2 control_net%3 0 switch_model%3\n").arg(port1).arg(port2).arg(Name); QString init = spicecompat::normalize_value(getProperty("init")->Value); QString times = spicecompat::normalize_value(getProperty("time")->Value); @@ -123,7 +123,7 @@ QString Switch::spice_netlist(bool) evenValue = "0"; } - s += QString("V%1 control_net%1 0 DC %2 PWL(0 %2").arg(Name).arg(oddValue); + s += QStringLiteral("V%1 control_net%1 0 DC %2 PWL(0 %2").arg(Name).arg(oddValue); for (int i = 0; i < timesList.size(); i++) { QString timeStep = timesList[i].toLower(); @@ -132,29 +132,29 @@ QString Switch::spice_netlist(bool) if (i == 0) { time += timeValue - changingTime; - s += QString(" %1 %2").arg(time).arg(oddValue); + s += QStringLiteral(" %1 %2").arg(time).arg(oddValue); time += changingTime; - s += QString(" %1 %2").arg(time).arg(evenValue); + s += QStringLiteral(" %1 %2").arg(time).arg(evenValue); } else { if (i % 2 == 1) { time += timeValue- changingTime; - s += QString(" %1 %2").arg(time).arg(evenValue); + s += QStringLiteral(" %1 %2").arg(time).arg(evenValue); time += changingTime; - s += QString(" %1 %2").arg(time).arg(oddValue); + s += QStringLiteral(" %1 %2").arg(time).arg(oddValue); } else{ time += timeValue- changingTime; - s += QString(" %1 %2").arg(time).arg(oddValue); + s += QStringLiteral(" %1 %2").arg(time).arg(oddValue); time += changingTime; - s += QString(" %1 %2").arg(time).arg(evenValue); + s += QStringLiteral(" %1 %2").arg(time).arg(evenValue); } } } s += ")\n"; - s += QString(".model switch_model%1 sw vt =0.5 ron =%2 roff =%3\n").arg(Name).arg(Ron).arg(Roff); + s += QStringLiteral(".model switch_model%1 sw vt =0.5 ron =%2 roff =%3\n").arg(Name).arg(Ron).arg(Roff); return s; } diff --git a/qucs/components/tff_SR.cpp b/qucs/components/tff_SR.cpp index c89eac4a5..6b01852e9 100644 --- a/qucs/components/tff_SR.cpp +++ b/qucs/components/tff_SR.cpp @@ -193,7 +193,7 @@ QString tff_SR::spice_netlist(bool isXyce) s += " " + T + " " + CLK + " " + SET + " " + RESET + " " + Q + " " + QB; s += " " + tmp_model + "\n"; - s += QString(".model %1 d_tff(clk_delay=%2 set_delay=%2 reset_delay=%2 rise_delay=%2 fall_delay=%2)\n") + s += QStringLiteral(".model %1 d_tff(clk_delay=%2 set_delay=%2 reset_delay=%2 rise_delay=%2 fall_delay=%2)\n") .arg(tmp_model).arg(td); return s; } diff --git a/qucs/components/tr_sim.cpp b/qucs/components/tr_sim.cpp index 82f31d958..92135280a 100644 --- a/qucs/components/tr_sim.cpp +++ b/qucs/components/tr_sim.cpp @@ -104,7 +104,7 @@ QString TR_Sim::spice_netlist(bool isXyce) Npoints = Props.at(3)->Value.toDouble(); Tstep = (Tstop-Tstart)/(Npoints-1); - s += QString(" %1 %2 %3 ").arg(Tstep).arg(Tstop).arg(Tstart); + s += QStringLiteral(" %1 %2 %3 ").arg(Tstep).arg(Tstop).arg(Tstart); QString max_step = spicecompat::normalize_value(getProperty("MaxStep")->Value); if (max_step!="0") s+= max_step; diff --git a/qucs/components/vacomponent.cpp b/qucs/components/vacomponent.cpp index 5f9213d45..9b7c5d302 100644 --- a/qucs/components/vacomponent.cpp +++ b/qucs/components/vacomponent.cpp @@ -304,15 +304,15 @@ QString vacomponent::spice_netlist(bool isXyce) for(const auto pp: Ports) { s += pp->Connection->Name + " "; } - QString tmp_model = QString("mod_%1_%2").arg(Model).arg(Name); + QString tmp_model = QStringLiteral("mod_%1_%2").arg(Model).arg(Name); s += tmp_model + "\n"; QString par_str; for(int i = 0; i < Props.count(); i++) { - par_str += QString("%1=%2 ") + par_str += QStringLiteral("%1=%2 ") .arg(Props.at(i)->Name) .arg(Props.at(i)->Value); } - s += QString(".MODEL %1 %2 %3\n").arg(tmp_model) + s += QStringLiteral(".MODEL %1 %2 %3\n").arg(tmp_model) .arg(Model) .arg(par_str); return s; diff --git a/qucs/components/vccs.cpp b/qucs/components/vccs.cpp index 4196aaf0a..341d52022 100644 --- a/qucs/components/vccs.cpp +++ b/qucs/components/vccs.cpp @@ -95,11 +95,11 @@ QString VCCS::va_code() QString Vpm = vacompat::normalize_voltage(P1,P2); QString Ipm = vacompat::normalize_current(P1,P2,true); - s += QString(" %1 <+ %2 * 1e-9;\n").arg(Ipm).arg(Vpm); + s += QStringLiteral(" %1 <+ %2 * 1e-9;\n").arg(Ipm).arg(Vpm); QString Vpm2 = vacompat::normalize_voltage(P4,P3); QString Ipm2 = vacompat::normalize_current(P4,P3,true); - s += QString("%1 <+ %2 * 1e-9;\n").arg(Ipm2).arg(Vpm2); - s += QString("%1 <+ %2 * %3 ;\n").arg(Ipm2).arg(Vpm).arg(Gain); + s += QStringLiteral("%1 <+ %2 * 1e-9;\n").arg(Ipm2).arg(Vpm2); + s += QStringLiteral("%1 <+ %2 * %3 ;\n").arg(Ipm2).arg(Vpm).arg(Gain); return s; diff --git a/qucs/components/vcresistor.cpp b/qucs/components/vcresistor.cpp index ab7e5217f..af236c06e 100644 --- a/qucs/components/vcresistor.cpp +++ b/qucs/components/vcresistor.cpp @@ -101,11 +101,11 @@ QString vcresistor::netlist() QString out1 = Ports.at(2)->Connection->Name; QString out2 = Ports.at(3)->Connection->Name; QString gain = getProperty("gain")->Value; - s = QString("EDD:%1 %2 %3 %4 %5 I1=\"%1.I1\" Q1=\"%1.Q1\" I2=\"%1.I2\" Q2=\"%1.Q2\"\n").arg(EDD_Name,in1,in2,out1,out2); - s += QString("Eqn:Eqn%1I1 %1.I1=\"0\" Export=\"no\"\n").arg(EDD_Name); - s += QString("Eqn:Eqn%1Q1 %1.Q1=\"0\" Export=\"no\"\n").arg(EDD_Name); - s += QString("Eqn:Eqn%1I2 %1.I2=\"V2/(1e-20+abs(V1*(%2)))\" Export=\"no\"\n").arg(EDD_Name,gain); - s += QString("Eqn:Eqn%1Q2 %1.Q2=\"0\" Export=\"no\"\n").arg(EDD_Name); + s = QStringLiteral("EDD:%1 %2 %3 %4 %5 I1=\"%1.I1\" Q1=\"%1.Q1\" I2=\"%1.I2\" Q2=\"%1.Q2\"\n").arg(EDD_Name,in1,in2,out1,out2); + s += QStringLiteral("Eqn:Eqn%1I1 %1.I1=\"0\" Export=\"no\"\n").arg(EDD_Name); + s += QStringLiteral("Eqn:Eqn%1Q1 %1.Q1=\"0\" Export=\"no\"\n").arg(EDD_Name); + s += QStringLiteral("Eqn:Eqn%1I2 %1.I2=\"V2/(1e-20+abs(V1*(%2)))\" Export=\"no\"\n").arg(EDD_Name,gain); + s += QStringLiteral("Eqn:Eqn%1Q2 %1.Q2=\"0\" Export=\"no\"\n").arg(EDD_Name); return s; } @@ -118,7 +118,7 @@ QString vcresistor::spice_netlist(bool isXyce) QString in2 = spicecompat::normalize_node_name(Ports.at(1)->Connection->Name); QString out1 = spicecompat::normalize_node_name(Ports.at(2)->Connection->Name); QString out2 = spicecompat::normalize_node_name(Ports.at(3)->Connection->Name); - s = QString("R%1 %2 %3 R='1e-15+abs(V(%4,%5)*(%6))'\n").arg(Name, out1, out2, in1, in2, gain); + s = QStringLiteral("R%1 %2 %3 R='1e-15+abs(V(%4,%5)*(%6))'\n").arg(Name, out1, out2, in1, in2, gain); return s; } diff --git a/qucs/components/vcvs.cpp b/qucs/components/vcvs.cpp index 6eac14a2e..1d492a41f 100644 --- a/qucs/components/vcvs.cpp +++ b/qucs/components/vcvs.cpp @@ -97,11 +97,11 @@ QString VCVS::va_code() QString Vpm = vacompat::normalize_voltage(P1,P2); QString Ipm = vacompat::normalize_current(P1,P2,true); - s += QString(" %1 <+ %2 * 1e-9;\n").arg(Ipm).arg(Vpm); + s += QStringLiteral(" %1 <+ %2 * 1e-9;\n").arg(Ipm).arg(Vpm); QString Vpm2 = vacompat::normalize_voltage(P3,P4); QString Ipm2 = vacompat::normalize_current(P3,P4,true); - s += QString("%1 <+ -(%2 * 1e3);\n").arg(Ipm2).arg(Vpm2); - s += QString("%1 <+ -(%2 * 1e3* %3) ;\n").arg(Ipm2).arg(Vpm).arg(Gain); + s += QStringLiteral("%1 <+ -(%2 * 1e3);\n").arg(Ipm2).arg(Vpm2); + s += QStringLiteral("%1 <+ -(%2 * 1e3* %3) ;\n").arg(Ipm2).arg(Vpm).arg(Gain); return s; } diff --git a/qucs/components/vexp.cpp b/qucs/components/vexp.cpp index 9ae5166be..97635c5dd 100644 --- a/qucs/components/vexp.cpp +++ b/qucs/components/vexp.cpp @@ -102,6 +102,6 @@ QString vExp::spice_netlist(bool) QString Tr = spicecompat::normalize_value(Props.at(4)->Value); QString Tf = spicecompat::normalize_value(Props.at(5)->Value); - s += QString(" DC 0 EXP(%1 %2 %3 %4 %5 %6) AC 0\n").arg(U1).arg(U2).arg(T1).arg(Tr).arg(T2).arg(Tf); + s += QStringLiteral(" DC 0 EXP(%1 %2 %3 %4 %5 %6) AC 0\n").arg(U1).arg(U2).arg(T1).arg(Tr).arg(T2).arg(Tf); return s; } diff --git a/qucs/components/vfile.cpp b/qucs/components/vfile.cpp index 44ea934da..e91276bda 100644 --- a/qucs/components/vfile.cpp +++ b/qucs/components/vfile.cpp @@ -119,13 +119,13 @@ QString vFile::spice_netlist(bool isXyce) QString modname = "mod_" + Model + Name; QString p1 = spicecompat::normalize_node_name(Ports.at(0)->Connection->Name); QString p2 = spicecompat::normalize_node_name(Ports.at(1)->Connection->Name); - s += QString(" %vd([%1 %2]) %3\n").arg(p1).arg(p2).arg(modname); + s += QStringLiteral(" %vd([%1 %2]) %3\n").arg(p1).arg(p2).arg(modname); QString file = getSubcircuitFile(); QString sc = getProperty("G")->Value; QString step = "false"; QString delay = getProperty("T")->Value; if (getProperty("Interpolator")->Value != "linear") step = "true"; - s += QString(".MODEL %1 filesource (file=\"%2\" amplscale=[%3] amplstep=%4 " + s += QStringLiteral(".MODEL %1 filesource (file=\"%2\" amplscale=[%3] amplstep=%4 " "amploffset=[0] timeoffset=%5 timescale=1)\n") .arg(modname).arg(file).arg(sc).arg(step).arg(delay); diff --git a/qucs/components/volt_ac.cpp b/qucs/components/volt_ac.cpp index fdb03b880..19537692f 100644 --- a/qucs/components/volt_ac.cpp +++ b/qucs/components/volt_ac.cpp @@ -106,7 +106,7 @@ QString Volt_ac::spice_netlist(bool) QString VO = spicecompat::normalize_value(getProperty("VO")->Value); QString TD = spicecompat::normalize_value(getProperty("TD")->Value); - s += QString(" DC %1 SIN(%1 %2 %3 %4 %5 %6) AC %7 ACPHASE %8\n") + s += QStringLiteral(" DC %1 SIN(%1 %2 %3 %4 %5 %6) AC %7 ACPHASE %8\n") .arg(VO).arg(volts).arg(freq).arg(TD).arg(theta).arg(phase).arg(volts).arg(phase); return s; } diff --git a/qucs/components/volt_dc.cpp b/qucs/components/volt_dc.cpp index 0f7acd6e1..c8a84f7a1 100644 --- a/qucs/components/volt_dc.cpp +++ b/qucs/components/volt_dc.cpp @@ -68,7 +68,7 @@ QString Volt_dc::spice_netlist(bool) s += " "+ nam; // node names } - s += QString(" DC %1\n").arg(spicecompat::normalize_value(Props.at(0)->Value)); + s += QStringLiteral(" DC %1\n").arg(spicecompat::normalize_value(Props.at(0)->Value)); return s; } diff --git a/qucs/components/vprobe.cpp b/qucs/components/vprobe.cpp index ca097b2db..70e977613 100644 --- a/qucs/components/vprobe.cpp +++ b/qucs/components/vprobe.cpp @@ -80,7 +80,7 @@ QString vProbe::getProbeVariable(bool) QString vProbe::spice_netlist(bool) { - QString s = QString("E%1 %2 0 %3 %4 1.0\nR%1%2 %2 0 1E8\nR%1%3 %3 %4 1E8\n").arg(Name).arg(Name) + QString s = QStringLiteral("E%1 %2 0 %3 %4 1.0\nR%1%2 %2 0 1E8\nR%1%3 %3 %4 1E8\n").arg(Name).arg(Name) .arg(Ports.at(0)->Connection->Name).arg(Ports.at(1)->Connection->Name); return s; } diff --git a/qucs/components/vpulse.cpp b/qucs/components/vpulse.cpp index b0efe9ac1..a794bd158 100644 --- a/qucs/components/vpulse.cpp +++ b/qucs/components/vpulse.cpp @@ -101,7 +101,7 @@ QString vPulse::spice_netlist(bool) Pw = Pw - TfVal*fac; Per = 1.0e9*Pw; - s += QString(" DC 0 PULSE(%1 %2 %3 %4 %5 %6 %7) AC 0\n").arg(VL).arg(VH).arg(T1).arg(Tr).arg(Tf).arg(Pw).arg(Per); + s += QStringLiteral(" DC 0 PULSE(%1 %2 %3 %4 %5 %6 %7) AC 0\n").arg(VL).arg(VH).arg(T1).arg(Tr).arg(Tf).arg(Pw).arg(Per); return s; } diff --git a/qucs/components/vrect.cpp b/qucs/components/vrect.cpp index 9e1451cfa..7bfb86105 100644 --- a/qucs/components/vrect.cpp +++ b/qucs/components/vrect.cpp @@ -92,7 +92,7 @@ QString vRect::spice_netlist(bool) QString TH = spicecompat::normalize_value(getProperty("TH")->Value); QString TL = spicecompat::normalize_value(getProperty("TL")->Value); - s += QString(" DC 0 PULSE( %1 %2 %3 %4 %5 %6 {(%7)+(%8)+(%9)+(%10)} ) AC 0\n") + s += QStringLiteral(" DC 0 PULSE( %1 %2 %3 %4 %5 %6 {(%7)+(%8)+(%9)+(%10)} ) AC 0\n") .arg(U0).arg(U).arg(Td).arg(Tr).arg(Tf).arg(TH).arg(TH).arg(TL).arg(Tr).arg(Tf); return s; diff --git a/qucs/diagrams/diagramdialog.cpp b/qucs/diagrams/diagramdialog.cpp index b847dcb4e..d661386a3 100644 --- a/qucs/diagrams/diagramdialog.cpp +++ b/qucs/diagrams/diagramdialog.cpp @@ -804,7 +804,7 @@ DiagramDialog::DiagramDialog(Diagram *d, QWidget *parent, Graph *currentGraph) if(ColorButt) { if(!currentGraph) { QColor selectedColor(DefaultColors[GraphList->count()%NumDefaultColors]); - QString stylesheet = QString("QPushButton {background-color: %1};").arg(selectedColor.name()); + QString stylesheet = QStringLiteral("QPushButton {background-color: %1};").arg(selectedColor.name()); ColorButt->setStyleSheet(stylesheet); misc::setPickerColor(ColorButt, selectedColor); } @@ -987,7 +987,7 @@ void DiagramDialog::slotTakeVar(QTableWidgetItem* Item) g->Color = misc::getWidgetBackgroundColor(ColorButt); g->Thick = Property2->text().toInt(); QColor selectedColor(DefaultColors[GraphList->count()%NumDefaultColors]); - QString stylesheet = QString("QPushButton {background-color: %1};").arg(selectedColor.name()); + QString stylesheet = QStringLiteral("QPushButton {background-color: %1};").arg(selectedColor.name()); ColorButt->setStyleSheet(stylesheet); misc::setPickerColor(ColorButt, selectedColor); if(g->Var.right(3) == ".Vb") // harmonic balance output ? @@ -1052,7 +1052,7 @@ void DiagramDialog::SelectGraph(Graph *g) if(Diag->Name != "Tab") { if(Diag->Name != "Truth") { Property2->setText(QString::number(g->Thick)); - QString stylesheet = QString("QPushButton {background-color: %1};").arg(g->Color.name()); + QString stylesheet = QStringLiteral("QPushButton {background-color: %1};").arg(g->Color.name()); ColorButt->setStyleSheet(stylesheet); misc::setPickerColor(ColorButt,g->Color); PropertyBox->setCurrentIndex(g->Style); @@ -1106,7 +1106,7 @@ void DiagramDialog::slotDeleteGraph() if(Diag->Name != "Tab") { if(Diag->Name != "Truth") { QColor selectedColor(DefaultColors[GraphList->count()%NumDefaultColors]); - QString stylesheet = QString("QPushButton {background-color: %1};").arg(selectedColor.name()); + QString stylesheet = QStringLiteral("QPushButton {background-color: %1};").arg(selectedColor.name()); ColorButt->setStyleSheet(stylesheet); misc::setPickerColor(ColorButt,selectedColor); Property2->setText("0"); @@ -1384,7 +1384,7 @@ void DiagramDialog::slotSetColor() { QColor c = QColorDialog::getColor(misc::getWidgetBackgroundColor(ColorButt),this); if(!c.isValid()) return; - QString stylesheet = QString("QPushButton {background-color: %1};").arg(c.name()); + QString stylesheet = QStringLiteral("QPushButton {background-color: %1};").arg(c.name()); ColorButt->setStyleSheet(stylesheet); misc::setPickerColor(ColorButt,c); diff --git a/qucs/dialogs/aboutdialog.cpp b/qucs/dialogs/aboutdialog.cpp index cec145366..261adfc97 100644 --- a/qucs/dialogs/aboutdialog.cpp +++ b/qucs/dialogs/aboutdialog.cpp @@ -124,7 +124,7 @@ AboutDialog::AboutDialog(QWidget *parent) //all->setSpacing(0); QLabel *iconLabel = new QLabel(); - iconLabel->setPixmap(QPixmap(QString(":/bitmaps/hicolor/scalable/apps/qucs.svg"))); + iconLabel->setPixmap(QPixmap(QStringLiteral(":/bitmaps/hicolor/scalable/apps/qucs.svg"))); QWidget *hbox = new QWidget(); QHBoxLayout *hl = new QHBoxLayout(hbox); diff --git a/qucs/dialogs/exportdialog.cpp b/qucs/dialogs/exportdialog.cpp index 017307713..375554315 100644 --- a/qucs/dialogs/exportdialog.cpp +++ b/qucs/dialogs/exportdialog.cpp @@ -172,12 +172,12 @@ void ExportDialog::setFileName() if (fileName.isEmpty()) return; - if (selectedFilter.contains("*.png", Qt::CaseInsensitive)) filterExtension = QString(".png"); - if (selectedFilter.contains("*.jpg", Qt::CaseInsensitive)) filterExtension = QString(".jpg"); - if (selectedFilter.contains("*.svg", Qt::CaseInsensitive)) filterExtension = QString(".svg"); - if (selectedFilter.contains("*.pdf", Qt::CaseInsensitive)) filterExtension = QString(".pdf"); - if (selectedFilter.contains("*.pdf_tex", Qt::CaseInsensitive)) filterExtension = QString(".pdf_tex"); - if (selectedFilter.contains("*.eps", Qt::CaseInsensitive)) filterExtension = QString(".eps"); + if (selectedFilter.contains("*.png", Qt::CaseInsensitive)) filterExtension = QStringLiteral(".png"); + if (selectedFilter.contains("*.jpg", Qt::CaseInsensitive)) filterExtension = QStringLiteral(".jpg"); + if (selectedFilter.contains("*.svg", Qt::CaseInsensitive)) filterExtension = QStringLiteral(".svg"); + if (selectedFilter.contains("*.pdf", Qt::CaseInsensitive)) filterExtension = QStringLiteral(".pdf"); + if (selectedFilter.contains("*.pdf_tex", Qt::CaseInsensitive)) filterExtension = QStringLiteral(".pdf_tex"); + if (selectedFilter.contains("*.eps", Qt::CaseInsensitive)) filterExtension = QStringLiteral(".eps"); QFileInfo fileInfo(fileName); diff --git a/qucs/dialogs/importdialog.cpp b/qucs/dialogs/importdialog.cpp index 7646b17a1..1721df61b 100644 --- a/qucs/dialogs/importdialog.cpp +++ b/qucs/dialogs/importdialog.cpp @@ -139,7 +139,7 @@ void ImportDialog::slotBrowse() { QString s = QFileDialog::getOpenFileName( this, tr("Enter a Data File Name"), - lastImportDir.isEmpty() ? QString(".") : lastImportDir, + lastImportDir.isEmpty() ? QStringLiteral(".") : lastImportDir, tr("All known")+ " (*.s?p *.csv *.citi *.cit *.asc *.mdl *.vcd *.dat *.cir *.dat.ngspice *.dat.xyce *.dat.spopus);;"+ tr("Touchstone files")+" (*.s?p);;"+ @@ -167,7 +167,7 @@ void ImportDialog::slotSaveBrowse() { QString s = QFileDialog::getSaveFileName( this, tr("Enter a Data File Name"), - lastImportDir.isEmpty() ? QString(".") : lastImportDir, + lastImportDir.isEmpty() ? QStringLiteral(".") : lastImportDir, tr("All known")+ " (*.s?p *.csv *.dat *.cir *.net *.lib);;"+ tr("Touchstone files")+" (*.s?p);;"+ diff --git a/qucs/dialogs/librarydialog.cpp b/qucs/dialogs/librarydialog.cpp index 4aa253047..06c16c1f7 100644 --- a/qucs/dialogs/librarydialog.cpp +++ b/qucs/dialogs/librarydialog.cpp @@ -502,7 +502,7 @@ void LibraryDialog::slotSave() AbstractSpiceKernel *kern = new AbstractSpiceKernel(Doc); QStringList err_lst; if (!kern->checkSchematic(err_lst)) { - ErrText->insertPlainText(QString("Component %1 contains SPICE-incompatible components.\n" + ErrText->insertPlainText(QStringLiteral("Component %1 contains SPICE-incompatible components.\n" "Check these components: %2 \n") .arg(Doc->DocName).arg(err_lst.join("; "))); } diff --git a/qucs/dialogs/loaddialog.cpp b/qucs/dialogs/loaddialog.cpp index bb6d75020..38e103a9c 100644 --- a/qucs/dialogs/loaddialog.cpp +++ b/qucs/dialogs/loaddialog.cpp @@ -307,7 +307,7 @@ void LoadDialog::slotChangeIcon() QString line = in.readLine(); if (line.contains("BitmapFile")){ QString change = - QString(" \"BitmapFile\" : \"%1\",").arg(newIcon); + QStringLiteral(" \"BitmapFile\" : \"%1\",").arg(newIcon); QString stmp = change + "\n"; ba.append(stmp.toLatin1()); } diff --git a/qucs/dialogs/matchdialog.cpp b/qucs/dialogs/matchdialog.cpp index 7caa09815..521bfef38 100644 --- a/qucs/dialogs/matchdialog.cpp +++ b/qucs/dialogs/matchdialog.cpp @@ -856,15 +856,15 @@ QString MatchDialog::calcMatchingLC(double r_real, double r_imag, double Z0, QString laddercode = "", series_element, shunt_element; // serial component if (X1 < 0.0) // capacitance ? - series_element = QString("CS:%1;").arg(-1.0 / Omega / X1); + series_element = QStringLiteral("CS:%1;").arg(-1.0 / Omega / X1); else // inductance - series_element = QString("LS:%1;").arg(X1 / Omega); + series_element = QStringLiteral("LS:%1;").arg(X1 / Omega); // parallel component if (X2 < 0.0) // inductance ? - shunt_element = QString("LP:%1;").arg(-1.0 / Omega / X2); + shunt_element = QStringLiteral("LP:%1;").arg(-1.0 / Omega / X2); else // capacitance - shunt_element = QString("CP:%1;").arg(X2 / Omega); + shunt_element = QStringLiteral("CP:%1;").arg(X2 / Omega); (r_real < 0) ? laddercode = shunt_element + series_element : laddercode = series_element + shunt_element; @@ -924,8 +924,8 @@ bool MatchDialog::calcMatchingCircuit(double S11real, double S11imag, double Z0, if (SP_Block) { laddercode.append("S2P:Freq;"); - laddercode.prepend(QString("P1:%1;").arg(Z0)); - laddercode.append(QString("ZL:%1#%2;").arg(RL).arg(XL)); + laddercode.prepend(QStringLiteral("P1:%1;").arg(Z0)); + laddercode.append(QStringLiteral("ZL:%1#%2;").arg(RL).arg(XL)); } else // Add tags instead of a S-param simulation { laddercode.prepend("LBL:Port 1;"); @@ -1023,15 +1023,15 @@ bool MatchDialog::calc2PortMatch(double S11real, double S11imag, double S22real, OutputLadderCode = flipLadderCode(OutputLadderCode); if (SP_Block) { - InputLadderCode.prepend(QString("S2P:%1;").arg( + InputLadderCode.prepend(QStringLiteral("S2P:%1;").arg( Freq)); // Add the s-param simulation to the circuit code - InputLadderCode.prepend(QString("P1:%1;").arg(Z1)); // Port 1 - OutputLadderCode.append(QString("P2:%1;").arg(Z2)); // Port 2 + InputLadderCode.prepend(QStringLiteral("P1:%1;").arg(Z1)); // Port 1 + OutputLadderCode.append(QStringLiteral("P2:%1;").arg(Z2)); // Port 2 } else { // Use labels instead of the S-param simulation - InputLadderCode.prepend(QString("LBL:Port 1;")); // Port 1 - OutputLadderCode.append(QString("LBL:Port 2;")); // Port 2 + InputLadderCode.prepend(QStringLiteral("LBL:Port 1;")); // Port 1 + OutputLadderCode.append(QStringLiteral("LBL:Port 2;")); // Port 2 } - QString laddercode = InputLadderCode + QString("DEV:0") + OutputLadderCode; + QString laddercode = InputLadderCode + QStringLiteral("DEV:0") + OutputLadderCode; int x_pos = 0; SchematicParser(laddercode, x_pos, Freq, Substrate, microsyn); @@ -1256,22 +1256,22 @@ QString MatchDialog::calcSingleStub(double r_real, double r_imag, double Z0, // String code QString laddercode; if ((open_short) && (!BalancedStubs)) - laddercode = QString("OL:%1#%2;TL:%1#%3;") + laddercode = QStringLiteral("OL:%1#%2;TL:%1#%3;") .arg(Z0) .arg(lstub) .arg(d); // Line + Open stub if ((open_short) && (BalancedStubs)) - laddercode = QString("OU:%1#%2;OL:%1#%2;TL:%1#%3;") + laddercode = QStringLiteral("OU:%1#%2;OL:%1#%2;TL:%1#%3;") .arg(Z0) .arg(lstub) .arg(d); // Open circuit balanced stubs if ((!open_short) && (!BalancedStubs)) - laddercode = QString("SL:%1#%2;TL:%1#%3;") + laddercode = QStringLiteral("SL:%1#%2;TL:%1#%3;") .arg(Z0) .arg(lstub) .arg(d); // Line + Short circuited stub if ((!open_short) && (BalancedStubs)) - laddercode = QString("SU:%1#%2;SL:%1#%2;TL:%1#%3;") + laddercode = QStringLiteral("SU:%1#%2;SL:%1#%2;TL:%1#%3;") .arg(Z0) .arg(lstub) .arg(d); // Short circuited balanced stubs @@ -1348,25 +1348,25 @@ QString MatchDialog::calcDoubleStub(double r_real, double r_imag, double Z0, QString laddercode; if ((open_short) && (BalancedStubs)) - laddercode = QString("OU:%1#%2;OL:%1#%2;TL:%1#%3;OU:%1#%4;OL:%1#%4;") + laddercode = QStringLiteral("OU:%1#%2;OL:%1#%2;TL:%1#%3;OU:%1#%4;OL:%1#%4;") .arg(Z0) .arg(lstub2) .arg(d) .arg(lstub1); if ((open_short) && (!BalancedStubs)) - laddercode = QString("OL:%1#%2;TL:%1#%3;OL:%1#%4;") + laddercode = QStringLiteral("OL:%1#%2;TL:%1#%3;OL:%1#%4;") .arg(Z0) .arg(lstub2) .arg(d) .arg(lstub1); if ((!open_short) && (BalancedStubs)) - laddercode = QString("SU:%1#%2;SL:%1#%2;TL:%1#%3;SU:%1#%4;SL:%1#%4;") + laddercode = QStringLiteral("SU:%1#%2;SL:%1#%2;TL:%1#%3;SU:%1#%4;SL:%1#%4;") .arg(Z0) .arg(lstub2) .arg(d) .arg(lstub1); if ((!open_short) && (!BalancedStubs)) - laddercode = QString("SL:%1#%2;TL:%1#%3;SL:%1#%4;") + laddercode = QStringLiteral("SL:%1#%2;TL:%1#%3;SL:%1#%4;") .arg(Z0) .arg(lstub2) .arg(d) @@ -1413,7 +1413,7 @@ QString MatchDialog::calcBinomialLines(double r_real, double r_imag, double Z0, Ci = BinomialCoeffs(order - 1, i - 1); Zi = exp(log(Zaux) + (Ci / pow(2, order - 1)) * log(RL / Z0)); Zaux = Zi; - laddercode += QString("TL:%1#%2;").arg(Zi).arg(l4); + laddercode += QStringLiteral("TL:%1#%2;").arg(Zi).arg(l4); } return laddercode; } @@ -1507,7 +1507,7 @@ QString MatchDialog::calcChebyLines(double r_real, double r_imag, double Z0, (RL < Z0) ? Zi = exp(log(Zaux) - gamma * w[i]) : Zi = exp(log(Zaux) + gamma * w[i]); // When RL RS) // Flip string { @@ -1581,7 +1581,7 @@ QString MatchDialog::calcMatchingLambda8Lambda4(double r_real, double r_imag, r2z(RL, XL, Z0); double Zmm = sqrt(RL * RL + XL * XL); double Zm = sqrt((Z0 * RL * Zmm) / (Zmm - XL)); - return QString("TL:%1#%2;TL:%3#%4;").arg(Zm).arg(l4).arg(Zmm).arg(l8); + return QStringLiteral("TL:%1#%2;TL:%3#%4;").arg(Zm).arg(l4).arg(Zmm).arg(l8); } // Given a string code of inductors, capacitors and transmission lines, it @@ -1653,17 +1653,17 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, // components, wires and paintings in the schematic if (!tag.compare("P1")) // Port 1 component { - componentstr += QString("\n") .arg(misc::num2str(value, 3, "Ohm")) // reference impedance .arg(x_pos); - componentstr += QString("\n").arg(x_pos); - wirestr += QString("<%1 -60 %1 -120>\n").arg(x_pos); - wirestr += QString("<%1 -120 %2 -120>\n").arg(x_pos).arg(x_pos + 120); + componentstr += QStringLiteral("\n").arg(x_pos); + wirestr += QStringLiteral("<%1 -60 %1 -120>\n").arg(x_pos); + wirestr += QStringLiteral("<%1 -120 %2 -120>\n").arg(x_pos).arg(x_pos + 120); x_pos += 120; } else if (!tag.compare("LBL")) // Label { - paintingstr += QString("\n") + paintingstr += QStringLiteral("\n") .arg(x_pos) .arg(component); // Add 'Port 1' or 'Port 2' label x_pos += 50; @@ -1671,36 +1671,36 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, // from P1 because of the wiring) { x_pos += 100; - componentstr += QString("\n") .arg(misc::num2str(value, 3, "Ohm")) // reference impedance .arg(x_pos); - componentstr += QString("\n").arg(x_pos); - wirestr += QString("<%1 -60 %1 -120>\n").arg(x_pos); // Vertical wire - wirestr += QString("<%1 -120 %2 -120>\n") + componentstr += QStringLiteral("\n").arg(x_pos); + wirestr += QStringLiteral("<%1 -60 %1 -120>\n").arg(x_pos); // Vertical wire + wirestr += QStringLiteral("<%1 -120 %2 -120>\n") .arg(x_pos - 100) .arg(x_pos); // Horizontal wire } else if (!tag.compare("DEV")) // Device painting { - paintingstr += QString("\n") + paintingstr += QStringLiteral("\n") .arg(x_pos + 70); // Add 'Device' label paintingstr += - QString("\n") + QStringLiteral("\n") .arg(x_pos + 50); // Box surrounding the 'Device' label x_pos += 200; } else if (!tag.compare("LS")) // Series inductor { QString val = misc::num2str(value, 3, "H"); // Add prefix, unit - 3 significant digits - componentstr += QString("\n") .arg(x_pos + 60) .arg(val); - wirestr += QString("<%1 -120 %2 -120 " + wirestr += QStringLiteral("<%1 -120 %2 -120 " " 0 0 0 " ">\n") .arg(x_pos) .arg(x_pos + 30); - wirestr += QString("<%1 -120 %2 -120 " + wirestr += QStringLiteral("<%1 -120 %2 -120 " " 0 0 0 " ">\n") .arg(x_pos + 90) @@ -1709,16 +1709,16 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, } else if (!tag.compare("CS")) // Series capacitor { QString val = misc::num2str(value, 3, "F"); // Add prefix, unit - 3 significant digits - componentstr += QString("\n") .arg(x_pos + 60) .arg(val); - wirestr += QString("<%1 -120 %2 -120 " + wirestr += QStringLiteral("<%1 -120 %2 -120 " " 0 0 0 " ">\n") .arg(x_pos) .arg(x_pos + 30); - wirestr += QString("<%1 -120 %2 -120 " + wirestr += QStringLiteral("<%1 -120 %2 -120 " " 0 0 0 " ">\n") .arg(x_pos + 90) @@ -1727,16 +1727,16 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, } else if (!tag.compare("LP")) // Shunt inductor { QString val = misc::num2str(value, 3, "H"); // Add prefix, unit - 3 significant digits - componentstr += QString("\n").arg(x_pos); - componentstr += QString("\n").arg(x_pos); + componentstr += QStringLiteral("\n") .arg(x_pos) .arg(val); - wirestr += QString("<%1 -60 %1 -120 " + wirestr += QStringLiteral("<%1 -60 %1 -120 " " 0 0 0 " ">\n") .arg(x_pos); - wirestr += QString("<%1 -120 %2 -120 " + wirestr += QStringLiteral("<%1 -120 %2 -120 " " 0 0 0 " ">\n") .arg(x_pos - 20) @@ -1745,16 +1745,16 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, } else if (!tag.compare("CP")) // Shunt capacitor { QString val = misc::num2str(value, 3, "F"); // Add prefix, unit - 3 significant digits - componentstr += QString("\n").arg(x_pos); - componentstr += QString("\n").arg(x_pos); + componentstr += QStringLiteral("\n") .arg(x_pos) .arg(val); - wirestr += QString("<%1 -60 %1 -120 " + wirestr += QStringLiteral("<%1 -60 %1 -120 " " 0 0 0 " ">\n") .arg(x_pos); - wirestr += QString("<%1 -120 %2 -120 " + wirestr += QStringLiteral("<%1 -120 %2 -120 " " 0 0 0 " ">\n") .arg(x_pos - 20) @@ -1771,7 +1771,7 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, QString val_length = misc::num2str(value2 / sqrt(er), 3, "m"); // Add prefix, unit - 3 significant digits componentstr += - QString("\n") .arg(val_width) .arg(val_length) @@ -1781,18 +1781,18 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, QString val_impedance = misc::num2str(value, 3, "Ohm"); // Add prefix, unit - 3 significant digits QString val_length = misc::num2str(value2, 3, "m"); - componentstr += QString("\n") .arg(val_impedance) .arg(val_length) .arg(x_pos + 60); } - wirestr += QString("<%1 -120 %2 -120 " + wirestr += QStringLiteral("<%1 -120 %2 -120 " " 0 0 0 " ">\n") .arg(x_pos) .arg(x_pos + 30); - wirestr += QString("<%1 -120 %2 -120 " + wirestr += QStringLiteral("<%1 -120 %2 -120 " " 0 0 0 " ">\n") .arg(x_pos + 90) @@ -1809,7 +1809,7 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, // Add prefix, unit - 3 significant digits QString val_length = misc::num2str(value2 / sqrt(er), 3, "m"); componentstr += - QString("\n") .arg(val_width) .arg(val_length) @@ -1819,17 +1819,17 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, QString val_impedance = misc::num2str(value, 3, "Ohm"); // Add prefix, unit - 3 significant digits QString val_length = misc::num2str(value2, 3, "m"); - componentstr += QString("\n") .arg(val_impedance) .arg(val_length) .arg(x_pos); } - wirestr += QString("<%1 -150 %1 -120 " + wirestr += QStringLiteral("<%1 -150 %1 -120 " " 0 0 0 " ">\n") .arg(x_pos); - wirestr += QString("<%1 -120 %2 -120 " + wirestr += QStringLiteral("<%1 -120 %2 -120 " " 0 0 0 " ">\n") .arg(x_pos) @@ -1847,7 +1847,7 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, // Add suffix mm, cm - 3 significant digits QString val_length = misc::num2str(value2 / sqrt(er), 3, "m"); componentstr += - QString("\n") .arg(val_width) .arg(val_length) @@ -1857,17 +1857,17 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, QString val_impedance = misc::num2str(value, 3, "Ohm"); // Add suffix mm, cm - 3 significant digits QString val_length = misc::num2str(value2, 3, "m"); - componentstr += QString("\n") .arg(val_impedance) .arg(val_length) .arg(x_pos); } - wirestr += QString("<%1 -90 %1 -120 " + wirestr += QStringLiteral("<%1 -90 %1 -120 " " 0 0 0 " ">\n") .arg(x_pos); - wirestr += QString("<%1 -120 %2 -120 " + wirestr += QStringLiteral("<%1 -120 %2 -120 " " 0 0 0 " ">\n") .arg(x_pos - 20) @@ -1882,7 +1882,7 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, QString val_width = misc::num2str(width, 3, "m"); QString val_length = misc::num2str(value2 / sqrt(er), 3, "m"); componentstr += - QString("\n") .arg(val_width) .arg(val_length) @@ -1890,18 +1890,18 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, } else { QString val_impedance = misc::num2str(value, 3, "Ohm"); QString val_length = misc::num2str(value2, 3, "m"); - componentstr += QString("\n") .arg(val_impedance) .arg(val_length) .arg(x_pos); } - componentstr += QString("\n").arg(x_pos); - wirestr += QString("<%1 -150 %1 -120 " + componentstr += QStringLiteral("\n").arg(x_pos); + wirestr += QStringLiteral("<%1 -150 %1 -120 " " 0 0 0 " ">\n") .arg(x_pos); - wirestr += QString("<%1 -120 %2 -120 " + wirestr += QStringLiteral("<%1 -120 %2 -120 " " 0 0 0 " ">\n") .arg(x_pos) @@ -1917,7 +1917,7 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, QString val_width = misc::num2str(width, 3, "m"); QString val_length = misc::num2str(value2 / sqrt(er), 3, "m"); componentstr += - QString("\n") .arg(val_width) .arg(val_length) @@ -1925,18 +1925,18 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, } else { QString val_impedance = misc::num2str(value, 3, "Ohm"); QString val_length = misc::num2str(value2, 3, "m"); - componentstr += QString("\n") .arg(val_impedance) .arg(val_length) .arg(x_pos); } - componentstr += QString("\n").arg(x_pos); - wirestr += QString("<%1 -90 %1 -120 " + componentstr += QStringLiteral("\n").arg(x_pos); + wirestr += QStringLiteral("<%1 -90 %1 -120 " " 0 0 0 " ">\n") .arg(x_pos); - wirestr += QString("<%1 -120 %2 -120 " + wirestr += QStringLiteral("<%1 -120 %2 -120 " " 0 0 0 " ">\n") .arg(x_pos - 20) @@ -1952,16 +1952,16 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, QString val_freq_stop = misc::num2str(freq_stop, 3, "Hz"); componentstr += - QString("<.SP SP1 1 0 100 0 67 0 0 \"lin\" 1 \"%1\" 1 \"%2\" 1 " + QStringLiteral("<.SP SP1 1 0 100 0 67 0 0 \"lin\" 1 \"%1\" 1 \"%2\" 1 " "\"300\" 1 \"no\" 0 \"1\" 0 \"2\" 0>\n") .arg((val_freq_start)) .arg((val_freq_stop)); if (laddercode.indexOf("P2") == -1) // One port simulation - componentstr += QString("\n"); else // Two ports simulation - componentstr += QString("\n"); } else if (!tag.compare("ZL")) // Complex load @@ -1979,11 +1979,11 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, "\n") .arg(x_pos) .arg(val_Res); - componentstr += QString("\n") + componentstr += QStringLiteral("\n") .arg(x_pos) .arg(val_Cap); paintingstr += - QString("\n") + QStringLiteral("\n") .arg(x_pos) .arg(QChar(0x2126)) .arg(misc::num2str(Freq, 3, "Hz")) @@ -1998,11 +1998,11 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, "\n") .arg(x_pos) .arg(val_Res); - componentstr += QString("\n") + componentstr += QStringLiteral("\n") .arg(x_pos) .arg(val_Ind); paintingstr += - QString("\n") + QStringLiteral("\n") .arg(x_pos) .arg(QChar(0x2126)) .arg(misc::num2str(Freq, 3, "Hz")) @@ -2016,8 +2016,8 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, "\n") .arg(x_pos) .arg(val_Res); - wirestr += QString("<%1 -60 %1 -120>\n").arg(x_pos); // Vertical wire - paintingstr += QString("\n") + wirestr += QStringLiteral("<%1 -60 %1 -120>\n").arg(x_pos); // Vertical wire + paintingstr += QStringLiteral("\n") .arg(x_pos) .arg(QChar(0x2126)) .arg(misc::num2str(Freq, 3, "Hz")) @@ -2030,9 +2030,9 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, "\n") .arg(x_pos) .arg(val_Ind); - wirestr += QString("<%1 -60 %1 -120>\n").arg(x_pos); // Vertical wire + wirestr += QStringLiteral("<%1 -60 %1 -120>\n").arg(x_pos); // Vertical wire paintingstr += - QString("\n") + QStringLiteral("\n") .arg(x_pos) .arg(QChar(0x2126)) .arg(misc::num2str(Freq, 3, "Hz")) @@ -2046,22 +2046,22 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, "\n") .arg(x_pos) .arg(val_Cap); - wirestr += QString("<%1 -60 %1 -120>\n").arg(x_pos); // Vertical wire + wirestr += QStringLiteral("<%1 -60 %1 -120>\n").arg(x_pos); // Vertical wire paintingstr += - QString("\n") + QStringLiteral("\n") .arg(x_pos) .arg(QChar(0x2126)) .arg(misc::num2str(Freq, 3, "Hz")) .arg(fabs(XL)); } - wirestr += QString("<%1 -120 %2 -120>\n") + wirestr += QStringLiteral("<%1 -120 %2 -120>\n") .arg(x_pos - 100) .arg(x_pos); // Horizontal wire - componentstr += QString("\n").arg(x_pos); + componentstr += QStringLiteral("\n").arg(x_pos); // Box surrounding the load paintingstr += - QString("\n") + QStringLiteral("\n") .arg(x_pos - 30); } } @@ -2069,7 +2069,7 @@ void MatchDialog::SchematicParser(QString laddercode, int &x_pos, double Freq, // Substrate if (microsyn) componentstr += - QString("\n") .arg(Substrate.er) .arg(Substrate.height * 1e3) diff --git a/qucs/dialogs/simmessage.cpp b/qucs/dialogs/simmessage.cpp index defb46961..ab84aba98 100644 --- a/qucs/dialogs/simmessage.cpp +++ b/qucs/dialogs/simmessage.cpp @@ -609,7 +609,7 @@ void SimMessage::startSimulator() // append process PATH // insert Qucs bin dir, so ASCO can find qucsator env.insert("PATH", env.value("PATH") + sep + QucsSettings.BinDir ); - if (Program.endsWith(QString("asco") + executableSuffix)) { + if (Program.endsWith(QStringLiteral("asco") + executableSuffix)) { #ifdef Q_OS_UNIX QDir tempDir(QucsSettings.tempFilesDir.absolutePath()); QString tmpdir = tempDir.filePath("qucs_ascodir"); // ASCO doesn't accept qucsator_rf name diff --git a/qucs/dialogs/sweepdialog.cpp b/qucs/dialogs/sweepdialog.cpp index ef5825553..a6ee96dff 100644 --- a/qucs/dialogs/sweepdialog.cpp +++ b/qucs/dialogs/sweepdialog.cpp @@ -261,7 +261,7 @@ Graph* SweepDialog::setBiasPoints(QHash *NodeVals) else pn->Name = "0A"; } else { - QString src_nam = QString("V"+pc->Name+"#branch").toLower(); + QString src_nam = QStringLiteral("V%1#branch").arg(pc->Name).toLower(); if (NodeVals->contains(src_nam)) { pn->Name = misc::num2str(NodeVals->value(src_nam))+"A"; } else pn->Name = "0A"; diff --git a/qucs/extsimkernels/abstractspicekernel.cpp b/qucs/extsimkernels/abstractspicekernel.cpp index 81ec8748c..af985f10f 100644 --- a/qucs/extsimkernels/abstractspicekernel.cpp +++ b/qucs/extsimkernels/abstractspicekernel.cpp @@ -207,7 +207,7 @@ void AbstractSpiceKernel::startNetlist(QTextStream &stream, bool xyce) else continue; QString ic = pw->Label->initValue; if (!ic.isEmpty()) { - QString ic_str = QString(".IC v(%1)=%2\n").arg(label).arg(ic); + QString ic_str = QStringLiteral(".IC v(%1)=%2\n").arg(label).arg(ic); stream<Label->initValue; if (!ic.isEmpty()) { - QString ic_str = QString(".IC v(%1)=%2\n").arg(label).arg(ic); + QString ic_str = QStringLiteral(".IC v(%1)=%2\n").arg(label).arg(ic); stream<DocName); - header = QString(".SUBCKT %1 ").arg(misc::properName(f)); + header = QStringLiteral(".SUBCKT %1 ").arg(misc::properName(f)); QList< QPair > ports; if(!prepareSpiceNetlist(stream,true)) { @@ -1277,14 +1277,14 @@ void AbstractSpiceKernel::convertToQucsData(const QString &qucs_dataset) if (hasDblParSweep) indep_cnt = sim_points.count()/(swp_var_val.count()*swp_var2_val.count()); else indep_cnt = sim_points.count()/swp_var_val.count(); if (!indep.isEmpty()) { - ds_stream<\n").arg(indep).arg(indep_cnt); // output indep var: TODO: parameter sweep + ds_stream<\n").arg(indep).arg(indep_cnt); // output indep var: TODO: parameter sweep for (int i=0;i\n"; } - ds_stream<\n").arg(swp_var).arg(swp_var_val.count()); + ds_stream<\n").arg(swp_var).arg(swp_var_val.count()); for (const QString& val : swp_var_val) { ds_stream<\n").arg(swp_var2).arg(swp_var2_val.count()); + ds_stream<\n").arg(swp_var2).arg(swp_var2_val.count()); for (const QString& val : swp_var2_val) { ds_stream<\n").arg(indep).arg(sim_points.count()); // output indep var: TODO: parameter sweep + ds_stream<\n").arg(indep).arg(sim_points.count()); // output indep var: TODO: parameter sweep for (auto& sim_point : sim_points) { ds_stream<\n").arg(var_list.at(i)).arg(sim_points.count()); - else ds_stream<\n").arg(var_list.at(i)).arg(indep); + if (indep.isEmpty()) ds_stream<\n").arg(var_list.at(i)).arg(sim_points.count()); + else ds_stream<\n").arg(var_list.at(i)).arg(indep); for (auto& sim_point : sim_points) { if (isComplex) { double re=sim_point.at(2*(i-1)+1); diff --git a/qucs/extsimkernels/customsimdialog.cpp b/qucs/extsimkernels/customsimdialog.cpp index c658ff0a8..40850cd37 100644 --- a/qucs/extsimkernels/customsimdialog.cpp +++ b/qucs/extsimkernels/customsimdialog.cpp @@ -186,7 +186,7 @@ void CustomSimDialog::slotFindVars() } for(QStringList::iterator it = vars.begin();it != vars.end(); it++) { - if (!(it->endsWith("#branch"))) *it=QString("V(%1)").arg(*it); + if (!(it->endsWith("#branch"))) *it=QStringLiteral("V(%1)").arg(*it); } diff --git a/qucs/extsimkernels/ngspice.cpp b/qucs/extsimkernels/ngspice.cpp index cc20a9ec0..95145cd95 100644 --- a/qucs/extsimkernels/ngspice.cpp +++ b/qucs/extsimkernels/ngspice.cpp @@ -78,7 +78,7 @@ void Ngspice::createNetlist(QTextStream &stream, int , bool found = findMathFuncInc(mathf_inc); // Let to simulate schematic without mathfunc.inc file if (found && QucsSettings.DefaultSimulator != spicecompat::simSpiceOpus) - stream<DocComps.count() ; i++ ) { @@ -260,8 +260,8 @@ void Ngspice::createNetlist(QTextStream &stream, int , outputs.append("spice4qucs." + sim_name + ".cir.noise"); if ( hasParSWP ) { // Set necessary plot number to output Noise spectrum // each step of parameter sweep creates new couple of noise plots - spiceNetlist.append(QString("let noise_%1 = 2*%1+1\n").arg(cnt_var)); - spiceNetlist.append(QString("setplot noise$&noise_%1\n").arg(cnt_var)); + spiceNetlist.append(QStringLiteral("let noise_%1 = 2*%1+1\n").arg(cnt_var)); + spiceNetlist.append(QStringLiteral("setplot noise$&noise_%1\n").arg(cnt_var)); } else { // Set Noise1 plot to output noise spectrum spiceNetlist.append("setplot noise1\n"); } @@ -289,8 +289,8 @@ void Ngspice::createNetlist(QTextStream &stream, int , } else if ( sim_typ == ".FFT" ) { freqSims++; spiceNetlist.append(pc->getSpiceNetlist()); - spiceNetlist.append(QString("linearize %1\n").arg(nods)); - spiceNetlist.append(QString("fft %1\n").arg(nods)); + spiceNetlist.append(QStringLiteral("linearize %1\n").arg(nods)); + spiceNetlist.append(QStringLiteral("fft %1\n").arg(nods)); } else if ( sim_typ == ".DC" ) { dcSims++; spiceNetlist.append(pc->getSpiceNetlist()); @@ -317,7 +317,7 @@ void Ngspice::createNetlist(QTextStream &stream, int , if ( sim_typ == ".DC" ) { QString out = "spice4qucs." + sim_name + ".ngspice.dc.print"; - spiceNetlist.append(QString("print %1 > %2\n").arg(nods).arg(out)); + spiceNetlist.append(QStringLiteral("print %1 > %2\n").arg(nods).arg(out)); outputs.append(out); } else if ( (sim_typ != ".PZ") && (sim_typ != ".SENS") && (sim_typ != ".SENS_AC") ) { nods = nods.simplified(); @@ -325,13 +325,13 @@ void Ngspice::createNetlist(QTextStream &stream, int , QString basenam = "spice4qucs"; QString filename; if ( hasParSWP && hasDblSWP ) - filename = QString("%1.%2._swp_swp.plot").arg(basenam).arg(sim_name); + filename = QStringLiteral("%1.%2._swp_swp.plot").arg(basenam).arg(sim_name); else if ( hasParSWP ) - filename = QString("%1.%2._swp.plot").arg(basenam).arg(sim_name); + filename = QStringLiteral("%1.%2._swp.plot").arg(basenam).arg(sim_name); else - filename = QString("%1.%2.plot").arg(basenam).arg(sim_name); + filename = QStringLiteral("%1.%2.plot").arg(basenam).arg(sim_name); filename.replace(' ', '_'); // Ngspice cannot understand spaces in filename - spiceNetlist.append(QString("write %1 %2\n").arg(filename).arg(nods)); + spiceNetlist.append(QStringLiteral("write %1 %2\n").arg(filename).arg(nods)); outputs.append(filename); } } @@ -481,7 +481,7 @@ void Ngspice::slotSimulate() //startNgSpice(tmp_path); SimProcess->setWorkingDirectory(workdir); qDebug()<size(); it->chop(cnt-idx); if (suffix.toUpper().startsWith("I")) - *it = QString("V%1#branch").arg(*it); - else *it = QString("V(%2)").arg(*it); + *it = QStringLiteral("V%1#branch").arg(*it); + else *it = QStringLiteral("V(%2)").arg(*it); } } else if ((*it=="frequency")||(*it=="acfrequency")) { sim = "ac"; @@ -253,7 +253,7 @@ void spicecompat::convertNodeNames(QStringList &tokens, QString &sim) } QString spicecompat::normalize_node_name(QString nod) { - return (nod == "gnd") ? QString("0") : nod; + return (nod == "gnd") ? QStringLiteral("0") : nod; } /* @@ -342,8 +342,8 @@ QString spicecompat::getSubcktName(const QString& subfilename) */ QString spicecompat::convert_sweep_type(const QString& sweep) { - if (sweep=="lin") return QString("lin"); - if (sweep=="log") return QString("dec"); + if (sweep=="lin") return QStringLiteral("lin"); + if (sweep=="log") return QStringLiteral("dec"); return QString(); } diff --git a/qucs/extsimkernels/verilogawriter.cpp b/qucs/extsimkernels/verilogawriter.cpp index ec4d8443f..7f2d691cb 100644 --- a/qucs/extsimkernels/verilogawriter.cpp +++ b/qucs/extsimkernels/verilogawriter.cpp @@ -56,10 +56,10 @@ QString vacompat::normalize_voltage(QString &plus, QString &minus, bool left_sid { QString s; if (plus=="gnd") { - if (left_side) s = QString("V(%1)").arg(minus); - else s = QString("(-V(%1))").arg(minus); - } else if (minus=="gnd") s = QString("V(%1)").arg(plus); - else s = QString("V(%1,%2)").arg(plus).arg(minus); + if (left_side) s = QStringLiteral("V(%1)").arg(minus); + else s = QStringLiteral("(-V(%1))").arg(minus); + } else if (minus=="gnd") s = QStringLiteral("V(%1)").arg(plus); + else s = QStringLiteral("V(%1,%2)").arg(plus).arg(minus); return s; } @@ -67,10 +67,10 @@ QString vacompat::normalize_current(QString &plus, QString &minus, bool left_sid { QString s; if (plus=="gnd") { - if (left_side) s = QString("I(%1)").arg(minus); - else s = QString("(-I(%1))").arg(minus); - } else if (minus=="gnd") s = QString("I(%1)").arg(plus); - else s = QString("I(%1,%2)").arg(plus).arg(minus); + if (left_side) s = QStringLiteral("I(%1)").arg(minus); + else s = QStringLiteral("(-I(%1))").arg(minus); + } else if (minus=="gnd") s = QStringLiteral("I(%1)").arg(plus); + else s = QStringLiteral("I(%1,%2)").arg(plus).arg(minus); return s; } @@ -179,9 +179,9 @@ bool VerilogAwriter::createVA_module(QTextStream &stream, Schematic *sch) base.remove('-').remove(' '); nodes.removeAll("gnd"); // Exclude ground node - stream<SymbolPaints.first(); pi != 0; pi = sch->SymbolPaints.next()) diff --git a/qucs/extsimkernels/xyce.cpp b/qucs/extsimkernels/xyce.cpp index 62eb26232..1dc48cf4d 100644 --- a/qucs/extsimkernels/xyce.cpp +++ b/qucs/extsimkernels/xyce.cpp @@ -149,7 +149,7 @@ void Xyce::createNetlist(QTextStream &stream, int , QStringList &simulations, nods.clear(); for (auto& nod :vars) { if (!nod.startsWith("I(")) { - nods += QString("v(%1) ").arg(nod); + nods += QStringLiteral("v(%1) ").arg(nod); } else { nods += nod + " "; } @@ -157,7 +157,7 @@ void Xyce::createNetlist(QTextStream &stream, int , QStringList &simulations, if (DC_OP_only) { stream<<".OP\n"; - stream<setWorkingDirectory(workdir); - QString cmd = QString("%1 %2 \"%3\"").arg(simulator_cmd,simulator_parameters,file); + QString cmd = QStringLiteral("%1 %2 \"%3\"").arg(simulator_cmd,simulator_parameters,file); QStringList cmd_args = misc::parseCmdArgs(cmd); QString xyce_cmd = cmd_args.at(0); cmd_args.removeAt(0); @@ -445,7 +445,7 @@ void Xyce::setParallel(bool par) QString xyce_par = QucsSettings.XyceParExecutable; xyce_par.replace("%p",QString::number(QucsSettings.NProcs)); simulator_cmd = xyce_par; - simulator_parameters = simulator_parameters + QString(" -a "); + simulator_parameters = simulator_parameters + QStringLiteral(" -a "); } else { simulator_cmd = "\"" + QucsSettings.XyceExecutable + "\""; simulator_parameters = simulator_parameters + " -a "; diff --git a/qucs/main.cpp b/qucs/main.cpp index c788dec8d..0366ffa69 100644 --- a/qucs/main.cpp +++ b/qucs/main.cpp @@ -657,9 +657,9 @@ void createDocData() { compData << "Category; " + category; // 001_data.csv - CSV file with component data - QString ID = QString("%1").arg(num,3,'d',0,'0'); + QString ID = QStringLiteral("%1").arg(num,3,'d',0,'0'); QString objDataFile; - objDataFile = QString("%1_data.csv").arg( ID ) ; + objDataFile = QStringLiteral("%1_data.csv").arg( ID ) ; QFile file(curDir + objDataFile); if (!file.open(QFile::WriteOnly | QFile::Text)) return; @@ -670,9 +670,9 @@ void createDocData() { QStringList compProps; compProps << "# Note: auto-generated file (changes will be lost on update)"; - compProps << QString("# %1; %2; %3; %4").arg( "Name", "Value", "Display", "Description"); + compProps << QStringLiteral("# %1; %2; %3; %4").arg( "Name", "Value", "Display", "Description"); for (Property *prop : c->Props) { - compProps << QString("%1; \"%2\"; %3; \"%4\"").arg( + compProps << QStringLiteral("%1; \"%2\"; %3; \"%4\"").arg( prop->Name, prop->Value, prop->display?"yes":"no", @@ -680,7 +680,7 @@ void createDocData() { } // 001_props.csv - CSV file with component properties - QString objPropFile = QString("%1_prop.csv").arg( ID ) ; + QString objPropFile = QStringLiteral("%1_prop.csv").arg( ID ) ; QFile fileProps(curDir + objPropFile ); if (!fileProps.open(QFile::WriteOnly | QFile::Text)) return; @@ -898,7 +898,7 @@ int main(int argc, char *argv[]) lang = loc.name(); // lang = QTextCodec::locale(); } - tor.load( QString("qucs_") + lang, QucsSettings.LangDir); + tor.load( QStringLiteral("qucs_") + lang, QucsSettings.LangDir); QApplication::installTranslator( &tor ); // This seems to be necessary on a few system to make strtod() diff --git a/qucs/misc.cpp b/qucs/misc.cpp index d48efe73f..e111fe058 100644 --- a/qucs/misc.cpp +++ b/qucs/misc.cpp @@ -41,7 +41,7 @@ QString misc::getWindowTitle() { - QString title = QString("%1 %2").arg(QUCS_NAME,PACKAGE_VERSION); + QString title = QStringLiteral("%1 %2").arg(QUCS_NAME,PACKAGE_VERSION); if (title.endsWith(".0")) { title.chop(2); } @@ -152,7 +152,7 @@ QString misc::StringNum(double num, char form, int Precision) QString misc::StringNiceNum(double num) { char Format[6] = "%.8e"; - if(fabs(num) < 1e-250) return QString("0"); // avoid many problems + if(fabs(num) < 1e-250) return QStringLiteral("0"); // avoid many problems if(fabs(log10(fabs(num))) < 3.0) Format[3] = 'g'; int a = 0; @@ -745,7 +745,7 @@ bool VersionTriplet::operator<=(const VersionTriplet& v2) { } QString VersionTriplet::toString() { - return QString("%1.%2.%3").arg(major).arg(minor).arg(patch); + return QStringLiteral("%1.%2.%3").arg(major).arg(minor).arg(patch); } // This function can parse TeX sequences _{…} and ^{…} in given string and diff --git a/qucs/mouseactions.cpp b/qucs/mouseactions.cpp index ca5acfcd9..f66f9dccd 100644 --- a/qucs/mouseactions.cpp +++ b/qucs/mouseactions.cpp @@ -1091,7 +1091,7 @@ void MouseActions::MPressSelect(Schematic *Doc, QMouseEvent *Event, float fX, fl if (focusElement) // print define value in hex, see element.h qDebug() << "MPressSelect: focusElement->Type" - << QString("0x%1").arg(focusElement->Type, 0, 16); + << QStringLiteral("0x%1").arg(focusElement->Type, 0, 16); else qDebug() << "MPressSelect"; @@ -2268,7 +2268,7 @@ void MouseActions::MPressTune(Schematic *Doc, QMouseEvent *Event, float fX, floa if (focusElement) // print define value in hex, see element.h qDebug() << "MPressTune: focusElement->Type" - << QString("0x%1").arg(focusElement->Type, 0, 16); + << QStringLiteral("0x%1").arg(focusElement->Type, 0, 16); else qDebug() << "MPressTune"; diff --git a/qucs/paintings/arrow.cpp b/qucs/paintings/arrow.cpp index a049d811d..f5200df7e 100644 --- a/qucs/paintings/arrow.cpp +++ b/qucs/paintings/arrow.cpp @@ -197,7 +197,7 @@ QString Arrow::saveJSON() { // arrow not allowed in symbols, thus we use line here QString s = - QString("{\"type\" : \"arrow\", " + QStringLiteral("{\"type\" : \"arrow\", " "\"x1\" : %1, \"y1\" : %2, \"x2\" : %3, \"y2\" : %4, " "\"color\" : \"%5\", \"thick\" : %6, \"style\" : \"%7\"},"). arg(cx+x1).arg(cy+y1).arg(cx+x2).arg(cy+y2). diff --git a/qucs/paintings/ellipse.cpp b/qucs/paintings/ellipse.cpp index b6f0a743f..e9efd525d 100644 --- a/qucs/paintings/ellipse.cpp +++ b/qucs/paintings/ellipse.cpp @@ -201,7 +201,7 @@ QString qucs::Ellipse::saveJSON() QString ("\"colorfill\" : \"%1\", \"stylefill\" : \"%2\""). arg(Brush.color().name()).arg(toBrushString(Brush.style())) : ""; QString s = - QString("{\"type\" : \"ellipse\", " + QStringLiteral("{\"type\" : \"ellipse\", " "\"x\" : %1, \"y\" : %2, \"w\" : %3, \"h\" : %4," "\"color\" : \"%5\", \"thick\" : %6, \"style\" : \"%7\", %8},"). arg(cx).arg(cy).arg(x2).arg(y2). diff --git a/qucs/paintings/graphictext.cpp b/qucs/paintings/graphictext.cpp index 2c3eef749..16d6169d6 100644 --- a/qucs/paintings/graphictext.cpp +++ b/qucs/paintings/graphictext.cpp @@ -180,7 +180,7 @@ QString GraphicText::saveCpp() QString t = Text; misc::convert2ASCII(t); - QString s = QString("new Text (%1, %2, \"%3\", QColor (\"%4\"), %5, %6, %7)") + QString s = QStringLiteral("new Text (%1, %2, \"%3\", QColor (\"%4\"), %5, %6, %7)") .arg(cx) .arg(cy) .arg(t) @@ -197,7 +197,7 @@ QString GraphicText::saveJSON() QString t = Text; misc::convert2ASCII(t); - QString s = QString("{\"type\" : \"graphictext\", " + QString s = QStringLiteral("{\"type\" : \"graphictext\", " "\"x\" : %1, \"y\" : %2, \"s\" : \"%3\", " "\"color\" : \"%4\", \"size\" : %5, \"cos\" : %6, \"sin\" : %7},") .arg(cx) diff --git a/qucs/paintings/rectangle.cpp b/qucs/paintings/rectangle.cpp index 990898b75..9a1625cb8 100644 --- a/qucs/paintings/rectangle.cpp +++ b/qucs/paintings/rectangle.cpp @@ -201,7 +201,7 @@ QString qucs::Rectangle::saveJSON() arg(Brush.color().name()).arg(toBrushString(Brush.style())) : ""; QString s = - QString("{\"type\" : \"rectangle\", " + QStringLiteral("{\"type\" : \"rectangle\", " "\"x\" : %1, \"y\" : %2, \"w\" : %3, \"h\" : %4, " "\"color\" : \"%5\", \"thick\" : %6, \"style\" : \"%7\", %8},"). arg(cx).arg(cy).arg(x2).arg(y2). diff --git a/qucs/qucs.cpp b/qucs/qucs.cpp index 15140f538..5cde9164d 100644 --- a/qucs/qucs.cpp +++ b/qucs/qucs.cpp @@ -131,7 +131,7 @@ QucsApp::QucsApp() tr("Verilog Sources") + " (*.v);;" + tr("Verilog-A Sources") + " (*.va);;" + tr("Octave Scripts") + " (*.m *.oct);;" + - tr("Spice Files") + QString(" (") + QucsSettings.spiceExtensions.join(" ") + QString(");;") + + tr("Spice Files") + QStringLiteral(" (") + QucsSettings.spiceExtensions.join(" ") + QStringLiteral(");;") + tr("Any File")+" (*)"; //updateSchNameHash(); @@ -265,7 +265,7 @@ void QucsApp::initView() // set application icon // APPLE sets the QApplication icon with Info.plist #ifndef __APPLE__ - setWindowIcon (QPixmap(QString(":/bitmaps/hicolor/scalable/apps/qucs.svg"))); + setWindowIcon (QPixmap(QStringLiteral(":/bitmaps/hicolor/scalable/apps/qucs.svg"))); #else // setUnifiedTitleAndToolBarOnMac(true); setStyleSheet("QToolButton { padding: 0px; }"); @@ -1271,7 +1271,7 @@ void QucsApp::slotCMenuCopy() if(ok && !s.isEmpty()) { if (!s.endsWith(suffix)) { - s += QString(".") + suffix; + s += QStringLiteral(".") + suffix; } if (QFile::exists(dir.filePath(s))) { //check New Name exists @@ -1321,7 +1321,7 @@ void QucsApp::slotCMenuRename() if(ok && !s.isEmpty()) { if (!s.endsWith(suffix)) { - s += QString(".") + suffix; + s += QStringLiteral(".") + suffix; } QDir dir(QucsSettings.QucsWorkDir.path()); if(!dir.rename(filename, s)) { @@ -3621,7 +3621,7 @@ void QucsApp::slotBuildVAModule() messageDock->builderTabs->setTabText(0,tr("XSPICE")); messageDock->builderTabs->setTabIcon(1,QPixmap()); messageDock->admsOutput-> - insertPlainText(QString("Creating XSPICE source file: %1\n").arg(filename)); + insertPlainText(QStringLiteral("Creating XSPICE source file: %1\n").arg(filename)); errs += cmgen->getLog(); if (errs.isEmpty()) { messageDock->admsOutput->insertPlainText(tr("Success!\n")); diff --git a/qucs/qucs_actions.cpp b/qucs/qucs_actions.cpp index a52d63752..e94300757 100644 --- a/qucs/qucs_actions.cpp +++ b/qucs/qucs_actions.cpp @@ -1022,7 +1022,7 @@ void QucsApp::slotAddToProject() QStringList List = QFileDialog::getOpenFileNames(this, tr("Select files to copy"), - lastDir.isEmpty() ? QString(".") : lastDir, QucsFileFilter); + lastDir.isEmpty() ? QStringLiteral(".") : lastDir, QucsFileFilter); if(List.isEmpty()) { statusBar()->showMessage(tr("No files copied."), 2000); @@ -1360,12 +1360,12 @@ void QucsApp::slotExportGraphAsCsv() } /*QString s = Q3FileDialog::getSaveFileName( - lastDir.isEmpty() ? QString(".") : lastDir, + lastDir.isEmpty() ? QStringLiteral(".") : lastDir, tr("CSV file")+" (*.csv);;" + tr("Any File")+" (*)", this, 0, tr("Enter an Output File Name")); */ QString s = QFileDialog::getSaveFileName(this, tr("Enter an Output File Name"), - lastDir.isEmpty() ? QString(".") : lastDir, tr("CSV file")+" (*.csv);;" + tr("Any File")+" (*)"); + lastDir.isEmpty() ? QStringLiteral(".") : lastDir, tr("CSV file")+" (*.csv);;" + tr("Any File")+" (*)"); if(s.isEmpty()) return; @@ -1611,16 +1611,16 @@ void QucsApp::slotBuildModule() // admsXml emits C++ QStringList Arguments; Arguments << "-f" << QDir::toNativeSeparators(include.absoluteFilePath("va2cpp.makefile")) - << QString("ADMSXML=%1").arg(admsXml) - << QString("PREFIX=%1").arg(QDir::toNativeSeparators(prefix.absolutePath())) - << QString("MODEL=%1").arg(vaModule); + << QStringLiteral("ADMSXML=%1").arg(admsXml) + << QStringLiteral("PREFIX=%1").arg(QDir::toNativeSeparators(prefix.absolutePath())) + << QStringLiteral("MODEL=%1").arg(vaModule); QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); env.insert("PATH", env.value("PATH") ); builder->setProcessEnvironment(env); // prepend command to log - QString cmdString = QString("%1 %2\n").arg(make, Arguments.join(" ")); + QString cmdString = QStringLiteral("%1 %2\n").arg(make, Arguments.join(" ")); messageDock->admsOutput->appendPlainText(cmdString); qDebug() << "Command :" << make << Arguments.join(" "); @@ -1643,12 +1643,12 @@ void QucsApp::slotBuildModule() Arguments.clear(); Arguments << "-f" << QDir::toNativeSeparators(include.absoluteFilePath("cpp2lib.makefile")) - << QString("PREFIX=\"%1\"").arg(QDir::toNativeSeparators(prefix.absolutePath())) - << QString("PROJDIR=\"%1\"").arg(QDir::toNativeSeparators(workDir)) - << QString("MODEL=%1").arg(vaModule); + << QStringLiteral("PREFIX=\"%1\"").arg(QDir::toNativeSeparators(prefix.absolutePath())) + << QStringLiteral("PROJDIR=\"%1\"").arg(QDir::toNativeSeparators(workDir)) + << QStringLiteral("MODEL=%1").arg(vaModule); // prepend command to log - cmdString = QString("%1 %2\n").arg(make, Arguments.join(" ")); + cmdString = QStringLiteral("%1 %2\n").arg(make, Arguments.join(" ")); messageDock->cppOutput->appendPlainText(cmdString); builder->start(make, Arguments); @@ -1702,7 +1702,7 @@ void QucsApp::buildWithOpenVAF() builder->setProcessEnvironment(env); // prepend command to log - QString cmdString = QString("%1 %2\n").arg(openVAF, Arguments.join(" ")); + QString cmdString = QStringLiteral("%1 %2\n").arg(openVAF, Arguments.join(" ")); messageDock->admsOutput->appendPlainText(cmdString); qDebug() << "Command :" << openVAF << Arguments.join(" "); diff --git a/qucs/qucslib_common.h b/qucs/qucslib_common.h index e8f3ae051..fa6d78f74 100644 --- a/qucs/qucslib_common.h +++ b/qucs/qucslib_common.h @@ -406,11 +406,11 @@ inline int parseSPICEComponentLibrary (QString libPath, ComponentLibrary &librar ComponentLibraryItem comp; comp.name = lin.section(" ",1,1,QString::SectionSkipEmpty); // Form fake component definition - comp.modelString = QString("") + comp.modelString = QStringLiteral("") .arg(filename).arg(comp.name).arg(pars); - comp.definition += QString("\n").arg(comp.name); + comp.definition += QStringLiteral("\n").arg(comp.name); comp.definition += "\n"; - comp.definition += QString("%1 device from %2 library").arg(comp.name).arg(library.name); + comp.definition += QStringLiteral("%1 device from %2 library").arg(comp.name).arg(library.name); comp.definition += "\n"; comp.definition += "\n"; comp.definition += lin + "\n.ends\n"; @@ -448,22 +448,22 @@ inline int parseSPICEComponentLibrary (QString libPath, ComponentLibrary &librar ComponentLibraryItem comp; comp.name = lin.section(" ",1,1,QString::SectionSkipEmpty); // Form fake component definition - QString m_str = QString("M_%1_1").arg(comp.name); - comp.modelString = QString("3) comp.modelString += QString(" \"Line_%1=%2\" %3") + if (lin_cnt>3) comp.modelString += QStringLiteral(" \"Line_%1=%2\" %3") .arg(lin_cnt+1).arg(p).arg(visible); - else comp.modelString += QString(" \"%1\" %2").arg(p).arg(visible); + else comp.modelString += QStringLiteral(" \"%1\" %2").arg(p).arg(visible); lin_cnt++; visible = "0"; } comp.modelString += ">"; - comp.definition += QString("\n").arg(comp.name); + comp.definition += QStringLiteral("\n").arg(comp.name); comp.definition += "\n"; - comp.definition += QString("%1 model from %2 library\n" + comp.definition += QStringLiteral("%1 model from %2 library\n" "This component is model-only (.MODEL).\n" "No subcircuit definition!\n" "Use appropriate device to attach this model.").arg(comp.name).arg(library.name); diff --git a/qucs/schematic_file.cpp b/qucs/schematic_file.cpp index 34a0330c2..732e0346a 100644 --- a/qucs/schematic_file.cpp +++ b/qucs/schematic_file.cpp @@ -323,21 +323,21 @@ int Schematic::savePropsJSON() stream << "{\n"; - stream << QString(" \"description\" : \"%1 verilog device\",\n").arg(module); + stream << QStringLiteral(" \"description\" : \"%1 verilog device\",\n").arg(module); stream << " \"property\" : [\n"; auto name = prop_name.begin(); auto val = prop_val.begin(); for(; name != prop_name.end(); name++,val++) { - stream << QString(" { \"name\" : \"%1\", \"value\" : \"%2\", \"display\" : \"false\", \"desc\" : \"-\"},\n") + stream << QStringLiteral(" { \"name\" : \"%1\", \"value\" : \"%2\", \"display\" : \"false\", \"desc\" : \"-\"},\n") .arg(*name,*val); } stream << " ],\n\n"; stream << " \"tx\" : 4,\n"; stream << " \"ty\" : 4,\n"; - stream << QString(" \"Model\" : \"%1\",\n").arg(module); + stream << QStringLiteral(" \"Model\" : \"%1\",\n").arg(module); stream << " \"NetName\" : \"T\",\n\n\n"; - stream << QString(" \"SymName\" : \"%1\",\n").arg(module); - stream << QString(" \"BitmapFile\" : \"%1\",\n").arg(module); + stream << QStringLiteral(" \"SymName\" : \"%1\",\n").arg(module); + stream << QStringLiteral(" \"BitmapFile\" : \"%1\",\n").arg(module); stream << "}"; @@ -443,23 +443,23 @@ int Schematic::savePropsJSON() stream << "{\n"; - stream << QString(" \"description\" : \"%1 verilog device\",\n").arg(module); + stream << QStringLiteral(" \"description\" : \"%1 verilog device\",\n").arg(module); stream << " \"property\" : [\n"; auto name = prop_name.begin(); auto val = prop_val.begin(); auto disp = prop_disp.begin(); auto desc = prop_desc.begin(); for(; name != prop_name.end(); name++,val++,disp++,desc++) { - stream << QString(" { \"name\" : \"%1\", \"value\" : \"%2\", \"display\" : \"%3\", \"desc\" : \"%4\"},\n") + stream << QStringLiteral(" { \"name\" : \"%1\", \"value\" : \"%2\", \"display\" : \"%3\", \"desc\" : \"%4\"},\n") .arg(*name,*val,*disp,*desc); } stream << " ],\n\n"; stream << " \"tx\" : 4,\n"; stream << " \"ty\" : 4,\n"; - stream << QString(" \"Model\" : \"%1\",\n").arg(module); + stream << QStringLiteral(" \"Model\" : \"%1\",\n").arg(module); stream << " \"NetName\" : \"T\",\n\n\n"; - stream << QString(" \"SymName\" : \"%1\",\n").arg(module); - stream << QString(" \"BitmapFile\" : \"%1\",\n").arg(module); + stream << QStringLiteral(" \"SymName\" : \"%1\",\n").arg(module); + stream << QStringLiteral(" \"BitmapFile\" : \"%1\",\n").arg(module); stream << "}"; @@ -711,12 +711,12 @@ int Schematic::saveDocument() // how to capture [warning]? need to modify admsXml? // TODO put stdout, stderr into a dock window, not messagebox if (!builder.waitForFinished()) { - QString cmdString = QString("%1 %2\n\n").arg(admsXml, Arguments.join(" ")); + QString cmdString = QStringLiteral("%1 %2\n\n").arg(admsXml, Arguments.join(" ")); cmdString = cmdString + builder.errorString(); QMessageBox::critical(this, tr("Error"), cmdString); } else { - QString cmdString = QString("%1 %2\n\n").arg(admsXml, Arguments.join(" ")); + QString cmdString = QStringLiteral("%1 %2\n\n").arg(admsXml, Arguments.join(" ")); cmdString = cmdString + builder.readAll(); QMessageBox::information(this, tr("Status"), cmdString); } @@ -2053,7 +2053,7 @@ bool Schematic::createSubNetlist(QTextStream *stream, int& countInit, AbstractSpiceKernel *kern = new AbstractSpiceKernel(this); QStringList err_lst; if (!kern->checkSchematic(err_lst)) { - QString s = QString("Subcircuit %1 contains SPICE-incompatible components.\n" + QString s = QStringLiteral("Subcircuit %1 contains SPICE-incompatible components.\n" "Check these components: %2 \n") .arg(this->DocName).arg(err_lst.join("; ")); ErrText->insertPlainText(s); diff --git a/qucs/spicecomponents/BJT_SPICE.cpp b/qucs/spicecomponents/BJT_SPICE.cpp index 1ed509e6d..68fda672c 100644 --- a/qucs/spicecomponents/BJT_SPICE.cpp +++ b/qucs/spicecomponents/BJT_SPICE.cpp @@ -202,11 +202,11 @@ QString BJT_SPICE::spice_netlist(bool) QString Q_Line_4= Props.at(6)->Value; QString Q_Line_5= Props.at(7)->Value; - if( Q.length() > 0) s += QString("%1").arg(Q); - if( Q_Line_2.length() > 0 ) s += QString("\n%1").arg(Q_Line_2); - if( Q_Line_3.length() > 0 ) s += QString("\n%1").arg(Q_Line_3); - if( Q_Line_4.length() > 0 ) s += QString("\n%1").arg(Q_Line_4); - if( Q_Line_5.length() > 0 ) s += QString("\n%1").arg(Q_Line_5); + if( Q.length() > 0) s += QStringLiteral("%1").arg(Q); + if( Q_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(Q_Line_2); + if( Q_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(Q_Line_3); + if( Q_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(Q_Line_4); + if( Q_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(Q_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/C_SPICE.cpp b/qucs/spicecomponents/C_SPICE.cpp index f530fcceb..c4d3f3c01 100644 --- a/qucs/spicecomponents/C_SPICE.cpp +++ b/qucs/spicecomponents/C_SPICE.cpp @@ -125,11 +125,11 @@ QString C_SPICE::spice_netlist(bool) QString C_Line_4= Props.at(3)->Value; QString C_Line_5= Props.at(4)->Value; - if( C.length() > 0) s += QString("%1").arg(C); - if( C_Line_2.length() > 0 ) s += QString("\n%1").arg(C_Line_2); - if( C_Line_3.length() > 0 ) s += QString("\n%1").arg(C_Line_3); - if( C_Line_4.length() > 0 ) s += QString("\n%1").arg(C_Line_4); - if( C_Line_5.length() > 0 ) s += QString("\n%1").arg(C_Line_5); + if( C.length() > 0) s += QStringLiteral("%1").arg(C); + if( C_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(C_Line_2); + if( C_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(C_Line_3); + if( C_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(C_Line_4); + if( C_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(C_Line_5); s += "\n"; return s; } diff --git a/qucs/spicecomponents/DIODE_SPICE.cpp b/qucs/spicecomponents/DIODE_SPICE.cpp index e56f750c7..745d65d01 100644 --- a/qucs/spicecomponents/DIODE_SPICE.cpp +++ b/qucs/spicecomponents/DIODE_SPICE.cpp @@ -130,11 +130,11 @@ QString DIODE_SPICE::spice_netlist(bool) QString D_Line_4= Props.at(3)->Value; QString D_Line_5= Props.at(4)->Value; - if( D.length() > 0) s += QString("%1").arg(D); - if( D_Line_2.length() > 0 ) s += QString("\n%1").arg(D_Line_2); - if( D_Line_3.length() > 0 ) s += QString("\n%1").arg(D_Line_3); - if( D_Line_4.length() > 0 ) s += QString("\n%1").arg(D_Line_4); - if( D_Line_5.length() > 0 ) s += QString("\n%1").arg(D_Line_5); + if( D.length() > 0) s += QStringLiteral("%1").arg(D); + if( D_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(D_Line_2); + if( D_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(D_Line_3); + if( D_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(D_Line_4); + if( D_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(D_Line_5); s += "\n"; return s; } diff --git a/qucs/spicecomponents/Icouple.cpp b/qucs/spicecomponents/Icouple.cpp index 7d7e76543..68a0f49d6 100644 --- a/qucs/spicecomponents/Icouple.cpp +++ b/qucs/spicecomponents/Icouple.cpp @@ -113,8 +113,8 @@ QString Icouple::spice_netlist(bool) QString A= Props.at(0)->Value; QString A_Line_2= Props.at(1)->Value; - if( A.length() > 0) s += QString("%1").arg(A); - if( A_Line_2.length() > 0 ) s += QString("\n%1").arg(A_Line_2); + if( A.length() > 0) s += QStringLiteral("%1").arg(A); + if( A_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(A_Line_2); s += "\n"; return s; diff --git a/qucs/spicecomponents/K_SPICE.cpp b/qucs/spicecomponents/K_SPICE.cpp index c68a21013..d07e71cb9 100644 --- a/qucs/spicecomponents/K_SPICE.cpp +++ b/qucs/spicecomponents/K_SPICE.cpp @@ -87,7 +87,7 @@ QString K_SPICE::spice_netlist(bool) QString Ind2 = Props.at(1) ->Value; QString K = spicecompat::normalize_value(Props.at(2)->Value); - s+= QString(" %1 %2 %3 \n").arg(Ind1).arg(Ind2).arg(K); + s+= QStringLiteral(" %1 %2 %3 \n").arg(Ind1).arg(Ind2).arg(K); return s; } diff --git a/qucs/spicecomponents/LTL_SPICE.cpp b/qucs/spicecomponents/LTL_SPICE.cpp index 65e3863ef..77ea1842f 100644 --- a/qucs/spicecomponents/LTL_SPICE.cpp +++ b/qucs/spicecomponents/LTL_SPICE.cpp @@ -109,17 +109,17 @@ QString LTL_SPICE::spice_netlist(bool) if( Z0.trimmed().length() > 0) { - s += QString(" Z0=%1").arg(Z0); + s += QStringLiteral(" Z0=%1").arg(Z0); } if( Td.trimmed().length() > 0 ) { - s += QString(" Td=%1").arg(Td); + s += QStringLiteral(" Td=%1").arg(Td); } if( Freq.trimmed().length() > 0 ) { - s += QString(" F=%1").arg(Freq); + s += QStringLiteral(" F=%1").arg(Freq); } if( Nl.trimmed().length() > 0 ) { - s += QString(" NL=%1").arg(Nl); + s += QStringLiteral(" NL=%1").arg(Nl); } - s += QString(" IC=%5, %6, %7, %8 \n").arg(V1).arg(I1).arg(V2).arg(I2); + s += QStringLiteral(" IC=%5, %6, %7, %8 \n").arg(V1).arg(I1).arg(V2).arg(I2); return s; } diff --git a/qucs/spicecomponents/LTRA_SPICE.cpp b/qucs/spicecomponents/LTRA_SPICE.cpp index 7e0651ba9..e0e9b7137 100644 --- a/qucs/spicecomponents/LTRA_SPICE.cpp +++ b/qucs/spicecomponents/LTRA_SPICE.cpp @@ -109,11 +109,11 @@ QString LTRA_SPICE::spice_netlist(bool) QString O_Line_4= Props.at(3)->Value; QString O_Line_5= Props.at(4)->Value; - if( O.length() > 0) s += QString("%1").arg(O); - if( O_Line_2.length() > 0 ) s += QString("\n%1").arg(O_Line_2); - if( O_Line_3.length() > 0 ) s += QString("\n%1").arg(O_Line_3); - if( O_Line_4.length() > 0 ) s += QString("\n%1").arg(O_Line_4); - if( O_Line_5.length() > 0 ) s += QString("\n%1").arg(O_Line_5); + if( O.length() > 0) s += QStringLiteral("%1").arg(O); + if( O_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(O_Line_2); + if( O_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(O_Line_3); + if( O_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(O_Line_4); + if( O_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(O_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/L_SPICE.cpp b/qucs/spicecomponents/L_SPICE.cpp index 1fb50b1da..6534d3ac3 100644 --- a/qucs/spicecomponents/L_SPICE.cpp +++ b/qucs/spicecomponents/L_SPICE.cpp @@ -98,11 +98,11 @@ QString L_SPICE::spice_netlist(bool) QString L_Line_4= Props.at(3)->Value; QString L_Line_5= Props.at(4)->Value; - if( L.length() > 0) s += QString("%1").arg(L); - if( L_Line_2.length() > 0 ) s += QString("\n%1").arg(L_Line_2); - if( L_Line_3.length() > 0 ) s += QString("\n%1").arg(L_Line_3); - if( L_Line_4.length() > 0 ) s += QString("\n%1").arg(L_Line_4); - if( L_Line_5.length() > 0 ) s += QString("\n%1").arg(L_Line_5); + if( L.length() > 0) s += QStringLiteral("%1").arg(L); + if( L_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(L_Line_2); + if( L_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(L_Line_3); + if( L_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(L_Line_4); + if( L_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(L_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/MESFET_SPICE.cpp b/qucs/spicecomponents/MESFET_SPICE.cpp index 539c234f2..207dc38b1 100644 --- a/qucs/spicecomponents/MESFET_SPICE.cpp +++ b/qucs/spicecomponents/MESFET_SPICE.cpp @@ -101,11 +101,11 @@ QString MESFET_SPICE::spice_netlist(bool) QString Z_Line_4= Props.at(3)->Value; QString Z_Line_5= Props.at(4)->Value; - if( Z.length() > 0) s += QString("%1").arg(Z); - if( Z_Line_2.length() > 0 ) s += QString("\n%1").arg(Z_Line_2); - if( Z_Line_3.length() > 0 ) s += QString("\n%1").arg(Z_Line_3); - if( Z_Line_4.length() > 0 ) s += QString("\n%1").arg(Z_Line_4); - if( Z_Line_5.length() > 0 ) s += QString("\n%1").arg(Z_Line_5); + if( Z.length() > 0) s += QStringLiteral("%1").arg(Z); + if( Z_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(Z_Line_2); + if( Z_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(Z_Line_3); + if( Z_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(Z_Line_4); + if( Z_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(Z_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/MOS_SPICE.cpp b/qucs/spicecomponents/MOS_SPICE.cpp index 7c33b985e..a32f4db95 100644 --- a/qucs/spicecomponents/MOS_SPICE.cpp +++ b/qucs/spicecomponents/MOS_SPICE.cpp @@ -240,11 +240,11 @@ QString MOS_SPICE::spice_netlist(bool) QString M_Line_4= Props.at(6)->Value; QString M_Line_5= Props.at(7)->Value; - if( M.length() > 0) s += QString("%1").arg(M); - if( M_Line_2.length() > 0 ) s += QString("\n%1").arg(M_Line_2); - if( M_Line_3.length() > 0 ) s += QString("\n%1").arg(M_Line_3); - if( M_Line_4.length() > 0 ) s += QString("\n%1").arg(M_Line_4); - if( M_Line_5.length() > 0 ) s += QString("\n%1").arg(M_Line_5); + if( M.length() > 0) s += QStringLiteral("%1").arg(M); + if( M_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(M_Line_2); + if( M_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(M_Line_3); + if( M_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(M_Line_4); + if( M_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(M_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/NJF_SPICE.cpp b/qucs/spicecomponents/NJF_SPICE.cpp index f11150b5b..70cf26db8 100644 --- a/qucs/spicecomponents/NJF_SPICE.cpp +++ b/qucs/spicecomponents/NJF_SPICE.cpp @@ -108,11 +108,11 @@ QString NJF_SPICE::spice_netlist(bool) QString J_Line_4= Props.at(3)->Value; QString J_Line_5= Props.at(4)->Value; - if( J.length() > 0) s += QString("%1").arg(J); - if( J_Line_2.length() > 0 ) s += QString("\n%1").arg(J_Line_2); - if( J_Line_3.length() > 0 ) s += QString("\n%1").arg(J_Line_3); - if( J_Line_4.length() > 0 ) s += QString("\n%1").arg(J_Line_4); - if( J_Line_5.length() > 0 ) s += QString("\n%1").arg(J_Line_5); + if( J.length() > 0) s += QStringLiteral("%1").arg(J); + if( J_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(J_Line_2); + if( J_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(J_Line_3); + if( J_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(J_Line_4); + if( J_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(J_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/NMOS_SPICE.cpp b/qucs/spicecomponents/NMOS_SPICE.cpp index 3e483754e..302c86dad 100644 --- a/qucs/spicecomponents/NMOS_SPICE.cpp +++ b/qucs/spicecomponents/NMOS_SPICE.cpp @@ -117,11 +117,11 @@ QString NMOS_SPICE::spice_netlist(bool) QString M_Line_4= Props.at(3)->Value; QString M_Line_5= Props.at(4)->Value; - if( M.length() > 0) s += QString("%1").arg(M); - if( M_Line_2.length() > 0 ) s += QString("\n%1").arg(M_Line_2); - if( M_Line_3.length() > 0 ) s += QString("\n%1").arg(M_Line_3); - if( M_Line_4.length() > 0 ) s += QString("\n%1").arg(M_Line_4); - if( M_Line_5.length() > 0 ) s += QString("\n%1").arg(M_Line_5); + if( M.length() > 0) s += QStringLiteral("%1").arg(M); + if( M_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(M_Line_2); + if( M_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(M_Line_3); + if( M_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(M_Line_4); + if( M_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(M_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/NPN_SPICE.cpp b/qucs/spicecomponents/NPN_SPICE.cpp index 3844a98cd..d2dea4ff3 100644 --- a/qucs/spicecomponents/NPN_SPICE.cpp +++ b/qucs/spicecomponents/NPN_SPICE.cpp @@ -109,11 +109,11 @@ QString NPN_SPICE::spice_netlist(bool) QString Q_Line_4= Props.at(3)->Value; QString Q_Line_5= Props.at(4)->Value; - if( Q.length() > 0) s += QString("%1").arg(Q); - if( Q_Line_2.length() > 0 ) s += QString("\n%1").arg(Q_Line_2); - if( Q_Line_3.length() > 0 ) s += QString("\n%1").arg(Q_Line_3); - if( Q_Line_4.length() > 0 ) s += QString("\n%1").arg(Q_Line_4); - if( Q_Line_5.length() > 0 ) s += QString("\n%1").arg(Q_Line_5); + if( Q.length() > 0) s += QStringLiteral("%1").arg(Q); + if( Q_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(Q_Line_2); + if( Q_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(Q_Line_3); + if( Q_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(Q_Line_4); + if( Q_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(Q_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/PJF_SPICE.cpp b/qucs/spicecomponents/PJF_SPICE.cpp index bd9fd03a0..631258300 100644 --- a/qucs/spicecomponents/PJF_SPICE.cpp +++ b/qucs/spicecomponents/PJF_SPICE.cpp @@ -108,11 +108,11 @@ QString PJF_SPICE::spice_netlist(bool) QString J_Line_4= Props.at(3)->Value; QString J_Line_5= Props.at(4)->Value; - if( J.length() > 0) s += QString("%1").arg(J); - if( J_Line_2.length() > 0 ) s += QString("\n%1").arg(J_Line_2); - if( J_Line_3.length() > 0 ) s += QString("\n%1").arg(J_Line_3); - if( J_Line_4.length() > 0 ) s += QString("\n%1").arg(J_Line_4); - if( J_Line_5.length() > 0 ) s += QString("\n%1").arg(J_Line_5); + if( J.length() > 0) s += QStringLiteral("%1").arg(J); + if( J_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(J_Line_2); + if( J_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(J_Line_3); + if( J_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(J_Line_4); + if( J_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(J_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/PMF_MESFET_SPICE.cpp b/qucs/spicecomponents/PMF_MESFET_SPICE.cpp index 5339a4bb5..199975c91 100644 --- a/qucs/spicecomponents/PMF_MESFET_SPICE.cpp +++ b/qucs/spicecomponents/PMF_MESFET_SPICE.cpp @@ -101,11 +101,11 @@ QString PMF_MESFET_SPICE::spice_netlist(bool) QString Z_Line_4= Props.at(3)->Value; QString Z_Line_5= Props.at(4)->Value; - if( Z.length() > 0) s += QString("%1").arg(Z); - if( Z_Line_2.length() > 0 ) s += QString("\n%1").arg(Z_Line_2); - if( Z_Line_3.length() > 0 ) s += QString("\n%1").arg(Z_Line_3); - if( Z_Line_4.length() > 0 ) s += QString("\n%1").arg(Z_Line_4); - if( Z_Line_5.length() > 0 ) s += QString("\n%1").arg(Z_Line_5); + if( Z.length() > 0) s += QStringLiteral("%1").arg(Z); + if( Z_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(Z_Line_2); + if( Z_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(Z_Line_3); + if( Z_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(Z_Line_4); + if( Z_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(Z_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/PMOS_SPICE.cpp b/qucs/spicecomponents/PMOS_SPICE.cpp index bebc6896d..039d4928f 100644 --- a/qucs/spicecomponents/PMOS_SPICE.cpp +++ b/qucs/spicecomponents/PMOS_SPICE.cpp @@ -117,11 +117,11 @@ QString PMOS_SPICE::spice_netlist(bool) QString M_Line_4= Props.at(3)->Value; QString M_Line_5= Props.at(4)->Value; - if( M.length() > 0) s += QString("%1").arg(M); - if( M_Line_2.length() > 0 ) s += QString("\n%1").arg(M_Line_2); - if( M_Line_3.length() > 0 ) s += QString("\n%1").arg(M_Line_3); - if( M_Line_4.length() > 0 ) s += QString("\n%1").arg(M_Line_4); - if( M_Line_5.length() > 0 ) s += QString("\n%1").arg(M_Line_5); + if( M.length() > 0) s += QStringLiteral("%1").arg(M); + if( M_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(M_Line_2); + if( M_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(M_Line_3); + if( M_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(M_Line_4); + if( M_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(M_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/PNP_SPICE.cpp b/qucs/spicecomponents/PNP_SPICE.cpp index 1d3f0f226..01ac56cdc 100644 --- a/qucs/spicecomponents/PNP_SPICE.cpp +++ b/qucs/spicecomponents/PNP_SPICE.cpp @@ -110,11 +110,11 @@ QString PNP_SPICE::spice_netlist(bool) QString Q_Line_4= Props.at(3)->Value; QString Q_Line_5= Props.at(4)->Value; - if( Q.length() > 0) s += QString("%1").arg(Q); - if( Q_Line_2.length() > 0 ) s += QString("\n%1").arg(Q_Line_2); - if( Q_Line_3.length() > 0 ) s += QString("\n%1").arg(Q_Line_3); - if( Q_Line_4.length() > 0 ) s += QString("\n%1").arg(Q_Line_4); - if( Q_Line_5.length() > 0 ) s += QString("\n%1").arg(Q_Line_5); + if( Q.length() > 0) s += QStringLiteral("%1").arg(Q); + if( Q_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(Q_Line_2); + if( Q_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(Q_Line_3); + if( Q_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(Q_Line_4); + if( Q_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(Q_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/R_SPICE.cpp b/qucs/spicecomponents/R_SPICE.cpp index 974b7e4fa..18be43c83 100644 --- a/qucs/spicecomponents/R_SPICE.cpp +++ b/qucs/spicecomponents/R_SPICE.cpp @@ -129,11 +129,11 @@ QString R_SPICE::spice_netlist(bool) QString R_Line_4= Props.at(3)->Value; QString R_Line_5= Props.at(4)->Value; - if( R.length() > 0) s += QString("%1").arg(R); - if( R_Line_2.length() > 0 ) s += QString("\n%1").arg(R_Line_2); - if( R_Line_3.length() > 0 ) s += QString("\n%1").arg(R_Line_3); - if( R_Line_4.length() > 0 ) s += QString("\n%1").arg(R_Line_4); - if( R_Line_5.length() > 0) s += QString("\n%1").arg(R_Line_5); + if( R.length() > 0) s += QStringLiteral("%1").arg(R); + if( R_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(R_Line_2); + if( R_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(R_Line_3); + if( R_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(R_Line_4); + if( R_Line_5.length() > 0) s += QStringLiteral("\n%1").arg(R_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/S4Q_I.cpp b/qucs/spicecomponents/S4Q_I.cpp index d468f3f6d..3d8f75173 100644 --- a/qucs/spicecomponents/S4Q_I.cpp +++ b/qucs/spicecomponents/S4Q_I.cpp @@ -92,11 +92,11 @@ QString S4Q_I::spice_netlist(bool) QString l3= Props.at(3)->Value; QString l4= Props.at(4)->Value; - if(l0.length()> 0) s += QString("%1").arg(l0); - if(l1.length()> 0) s += QString("\n%1").arg(l1); - if(l2.length()> 0) s += QString("\n%1").arg(l2); - if(l3.length()> 0) s += QString("\n%1").arg(l3); - if(l4.length()> 0) s += QString("\n%1").arg(l4); + if(l0.length()> 0) s += QStringLiteral("%1").arg(l0); + if(l1.length()> 0) s += QStringLiteral("\n%1").arg(l1); + if(l2.length()> 0) s += QStringLiteral("\n%1").arg(l2); + if(l3.length()> 0) s += QStringLiteral("\n%1").arg(l3); + if(l4.length()> 0) s += QStringLiteral("\n%1").arg(l4); s += "\n"; return s; diff --git a/qucs/spicecomponents/S4Q_Ieqndef.cpp b/qucs/spicecomponents/S4Q_Ieqndef.cpp index 368014814..0ca34c716 100644 --- a/qucs/spicecomponents/S4Q_Ieqndef.cpp +++ b/qucs/spicecomponents/S4Q_Ieqndef.cpp @@ -102,11 +102,11 @@ QString S4Q_Ieqndef::spice_netlist(bool) QString Line_4 = Props.at(3)->Value; QString Line_5 = Props.at(4)->Value; - s += QString(" %1 = %2 \n").arg(VI).arg(VI2); - if( Line_2.length() > 0 ) s += QString("%1").arg(Line_2); - if( Line_3.length() > 0 ) s += QString("\n%1").arg(Line_3); - if( Line_4.length() > 0 ) s += QString("\n%1").arg(Line_4); - if( Line_5.length() > 0 ) s += QString("\n%1").arg(Line_5); + s += QStringLiteral(" %1 = %2 \n").arg(VI).arg(VI2); + if( Line_2.length() > 0 ) s += QStringLiteral("%1").arg(Line_2); + if( Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_3); + if( Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_4); + if( Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_5); s += "\n"; return s; @@ -121,7 +121,7 @@ QString S4Q_Ieqndef::va_code() if (Props.at(0)->Name=="I") Src = vacompat::normalize_current(plus,minus,true); else Src = vacompat::normalize_voltage(plus,minus); // Voltage contribution is reserved for future // B-source may be polar - if (plus=="gnd") s = QString(" %1 <+ -(%2); // %3 source\n").arg(Src).arg(Props.at(0)->Value).arg(Name); - else s = QString(" %1 <+ %2; // %3 source\n").arg(Src).arg(Props.at(0)->Value).arg(Name); + if (plus=="gnd") s = QStringLiteral(" %1 <+ -(%2); // %3 source\n").arg(Src).arg(Props.at(0)->Value).arg(Name); + else s = QStringLiteral(" %1 <+ %2; // %3 source\n").arg(Src).arg(Props.at(0)->Value).arg(Name); return s; } diff --git a/qucs/spicecomponents/S4Q_S.cpp b/qucs/spicecomponents/S4Q_S.cpp index 181a00e0a..f3228cc59 100644 --- a/qucs/spicecomponents/S4Q_S.cpp +++ b/qucs/spicecomponents/S4Q_S.cpp @@ -108,11 +108,11 @@ QString S4Q_S::spice_netlist(bool) QString S_Line_4= Props.at(3)->Value; QString S_Line_5= Props.at(4)->Value; - if( S.length() > 0) s += QString("%1").arg(S); - if( S_Line_2.length() > 0 ) s += QString("\n%1").arg(S_Line_2); - if( S_Line_3.length() > 0 ) s += QString("\n%1").arg(S_Line_3); - if( S_Line_4.length() > 0 ) s += QString("\n%1").arg(S_Line_4); - if( S_Line_5.length() > 0) s += QString("\n%1").arg(S_Line_5); + if( S.length() > 0) s += QStringLiteral("%1").arg(S); + if( S_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(S_Line_2); + if( S_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(S_Line_3); + if( S_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(S_Line_4); + if( S_Line_5.length() > 0) s += QStringLiteral("\n%1").arg(S_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/S4Q_V.cpp b/qucs/spicecomponents/S4Q_V.cpp index cc7480d8b..2ac060747 100644 --- a/qucs/spicecomponents/S4Q_V.cpp +++ b/qucs/spicecomponents/S4Q_V.cpp @@ -92,11 +92,11 @@ QString S4Q_V::spice_netlist(bool) QString l3= Props.at(3)->Value; QString l4= Props.at(4)->Value; - if(l0.length()> 0) s += QString("%1").arg(l0); - if(l1.length()> 0) s += QString("\n%1").arg(l1); - if(l2.length()> 0) s += QString("\n%1").arg(l2); - if(l3.length()> 0) s += QString("\n%1").arg(l3); - if(l4.length()> 0) s += QString("\n%1").arg(l4); + if(l0.length()> 0) s += QStringLiteral("%1").arg(l0); + if(l1.length()> 0) s += QStringLiteral("\n%1").arg(l1); + if(l2.length()> 0) s += QStringLiteral("\n%1").arg(l2); + if(l3.length()> 0) s += QStringLiteral("\n%1").arg(l3); + if(l4.length()> 0) s += QStringLiteral("\n%1").arg(l4); s += "\n"; return s; diff --git a/qucs/spicecomponents/S4Q_W.cpp b/qucs/spicecomponents/S4Q_W.cpp index 0b71e8ed0..2b99a77f1 100644 --- a/qucs/spicecomponents/S4Q_W.cpp +++ b/qucs/spicecomponents/S4Q_W.cpp @@ -96,11 +96,11 @@ QString S4Q_W::spice_netlist(bool) QString W_Line_4= Props.at(3)->Value; QString W_Line_5= Props.at(4)->Value; - if( W.length() > 0) s += QString("%1").arg(W); - if( W_Line_2.length() > 0 ) s += QString("\n%1").arg(W_Line_2); - if( W_Line_3.length() > 0 ) s += QString("\n%1").arg(W_Line_3); - if( W_Line_4.length() > 0 ) s += QString("\n%1").arg(W_Line_4); - if( W_Line_5.length() > 0) s += QString("\n%1").arg(W_Line_5); + if( W.length() > 0) s += QStringLiteral("%1").arg(W); + if( W_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(W_Line_2); + if( W_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(W_Line_3); + if( W_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(W_Line_4); + if( W_Line_5.length() > 0) s += QStringLiteral("\n%1").arg(W_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/SDTF.cpp b/qucs/spicecomponents/SDTF.cpp index 62b6cb609..941099596 100644 --- a/qucs/spicecomponents/SDTF.cpp +++ b/qucs/spicecomponents/SDTF.cpp @@ -101,13 +101,13 @@ QString SDTF::spice_netlist(bool) QString A_Line_6 = Props.at(5)->Value; QString A_Line_7 = Props.at(6)->Value; - if( A.length() > 0) s += QString("%1").arg(A); - if( A_Line_2.length() > 0 ) s += QString("\n%1").arg(A_Line_2); - if( A_Line_3.length() > 0 ) s += QString("\n%1").arg(A_Line_3); - if( A_Line_4.length() > 0 ) s += QString("\n%1").arg(A_Line_4); - if( A_Line_5.length() > 0 ) s += QString("\n%1").arg(A_Line_5); - if( A_Line_6.length() > 0 ) s += QString("\n%1").arg(A_Line_6); - if( A_Line_7.length() > 0 ) s += QString("\n%1").arg(A_Line_7); + if( A.length() > 0) s += QStringLiteral("%1").arg(A); + if( A_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(A_Line_2); + if( A_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(A_Line_3); + if( A_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(A_Line_4); + if( A_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(A_Line_5); + if( A_Line_6.length() > 0 ) s += QStringLiteral("\n%1").arg(A_Line_6); + if( A_Line_7.length() > 0 ) s += QStringLiteral("\n%1").arg(A_Line_7); s += "\n"; return s; } diff --git a/qucs/spicecomponents/UDRCTL_SPICE.cpp b/qucs/spicecomponents/UDRCTL_SPICE.cpp index 38bf675d9..49eccd857 100644 --- a/qucs/spicecomponents/UDRCTL_SPICE.cpp +++ b/qucs/spicecomponents/UDRCTL_SPICE.cpp @@ -107,11 +107,11 @@ QString UDRCTL_SPICE::spice_netlist(bool) QString U_Line_4= Props.at(3)->Value; QString U_Line_5= Props.at(4)->Value; - if( U.length() > 0) s += QString("%1").arg(U); - if( U_Line_2.length() > 0 ) s += QString("\n%1").arg(U_Line_2); - if( U_Line_3.length() > 0 ) s += QString("\n%1").arg(U_Line_3); - if( U_Line_4.length() > 0 ) s += QString("\n%1").arg(U_Line_4); - if( U_Line_5.length() > 0 ) s += QString("\n%1").arg(U_Line_5); + if( U.length() > 0) s += QStringLiteral("%1").arg(U); + if( U_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(U_Line_2); + if( U_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(U_Line_3); + if( U_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(U_Line_4); + if( U_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(U_Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/XAPWL.cpp b/qucs/spicecomponents/XAPWL.cpp index 888fe8273..bb346f2b1 100644 --- a/qucs/spicecomponents/XAPWL.cpp +++ b/qucs/spicecomponents/XAPWL.cpp @@ -101,13 +101,13 @@ QString XAPWL::spice_netlist(bool) QString A_Line_6 = Props.at(5)->Value; QString A_Line_7 = Props.at(6)->Value; - if( A.length() > 0) s += QString("%1").arg(A); - if( A_Line_2.length() > 0 ) s += QString("\n%1").arg(A_Line_2); - if( A_Line_3.length() > 0 ) s += QString("\n%1").arg(A_Line_3); - if( A_Line_4.length() > 0 ) s += QString("\n%1").arg(A_Line_4); - if( A_Line_5.length() > 0 ) s += QString("\n%1").arg(A_Line_5); - if( A_Line_6.length() > 0 ) s += QString("\n%1").arg(A_Line_6); - if( A_Line_7.length() > 0 ) s += QString("\n%1").arg(A_Line_7); + if( A.length() > 0) s += QStringLiteral("%1").arg(A); + if( A_Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(A_Line_2); + if( A_Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(A_Line_3); + if( A_Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(A_Line_4); + if( A_Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(A_Line_5); + if( A_Line_6.length() > 0 ) s += QStringLiteral("\n%1").arg(A_Line_6); + if( A_Line_7.length() > 0 ) s += QStringLiteral("\n%1").arg(A_Line_7); s += "\n"; return s; diff --git a/qucs/spicecomponents/core.cpp b/qucs/spicecomponents/core.cpp index 7b163ac82..6b09b29fe 100644 --- a/qucs/spicecomponents/core.cpp +++ b/qucs/spicecomponents/core.cpp @@ -107,13 +107,13 @@ QString core::spice_netlist(bool) QString A_Line_5= Props.at(4)->Value; QString A_Line_6= Props.at(5)->Value; QString A_Line_7= Props.at(6)->Value; - if( A.length() > 0) s += QString("%1\n").arg(A); - if( A_Line_2.length() > 0 ) s += QString("%1\n").arg(A_Line_2); - if( A_Line_3.length() > 0 ) s += QString("%1\n").arg(A_Line_3); - if( A_Line_4.length() > 0 ) s += QString("%1\n").arg(A_Line_4); - if( A_Line_5.length() > 0 ) s += QString("%1\n").arg(A_Line_5); - if( A_Line_6.length() > 0 ) s += QString("%1\n").arg(A_Line_6); - if( A_Line_7.length() > 0 ) s += QString("%1\n").arg(A_Line_7); + if( A.length() > 0) s += QStringLiteral("%1\n").arg(A); + if( A_Line_2.length() > 0 ) s += QStringLiteral("%1\n").arg(A_Line_2); + if( A_Line_3.length() > 0 ) s += QStringLiteral("%1\n").arg(A_Line_3); + if( A_Line_4.length() > 0 ) s += QStringLiteral("%1\n").arg(A_Line_4); + if( A_Line_5.length() > 0 ) s += QStringLiteral("%1\n").arg(A_Line_5); + if( A_Line_6.length() > 0 ) s += QStringLiteral("%1\n").arg(A_Line_6); + if( A_Line_7.length() > 0 ) s += QStringLiteral("%1\n").arg(A_Line_7); return s; } diff --git a/qucs/spicecomponents/eNL.cpp b/qucs/spicecomponents/eNL.cpp index 39a3271b6..b4e20db58 100644 --- a/qucs/spicecomponents/eNL.cpp +++ b/qucs/spicecomponents/eNL.cpp @@ -97,11 +97,11 @@ QString eNL::spice_netlist(bool) QString Line_5 = Props.at(4)->Value; - if( E.length() > 0) s += QString("%1").arg(E); - if( Line_2.length() > 0 ) s += QString("\n%1").arg(Line_2); - if( Line_3.length() > 0 ) s += QString("\n%1").arg(Line_3); - if( Line_4.length() > 0 ) s += QString("\n%1").arg(Line_4); - if( Line_5.length() > 0 ) s += QString("\n%1").arg(Line_5); + if( E.length() > 0) s += QStringLiteral("%1").arg(E); + if( Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_2); + if( Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_3); + if( Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_4); + if( Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_5); s += "\n"; return s; } diff --git a/qucs/spicecomponents/gNL.cpp b/qucs/spicecomponents/gNL.cpp index f218c0e1f..668ab2826 100644 --- a/qucs/spicecomponents/gNL.cpp +++ b/qucs/spicecomponents/gNL.cpp @@ -96,11 +96,11 @@ QString gNL::spice_netlist(bool) QString Line_5 = Props.at(4)->Value; - if( G.length() > 0 ) s += QString("%1").arg(G); - if( Line_2.length() > 0 ) s += QString("\n%1").arg(Line_2); - if( Line_3.length() > 0 ) s += QString("\n%1").arg(Line_3); - if( Line_4.length() > 0 ) s += QString("\n%1").arg(Line_4); - if( Line_5.length() > 0 ) s += QString("\n%1").arg(Line_5); + if( G.length() > 0 ) s += QStringLiteral("%1").arg(G); + if( Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_2); + if( Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_3); + if( Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_4); + if( Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_5); s += "\n"; return s; diff --git a/qucs/spicecomponents/iAmpMod.cpp b/qucs/spicecomponents/iAmpMod.cpp index 9eaacd590..25b2d4a5f 100644 --- a/qucs/spicecomponents/iAmpMod.cpp +++ b/qucs/spicecomponents/iAmpMod.cpp @@ -105,6 +105,6 @@ QString iAmpMod::spice_netlist(bool) QString Td = spicecompat::normalize_value(Props.at(4)->Value); - s += QString(" DC 0 AM(%1 %2 %3 %4 %5 ) AC 0\n").arg(Va).arg(Vo).arg(Mf).arg(Fc).arg(Td); + s += QStringLiteral(" DC 0 AM(%1 %2 %3 %4 %5 ) AC 0\n").arg(Va).arg(Vo).arg(Mf).arg(Fc).arg(Td); return s; } diff --git a/qucs/spicecomponents/iPWL.cpp b/qucs/spicecomponents/iPWL.cpp index 966c2a365..1144251a8 100644 --- a/qucs/spicecomponents/iPWL.cpp +++ b/qucs/spicecomponents/iPWL.cpp @@ -113,16 +113,16 @@ QString Line_10= Props.at(9)->Value; s += QString(); - if( PWL.length() > 0) s += QString("%1").arg(PWL); - if( Line_2.length() > 0 ) s += QString("\n%1").arg(Line_2); - if( Line_3.length() > 0 ) s += QString("\n%1").arg(Line_3); - if( Line_4.length() > 0 ) s += QString("\n%1").arg(Line_4); - if( Line_5.length() > 0 ) s += QString("\n%1").arg(Line_5); - if( Line_6.length() > 0 ) s += QString("\n%1").arg(Line_6); - if( Line_7.length() > 0 ) s += QString("\n%1").arg(Line_7); - if( Line_8.length() > 0) s += QString("\n%1").arg(Line_8); - if( Line_9.length() > 0 ) s += QString("\n%1").arg(Line_9); - if( Line_10.length() > 0 ) s += QString("\n%1").arg(Line_10); + if( PWL.length() > 0) s += QStringLiteral("%1").arg(PWL); + if( Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_2); + if( Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_3); + if( Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_4); + if( Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_5); + if( Line_6.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_6); + if( Line_7.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_7); + if( Line_8.length() > 0) s += QStringLiteral("\n%1").arg(Line_8); + if( Line_9.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_9); + if( Line_10.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_10); s += "\n"; return s; diff --git a/qucs/spicecomponents/iTRNOISE.cpp b/qucs/spicecomponents/iTRNOISE.cpp index db3bbf302..a56800ef3 100644 --- a/qucs/spicecomponents/iTRNOISE.cpp +++ b/qucs/spicecomponents/iTRNOISE.cpp @@ -116,7 +116,7 @@ QString iTRNOISE::spice_netlist(bool) QString Rtsemt = spicecompat::normalize_value(Props.at(4)->Value); - s += QString(" DC 0 AC 0 TRNOISE(%1 %2 %3 %4 %5 %6 %7) \n").arg(Na).arg(Nt).arg(Nalpha).arg(Namp). + s += QStringLiteral(" DC 0 AC 0 TRNOISE(%1 %2 %3 %4 %5 %6 %7) \n").arg(Na).arg(Nt).arg(Nalpha).arg(Namp). arg(Rtsam).arg(Rtscapt).arg(Rtsemt); return s; } diff --git a/qucs/spicecomponents/isffm.cpp b/qucs/spicecomponents/isffm.cpp index 7325ffe0d..6415d5eeb 100644 --- a/qucs/spicecomponents/isffm.cpp +++ b/qucs/spicecomponents/isffm.cpp @@ -105,6 +105,6 @@ QString iSffm::spice_netlist(bool) QString Fs = spicecompat::normalize_value(Props.at(4)->Value); - s += QString(" DC 0 SFFM(%1 %2 %3 %4 %5 ) AC 0\n").arg(I0).arg(Ia).arg(Fc).arg(Mdi).arg(Fs); + s += QStringLiteral(" DC 0 SFFM(%1 %2 %3 %4 %5 ) AC 0\n").arg(I0).arg(Ia).arg(Fc).arg(Mdi).arg(Fs); return s; } diff --git a/qucs/spicecomponents/sp_disto.cpp b/qucs/spicecomponents/sp_disto.cpp index c03305bb0..e1047cce3 100644 --- a/qucs/spicecomponents/sp_disto.cpp +++ b/qucs/spicecomponents/sp_disto.cpp @@ -86,7 +86,7 @@ QString SpiceDisto::spice_netlist(bool isXyce) points = Props.at(3)->Value; } - s = QString("disto %1 %2 %3 %4 %5\n").arg(swp).arg(points).arg(fstart).arg(fstop) + s = QStringLiteral("disto %1 %2 %3 %4 %5\n").arg(swp).arg(points).arg(fstart).arg(fstop) .arg(Props.at(4)->Value.simplified()); } else { s.clear(); diff --git a/qucs/spicecomponents/sp_fourier.cpp b/qucs/spicecomponents/sp_fourier.cpp index 73adc0c7d..52e5e323b 100644 --- a/qucs/spicecomponents/sp_fourier.cpp +++ b/qucs/spicecomponents/sp_fourier.cpp @@ -60,10 +60,10 @@ QString SpiceFourier::spice_netlist(bool isXyce) QString f0 = spicecompat::normalize_value(Props.at(2)->Value); QString out = "spice4qucs." + Name.toLower() + ".four"; if (!isXyce) { - s = QString("set nfreqs=%1\n").arg(Props.at(1)->Value); - s += QString("fourier %1 %2 > %3\n").arg(f0).arg(Props.at(3)->Value).arg(out); + s = QStringLiteral("set nfreqs=%1\n").arg(Props.at(1)->Value); + s += QStringLiteral("fourier %1 %2 > %3\n").arg(f0).arg(Props.at(3)->Value).arg(out); } else { - s = QString(".FOUR %1 %2\n").arg(f0).arg(Props.at(3)->Value); + s = QStringLiteral(".FOUR %1 %2\n").arg(f0).arg(Props.at(3)->Value); } return s; diff --git a/qucs/spicecomponents/sp_func.cpp b/qucs/spicecomponents/sp_func.cpp index e8869a1d6..24a58f8c7 100644 --- a/qucs/spicecomponents/sp_func.cpp +++ b/qucs/spicecomponents/sp_func.cpp @@ -78,8 +78,8 @@ QString SpiceFunc::getExpression(bool) s.clear(); for (Property *pp : Props) { if (QucsSettings.DefaultSimulator==spicecompat::simXyce) - s += QString(".FUNC %1 %2\n").arg(pp->Name).arg(pp->Value); - else s += QString(".FUNC %1 = %2\n").arg(pp->Name).arg(pp->Value); + s += QStringLiteral(".FUNC %1 %2\n").arg(pp->Name).arg(pp->Value); + else s += QStringLiteral(".FUNC %1 = %2\n").arg(pp->Name).arg(pp->Value); } return s; } diff --git a/qucs/spicecomponents/sp_globalpar.cpp b/qucs/spicecomponents/sp_globalpar.cpp index 4cb3d4d52..b83e7a837 100644 --- a/qucs/spicecomponents/sp_globalpar.cpp +++ b/qucs/spicecomponents/sp_globalpar.cpp @@ -77,7 +77,7 @@ QString SpiceGlobalParam::getExpression(bool) QString s; s.clear(); for (Property *pp : Props) { - s += QString(".GLOBAL_PARAM %1 = %2\n").arg(pp->Name).arg(pp->Value); + s += QStringLiteral(".GLOBAL_PARAM %1 = %2\n").arg(pp->Name).arg(pp->Value); } return s; } diff --git a/qucs/spicecomponents/sp_ic.cpp b/qucs/spicecomponents/sp_ic.cpp index c9f535fd6..a822ac15f 100644 --- a/qucs/spicecomponents/sp_ic.cpp +++ b/qucs/spicecomponents/sp_ic.cpp @@ -76,7 +76,7 @@ QString SpiceIC::getExpression(bool) QString s; s.clear(); for (Property *pp : Props) { - s += QString(".IC %1 = %2\n").arg(pp->Name).arg(pp->Value); + s += QStringLiteral(".IC %1 = %2\n").arg(pp->Name).arg(pp->Value); } return s; } diff --git a/qucs/spicecomponents/sp_include.cpp b/qucs/spicecomponents/sp_include.cpp index a8c6d6b62..c6725412c 100644 --- a/qucs/spicecomponents/sp_include.cpp +++ b/qucs/spicecomponents/sp_include.cpp @@ -87,10 +87,10 @@ QString S4Q_Include::getSpiceLibrary() val = misc::properAbsFileName(val, containingSchematic); switch (QucsSettings.DefaultSimulator) { case spicecompat::simSpiceOpus: // Spice Opus doesn't support quotes - s += QString("%1 %2\n").arg(SpiceModel).arg(val); + s += QStringLiteral("%1 %2\n").arg(SpiceModel).arg(val); break; default: - s += QString("%1 \"%2\"\n").arg(SpiceModel).arg(val); + s += QStringLiteral("%1 \"%2\"\n").arg(SpiceModel).arg(val); break; } } diff --git a/qucs/spicecomponents/sp_lib.cpp b/qucs/spicecomponents/sp_lib.cpp index b50c2fc7f..657c5c858 100644 --- a/qucs/spicecomponents/sp_lib.cpp +++ b/qucs/spicecomponents/sp_lib.cpp @@ -81,7 +81,7 @@ QString S4Q_Lib::getSpiceLibrary() if ( !file.isEmpty() ){ file = misc::properAbsFileName(file, containingSchematic); QString sec = getProperty("Section")->Value; - s += QString("%1 \"%2\" %3\n").arg(SpiceModel).arg(file).arg(sec); + s += QStringLiteral("%1 \"%2\" %3\n").arg(SpiceModel).arg(file).arg(sec); } return s; diff --git a/qucs/spicecomponents/sp_nodeset.cpp b/qucs/spicecomponents/sp_nodeset.cpp index 5762cc965..458cadd46 100644 --- a/qucs/spicecomponents/sp_nodeset.cpp +++ b/qucs/spicecomponents/sp_nodeset.cpp @@ -76,7 +76,7 @@ QString SpiceNodeset::getExpression(bool) QString s; s.clear(); for (Property *pp : Props) { - s += QString(".NODESET %1 = %2\n").arg(pp->Name).arg(pp->Value); + s += QStringLiteral(".NODESET %1 = %2\n").arg(pp->Name).arg(pp->Value); } return s; } diff --git a/qucs/spicecomponents/sp_noise.cpp b/qucs/spicecomponents/sp_noise.cpp index b958e8d16..02a0f3013 100644 --- a/qucs/spicecomponents/sp_noise.cpp +++ b/qucs/spicecomponents/sp_noise.cpp @@ -88,11 +88,11 @@ QString SpiceNoise::spice_netlist(bool isXyce) points = Props.at(3)->Value; } - s = QString("noise %1 %2 %3 %4 %5 %6\n").arg(Props.at(4)->Value).arg(Props.at(5)->Value) + s = QStringLiteral("noise %1 %2 %3 %4 %5 %6\n").arg(Props.at(4)->Value).arg(Props.at(5)->Value) .arg(swp).arg(points).arg(fstart).arg(fstop); QString out = "spice4qucs." + Name.toLower() + ".cir.noise"; if (!isXyce) { - s += QString("print inoise_total onoise_total >> %1\n").arg(out); + s += QStringLiteral("print inoise_total onoise_total >> %1\n").arg(out); } else { s.insert(0,'.'); } diff --git a/qucs/spicecomponents/sp_nutmeg.cpp b/qucs/spicecomponents/sp_nutmeg.cpp index 2179bf926..ea66fec2e 100644 --- a/qucs/spicecomponents/sp_nutmeg.cpp +++ b/qucs/spicecomponents/sp_nutmeg.cpp @@ -88,7 +88,7 @@ QString NutmegEquation::getEquations(QString sim, QStringList &dep_vars) auto pp = Props.begin(); pp++; for ( ; pp != Props.end() ; ++pp) { - s += QString("let %1 = %2\n").arg((*pp)->Name).arg((*pp)->Value); + s += QStringLiteral("let %1 = %2\n").arg((*pp)->Name).arg((*pp)->Value); dep_vars.append((*pp)->Name); } } diff --git a/qucs/spicecomponents/sp_options.cpp b/qucs/spicecomponents/sp_options.cpp index a423e2df7..69a4b7a6e 100644 --- a/qucs/spicecomponents/sp_options.cpp +++ b/qucs/spicecomponents/sp_options.cpp @@ -78,14 +78,14 @@ QString SpiceOptions::getExpression(bool isXyce) QString s; s.clear(); if (isXyce) { - s += QString(".OPTIONS %1 ").arg(Props.at(0)->Value); + s += QStringLiteral(".OPTIONS %1 ").arg(Props.at(0)->Value); for (int i=1;iName).arg(Props.at(i)->Value); + s += QStringLiteral(" %1 = %2 ").arg(Props.at(i)->Name).arg(Props.at(i)->Value); } s += "\n"; } else { for (int i=1;iName).arg(Props.at(i)->Value); + s += QStringLiteral(".OPTION %1 = %2\n").arg(Props.at(i)->Name).arg(Props.at(i)->Value); } } return s; diff --git a/qucs/spicecomponents/sp_parameter.cpp b/qucs/spicecomponents/sp_parameter.cpp index bbe819ff8..0ce624646 100644 --- a/qucs/spicecomponents/sp_parameter.cpp +++ b/qucs/spicecomponents/sp_parameter.cpp @@ -76,7 +76,7 @@ QString SpiceParam::getExpression(bool) QString s; s.clear(); for (Property *pp : Props) { - s += QString(".PARAM %1 = %2\n").arg(pp->Name).arg(pp->Value); + s += QStringLiteral(".PARAM %1 = %2\n").arg(pp->Name).arg(pp->Value); } return s; } diff --git a/qucs/spicecomponents/sp_pz.cpp b/qucs/spicecomponents/sp_pz.cpp index d2a323bae..b52d0774a 100644 --- a/qucs/spicecomponents/sp_pz.cpp +++ b/qucs/spicecomponents/sp_pz.cpp @@ -63,11 +63,11 @@ QString SpicePZ::spice_netlist(bool isXyce) QString s; QString out = "spice4qucs." + Name.toLower() + ".cir.pz"; if (!isXyce) { - s = QString("pz %1 %2 %3 %4\n").arg(Props.at(0)->Value).arg(Props.at(1)->Value) + s = QStringLiteral("pz %1 %2 %3 %4\n").arg(Props.at(0)->Value).arg(Props.at(1)->Value) .arg(Props.at(2)->Value).arg(Props.at(3)->Value); - s += QString("echo \"PZ analysis\" >> %1\n").arg(out); + s += QStringLiteral("echo \"PZ analysis\" >> %1\n").arg(out); s += "let dummy_var = 0.0\n"; // To overcome featurebug of Ngspice when printing single variable - s += QString("print all >> %1\n").arg(out); + s += QStringLiteral("print all >> %1\n").arg(out); } else { s.clear(); } diff --git a/qucs/spicecomponents/sp_sens.cpp b/qucs/spicecomponents/sp_sens.cpp index 18804f6ac..be044d81b 100644 --- a/qucs/spicecomponents/sp_sens.cpp +++ b/qucs/spicecomponents/sp_sens.cpp @@ -71,21 +71,21 @@ QString SpiceSENS::spice_netlist(bool isXyce) QString stop = spicecompat::normalize_value(Props.at(3)->Value); QString step = spicecompat::normalize_value(Props.at(4)->Value); QString output = "spice4qucs." + Name.toLower() + ".ngspice.sens.dc.prn"; - s += QString("echo \"Start\">%1\n").arg(output); - s += QString("let %1_start=%2\n").arg(sweepvar).arg(start); - s += QString("let %1_sweep=%1_start\n").arg(sweepvar); - s += QString("let %1_step=%2\n").arg(sweepvar).arg(step); - s += QString("let %1_stop=%2\n").arg(sweepvar).arg(stop); - s += QString("while %1_sweep le %1_stop\n").arg(sweepvar); + s += QStringLiteral("echo \"Start\">%1\n").arg(output); + s += QStringLiteral("let %1_start=%2\n").arg(sweepvar).arg(start); + s += QStringLiteral("let %1_sweep=%1_start\n").arg(sweepvar); + s += QStringLiteral("let %1_step=%2\n").arg(sweepvar).arg(step); + s += QStringLiteral("let %1_stop=%2\n").arg(sweepvar).arg(stop); + s += QStringLiteral("while %1_sweep le %1_stop\n").arg(sweepvar); if (sweepvar.compare("temp",Qt::CaseInsensitive)) { - s += QString("alter %1 = %2_sweep\n").arg(par).arg(sweepvar); + s += QStringLiteral("alter %1 = %2_sweep\n").arg(par).arg(sweepvar); } else { - s += QString("set %1 = $&%2_sweep\n").arg(par).arg(sweepvar); + s += QStringLiteral("set %1 = $&%2_sweep\n").arg(par).arg(sweepvar); } - s += QString("sens %1\n").arg(Props.at(0)->Value); - s += QString("echo \"Sens analysis\">>%1\n").arg(output); - s += QString("print %1_sweep>>%2\nprint all>>%2\n").arg(sweepvar).arg(output); - s += QString("let %1_sweep = %1_sweep + %1_step\nend\n").arg(sweepvar); + s += QStringLiteral("sens %1\n").arg(Props.at(0)->Value); + s += QStringLiteral("echo \"Sens analysis\">>%1\n").arg(output); + s += QStringLiteral("print %1_sweep>>%2\nprint all>>%2\n").arg(sweepvar).arg(output); + s += QStringLiteral("let %1_sweep = %1_sweep + %1_step\nend\n").arg(sweepvar); } diff --git a/qucs/spicecomponents/sp_sens_ac.cpp b/qucs/spicecomponents/sp_sens_ac.cpp index d19069d60..e6e77fb6e 100644 --- a/qucs/spicecomponents/sp_sens_ac.cpp +++ b/qucs/spicecomponents/sp_sens_ac.cpp @@ -67,10 +67,10 @@ QString SpiceSENS_AC::spice_netlist(bool isXyce) QString fstart = spicecompat::normalize_value(Props.at(2)->Value); // Start freq. QString fstop = spicecompat::normalize_value(Props.at(3)->Value); // Stop freq. QString out = "spice4qucs." + Name.toLower() + ".sens.prn"; - s = QString("sens %1 ac %2 %3 %4 %5\n") + s = QStringLiteral("sens %1 ac %2 %3 %4 %5\n") .arg(Props.at(0)->Value).arg(Props.at(1)->Value).arg(Props.at(4)->Value) .arg(fstart).arg(fstop); - s += QString("write %1 all\n").arg(out); + s += QStringLiteral("write %1 all\n").arg(out); } return s; diff --git a/qucs/spicecomponents/sp_sens_tr_xyce.cpp b/qucs/spicecomponents/sp_sens_tr_xyce.cpp index 9fb734c31..35f489b4b 100644 --- a/qucs/spicecomponents/sp_sens_tr_xyce.cpp +++ b/qucs/spicecomponents/sp_sens_tr_xyce.cpp @@ -70,17 +70,17 @@ QString SpiceSENS_TR_Xyce::spice_netlist(bool isXyce) QString start = spicecompat::normalize_value(Props.at(3)->Value); QString stop = spicecompat::normalize_value(Props.at(4)->Value); QString step = spicecompat::normalize_value(Props.at(5)->Value); - s = QString(".tran %1 %2 %3").arg(start).arg(stop).arg(step); + s = QStringLiteral(".tran %1 %2 %3").arg(start).arg(stop).arg(step); if (Props.at(6)->Value=="yes") s +="\n"; else s += " uic\n"; if (Props.at(2)->Value=="direct") s += ".options sensitivity direct=1 adjoint=0\n"; else s += ".options sensitivity direct=0 adjoint=1\n"; - s += QString(".sens objfunc={%1} param=%2\n") + s += QStringLiteral(".sens objfunc={%1} param=%2\n") .arg(Props.at(0)->Value).arg(Props.at(1)->Value); if (Props.at(2)->Value=="direct") { s += ".print sens\n"; } else { - s += QString(".print tran %1\n.print tranadjoint\n").arg(Props.at(0)->Value); + s += QStringLiteral(".print tran %1\n.print tranadjoint\n").arg(Props.at(0)->Value); } } diff --git a/qucs/spicecomponents/sp_sens_xyce.cpp b/qucs/spicecomponents/sp_sens_xyce.cpp index da9c2ca61..6759a6ead 100644 --- a/qucs/spicecomponents/sp_sens_xyce.cpp +++ b/qucs/spicecomponents/sp_sens_xyce.cpp @@ -68,7 +68,7 @@ QString SpiceSENS_Xyce::spice_netlist(bool isXyce) QString start = spicecompat::normalize_value(Props.at(3)->Value); QString stop = spicecompat::normalize_value(Props.at(4)->Value); QString step = spicecompat::normalize_value(Props.at(5)->Value); - s = QString(".dc %3 %4 %5 %6\n" + s = QStringLiteral(".dc %3 %4 %5 %6\n" ".sens objfunc={%1} param=%2\n" ".print sens\n").arg(Props.at(0)->Value).arg(Props.at(1)->Value) .arg(Props.at(2)->Value).arg(start).arg(stop).arg(step); diff --git a/qucs/spicecomponents/sp_spectrum.cpp b/qucs/spicecomponents/sp_spectrum.cpp index 442dd3ca2..9afe1e4c0 100644 --- a/qucs/spicecomponents/sp_spectrum.cpp +++ b/qucs/spicecomponents/sp_spectrum.cpp @@ -73,10 +73,10 @@ QString SpiceFFT::spice_netlist(bool isXyce) double tstop = 1.0/df + tstart; double tstep = 1.0/(2*bw); QString win = getProperty("Window")->Value; - s = QString("tran %1 %2 %3\n").arg(tstep).arg(tstop).arg(tstart); - s += QString("set specwindow=%1\n").arg(win); + s = QStringLiteral("tran %1 %2 %3\n").arg(tstep).arg(tstop).arg(tstart); + s += QStringLiteral("set specwindow=%1\n").arg(win); if (win == "gaussian") { - s += QString("set specwindoworder=%1\n") + s += QStringLiteral("set specwindoworder=%1\n") .arg(getProperty("Order")->Value); } diff --git a/qucs/spicecomponents/spicelibcomp.cpp b/qucs/spicecomponents/spicelibcomp.cpp index e89845403..46e644bd2 100644 --- a/qucs/spicecomponents/spicelibcomp.cpp +++ b/qucs/spicecomponents/spicelibcomp.cpp @@ -90,7 +90,7 @@ void SpiceLibComp::createSymbol() FileName = symname; } else { FileName = QucsSettings.BinDir; - FileName += QString("/../share/" QUCS_NAME "/symbols/%1.sym").arg(Props.at(2)->Value); + FileName += QStringLiteral("/../share/" QUCS_NAME "/symbols/%1.sym").arg(Props.at(2)->Value); } // Default symbol: LM358 in opamps.lib ---> opamps/LM358.sym @@ -220,7 +220,7 @@ int SpiceLibComp::loadSymbol(const QString& DocName) QString SpiceLibComp::spice_netlist(bool) { - QString s = QString("X%1 ").arg(Name); + QString s = QStringLiteral("X%1 ").arg(Name); QString pins = getProperty("PinAssign")->Value; QString sym = getProperty("SymPattern")->Value; if (sym == "auto" || pins.isEmpty()) { @@ -235,7 +235,7 @@ QString SpiceLibComp::spice_netlist(bool) s += " " + spicecompat::normalize_node_name(pp->Connection->Name); } } - s += QString(" %1 %2\n").arg(Props.at(1)->Value).arg(Props.at(3)->Value); + s += QStringLiteral(" %1 %2\n").arg(Props.at(1)->Value).arg(Props.at(3)->Value); return s; } @@ -243,6 +243,6 @@ QString SpiceLibComp::getSpiceLibrary() { if (isActive != COMP_IS_ACTIVE) return QString(); QString f = misc::properAbsFileName(Props.at(0)->Value, containingSchematic); - QString s = QString(".INCLUDE \"%1\"\n").arg(f); + QString s = QStringLiteral(".INCLUDE \"%1\"\n").arg(f); return s; } diff --git a/qucs/spicecomponents/src_eqndef.cpp b/qucs/spicecomponents/src_eqndef.cpp index eaf0ec426..e980dd2d6 100644 --- a/qucs/spicecomponents/src_eqndef.cpp +++ b/qucs/spicecomponents/src_eqndef.cpp @@ -83,11 +83,11 @@ QString Src_eqndef::spice_netlist(bool) QString Line_4 = Props.at(3)->Value; QString Line_5 = Props.at(4)->Value; - s += QString(" %1 = %2 ").arg(VI).arg(VI2); - if( Line_2.length() > 0 ) s += QString("\n%1").arg(Line_2); - if( Line_3.length() > 0 ) s += QString("\n%1").arg(Line_3); - if( Line_4.length() > 0 ) s += QString("\n%1").arg(Line_4); - if( Line_5.length() > 0 ) s += QString("\n%1").arg(Line_5); + s += QStringLiteral(" %1 = %2 ").arg(VI).arg(VI2); + if( Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_2); + if( Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_3); + if( Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_4); + if( Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_5); s += "\n"; return s; @@ -102,7 +102,7 @@ QString Src_eqndef::va_code() if (Props.at(0)->Name=="I") Src = vacompat::normalize_current(plus,minus,true); else Src = vacompat::normalize_voltage(plus,minus); // Voltage contribution is reserved for future // B-source may be polar - if (plus=="gnd") s = QString(" %1 <+ -(%2); // %3 source\n").arg(Src).arg(Props.at(0)->Value).arg(Name); - else s = QString(" %1 <+ %2; // %3 source\n").arg(Src).arg(Props.at(0)->Value).arg(Name); + if (plus=="gnd") s = QStringLiteral(" %1 <+ -(%2); // %3 source\n").arg(Src).arg(Props.at(0)->Value).arg(Name); + else s = QStringLiteral(" %1 <+ %2; // %3 source\n").arg(Src).arg(Props.at(0)->Value).arg(Name); return s; } diff --git a/qucs/spicecomponents/vAmpMod.cpp b/qucs/spicecomponents/vAmpMod.cpp index ac0b35927..8bf3b6a47 100644 --- a/qucs/spicecomponents/vAmpMod.cpp +++ b/qucs/spicecomponents/vAmpMod.cpp @@ -107,6 +107,6 @@ QString vAmpMod::spice_netlist(bool) QString Td = spicecompat::normalize_value(Props.at(4)->Value); - s += QString(" DC 0 AM(%1 %2 %3 %4 %5 ) AC 0\n").arg(Va).arg(Vo).arg(Mf).arg(Fc).arg(Td); + s += QStringLiteral(" DC 0 AM(%1 %2 %3 %4 %5 ) AC 0\n").arg(Va).arg(Vo).arg(Mf).arg(Fc).arg(Td); return s; } diff --git a/qucs/spicecomponents/vPWL.cpp b/qucs/spicecomponents/vPWL.cpp index f42946ad9..5cf66c9ac 100644 --- a/qucs/spicecomponents/vPWL.cpp +++ b/qucs/spicecomponents/vPWL.cpp @@ -112,16 +112,16 @@ QString Line_10= Props.at(9)->Value; s += QString(); - if( PWL.length() > 0) s += QString("%1").arg(PWL); - if( Line_2.length() > 0 ) s += QString("\n%1").arg(Line_2); - if( Line_3.length() > 0 ) s += QString("\n%1").arg(Line_3); - if( Line_4.length() > 0 ) s += QString("\n%1").arg(Line_4); - if( Line_5.length() > 0 ) s += QString("\n%1").arg(Line_5); - if( Line_6.length() > 0 ) s += QString("\n%1").arg(Line_6); - if( Line_7.length() > 0 ) s += QString("\n%1").arg(Line_7); - if( Line_8.length() > 0) s += QString("\n%1").arg(Line_8); - if( Line_9.length() > 0 ) s += QString("\n%1").arg(Line_9); - if( Line_10.length() > 0 ) s += QString("\n%1").arg(Line_10); + if( PWL.length() > 0) s += QStringLiteral("%1").arg(PWL); + if( Line_2.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_2); + if( Line_3.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_3); + if( Line_4.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_4); + if( Line_5.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_5); + if( Line_6.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_6); + if( Line_7.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_7); + if( Line_8.length() > 0) s += QStringLiteral("\n%1").arg(Line_8); + if( Line_9.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_9); + if( Line_10.length() > 0 ) s += QStringLiteral("\n%1").arg(Line_10); s += "\n"; return s; diff --git a/qucs/spicecomponents/vTRNOISE.cpp b/qucs/spicecomponents/vTRNOISE.cpp index 8de541635..ed6f84422 100644 --- a/qucs/spicecomponents/vTRNOISE.cpp +++ b/qucs/spicecomponents/vTRNOISE.cpp @@ -112,7 +112,7 @@ QString vTRNOISE::spice_netlist(bool) QString Rtsemt = spicecompat::normalize_value(Props.at(6)->Value); - s += QString(" DC 0 AC 0 TRNOISE(%1 %2 %3 %4 %5 %6 %7) \n").arg(Na).arg(Nt).arg(Nalpha).arg(Namp). + s += QStringLiteral(" DC 0 AC 0 TRNOISE(%1 %2 %3 %4 %5 %6 %7) \n").arg(Na).arg(Nt).arg(Nalpha).arg(Namp). arg(Rtsam).arg(Rtscapt).arg(Rtsemt); return s; } diff --git a/qucs/spicecomponents/vTRRANDOM.cpp b/qucs/spicecomponents/vTRRANDOM.cpp index a511937c3..28175706f 100644 --- a/qucs/spicecomponents/vTRRANDOM.cpp +++ b/qucs/spicecomponents/vTRRANDOM.cpp @@ -111,6 +111,6 @@ QString vTRRANDOM::spice_netlist(bool) QString Param1 = spicecompat::normalize_value(Props.at(3)->Value); QString Param2 = spicecompat::normalize_value(Props.at(4)->Value); - s += QString(" DC 0 AC 0 TRRANDOM(%1 %2 %3 %4 %5 ) \n").arg(Type).arg(Ts).arg(Td).arg(Param1).arg(Param2); + s += QStringLiteral(" DC 0 AC 0 TRRANDOM(%1 %2 %3 %4 %5 ) \n").arg(Type).arg(Ts).arg(Td).arg(Param1).arg(Param2); return s; } diff --git a/qucs/spicecomponents/volt_ac_SPICE.cpp b/qucs/spicecomponents/volt_ac_SPICE.cpp index bc8555b36..44d212bf7 100644 --- a/qucs/spicecomponents/volt_ac_SPICE.cpp +++ b/qucs/spicecomponents/volt_ac_SPICE.cpp @@ -87,11 +87,11 @@ QString Vac_SPICE::spice_netlist(bool) QString l3= Props.at(3)->Value; QString l4= Props.at(4)->Value; - if(l0.length()> 0) s += QString("%1").arg(l0); - if(l1.length()> 0) s += QString("\n%1").arg(l1); - if(l2.length()> 0) s += QString("\n%1").arg(l2); - if(l3.length()> 0) s += QString("\n%1").arg(l3); - if(l4.length()> 0) s += QString("\n%1").arg(l4); + if(l0.length()> 0) s += QStringLiteral("%1").arg(l0); + if(l1.length()> 0) s += QStringLiteral("\n%1").arg(l1); + if(l2.length()> 0) s += QStringLiteral("\n%1").arg(l2); + if(l3.length()> 0) s += QStringLiteral("\n%1").arg(l3); + if(l4.length()> 0) s += QStringLiteral("\n%1").arg(l4); s += "\n"; return s; diff --git a/qucs/spicecomponents/vsffm.cpp b/qucs/spicecomponents/vsffm.cpp index 2468a1b66..e573637a2 100644 --- a/qucs/spicecomponents/vsffm.cpp +++ b/qucs/spicecomponents/vsffm.cpp @@ -105,6 +105,6 @@ QString vSffm::spice_netlist(bool) QString Fs = spicecompat::normalize_value(Props.at(4)->Value); - s += QString(" DC 0 SFFM(%1 %2 %3 %4 %5 ) AC 0\n").arg(Vo).arg(Va).arg(Fc).arg(Mdi).arg(Fs); + s += QStringLiteral(" DC 0 SFFM(%1 %2 %3 %4 %5 ) AC 0\n").arg(Vo).arg(Va).arg(Fc).arg(Mdi).arg(Fs); return s; } diff --git a/qucs/spicecomponents/xspicegeneric.cpp b/qucs/spicecomponents/xspicegeneric.cpp index 5ff748eae..a67c28c2e 100644 --- a/qucs/spicecomponents/xspicegeneric.cpp +++ b/qucs/spicecomponents/xspicegeneric.cpp @@ -166,9 +166,9 @@ QString XspiceGeneric::spice_netlist(bool) (t_port!="d")) { i++; QString nod1 = spicecompat::normalize_node_name(Ports.at(i)->Connection->Name); - s += QString(" %%1(%2 %3) ").arg(t_port).arg(nod).arg(nod1); + s += QStringLiteral(" %%1(%2 %3) ").arg(t_port).arg(nod).arg(nod1); } else { - s += QString(" %%1(%2) ").arg(t_port).arg(nod); + s += QStringLiteral(" %%1(%2) ").arg(t_port).arg(nod); } if (closing_bracket) s += ']'; i++; From b0f4e4917d4b1feb6f07b6401e8545efe72f7e1e Mon Sep 17 00:00:00 2001 From: Andrey Kalmykov Date: Sun, 3 Nov 2024 21:01:05 +0100 Subject: [PATCH 10/15] Improve graph rendering performance Fixes ra3xdh/qucs_s#984 --- qucs/diagrams/graph.cpp | 56 +++++++++++++++++++++++++++++++++++------ 1 file changed, 48 insertions(+), 8 deletions(-) diff --git a/qucs/diagrams/graph.cpp b/qucs/diagrams/graph.cpp index 25c27fe4f..cdbfcbbd9 100644 --- a/qucs/diagrams/graph.cpp +++ b/qucs/diagrams/graph.cpp @@ -23,6 +23,7 @@ #include #include +#include class Diagram; @@ -479,11 +480,41 @@ void Graph::drawLines(QPainter* painter) const { // - point.isGraphEnd() returns true when there is no // more graph data points + // In order to do a bit of optimization, we want a datapoint to be skipped + // if it is too close to the previous one and graph segment between them + // cannot be rendered distinctively. + // + // These are formulas from QTransform documentation (https://doc.qt.io/qt-6/qtransform.html) + // explaining how QTransform transforms the coordinates: + // x' = m11*x + m21*y + dx + // y' = m22*y + m12*x + dy + // + // We don't care about the second (skew) and third parts (tranlsation). This leaves us: + // x' = m11*x + // y' = m22*y + // + // So, for example, a horizontal segment of length 10 will be of size 10*m11 after transformation. + // But this works in the opposite direction too: 10/m11 gives us the length a horizontal segment + // should have to be of length 10 *after* transformation. + // + // With this knowledge we can now calculate thresholds for our dataset. + + constexpr double min_pixels = 1.0; // I can be wrong here, but I believe these are pixels… + const double x_threshold = std::abs(min_pixels / painter->transform().m11()); + const double y_threshold = std::abs(min_pixels / painter->transform().m22()); + + // Helper to quickly calculate whether two points are distant enough to be worth of drawing + // a graph segment between them + const auto is_too_short = [x_threshold, y_threshold](const QPointF& a, const QPointF& b) { + return std::abs(a.x() - b.x()) < x_threshold && std::abs(a.y() - b.y()) < y_threshold; + }; + bool drawing_started = false; - double prev_point_x = 0; - double prev_point_y = 0; + QPointF segment_start; + QPointF segment_end; + QPainterPath path; - for (auto point : *this) { + for (const auto& point : *this) { // No more data points if (point.isGraphEnd()) { break; @@ -492,6 +523,8 @@ void Graph::drawLines(QPainter* painter) const { // Subgraph has ended, let's pretend like we're // drawing a graph from the beginning if (point.isStrokeEnd()) { + painter->drawPath(path); + path.clear(); drawing_started = false; continue; } @@ -503,15 +536,22 @@ void Graph::drawLines(QPainter* painter) const { // First point in a subgraph. From here the drawing starts if (!drawing_started) { - prev_point_x = point.getScrX(); - prev_point_y = point.getScrY(); + segment_start.setX(point.getScrX()); + segment_start.setY(point.getScrY()); + path.moveTo(segment_start); drawing_started = true; continue; } - painter->drawLine(QLineF{prev_point_x, prev_point_y, point.getScrX(), point.getScrY()}); - prev_point_x = point.getScrX(); - prev_point_y = point.getScrY(); + segment_end.setX(point.getScrX()); + segment_end.setY(point.getScrY()); + + if (is_too_short(segment_start, segment_end)) { + continue; + } + + path.lineTo(segment_end); + segment_start = segment_end; } painter->restore(); From c14c81c8b165743cf8c0e3ac5c1c77540e228db6 Mon Sep 17 00:00:00 2001 From: Iwbnwif Yiw Date: Wed, 6 Nov 2024 16:50:18 +0000 Subject: [PATCH 11/15] Implement basic functionality for sweep and parameter pages. A lot of existing code will be removed after this commit. --- qucs/components/componentdialog.cpp | 1096 +++++++++++++++++---------- qucs/components/componentdialog.h | 76 +- 2 files changed, 743 insertions(+), 429 deletions(-) diff --git a/qucs/components/componentdialog.cpp b/qucs/components/componentdialog.cpp index ffff92224..deb7ae5bb 100644 --- a/qucs/components/componentdialog.cpp +++ b/qucs/components/componentdialog.cpp @@ -24,27 +24,34 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +// #include +// #include +// #include +// #include +// #include +// #include +// #include +// #include +// #include +// #include +// #include +// #include +// #include +// #include + + +// TODO: Make this a member, but at the moment it is causing a segfault, probably +// because of abi incompatibility with some library found at runtime (adding a QString +// also causes the same problem) +// QMap, SweepSettingUIList> sweepSpecs; +// ------------------------------------------------------------------------- // Convenience base class to add a label, name, checkbox and bind them to a variable. class BoundControl { public: - BoundControl(const QString& label, bool& boundCheck, QLayout* layout) + BoundControl(const QString& label, bool check, QLayout* layout) { mpParentLayout = layout; @@ -62,7 +69,7 @@ class BoundControl if (!label.isEmpty()) mpBoundLayout->addWidget(new QLabel(label)); - mpShowNameCheck->setCheckState(boundCheck ? Qt::Checked : Qt::Unchecked); + mpShowNameCheck->setCheckState(check ? Qt::Checked : Qt::Unchecked); mpBoundLayout->addWidget(mpShowNameCheck); } @@ -70,9 +77,13 @@ class BoundControl { QGridLayout* grid = static_cast(mpParentLayout); int row = grid->rowCount(); - grid->addWidget(new QLabel("MR: " + label + ":"), row, 0); - mpShowNameCheck->setCheckState(boundCheck ? Qt::Checked : Qt::Unchecked); + // Set object name to the property name so it is searchable. + QLabel* propertyLabel = new QLabel(label + ":"); + propertyLabel->setObjectName(label); + grid->addWidget(propertyLabel, row, 0); + + mpShowNameCheck->setCheckState(check ? Qt::Checked : Qt::Unchecked); grid->addWidget(mpShowNameCheck, row, 2); } } @@ -83,6 +94,7 @@ class BoundControl QCheckBox* mpShowNameCheck; }; +// ------------------------------------------------------------------------- // Line edit version of bound control. Has label | line | checkbox. class BoundLineEdit : public QLineEdit, BoundControl { @@ -108,7 +120,7 @@ class BoundLineEdit : public QLineEdit, BoundControl } // Parameter property editing. - BoundLineEdit(Property* property, QLayout* layout, QValidator* validator = nullptr) + BoundLineEdit(Property* property, QLayout* layout, QValidator* validator = nullptr) : BoundControl(property->Name, property->display, layout) { if (validator) @@ -124,6 +136,7 @@ class BoundLineEdit : public QLineEdit, BoundControl } }; +// ------------------------------------------------------------------------- // Combo box version of bound control. Has label | combo box | checkbox. class BoundComboBox : public QComboBox, BoundControl { @@ -133,7 +146,7 @@ class BoundComboBox : public QComboBox, BoundControl : BoundControl(property->Name, property->display, layout) { addItems(options); - setCurrentIndex(findText(property->Value)); + setCurrentIndex(findText(property->Value, Qt::MatchStartsWith)); QGridLayout* grid = static_cast(mpParentLayout); grid->addWidget(this, grid->rowCount() - 1, 1); @@ -146,19 +159,176 @@ class BoundComboBox : public QComboBox, BoundControl } }; +// ------------------------------------------------------------------------- +// Helper to extract option strings between [] from within a description +QStringList getOptionsFromString(const QString& description) +{ + // Check description for combo box options and create a combo box if found. + int start = description.indexOf('['); + int end = description.indexOf(']'); + + if (start != -1 && end != -1) + return description.mid(start + 1, end - start - 1).split(','); + + return QStringList(); +} -ComponentDialog::ComponentDialog(Component* component, Schematic* document) - : QDialog(document), localComponent(*component) +// ------------------------------------------------------------------------- +// Convenience base class to add a label, and checkbox. +class ParamWidget { - m_pComponent = component; - m_pDocument = document; + public: + ParamWidget(const QString& label, QGridLayout* layout) + : mParam(label) + { + int row = layout->rowCount(); - restoreGeometry(_settings::Get().item("ComponentDialog/geometry")); - setWindowTitle(tr("Edit Component Properties") + " - " + m_pComponent->Description.toUpper()); + mLabel = new QLabel(label + ":"); + layout->addWidget(mLabel, row, 0); + + mCheckBox = new QCheckBox("display in schematic"); + mCheckBox->setEnabled(false); + layout->addWidget(mCheckBox, row, 2); + } + + void setLabel(const QString& label) + { + mLabel->setText(label); + } + + void setCheck(bool checked) + { + mCheckBox->setCheckState(checked ? Qt::Checked : Qt::Unchecked); + } + + virtual void setEnabled(bool enabled) + { + mLabel->setEnabled(enabled); + mCheckBox->setEnabled(enabled); + } + + virtual void setHidden(bool hidden) + { + mLabel->setVisible(!hidden); + mCheckBox->setVisible(!hidden); + } + + virtual void setValue(const QString& value) = 0; + virtual void setOptions(const QStringList& options) = 0; + virtual QString value() = 0; + + protected: + QString mParam; + + private: + QLabel* mLabel; + QCheckBox* mCheckBox; +}; + +// ------------------------------------------------------------------------- +// Convenience class to display label, edit, and checkbox. +class ParamLineEdit : public QLineEdit, public ParamWidget +{ + public: + ParamLineEdit(const QString& param, QGridLayout* layout, ComponentDialog* dialog, + void (ComponentDialog::* func)(const QString&, const QString&)) + : ParamWidget(param, layout) + { + layout->addWidget(this, layout->rowCount() - 1, 1); + // Note: need to be careful about life of dialog and param here. + connect(this, &QLineEdit::textEdited, [=](const QString& value) { if (dialog) (dialog->*func)(param, value); }); + } + + void setEnabled(bool enabled) override + { + ParamWidget::setEnabled(enabled); + QLineEdit::setEnabled(enabled); + } + + void setHidden(bool hidden) override + { + ParamWidget::setHidden(hidden); + QLineEdit::setVisible(!hidden); + } + + void setValue(const QString& value) override + { + setText(value); + } + + void setOptions(const QStringList& options) override { (void)options; } + + QString value() override + { + return text(); + } +}; + +// ------------------------------------------------------------------------- +// Convenience class to display label, combo, and checkbox. +class ParamCombo : public QComboBox, public ParamWidget +{ + public: + ParamCombo(const QString& param, QGridLayout* layout, ComponentDialog* dialog, + void (ComponentDialog::* func)(const QString&, const QString&)) + : ParamWidget(param, layout) + { + layout->addWidget(this, layout->rowCount() - 1, 1); + // Note: need to be careful about life of dialog and param here. + connect(this, &QComboBox::currentTextChanged, [=](const QString& value) { if (dialog) (dialog->*func)(param, value); }); + } + + void setEnabled(bool enabled) override + { + ParamWidget::setEnabled(enabled); + QComboBox::setEnabled(enabled); + } + + void setHidden(bool hidden) override + { + ParamWidget::setHidden(hidden); + QComboBox::setVisible(!hidden); + } + + void setValue(const QString& value) + { + setCurrentIndex(findText(value)); + } + + void setOptions(const QStringList& options) + { + clear(); + addItems(options); + } + + QString value() override + { + return currentText(); + } - // TODO: Get rid of these - setAllVisible = true; // state when toggling properties visibility - compIsSimulation = false; + private: + void (ComponentDialog::* function)(const QString&, const QString&); + ComponentDialog* mDialog; + +}; + +ComponentDialog::ComponentDialog(Component* component, Schematic* schematic) + : QDialog(schematic) +{ + originalComponent = component; + document = schematic; + + qDebug() << "Processing component: " << editComponent.Model << " name: " << editComponent.Name; + + // Make a deep copy of component for edit editing (will be discarded if user cancels). + editComponent = *component; + editComponent.Props = component->Props; + changed = false; + + // sweepSpecs[qMakePair(QString("a"), QString("b"))] = {{"label", "value", {}, false, true, {{"number", StepToNumber}}}, {"label", "value", {}, true, true}}; + + restoreGeometry(_settings::Get().item("ComponentDialog/geometry")); + setWindowTitle(tr("Edit Component Properties") + " - " + originalComponent->Description.toUpper()); // Setup dialog layout. QVBoxLayout* mainLayout = new QVBoxLayout(this); @@ -175,42 +345,19 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* document) Expr.setPattern("[A-Za-z][A-Za-z0-9_]+"); ValName = new QRegularExpressionValidator(Expr,this); - mpNameLineEdit = new BoundLineEdit("Name:", localComponent.Name, localComponent.showName, mainLayout, Validator); - - changed = false; + mpNameLineEdit = new BoundLineEdit("Name:", editComponent.Name, editComponent.showName, mainLayout, Validator); - // TODO: Get rid of these - checkSim = nullptr; comboSim = nullptr; - comboType = nullptr; checkParam = nullptr; - editStart = nullptr; editStop = nullptr; - editNumber = nullptr; - + // last property shown elsewhere outside the properties table, not to put in TableView ? - auto pp = m_pComponent->Props.begin(); - - // ........................................................... - // if simulation component: .TR, .AC, .SW, (.SP ?) - // if((m_pComponent->Model[0] == '.') && - // (m_pComponent->Model != ".DC") && (m_pComponent->Model != ".HB") && - // (m_pComponent->Model != ".Digi") && (m_pComponent->Model != ".ETR") && - // (m_pComponent->Model != ".FOURIER") && (m_pComponent->Model != ".FFT") && - // (m_pComponent->Model != ".PZ") && (m_pComponent->Model != ".SENS") && - // (m_pComponent->Model != ".SENS_AC") && (m_pComponent->Model != ".SENS_XYCE") && - // (m_pComponent->Model != ".SENS_TR_XYCE")) - - // { + // auto pp = originalComponent->Props.begin(); - qDebug() << m_pComponent->Model; + // TODO: It would be better for simulations with sweeps to have a flag saying so. + QStringList hasSweep({".SW", ".SP", ".AC", ".NOISE"}); + QStringList sweepProperties({"Sim", "Param", "Type", "Values", "Start", "Stop", "Points"}); - if (m_pComponent->isSimulation && - (m_pComponent->Model == ".SW" || - m_pComponent->Model == ".SP" || - m_pComponent->Model == ".AC" || - m_pComponent->Model == ".NOISE")) + if (originalComponent->isSimulation && + hasSweep.contains(originalComponent->Model)) { - // TODO: Get rid of this - compIsSimulation = true; - // Create tab widget to hold both sweep and parameter pages. QTabWidget* pageTabs = new QTabWidget(this); layout()->addWidget(pageTabs); @@ -221,42 +368,39 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* document) QGridLayout* sweepPageLayout = new QGridLayout; sweepPage->setLayout(sweepPageLayout); + // Sweep page setup - add widgets for each possible sweep property. + sweepParam["Sim"] = new ParamCombo("Sim", sweepPageLayout, this, &ComponentDialog::updateSimProperty); + sweepParam["Param"] = new ParamLineEdit("Param", sweepPageLayout, this, &ComponentDialog::updateSimProperty); + sweepParam["Type"] = new ParamCombo("Type", sweepPageLayout, this, &ComponentDialog::updateSimProperty); + sweepParam["Values"] = new ParamLineEdit("Values", sweepPageLayout, this, &ComponentDialog::updateSimProperty); + sweepParam["Start"] = new ParamLineEdit("Start", sweepPageLayout, this, &ComponentDialog::updateSimProperty); + sweepParam["Stop"] = new ParamLineEdit("Stop", sweepPageLayout, this, &ComponentDialog::updateSimProperty); + sweepParam["Number"] = new ParamLineEdit("Number", sweepPageLayout, this, &ComponentDialog::updateSimProperty); - int row=10; - - for (Property* property : localComponent.Props) - { - qDebug() << "Prop: " << property->Name; - - // Special case where a simulation is assigned (e.g., parameter sweep). - if (property->Name == "Sim") - { - // Search components for simulations (model name begins with a '.'). - Q3PtrListIterator it(*m_pDocument->Components); - Component* component; - QStringList simulations; - while((component = it.current()) != 0) - { - if (component->Model[0] == '.' && component->Model != ".SW") - simulations << component->Name; - ++it; - } + sweepParam["Type"]->setOptions({"lin", "log", "list", "value"}); + sweepParam["Type"]->setValue("lin"); - new BoundComboBox(property, simulations, sweepPageLayout); - } + // Setup the widget specialisations for each simulation type. + sweepTypeEnabledParams["lin"] = QStringList{"Sim", "Param", "Type", "Start", "Stop", "Step", "Number"}; + sweepTypeEnabledParams["log"] = QStringList{"Sim", "Param", "Type", "Start", "Stop", "Step", "Number"}; + sweepTypeEnabledParams["list"] = QStringList{"Type", "Values"}; + sweepTypeEnabledParams["value"] = QStringList{"Type", "Values"}; + sweepTypeHiddenParams["Sim"] = QStringList{".AC"}; + sweepTypeHiddenParams["Param"] = QStringList{".AC"}; + sweepTypeSpecialLabels["log"] = {{"Step:", "Points per decade"}}; - // new BoundLineEdit(property, sweepPageLayout, Validator); - } + updateSimWidgets("lin"); // editComponent.getProperty("Type")->Name); + updateSimProperty("All", ""); /* editParam = new QLineEdit(sweepPage); - if (m_pComponent->Model != ".SW") editParam->setValidator(ValRestrict); + if (originalComponent->Model != ".SW") editParam->setValidator(ValRestrict); connect(editParam, SIGNAL(returnPressed()), SLOT(slotParamEntered())); checkParam = new QCheckBox(tr("display in schematic"), sweepPage); - if(m_pComponent->Model == ".SW") { // parameter sweep + if(originalComponent->Model == ".SW") { // parameter sweep textSim = new QLabel(tr("Simulation:"), sweepPage); sweepPageLayout->addWidget(textSim, row,0); comboSim = new QComboBox(sweepPage); @@ -270,10 +414,10 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* document) editParam->setReadOnly(true); checkParam->setDisabled(true); - if(m_pComponent->Model == ".TR") // transient simulation ? + if(originalComponent->Model == ".TR") // transient simulation ? editParam->setText("time"); else { - if(m_pComponent->Model == ".AC") // AC simulation ? + if(originalComponent->Model == ".AC") // AC simulation ? editParam->setText("acfrequency"); else editParam->setText("frequency"); @@ -286,75 +430,88 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* document) */ + /* + comboType = new QComboBox(sweepPage); + comboType->hide(); + checkType = new QCheckBox(tr("display in schematic"), sweepPage); + checkType->hide(); + editValues = new QLineEdit(sweepPage); + editValues->hide(); + checkValues = new QCheckBox(tr("display in schematic"), sweepPage); + checkValues->hide(); + editStart = new QLineEdit(sweepPage); + editStart->hide(); + checkStart = new QCheckBox(tr("display in schematic"), sweepPage); + checkStart->hide(); + editStop = new QLineEdit(sweepPage); + editStop->hide(); + checkStop = new QCheckBox(tr("display in schematic"), sweepPage); + checkStop->hide(); + editStep = new QLineEdit(sweepPage); + editStep->hide(); + editNumber = new QLineEdit(sweepPage); + editNumber->hide(); + checkNumber = new QCheckBox(tr("display in schematic"), sweepPage); + checkNumber->hide(); + */ +/* textType = new QLabel(tr("Type:"), sweepPage); sweepPageLayout->addWidget(textType, row,0); - - comboType = new QComboBox(sweepPage); comboType->insertItems(0, QStringList({"linear", "logarithmic", "list", "constant"})); sweepPageLayout->addWidget(comboType, row,1); connect(comboType, SIGNAL(activated(int)), SLOT(slotSimTypeChange(int))); - checkType = new QCheckBox(tr("display in schematic"), sweepPage); sweepPageLayout->addWidget(checkType, row++,2); textValues = new QLabel(tr("Values:"), sweepPage); sweepPageLayout->addWidget(textValues, row,0); - editValues = new QLineEdit(sweepPage); editValues->setValidator(Validator); connect(editValues, SIGNAL(returnPressed()), SLOT(slotValuesEntered())); sweepPageLayout->addWidget(editValues, row,1); - checkValues = new QCheckBox(tr("display in schematic"), sweepPage); sweepPageLayout->addWidget(checkValues, row++,2); textStart = new QLabel(tr("Start:"), sweepPage); sweepPageLayout->addWidget(textStart, row,0); - editStart = new QLineEdit(sweepPage); editStart->setValidator(Validator); connect(editStart, SIGNAL(returnPressed()), SLOT(slotStartEntered())); sweepPageLayout->addWidget(editStart, row,1); - checkStart = new QCheckBox(tr("display in schematic"), sweepPage); sweepPageLayout->addWidget(checkStart, row++,2); textStop = new QLabel(tr("Stop:"), sweepPage); sweepPageLayout->addWidget(textStop, row,0); - editStop = new QLineEdit(sweepPage); editStop->setValidator(Validator); connect(editStop, SIGNAL(returnPressed()), SLOT(slotStopEntered())); sweepPageLayout->addWidget(editStop, row,1); - checkStop = new QCheckBox(tr("display in schematic"), sweepPage); sweepPageLayout->addWidget(checkStop, row++,2); textStep = new QLabel(tr("Step:"), sweepPage); sweepPageLayout->addWidget(textStep, row,0); - editStep = new QLineEdit(sweepPage); editStep->setValidator(Validator); connect(editStep, SIGNAL(returnPressed()), SLOT(slotStepEntered())); sweepPageLayout->addWidget(editStep, row++,1); textNumber = new QLabel(tr("Number:"), sweepPage); sweepPageLayout->addWidget(textNumber, row,0); - editNumber = new QLineEdit(sweepPage); editNumber->setValidator(ValInteger); connect(editNumber, SIGNAL(returnPressed()), SLOT(slotNumberEntered())); sweepPageLayout->addWidget(editNumber, row,1); - checkNumber = new QCheckBox(tr("display in schematic"), sweepPage); sweepPageLayout->addWidget(checkNumber, row++,2); - - +*/ + /* // TODO: Get rid of this. QString s; // Parameter sweep. - if(false) // m_pComponent->Model == ".SW") + if(false) // originalComponent->Model == ".SW") { // Add all sweep components (starting with a .) to the combo box. Component* component; - for (component = m_pDocument->Components->first(); component != 0; m_pDocument->Components->next()) + for (component = document->Components->first(); component != 0; document->Components->next()) { - if (component != m_pComponent && component->Model[0] == '.') + if (component != originalComponent && component->Model[0] == '.') comboSim->insertItem(comboSim->count(), component->Name); } @@ -378,6 +535,7 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* document) s = (*pp)->Value; checkType->setChecked((*pp)->display); } + ++pp; editStart->setText((*pp)->Value); checkStart->setChecked((*pp)->display); @@ -387,30 +545,37 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* document) ++pp; // remember last property for ListView editNumber->setText((*pp)->Value); checkNumber->setChecked((*pp)->display); + */ + /* Converts sweep type text into a number and calls to update int tNum = 0; - if(s[0] == 'l') { - if(s[1] == 'i') { - if(s[2] != 'n') - tNum = 2; + if (s[0] == 'l') + { + if(s[1] == 'i') + { + if(s[2] != 'n') + tNum = 2; } else tNum = 1; } else tNum = 3; - comboType->setCurrentIndex(tNum); + + // comboType->setCurrentIndex(tNum); slotSimTypeChange(tNum); // not automatically ?!? - if(tNum > 1) { + if (tNum > 1) + { editValues->setText( - editNumber->text().mid(1, editNumber->text().length()-2)); + editNumber->text().mid(1, editNumber->text().length() - 2)); checkValues->setChecked((*pp)->display); editNumber->setText("2"); } slotNumberChanged(0); ++pp; + */ /* connect(editValues, SIGNAL(textChanged(const QString&)), - SLOT(slotTextChanged(const QString&)));*/ + SLOT(slotTextChanged(const QString&))); connect(editStart, SIGNAL(textChanged(const QString&)), SLOT(slotNumberChanged(const QString&))); connect(editStop, SIGNAL(textChanged(const QString&)), @@ -419,14 +584,15 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* document) SLOT(slotStepChanged(const QString&))); connect(editNumber, SIGNAL(textChanged(const QString&)), SLOT(slotNumberChanged(const QString&))); - +*/ /* if(checkSim) connect(checkSim, SIGNAL(stateChanged(int)), SLOT(slotSetChanged(int))); connect(checkType, SIGNAL(stateChanged(int)), SLOT(slotSetChanged(int))); connect(checkParam, SIGNAL(stateChanged(int)), SLOT(slotSetChanged(int))); connect(checkStart, SIGNAL(stateChanged(int)), SLOT(slotSetChanged(int))); connect(checkStop, SIGNAL(stateChanged(int)), SLOT(slotSetChanged(int))); - connect(checkNumber, SIGNAL(stateChanged(int)), SLOT(slotSetChanged(int)));*/ + connect(checkNumber, SIGNAL(stateChanged(int)), SLOT(slotSetChanged(int))); +*/ // Create the properties page and add it to the tab widget. QWidget* propertiesPage = new QWidget(pageTabs); @@ -434,61 +600,51 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* document) propertiesPageLayout = new QGridLayout(propertiesPage); } + // This component does not have sweep settings, add properties directly to the dialog itself. else { - // If this component does not have sweep settings, add properties directly to the dialog itself. propertiesPageLayout = new QGridLayout(this); static_cast(layout())->addLayout(propertiesPageLayout); } - - // Create the properties matrix (table). - - - QGroupBox *PropertyBox = new QGroupBox(tr("Properties")); - propertiesPageLayout->addWidget(PropertyBox,2,0); - - // H layout inside the GroupBox - QHBoxLayout *hProps = new QHBoxLayout; - PropertyBox->setLayout(hProps); - - // left pane - QWidget *vboxPropsL = new QWidget; - QVBoxLayout *vL = new QVBoxLayout; - vboxPropsL->setLayout(vL); - - /// \todo column min width - m_pPropertyTable = new QTableWidget(0,4); //initialize - vL->addWidget(m_pPropertyTable); - m_pPropertyTable->verticalHeader()->setVisible(false); - m_pPropertyTable->setSelectionBehavior(QAbstractItemView::SelectRows); - m_pPropertyTable->setSelectionMode(QAbstractItemView::SingleSelection); - m_pPropertyTable->setMinimumSize(200, 150); - m_pPropertyTable->horizontalHeader()->setStretchLastSection(true); - // set automatic resize so all content will be visible, - // horizontal scrollbar will appear if table becomes too large - m_pPropertyTable->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); - m_pPropertyTable->horizontalHeader()->setSectionsClickable(false); // no action when clicking on the header - - connect(m_pPropertyTable->horizontalHeader(),SIGNAL(sectionDoubleClicked(int)), + // Create the properties table. + QGroupBox *propertyGroup = new QGroupBox(tr("Properties")); + propertiesPageLayout->addWidget(propertyGroup, 2, 0); + QHBoxLayout *propertyTableLayout = new QHBoxLayout(propertyGroup); + + /// \todo column min width + make widths persistent + propertyTable = new QTableWidget(0, 4); + propertyTable->setMinimumSize(200, 150); + propertyTable->verticalHeader()->setVisible(false); + propertyTable->horizontalHeader()->setStretchLastSection(true); + propertyTable->horizontalHeader()->setSectionsClickable(false); + propertyTable->setHorizontalHeaderLabels({tr("Name"), tr("Value"), tr("Show"), tr("Description")}); + propertyTable->setColumnWidth(0, 100); + propertyTable->setColumnWidth(1, 150); + propertyTable->setColumnWidth(2, 50); + propertyTable->setSelectionMode(QAbstractItemView::SingleSelection); + // propertyTable->setSelectionBehavior(QAbstractItemView::SelectRows); + propertyTableLayout->addWidget(propertyTable, 2); + + // Doubleclick header to set all visible (TODO: Replace with button). + connect(propertyTable->horizontalHeader(),SIGNAL(sectionDoubleClicked(int)), this, SLOT(slotHHeaderClicked(int))); - QStringList headers; - headers << tr("Name") - << tr("Value") - << tr("display") - << tr("Description"); - m_pPropertyTable->setHorizontalHeaderLabels(headers); + connect(propertyTable, &QTableWidget::cellActivated, [=](int row, int column) { qDebug() << "Activated " << row << "," << column; } ); + connect(propertyTable, &QTableWidget::cellClicked, [=](int row, int column) { qDebug() << "Clicked " << row << "," << column; } ); + connect(propertyTable, &QTableWidget::cellPressed, [=](int row, int column) { qDebug() << "Pressed " << row << "," << column; } ); + connect(propertyTable, &QTableWidget::cellEntered, [=](int row, int column) { qDebug() << "Entered " << row << "," << column; } ); - // right pane + + /* Right panel with buttons etc. QWidget *vboxPropsR = new QWidget; QVBoxLayout *v1 = new QVBoxLayout; vboxPropsR->setLayout(v1); v1->setSpacing(3); - hProps->addWidget(vboxPropsL, 5); // stretch the left pane (with the table) when resized - hProps->addWidget(vboxPropsR); + // propertyTableLayout->addWidget(vboxPropsL, 5); // stretch the left pane (with the table) when resized + propertyTableLayout->addWidget(vboxPropsR); Name = new QLabel; v1->addWidget(Name); @@ -556,101 +712,81 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* document) bg->addWidget(ButtDown, 1, 1); connect(ButtUp, SIGNAL(clicked()), SLOT(slotButtUp())); connect(ButtDown, SIGNAL(clicked()), SLOT(slotButtDown())); + */ - QStringList allowedFillFromSPICE; - allowedFillFromSPICE<<"_BJT"<<"JFET"<<"MOSFET"<<"_MOSFET"<<"Diode"<<"BJT"; + /* Fill from Spice function ***TODO*** do not delete. + QStringList allowedFillFromSPICE({"_BJT", "JFET", "MOSFET", "_MOSFET", "Diode", "BJT"}); ButtFillFromSpice = new QPushButton(tr("Fill from SPICE .MODEL")); - if (!allowedFillFromSPICE.contains(m_pComponent->Model)) { + if (!allowedFillFromSPICE.contains(originalComponent->Model)) { ButtFillFromSpice->setEnabled(false); } bg->addWidget(ButtFillFromSpice,2,0,1,2); connect(ButtFillFromSpice, SIGNAL(clicked(bool)), this, SLOT(slotFillFromSpice())); + */ - // ........................................................... - QHBoxLayout *h2 = new QHBoxLayout; - QWidget * hbox2 = new QWidget; - hbox2->setLayout(h2); - h2->setSpacing(5); - layout()->addWidget(hbox2); - QPushButton *ok = new QPushButton(tr("OK")); - QPushButton *apply = new QPushButton(tr("Apply")); - QPushButton *cancel = new QPushButton(tr("Cancel")); - h2->addWidget(ok); - h2->addWidget(apply); - h2->addWidget(cancel); - connect(ok, SIGNAL(clicked()), SLOT(slotButtOK())); - connect(apply, SIGNAL(clicked()), SLOT(slotApplyInput())); - connect(cancel, SIGNAL(clicked()), SLOT(slotButtCancel())); - - // ------------------------------------------------------------ - - - m_pComponent->textSize(tx_Dist, ty_Dist); - int tmp = m_pComponent->tx+tx_Dist - m_pComponent->x1; - if((tmp > 0) || (tmp < -6)) tx_Dist = 0; // remember the text position - tmp = m_pComponent->ty+ty_Dist - m_pComponent->y1; - if((tmp > 0) || (tmp < -6)) ty_Dist = 0; - - /*! Insert all \a m_pComponent properties into the dialog \a m_pPropertyTable list */ - int row=0; // row counter - for(auto p = pp; p != m_pComponent->Props.end(); ++p) { + // Add the dialog button widgets. + QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | + QDialogButtonBox::Apply | QDialogButtonBox::Cancel); - // do not insert if already on first tab - // this is the reason it was originally from back to front... - // the 'pp' is the lasted property stepped over while filling the Swep tab - // if(p == pp) - // break; - - QString yesno; - if((*p)->display) - yesno = tr("yes"); - else - yesno = tr("no"); + connect(buttonBox, &QDialogButtonBox::accepted, this, &ComponentDialog::slotOKButton); + connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); + connect(buttonBox->button(QDialogButtonBox::Apply), &QPushButton::clicked, this, &ComponentDialog::slotApplyButton); + mainLayout->addWidget(buttonBox); - // add Props into TableWidget - qDebug() << " Loading m_pComponent->Props :" << (*p)->Name << (*p)->Value << (*p)->display << (*p)->Description ; + /* vvvv Why does the text position need to be modified vvvv. - m_pPropertyTable->setRowCount(m_pPropertyTable->rowCount()+1); + // originalComponent->textSize(tx_Dist, ty_Dist); + // int tmp = originalComponent->tx+tx_Dist - originalComponent->x1; + // if((tmp > 0) || (tmp < -6)) tx_Dist = 0; // remember the text position + // tmp = originalComponent->ty+ty_Dist - originalComponent->y1; + // if((tmp > 0) || (tmp < -6)) ty_Dist = 0; + */ - /* - m_pPropertyTable->setCellWidget(row, 0, new QLineEdit); + // Add component properties to the properties table with the exception of the sweep properties. + int row=0; // row counter - QStringList lines; - lines << "First" << "Second" << "Third"; + for (Property* property : editComponent.Props) + { + // qDebug() << " Loading originalComponent->Props :" << (*p)->Name << (*p)->Value << (*p)->display << (*p)->Description ; + // Check this is a sweep property. + if (sweepProperties.contains(property->Name)) + { + qDebug() << "Sweep property (do not add to property table): " << property->Name; + continue; + } - QComboBox* options = new QComboBox(); - options->addItems(lines); + propertyTable->setRowCount(propertyTable->rowCount() + 1); + propertyTable->setItem(row, 0, new QTableWidgetItem(property->Name, LabelCell)); + propertyTable->item(row, 0)->setFlags(Qt::ItemIsEnabled); - m_pPropertyTable->setCellWidget(row, 1, options); - */ + // Check description for combo box options and create a combo box if found. + QStringList options = getOptionsFromString(property->Description); + if (!options.isEmpty()) + { + QComboBox* optionsCombo = new QComboBox(); + optionsCombo->addItems(options); + propertyTable->setCellWidget(row, 1, optionsCombo); + propertyTable->setItem(row, 1, new QTableWidgetItem(ComboBoxCell)); + } - QTableWidgetItem *cell; - cell = new QTableWidgetItem((*p)->Name); - cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - m_pPropertyTable->setItem(row, 0, cell); - cell = new QTableWidgetItem((*p)->Value); - cell->setCheckState(Qt::Checked); - // cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - m_pPropertyTable->setItem(row, 1, cell); - cell = new QTableWidgetItem(yesno); - cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - m_pPropertyTable->setItem(row, 2, cell); - cell = new QTableWidgetItem((*p)->Description); - cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - m_pPropertyTable->setItem(row, 3, cell); + // Add text edit if no options found. + else + { + propertyTable->setItem(row, 1, new QTableWidgetItem(property->Value, TextEditCell)); + propertyTable->openPersistentEditor(propertyTable->item(row, 1)); + } - row++; - } + // Set check box and description. + propertyTable->setItem(row, 2, new QTableWidgetItem(CheckBoxCell)); + propertyTable->item(row, 2)->setCheckState(property->display ? Qt::Checked : Qt::Unchecked); + propertyTable->setItem(row, 3, new QTableWidgetItem(property->Description, LabelCell)); + propertyTable->item(row, 3)->setFlags(Qt::ItemIsEnabled); - if(m_pPropertyTable->rowCount() > 0) { - m_pPropertyTable->setCurrentItem(m_pPropertyTable->item(0,0)); - slotSelectProperty(m_pPropertyTable->item(0,0)); - } - + row++; + } - /// \todo add key up/down browse and select m_pPropertyTable - connect(m_pPropertyTable, SIGNAL(itemClicked(QTableWidgetItem*)), - SLOT(slotSelectProperty(QTableWidgetItem*))); + /// \todo add key up/down browse and select propertyTable + // connect(propertyTable, SIGNAL(itemClicked(QTableWidgetItem*)), SLOT(slotSelectProperty(QTableWidgetItem*))); } ComponentDialog::~ComponentDialog() @@ -679,16 +815,65 @@ bool ComponentDialog::eventFilter(QObject *obj, QEvent *event) return QDialog::eventFilter(obj, event); // standard event processing } + +void ComponentDialog::updateSimWidgets(const QString& type) +{ + qDebug() << "Update sim widgets " << type; + + for (auto it = sweepParam.keyValueBegin(); it != sweepParam.keyValueEnd(); ++it) + { + qDebug() << "Checking " << it->first; + it->second->setHidden(sweepTypeHiddenParams.contains(it->first) && + sweepTypeHiddenParams[it->first].contains(editComponent.Model)); + it->second->setEnabled(sweepTypeEnabledParams.contains(type) && + sweepTypeEnabledParams[type].contains(it->first)); + } +} + +void ComponentDialog::updateSimProperty(const QString& property, const QString& value) +{ + qDebug() << "Update Sim Properties " << property << " value: " << value; + + if (property == "Type") + updateSimWidgets(sweepParam["Type"]->value()); + + // Repopulate the property fields. + if (property == "All") + { + for (auto property : editComponent.Props) + { + qDebug() << "Updating " << property->Name; + if (sweepParam.contains(property->Name)) + { + qDebug() << "Setting to value " << property->Value; + sweepParam[property->Name]->setValue(property->Value); + } + + } + /* + for (auto& field : QStringList{"Values", "Start", "Stop", "Points"}) + { + Property* property = editComponent.getProperty(field); + if (property) + sweepParam[field]->setValue(editComponent.getProperty(field)->Name); + } + */ + } +} + // Updates component property list. Useful for MultiViewComponents void ComponentDialog::updateCompPropsList() { + qDebug() << "Update Comp Props List"; + return; + int last_prop=0; // last property not to put in ListView // ........................................................... // if simulation component: .TR, .AC, .SW, (.SP ?) - if((m_pComponent->Model[0] == '.') && - (m_pComponent->Model != ".DC") && (m_pComponent->Model != ".HB") && - (m_pComponent->Model != ".Digi") && (m_pComponent->Model != ".ETR")) { - if(m_pComponent->Model == ".SW") { // parameter sweep + if((originalComponent->Model[0] == '.') && + (originalComponent->Model != ".DC") && (originalComponent->Model != ".HB") && + (originalComponent->Model != ".Digi") && (originalComponent->Model != ".ETR")) { + if(originalComponent->Model == ".SW") { // parameter sweep last_prop = 2; } else { last_prop = 0; @@ -698,8 +883,8 @@ void ComponentDialog::updateCompPropsList() QString s; int row=0; // row counter - //for(Property *p = m_pComponent->Props.first(); p != 0; p = m_pComponent->Props.next()) { - auto &p = m_pComponent->Props; + //for(Property *p = originalComponent->Props.first(); p != 0; p = originalComponent->Props.next()) { + auto &p = originalComponent->Props; for(int i = last_prop; i< p.size();i++) { // do not insert if already on first tab @@ -713,54 +898,82 @@ void ComponentDialog::updateCompPropsList() s = tr("no"); // add Props into TableWidget - qDebug() << " Loading m_pComponent->Props :" << p.at(i)->Name << p.at(i)->Value << p.at(i)->display << p.at(i)->Description ; + qDebug() << " Loading originalComponent->Props :" << p.at(i)->Name << p.at(i)->Value << p.at(i)->display << p.at(i)->Description ; - if (row > m_pPropertyTable->rowCount()-1) { // Add new rows - m_pPropertyTable->setRowCount(m_pPropertyTable->rowCount()+1); + if (row > propertyTable->rowCount()-1) { // Add new rows + propertyTable->setRowCount(propertyTable->rowCount()+1); } QTableWidgetItem *cell; cell = new QTableWidgetItem(p.at(i)->Name); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - m_pPropertyTable->setItem(row, 0, cell); + propertyTable->setItem(row, 0, cell); cell = new QTableWidgetItem(p.at(i)->Value); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - m_pPropertyTable->setItem(row, 1, cell); + propertyTable->setItem(row, 1, cell); cell = new QTableWidgetItem(s); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - m_pPropertyTable->setItem(row, 2, cell); + propertyTable->setItem(row, 2, cell); cell = new QTableWidgetItem(p.at(i)->Description); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - m_pPropertyTable->setItem(row, 3, cell); + propertyTable->setItem(row, 3, cell); row++; } - if(m_pPropertyTable->rowCount() > 0) { - m_pPropertyTable->setCurrentItem(m_pPropertyTable->item(0,0)); - slotSelectProperty(m_pPropertyTable->item(0,0)); + if(propertyTable->rowCount() > 0) { + propertyTable->setCurrentItem(propertyTable->item(0,0)); + slotSelectProperty(propertyTable->item(0,0)); } - if (row < m_pPropertyTable->rowCount()-1) { - m_pPropertyTable->setRowCount(row); + if (row < propertyTable->rowCount()-1) { + propertyTable->setRowCount(row); } } +// ------------------------------------------------------------------------- +// Updates sweep page widgets to set the specialised names and enabled state. +void ComponentDialog::slotUpdateSweepWidgets(const QString& sweepType, QGridLayout* sweepPageLayout) +{ + qDebug() << "Updating sweep page widgets."; + + // TODO: remove once this is implemented. + void(sweepType); + + for (int row = 1; row < sweepPageLayout->rowCount(); row++) + { + QLayoutItem* item = sweepPageLayout->itemAtPosition(row, 0); + + if (item && item->widget()) + { + if (item->widget()->objectName() == "Points") + { + for (int col = 0; col < 3; col++) + sweepPageLayout->itemAtPosition(row, col)->widget()->setEnabled(false); + } + } + } +} + // ------------------------------------------------------------------------- // Is called if a property is selected. // Handle the Property editor tab. // It transfers the values to the right side for editing. void ComponentDialog::slotSelectProperty(QTableWidgetItem *item) { + // Do not use this function as not all pointers are initialised. + return; + + if(item == 0) return; item->setSelected(true); // if called from elsewhere, this was not yet done qDebug() << "row " << item->row(); //<< item->text() - QString name = m_pPropertyTable->item(item->row(),0)->text(); - QString value = m_pPropertyTable->item(item->row(),1)->text(); - QString show = m_pPropertyTable->item(item->row(),2)->text(); - QString desc = m_pPropertyTable->item(item->row(),3)->text(); + QString name = propertyTable->item(item->row(),0)->text(); + QString value = propertyTable->item(item->row(),1)->text(); + QString show = propertyTable->item(item->row(),2)->text(); + QString desc = propertyTable->item(item->row(),3)->text(); if(show == tr("yes")) disp->setChecked(true); @@ -778,23 +991,26 @@ void ComponentDialog::slotSelectProperty(QTableWidgetItem *item) /// \todo enable edit of description anyway... /// empty or "-" (no comment from verilog-a) + + // Empty description so assume editing an equation? if(desc.isEmpty()) { // show two line edit fields (name and value) ButtAdd->setEnabled(true); ButtRem->setEnabled(true); - QStringList eqns_mods; - eqns_mods<<"Eqn"<<"SpicePar"<<"SpGlobPar" - <<"SpiceIC"<<"SpiceNodeset"<<"NutmegEq"; - // enable Up/Down buttons only for the Equation component - if (eqns_mods.contains(m_pComponent->Model)) { + // Enable Up / Down buttons only for spice and equation components. + QStringList spiceComponents({"Eqn", "SpicePar", "SpGlobPar", "SpiceIC", "SpiceNodeset", "NutmegEq"}); + if (spiceComponents.contains(originalComponent->Model)) + { ButtUp->setEnabled(true); ButtDown->setEnabled(true); } - else { + else + { ButtUp->setEnabled(false); ButtDown->setEnabled(false); } + Name->setText(""); NameEdit->setText(name); edit->setText(value); @@ -805,10 +1021,13 @@ void ComponentDialog::slotSelectProperty(QTableWidgetItem *item) ComboEdit->setVisible(false); NameEdit->setFocus(); // edit QLineEdit - } else if (desc=="Expression") { // Single expression + } + + // Property is an expression. + else if (desc == "Expression") + { // show two line edit fields (name and value) // And disable buttons - Name->setText(""); NameEdit->setText(name); edit->setText(value); @@ -819,7 +1038,11 @@ void ComponentDialog::slotSelectProperty(QTableWidgetItem *item) ComboEdit->setVisible(false); NameEdit->setFocus(); // edit QLineEdit - } else { // show standard line edit (description and value) + } + + // Standard property (description and value) + else + { ButtAdd->setEnabled(false); ButtRem->setEnabled(false); ButtUp->setEnabled(false); @@ -854,7 +1077,7 @@ void ComponentDialog::slotSelectProperty(QTableWidgetItem *item) desc = desc.left(desc.length()-5) + "...."; } - if (m_pComponent->SpiceModel == "NutmegEq" && name == "Simulation") { // simulation selection required + if (originalComponent->SpiceModel == "NutmegEq" && name == "Simulation") { // simulation selection required List = getSimulationList(); } @@ -886,7 +1109,7 @@ void ComponentDialog::slotApplyChange(int idx) { /// \bug what if the table have no items? // pick selected row - QList items = m_pPropertyTable->selectedItems(); + QList items = propertyTable->selectedItems(); Q_ASSERT(!items.isEmpty()); QTableWidgetItem *item = items.first(); @@ -895,14 +1118,14 @@ void ComponentDialog::slotApplyChange(int idx) auto Text = ComboEdit->itemText(idx); edit->setText(Text); // apply edit line - m_pPropertyTable->item(row, 1)->setText(Text); + propertyTable->item(row, 1)->setText(Text); ComboEdit->setFocus(); // step to next item if not at the last line - if ( row < (m_pPropertyTable->rowCount() - 1)) { - m_pPropertyTable->setCurrentItem(m_pPropertyTable->item(row+1,0)); - slotSelectProperty(m_pPropertyTable->item(row+1,0)); + if ( row < (propertyTable->rowCount() - 1)) { + propertyTable->setCurrentItem(propertyTable->item(row+1,0)); + slotSelectProperty(propertyTable->item(row+1,0)); } } @@ -914,15 +1137,15 @@ void ComponentDialog::slotApplyChange(int idx) void ComponentDialog::slotApplyProperty() { // pick selected row - QTableWidgetItem *item = m_pPropertyTable->currentItem(); + QTableWidgetItem *item = propertyTable->currentItem(); if(!item) return; int row = item->row(); - QString name = m_pPropertyTable->item(row, 0)->text(); - QString value = m_pPropertyTable->item(row, 1)->text(); + QString name = propertyTable->item(row, 0)->text(); + QString value = propertyTable->item(row, 1)->text(); @@ -931,7 +1154,7 @@ void ComponentDialog::slotApplyProperty() // apply edit line if(value != edit->text()) { - m_pPropertyTable->item(row, 1)->setText(edit->text()); + propertyTable->item(row, 1)->setText(edit->text()); } if (!NameEdit->isHidden()) // also apply property name ? @@ -940,16 +1163,16 @@ void ComponentDialog::slotApplyProperty() // item->setText(0, "Export_"); // name must not be "Export" !!! // else // item->setText(0, NameEdit->text()); // apply property name - m_pPropertyTable->item(row, 0)->setText(NameEdit->text()); + propertyTable->item(row, 0)->setText(NameEdit->text()); } // step to next item - if ( row < m_pPropertyTable->rowCount()-1) { - m_pPropertyTable->setCurrentItem(m_pPropertyTable->item(row+1,0)); - slotSelectProperty(m_pPropertyTable->item(row+1,0)); + if ( row < propertyTable->rowCount()-1) { + propertyTable->setCurrentItem(propertyTable->item(row+1,0)); + slotSelectProperty(propertyTable->item(row+1,0)); } else { - slotButtOK(); // close dialog, if it was the last property + slotOKButton(); // close dialog, if it was the last property return; } } @@ -959,10 +1182,10 @@ void ComponentDialog::slotApplyProperty() void ComponentDialog::slotApplyPropName() { // pick selected row - QTableWidgetItem *item = m_pPropertyTable->selectedItems()[0]; + QTableWidgetItem *item = propertyTable->selectedItems()[0]; int row = item->row(); - QString name = m_pPropertyTable->item(row, 0)->text(); + QString name = propertyTable->item(row, 0)->text(); if(name != NameEdit->text()) { // if(NameEdit->text() == "Export") { @@ -970,7 +1193,7 @@ void ComponentDialog::slotApplyPropName() // NameEdit->setText("Export_"); // } // else - m_pPropertyTable->item(row, 0)->setText(NameEdit->text()); + propertyTable->item(row, 0)->setText(NameEdit->text()); } edit->setFocus(); // cursor into "edit" widget } @@ -980,11 +1203,11 @@ void ComponentDialog::slotApplyPropName() void ComponentDialog::slotApplyState(int State) { // pick selected row - if (m_pPropertyTable->rowCount() == 0) return; - QTableWidgetItem *item = m_pPropertyTable->selectedItems()[0]; + if (propertyTable->rowCount() == 0) return; + QTableWidgetItem *item = propertyTable->selectedItems()[0]; int row = item->row(); - QString disp = m_pPropertyTable->item(row, 2)->text(); + QString disp = propertyTable->item(row, 2)->text(); if(item == 0) return; @@ -995,86 +1218,109 @@ void ComponentDialog::slotApplyState(int State) ButtonState = tr("no"); if(disp != ButtonState) { - m_pPropertyTable->item(row, 2)->setText(ButtonState); + propertyTable->item(row, 2)->setText(ButtonState); } } // ------------------------------------------------------------------------- // Is called if the "OK"-button is pressed. -void ComponentDialog::slotButtOK() +void ComponentDialog::slotOKButton() { + qDebug() << "slotOK"; + QSettings settings("qucs","qucs_s"); settings.setValue("ComponentDialog/geometry", saveGeometry()); - slotApplyInput(); - slotButtCancel(); + slotApplyButton(); + done(QDialog::Accepted); } // ------------------------------------------------------------------------- // Is called if the "Cancel"-button is pressed. -void ComponentDialog::slotButtCancel() -{ - if(changed) done(1); // changed could have been done before - else done(0); // (by "Apply"-button) -} +// void ComponentDialog::slotCancelButton() +// { +// qDebug() << "slotCancel"; + +// // if (changed) +// // done(1); // changed could have been done before +// // else +// // done(0); // (by "Apply"-button) +// } //----------------------------------------------------------------- // To get really all close events (even key). -void ComponentDialog::reject() -{ - slotButtCancel(); -} +// void ComponentDialog::reject() +// { +// slotCancelButton(); +// } // ------------------------------------------------------------------------- // Is called, if the "Apply"-button is pressed. -void ComponentDialog::slotApplyInput() +void ComponentDialog::slotApplyButton() { + qDebug() << "slotApply"; // Check the new name is not empty and not a duplicate. - if (localComponent.Name.isEmpty() || - m_pDocument->getComponentByName(localComponent.Name) != nullptr) + if (editComponent.Name.isEmpty() || + document->getComponentByName(editComponent.Name) != nullptr) { // Reset to the current name if a conflict is found. - localComponent.Name = m_pComponent->Name; - mpNameLineEdit->setText(localComponent.Name); + editComponent.Name = originalComponent->Name; + mpNameLineEdit->setText(editComponent.Name); } - for (auto& property : localComponent.Props) + for (int row = 0; row < propertyTable->rowCount(); row++) { - qDebug() << property->Name << " : " << property->Value; + qDebug() << "Item type: " << propertyTable->item(row, 1)->type(); + + /* + if (propertyTable->item(row, 1) && propertyTable->cellWidget(row, 1)) + { + QComboBox* cellCombo = static_cast(propertyTable->cellWidget(row, 1)); + qDebug() << "Current combo text is: " << cellCombo->currentText(); + } + */ + } - m_pComponent->Name = localComponent.Name; - m_pComponent->showName = localComponent.showName; + + for (auto& property : editComponent.Props) + { + qDebug() << "Edit component property: " << property->Name << " : " << property->Value; + } + + originalComponent->Name = editComponent.Name; + originalComponent->showName = editComponent.showName; changed = true; - /*! Walk the original m_pComponent->Props and compare with the + /*! Walk the original originalComponent->Props and compare with the * data in the dialog. * The pointers to the combo, edits,... are set to 0. * Only check if the widgets were created (pointers checks are 'true') */ - //auto pp = m_pComponent->Props.begin(); + //auto pp = originalComponent->Props.begin(); // apply all the new property values QString tmp; Component *pc; int idxStart = 1; - if (m_pComponent->Model == ".SW") { + if (originalComponent->Model == ".SW") { idxStart = 3; } /* if(comboSim != nullptr) { - auto pp = m_pComponent->getProperty("Sim"); + auto pp = originalComponent->getProperty("Sim"); bool display = checkSim->isChecked(); QString value = comboSim->currentText(); updateProperty(pp,value,display); } */ + /* if(comboType != nullptr) { bool display = checkType->isChecked(); - auto pp = m_pComponent->getProperty("Type"); + auto pp = originalComponent->getProperty("Type"); switch(comboType->currentIndex()) { case 1: tmp = "log"; break; case 2: tmp = "list"; break; @@ -1083,9 +1329,10 @@ void ComponentDialog::slotApplyInput() } updateProperty(pp,tmp,display); } + if(checkParam != nullptr) { if(checkParam->isEnabled()) { - auto pp = m_pComponent->getProperty("Param"); + auto pp = originalComponent->getProperty("Param"); bool display = checkParam->isChecked(); QString value = editParam->text(); updateProperty(pp,value,display); @@ -1093,19 +1340,19 @@ void ComponentDialog::slotApplyInput() } if(editStart != nullptr) { if(comboType->currentIndex() < 2 ) { - Property *pp = m_pComponent->Props.at(idxStart); // Start + Property *pp = originalComponent->Props.at(idxStart); // Start bool display = checkStart->isChecked(); QString value = editStart->text(); updateProperty(pp,value,display); pp->Name = "Start"; - pp = m_pComponent->Props.at(idxStart+1); // Stop + pp = originalComponent->Props.at(idxStart+1); // Stop display = checkStop->isChecked(); value = editStop->text(); updateProperty(pp,value,display); pp->Name = "Stop"; - pp = m_pComponent->Props.at(idxStart+2); + pp = originalComponent->Props.at(idxStart+2); if (pp != nullptr) { // Points/Values display = checkNumber->isChecked(); value = editNumber->text(); @@ -1116,14 +1363,14 @@ void ComponentDialog::slotApplyInput() } else { // If a value list is used, the properties "Start" and "Stop" are not // used. -> Call them "Symbol" to omit them in the netlist. - Property *pp = m_pComponent->Props.at(idxStart); + Property *pp = originalComponent->Props.at(idxStart); pp->Name = "Symbol"; pp->display = false; - pp = m_pComponent->Props.at(idxStart+1); + pp = originalComponent->Props.at(idxStart+1); pp->Name = "Symbol"; pp->display = false; - pp = m_pComponent->Props.at(idxStart+2); + pp = originalComponent->Props.at(idxStart+2); bool display = checkValues->isChecked(); QString value = "["+editValues->text()+"]"; @@ -1138,38 +1385,39 @@ void ComponentDialog::slotApplyInput() } } } + */ // pick selected row QTableWidgetItem *item = nullptr; // make sure we have one item, take selected - if (m_pPropertyTable->selectedItems().size() != 0) { - item = m_pPropertyTable->selectedItems()[0]; + if (propertyTable->selectedItems().size() != 0) { + item = propertyTable->selectedItems()[0]; } - /*! Walk the dialog list of 'm_pPropertyTable' - */ + /*! Walk the dialog list of 'propertyTable' if(item != nullptr) { int row = item->row(); - QString name = m_pPropertyTable->item(row, 0)->text(); - QString value = m_pPropertyTable->item(row, 1)->text(); + QString name = propertyTable->item(row, 0)->text(); + QString value = propertyTable->item(row, 1)->text(); // apply edit line if(value != edit->text()) { - m_pPropertyTable->item(row, 1)->setText(edit->text()); + propertyTable->item(row, 1)->setText(edit->text()); } // apply property name if (!NameEdit->isHidden()) { if (name != NameEdit->text()) { - m_pPropertyTable->item(row, 0)->setText(NameEdit->text()); + propertyTable->item(row, 0)->setText(NameEdit->text()); } } } + */ // apply all the new property values in the ListView - if (m_pComponent->isEquation) { + if (originalComponent->isEquation) { recreatePropsFromTable(); } else { fillPropsFromTable(); @@ -1177,20 +1425,20 @@ void ComponentDialog::slotApplyInput() if(changed) { int dx, dy; - m_pComponent->textSize(dx, dy); + originalComponent->textSize(dx, dy); if(tx_Dist != 0) { - m_pComponent->tx += tx_Dist-dx; + originalComponent->tx += tx_Dist-dx; tx_Dist = dx; } if(ty_Dist != 0) { - m_pComponent->ty += ty_Dist-dy; + originalComponent->ty += ty_Dist-dy; ty_Dist = dy; } - m_pDocument->recreateComponent(m_pComponent); - m_pDocument->viewport()->repaint(); - if ( (int) m_pComponent->Props.count() != m_pPropertyTable->rowCount()) { // If props count was changed after recreation - Q_ASSERT(m_pPropertyTable->rowCount() >= 0); + document->recreateComponent(originalComponent); + document->viewport()->repaint(); + if ( (int) originalComponent->Props.count() != propertyTable->rowCount()) { // If props count was changed after recreation + Q_ASSERT(propertyTable->rowCount() >= 0); updateCompPropsList(); // of component we need to update properties } } @@ -1201,10 +1449,10 @@ void ComponentDialog::slotApplyInput() void ComponentDialog::slotBrowseFile() { // current file name from the component properties - QString currFileName = m_pPropertyTable->item(m_pPropertyTable->currentRow(), 1)->text(); + QString currFileName = propertyTable->item(propertyTable->currentRow(), 1)->text(); QFileInfo currFileInfo(currFileName); // name of the schematic where component is instantiated (may be empty) - QFileInfo schematicFileInfo = m_pComponent->getSchematic()->getFileInfo(); + QFileInfo schematicFileInfo = originalComponent->getSchematic()->getFileInfo(); QString schematicFileName = schematicFileInfo.fileName(); // directory to use for the file open dialog QString currDir; @@ -1257,15 +1505,15 @@ void ComponentDialog::slotBrowseFile() } } edit->setText(s); - int row = m_pPropertyTable->currentRow(); - m_pPropertyTable->item(row,1)->setText(s); + int row = propertyTable->currentRow(); + propertyTable->item(row,1)->setText(s); } } // ------------------------------------------------------------------------- void ComponentDialog::slotEditFile() { - m_pDocument->App->editFile(misc::properAbsFileName(edit->text(), m_pDocument)); + document->App->editFile(misc::properAbsFileName(edit->text(), document)); } /*! @@ -1292,11 +1540,11 @@ void ComponentDialog::slotEditFile() void ComponentDialog::slotButtAdd() { // Set existing equation into focus, return - for(int row=0; row < m_pPropertyTable->rowCount(); row++) { - QString name = m_pPropertyTable->item(row, 0)->text(); + for(int row=0; row < propertyTable->rowCount(); row++) { + QString name = propertyTable->item(row, 0)->text(); if( name == NameEdit->text()) { - m_pPropertyTable->setCurrentItem(m_pPropertyTable->item(row,0)); - slotSelectProperty(m_pPropertyTable->item(row,0)); + propertyTable->setCurrentItem(propertyTable->item(row,0)); + slotSelectProperty(propertyTable->item(row,0)); return; } } @@ -1307,30 +1555,30 @@ void ComponentDialog::slotButtAdd() s = tr("yes"); // get number for selected row - int curRow = m_pPropertyTable->currentRow(); + int curRow = propertyTable->currentRow(); // insert new row under current int insRow = curRow+1; - m_pPropertyTable->insertRow(insRow); + propertyTable->insertRow(insRow); // append new row QTableWidgetItem *cell; cell = new QTableWidgetItem(NameEdit->text()); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - m_pPropertyTable->setItem(insRow, 0, cell); + propertyTable->setItem(insRow, 0, cell); cell = new QTableWidgetItem(edit->text()); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - m_pPropertyTable->setItem(insRow, 1, cell); + propertyTable->setItem(insRow, 1, cell); cell = new QTableWidgetItem(s); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - m_pPropertyTable->setItem(insRow, 2, cell); + propertyTable->setItem(insRow, 2, cell); // no description? add empty cell cell = new QTableWidgetItem(""); cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - m_pPropertyTable->setItem(insRow, 3, cell); + propertyTable->setItem(insRow, 3, cell); // select new row - m_pPropertyTable->selectRow(insRow); + propertyTable->selectRow(insRow); } /*! @@ -1341,27 +1589,27 @@ void ComponentDialog::slotButtAdd() */ void ComponentDialog::slotButtRem() { - if ((m_pPropertyTable->rowCount() < 3)&& - (m_pComponent->Model=="Eqn"||m_pComponent->Model=="NutmegEq")) + if ((propertyTable->rowCount() < 3)&& + (originalComponent->Model=="Eqn"||originalComponent->Model=="NutmegEq")) return; // the last property cannot be removed - if (m_pPropertyTable->rowCount() < 2) + if (propertyTable->rowCount() < 2) return; // the last property cannot be removed - QTableWidgetItem *item = m_pPropertyTable->selectedItems()[0]; + QTableWidgetItem *item = propertyTable->selectedItems()[0]; int row = item->row(); if(item == 0) return; // peek next, delete current, set next current - if ( row < m_pPropertyTable->rowCount()) { - m_pPropertyTable->setCurrentItem(m_pPropertyTable->item(row-1,0)); // Shift selection up - slotSelectProperty(m_pPropertyTable->item(row-1,0)); - m_pPropertyTable->removeRow(row); - if (!m_pPropertyTable->selectedItems().size()) { // The first item was removed - m_pPropertyTable->setCurrentItem(m_pPropertyTable->item(0,0)); // Select the first item - slotSelectProperty(m_pPropertyTable->item(0,0)); + if ( row < propertyTable->rowCount()) { + propertyTable->setCurrentItem(propertyTable->item(row-1,0)); // Shift selection up + slotSelectProperty(propertyTable->item(row-1,0)); + propertyTable->removeRow(row); + if (!propertyTable->selectedItems().size()) { // The first item was removed + propertyTable->setCurrentItem(propertyTable->item(0,0)); // Select the first item + slotSelectProperty(propertyTable->item(0,0)); } } } @@ -1372,27 +1620,27 @@ void ComponentDialog::slotButtRem() */ void ComponentDialog::slotButtUp() { - qDebug() << "slotButtUp" << m_pPropertyTable->currentRow() << m_pPropertyTable->rowCount(); + qDebug() << "slotButtUp" << propertyTable->currentRow() << propertyTable->rowCount(); - int curRow = m_pPropertyTable->currentRow(); + int curRow = propertyTable->currentRow(); if (curRow == 0) return; - if ((curRow == 1)&&(m_pComponent->Model=="NutmegEq")) + if ((curRow == 1)&&(originalComponent->Model=="NutmegEq")) return; // swap current and row above it - QTableWidgetItem *source = m_pPropertyTable->takeItem(curRow ,0); - QTableWidgetItem *target = m_pPropertyTable->takeItem(curRow-1,0); - m_pPropertyTable->setItem(curRow-1, 0, source); - m_pPropertyTable->setItem(curRow, 0, target); - source = m_pPropertyTable->takeItem(curRow ,1); - target = m_pPropertyTable->takeItem(curRow-1,1); - m_pPropertyTable->setItem(curRow-1, 1, source); - m_pPropertyTable->setItem(curRow, 1, target); + QTableWidgetItem *source = propertyTable->takeItem(curRow ,0); + QTableWidgetItem *target = propertyTable->takeItem(curRow-1,0); + propertyTable->setItem(curRow-1, 0, source); + propertyTable->setItem(curRow, 0, target); + source = propertyTable->takeItem(curRow ,1); + target = propertyTable->takeItem(curRow-1,1); + propertyTable->setItem(curRow-1, 1, source); + propertyTable->setItem(curRow, 1, target); // select moved row - m_pPropertyTable->selectRow(curRow-1); + propertyTable->selectRow(curRow-1); } /*! @@ -1401,29 +1649,29 @@ void ComponentDialog::slotButtUp() */ void ComponentDialog::slotButtDown() { - qDebug() << "slotButtDown" << m_pPropertyTable->currentRow() << m_pPropertyTable->rowCount(); + qDebug() << "slotButtDown" << propertyTable->currentRow() << propertyTable->rowCount(); - int curRow = m_pPropertyTable->currentRow(); + int curRow = propertyTable->currentRow(); // Leave Export as last - if ((curRow == m_pPropertyTable->rowCount()-2)&&(m_pComponent->Model=="Eqn")) + if ((curRow == propertyTable->rowCount()-2)&&(originalComponent->Model=="Eqn")) return; - if ((curRow == 0)&&(m_pComponent->Model=="NutmegEq")) // Don't let to shift the first property "Simulation=" + if ((curRow == 0)&&(originalComponent->Model=="NutmegEq")) // Don't let to shift the first property "Simulation=" return; - if ((curRow == m_pPropertyTable->rowCount()-1)) // Last property + if ((curRow == propertyTable->rowCount()-1)) // Last property return; // swap current and row below it - QTableWidgetItem *source = m_pPropertyTable->takeItem(curRow,0); - QTableWidgetItem *target = m_pPropertyTable->takeItem(curRow+1,0); - m_pPropertyTable->setItem(curRow+1, 0, source); - m_pPropertyTable->setItem(curRow, 0, target); - source = m_pPropertyTable->takeItem(curRow,1); - target = m_pPropertyTable->takeItem(curRow+1,1); - m_pPropertyTable->setItem(curRow+1, 1, source); - m_pPropertyTable->setItem(curRow, 1, target); + QTableWidgetItem *source = propertyTable->takeItem(curRow,0); + QTableWidgetItem *target = propertyTable->takeItem(curRow+1,0); + propertyTable->setItem(curRow+1, 0, source); + propertyTable->setItem(curRow, 0, target); + source = propertyTable->takeItem(curRow,1); + target = propertyTable->takeItem(curRow+1,1); + propertyTable->setItem(curRow+1, 1, source); + propertyTable->setItem(curRow, 1, target); // select moved row - m_pPropertyTable->selectRow(curRow+1); + propertyTable->selectRow(curRow+1); } // ------------------------------------------------------------------------- @@ -1442,6 +1690,7 @@ void ComponentDialog::slotSimTypeChange(int Type) checkStart->setChecked(true); checkStop->setChecked(true); } + /* textValues->setDisabled(true); editValues->setDisabled(true); checkValues->setDisabled(true); @@ -1456,6 +1705,8 @@ void ComponentDialog::slotSimTypeChange(int Type) textNumber->setDisabled(false); editNumber->setDisabled(false); checkNumber->setDisabled(false); + */ + if(Type == 1) // logarithmic ? textStep->setText(tr("Points per decade:")); else @@ -1466,7 +1717,7 @@ void ComponentDialog::slotSimTypeChange(int Type) editValues->setText(editStart->text() + "; " + editStop->text()); checkValues->setChecked(true); } - + /* textValues->setDisabled(false); editValues->setDisabled(false); checkValues->setDisabled(false); @@ -1482,6 +1733,7 @@ void ComponentDialog::slotSimTypeChange(int Type) editNumber->setDisabled(true); checkNumber->setDisabled(true); textStep->setText(tr("Step:")); + */ } } @@ -1579,7 +1831,7 @@ void ComponentDialog::slotSimEntered(int) // Is called if return is pressed in LineEdit "Values". void ComponentDialog::slotValuesEntered() { - slotButtOK(); + slotOKButton(); } // ------------------------------------------------------------------------- @@ -1607,7 +1859,7 @@ void ComponentDialog::slotStepEntered() // Is called if return is pressed in LineEdit "Number". void ComponentDialog::slotNumberEntered() { - slotButtOK(); + slotOKButton(); } // if clicked on 'display' header toggle visibility for all items @@ -1627,18 +1879,19 @@ void ComponentDialog::slotHHeaderClicked(int headerIdx) } // go through all the properties table and set the visibility cell - for (int row = 0; row < m_pPropertyTable->rowCount(); row++) { - cell = m_pPropertyTable->item(row, 2); + for (int row = 0; row < propertyTable->rowCount(); row++) { + cell = propertyTable->item(row, 2); cell->setText(s); } setAllVisible = not setAllVisible; // toggle visibility for the next double-click } - +// ------------------------------------------------------------------------- +// Get a list of simulations in the schematic. QStringList ComponentDialog::getSimulationList() { QStringList sim_lst; - Schematic *sch = m_pComponent->getSchematic(); + Schematic *sch = originalComponent->getSchematic(); if (sch == nullptr) { return sim_lst; } @@ -1669,7 +1922,7 @@ QStringList ComponentDialog::getSimulationList() void ComponentDialog::slotFillFromSpice() { - fillFromSpiceDialog *dlg = new fillFromSpiceDialog(m_pComponent, this); + fillFromSpiceDialog *dlg = new fillFromSpiceDialog(originalComponent, this); auto r = dlg->exec(); if (r == QDialog::Accepted) { updateCompPropsList(); @@ -1677,46 +1930,51 @@ void ComponentDialog::slotFillFromSpice() delete dlg; } - +// Updates a component's properties from the contents of the propertyTable. void ComponentDialog::fillPropsFromTable() { - for( int row = 0; row < m_pPropertyTable->rowCount(); row++ ) { - QString name = m_pPropertyTable->item(row, 0)->text(); - QString value = m_pPropertyTable->item(row, 1)->text(); - QString disp = m_pPropertyTable->item(row, 2)->text(); - QString desc = m_pPropertyTable->item(row, 3)->text(); + /* + for( int row = 0; row < propertyTable->rowCount(); row++ ) { + QString name = propertyTable->item(row, 0)->text(); + QString value = propertyTable->item(row, 1)->text(); + QString disp = propertyTable->item(row, 2)->text(); + QString desc = propertyTable->item(row, 3)->text(); bool display = (disp == tr("yes")); - if (compIsSimulation) { + if (originalComponent->isSimulation) { // Get property by name - auto pp = m_pComponent->getProperty(name); + auto pp = originalComponent->getProperty(name); if (pp != nullptr) { updateProperty(pp,value,display); } } else { // Other components may have properties with duplicate names - if (row < m_pComponent->Props.count()) { - auto pp = m_pComponent->Props[row]; + if (row < originalComponent->Props.count()) { + auto pp = originalComponent->Props[row]; if (pp->Name == name) { updateProperty(pp,value,display); } } } } + */ } +// Used by equations to recreate the property list from the table. +// This is because equations have a variable number of properties +// and the order of those properties can change. void ComponentDialog::recreatePropsFromTable() { - if (!m_pComponent->isEquation) return; // add / remove properties allowed only for equations + if (!originalComponent->isEquation) return; // add / remove properties allowed only for equations - if (m_pComponent->Props.size() != m_pPropertyTable->rowCount()) { + if (originalComponent->Props.size() != propertyTable->rowCount()) { changed = true; // Added or removed properties } else { - for( int row = 0; row < m_pPropertyTable->rowCount(); row++ ) { - QString name = m_pPropertyTable->item(row, 0)->text(); - QString value = m_pPropertyTable->item(row, 1)->text(); - QString disp = m_pPropertyTable->item(row, 2)->text(); + for( int row = 0; row < propertyTable->rowCount(); row++ ) { + QString name = propertyTable->item(row, 0)->text(); + QString value = propertyTable->item(row, 1)->text(); + QString disp = propertyTable->item(row, 2)->text(); bool display = (disp == tr("yes")); - auto pp = m_pComponent->Props.at(row); + auto pp = originalComponent->Props.at(row); if ((pp->Name != name) || (pp->Value != value) || (pp->display != display)) { changed = true; // reordered or edited properties @@ -1729,16 +1987,16 @@ void ComponentDialog::recreatePropsFromTable() return; } - for (auto pp: m_pComponent->Props) { + for (auto pp: originalComponent->Props) { delete pp; pp = nullptr; } - m_pComponent->Props.clear(); - for( int row = 0; row < m_pPropertyTable->rowCount(); row++ ) { - QString name = m_pPropertyTable->item(row, 0)->text(); - QString value = m_pPropertyTable->item(row, 1)->text(); - QString disp = m_pPropertyTable->item(row, 2)->text(); - QString desc = m_pPropertyTable->item(row, 3)->text(); + originalComponent->Props.clear(); + for( int row = 0; row < propertyTable->rowCount(); row++ ) { + QString name = propertyTable->item(row, 0)->text(); + QString value = propertyTable->item(row, 1)->text(); + QString disp = propertyTable->item(row, 2)->text(); + QString desc = propertyTable->item(row, 3)->text(); bool display = (disp == tr("yes")); Property *pp = new Property; @@ -1746,7 +2004,7 @@ void ComponentDialog::recreatePropsFromTable() pp->Value = value; pp->display = display; pp->Description = desc; - m_pComponent->Props.append(pp); + originalComponent->Props.append(pp); } } diff --git a/qucs/components/componentdialog.h b/qucs/components/componentdialog.h index af3aa5b49..c255174c6 100644 --- a/qucs/components/componentdialog.h +++ b/qucs/components/componentdialog.h @@ -36,9 +36,13 @@ class QCheckBox; class QRegExp; class QComboBox; class QPushButton; +class QGridLayout; class BoundLineEdit; +class ParamWidget; +// struct SweepUISettingType; +struct QStringPair; class ComponentDialog : public QDialog { Q_OBJECT @@ -47,10 +51,11 @@ class ComponentDialog : public QDialog { ~ComponentDialog(); private slots: - void slotButtOK(); - void slotButtCancel(); + void slotOKButton(); + void slotApplyButton(); + // void slotCancelButton(); + void slotSelectProperty(QTableWidgetItem *item); - void slotApplyInput(); void slotApplyState(int State); void slotBrowseFile(); void slotEditFile(); @@ -78,8 +83,10 @@ private slots: void slotHHeaderClicked(int headerIdx); void slotFillFromSpice(); + void slotUpdateSweepWidgets(const QString& sweepType, QGridLayout* sweepPageLayout); + protected slots: - void reject(); + // void reject(); bool eventFilter(QObject *obj, QEvent *event); private: @@ -88,10 +95,20 @@ protected slots: QRegularExpression Expr; QIntValidator *ValInteger; - QTableWidget *m_pPropertyTable; - Component *m_pComponent; - Schematic *m_pDocument; - Component localComponent; + QTableWidget *propertyTable; + Component *originalComponent; + Schematic *document; + Component editComponent; + + // Maps to contain specialisations for different sweep types. Note: the arrangement + // has been chosen to have the smallest number of map elements. + // TODO: Make these constant once settled, see https://stackoverflow.com/questions/2636303/how-to-initialize-a-private-static-const-map-in-c + QMap > sweepTypeSpecialLabels; + QMap sweepTypeEnabledParams; + QMap sweepTypeHiddenParams; + + // Maps to store references to edit widgets. + QMap sweepParam; BoundLineEdit* mpNameLineEdit; @@ -106,7 +123,6 @@ protected slots: bool changed; int tx_Dist, ty_Dist; // remember the text position bool setAllVisible; // used for toggling visibility of properties - bool compIsSimulation; QLabel *textType; QLabel *textSim, *textParam, *textValues, *textStart, *textStop, @@ -117,13 +133,53 @@ protected slots: *checkNumber, *checkType, *showName; QComboBox *comboSim, *comboType; - void updateCompPropsList(void); QStringList getSimulationList(); + void updateCompPropsList(void); + void updateSimProperty(const QString& propertyWidget, const QString& value); + void updateSimWidgets(const QString& simType); + void fillPropsFromTable(); void recreatePropsFromTable(); bool propChanged(Property *pp, const QString &value, const bool display); void updateProperty(Property *pp, const QString &value, const bool display); + + enum CELL_TYPE { LabelCell = 1000, TextEditCell, ComboBoxCell, CheckBoxCell}; }; +// Helper structures to manage specialisation of sweep UI presentation. +// enum RELATION { StepToNumber, NumberToStep }; + +// struct RelatedParameterType +// { +// RelatedParameterType(const QString& a, RELATION b) +// : relatedParameter(a), relation(b) {} + +// QString relatedParameter; +// RELATION relation; +// }; + +// struct SweepUISettingType +// { +// SweepUISettingType(const QString& a, const QString& b, const QStringList& c, bool d, bool e, QList f = {}) +// : label(a), value(b), options(c), enabled(d), visible(e), relatedParameters(f) {} +// QString label; +// QString value; +// QStringList options; +// bool enabled; +// bool visible; +// QList relatedParameters; +// }; +// typedef QList SweepSettingUIList; + +struct QStringPair +{ + QStringPair(const QString& b, const QString& a) + : first(a), second(b) {} + + QString first; + QString second; +}; + + #endif From 1696ed0e2e4a7e50f45addad5fb763481dcaadcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Muhammet=20=C5=9E=C3=BCkr=C3=BC=20Demir?= <41967334+dsm@users.noreply.github.com> Date: Thu, 7 Nov 2024 15:01:33 +0300 Subject: [PATCH 12/15] Update Qt to v6.8.0 LTS --- .github/workflows/deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ba3217a20..acc0d6f46 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,7 +15,7 @@ env: EXECUTABLE_NAME: "qucs-s" PUBLISHER_NAME: "The Qucs-S Team" BUILD_TYPE: Release - QT_VERSION: 6.7.2 + QT_VERSION: 6.8.0 QUCS_MACOS_BIN: build/qucs/qucs-s.app/Contents/MacOS/bin QUCS_MACOS_RESOURCES: build/qucs/qucs-s.app/Contents/MacOS/share/qucs-s NGSPICE_URL: https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/43/ngspice-43_64.7z @@ -62,7 +62,7 @@ jobs: - name: Install Dependencies run: | sudo apt-get update - sudo apt-get install -y libglx-dev libgl1-mesa-dev flex bison gperf dos2unix flex bison gperf dos2unix + sudo apt-get install -y libglx-dev libgl1-mesa-dev flex bison gperf dos2unix flex bison gperf dos2unix cups libcups2-dev sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 - name: 'Install Qt6' @@ -255,7 +255,7 @@ jobs: run: | cmake -B ${{github.workspace}}/build -G 'Ninja' \ -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_QT6=1 \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ -DCI_VERSION="${{env.VERSION}}" From 468bc55132044d7b7b4090e3c9fde224ac3d79d6 Mon Sep 17 00:00:00 2001 From: Iwbnwif Yiw Date: Fri, 8 Nov 2024 19:56:55 +0000 Subject: [PATCH 13/15] First minimum inviable state. File open and edit buttons not implemented. Step and Points fields do not auto update. Open SPICE file not implemented. qDebug() statements will be largely removed after this commit. --- qucs/components/componentdialog.cpp | 1625 ++++----------------------- qucs/components/componentdialog.h | 124 +- 2 files changed, 267 insertions(+), 1482 deletions(-) diff --git a/qucs/components/componentdialog.cpp b/qucs/components/componentdialog.cpp index deb7ae5bb..993d2b7c7 100644 --- a/qucs/components/componentdialog.cpp +++ b/qucs/components/componentdialog.cpp @@ -24,28 +24,6 @@ #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include -// #include - - -// TODO: Make this a member, but at the moment it is causing a segfault, probably -// because of abi incompatibility with some library found at runtime (adding a QString -// also causes the same problem) -// QMap, SweepSettingUIList> sweepSpecs; - - // ------------------------------------------------------------------------- // Convenience base class to add a label, name, checkbox and bind them to a variable. class BoundControl @@ -166,11 +144,16 @@ QStringList getOptionsFromString(const QString& description) // Check description for combo box options and create a combo box if found. int start = description.indexOf('['); int end = description.indexOf(']'); + QStringList list, options; if (start != -1 && end != -1) - return description.mid(start + 1, end - start - 1).split(','); + { + list = description.mid(start + 1, end - start - 1).split(','); + for(auto entry : list) + options << entry.trimmed(); + } - return QStringList(); + return options; } // ------------------------------------------------------------------------- @@ -201,6 +184,11 @@ class ParamWidget mCheckBox->setCheckState(checked ? Qt::Checked : Qt::Unchecked); } + bool check() + { + return (mCheckBox->checkState() == Qt::Checked); + } + virtual void setEnabled(bool enabled) { mLabel->setEnabled(enabled); @@ -318,15 +306,13 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* schematic) originalComponent = component; document = schematic; - qDebug() << "Processing component: " << editComponent.Model << " name: " << editComponent.Name; + qDebug() << "Processing component: " << component->Model << " name: " << component->Name; // Make a deep copy of component for edit editing (will be discarded if user cancels). editComponent = *component; editComponent.Props = component->Props; changed = false; - // sweepSpecs[qMakePair(QString("a"), QString("b"))] = {{"label", "value", {}, false, true, {{"number", StepToNumber}}}, {"label", "value", {}, true, true}}; - restoreGeometry(_settings::Get().item("ComponentDialog/geometry")); setWindowTitle(tr("Edit Component Properties") + " - " + originalComponent->Description.toUpper()); @@ -347,382 +333,105 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* schematic) mpNameLineEdit = new BoundLineEdit("Name:", editComponent.Name, editComponent.showName, mainLayout, Validator); - - // last property shown elsewhere outside the properties table, not to put in TableView ? - // auto pp = originalComponent->Props.begin(); + // Try to work out what kind of component this is. + isEquation = QStringList({"Eqn", "NutmegEq"}).contains(originalComponent->Model); + hasSweep = QStringList({".AC", ".NOISE", ".SW", ".SP", ".TR"}).contains(originalComponent->Model); + sweepProperties = QStringList({"Sim", "Param", "Type", "Values", "Start", "Stop", "Points"}); - // TODO: It would be better for simulations with sweeps to have a flag saying so. - QStringList hasSweep({".SW", ".SP", ".AC", ".NOISE"}); - QStringList sweepProperties({"Sim", "Param", "Type", "Values", "Start", "Stop", "Points"}); - - if (originalComponent->isSimulation && - hasSweep.contains(originalComponent->Model)) + if (isEquation) { - // Create tab widget to hold both sweep and parameter pages. - QTabWidget* pageTabs = new QTabWidget(this); - layout()->addWidget(pageTabs); - - // Simulations have a separate sweep page. - QWidget* sweepPage = new QWidget(pageTabs); - pageTabs->addTab(sweepPage, tr("Sweep")); - QGridLayout* sweepPageLayout = new QGridLayout; - sweepPage->setLayout(sweepPageLayout); - - // Sweep page setup - add widgets for each possible sweep property. - sweepParam["Sim"] = new ParamCombo("Sim", sweepPageLayout, this, &ComponentDialog::updateSimProperty); - sweepParam["Param"] = new ParamLineEdit("Param", sweepPageLayout, this, &ComponentDialog::updateSimProperty); - sweepParam["Type"] = new ParamCombo("Type", sweepPageLayout, this, &ComponentDialog::updateSimProperty); - sweepParam["Values"] = new ParamLineEdit("Values", sweepPageLayout, this, &ComponentDialog::updateSimProperty); - sweepParam["Start"] = new ParamLineEdit("Start", sweepPageLayout, this, &ComponentDialog::updateSimProperty); - sweepParam["Stop"] = new ParamLineEdit("Stop", sweepPageLayout, this, &ComponentDialog::updateSimProperty); - sweepParam["Number"] = new ParamLineEdit("Number", sweepPageLayout, this, &ComponentDialog::updateSimProperty); - - sweepParam["Type"]->setOptions({"lin", "log", "list", "value"}); - sweepParam["Type"]->setValue("lin"); - - // Setup the widget specialisations for each simulation type. - sweepTypeEnabledParams["lin"] = QStringList{"Sim", "Param", "Type", "Start", "Stop", "Step", "Number"}; - sweepTypeEnabledParams["log"] = QStringList{"Sim", "Param", "Type", "Start", "Stop", "Step", "Number"}; - sweepTypeEnabledParams["list"] = QStringList{"Type", "Values"}; - sweepTypeEnabledParams["value"] = QStringList{"Type", "Values"}; - sweepTypeHiddenParams["Sim"] = QStringList{".AC"}; - sweepTypeHiddenParams["Param"] = QStringList{".AC"}; - sweepTypeSpecialLabels["log"] = {{"Step:", "Points per decade"}}; - - updateSimWidgets("lin"); // editComponent.getProperty("Type")->Name); - updateSimProperty("All", ""); - - - /* - - editParam = new QLineEdit(sweepPage); - if (originalComponent->Model != ".SW") editParam->setValidator(ValRestrict); - connect(editParam, SIGNAL(returnPressed()), SLOT(slotParamEntered())); - checkParam = new QCheckBox(tr("display in schematic"), sweepPage); - - if(originalComponent->Model == ".SW") { // parameter sweep - textSim = new QLabel(tr("Simulation:"), sweepPage); - sweepPageLayout->addWidget(textSim, row,0); - comboSim = new QComboBox(sweepPage); - comboSim->setEditable(true); - connect(comboSim, SIGNAL(activated(int)), SLOT(slotSimEntered(int))); - sweepPageLayout->addWidget(comboSim, row,1); - checkSim = new QCheckBox(tr("display in schematic"), sweepPage); - sweepPageLayout->addWidget(checkSim, row++,2); - } - else { - editParam->setReadOnly(true); - checkParam->setDisabled(true); - - if(originalComponent->Model == ".TR") // transient simulation ? - editParam->setText("time"); - else { - if(originalComponent->Model == ".AC") // AC simulation ? - editParam->setText("acfrequency"); - else - editParam->setText("frequency"); - } - } - - sweepPageLayout->addWidget(new QLabel(tr("Sweep Parameter:"), sweepPage), row,0); - sweepPageLayout->addWidget(editParam, row,1); - sweepPageLayout->addWidget(checkParam, row++,2); + qDebug() << "This is an equation"; -*/ - - /* - comboType = new QComboBox(sweepPage); - comboType->hide(); - checkType = new QCheckBox(tr("display in schematic"), sweepPage); - checkType->hide(); - editValues = new QLineEdit(sweepPage); - editValues->hide(); - checkValues = new QCheckBox(tr("display in schematic"), sweepPage); - checkValues->hide(); - editStart = new QLineEdit(sweepPage); - editStart->hide(); - checkStart = new QCheckBox(tr("display in schematic"), sweepPage); - checkStart->hide(); - editStop = new QLineEdit(sweepPage); - editStop->hide(); - checkStop = new QCheckBox(tr("display in schematic"), sweepPage); - checkStop->hide(); - editStep = new QLineEdit(sweepPage); - editStep->hide(); - editNumber = new QLineEdit(sweepPage); - editNumber->hide(); - checkNumber = new QCheckBox(tr("display in schematic"), sweepPage); - checkNumber->hide(); - */ - -/* - textType = new QLabel(tr("Type:"), sweepPage); - sweepPageLayout->addWidget(textType, row,0); - comboType->insertItems(0, QStringList({"linear", "logarithmic", "list", "constant"})); - - sweepPageLayout->addWidget(comboType, row,1); - connect(comboType, SIGNAL(activated(int)), SLOT(slotSimTypeChange(int))); - sweepPageLayout->addWidget(checkType, row++,2); - - textValues = new QLabel(tr("Values:"), sweepPage); - sweepPageLayout->addWidget(textValues, row,0); - editValues->setValidator(Validator); - connect(editValues, SIGNAL(returnPressed()), SLOT(slotValuesEntered())); - sweepPageLayout->addWidget(editValues, row,1); - sweepPageLayout->addWidget(checkValues, row++,2); - - textStart = new QLabel(tr("Start:"), sweepPage); - sweepPageLayout->addWidget(textStart, row,0); - editStart->setValidator(Validator); - connect(editStart, SIGNAL(returnPressed()), SLOT(slotStartEntered())); - sweepPageLayout->addWidget(editStart, row,1); - sweepPageLayout->addWidget(checkStart, row++,2); - - textStop = new QLabel(tr("Stop:"), sweepPage); - sweepPageLayout->addWidget(textStop, row,0); - editStop->setValidator(Validator); - connect(editStop, SIGNAL(returnPressed()), SLOT(slotStopEntered())); - sweepPageLayout->addWidget(editStop, row,1); - sweepPageLayout->addWidget(checkStop, row++,2); - - textStep = new QLabel(tr("Step:"), sweepPage); - sweepPageLayout->addWidget(textStep, row,0); - editStep->setValidator(Validator); - connect(editStep, SIGNAL(returnPressed()), SLOT(slotStepEntered())); - sweepPageLayout->addWidget(editStep, row++,1); - - textNumber = new QLabel(tr("Number:"), sweepPage); - sweepPageLayout->addWidget(textNumber, row,0); - editNumber->setValidator(ValInteger); - connect(editNumber, SIGNAL(returnPressed()), SLOT(slotNumberEntered())); - sweepPageLayout->addWidget(editNumber, row,1); - sweepPageLayout->addWidget(checkNumber, row++,2); -*/ + // Create the equation editor. + QGroupBox *editorGroup = new QGroupBox(tr("Equation Editor")); + static_cast(layout())->addWidget(editorGroup, 2); + QVBoxLayout *editorLayout = new QVBoxLayout(editorGroup); - /* - // TODO: Get rid of this. - QString s; - - // Parameter sweep. - if(false) // originalComponent->Model == ".SW") - { - // Add all sweep components (starting with a .) to the combo box. + eqnSimCombo = new QComboBox(); + eqnSimCombo->addItems(getSimulationList()); + editorLayout->addWidget(eqnSimCombo, 2); + + QFont font("Courier", 10); + eqnEditor = new QTextEdit(); + eqnEditor->setFont(font); + editorLayout->addWidget(eqnEditor, 2); - Component* component; - for (component = document->Components->first(); component != 0; document->Components->next()) - { - if (component != originalComponent && component->Model[0] == '.') - comboSim->insertItem(comboSim->count(), component->Name); - } - - qDebug() << "[]" << (*pp)->Value; - // set selected simulations in combo box to the currently used one - int i = comboSim->findText((*pp)->Value); - if (i != -1) // current simulation is in the available simulations list (normal case) - comboSim->setCurrentIndex(i); - else // current simulation not in the available simulations list - comboSim->setEditText((*pp)->Value); - - checkSim->setChecked((*pp)->display); - ++pp; - s = (*pp)->Value; - checkType->setChecked((*pp)->display); - ++pp; - editParam->setText((*pp)->Value); - checkParam->setChecked((*pp)->display); - } - else { - s = (*pp)->Value; - checkType->setChecked((*pp)->display); - } + updateEqnEditor(); + } - ++pp; - editStart->setText((*pp)->Value); - checkStart->setChecked((*pp)->display); - ++pp; - editStop->setText((*pp)->Value); - checkStop->setChecked((*pp)->display); - ++pp; // remember last property for ListView - editNumber->setText((*pp)->Value); - checkNumber->setChecked((*pp)->display); - */ - - /* Converts sweep type text into a number and calls to update - int tNum = 0; - if (s[0] == 'l') + else + { + if (hasSweep) { - if(s[1] == 'i') - { - if(s[2] != 'n') - tNum = 2; - } - else tNum = 1; + // Create tab widget to hold both sweep and parameter pages. + QTabWidget* pageTabs = new QTabWidget(this); + layout()->addWidget(pageTabs); + + // Simulations have a separate sweep page. + QWidget* sweepPage = new QWidget(pageTabs); + pageTabs->addTab(sweepPage, tr("Sweep")); + QGridLayout* sweepPageLayout = new QGridLayout; + sweepPage->setLayout(sweepPageLayout); + + // Sweep page setup - add widgets for each possible sweep property. + sweepParamWidget["Sim"] = new ParamCombo("Sim", sweepPageLayout, this, &ComponentDialog::updateSweepProperty); + sweepParamWidget["Param"] = new ParamLineEdit("Param", sweepPageLayout, this, &ComponentDialog::updateSweepProperty); + sweepParamWidget["Type"] = new ParamCombo("Type", sweepPageLayout, this, &ComponentDialog::updateSweepProperty); + sweepParamWidget["Values"] = new ParamLineEdit("Values", sweepPageLayout, this, &ComponentDialog::updateSweepProperty); + sweepParamWidget["Start"] = new ParamLineEdit("Start", sweepPageLayout, this, &ComponentDialog::updateSweepProperty); + sweepParamWidget["Stop"] = new ParamLineEdit("Stop", sweepPageLayout, this, &ComponentDialog::updateSweepProperty); + sweepParamWidget["Points"] = new ParamLineEdit("Points", sweepPageLayout, this, &ComponentDialog::updateSweepProperty); + + // Setup the widget specialisations for each simulation type. + sweepTypeEnabledParams["lin"] = QStringList{"Sim", "Param", "Type", "Start", "Stop", "Step", "Points"}; + sweepTypeEnabledParams["log"] = QStringList{"Sim", "Param", "Type", "Start", "Stop", "Step", "Points"}; + sweepTypeEnabledParams["list"] = QStringList{"Type", "Values"}; + sweepTypeEnabledParams["value"] = QStringList{"Type", "Values"}; + sweepTypeSpecialLabels["log"] = {{"Step:", "Points per decade"}}; + paramsHiddenBySim["Sim"] = QStringList{".AC", ".SP"}; + paramsHiddenBySim["Param"] = QStringList{".AC", ".SP"}; + + // Setup the widgets as per the stored type. + sweepParamWidget["Type"]->setOptions({"lin", "log", "list", "value"}); + updateSweepProperty("All", ""); + + // Create the properties page and add it to the tab widget. + QWidget* propertiesPage = new QWidget(pageTabs); + pageTabs->addTab(propertiesPage, tr("Properties")); + propertiesPageLayout = new QGridLayout(propertiesPage); } - else tNum = 3; - // comboType->setCurrentIndex(tNum); - - slotSimTypeChange(tNum); // not automatically ?!? - if (tNum > 1) - { - editValues->setText( - editNumber->text().mid(1, editNumber->text().length() - 2)); - checkValues->setChecked((*pp)->display); - editNumber->setText("2"); + // This component does not have sweep settings, add properties directly to the dialog itself. + else + { + propertiesPageLayout = new QGridLayout(this); + static_cast(layout())->addLayout(propertiesPageLayout); } - slotNumberChanged(0); - ++pp; - */ - -/* connect(editValues, SIGNAL(textChanged(const QString&)), - SLOT(slotTextChanged(const QString&))); - connect(editStart, SIGNAL(textChanged(const QString&)), - SLOT(slotNumberChanged(const QString&))); - connect(editStop, SIGNAL(textChanged(const QString&)), - SLOT(slotNumberChanged(const QString&))); - connect(editStep, SIGNAL(textChanged(const QString&)), - SLOT(slotStepChanged(const QString&))); - connect(editNumber, SIGNAL(textChanged(const QString&)), - SLOT(slotNumberChanged(const QString&))); -*/ -/* if(checkSim) - connect(checkSim, SIGNAL(stateChanged(int)), SLOT(slotSetChanged(int))); - connect(checkType, SIGNAL(stateChanged(int)), SLOT(slotSetChanged(int))); - connect(checkParam, SIGNAL(stateChanged(int)), SLOT(slotSetChanged(int))); - connect(checkStart, SIGNAL(stateChanged(int)), SLOT(slotSetChanged(int))); - connect(checkStop, SIGNAL(stateChanged(int)), SLOT(slotSetChanged(int))); - connect(checkNumber, SIGNAL(stateChanged(int)), SLOT(slotSetChanged(int))); -*/ - // Create the properties page and add it to the tab widget. - QWidget* propertiesPage = new QWidget(pageTabs); - pageTabs->addTab(propertiesPage, tr("Properties")); - propertiesPageLayout = new QGridLayout(propertiesPage); - } - - // This component does not have sweep settings, add properties directly to the dialog itself. - else - { - propertiesPageLayout = new QGridLayout(this); - static_cast(layout())->addLayout(propertiesPageLayout); - } + // Create the properties table. + QGroupBox *propertyGroup = new QGroupBox(tr("Properties")); + propertiesPageLayout->addWidget(propertyGroup, 2, 0); + QHBoxLayout *propertyTableLayout = new QHBoxLayout(propertyGroup); + + /// \todo column min width + make widths persistent + propertyTable = new QTableWidget(0, 4); + propertyTable->setMinimumSize(200, 150); + propertyTable->verticalHeader()->setVisible(false); + propertyTable->horizontalHeader()->setStretchLastSection(true); + propertyTable->horizontalHeader()->setSectionsClickable(false); + propertyTable->setHorizontalHeaderLabels({tr("Name"), tr("Value"), tr("Show"), tr("Description")}); + propertyTable->setColumnWidth(0, 100); + propertyTable->setColumnWidth(1, 150); + propertyTable->setColumnWidth(2, 50); + propertyTable->setSelectionMode(QAbstractItemView::SingleSelection); + propertyTableLayout->addWidget(propertyTable, 2); - // Create the properties table. - QGroupBox *propertyGroup = new QGroupBox(tr("Properties")); - propertiesPageLayout->addWidget(propertyGroup, 2, 0); - QHBoxLayout *propertyTableLayout = new QHBoxLayout(propertyGroup); - - /// \todo column min width + make widths persistent - propertyTable = new QTableWidget(0, 4); - propertyTable->setMinimumSize(200, 150); - propertyTable->verticalHeader()->setVisible(false); - propertyTable->horizontalHeader()->setStretchLastSection(true); - propertyTable->horizontalHeader()->setSectionsClickable(false); - propertyTable->setHorizontalHeaderLabels({tr("Name"), tr("Value"), tr("Show"), tr("Description")}); - propertyTable->setColumnWidth(0, 100); - propertyTable->setColumnWidth(1, 150); - propertyTable->setColumnWidth(2, 50); - propertyTable->setSelectionMode(QAbstractItemView::SingleSelection); - // propertyTable->setSelectionBehavior(QAbstractItemView::SelectRows); - propertyTableLayout->addWidget(propertyTable, 2); - - // Doubleclick header to set all visible (TODO: Replace with button). - connect(propertyTable->horizontalHeader(),SIGNAL(sectionDoubleClicked(int)), - this, SLOT(slotHHeaderClicked(int))); - - connect(propertyTable, &QTableWidget::cellActivated, [=](int row, int column) { qDebug() << "Activated " << row << "," << column; } ); - connect(propertyTable, &QTableWidget::cellClicked, [=](int row, int column) { qDebug() << "Clicked " << row << "," << column; } ); - connect(propertyTable, &QTableWidget::cellPressed, [=](int row, int column) { qDebug() << "Pressed " << row << "," << column; } ); - connect(propertyTable, &QTableWidget::cellEntered, [=](int row, int column) { qDebug() << "Entered " << row << "," << column; } ); - - - /* Right panel with buttons etc. - QWidget *vboxPropsR = new QWidget; - QVBoxLayout *v1 = new QVBoxLayout; - vboxPropsR->setLayout(v1); - - v1->setSpacing(3); - - // propertyTableLayout->addWidget(vboxPropsL, 5); // stretch the left pane (with the table) when resized - propertyTableLayout->addWidget(vboxPropsR); - - Name = new QLabel; - v1->addWidget(Name); - - Description = new QLabel; - v1->addWidget(Description); - - // hide, because it only replaces 'Description' in some cases - NameEdit = new QLineEdit; - v1->addWidget(NameEdit); - NameEdit->setVisible(false); - NameEdit->setValidator(ValRestrict); - connect(NameEdit, SIGNAL(returnPressed()), SLOT(slotApplyPropName())); - - edit = new QLineEdit; - v1->addWidget(edit); - edit->setMinimumWidth(150); - edit->setValidator(Validator2); - connect(edit, SIGNAL(returnPressed()), SLOT(slotApplyProperty())); - - // hide, because it only replaces 'edit' in some cases - ComboEdit = new QComboBox; - v1->addWidget(ComboEdit); - ComboEdit->setVisible(false); - ComboEdit->installEventFilter(this); // to catch Enter keypress - connect(ComboEdit, SIGNAL(activated(int)), - SLOT(slotApplyChange(int))); - - QHBoxLayout *h3 = new QHBoxLayout; - v1->addLayout(h3); - - EditButt = new QPushButton(tr("Edit")); - h3->addWidget(EditButt); - EditButt->setEnabled(false); - EditButt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - connect(EditButt, SIGNAL(clicked()), SLOT(slotEditFile())); - - BrowseButt = new QPushButton(tr("Browse")); - h3->addWidget(BrowseButt); - BrowseButt->setEnabled(false); - BrowseButt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - connect(BrowseButt, SIGNAL(clicked()), SLOT(slotBrowseFile())); - - disp = new QCheckBox(tr("display in schematic")); - v1->addWidget(disp); - connect(disp, SIGNAL(stateChanged(int)), SLOT(slotApplyState(int))); - - // keep group above together - v1->addStretch(5); - - QGridLayout *bg = new QGridLayout; - v1->addLayout(bg); - ButtAdd = new QPushButton(tr("Add")); - bg->addWidget(ButtAdd, 0, 0); - ButtAdd->setEnabled(false); - ButtRem = new QPushButton(tr("Remove")); - bg->addWidget(ButtRem, 0, 1); - ButtRem->setEnabled(false); - connect(ButtAdd, SIGNAL(clicked()), SLOT(slotButtAdd())); - connect(ButtRem, SIGNAL(clicked()), SLOT(slotButtRem())); - // Buttons to move equations up/down on the list - ButtUp = new QPushButton(tr("Move Up")); - bg->addWidget(ButtUp, 1, 0); - ButtDown = new QPushButton(tr("Move Down")); - bg->addWidget(ButtDown, 1, 1); - connect(ButtUp, SIGNAL(clicked()), SLOT(slotButtUp())); - connect(ButtDown, SIGNAL(clicked()), SLOT(slotButtDown())); - */ - - /* Fill from Spice function ***TODO*** do not delete. - QStringList allowedFillFromSPICE({"_BJT", "JFET", "MOSFET", "_MOSFET", "Diode", "BJT"}); - ButtFillFromSpice = new QPushButton(tr("Fill from SPICE .MODEL")); - if (!allowedFillFromSPICE.contains(originalComponent->Model)) { - ButtFillFromSpice->setEnabled(false); + updatePropertyTable(); + + // Try to move the cursor to the editable cell if any cell is clicked. + connect(propertyTable, &QTableWidget::cellClicked, + [=](int row, int column) { (void)column; propertyTable->setCurrentCell(row, 1); } ); } - bg->addWidget(ButtFillFromSpice,2,0,1,2); - connect(ButtFillFromSpice, SIGNAL(clicked(bool)), this, SLOT(slotFillFromSpice())); - */ // Add the dialog button widgets. QDialogButtonBox* buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | @@ -732,61 +441,6 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* schematic) connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); connect(buttonBox->button(QDialogButtonBox::Apply), &QPushButton::clicked, this, &ComponentDialog::slotApplyButton); mainLayout->addWidget(buttonBox); - - /* vvvv Why does the text position need to be modified vvvv. - - // originalComponent->textSize(tx_Dist, ty_Dist); - // int tmp = originalComponent->tx+tx_Dist - originalComponent->x1; - // if((tmp > 0) || (tmp < -6)) tx_Dist = 0; // remember the text position - // tmp = originalComponent->ty+ty_Dist - originalComponent->y1; - // if((tmp > 0) || (tmp < -6)) ty_Dist = 0; - */ - - // Add component properties to the properties table with the exception of the sweep properties. - int row=0; // row counter - - for (Property* property : editComponent.Props) - { - // qDebug() << " Loading originalComponent->Props :" << (*p)->Name << (*p)->Value << (*p)->display << (*p)->Description ; - // Check this is a sweep property. - if (sweepProperties.contains(property->Name)) - { - qDebug() << "Sweep property (do not add to property table): " << property->Name; - continue; - } - - propertyTable->setRowCount(propertyTable->rowCount() + 1); - propertyTable->setItem(row, 0, new QTableWidgetItem(property->Name, LabelCell)); - propertyTable->item(row, 0)->setFlags(Qt::ItemIsEnabled); - - // Check description for combo box options and create a combo box if found. - QStringList options = getOptionsFromString(property->Description); - if (!options.isEmpty()) - { - QComboBox* optionsCombo = new QComboBox(); - optionsCombo->addItems(options); - propertyTable->setCellWidget(row, 1, optionsCombo); - propertyTable->setItem(row, 1, new QTableWidgetItem(ComboBoxCell)); - } - - // Add text edit if no options found. - else - { - propertyTable->setItem(row, 1, new QTableWidgetItem(property->Value, TextEditCell)); - propertyTable->openPersistentEditor(propertyTable->item(row, 1)); - } - - // Set check box and description. - propertyTable->setItem(row, 2, new QTableWidgetItem(CheckBoxCell)); - propertyTable->item(row, 2)->setCheckState(property->display ? Qt::Checked : Qt::Unchecked); - propertyTable->setItem(row, 3, new QTableWidgetItem(property->Description, LabelCell)); - propertyTable->item(row, 3)->setFlags(Qt::ItemIsEnabled); - - row++; - } - - /// \todo add key up/down browse and select propertyTable - // connect(propertyTable, SIGNAL(itemClicked(QTableWidgetItem*)), SLOT(slotSelectProperty(QTableWidgetItem*))); } ComponentDialog::~ComponentDialog() @@ -797,45 +451,31 @@ ComponentDialog::~ComponentDialog() delete ValInteger; } -// check if Enter is pressed while the ComboEdit has focus -// in case, behave as for the LineEdits -// (QComboBox by default does not handle the Enter/Return key) -bool ComponentDialog::eventFilter(QObject *obj, QEvent *event) -{ - if (obj == ComboEdit) { - if (event->type() == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); - if ((keyEvent->key() == Qt::Key_Return) || - (keyEvent->key() == Qt::Key_Enter)) { - slotApplyProperty(); - return true; - } - } - } - return QDialog::eventFilter(obj, event); // standard event processing -} - - -void ComponentDialog::updateSimWidgets(const QString& type) +// ------------------------------------------------------------------------- +// Updates all the widgets on the sweep page according to the sweep type. +void ComponentDialog::updateSweepWidgets(const QString& type) { qDebug() << "Update sim widgets " << type; - for (auto it = sweepParam.keyValueBegin(); it != sweepParam.keyValueEnd(); ++it) + for (auto it = sweepParamWidget.keyValueBegin(); it != sweepParamWidget.keyValueEnd(); ++it) { qDebug() << "Checking " << it->first; - it->second->setHidden(sweepTypeHiddenParams.contains(it->first) && - sweepTypeHiddenParams[it->first].contains(editComponent.Model)); + it->second->setHidden(paramsHiddenBySim.contains(it->first) && + paramsHiddenBySim[it->first].contains(editComponent.Model)); it->second->setEnabled(sweepTypeEnabledParams.contains(type) && sweepTypeEnabledParams[type].contains(it->first)); } } -void ComponentDialog::updateSimProperty(const QString& property, const QString& value) +// ------------------------------------------------------------------------- +// Updates all the sweep params on the sweep page according the component value. +void ComponentDialog::updateSweepProperty(const QString& property, const QString& value) { - qDebug() << "Update Sim Properties " << property << " value: " << value; + qDebug() << "Update sweep property " << property << " value: " << value; + // Type has changed so update the widgets first. if (property == "Type") - updateSimWidgets(sweepParam["Type"]->value()); + updateSweepWidgets(sweepParamWidget["Type"]->value()); // Repopulate the property fields. if (property == "All") @@ -843,387 +483,112 @@ void ComponentDialog::updateSimProperty(const QString& property, const QString& for (auto property : editComponent.Props) { qDebug() << "Updating " << property->Name; - if (sweepParam.contains(property->Name)) + if (sweepParamWidget.contains(property->Name)) { qDebug() << "Setting to value " << property->Value; - sweepParam[property->Name]->setValue(property->Value); - } - + sweepParamWidget[property->Name]->setValue(property->Value); + sweepParamWidget[property->Name]->setCheck(property->display); + } } - /* - for (auto& field : QStringList{"Values", "Start", "Stop", "Points"}) - { - Property* property = editComponent.getProperty(field); - if (property) - sweepParam[field]->setValue(editComponent.getProperty(field)->Name); - } - */ } } -// Updates component property list. Useful for MultiViewComponents -void ComponentDialog::updateCompPropsList() -{ - qDebug() << "Update Comp Props List"; - return; - - int last_prop=0; // last property not to put in ListView - // ........................................................... - // if simulation component: .TR, .AC, .SW, (.SP ?) - if((originalComponent->Model[0] == '.') && - (originalComponent->Model != ".DC") && (originalComponent->Model != ".HB") && - (originalComponent->Model != ".Digi") && (originalComponent->Model != ".ETR")) { - if(originalComponent->Model == ".SW") { // parameter sweep - last_prop = 2; - } else { - last_prop = 0; - } - last_prop += 4; // remember last property for ListView - } - - QString s; - int row=0; // row counter - //for(Property *p = originalComponent->Props.first(); p != 0; p = originalComponent->Props.next()) { - auto &p = originalComponent->Props; - for(int i = last_prop; i< p.size();i++) { - - // do not insert if already on first tab - // this is the reason it was originally from back to front... - // the 'pp' is the lasted property stepped over while filling the Swep tab - // if(p == pp) - // break; - if(p.at(i)->display) - s = tr("yes"); - else - s = tr("no"); - - // add Props into TableWidget - qDebug() << " Loading originalComponent->Props :" << p.at(i)->Name << p.at(i)->Value << p.at(i)->display << p.at(i)->Description ; - - if (row > propertyTable->rowCount()-1) { // Add new rows - propertyTable->setRowCount(propertyTable->rowCount()+1); - } - - QTableWidgetItem *cell; - cell = new QTableWidgetItem(p.at(i)->Name); - cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - propertyTable->setItem(row, 0, cell); - cell = new QTableWidgetItem(p.at(i)->Value); - cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - propertyTable->setItem(row, 1, cell); - cell = new QTableWidgetItem(s); - cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - propertyTable->setItem(row, 2, cell); - cell = new QTableWidgetItem(p.at(i)->Description); - cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - propertyTable->setItem(row, 3, cell); - - row++; - } - - if(propertyTable->rowCount() > 0) { - propertyTable->setCurrentItem(propertyTable->item(0,0)); - slotSelectProperty(propertyTable->item(0,0)); - } - - if (row < propertyTable->rowCount()-1) { - propertyTable->setRowCount(row); - } -} - // ------------------------------------------------------------------------- -// Updates sweep page widgets to set the specialised names and enabled state. -void ComponentDialog::slotUpdateSweepWidgets(const QString& sweepType, QGridLayout* sweepPageLayout) +// Updates the equation textedit with the currently stored value. +void ComponentDialog::updatePropertyTable() { - qDebug() << "Updating sweep page widgets."; - - // TODO: remove once this is implemented. - void(sweepType); - - for (int row = 1; row < sweepPageLayout->rowCount(); row++) - { - QLayoutItem* item = sweepPageLayout->itemAtPosition(row, 0); - - if (item && item->widget()) + // Add component properties to the properties table with the exception of the sweep properties. + int row = 0; + for (Property* property : editComponent.Props) { - if (item->widget()->objectName() == "Points") + qDebug() << " Loading originalComponent->Props :" << property->Name << property->Value << property->display << property->Description; + // Check this is a sweep property. + if (hasSweep && sweepProperties.contains(property->Name)) { - for (int col = 0; col < 3; col++) - sweepPageLayout->itemAtPosition(row, col)->widget()->setEnabled(false); + qDebug() << "Sweep property (do not add to property table): " << property->Name; + continue; } - } - } -} - -// ------------------------------------------------------------------------- -// Is called if a property is selected. -// Handle the Property editor tab. -// It transfers the values to the right side for editing. -void ComponentDialog::slotSelectProperty(QTableWidgetItem *item) -{ - // Do not use this function as not all pointers are initialised. - return; - - - if(item == 0) return; - item->setSelected(true); // if called from elsewhere, this was not yet done - - qDebug() << "row " << item->row(); //<< item->text() - - QString name = propertyTable->item(item->row(),0)->text(); - QString value = propertyTable->item(item->row(),1)->text(); - QString show = propertyTable->item(item->row(),2)->text(); - QString desc = propertyTable->item(item->row(),3)->text(); - - if(show == tr("yes")) - disp->setChecked(true); - else - disp->setChecked(false); - - if(name == "File") { - EditButt->setEnabled(true); - BrowseButt->setEnabled(true); - } - else { - EditButt->setEnabled(false); - BrowseButt->setEnabled(false); - } - - /// \todo enable edit of description anyway... - /// empty or "-" (no comment from verilog-a) - - // Empty description so assume editing an equation? - if(desc.isEmpty()) { - // show two line edit fields (name and value) - ButtAdd->setEnabled(true); - ButtRem->setEnabled(true); - - // Enable Up / Down buttons only for spice and equation components. - QStringList spiceComponents({"Eqn", "SpicePar", "SpGlobPar", "SpiceIC", "SpiceNodeset", "NutmegEq"}); - if (spiceComponents.contains(originalComponent->Model)) - { - ButtUp->setEnabled(true); - ButtDown->setEnabled(true); - } - else - { - ButtUp->setEnabled(false); - ButtDown->setEnabled(false); - } - Name->setText(""); - NameEdit->setText(name); - edit->setText(value); + propertyTable->setRowCount(propertyTable->rowCount() + 1); + propertyTable->setItem(row, 0, new QTableWidgetItem(property->Name, LabelCell)); + propertyTable->item(row, 0)->setFlags(Qt::ItemIsEnabled); - edit->setVisible(true); - NameEdit->setVisible(true); - Description->setVisible(false); - ComboEdit->setVisible(false); - - NameEdit->setFocus(); // edit QLineEdit - } - - // Property is an expression. - else if (desc == "Expression") - { - // show two line edit fields (name and value) - // And disable buttons - Name->setText(""); - NameEdit->setText(name); - edit->setText(value); - - edit->setVisible(true); - NameEdit->setVisible(true); - Description->setVisible(false); - ComboEdit->setVisible(false); - - NameEdit->setFocus(); // edit QLineEdit - } - - // Standard property (description and value) - else - { - ButtAdd->setEnabled(false); - ButtRem->setEnabled(false); - ButtUp->setEnabled(false); - ButtDown->setEnabled(false); - - Name->setText(name); - edit->setText(value); - - NameEdit->setVisible(false); - NameEdit->setText(name); // perhaps used for adding properties - Description->setVisible(true); - - // handle special combobox items - QStringList List; - int b = desc.indexOf('['); - int e = desc.lastIndexOf(']'); - if (e-b > 2) { - QString str = desc.mid(b+1, e-b-1); - str.replace( QRegularExpression("[^a-zA-Z0-9_,]"), "" ); - List = str.split(','); - qDebug() << "List = " << List; - } + // Check description for combo box options and create a combo box if found. + QStringList options = getOptionsFromString(property->Description); + if (!options.isEmpty()) + { + QComboBox* optionsCombo = new QComboBox(); + optionsCombo->addItems(options); + optionsCombo->setCurrentText(property->Value); + propertyTable->setCellWidget(row, 1, optionsCombo); + propertyTable->setItem(row, 1, new QTableWidgetItem(ComboBoxCell)); + } - // use the screen-compatible metric - QFontMetrics metrics(QucsSettings.font, 0); // get size of text - qDebug() << "desc = " << desc << metrics.boundingRect(desc).width(); - while(metrics.boundingRect(desc).width() > 270) { // if description too long, cut it nicely - // so 270 above will be the maximum size of the name label and associated edit line widget - if (desc.lastIndexOf(' ') != -1) - desc = desc.left(desc.lastIndexOf(' ')) + "...."; + // Add text edit if no options found. else - desc = desc.left(desc.length()-5) + "...."; - } - - if (originalComponent->SpiceModel == "NutmegEq" && name == "Simulation") { // simulation selection required - List = getSimulationList(); - } - - Description->setText(desc); + { + propertyTable->setItem(row, 1, new QTableWidgetItem(property->Value, TextEditCell)); + propertyTable->openPersistentEditor(propertyTable->item(row, 1)); + } - if(List.count() >= 1) { // ComboBox with value list or line edit ? - ComboEdit->clear(); - ComboEdit->insertItems(0,List); + // Set check box and description. + propertyTable->setItem(row, 2, new QTableWidgetItem(CheckBoxCell)); + propertyTable->item(row, 2)->setCheckState(property->display ? Qt::Checked : Qt::Unchecked); + propertyTable->setItem(row, 3, new QTableWidgetItem(property->Description, LabelCell)); + propertyTable->item(row, 3)->setFlags(Qt::ItemIsEnabled); - for(int i=ComboEdit->count()-1; i>=0; i--) - if(value == ComboEdit->itemText(i)) { - ComboEdit->setCurrentIndex(i); - break; - } - edit->setVisible(false); - ComboEdit->setVisible(true); - ComboEdit->setFocus(); - } - else { - edit->setVisible(true); - ComboEdit->setVisible(false); - edit->setFocus(); // edit QLineEdit + row++; } - } + qDebug() << row << " rows added to propertyTable"; } // ------------------------------------------------------------------------- -void ComponentDialog::slotApplyChange(int idx) +// Updates the equation textedit with the currently stored value. +void ComponentDialog::updateEqnEditor() { - /// \bug what if the table have no items? - // pick selected row - QList items = propertyTable->selectedItems(); - Q_ASSERT(!items.isEmpty()); - QTableWidgetItem *item = items.first(); - - int row = item->row(); - - auto Text = ComboEdit->itemText(idx); - edit->setText(Text); - // apply edit line - propertyTable->item(row, 1)->setText(Text); - - ComboEdit->setFocus(); + QString eqnList; - // step to next item if not at the last line - if ( row < (propertyTable->rowCount() - 1)) { - propertyTable->setCurrentItem(propertyTable->item(row+1,0)); - slotSelectProperty(propertyTable->item(row+1,0)); - } -} - -/*! - Is called if the "RETURN" key is pressed in the "edit" Widget. - The parameter is edited on the right pane. - Return key commits the change, and steps to the next parameter in the list. -*/ -void ComponentDialog::slotApplyProperty() -{ - // pick selected row - QTableWidgetItem *item = propertyTable->currentItem(); - - if(!item) - return; - - int row = item->row(); - - QString name = propertyTable->item(row, 0)->text(); - QString value = propertyTable->item(row, 1)->text(); - - - - if (!ComboEdit->isHidden()) // take text from ComboBox ? - edit->setText(ComboEdit->currentText()); - - // apply edit line - if(value != edit->text()) { - propertyTable->item(row, 1)->setText(edit->text()); - } - - if (!NameEdit->isHidden()) // also apply property name ? - if (name != NameEdit->text()) { -// if(NameEdit->text() == "Export") -// item->setText(0, "Export_"); // name must not be "Export" !!! -// else -// item->setText(0, NameEdit->text()); // apply property name - propertyTable->item(row, 0)->setText(NameEdit->text()); + for (auto property : editComponent.Props) + { + if (property->Name == "Simulation") + { + eqnSimCombo->setCurrentText(property->Value); } - - // step to next item - if ( row < propertyTable->rowCount()-1) { - propertyTable->setCurrentItem(propertyTable->item(row+1,0)); - slotSelectProperty(propertyTable->item(row+1,0)); - } - else { - slotOKButton(); // close dialog, if it was the last property - return; + else + eqnList.append(property->Name + " = " + property->Value + "\n"); } -} -// ------------------------------------------------------------------------- -// Is called if the "RETURN"-button is pressed in the "NameEdit" Widget. -void ComponentDialog::slotApplyPropName() -{ - // pick selected row - QTableWidgetItem *item = propertyTable->selectedItems()[0]; - int row = item->row(); - - QString name = propertyTable->item(row, 0)->text(); - - if(name != NameEdit->text()) { -// if(NameEdit->text() == "Export") { -// item->setText(0, "Export_"); // name must not be "Export" !!! -// NameEdit->setText("Export_"); -// } -// else - propertyTable->item(row, 0)->setText(NameEdit->text()); - } - edit->setFocus(); // cursor into "edit" widget + qDebug() << "Equation list is: " << eqnList; + eqnEditor->setPlainText(eqnList); } // ------------------------------------------------------------------------- -// Is called if the checkbox is pressed (changed). -void ComponentDialog::slotApplyState(int State) +// Clears the current equation component and writes the context of dialog. +void ComponentDialog::writeEquation() { - // pick selected row - if (propertyTable->rowCount() == 0) return; - QTableWidgetItem *item = propertyTable->selectedItems()[0]; - int row = item->row(); - - QString disp = propertyTable->item(row, 2)->text(); + qDebug() << "writeEquation"; + originalComponent->Props.clear(); + + // Property(const QString& _Name="", const QString& _Value="", bool _display=false, const QString& Desc="") + qDebug() << "Writing simulation: " << eqnSimCombo->currentText(); + originalComponent->Props.append(new Property("Simulation", eqnSimCombo->currentText(), true)); - if(item == 0) return; + QString text = eqnEditor->document()->toPlainText(); + QStringList lines = text.split('\n', Qt::SkipEmptyParts); + + for (const QString& line : lines) + { + QStringList parts = line.split('='); - QString ButtonState; - if(State) - ButtonState = tr("yes"); - else - ButtonState = tr("no"); + Q_ASSERT(parts.count() == 2); - if(disp != ButtonState) { - propertyTable->item(row, 2)->setText(ButtonState); + qDebug() << parts[0] << " : " << parts[1]; + originalComponent->Props.append(new Property(parts[0].trimmed(), parts[1].trimmed(), true)); } } // ------------------------------------------------------------------------- -// Is called if the "OK"-button is pressed. +// Applies all changes and closes the dialog. void ComponentDialog::slotOKButton() { qDebug() << "slotOK"; @@ -1236,31 +601,13 @@ void ComponentDialog::slotOKButton() } // ------------------------------------------------------------------------- -// Is called if the "Cancel"-button is pressed. -// void ComponentDialog::slotCancelButton() -// { -// qDebug() << "slotCancel"; - -// // if (changed) -// // done(1); // changed could have been done before -// // else -// // done(0); // (by "Apply"-button) -// } - -//----------------------------------------------------------------- -// To get really all close events (even key). -// void ComponentDialog::reject() -// { -// slotCancelButton(); -// } - -// ------------------------------------------------------------------------- -// Is called, if the "Apply"-button is pressed. +// Applies all changes and updates the fields if they have changed as the +// result of the applied changes. void ComponentDialog::slotApplyButton() { - qDebug() << "slotApply"; + qDebug() << "slotApplyButton"; - // Check the new name is not empty and not a duplicate. + // Check the new component name is not empty and not a duplicate. if (editComponent.Name.isEmpty() || document->getComponentByName(editComponent.Name) != nullptr) { @@ -1269,180 +616,72 @@ void ComponentDialog::slotApplyButton() mpNameLineEdit->setText(editComponent.Name); } - for (int row = 0; row < propertyTable->rowCount(); row++) + if (isEquation) { - qDebug() << "Item type: " << propertyTable->item(row, 1)->type(); - - /* - if (propertyTable->item(row, 1) && propertyTable->cellWidget(row, 1)) - { - QComboBox* cellCombo = static_cast(propertyTable->cellWidget(row, 1)); - qDebug() << "Current combo text is: " << cellCombo->currentText(); - } - */ - + qDebug() << "Writing equation"; + writeEquation(); } - - for (auto& property : editComponent.Props) + else { - qDebug() << "Edit component property: " << property->Name << " : " << property->Value; - } - - originalComponent->Name = editComponent.Name; - originalComponent->showName = editComponent.showName; - changed = true; - - /*! Walk the original originalComponent->Props and compare with the - * data in the dialog. - * The pointers to the combo, edits,... are set to 0. - * Only check if the widgets were created (pointers checks are 'true') - */ - //auto pp = originalComponent->Props.begin(); - // apply all the new property values - QString tmp; - Component *pc; - - int idxStart = 1; - if (originalComponent->Model == ".SW") { - idxStart = 3; - } - - /* - if(comboSim != nullptr) { - auto pp = originalComponent->getProperty("Sim"); - bool display = checkSim->isChecked(); - QString value = comboSim->currentText(); - updateProperty(pp,value,display); - } - */ - - /* - if(comboType != nullptr) { - bool display = checkType->isChecked(); - auto pp = originalComponent->getProperty("Type"); - switch(comboType->currentIndex()) { - case 1: tmp = "log"; break; - case 2: tmp = "list"; break; - case 3: tmp = "const"; break; - default: tmp = "lin"; break; - } - updateProperty(pp,tmp,display); - } + // Walk through the Props list and update component. + int row = 0; + for (Property* property : originalComponent->Props) + { + qDebug() << "Found property " << property->Name; - if(checkParam != nullptr) { - if(checkParam->isEnabled()) { - auto pp = originalComponent->getProperty("Param"); - bool display = checkParam->isChecked(); - QString value = editParam->text(); - updateProperty(pp,value,display); - } - } - if(editStart != nullptr) { - if(comboType->currentIndex() < 2 ) { - Property *pp = originalComponent->Props.at(idxStart); // Start - bool display = checkStart->isChecked(); - QString value = editStart->text(); - updateProperty(pp,value,display); - pp->Name = "Start"; - - pp = originalComponent->Props.at(idxStart+1); // Stop - display = checkStop->isChecked(); - value = editStop->text(); - updateProperty(pp,value,display); - pp->Name = "Stop"; - - pp = originalComponent->Props.at(idxStart+2); - if (pp != nullptr) { // Points/Values - display = checkNumber->isChecked(); - value = editNumber->text(); - updateProperty(pp,value,display); - if (changed) pp->Name = "Points"; - } - qDebug() << "====> before ad"; - } else { - // If a value list is used, the properties "Start" and "Stop" are not - // used. -> Call them "Symbol" to omit them in the netlist. - Property *pp = originalComponent->Props.at(idxStart); - pp->Name = "Symbol"; - pp->display = false; - pp = originalComponent->Props.at(idxStart+1); - pp->Name = "Symbol"; - pp->display = false; - - pp = originalComponent->Props.at(idxStart+2); - bool display = checkValues->isChecked(); - QString value = "["+editValues->text()+"]"; - - if(pp->display != display) { - pp->display = display; - changed = true; - } - if(pp->Value != value || pp->Name != "Values") { - pp->Value = value; - pp->Name = "Values"; - changed = true; + if (hasSweep && sweepParamWidget.contains(property->Name)) + { + qDebug() << "Setting sweepParamWidget " << property->Name << " to " << sweepParamWidget[property->Name]->value() + << " and checked to " << sweepParamWidget[property->Name]->check(); + property->Value = sweepParamWidget[property->Name]->value(); + property->display = sweepParamWidget[property->Name]->check(); } - } - } - */ - - // pick selected row - QTableWidgetItem *item = nullptr; - - // make sure we have one item, take selected - if (propertyTable->selectedItems().size() != 0) { - item = propertyTable->selectedItems()[0]; - } - - /*! Walk the dialog list of 'propertyTable' - if(item != nullptr) { - int row = item->row(); - QString name = propertyTable->item(row, 0)->text(); - QString value = propertyTable->item(row, 1)->text(); + else + { + QTableWidgetItem* item = propertyTable->item(row, 1); + Q_ASSERT(item); + + if (item->type() == ComboBoxCell) + { + QComboBox* cellCombo = static_cast(propertyTable->cellWidget(row, 1)); + qDebug() << "Setting property #" << row << " to " << cellCombo->currentText(); + property->Value = cellCombo->currentText(); + } - // apply edit line - if(value != edit->text()) { - propertyTable->item(row, 1)->setText(edit->text()); - } + else + { + qDebug() << "Setting property #" << row << " to " << propertyTable->item(row, 1)->text(); + property->Value = propertyTable->item(row, 1)->text(); + } - // apply property name - if (!NameEdit->isHidden()) { - if (name != NameEdit->text()) { - propertyTable->item(row, 0)->setText(NameEdit->text()); + property->display = (propertyTable->item(row, 2)->checkState() == Qt::Checked); + row++; } } } - */ - // apply all the new property values in the ListView - if (originalComponent->isEquation) { - recreatePropsFromTable(); - } else { - fillPropsFromTable(); - } + document->recreateComponent(originalComponent); + document->viewport()->repaint(); - if(changed) { + // TODO: Why is the text being repositioned? + // If this is needed, make it a function because something similar is called elsewhere. + if (changed) + { int dx, dy; originalComponent->textSize(dx, dy); - if(tx_Dist != 0) { + if(tx_Dist != 0) + { originalComponent->tx += tx_Dist-dx; tx_Dist = dx; } - if(ty_Dist != 0) { + if(ty_Dist != 0) + { originalComponent->ty += ty_Dist-dy; ty_Dist = dy; } - - document->recreateComponent(originalComponent); - document->viewport()->repaint(); - if ( (int) originalComponent->Props.count() != propertyTable->rowCount()) { // If props count was changed after recreation - Q_ASSERT(propertyTable->rowCount() >= 0); - updateCompPropsList(); // of component we need to update properties - } } - } // ------------------------------------------------------------------------- @@ -1504,7 +743,7 @@ void ComponentDialog::slotBrowseFile() s = file.fileName(); } } - edit->setText(s); + // edit->setText(s); int row = propertyTable->currentRow(); propertyTable->item(row,1)->setText(s); } @@ -1513,232 +752,11 @@ void ComponentDialog::slotBrowseFile() // ------------------------------------------------------------------------- void ComponentDialog::slotEditFile() { - document->App->editFile(misc::properAbsFileName(edit->text(), document)); -} - -/*! - Add description if missing. - Is called if the add button is pressed. This is only possible for some - properties. - If desc is empty, ButtAdd is enabled, this slot handles if it is clicked. - Used with: Equation, ? - - Original behavior for an Equation block - - start with props - y=1 (Name, Value) - Export=yes - - add equation, results - y=1 - y2=1 - Export=yes - - Behavior: - If Name already exists, set it to focus - If new name, insert item after selected, set it to focus - -*/ -void ComponentDialog::slotButtAdd() -{ - // Set existing equation into focus, return - for(int row=0; row < propertyTable->rowCount(); row++) { - QString name = propertyTable->item(row, 0)->text(); - if( name == NameEdit->text()) { - propertyTable->setCurrentItem(propertyTable->item(row,0)); - slotSelectProperty(propertyTable->item(row,0)); - return; - } - } - - // toggle display flag - QString s = tr("no"); - if(disp->isChecked()) - s = tr("yes"); - - // get number for selected row - int curRow = propertyTable->currentRow(); - - // insert new row under current - int insRow = curRow+1; - propertyTable->insertRow(insRow); - - // append new row - QTableWidgetItem *cell; - cell = new QTableWidgetItem(NameEdit->text()); - cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - propertyTable->setItem(insRow, 0, cell); - cell = new QTableWidgetItem(edit->text()); - cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - propertyTable->setItem(insRow, 1, cell); - cell = new QTableWidgetItem(s); - cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - propertyTable->setItem(insRow, 2, cell); - // no description? add empty cell - cell = new QTableWidgetItem(""); - cell->setFlags(cell->flags() ^ Qt::ItemIsEditable); - propertyTable->setItem(insRow, 3, cell); - - // select new row - propertyTable->selectRow(insRow); -} - -/*! - Is called if the remove button is pressed. This is only possible for - some properties. - If desc is empty, ButtRem is enabled, this slot handles if it is clicked. - Used with: Equations, ? -*/ -void ComponentDialog::slotButtRem() -{ - if ((propertyTable->rowCount() < 3)&& - (originalComponent->Model=="Eqn"||originalComponent->Model=="NutmegEq")) - return; // the last property cannot be removed - if (propertyTable->rowCount() < 2) - return; // the last property cannot be removed - - - QTableWidgetItem *item = propertyTable->selectedItems()[0]; - int row = item->row(); - - if(item == 0) - return; - - // peek next, delete current, set next current - if ( row < propertyTable->rowCount()) { - propertyTable->setCurrentItem(propertyTable->item(row-1,0)); // Shift selection up - slotSelectProperty(propertyTable->item(row-1,0)); - propertyTable->removeRow(row); - if (!propertyTable->selectedItems().size()) { // The first item was removed - propertyTable->setCurrentItem(propertyTable->item(0,0)); // Select the first item - slotSelectProperty(propertyTable->item(0,0)); - } - } -} - -/*! - * \brief ComponentDialog::slotButtUp - * Move a table item up. Enabled for Equation component. - */ -void ComponentDialog::slotButtUp() -{ - qDebug() << "slotButtUp" << propertyTable->currentRow() << propertyTable->rowCount(); - - int curRow = propertyTable->currentRow(); - if (curRow == 0) - return; - if ((curRow == 1)&&(originalComponent->Model=="NutmegEq")) - return; - - // swap current and row above it - QTableWidgetItem *source = propertyTable->takeItem(curRow ,0); - QTableWidgetItem *target = propertyTable->takeItem(curRow-1,0); - propertyTable->setItem(curRow-1, 0, source); - propertyTable->setItem(curRow, 0, target); - source = propertyTable->takeItem(curRow ,1); - target = propertyTable->takeItem(curRow-1,1); - propertyTable->setItem(curRow-1, 1, source); - propertyTable->setItem(curRow, 1, target); - - - // select moved row - propertyTable->selectRow(curRow-1); -} - -/*! - * \brief ComponentDialog::slotButtDown - * Move a table item down. Enabled for Equation component. - */ -void ComponentDialog::slotButtDown() -{ - qDebug() << "slotButtDown" << propertyTable->currentRow() << propertyTable->rowCount(); - - int curRow = propertyTable->currentRow(); - // Leave Export as last - if ((curRow == propertyTable->rowCount()-2)&&(originalComponent->Model=="Eqn")) - return; - if ((curRow == 0)&&(originalComponent->Model=="NutmegEq")) // Don't let to shift the first property "Simulation=" - return; - if ((curRow == propertyTable->rowCount()-1)) // Last property - return; - - // swap current and row below it - QTableWidgetItem *source = propertyTable->takeItem(curRow,0); - QTableWidgetItem *target = propertyTable->takeItem(curRow+1,0); - propertyTable->setItem(curRow+1, 0, source); - propertyTable->setItem(curRow, 0, target); - source = propertyTable->takeItem(curRow,1); - target = propertyTable->takeItem(curRow+1,1); - propertyTable->setItem(curRow+1, 1, source); - propertyTable->setItem(curRow, 1, target); - - // select moved row - propertyTable->selectRow(curRow+1); + // document->App->editFile(misc::properAbsFileName(edit->text(), document)); } // ------------------------------------------------------------------------- -void ComponentDialog::slotSimTypeChange(int Type) -{ - if(Type < 2) { // new type is "linear" or "logarithmic" - if(!editNumber->isEnabled()) { // was the other mode before ? - // this text change, did not emit the textChange signal !??! - editStart->setText( - editValues->text().section(';', 0, 0).trimmed()); - editStop->setText( - editValues->text().section(';', -1, -1).trimmed()); - editNumber->setText("2"); - slotNumberChanged(0); - - checkStart->setChecked(true); - checkStop->setChecked(true); - } - /* - textValues->setDisabled(true); - editValues->setDisabled(true); - checkValues->setDisabled(true); - textStart->setDisabled(false); - editStart->setDisabled(false); - checkStart->setDisabled(false); - textStop->setDisabled(false); - editStop->setDisabled(false); - checkStop->setDisabled(false); - textStep->setDisabled(false); - editStep->setDisabled(false); - textNumber->setDisabled(false); - editNumber->setDisabled(false); - checkNumber->setDisabled(false); - */ - - if(Type == 1) // logarithmic ? - textStep->setText(tr("Points per decade:")); - else - textStep->setText(tr("Step:")); - } - else { // new type is "list" or "constant" - if(!editValues->isEnabled()) { // was the other mode before ? - editValues->setText(editStart->text() + "; " + editStop->text()); - checkValues->setChecked(true); - } - /* - textValues->setDisabled(false); - editValues->setDisabled(false); - checkValues->setDisabled(false); - textStart->setDisabled(true); - editStart->setDisabled(true); - checkStart->setDisabled(true); - textStop->setDisabled(true); - editStop->setDisabled(true); - checkStop->setDisabled(true); - textStep->setDisabled(true); - editStep->setDisabled(true); - textNumber->setDisabled(true); - editNumber->setDisabled(true); - checkNumber->setDisabled(true); - textStep->setText(tr("Step:")); - */ - } -} - -// ------------------------------------------------------------------------- -// Is called when "Start", "Stop" or "Number" is edited. +/* TODO: Need to implement mechanism to update POINTS when START, STOP, STEP is changed void ComponentDialog::slotNumberChanged(const QString&) { QString Unit, tmp; @@ -1774,8 +792,10 @@ void ComponentDialog::slotNumberChanged(const QString&) editStep->setText(Unit); editStep->blockSignals(false); } +*/ // ------------------------------------------------------------------------- +/* TODO: Need to implement mechanism to update STEP when POINTS is changed void ComponentDialog::slotStepChanged(const QString& Step) { QString Unit; @@ -1809,82 +829,7 @@ void ComponentDialog::slotStepChanged(const QString& Step) editNumber->setText(QString::number(round(x + 1.0), 'g', 16)); editNumber->blockSignals(false); } - -// ------------------------------------------------------------------------- -// Is called if return is pressed in LineEdit "Parameter". -void ComponentDialog::slotParamEntered() -{ - if(editValues->isEnabled()) - editValues->setFocus(); - else - editStart->setFocus(); -} - -// ------------------------------------------------------------------------- -// Is called if return is pressed in LineEdit "Simulation". -void ComponentDialog::slotSimEntered(int) -{ - editParam->setFocus(); -} - -// ------------------------------------------------------------------------- -// Is called if return is pressed in LineEdit "Values". -void ComponentDialog::slotValuesEntered() -{ - slotOKButton(); -} - -// ------------------------------------------------------------------------- -// Is called if return is pressed in LineEdit "Start". -void ComponentDialog::slotStartEntered() -{ - editStop->setFocus(); -} - -// ------------------------------------------------------------------------- -// Is called if return is pressed in LineEdit "Stop". -void ComponentDialog::slotStopEntered() -{ - editStep->setFocus(); -} - -// ------------------------------------------------------------------------- -// Is called if return is pressed in LineEdit "Step". -void ComponentDialog::slotStepEntered() -{ - editNumber->setFocus(); -} - -// ------------------------------------------------------------------------- -// Is called if return is pressed in LineEdit "Number". -void ComponentDialog::slotNumberEntered() -{ - slotOKButton(); -} - -// if clicked on 'display' header toggle visibility for all items -void ComponentDialog::slotHHeaderClicked(int headerIdx) -{ - if (headerIdx != 2) return; // clicked on header other than 'display' - - QString s; - QTableWidgetItem *cell; - - if (setAllVisible) { - s = tr("yes"); - disp->setChecked(true); - } else { - s = tr("no"); - disp->setChecked(false); - } - - // go through all the properties table and set the visibility cell - for (int row = 0; row < propertyTable->rowCount(); row++) { - cell = propertyTable->item(row, 2); - cell->setText(s); - } - setAllVisible = not setAllVisible; // toggle visibility for the next double-click -} +*/ // ------------------------------------------------------------------------- // Get a list of simulations in the schematic. @@ -1919,112 +864,14 @@ QStringList ComponentDialog::getSimulationList() return sim_lst; } - +// ------------------------------------------------------------------------- +// void ComponentDialog::slotFillFromSpice() { fillFromSpiceDialog *dlg = new fillFromSpiceDialog(originalComponent, this); auto r = dlg->exec(); if (r == QDialog::Accepted) { - updateCompPropsList(); + // updateCompPropsList(); } delete dlg; } - -// Updates a component's properties from the contents of the propertyTable. -void ComponentDialog::fillPropsFromTable() -{ - /* - for( int row = 0; row < propertyTable->rowCount(); row++ ) { - QString name = propertyTable->item(row, 0)->text(); - QString value = propertyTable->item(row, 1)->text(); - QString disp = propertyTable->item(row, 2)->text(); - QString desc = propertyTable->item(row, 3)->text(); - bool display = (disp == tr("yes")); - if (originalComponent->isSimulation) { - // Get property by name - auto pp = originalComponent->getProperty(name); - if (pp != nullptr) { - updateProperty(pp,value,display); - } - } else { - // Other components may have properties with duplicate names - if (row < originalComponent->Props.count()) { - auto pp = originalComponent->Props[row]; - if (pp->Name == name) { - updateProperty(pp,value,display); - } - } - } - } - */ -} - -// Used by equations to recreate the property list from the table. -// This is because equations have a variable number of properties -// and the order of those properties can change. -void ComponentDialog::recreatePropsFromTable() -{ - if (!originalComponent->isEquation) return; // add / remove properties allowed only for equations - - if (originalComponent->Props.size() != propertyTable->rowCount()) { - changed = true; // Added or removed properties - } else { - for( int row = 0; row < propertyTable->rowCount(); row++ ) { - QString name = propertyTable->item(row, 0)->text(); - QString value = propertyTable->item(row, 1)->text(); - QString disp = propertyTable->item(row, 2)->text(); - bool display = (disp == tr("yes")); - auto pp = originalComponent->Props.at(row); - if ((pp->Name != name) || (pp->Value != value) || - (pp->display != display)) { - changed = true; // reordered or edited properties - break; - } - } - } - - if (!changed) { - return; - } - - for (auto pp: originalComponent->Props) { - delete pp; - pp = nullptr; - } - originalComponent->Props.clear(); - for( int row = 0; row < propertyTable->rowCount(); row++ ) { - QString name = propertyTable->item(row, 0)->text(); - QString value = propertyTable->item(row, 1)->text(); - QString disp = propertyTable->item(row, 2)->text(); - QString desc = propertyTable->item(row, 3)->text(); - bool display = (disp == tr("yes")); - - Property *pp = new Property; - pp->Name = name; - pp->Value = value; - pp->display = display; - pp->Description = desc; - originalComponent->Props.append(pp); - } -} - - -bool ComponentDialog::propChanged(Property *pp, const QString &value, const bool display) -{ - if (pp->Value != value) return true; - if (pp->display != display) return true; - return false; -} - -void ComponentDialog::updateProperty(Property *pp, const QString &value, const bool display) -{ - if (pp == nullptr) { - qDebug()<<__func__<<" Warning! Trying to update NULLPTR property"; - return; - } - if (propChanged(pp,value,display)) { - pp->Value = value; - pp->display = display; - changed = true; - } -} diff --git a/qucs/components/componentdialog.h b/qucs/components/componentdialog.h index c255174c6..dc8f7f61a 100644 --- a/qucs/components/componentdialog.h +++ b/qucs/components/componentdialog.h @@ -22,6 +22,7 @@ #include #include +#include class Schematic; @@ -44,8 +45,9 @@ class ParamWidget; // struct SweepUISettingType; struct QStringPair; -class ComponentDialog : public QDialog { - Q_OBJECT +class ComponentDialog : public QDialog +{ +Q_OBJECT public: ComponentDialog(Component*, Schematic*); ~ComponentDialog(); @@ -53,125 +55,61 @@ class ComponentDialog : public QDialog { private slots: void slotOKButton(); void slotApplyButton(); - // void slotCancelButton(); - void slotSelectProperty(QTableWidgetItem *item); - void slotApplyState(int State); void slotBrowseFile(); void slotEditFile(); - void slotApplyChange(int idx); - void slotApplyProperty(); - void slotApplyPropName(); - - void slotButtAdd(); - void slotButtRem(); - - void slotButtUp(); - void slotButtDown(); - - void slotSimTypeChange(int); - void slotNumberChanged(const QString&); - void slotStepChanged(const QString&); - - void slotParamEntered(); - void slotSimEntered(int); - void slotValuesEntered(); - void slotStartEntered(); - void slotStopEntered(); - void slotStepEntered(); - void slotNumberEntered(); - void slotHHeaderClicked(int headerIdx); - void slotFillFromSpice(); - - void slotUpdateSweepWidgets(const QString& sweepType, QGridLayout* sweepPageLayout); -protected slots: - // void reject(); - bool eventFilter(QObject *obj, QEvent *event); + void slotFillFromSpice(); private: - QValidator *Validator, *ValRestrict, *Validator2, - *ValName; - QRegularExpression Expr; + QValidator *Validator, *ValRestrict, *Validator2, *ValName; + QRegularExpression Expr; QIntValidator *ValInteger; - QTableWidget *propertyTable; - Component *originalComponent; - Schematic *document; - Component editComponent; + QTableWidget* propertyTable; + QTextEdit* eqnEditor; + QComboBox* eqnSimCombo; + + Component* originalComponent; + Schematic* document; + Component editComponent; // Maps to contain specialisations for different sweep types. Note: the arrangement // has been chosen to have the smallest number of map elements. // TODO: Make these constant once settled, see https://stackoverflow.com/questions/2636303/how-to-initialize-a-private-static-const-map-in-c - QMap > sweepTypeSpecialLabels; - QMap sweepTypeEnabledParams; - QMap sweepTypeHiddenParams; + QHash > sweepTypeSpecialLabels; + QHash sweepTypeEnabledParams; + QHash paramsHiddenBySim; + + // TODO: It would be better for simulations with sweeps to have a flag saying so. + bool isEquation; + bool hasSweep; + QStringList sweepProperties; // Maps to store references to edit widgets. - QMap sweepParam; + QMap sweepParamWidget; BoundLineEdit* mpNameLineEdit; - QLineEdit *edit, *NameEdit, *CompNameEdit; - QComboBox *ComboEdit; - QLabel *Name, *Description; - QPushButton *BrowseButt, *EditButt, *ButtAdd, *ButtRem; - QPushButton *ButtUp, *ButtDown; - QPushButton *ButtFillFromSpice; - QCheckBox *disp; - bool changed; int tx_Dist, ty_Dist; // remember the text position bool setAllVisible; // used for toggling visibility of properties - QLabel *textType; - QLabel *textSim, *textParam, *textValues, *textStart, *textStop, - *textStep, *textNumber; - QLineEdit *editParam, *editValues, *editStart, *editStop, - *editStep, *editNumber; - QCheckBox *checkSim, *checkParam, *checkValues, *checkStart, *checkStop, - *checkNumber, *checkType, *showName; - QComboBox *comboSim, *comboType; - QStringList getSimulationList(); - void updateCompPropsList(void); - void updateSimProperty(const QString& propertyWidget, const QString& value); - void updateSimWidgets(const QString& simType); + void updateSweepProperty(const QString& propertyWidget, const QString& value); + void updateSweepWidgets(const QString& simType); + void updatePropertyTable(); + void updateEqnEditor(); + void updateEqnSimulation(const QString& propertyWidget, const QString& value) { (void)propertyWidget; (void)value; }; - void fillPropsFromTable(); - void recreatePropsFromTable(); - bool propChanged(Property *pp, const QString &value, const bool display); - void updateProperty(Property *pp, const QString &value, const bool display); + void writeSweepProperties(); + void writePropertyTable(); + void writeEquation(); enum CELL_TYPE { LabelCell = 1000, TextEditCell, ComboBoxCell, CheckBoxCell}; }; -// Helper structures to manage specialisation of sweep UI presentation. -// enum RELATION { StepToNumber, NumberToStep }; - -// struct RelatedParameterType -// { -// RelatedParameterType(const QString& a, RELATION b) -// : relatedParameter(a), relation(b) {} - -// QString relatedParameter; -// RELATION relation; -// }; - -// struct SweepUISettingType -// { -// SweepUISettingType(const QString& a, const QString& b, const QStringList& c, bool d, bool e, QList f = {}) -// : label(a), value(b), options(c), enabled(d), visible(e), relatedParameters(f) {} -// QString label; -// QString value; -// QStringList options; -// bool enabled; -// bool visible; -// QList relatedParameters; -// }; -// typedef QList SweepSettingUIList; - struct QStringPair { QStringPair(const QString& b, const QString& a) From ed3b5864d8184dec1e9df1d43b86805e3f0d4069 Mon Sep 17 00:00:00 2001 From: Iwbnwif Yiw Date: Sat, 9 Nov 2024 16:27:22 +0000 Subject: [PATCH 14/15] First minimum viable attempt with working dialog ready for basic testing. --- qucs/components/componentdialog.cpp | 438 +++++++++++++--------------- qucs/components/componentdialog.h | 44 ++- 2 files changed, 240 insertions(+), 242 deletions(-) diff --git a/qucs/components/componentdialog.cpp b/qucs/components/componentdialog.cpp index 993d2b7c7..32e8e38f6 100644 --- a/qucs/components/componentdialog.cpp +++ b/qucs/components/componentdialog.cpp @@ -15,6 +15,16 @@ * * ***************************************************************************/ +/* + TODO: + 1. Auto update sweep step / sweep points for log sweeps + 2. Translated text? + 3. Add special property names - i.e., for log sweeps (per decade instead of step) + 4. Update components from SPICE file. + 5. Implement highlighting. + 6. Have "Export" as a check box, or option list for equations. +*/ + #include "componentdialog.h" #include "main.h" #include "schematic.h" @@ -24,118 +34,7 @@ #include -// ------------------------------------------------------------------------- -// Convenience base class to add a label, name, checkbox and bind them to a variable. -class BoundControl -{ - public: - BoundControl(const QString& label, bool check, QLayout* layout) - { - mpParentLayout = layout; - - mpShowNameCheck = new QCheckBox("display in schematic"); - - // qDebug() << layout->metaObject()->className(); - - // Either add widgets to a new QHBoxLayout or to an existing QGridLayout. - if (layout->metaObject()->className() == QString("QVBoxLayout")) - { - mpBoundLayout = new QHBoxLayout; - mpBoundLayout->setSpacing(5); - static_cast(mpParentLayout)->addLayout(mpBoundLayout); - - if (!label.isEmpty()) - mpBoundLayout->addWidget(new QLabel(label)); - - mpShowNameCheck->setCheckState(check ? Qt::Checked : Qt::Unchecked); - mpBoundLayout->addWidget(mpShowNameCheck); - } - - else - { - QGridLayout* grid = static_cast(mpParentLayout); - int row = grid->rowCount(); - - // Set object name to the property name so it is searchable. - QLabel* propertyLabel = new QLabel(label + ":"); - propertyLabel->setObjectName(label); - grid->addWidget(propertyLabel, row, 0); - - mpShowNameCheck->setCheckState(check ? Qt::Checked : Qt::Unchecked); - grid->addWidget(mpShowNameCheck, row, 2); - } - } - - protected: - QLayout* mpParentLayout; - QHBoxLayout* mpBoundLayout = nullptr; - QCheckBox* mpShowNameCheck; -}; - -// ------------------------------------------------------------------------- -// Line edit version of bound control. Has label | line | checkbox. -class BoundLineEdit : public QLineEdit, BoundControl -{ - public: - // Direct QString editing. - BoundLineEdit(const QString& label, QString& boundValue, bool& boundCheck, - QLayout* layout, QValidator* validator = nullptr) - : BoundControl(label, boundCheck, layout) - { - if (validator) - setValidator(validator); - - if (mpBoundLayout) - mpBoundLayout->insertWidget(1, this); - else - mpParentLayout->addWidget(this); - - setText(boundValue); - - // Update the bound values whenever the user makes a change. - connect(this, &QLineEdit::textChanged, [&boundValue](const QString& text) { boundValue = text; }); - connect(mpShowNameCheck, &QCheckBox::stateChanged, [&boundCheck](int state) mutable { boundCheck = state; }); - } - - // Parameter property editing. - BoundLineEdit(Property* property, QLayout* layout, QValidator* validator = nullptr) - : BoundControl(property->Name, property->display, layout) - { - if (validator) - setValidator(validator); - - QGridLayout* grid = static_cast(mpParentLayout); - grid->addWidget(this, grid->rowCount() - 1, 1); - setText(property->Value); - - // Update the bound values whenever the user makes a change. - // connect(this, &QLineEdit::textChanged, [&boundValue](const QString& text) { boundValue = text; }); - // connect(mpShowNameCheck, &QCheckBox::stateChanged, [&boundCheck](int state) mutable { boundCheck = state; }); - } -}; - -// ------------------------------------------------------------------------- -// Combo box version of bound control. Has label | combo box | checkbox. -class BoundComboBox : public QComboBox, BoundControl -{ - public: - // Parameter property editing. - BoundComboBox(Property* property, const QStringList& options, QLayout* layout) - : BoundControl(property->Name, property->display, layout) - { - addItems(options); - setCurrentIndex(findText(property->Value, Qt::MatchStartsWith)); - - QGridLayout* grid = static_cast(mpParentLayout); - grid->addWidget(this, grid->rowCount() - 1, 1); - - QString& temp(property->Value); - - // Update the bound values whenever the user makes a change. - connect(this, &QComboBox::currentTextChanged, [&temp](const QString& text) { temp = text; qDebug() << temp; }); - // connect(mpShowNameCheck, &QCheckBox::stateChanged, [&boundCheck](int state) mutable { boundCheck = state; }); - } -}; +#define L(TEXT) QStringLiteral(TEXT) // ------------------------------------------------------------------------- // Helper to extract option strings between [] from within a description @@ -156,13 +55,24 @@ QStringList getOptionsFromString(const QString& description) return options; } +// ------------------------------------------------------------------------- +// Helper to convert a number to a string with appropriate SI code. +double str2num(const QString& string) +{ + QString unit; + double number; + double factor; + misc::str2num(string, number, unit, factor); + return number * factor; +} + // ------------------------------------------------------------------------- // Convenience base class to add a label, and checkbox. class ParamWidget { public: - ParamWidget(const QString& label, QGridLayout* layout) - : mParam(label) + ParamWidget(const QString& label, bool displayCheck, QGridLayout* layout) + : mParam(label), mHasCheck(displayCheck) { int row = layout->rowCount(); @@ -170,7 +80,7 @@ class ParamWidget layout->addWidget(mLabel, row, 0); mCheckBox = new QCheckBox("display in schematic"); - mCheckBox->setEnabled(false); + // mCheckBox->setEnabled(false); layout->addWidget(mCheckBox, row, 2); } @@ -181,7 +91,7 @@ class ParamWidget void setCheck(bool checked) { - mCheckBox->setCheckState(checked ? Qt::Checked : Qt::Unchecked); + mCheckBox->setCheckState((mHasCheck && checked) ? Qt::Checked : Qt::Unchecked); } bool check() @@ -198,7 +108,7 @@ class ParamWidget virtual void setHidden(bool hidden) { mLabel->setVisible(!hidden); - mCheckBox->setVisible(!hidden); + mCheckBox->setVisible(mHasCheck && !hidden); } virtual void setValue(const QString& value) = 0; @@ -211,6 +121,7 @@ class ParamWidget private: QLabel* mLabel; QCheckBox* mCheckBox; + bool mHasCheck; }; // ------------------------------------------------------------------------- @@ -218,13 +129,15 @@ class ParamWidget class ParamLineEdit : public QLineEdit, public ParamWidget { public: - ParamLineEdit(const QString& param, QGridLayout* layout, ComponentDialog* dialog, - void (ComponentDialog::* func)(const QString&, const QString&)) - : ParamWidget(param, layout) + ParamLineEdit(const QString& param, QValidator* validator, bool displayCheck, QGridLayout* layout, ComponentDialog* dialog, + void (ComponentDialog::* func)(const QString&, const QString&) = nullptr) + : ParamWidget(param, displayCheck, layout) { layout->addWidget(this, layout->rowCount() - 1, 1); + setValidator(validator); // Note: need to be careful about life of dialog and param here. - connect(this, &QLineEdit::textEdited, [=](const QString& value) { if (dialog) (dialog->*func)(param, value); }); + if (func) + connect(this, &QLineEdit::textEdited, [=](const QString& value) { if (dialog) (dialog->*func)(param, value); }); } void setEnabled(bool enabled) override @@ -257,9 +170,9 @@ class ParamLineEdit : public QLineEdit, public ParamWidget class ParamCombo : public QComboBox, public ParamWidget { public: - ParamCombo(const QString& param, QGridLayout* layout, ComponentDialog* dialog, + ParamCombo(const QString& param, bool displayCheck, QGridLayout* layout, ComponentDialog* dialog, void (ComponentDialog::* func)(const QString&, const QString&)) - : ParamWidget(param, layout) + : ParamWidget(param, displayCheck, layout) { layout->addWidget(this, layout->rowCount() - 1, 1); // Note: need to be careful about life of dialog and param here. @@ -300,48 +213,100 @@ class ParamCombo : public QComboBox, public ParamWidget }; -ComponentDialog::ComponentDialog(Component* component, Schematic* schematic) - : QDialog(schematic) +// ------------------------------------------------------------------------- +// Sets up the syntax highlighter for the equation editor. +EqnHighlighter::EqnHighlighter(const QString& keywordSet, QTextDocument* parent) +: QSyntaxHighlighter(parent) { - originalComponent = component; - document = schematic; + HighlightingRule rule; + + keywordFormat.setForeground(Qt::darkBlue); + keywordFormat.setFontWeight(QFont::Bold); + if (keywordSet == "ngspice") + { + // Table from page 367 of the ngspice manual. + const QString keywordPatterns[] { + L("\\bmag\\b"), L("\\bph\\b"), L("\\bcph\\b"), L("\\bunwrap\\b"), L("\\bj\\b"), + L("\\breal\\b"), L("\\bimag\\b"), L("\\bconj\\b"), L("\\bdb\\b"), L("\\blog10\\b"), L("\\bln\\b"), + L("\\bexp\\b"), L("\\babs\\b"), L("\\bsqrt\\b"), L("\\bsin\\b"), L("\\bcos\\b"), L("\\btan\\b"), + L("\\batan\\b"), L("\\bsinh\\b"), L("\\bcosh\\b"), L("\\btanh\\b"), L("\\batanh\\b"), L("\\bfloor\\b"), + L("\\bceil\\b"), L("\\bnorm\\b"), L("\\bmean\\b"), L("\\bavg\\b"), L("\\bstddev\\b"), L("\\bgroup_delay\\b"), + L("\\bvector\\b"), L("\\bcvector\\b"), L("\\bunitvec\\b"), L("\\blength\\b"), L("\\binteg\\b"), L("\\bderiv\\b"), + L("\\bvecd\\b"), L("\\bminimum\\b"), L("\\bvecmax\\b"), L("\\bmaximum\\b"), L("\\bfft\\b"), L("\\bifft\\b"), + L("\\bsortorder\\b"), L("\\btimer\\b"), L("\\bclock\\b") + }; + for (const QString &pattern : keywordPatterns) + { + rule.pattern = QRegularExpression(pattern); + rule.format = keywordFormat; + highlightingRules.append(rule); + } + } + + quotationFormat.setForeground(Qt::darkGreen); + rule.pattern = QRegularExpression(QStringLiteral("\".*\"")); + rule.format = quotationFormat; + highlightingRules.append(rule); + + functionFormat.setFontWeight(QFont::Bold); + functionFormat.setForeground(Qt::darkMagenta); + rule.pattern = QRegularExpression(QStringLiteral("\\b[A-Za-z0-9_]+(?=\\()")); + rule.format = functionFormat; + highlightingRules.append(rule); +} - qDebug() << "Processing component: " << component->Model << " name: " << component->Name; +void EqnHighlighter::highlightBlock(const QString& text) +{ + qDebug() << "Highlight block called"; - // Make a deep copy of component for edit editing (will be discarded if user cancels). - editComponent = *component; - editComponent.Props = component->Props; - changed = false; + for (const HighlightingRule &rule : std::as_const(highlightingRules)) + { + QRegularExpressionMatchIterator matchIterator = rule.pattern.globalMatch(text); + + while (matchIterator.hasNext()) + { + QRegularExpressionMatch match = matchIterator.next(); + setFormat(match.capturedStart(), match.capturedLength(), rule.format); + } + } +} + +ComponentDialog::ComponentDialog(Component* schematicComponent, Schematic* schematic) + : QDialog(schematic) +{ + component = schematicComponent; + document = schematic; restoreGeometry(_settings::Get().item("ComponentDialog/geometry")); - setWindowTitle(tr("Edit Component Properties") + " - " + originalComponent->Description.toUpper()); + setWindowTitle(tr("Edit Component Properties") + " - " + component->Description.toUpper()); // Setup dialog layout. QVBoxLayout* mainLayout = new QVBoxLayout(this); QGridLayout* propertiesPageLayout; - + // Setup validators. - ValInteger = new QIntValidator(1, 1000000, this); - Expr.setPattern("[^\"=]*"); // valid expression for property 'edit' - Validator = new QRegularExpressionValidator(Expr, this); - Expr.setPattern("[^\"]*"); // valid expression for property 'edit' - Validator2 = new QRegularExpressionValidator(Expr, this); - Expr.setPattern("[\\w_.,\\(\\) @:\\[\\]]+"); // valid expression for property 'NameEdit'. Space to enable Spice-style par sweep - ValRestrict = new QRegularExpressionValidator(Expr, this); - Expr.setPattern("[A-Za-z][A-Za-z0-9_]+"); - ValName = new QRegularExpressionValidator(Expr,this); - - mpNameLineEdit = new BoundLineEdit("Name:", editComponent.Name, editComponent.showName, mainLayout, Validator); + // TODO: These don't look right and don't seem to restrict the edit boxes in the way they should? + intVal = new QIntValidator(1, 1000000, this); + compNameVal = new QRegularExpressionValidator(QRegularExpression("[A-Za-z][A-Za-z0-9_]+"),this); + nameVal = new QRegularExpressionValidator(QRegularExpression("[\\w_.,\\(\\) @:\\[\\]]+"), this); + paramVal = new QRegularExpressionValidator(QRegularExpression("[^\"=]*"), this); + + // Add the component name. + QGridLayout* nameLayout = new QGridLayout; + mainLayout->addLayout(nameLayout); + componentNameWidget = new ParamLineEdit("Name", compNameVal, true, nameLayout, this, nullptr); + componentNameWidget->setValue(component->Name); + componentNameWidget->setCheck(component->showName); // Try to work out what kind of component this is. - isEquation = QStringList({"Eqn", "NutmegEq"}).contains(originalComponent->Model); - hasSweep = QStringList({".AC", ".NOISE", ".SW", ".SP", ".TR"}).contains(originalComponent->Model); + isEquation = QStringList({"Eqn", "NutmegEq"}).contains(component->Model); + hasSweep = QStringList({".AC", ".NOISE", ".SW", ".SP", ".TR"}).contains(component->Model); sweepProperties = QStringList({"Sim", "Param", "Type", "Values", "Start", "Stop", "Points"}); + hasFile = component->Props.count() > 0 && component->Props.at(0)->Name == "File"; + // Setup the dialog according to the component kind. if (isEquation) { - qDebug() << "This is an equation"; - // Create the equation editor. QGroupBox *editorGroup = new QGroupBox(tr("Equation Editor")); static_cast(layout())->addWidget(editorGroup, 2); @@ -354,6 +319,7 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* schematic) QFont font("Courier", 10); eqnEditor = new QTextEdit(); eqnEditor->setFont(font); + new EqnHighlighter("ngspice", eqnEditor->document()); editorLayout->addWidget(eqnEditor, 2); updateEqnEditor(); @@ -373,14 +339,16 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* schematic) QGridLayout* sweepPageLayout = new QGridLayout; sweepPage->setLayout(sweepPageLayout); - // Sweep page setup - add widgets for each possible sweep property. - sweepParamWidget["Sim"] = new ParamCombo("Sim", sweepPageLayout, this, &ComponentDialog::updateSweepProperty); - sweepParamWidget["Param"] = new ParamLineEdit("Param", sweepPageLayout, this, &ComponentDialog::updateSweepProperty); - sweepParamWidget["Type"] = new ParamCombo("Type", sweepPageLayout, this, &ComponentDialog::updateSweepProperty); - sweepParamWidget["Values"] = new ParamLineEdit("Values", sweepPageLayout, this, &ComponentDialog::updateSweepProperty); - sweepParamWidget["Start"] = new ParamLineEdit("Start", sweepPageLayout, this, &ComponentDialog::updateSweepProperty); - sweepParamWidget["Stop"] = new ParamLineEdit("Stop", sweepPageLayout, this, &ComponentDialog::updateSweepProperty); - sweepParamWidget["Points"] = new ParamLineEdit("Points", sweepPageLayout, this, &ComponentDialog::updateSweepProperty); + // Sweep page setup - add widgets for each possible sweep property. + // void (ComponentDialog::* func)(const QString&, const QString&) = &ComponentDialog::updateSweepProperty; + sweepParamWidget["Sim"] = new ParamCombo("Sim", true, sweepPageLayout, this, &ComponentDialog::updateSweepProperty); + sweepParamWidget["Param"] = new ParamLineEdit("Param", compNameVal, true, sweepPageLayout, this, &ComponentDialog::updateSweepProperty); + sweepParamWidget["Type"] = new ParamCombo("Type", true, sweepPageLayout, this, &ComponentDialog::updateSweepProperty); + sweepParamWidget["Values"] = new ParamLineEdit("Values", paramVal, true, sweepPageLayout, this, &ComponentDialog::updateSweepProperty); + sweepParamWidget["Start"] = new ParamLineEdit("Start", paramVal, true, sweepPageLayout, this, &ComponentDialog::updateSweepProperty); + sweepParamWidget["Stop"] = new ParamLineEdit("Stop", paramVal, true, sweepPageLayout, this, &ComponentDialog::updateSweepProperty); + sweepParamWidget["Step"] = new ParamLineEdit("Step", paramVal, false, sweepPageLayout, this, &ComponentDialog::updateSweepProperty); + sweepParamWidget["Points"] = new ParamLineEdit("Points", intVal, true, sweepPageLayout, this, &ComponentDialog::updateSweepProperty); // Setup the widget specialisations for each simulation type. sweepTypeEnabledParams["lin"] = QStringList{"Sim", "Param", "Type", "Start", "Stop", "Step", "Points"}; @@ -392,6 +360,7 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* schematic) paramsHiddenBySim["Param"] = QStringList{".AC", ".SP"}; // Setup the widgets as per the stored type. + sweepParamWidget["Sim"]->setOptions(getSimulationList()); sweepParamWidget["Type"]->setOptions({"lin", "log", "list", "value"}); updateSweepProperty("All", ""); @@ -401,7 +370,7 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* schematic) propertiesPageLayout = new QGridLayout(propertiesPage); } - // This component does not have sweep settings, add properties directly to the dialog itself. + // This component does not have sweep settings, so add properties directly to the dialog itself. else { propertiesPageLayout = new QGridLayout(this); @@ -431,6 +400,19 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* schematic) // Try to move the cursor to the editable cell if any cell is clicked. connect(propertyTable, &QTableWidget::cellClicked, [=](int row, int column) { (void)column; propertyTable->setCurrentCell(row, 1); } ); + + // Add the file control buttons if applicable. + if (hasFile) + { + QHBoxLayout* fileButtonLayout = new QHBoxLayout; + mainLayout->addLayout(fileButtonLayout); + QPushButton* fileBrowseButton = new QPushButton("&Open File", this); + QPushButton* fileEditButton = new QPushButton("&Edit File", this); + fileButtonLayout->addWidget(fileBrowseButton); + connect(fileBrowseButton, &QPushButton::released, this, &ComponentDialog::slotBrowseFile); + fileButtonLayout->addWidget(fileEditButton); + connect(fileEditButton, &QPushButton::released, this, &ComponentDialog::slotEditFile); + } } // Add the dialog button widgets. @@ -445,23 +427,20 @@ ComponentDialog::ComponentDialog(Component* component, Schematic* schematic) ComponentDialog::~ComponentDialog() { - delete Validator; - delete Validator2; - delete ValRestrict; - delete ValInteger; + delete compNameVal; + delete intVal; + delete nameVal; + delete paramVal; } // ------------------------------------------------------------------------- // Updates all the widgets on the sweep page according to the sweep type. void ComponentDialog::updateSweepWidgets(const QString& type) { - qDebug() << "Update sim widgets " << type; - for (auto it = sweepParamWidget.keyValueBegin(); it != sweepParamWidget.keyValueEnd(); ++it) { - qDebug() << "Checking " << it->first; it->second->setHidden(paramsHiddenBySim.contains(it->first) && - paramsHiddenBySim[it->first].contains(editComponent.Model)); + paramsHiddenBySim[it->first].contains(component->Model)); it->second->setEnabled(sweepTypeEnabledParams.contains(type) && sweepTypeEnabledParams[type].contains(it->first)); } @@ -471,43 +450,61 @@ void ComponentDialog::updateSweepWidgets(const QString& type) // Updates all the sweep params on the sweep page according the component value. void ComponentDialog::updateSweepProperty(const QString& property, const QString& value) { - qDebug() << "Update sweep property " << property << " value: " << value; + qDebug() << "updateSweepProperty " << property << " = " << value; - // Type has changed so update the widgets first. + // Type has changed so update the widget presentation. if (property == "Type") updateSweepWidgets(sweepParamWidget["Type"]->value()); - // Repopulate the property fields. if (property == "All") { - for (auto property : editComponent.Props) + for (auto property : component->Props) { - qDebug() << "Updating " << property->Name; if (sweepParamWidget.contains(property->Name)) { - qDebug() << "Setting to value " << property->Value; sweepParamWidget[property->Name]->setValue(property->Value); sweepParamWidget[property->Name]->setCheck(property->display); } } } + + if (property == "Values") + { + // Do nothing. + } + + // Specialisations for updating start, stop, step, and points values. + else + { + double start = str2num(sweepParamWidget["Start"]->value()); + double stop = str2num(sweepParamWidget["Stop"]->value()); + + if (property == "Start" || property == "Stop" || property == "Points" || property == "All") + { + double points = str2num(sweepParamWidget["Points"]->value()); + double step = (stop - start) / (points - 1.0); + sweepParamWidget["Step"]->setValue(misc::num2str(step)); + } + else if (property == "Step") + { + double step = str2num(sweepParamWidget["Step"]->value()); + double points = (stop - start) / step + 1; + sweepParamWidget["Points"]->setValue(misc::num2str(points)); + } + } } // ------------------------------------------------------------------------- -// Updates the equation textedit with the currently stored value. +// Updates the property table with the current values stored in the component. void ComponentDialog::updatePropertyTable() { // Add component properties to the properties table with the exception of the sweep properties. int row = 0; - for (Property* property : editComponent.Props) + for (Property* property : component->Props) { - qDebug() << " Loading originalComponent->Props :" << property->Name << property->Value << property->display << property->Description; - // Check this is a sweep property. + // Check this is a sweep property (as there not added to property table). if (hasSweep && sweepProperties.contains(property->Name)) - { - qDebug() << "Sweep property (do not add to property table): " << property->Name; continue; - } propertyTable->setRowCount(propertyTable->rowCount() + 1); propertyTable->setItem(row, 0, new QTableWidgetItem(property->Name, LabelCell)); @@ -539,7 +536,6 @@ void ComponentDialog::updatePropertyTable() row++; } - qDebug() << row << " rows added to propertyTable"; } // ------------------------------------------------------------------------- @@ -548,17 +544,14 @@ void ComponentDialog::updateEqnEditor() { QString eqnList; - for (auto property : editComponent.Props) + for (auto property : component->Props) { if (property->Name == "Simulation") - { eqnSimCombo->setCurrentText(property->Value); - } else eqnList.append(property->Name + " = " + property->Value + "\n"); } - qDebug() << "Equation list is: " << eqnList; eqnEditor->setPlainText(eqnList); } @@ -566,12 +559,12 @@ void ComponentDialog::updateEqnEditor() // Clears the current equation component and writes the context of dialog. void ComponentDialog::writeEquation() { - qDebug() << "writeEquation"; - originalComponent->Props.clear(); + // Clear all old properties and free their memory. + qDeleteAll(component->Props.begin(), component->Props.end()); + component->Props.clear(); - // Property(const QString& _Name="", const QString& _Value="", bool _display=false, const QString& Desc="") - qDebug() << "Writing simulation: " << eqnSimCombo->currentText(); - originalComponent->Props.append(new Property("Simulation", eqnSimCombo->currentText(), true)); + // Note: the description needs to be written as "Simulation name" because this is used when saving the file. + component->Props.append(new Property("Simulation", eqnSimCombo->currentText(), true, "Simulation name")); QString text = eqnEditor->document()->toPlainText(); QStringList lines = text.split('\n', Qt::SkipEmptyParts); @@ -579,11 +572,8 @@ void ComponentDialog::writeEquation() for (const QString& line : lines) { QStringList parts = line.split('='); - - Q_ASSERT(parts.count() == 2); - - qDebug() << parts[0] << " : " << parts[1]; - originalComponent->Props.append(new Property(parts[0].trimmed(), parts[1].trimmed(), true)); + if (parts.count() == 2) + component->Props.append(new Property(parts[0].trimmed(), parts[1].trimmed(), true)); } } @@ -591,8 +581,6 @@ void ComponentDialog::writeEquation() // Applies all changes and closes the dialog. void ComponentDialog::slotOKButton() { - qDebug() << "slotOK"; - QSettings settings("qucs","qucs_s"); settings.setValue("ComponentDialog/geometry", saveGeometry()); @@ -605,35 +593,25 @@ void ComponentDialog::slotOKButton() // result of the applied changes. void ComponentDialog::slotApplyButton() { - qDebug() << "slotApplyButton"; - - // Check the new component name is not empty and not a duplicate. - if (editComponent.Name.isEmpty() || - document->getComponentByName(editComponent.Name) != nullptr) - { - // Reset to the current name if a conflict is found. - editComponent.Name = originalComponent->Name; - mpNameLineEdit->setText(editComponent.Name); - } + // Update component name if valid. + component->showName = componentNameWidget->check(); + QString name = componentNameWidget->value(); + if (!name.isEmpty() && !document->getComponentByName(name)) + component->Name = name; + else + componentNameWidget->setValue(component->Name); if (isEquation) - { - qDebug() << "Writing equation"; writeEquation(); - } else { // Walk through the Props list and update component. int row = 0; - for (Property* property : originalComponent->Props) + for (Property* property : component->Props) { - qDebug() << "Found property " << property->Name; - if (hasSweep && sweepParamWidget.contains(property->Name)) { - qDebug() << "Setting sweepParamWidget " << property->Name << " to " << sweepParamWidget[property->Name]->value() - << " and checked to " << sweepParamWidget[property->Name]->check(); property->Value = sweepParamWidget[property->Name]->value(); property->display = sweepParamWidget[property->Name]->check(); } @@ -646,15 +624,11 @@ void ComponentDialog::slotApplyButton() if (item->type() == ComboBoxCell) { QComboBox* cellCombo = static_cast(propertyTable->cellWidget(row, 1)); - qDebug() << "Setting property #" << row << " to " << cellCombo->currentText(); property->Value = cellCombo->currentText(); } else - { - qDebug() << "Setting property #" << row << " to " << propertyTable->item(row, 1)->text(); property->Value = propertyTable->item(row, 1)->text(); - } property->display = (propertyTable->item(row, 2)->checkState() == Qt::Checked); row++; @@ -662,36 +636,38 @@ void ComponentDialog::slotApplyButton() } } - document->recreateComponent(originalComponent); + document->recreateComponent(component); document->viewport()->repaint(); // TODO: Why is the text being repositioned? // If this is needed, make it a function because something similar is called elsewhere. + /* if (changed) { int dx, dy; - originalComponent->textSize(dx, dy); + component->textSize(dx, dy); if(tx_Dist != 0) { - originalComponent->tx += tx_Dist-dx; + component->tx += tx_Dist-dx; tx_Dist = dx; } if(ty_Dist != 0) { - originalComponent->ty += ty_Dist-dy; + component->ty += ty_Dist-dy; ty_Dist = dy; } } + */ } // ------------------------------------------------------------------------- void ComponentDialog::slotBrowseFile() { // current file name from the component properties - QString currFileName = propertyTable->item(propertyTable->currentRow(), 1)->text(); + QString currFileName = component->Props.at(0)->Value; QFileInfo currFileInfo(currFileName); // name of the schematic where component is instantiated (may be empty) - QFileInfo schematicFileInfo = originalComponent->getSchematic()->getFileInfo(); + QFileInfo schematicFileInfo = component->getSchematic()->getFileInfo(); QString schematicFileName = schematicFileInfo.fileName(); // directory to use for the file open dialog QString currDir; @@ -743,20 +719,20 @@ void ComponentDialog::slotBrowseFile() s = file.fileName(); } } - // edit->setText(s); - int row = propertyTable->currentRow(); - propertyTable->item(row,1)->setText(s); + propertyTable->item(0, 1)->setText(s); } } // ------------------------------------------------------------------------- void ComponentDialog::slotEditFile() { - // document->App->editFile(misc::properAbsFileName(edit->text(), document)); + qDebug() << "editing file " << component->Props.at(0)->Value << " or " << propertyTable->item(0, 1)->text(); + document->App->editFile(misc::properAbsFileName(component->Props.at(0)->Value, document)); } // ------------------------------------------------------------------------- /* TODO: Need to implement mechanism to update POINTS when START, STOP, STEP is changed + DONE: Implemented for linear sweeps, TODO: for log sweeps. void ComponentDialog::slotNumberChanged(const QString&) { QString Unit, tmp; @@ -836,7 +812,7 @@ void ComponentDialog::slotStepChanged(const QString& Step) QStringList ComponentDialog::getSimulationList() { QStringList sim_lst; - Schematic *sch = originalComponent->getSchematic(); + Schematic *sch = component->getSchematic(); if (sch == nullptr) { return sim_lst; } @@ -865,10 +841,10 @@ QStringList ComponentDialog::getSimulationList() } // ------------------------------------------------------------------------- -// +// Fill from SPICE - what does this do? void ComponentDialog::slotFillFromSpice() { - fillFromSpiceDialog *dlg = new fillFromSpiceDialog(originalComponent, this); + fillFromSpiceDialog *dlg = new fillFromSpiceDialog(component, this); auto r = dlg->exec(); if (r == QDialog::Accepted) { // updateCompPropsList(); diff --git a/qucs/components/componentdialog.h b/qucs/components/componentdialog.h index dc8f7f61a..c73e6d2c7 100644 --- a/qucs/components/componentdialog.h +++ b/qucs/components/componentdialog.h @@ -22,6 +22,7 @@ #include #include +#include #include class Schematic; @@ -39,8 +40,8 @@ class QComboBox; class QPushButton; class QGridLayout; -class BoundLineEdit; class ParamWidget; +class ParamLineEdit; // struct SweepUISettingType; struct QStringPair; @@ -62,17 +63,17 @@ private slots: void slotFillFromSpice(); private: - QValidator *Validator, *ValRestrict, *Validator2, *ValName; - QRegularExpression Expr; - QIntValidator *ValInteger; + QIntValidator* intVal; + QValidator* compNameVal; + QValidator* nameVal; + QValidator* paramVal; QTableWidget* propertyTable; QTextEdit* eqnEditor; QComboBox* eqnSimCombo; - Component* originalComponent; + Component* component; Schematic* document; - Component editComponent; // Maps to contain specialisations for different sweep types. Note: the arrangement // has been chosen to have the smallest number of map elements. @@ -84,16 +85,14 @@ private slots: // TODO: It would be better for simulations with sweeps to have a flag saying so. bool isEquation; bool hasSweep; + bool hasFile = false; QStringList sweepProperties; // Maps to store references to edit widgets. QMap sweepParamWidget; - BoundLineEdit* mpNameLineEdit; - - bool changed; - int tx_Dist, ty_Dist; // remember the text position - bool setAllVisible; // used for toggling visibility of properties + ParamLineEdit* componentNameWidget; + int tx_Dist, ty_Dist; // remember the text position QStringList getSimulationList(); @@ -110,6 +109,29 @@ private slots: enum CELL_TYPE { LabelCell = 1000, TextEditCell, ComboBoxCell, CheckBoxCell}; }; +class EqnHighlighter : public QSyntaxHighlighter +{ +Q_OBJECT + +public: + EqnHighlighter(const QString& keywordSet, QTextDocument* parent); + +protected: + void highlightBlock(const QString &text) override; + +private: + struct HighlightingRule + { + QRegularExpression pattern; + QTextCharFormat format; + }; + QList highlightingRules; + + QTextCharFormat keywordFormat; + QTextCharFormat quotationFormat; + QTextCharFormat functionFormat; +}; + struct QStringPair { QStringPair(const QString& b, const QString& a) From ea4bc2c79a1eee2bbb157e8cb6483776f5416f0b Mon Sep 17 00:00:00 2001 From: Iwbnwif Yiw Date: Sun, 10 Nov 2024 17:00:25 +0000 Subject: [PATCH 15/15] Add transient simulation to list of simulations with a sweep page. Set the property table values after openPersistentEditor to avoid them being selected by the editor. --- qucs/components/componentdialog.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/qucs/components/componentdialog.cpp b/qucs/components/componentdialog.cpp index 32e8e38f6..de319f7c3 100644 --- a/qucs/components/componentdialog.cpp +++ b/qucs/components/componentdialog.cpp @@ -257,8 +257,6 @@ EqnHighlighter::EqnHighlighter(const QString& keywordSet, QTextDocument* parent) void EqnHighlighter::highlightBlock(const QString& text) { - qDebug() << "Highlight block called"; - for (const HighlightingRule &rule : std::as_const(highlightingRules)) { QRegularExpressionMatchIterator matchIterator = rule.pattern.globalMatch(text); @@ -356,8 +354,8 @@ ComponentDialog::ComponentDialog(Component* schematicComponent, Schematic* schem sweepTypeEnabledParams["list"] = QStringList{"Type", "Values"}; sweepTypeEnabledParams["value"] = QStringList{"Type", "Values"}; sweepTypeSpecialLabels["log"] = {{"Step:", "Points per decade"}}; - paramsHiddenBySim["Sim"] = QStringList{".AC", ".SP"}; - paramsHiddenBySim["Param"] = QStringList{".AC", ".SP"}; + paramsHiddenBySim["Sim"] = QStringList{".AC", ".SP", ".TR"}; + paramsHiddenBySim["Param"] = QStringList{".AC", ".SP", ".TR"}; // Setup the widgets as per the stored type. sweepParamWidget["Sim"]->setOptions(getSimulationList()); @@ -524,8 +522,9 @@ void ComponentDialog::updatePropertyTable() // Add text edit if no options found. else { - propertyTable->setItem(row, 1, new QTableWidgetItem(property->Value, TextEditCell)); + propertyTable->setItem(row, 1, new QTableWidgetItem("", TextEditCell)); propertyTable->openPersistentEditor(propertyTable->item(row, 1)); + propertyTable->item(row, 1)->setText(property->Value); } // Set check box and description.