mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-26 11:54:14 +02:00
8ef130a59d
QET had no icon theme: the 446 entries of the icon table and the 116 iconsets in .ui files each named a resource path, so an icon could only ever be one file, and a variant for another palette or a vector source had nowhere to go (GitHub #466, #690, #870). This adds the theme layout without changing a single pixel; a dark variant comes in a follow-up. The theme "qet" follows the freedesktop layout Qt's icon loader understands. misc/make_icon_themes.py generates ico/icon-themes.qrc, which aliases the existing ico/<size>/<name>.png files into themes/qet/<size>/<name>.png, and ico/themes/qet/index.theme. No file moves. The four table entries that paired a 16 pixel file with a 22 pixel file of another name (ConductorSettings, DiagramAdd, DiagramDelete, DialogInformation) get the 22 pixel file aliased under the 16 pixel name. QETApp::initIconTheme() registers the theme before initIcons() and makes it current on every platform, so a desktop icon theme cannot replace QET's icons. Icons are then looked up by name: QIcon::fromTheme() in qeticons.cpp and in the few places that built a QIcon from a resource path directly, and theme="..." on the iconsets in .ui files, with the resource path kept as fallback. Flags, color swatches, application and MIME icons stay on their paths. One entry does not go through the theme. The elements panel draws the project root with ProjectFileGP in the 50 pixel slot it reserves for element previews, and the name "project" also carries the 128 pixel file the configuration dialog uses. On a 2x display Qt's loader picks that file for a 50 pixel request and fills the slot. ProjectFileGP loads the 16 and 22 pixel files directly, as before. tests/qttest/tst_qeticons: every name in the theme resolves, the four aliases resolve at 22 pixels, a Fusion tool button shows its icon at 3:1 with disabled weaker than enabled, and the project root icon stays at 22 pixels or less when asked for 50 at 2x while the configuration dialog still gets its 128 pixel file. The rendering helpers shared with tst_qetpalette moved to tests/qttest/inkcontrast.h.
491 lines
17 KiB
XML
491 lines
17 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<ui version="4.0">
|
|
<class>TitleBlockPropertiesWidget</class>
|
|
<widget class="QWidget" name="TitleBlockPropertiesWidget">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>753</width>
|
|
<height>901</height>
|
|
</rect>
|
|
</property>
|
|
<property name="sizePolicy">
|
|
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
|
<horstretch>0</horstretch>
|
|
<verstretch>0</verstretch>
|
|
</sizepolicy>
|
|
</property>
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>0</width>
|
|
<height>0</height>
|
|
</size>
|
|
</property>
|
|
<property name="windowTitle">
|
|
<string>Form</string>
|
|
</property>
|
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
<item>
|
|
<widget class="QGroupBox" name="m_tbt_gb">
|
|
<property name="title">
|
|
<string>Informations des cartouches</string>
|
|
</property>
|
|
<property name="checkable">
|
|
<bool>false</bool>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>false</bool>
|
|
</property>
|
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
<item>
|
|
<layout class="QHBoxLayout" name="m_tbt_hlayout" stretch="0,1,0,0">
|
|
<property name="sizeConstraint">
|
|
<enum>QLayout::SetDefaultConstraint</enum>
|
|
</property>
|
|
<item>
|
|
<widget class="QLabel" name="m_tbt_label">
|
|
<property name="text">
|
|
<string>Modèle :</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QComboBox" name="m_tbt_cb">
|
|
<property name="sizePolicy">
|
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
<horstretch>0</horstretch>
|
|
<verstretch>0</verstretch>
|
|
</sizepolicy>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QComboBox" name="m_display_at_cb">
|
|
<property name="sizePolicy">
|
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
<horstretch>0</horstretch>
|
|
<verstretch>0</verstretch>
|
|
</sizepolicy>
|
|
</property>
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>0</width>
|
|
<height>0</height>
|
|
</size>
|
|
</property>
|
|
<property name="maximumSize">
|
|
<size>
|
|
<width>16777215</width>
|
|
<height>16777215</height>
|
|
</size>
|
|
</property>
|
|
<property name="toolTip">
|
|
<string><html><head/><body><p>Affiche le cartouche en bas (horizontalement) ou à droite (verticalement) du folio.</p></body></html></string>
|
|
</property>
|
|
<property name="iconSize">
|
|
<size>
|
|
<width>22</width>
|
|
<height>22</height>
|
|
</size>
|
|
</property>
|
|
<item>
|
|
<property name="text">
|
|
<string notr="true"/>
|
|
</property>
|
|
<property name="icon">
|
|
<iconset theme="titleblock-bottom" resource="../../qelectrotech.qrc">
|
|
<normaloff>:/ico/22x22/titleblock-bottom.png</normaloff>:/ico/22x22/titleblock-bottom.png</iconset>
|
|
</property>
|
|
</item>
|
|
<item>
|
|
<property name="text">
|
|
<string notr="true"/>
|
|
</property>
|
|
<property name="icon">
|
|
<iconset theme="titleblock-right" resource="../../qelectrotech.qrc">
|
|
<normaloff>:/ico/22x22/titleblock-right.png</normaloff>:/ico/22x22/titleblock-right.png</iconset>
|
|
</property>
|
|
</item>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QPushButton" name="m_tbt_pb">
|
|
<property name="sizePolicy">
|
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
|
<horstretch>0</horstretch>
|
|
<verstretch>0</verstretch>
|
|
</sizepolicy>
|
|
</property>
|
|
<property name="text">
|
|
<string/>
|
|
</property>
|
|
<property name="icon">
|
|
<iconset theme="edit-rename" resource="../../qelectrotech.qrc">
|
|
<normaloff>:/ico/22x22/edit-rename.png</normaloff>:/ico/22x22/edit-rename.png</iconset>
|
|
</property>
|
|
<property name="iconSize">
|
|
<size>
|
|
<width>22</width>
|
|
<height>22</height>
|
|
</size>
|
|
</property>
|
|
<property name="flat">
|
|
<bool>false</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
<item>
|
|
<widget class="QTabWidget" name="tabWidget">
|
|
<property name="sizePolicy">
|
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
<horstretch>0</horstretch>
|
|
<verstretch>0</verstretch>
|
|
</sizepolicy>
|
|
</property>
|
|
<property name="tabPosition">
|
|
<enum>QTabWidget::South</enum>
|
|
</property>
|
|
<property name="tabShape">
|
|
<enum>QTabWidget::Rounded</enum>
|
|
</property>
|
|
<property name="currentIndex">
|
|
<number>0</number>
|
|
</property>
|
|
<property name="elideMode">
|
|
<enum>Qt::ElideNone</enum>
|
|
</property>
|
|
<property name="usesScrollButtons">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="tabsClosable">
|
|
<bool>false</bool>
|
|
</property>
|
|
<widget class="QWidget" name="tab">
|
|
<attribute name="title">
|
|
<string>Principales</string>
|
|
</attribute>
|
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
<item>
|
|
<layout class="QGridLayout" name="gridLayout_4">
|
|
<item row="3" column="1">
|
|
<widget class="QLabel" name="label_4">
|
|
<property name="text">
|
|
<string>Date :</string>
|
|
</property>
|
|
<property name="alignment">
|
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="10" column="3">
|
|
<layout class="QGridLayout" name="gridLayout">
|
|
<item row="0" column="0">
|
|
<widget class="QComboBox" name="auto_page_cb">
|
|
<property name="sizePolicy">
|
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
<horstretch>0</horstretch>
|
|
<verstretch>0</verstretch>
|
|
</sizepolicy>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="0" column="1">
|
|
<widget class="QPushButton" name="m_edit_autofolionum_pb">
|
|
<property name="sizePolicy">
|
|
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
|
<horstretch>0</horstretch>
|
|
<verstretch>0</verstretch>
|
|
</sizepolicy>
|
|
</property>
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>16</width>
|
|
<height>16</height>
|
|
</size>
|
|
</property>
|
|
<property name="text">
|
|
<string/>
|
|
</property>
|
|
<property name="icon">
|
|
<iconset theme="configure" resource="../../qelectrotech.qrc">
|
|
<normaloff>:/ico/16x16/configure.png</normaloff>:/ico/16x16/configure.png</iconset>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
<item row="2" column="1">
|
|
<widget class="QLabel" name="label_3">
|
|
<property name="text">
|
|
<string>Auteur :</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="9" column="1">
|
|
<widget class="QLabel" name="label_12">
|
|
<property name="text">
|
|
<string>Indice Rev:</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="8" column="3">
|
|
<widget class="QLineEdit" name="m_loc">
|
|
<property name="toolTip">
|
|
<string>Disponible en tant que %locmach pour les modèles de cartouches</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="6" column="3">
|
|
<widget class="QLineEdit" name="m_plant">
|
|
<property name="toolTip">
|
|
<string><html><head/><body><p>Disponible en tant que %plant pour les modèles de cartouches</p></body></html></string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="1" column="3">
|
|
<widget class="QLineEdit" name="m_title_le">
|
|
<property name="toolTip">
|
|
<string>Disponible en tant que %title pour les modèles de cartouches</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="5" column="1">
|
|
<widget class="QLabel" name="label_6">
|
|
<property name="text">
|
|
<string>Folio :</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="4" column="1">
|
|
<widget class="QLabel" name="label_5">
|
|
<property name="text">
|
|
<string>Fichier :</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="2" column="3">
|
|
<widget class="QLineEdit" name="m_author_le">
|
|
<property name="toolTip">
|
|
<string>Disponible en tant que %author pour les modèles de cartouches</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="4" column="3">
|
|
<widget class="QLineEdit" name="m_file_le">
|
|
<property name="toolTip">
|
|
<string>Disponible en tant que %filename pour les modèles de cartouches</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="3" column="3">
|
|
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,1,0">
|
|
<item row="0" column="0">
|
|
<widget class="QRadioButton" name="m_no_date_rb">
|
|
<property name="text">
|
|
<string>Pas de date</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="1" column="0">
|
|
<widget class="QRadioButton" name="m_current_date_rb">
|
|
<property name="text">
|
|
<string>Date courante</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="2" column="2">
|
|
<widget class="QPushButton" name="m_date_now_pb">
|
|
<property name="toolTip">
|
|
<string>Appliquer la date actuelle</string>
|
|
</property>
|
|
<property name="text">
|
|
<string/>
|
|
</property>
|
|
<property name="icon">
|
|
<iconset theme="start" resource="../../qelectrotech.qrc">
|
|
<normaloff>:/ico/22x22/start.png</normaloff>:/ico/22x22/start.png</iconset>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="2" column="1">
|
|
<widget class="QDateEdit" name="m_date_edit">
|
|
<property name="toolTip">
|
|
<string>Disponible en tant que %date pour les modèles de cartouches</string>
|
|
</property>
|
|
<property name="frame">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="calendarPopup">
|
|
<bool>true</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="2" column="0">
|
|
<widget class="QRadioButton" name="m_fixed_date_rb">
|
|
<property name="text">
|
|
<string>Date fixe :</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
<item row="5" column="3">
|
|
<widget class="QLineEdit" name="m_folio_le">
|
|
<property name="toolTip">
|
|
<string>Disponible en tant que %folio pour les modèles de cartouches
|
|
Les variables suivantes sont utilisables :
|
|
- %id : numéro du folio courant dans le projet
|
|
- %total : nombre total de folios dans le projet
|
|
- %autonum : Folio Auto Numeration</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="1" column="1">
|
|
<widget class="QLabel" name="label_2">
|
|
<property name="text">
|
|
<string>Titre :</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="10" column="1">
|
|
<widget class="QLabel" name="label_9">
|
|
<property name="sizePolicy">
|
|
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
|
<horstretch>0</horstretch>
|
|
<verstretch>0</verstretch>
|
|
</sizepolicy>
|
|
</property>
|
|
<property name="text">
|
|
<string>Page Num:</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="9" column="3">
|
|
<widget class="QLineEdit" name="m_indice">
|
|
<property name="toolTip">
|
|
<string>Disponible en tant que %indexrev pour les modèles de cartouches</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="6" column="1">
|
|
<widget class="QLabel" name="label_10">
|
|
<property name="text">
|
|
<string>Installation :</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="8" column="1">
|
|
<widget class="QLabel" name="label_11">
|
|
<property name="text">
|
|
<string>Localisation:</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
<item>
|
|
<spacer name="verticalSpacer">
|
|
<property name="orientation">
|
|
<enum>Qt::Vertical</enum>
|
|
</property>
|
|
<property name="sizeHint" stdset="0">
|
|
<size>
|
|
<width>20</width>
|
|
<height>40</height>
|
|
</size>
|
|
</property>
|
|
</spacer>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
<widget class="QWidget" name="tab_2">
|
|
<attribute name="title">
|
|
<string>Personnalisées</string>
|
|
</attribute>
|
|
<layout class="QVBoxLayout" name="verticalLayout">
|
|
<item>
|
|
<layout class="QVBoxLayout" name="m_tab2_vlayout">
|
|
<item>
|
|
<widget class="QLabel" name="label_8">
|
|
<property name="text">
|
|
<string>Vous pouvez définir ici vos propres associations noms/valeurs pour que le cartouche en tienne compte. Exemple :
|
|
associer le nom "volta" et la valeur "1745" remplacera %{volta} par 1745 dans le cartouche.</string>
|
|
</property>
|
|
<property name="wordWrap">
|
|
<bool>true</bool>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
<tabstops>
|
|
<tabstop>m_title_le</tabstop>
|
|
<tabstop>m_author_le</tabstop>
|
|
<tabstop>m_no_date_rb</tabstop>
|
|
<tabstop>m_current_date_rb</tabstop>
|
|
<tabstop>m_fixed_date_rb</tabstop>
|
|
<tabstop>m_date_edit</tabstop>
|
|
<tabstop>m_date_now_pb</tabstop>
|
|
<tabstop>m_file_le</tabstop>
|
|
<tabstop>m_folio_le</tabstop>
|
|
<tabstop>m_plant</tabstop>
|
|
<tabstop>m_loc</tabstop>
|
|
<tabstop>m_indice</tabstop>
|
|
<tabstop>auto_page_cb</tabstop>
|
|
<tabstop>m_edit_autofolionum_pb</tabstop>
|
|
<tabstop>m_tbt_cb</tabstop>
|
|
<tabstop>m_display_at_cb</tabstop>
|
|
<tabstop>m_tbt_pb</tabstop>
|
|
<tabstop>tabWidget</tabstop>
|
|
</tabstops>
|
|
<resources>
|
|
<include location="../../qelectrotech.qrc"/>
|
|
</resources>
|
|
<connections>
|
|
<connection>
|
|
<sender>m_fixed_date_rb</sender>
|
|
<signal>toggled(bool)</signal>
|
|
<receiver>m_date_edit</receiver>
|
|
<slot>setEnabled(bool)</slot>
|
|
<hints>
|
|
<hint type="sourcelabel">
|
|
<x>146</x>
|
|
<y>199</y>
|
|
</hint>
|
|
<hint type="destinationlabel">
|
|
<x>275</x>
|
|
<y>199</y>
|
|
</hint>
|
|
</hints>
|
|
</connection>
|
|
<connection>
|
|
<sender>m_fixed_date_rb</sender>
|
|
<signal>toggled(bool)</signal>
|
|
<receiver>m_date_now_pb</receiver>
|
|
<slot>setEnabled(bool)</slot>
|
|
<hints>
|
|
<hint type="sourcelabel">
|
|
<x>102</x>
|
|
<y>214</y>
|
|
</hint>
|
|
<hint type="destinationlabel">
|
|
<x>401</x>
|
|
<y>214</y>
|
|
</hint>
|
|
</hints>
|
|
</connection>
|
|
</connections>
|
|
</ui>
|