Commit c5ad0c54 authored by charras's avatar charras

Pcbnew:Rework on print function: fixed the fully broken print function in Modedit

See also changelog
parent cda7833e
...@@ -4,6 +4,14 @@ KiCad ChangeLog 2009 ...@@ -4,6 +4,14 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2009-oct-23 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++pcbnew
Rework on print function: fixed the fully broken print function in Modedit
and better code.
Removed the display vias option tool in Modedit and Gerbview left toolbar,
because this option has no sense here.
2009-oct-21 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr> 2009-oct-21 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================ ================================================================================
++pcbnew ++pcbnew
......
...@@ -37,12 +37,9 @@ set(GERBVIEW_SRCS ...@@ -37,12 +37,9 @@ set(GERBVIEW_SRCS
trpiste.cpp ) trpiste.cpp )
set(GERBVIEW_EXTRA_SRCS set(GERBVIEW_EXTRA_SRCS
# ../pcbnew/class_board_item.cpp
# ../pcbnew/class_drawsegment.cpp
# ../pcbnew/undelete.cpp
../share/setpage.cpp ../share/setpage.cpp
../pcbnew/dialog_print_using_printer.cpp ../pcbnew/dialog_print_using_printer.cpp
../pcbnew/printout_controler.cpp
) )
if(WIN32) if(WIN32)
......
...@@ -277,9 +277,6 @@ void WinEDA_GerberFrame::SetToolbars() ...@@ -277,9 +277,6 @@ void WinEDA_GerberFrame::SetToolbars()
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH, m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
!m_DisplayPadFill ); !m_DisplayPadFill );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
!m_DisplayViaFill );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
!m_DisplayPcbTrackFill ); !m_DisplayPcbTrackFill );
......
...@@ -362,10 +362,6 @@ create or update the left vertical toolbar (option toolbar ...@@ -362,10 +362,6 @@ create or update the left vertical toolbar (option toolbar
wxBitmap( pad_sketch_xpm ), wxBitmap( pad_sketch_xpm ),
_( "Show Spots in Sketch Mode" ), wxITEM_CHECK ); _( "Show Spots in Sketch Mode" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_VIAS_SKETCH, wxEmptyString,
wxBitmap( via_sketch_xpm ),
_( "Show Vias in Sketch Mode" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, wxEmptyString, m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, wxEmptyString,
wxBitmap( showtrack_xpm ), wxBitmap( showtrack_xpm ),
_( "Show Lines in Sketch Mode" ), wxITEM_CHECK ); _( "Show Lines in Sketch Mode" ), wxITEM_CHECK );
......
...@@ -747,6 +747,11 @@ public: ...@@ -747,6 +747,11 @@ public:
void GeneralControle( wxDC* DC, wxPoint Mouse ); void GeneralControle( wxDC* DC, wxPoint Mouse );
void LoadModuleFromBoard( wxCommandEvent& event ); void LoadModuleFromBoard( wxCommandEvent& event );
/** function ToPrinter
* Install the print dialog
*/
void ToPrinter( wxCommandEvent& event );
// BOARD handling // BOARD handling
/** function Clear_Pcb() /** function Clear_Pcb()
* delete all and reinitialize the current board * delete all and reinitialize the current board
......
No preview for this file type
...@@ -2,8 +2,8 @@ msgid "" ...@@ -2,8 +2,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: kicad\n" "Project-Id-Version: kicad\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-21 13:43+0100\n" "POT-Creation-Date: 2009-10-22 12:21+0100\n"
"PO-Revision-Date: 2009-10-21 13:45+0100\n" "PO-Revision-Date: 2009-10-22 12:22+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n" "Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
...@@ -23,7 +23,6 @@ msgstr "" ...@@ -23,7 +23,6 @@ msgstr ""
"X-Poedit-SearchPath-7: share\n" "X-Poedit-SearchPath-7: share\n"
#: pcbnew/pcbnew.cpp:80 #: pcbnew/pcbnew.cpp:80
#, fuzzy
msgid "Pcbnew is already running, Continue?" msgid "Pcbnew is already running, Continue?"
msgstr "Pcbnew est en cours d'exécution. Continuer ?" msgstr "Pcbnew est en cours d'exécution. Continuer ?"
...@@ -480,7 +479,7 @@ msgstr "Fenêtre 3D déjà ouverte" ...@@ -480,7 +479,7 @@ msgstr "Fenêtre 3D déjà ouverte"
msgid "3D Viewer" msgid "3D Viewer"
msgstr "Visu 3D" msgstr "Visu 3D"
#: pcbnew/solve.cpp:240 #: pcbnew/solve.cpp:243
msgid "Abort routing?" msgid "Abort routing?"
msgstr "Arrêter le routage?" msgstr "Arrêter le routage?"
...@@ -1346,7 +1345,7 @@ msgstr "Afficher pastilles en contour" ...@@ -1346,7 +1345,7 @@ msgstr "Afficher pastilles en contour"
#: pcbnew/tool_pcb.cpp:372 #: pcbnew/tool_pcb.cpp:372
msgid "Show Vias Sketch" msgid "Show Vias Sketch"
msgstr "Afficher Pastilles en Contour" msgstr "Afficher Vias en Contour"
#: pcbnew/tool_pcb.cpp:376 #: pcbnew/tool_pcb.cpp:376
msgid "Show Tracks Sketch" msgid "Show Tracks Sketch"
...@@ -2273,34 +2272,34 @@ msgstr "Créer Fichier " ...@@ -2273,34 +2272,34 @@ msgstr "Créer Fichier "
msgid " error" msgid " error"
msgstr " erreur" msgstr " erreur"
#: pcbnew/pcbcfg.cpp:88 #: pcbnew/pcbcfg.cpp:79
msgid "Read Project File" msgid "Read Project File"
msgstr "Lire Fichier Projet" msgstr "Lire Fichier Projet"
#: pcbnew/pcbcfg.cpp:98 #: pcbnew/pcbcfg.cpp:89
#, c-format #, c-format
msgid "File %s not found" msgid "File %s not found"
msgstr "Fichier %s non trouvé" msgstr "Fichier %s non trouvé"
#: pcbnew/pcbcfg.cpp:233 #: pcbnew/pcbcfg.cpp:219
msgid "Save Project File" msgid "Save Project File"
msgstr "Sauver Fichier Projet" msgstr "Sauver Fichier Projet"
#: pcbnew/dialog_track_options.cpp:77 #: pcbnew/dialog_track_options.cpp:76
msgid "Enter new via diameter value:" msgid "Enter new via diameter value:"
msgstr "Entrer une nouvelle valeur du diamètre de via" msgstr "Entrer une nouvelle valeur du diamètre de via"
#: pcbnew/dialog_track_options.cpp:92 #: pcbnew/dialog_track_options.cpp:91
#: pcbnew/dialog_track_options.cpp:147 #: pcbnew/dialog_track_options.cpp:146
msgid "Incorrect entered value. Aborted" msgid "Incorrect entered value. Aborted"
msgstr "Valeur entrée incorrecte. Annulation" msgstr "Valeur entrée incorrecte. Annulation"
#: pcbnew/dialog_track_options.cpp:102 #: pcbnew/dialog_track_options.cpp:101
#: pcbnew/dialog_track_options.cpp:157 #: pcbnew/dialog_track_options.cpp:156
msgid "Too many values in list (max count reached). Aborted" msgid "Too many values in list (max count reached). Aborted"
msgstr "trop de valeurs en liste (compte maxi. atteint). Abandon" msgstr "trop de valeurs en liste (compte maxi. atteint). Abandon"
#: pcbnew/dialog_track_options.cpp:132 #: pcbnew/dialog_track_options.cpp:131
msgid "Enter new track size value:" msgid "Enter new track size value:"
msgstr "Entrer la nouvelle valeur le la largeur de piste:" msgstr "Entrer la nouvelle valeur le la largeur de piste:"
...@@ -2313,32 +2312,20 @@ msgid "Vias Custom Sizes List:" ...@@ -2313,32 +2312,20 @@ msgid "Vias Custom Sizes List:"
msgstr "Liste des Tailles de Vias Supplémentaires" msgstr "Liste des Tailles de Vias Supplémentaires"
#: pcbnew/dialog_track_options_base.cpp:43 #: pcbnew/dialog_track_options_base.cpp:43
#: pcbnew/dialog_track_options_base.cpp:85 #: pcbnew/dialog_track_options_base.cpp:76
msgid "Add" msgid "Add"
msgstr "Ajouter" msgstr "Ajouter"
#: pcbnew/dialog_track_options_base.cpp:46 #: pcbnew/dialog_track_options_base.cpp:46
#: pcbnew/dialog_track_options_base.cpp:88 #: pcbnew/dialog_track_options_base.cpp:79
msgid "Delete" msgid "Delete"
msgstr "Supprimer" msgstr "Supprimer"
#: pcbnew/dialog_track_options_base.cpp:53 #: pcbnew/dialog_track_options_base.cpp:53
msgid "Default Via Drill"
msgstr "Perçage vias par défaut"
#: pcbnew/dialog_track_options_base.cpp:58
msgid ""
"Enter the default via drill diameter\n"
"All vias drills not set to a specific drill value will have this drill value."
msgstr ""
"Entrer le preçage des vias par défault\n"
"Tous les perçages de vias non ajusté à une valeur spécifique auront cette valeur de perçage."
#: pcbnew/dialog_track_options_base.cpp:62
msgid "Specific Via Drill" msgid "Specific Via Drill"
msgstr "Perçage Spécifique" msgstr "Perçage Spécifique"
#: pcbnew/dialog_track_options_base.cpp:67 #: pcbnew/dialog_track_options_base.cpp:58
msgid "" msgid ""
"Use a specific drill value for all vias that must have a given drill value,\n" "Use a specific drill value for all vias that must have a given drill value,\n"
"and set the via hole to this specific drill value using the pop up menu." "and set the via hole to this specific drill value using the pop up menu."
...@@ -2346,19 +2333,19 @@ msgstr "" ...@@ -2346,19 +2333,19 @@ msgstr ""
"Utiliser une valeur de perçage spécifique pour toutes les vias qui doivent avoir un perçage donné,\n" "Utiliser une valeur de perçage spécifique pour toutes les vias qui doivent avoir un perçage donné,\n"
"et mettre le trou de la via à cette valeur spécifique en utilisant le menu popup." "et mettre le trou de la via à cette valeur spécifique en utilisant le menu popup."
#: pcbnew/dialog_track_options_base.cpp:74 #: pcbnew/dialog_track_options_base.cpp:65
msgid "Dimensions:" msgid "Dimensions:"
msgstr "Dimensions:" msgstr "Dimensions:"
#: pcbnew/dialog_track_options_base.cpp:77 #: pcbnew/dialog_track_options_base.cpp:68
msgid "Tracks Custom Widths List:" msgid "Tracks Custom Widths List:"
msgstr "Liste des Largeurs de Pistes Supplémentaires" msgstr "Liste des Largeurs de Pistes Supplémentaires"
#: pcbnew/dialog_track_options_base.cpp:98 #: pcbnew/dialog_track_options_base.cpp:89
msgid "Pads Mask Clearance:" msgid "Pads Mask Clearance:"
msgstr "Marge Masque des Pads" msgstr "Marge Masque des Pads"
#: pcbnew/dialog_track_options_base.cpp:103 #: pcbnew/dialog_track_options_base.cpp:94
msgid "This is the clearance between pads and the mask" msgid "This is the clearance between pads and the mask"
msgstr "Ceci est l'espace entre pads et le masque" msgstr "Ceci est l'espace entre pads et le masque"
...@@ -2418,39 +2405,44 @@ msgstr "Sauver Fichier PCB format GenCAD" ...@@ -2418,39 +2405,44 @@ msgstr "Sauver Fichier PCB format GenCAD"
msgid "Drill files (*.drl)|*.drl" msgid "Drill files (*.drl)|*.drl"
msgstr "Fichiers de Perçage (*.drl)|*.drl" msgstr "Fichiers de Perçage (*.drl)|*.drl"
#: pcbnew/gendrill.cpp:318 #: pcbnew/gendrill.cpp:93
#: pcbnew/gendrill.cpp:95
msgid "Use Netclasses values"
msgstr "Utiliser les valeurs des Netclass"
#: pcbnew/gendrill.cpp:310
msgid "Save Drill File" msgid "Save Drill File"
msgstr "Sauver Fichier de Perçage" msgstr "Sauver Fichier de Perçage"
#: pcbnew/gendrill.cpp:403 #: pcbnew/gendrill.cpp:396
msgid "3:2" msgid "3:2"
msgstr "3:2" msgstr "3:2"
#: pcbnew/gendrill.cpp:404 #: pcbnew/gendrill.cpp:397
msgid "3:3" msgid "3:3"
msgstr "3:3" msgstr "3:3"
#: pcbnew/gendrill.cpp:755 #: pcbnew/gendrill.cpp:750
msgid "PostScript files (.ps)|*.ps" msgid "PostScript files (.ps)|*.ps"
msgstr "Fichiers PostScript (.ps)|*.ps" msgstr "Fichiers PostScript (.ps)|*.ps"
#: pcbnew/gendrill.cpp:760 #: pcbnew/gendrill.cpp:755
msgid "Gerber files (.pho)|*.pho" msgid "Gerber files (.pho)|*.pho"
msgstr "Fichiers Gerber (*.pho)|*.pho" msgstr "Fichiers Gerber (*.pho)|*.pho"
#: pcbnew/gendrill.cpp:778 #: pcbnew/gendrill.cpp:773
msgid "Save Drill Plot File" msgid "Save Drill Plot File"
msgstr "Sauver Plan de Perçage" msgstr "Sauver Plan de Perçage"
#: pcbnew/gendrill.cpp:789 #: pcbnew/gendrill.cpp:784
msgid "Unable to create file" msgid "Unable to create file"
msgstr "Impossible de créer le fichier" msgstr "Impossible de créer le fichier"
#: pcbnew/gendrill.cpp:816 #: pcbnew/gendrill.cpp:811
msgid "Drill report files (.rpt)|*.rpt" msgid "Drill report files (.rpt)|*.rpt"
msgstr "Fichiers rapport de perçage (.rpt)*.rpt" msgstr "Fichiers rapport de perçage (.rpt)*.rpt"
#: pcbnew/gendrill.cpp:822 #: pcbnew/gendrill.cpp:817
msgid "Save Drill Report File" msgid "Save Drill Report File"
msgstr "Sauver Fichier Rapport de Perçage" msgstr "Sauver Fichier Rapport de Perçage"
...@@ -2515,9 +2507,8 @@ msgid "Board contour" ...@@ -2515,9 +2507,8 @@ msgid "Board contour"
msgstr "Contour pcb" msgstr "Contour pcb"
#: pcbnew/dialog_layers_setup.cpp:108 #: pcbnew/dialog_layers_setup.cpp:108
#, fuzzy
msgid "Auxiliary" msgid "Auxiliary"
msgstr "Axe Auxiliaire" msgstr "Auxiliaire"
#: pcbnew/dialog_layers_setup.cpp:116 #: pcbnew/dialog_layers_setup.cpp:116
msgid "All Layers On" msgid "All Layers On"
...@@ -2547,22 +2538,26 @@ msgstr "4 couches, Composants sur le Dessus" ...@@ -2547,22 +2538,26 @@ msgstr "4 couches, Composants sur le Dessus"
msgid "Four Layers, Parts on Both Faces" msgid "Four Layers, Parts on Both Faces"
msgstr "4 couches, Composants sur les 2 faces" msgstr "4 couches, Composants sur les 2 faces"
#: pcbnew/dialog_drc.cpp:136 #: pcbnew/dialog_drc.cpp:52
#: pcbnew/dialog_drc.cpp:210 msgid "Netclasses values"
msgstr "Valeurs NetClass"
#: pcbnew/dialog_drc.cpp:134
#: pcbnew/dialog_drc.cpp:208
#, c-format #, c-format
msgid "Report file \"%s\" created" msgid "Report file \"%s\" created"
msgstr "Fichier rapport \"%s\" créé" msgstr "Fichier rapport \"%s\" créé"
#: pcbnew/dialog_drc.cpp:138 #: pcbnew/dialog_drc.cpp:136
#: pcbnew/dialog_drc.cpp:211 #: pcbnew/dialog_drc.cpp:209
msgid "Disk File Report Completed" msgid "Disk File Report Completed"
msgstr "Fichier rapport terminé" msgstr "Fichier rapport terminé"
#: pcbnew/dialog_drc.cpp:231 #: pcbnew/dialog_drc.cpp:229
msgid "DRC report files (.rpt)|*.rpt" msgid "DRC report files (.rpt)|*.rpt"
msgstr "Fichier rapport DRC (.rpt)|*.rpt" msgstr "Fichier rapport DRC (.rpt)|*.rpt"
#: pcbnew/dialog_drc.cpp:237 #: pcbnew/dialog_drc.cpp:235
msgid "Save DRC Report File" msgid "Save DRC Report File"
msgstr "Sauver Fichier Rapport DRC:" msgstr "Sauver Fichier Rapport DRC:"
...@@ -2588,7 +2583,7 @@ msgstr "Afficher grille" ...@@ -2588,7 +2583,7 @@ msgstr "Afficher grille"
#: pcbnew/moduleframe.cpp:340 #: pcbnew/moduleframe.cpp:340
msgid "Show Vias Sketch mode" msgid "Show Vias Sketch mode"
msgstr "Afficher pastilles en mode contour" msgstr "Afficher vias en mode contour"
#: pcbnew/moduleframe.cpp:341 #: pcbnew/moduleframe.cpp:341
msgid "Show vias filled mode" msgid "Show vias filled mode"
...@@ -3720,7 +3715,7 @@ msgstr "" ...@@ -3720,7 +3715,7 @@ msgstr ""
"Ne peut être utilisé que pour imprimer la feuille courante" "Ne peut être utilisé que pour imprimer la feuille courante"
#: pcbnew/dialog_SVG_print_base.cpp:97 #: pcbnew/dialog_SVG_print_base.cpp:97
#: pcbnew/dialog_drc_base.cpp:102 #: pcbnew/dialog_drc_base.cpp:100
msgid "Messages:" msgid "Messages:"
msgstr "Messages:" msgstr "Messages:"
...@@ -3732,90 +3727,89 @@ msgstr "Options" ...@@ -3732,90 +3727,89 @@ msgstr "Options"
msgid "Clearance" msgid "Clearance"
msgstr "Isolation" msgstr "Isolation"
#: pcbnew/dialog_drc_base.cpp:40
#: pcbnew/dialog_drc_base.cpp:49
#: pcbnew/dialog_drc_base.cpp:61
#: pcbnew/dialog_drc_base.cpp:70
msgid "In the clearance units, enter the clearance distance"
msgstr "Entrée l'isolation"
#: pcbnew/dialog_drc_base.cpp:44 #: pcbnew/dialog_drc_base.cpp:44
msgid "Via Min Size" msgid "Via Min Size"
msgstr "Via Taille Min" msgstr "Via Taille Min"
#: pcbnew/dialog_drc_base.cpp:54 #: pcbnew/dialog_drc_base.cpp:49
#: pcbnew/dialog_drc_base.cpp:58
#: pcbnew/dialog_drc_base.cpp:67
msgid "In the clearance units, enter the clearance distance"
msgstr "Entrée l'isolation"
#: pcbnew/dialog_drc_base.cpp:53
msgid "Track Min Width" msgid "Track Min Width"
msgstr "Epais.Mini Piste" msgstr "Epais.Mini Piste"
#: pcbnew/dialog_drc_base.cpp:65 #: pcbnew/dialog_drc_base.cpp:62
msgid "MicroVia Min Size" msgid "MicroVia Min Size"
msgstr "Diam. Mini MicroVia" msgstr "Diam. Mini MicroVia"
#: pcbnew/dialog_drc_base.cpp:77 #: pcbnew/dialog_drc_base.cpp:74
msgid "Create Report File" msgid "Create Report File"
msgstr "Créer fichier rapport " msgstr "Créer fichier rapport "
#: pcbnew/dialog_drc_base.cpp:80 #: pcbnew/dialog_drc_base.cpp:78
msgid "Enable writing report to this file" msgid "Enable writing report to this file"
msgstr "Autoriser l'écriture du rapport dans ce fichier" msgstr "Autoriser l'écriture du rapport dans ce fichier"
#: pcbnew/dialog_drc_base.cpp:85 #: pcbnew/dialog_drc_base.cpp:83
msgid "Enter the report filename" msgid "Enter the report filename"
msgstr "Entrer le nom du fichier rapport " msgstr "Entrer le nom du fichier rapport "
#: pcbnew/dialog_drc_base.cpp:90 #: pcbnew/dialog_drc_base.cpp:88
msgid "..." msgid "..."
msgstr "..." msgstr "..."
#: pcbnew/dialog_drc_base.cpp:116 #: pcbnew/dialog_drc_base.cpp:114
msgid "Start DRC" msgid "Start DRC"
msgstr "Démarrer DRC" msgstr "Démarrer DRC"
#: pcbnew/dialog_drc_base.cpp:118 #: pcbnew/dialog_drc_base.cpp:116
msgid "Start the Design Rule Checker" msgid "Start the Design Rule Checker"
msgstr "Démarrer le Contrôle des Règles de Conception (DRC)" msgstr "Démarrer le Contrôle des Règles de Conception (DRC)"
#: pcbnew/dialog_drc_base.cpp:122 #: pcbnew/dialog_drc_base.cpp:120
msgid "List Unconnected" msgid "List Unconnected"
msgstr "Liste Non Conn." msgstr "Liste Non Conn."
#: pcbnew/dialog_drc_base.cpp:123 #: pcbnew/dialog_drc_base.cpp:121
msgid "List unconnected pads or tracks" msgid "List unconnected pads or tracks"
msgstr "Lister pads ou pistes non connectées" msgstr "Lister pads ou pistes non connectées"
#: pcbnew/dialog_drc_base.cpp:127 #: pcbnew/dialog_drc_base.cpp:125
msgid "Delete All Markers" msgid "Delete All Markers"
msgstr "Effacer tous les Marqueurs" msgstr "Effacer tous les Marqueurs"
#: pcbnew/dialog_drc_base.cpp:128 #: pcbnew/dialog_drc_base.cpp:126
msgid "Delete every marker" msgid "Delete every marker"
msgstr "Effacer Chaque Marqueur" msgstr "Effacer Chaque Marqueur"
#: pcbnew/dialog_drc_base.cpp:132 #: pcbnew/dialog_drc_base.cpp:130
msgid "Delete Current Marker" msgid "Delete Current Marker"
msgstr "Effacer Marqueur Courant" msgstr "Effacer Marqueur Courant"
#: pcbnew/dialog_drc_base.cpp:133 #: pcbnew/dialog_drc_base.cpp:131
msgid "Delete the marker selected in the listBox below" msgid "Delete the marker selected in the listBox below"
msgstr "Supprimer le marqueur sélectionné dans la liste ci dessous" msgstr "Supprimer le marqueur sélectionné dans la liste ci dessous"
#: pcbnew/dialog_drc_base.cpp:141 #: pcbnew/dialog_drc_base.cpp:139
msgid "Error Messages:" msgid "Error Messages:"
msgstr "Messages d'Erreur:" msgstr "Messages d'Erreur:"
#: pcbnew/dialog_drc_base.cpp:151 #: pcbnew/dialog_drc_base.cpp:149
msgid "MARKERs, double click any to go there in PCB, right click for popup menu" msgid "MARKERs, double click any to go there in PCB, right click for popup menu"
msgstr "MARQUEURS, double clic pour aller sur le PCB, clic droit pour ouvrir menu" msgstr "MARQUEURS, double clic pour aller sur le PCB, clic droit pour ouvrir menu"
#: pcbnew/dialog_drc_base.cpp:159 #: pcbnew/dialog_drc_base.cpp:157
msgid "Problems / Markers" msgid "Problems / Markers"
msgstr "Problèmes / Marqueurs" msgstr "Problèmes / Marqueurs"
#: pcbnew/dialog_drc_base.cpp:165 #: pcbnew/dialog_drc_base.cpp:163
msgid "A list of unconnected pads, right click for popup menu" msgid "A list of unconnected pads, right click for popup menu"
msgstr "Pour une liste de pads non connecté, clic droit pour ouvrir un menu" msgstr "Pour une liste de pads non connecté, clic droit pour ouvrir un menu"
#: pcbnew/dialog_drc_base.cpp:172 #: pcbnew/dialog_drc_base.cpp:170
msgid "Unconnected" msgid "Unconnected"
msgstr "Non connecté" msgstr "Non connecté"
...@@ -3904,31 +3898,31 @@ msgstr "Le fichier Session a une 'reference' à un composant non existant \"%s\" ...@@ -3904,31 +3898,31 @@ msgstr "Le fichier Session a une 'reference' à un composant non existant \"%s\"
msgid "A wire_via references a missing padstack \"%s\"" msgid "A wire_via references a missing padstack \"%s\""
msgstr "Une piste ou via a une référence vers un pad \"%s\" manquant" msgstr "Une piste ou via a une référence vers un pad \"%s\" manquant"
#: pcbnew/class_module.cpp:821 #: pcbnew/class_module.cpp:822
msgid "Last Change" msgid "Last Change"
msgstr "Last Change" msgstr "Last Change"
#: pcbnew/class_module.cpp:826 #: pcbnew/class_module.cpp:827
msgid "Netlist path" msgid "Netlist path"
msgstr "Chemin Netliste " msgstr "Chemin Netliste "
#: pcbnew/class_module.cpp:847 #: pcbnew/class_module.cpp:848
msgid "Stat" msgid "Stat"
msgstr "Stat" msgstr "Stat"
#: pcbnew/class_module.cpp:857 #: pcbnew/class_module.cpp:858
msgid "No 3D shape" msgid "No 3D shape"
msgstr "Pas de forme 3D" msgstr "Pas de forme 3D"
#: pcbnew/class_module.cpp:858 #: pcbnew/class_module.cpp:859
msgid "3D-Shape" msgid "3D-Shape"
msgstr "Forme 3D" msgstr "Forme 3D"
#: pcbnew/class_module.cpp:860 #: pcbnew/class_module.cpp:861
msgid "Doc: " msgid "Doc: "
msgstr "Doc: " msgstr "Doc: "
#: pcbnew/class_module.cpp:861 #: pcbnew/class_module.cpp:862
msgid "KeyW: " msgid "KeyW: "
msgstr "KeyW: " msgstr "KeyW: "
...@@ -4254,39 +4248,39 @@ msgstr "Recalculer le chevelu complet ( utile après une édition manuelle de no ...@@ -4254,39 +4248,39 @@ msgstr "Recalculer le chevelu complet ( utile après une édition manuelle de no
msgid "Netlist File:" msgid "Netlist File:"
msgstr "Fichier Netliste:" msgstr "Fichier Netliste:"
#: pcbnew/drc.cpp:202 #: pcbnew/drc.cpp:200
msgid "Compile ratsnest...\n" msgid "Compile ratsnest...\n"
msgstr "Calcul du chevelu...\n" msgstr "Calcul du chevelu...\n"
#: pcbnew/drc.cpp:218 #: pcbnew/drc.cpp:216
msgid "Aborting\n" msgid "Aborting\n"
msgstr "Arrêt\n" msgstr "Arrêt\n"
#: pcbnew/drc.cpp:231 #: pcbnew/drc.cpp:229
msgid "Pad clearances...\n" msgid "Pad clearances...\n"
msgstr "Isolations pads...\n" msgstr "Isolations pads...\n"
#: pcbnew/drc.cpp:241 #: pcbnew/drc.cpp:239
msgid "Track clearances...\n" msgid "Track clearances...\n"
msgstr "Isolations pistes...\n" msgstr "Isolations pistes...\n"
#: pcbnew/drc.cpp:251 #: pcbnew/drc.cpp:249
msgid "Fill zones...\n" msgid "Fill zones...\n"
msgstr "Remplissage zones...\n" msgstr "Remplissage zones...\n"
#: pcbnew/drc.cpp:259 #: pcbnew/drc.cpp:257
msgid "Test zones...\n" msgid "Test zones...\n"
msgstr "Test zones...\n" msgstr "Test zones...\n"
#: pcbnew/drc.cpp:270 #: pcbnew/drc.cpp:268
msgid "Unconnected pads...\n" msgid "Unconnected pads...\n"
msgstr "Pads non connectés...\n" msgstr "Pads non connectés...\n"
#: pcbnew/drc.cpp:284 #: pcbnew/drc.cpp:282
msgid "Finished" msgid "Finished"
msgstr "Fini" msgstr "Fini"
#: pcbnew/drc.cpp:325 #: pcbnew/drc.cpp:324
#, c-format #, c-format
msgid "NETCLASS: '%s' has Clearance:%s which is less than global:%s" msgid "NETCLASS: '%s' has Clearance:%s which is less than global:%s"
msgstr "NETCLASS: '%s' a une isolation:%s qui est moins que la valeur globale:%s" msgstr "NETCLASS: '%s' a une isolation:%s qui est moins que la valeur globale:%s"
...@@ -5383,19 +5377,23 @@ msgstr "" ...@@ -5383,19 +5377,23 @@ msgstr ""
msgid "Via Min Diameter" msgid "Via Min Diameter"
msgstr "Via Taille Min" msgstr "Via Taille Min"
#: pcbnew/dialog_design_rules_base.cpp:191 #: pcbnew/dialog_design_rules_base.cpp:186
msgid "Via Min Drill"
msgstr "Via Perçage Min"
#: pcbnew/dialog_design_rules_base.cpp:198
msgid "Micro Vias Options:" msgid "Micro Vias Options:"
msgstr "Options Micro Vias:" msgstr "Options Micro Vias:"
#: pcbnew/dialog_design_rules_base.cpp:193 #: pcbnew/dialog_design_rules_base.cpp:200
msgid "Do not allow micro vias" msgid "Do not allow micro vias"
msgstr "Ne pas autoriser les micro vias" msgstr "Ne pas autoriser les micro vias"
#: pcbnew/dialog_design_rules_base.cpp:193 #: pcbnew/dialog_design_rules_base.cpp:200
msgid "Allow micro vias" msgid "Allow micro vias"
msgstr "Autoriser les micro vias" msgstr "Autoriser les micro vias"
#: pcbnew/dialog_design_rules_base.cpp:197 #: pcbnew/dialog_design_rules_base.cpp:204
msgid "" msgid ""
"Allows or do not allow use of micro vias\n" "Allows or do not allow use of micro vias\n"
"They are very small vias only from an external copper layer to its near neightbour" "They are very small vias only from an external copper layer to its near neightbour"
...@@ -5403,15 +5401,19 @@ msgstr "" ...@@ -5403,15 +5401,19 @@ msgstr ""
"Autorise ou non l'utilisation de micro vias\n" "Autorise ou non l'utilisation de micro vias\n"
"Ce sont de petites vias allant d'une couche externe à la plus proche couche interne uniquement" "Ce sont de petites vias allant d'une couche externe à la plus proche couche interne uniquement"
#: pcbnew/dialog_design_rules_base.cpp:207 #: pcbnew/dialog_design_rules_base.cpp:214
msgid "MicroVia Min Diameter" msgid "MicroVia Min Diameter"
msgstr "Diam. Mini MicroVia" msgstr "Diam. Mini MicroVia"
#: pcbnew/dialog_design_rules_base.cpp:219 #: pcbnew/dialog_design_rules_base.cpp:221
msgid "MicroVia Min Drill"
msgstr "Micro Via Perçage Min"
#: pcbnew/dialog_design_rules_base.cpp:233
msgid "Minimal Values Allowed:" msgid "Minimal Values Allowed:"
msgstr "Valeurs Minimales Autorisées:" msgstr "Valeurs Minimales Autorisées:"
#: pcbnew/dialog_design_rules_base.cpp:248 #: pcbnew/dialog_design_rules_base.cpp:262
msgid "Global Design Rules" msgid "Global Design Rules"
msgstr "Règles Générales" msgstr "Règles Générales"
...@@ -5420,7 +5422,7 @@ msgid "No Net" ...@@ -5420,7 +5422,7 @@ msgid "No Net"
msgstr "No Net" msgstr "No Net"
#: pcbnew/dialog_copper_layers_setup.cpp:135 #: pcbnew/dialog_copper_layers_setup.cpp:135
#: pcbnew/dialog_design_rules.cpp:470 #: pcbnew/dialog_design_rules.cpp:478
msgid "Errors detected, Abort" msgid "Errors detected, Abort"
msgstr "Erreurs detectées, Abandont" msgstr "Erreurs detectées, Abandont"
...@@ -5604,43 +5606,53 @@ msgstr "Valeur minimum pour le diamètre de via: <b>%s</b><br>\n" ...@@ -5604,43 +5606,53 @@ msgstr "Valeur minimum pour le diamètre de via: <b>%s</b><br>\n"
msgid "Minimum value for microvias diameter: <b>%s</b><br>\n" msgid "Minimum value for microvias diameter: <b>%s</b><br>\n"
msgstr "Valeur minimum pour le diamètre de microvia: <b>%s</b><br>\n" msgstr "Valeur minimum pour le diamètre de microvia: <b>%s</b><br>\n"
#: pcbnew/dialog_design_rules.cpp:489 #: pcbnew/dialog_design_rules.cpp:497
msgid "New Net Class Name:" msgid "New Net Class Name:"
msgstr "Nouveau Nom de Classe d'Equipotentielle:" msgstr "Nouveau Nom de Classe d'Equipotentielle:"
#: pcbnew/dialog_design_rules.cpp:502 #: pcbnew/dialog_design_rules.cpp:510
msgid "This NetClass is already existing, cannot add it; Aborted" msgid "This NetClass is already existing, cannot add it; Aborted"
msgstr "Cette NetClass existe déjà, et ne peut être ajoutée; Abandon" msgstr "Cette NetClass existe déjà, et ne peut être ajoutée; Abandon"
#: pcbnew/dialog_design_rules.cpp:559 #: pcbnew/dialog_design_rules.cpp:567
msgid "The defaut Netclass cannot be removed" msgid "The defaut Netclass cannot be removed"
msgstr "" msgstr "La Netclass Défault ne peut être supprimée"
#: pcbnew/dialog_design_rules.cpp:745 #: pcbnew/dialog_design_rules.cpp:758
#, c-format #, c-format
msgid "%s: <b>Track Size</b> &lt; <b>Min Track Size</b><br>" msgid "%s: <b>Track Size</b> &lt; <b>Min Track Size</b><br>"
msgstr "%s: <b>Largeur Piste</b> &ge; <b>Largeur Piste Minimum</b><br>" msgstr "%s: <b>Largeur Piste</b> &ge; <b>Largeur Piste Minimum</b><br>"
#: pcbnew/dialog_design_rules.cpp:759 #: pcbnew/dialog_design_rules.cpp:772
#, c-format #, c-format
msgid "%s: <b>Via Diameter</b> &lt; <b>Minimun Via Diameter</b><br>" msgid "%s: <b>Via Diameter</b> &lt; <b>Minimun Via Diameter</b><br>"
msgstr "%s: <b>Diamètre Via</b> &ge; <b>Min. Diamètre Via</b><br>" msgstr "%s: <b>Diamètre Via</b> &ge; <b>Min. Diamètre Via</b><br>"
#: pcbnew/dialog_design_rules.cpp:771 #: pcbnew/dialog_design_rules.cpp:784
#, c-format #, c-format
msgid "%s: <b>Via Drill</b> &ge; <b>Via Dia</b><br>" msgid "%s: <b>Via Drill</b> &ge; <b>Via Dia</b><br>"
msgstr "%s: <b>Perçage Via</b> &ge; <b>Diam Via</b><br>" msgstr "%s: <b>Perçage Via</b> &ge; <b>Diam Via</b><br>"
#: pcbnew/dialog_design_rules.cpp:785 #: pcbnew/dialog_design_rules.cpp:793
#, c-format #, c-format
msgid "%s: <b>MicroVia Diameter</b> &lt; <b>Minimun MicroVia Diameter</b><br>" msgid "%s: <b>Via Drill</b> &lt; <b>Min Via Drill</b><br>"
msgstr "%s: <b>Diamètre MicroVia</b> &ge; <b>Diamètre MicroVia Minimum</b><br>" msgstr "%s: <b>Perçage Via</b> &lt; <b>Via Perçage Min</b><br>"
#: pcbnew/dialog_design_rules.cpp:797 #: pcbnew/dialog_design_rules.cpp:807
#, c-format
msgid "%s: <b>MicroVia Diameter</b> &lt; <b>MicroVia Min Diameter</b><br>"
msgstr "%s: <b>Diamètre MicroVia</b> &lt; <b>Diamètre MicroVia Minimum</b><br>"
#: pcbnew/dialog_design_rules.cpp:819
#, c-format #, c-format
msgid "%s: <b>MicroVia Drill</b> &ge; <b>MicroVia Dia</b><br>" msgid "%s: <b>MicroVia Drill</b> &ge; <b>MicroVia Dia</b><br>"
msgstr "%s: <b>Perçage MicroVia</b> &ge; <b>Diam MicroVia</b><br>" msgstr "%s: <b>Perçage MicroVia</b> &ge; <b>Diam MicroVia</b><br>"
#: pcbnew/dialog_design_rules.cpp:828
#, c-format
msgid "%s: <b>MicroVia Drill</b> &lt; <b>MicroVia Min Drill</b><br>"
msgstr "%s: <b>Perçage MicroVia</b> &lt; <b>MicroVia Perçage Min</b><br>"
#: pcbnew/dialog_display_options_base.cpp:20 #: pcbnew/dialog_display_options_base.cpp:20
msgid "Tracks and vias:" msgid "Tracks and vias:"
msgstr "Pistes et vias:" msgstr "Pistes et vias:"
...@@ -6171,6 +6183,11 @@ msgstr "Contrôle la capture du curseur pcb quand le curseur souris passe sur un ...@@ -6171,6 +6183,11 @@ msgstr "Contrôle la capture du curseur pcb quand le curseur souris passe sur un
msgid "Remove the currently select Net Class" msgid "Remove the currently select Net Class"
msgstr "Supprimer la NetClass actuellement sélectionnée" msgstr "Supprimer la NetClass actuellement sélectionnée"
#: pcbnew/copies_de_sauvegarde/dialog_design_rules.cpp:734
#, c-format
msgid "%s: <b>MicroVia Diameter</b> &lt; <b>Minimun MicroVia Diameter</b><br>"
msgstr "%s: <b>Diamètre MicroVia</b> &ge; <b>Diamètre MicroVia Minimum</b><br>"
#: eeschema/libarch.cpp:55 #: eeschema/libarch.cpp:55
#, c-format #, c-format
msgid "An error occurrred attempting to save component library <%s>." msgid "An error occurrred attempting to save component library <%s>."
...@@ -6283,176 +6300,54 @@ msgstr "Options d'affichage du Champ" ...@@ -6283,176 +6300,54 @@ msgstr "Options d'affichage du Champ"
msgid "Failed to open Stuff File <%s>" msgid "Failed to open Stuff File <%s>"
msgstr "Ne peut pas ouvrir fichier d'échange <%s>" msgstr "Ne peut pas ouvrir fichier d'échange <%s>"
#: eeschema/libedit.cpp:30 #: eeschema/libfield.cpp:160
msgid "Component Library Editor: " msgid "Edit field"
msgstr "Editeur de Composants" msgstr "Editer Champ"
#: eeschema/libedit.cpp:35
msgid "no library selected"
msgstr "Pas de librairie sélectionnée"
#: eeschema/libedit.cpp:71 #: eeschema/libfield.cpp:177
#, c-format
msgid "" msgid ""
"Current part not saved.\n" "The field name <%s> is an existing alias of the component <%s>.\n"
"\n" "Please choose another name that does not conflict with any names in the alias list."
"Discard current changes?"
msgstr "" msgstr ""
"Composant courant non sauvé.\n" "Le nom de champ <%s> est un alias existant du composant%s>.\n"
"\n" "SVP choisir un autre nom qui n'est pas déjà existant dans la liste des alias."
"Perdre les changements en cours ?"
#: eeschema/libedit.cpp:101
#, c-format
msgid "Component or alias name \"%s\" not found in library \"%s\"."
msgstr "Composant ou alias \"%s\" non trouvé en librairie \"%s\"."
#: eeschema/libedit.cpp:171 #: eeschema/libfield.cpp:191
#, c-format #, c-format
msgid "Could not create copy of part <%s> in library <%s>." msgid ""
msgstr "Ne peut créer une copie de l'élément <%s> en librairie <%s>." "The field name <%s> conflicts with an existing entry in the component library <%s>.\n"
"Please choose another name that does not conflict with any library entries."
#: eeschema/libedit.cpp:252 msgstr ""
msgid "Include last component changes?"
msgstr "Inclure les dernières modifications du composant"
#: eeschema/libedit.cpp:264
msgid "Modify library file \""
msgstr "Modifier le fichier Librairie \""
#: eeschema/libedit.cpp:264
msgid "\"?"
msgstr "\"?"
#: eeschema/libedit.cpp:275
msgid "Error while saving library file \""
msgstr "Erreur en sauvant le fichier librairie \""
#: eeschema/libedit.cpp:276
msgid "\"."
msgstr "\"."
#: eeschema/libedit.cpp:277 #: eeschema/libfield.cpp:213
msgid "*** ERROR: ***" msgid "No new text: no change"
msgstr "***ERREUR:****" msgstr "Pas de nouveau texte: pas de changements"
#: eeschema/libedit.cpp:282 #: eeschema/viewlibs.cpp:108
msgid "Library file \"" msgid "Library Browser"
msgstr "Fichier librairie \"" msgstr "Visualisateur de Librairies"
#: eeschema/libedit.cpp:284 #: eeschema/viewlibs.cpp:115
msgid "Document file \"" msgid "no library selected"
msgstr "Fichier de doc \"" msgstr "Pas de librairie sélectionnée"
#: eeschema/libedit.cpp:307 #: eeschema/viewlibs.cpp:314
msgid "Part" msgid "Part"
msgstr "Part" msgstr "Part"
#: eeschema/libedit.cpp:319 #: eeschema/viewlibs.cpp:315
msgid "Alias" msgid "Alias"
msgstr "Alias" msgstr "Alias"
#: eeschema/libedit.cpp:324 #: eeschema/viewlibs.cpp:316
msgid "Unit"
msgstr "Unité"
#: eeschema/libedit.cpp:327
msgid "Convert"
msgstr "Convert"
#: eeschema/libedit.cpp:331
msgid "Body"
msgstr "Body"
#: eeschema/libedit.cpp:334
msgid "Power Symbol"
msgstr "Symbole d'Alimentation"
#: eeschema/libedit.cpp:336
msgid "Component"
msgstr "Composant"
#: eeschema/libedit.cpp:345
msgid "Description" msgid "Description"
msgstr "Description" msgstr "Description"
#: eeschema/libedit.cpp:352 #: eeschema/viewlibs.cpp:317
msgid "Key words" msgid "Key words"
msgstr "Mots clé" msgstr "Mots clé"
#: eeschema/libedit.cpp:386
msgid "Please select a component library."
msgstr "SVP sélectionner une librairie de composants."
#: eeschema/libedit.cpp:395
#, c-format
msgid "Component library <%s> is empty."
msgstr "Fichier librairie de composants <%s> vide"
#: eeschema/libedit.cpp:397
msgid "Delete Entry Error"
msgstr "Erreur en suppression d'élément"
#: eeschema/libedit.cpp:402
#, c-format
msgid ""
"Select 1 of %d components to delete\n"
"from library <%s>."
msgstr ""
"Selection 1 de %d composants a supprimer\n"
"de la librairie <%s>."
#: eeschema/libedit.cpp:406
msgid "Delete Component"
msgstr "Suppression Composant"
#: eeschema/libedit.cpp:415
#, c-format
msgid "Entry <%s> not found in library <%s>."
msgstr "Element <%s> non trouvé en librairie <%s>."
#: eeschema/libedit.cpp:422
#, c-format
msgid "Delete component \"%s\" from library \"%s\"?"
msgstr "Supprimer composant \"%s\" de la librairie \"%s\"?"
#: eeschema/libedit.cpp:442
msgid "The component being deleted has been modified. All changes will be lost. Discard changes?"
msgstr ""
#: eeschema/libedit.cpp:497
msgid ""
"All changes to the current component will be lost!\n"
"\n"
"Clear the current component from the screen?"
msgstr ""
#: eeschema/libedit.cpp:511
msgid "This new component has no name and cannot be created. Aborted"
msgstr "Ce noveau composant n'a pas de nom et ne peut être créé, Abandon"
#: eeschema/libedit.cpp:522
#, c-format
msgid "Component \"%s\" already exists in library \"%s\"."
msgstr "Composant \"%s\" déjà existant en librairie \"%s\"."
#: eeschema/libedit.cpp:587
msgid "No component to save."
msgstr "Pas de composant à sauver."
#: eeschema/libedit.cpp:596
msgid "No library specified."
msgstr "Pas de librairie spécifiée."
#: eeschema/libedit.cpp:606
#, c-format
msgid "Component \"%s\" exists. Change it?"
msgstr "Le composant \" %s\" existe, Le changer ?"
#: eeschema/libedit.cpp:624
#, c-format
msgid "Component %s saved in library %s"
msgstr "Composant %s sauvé en librairie %s"
#: eeschema/symbedit.cpp:49 #: eeschema/symbedit.cpp:49
msgid "Import Symbol Drawings" msgid "Import Symbol Drawings"
msgstr "Importer Symbole de Dessin" msgstr "Importer Symbole de Dessin"
...@@ -6476,39 +6371,15 @@ msgstr "Pas deomposant trouvé en librairie de symboles <%s>." ...@@ -6476,39 +6371,15 @@ msgstr "Pas deomposant trouvé en librairie de symboles <%s>."
msgid "Warning: more than 1 part in symbol file." msgid "Warning: more than 1 part in symbol file."
msgstr "Attention: plus de 1élément dans le fichier symbole." msgstr "Attention: plus de 1élément dans le fichier symbole."
#: eeschema/symbedit.cpp:148 #: eeschema/symbedit.cpp:150
msgid "Export Symbol Drawings" msgid "Export Symbol Drawings"
msgstr "Exporter Symbole de Dessin" msgstr "Exporter Symbole de Dessin"
#: eeschema/symbedit.cpp:174 #: eeschema/symbedit.cpp:176
#, c-format #, c-format
msgid "Save Symbol in [%s]" msgid "Save Symbol in [%s]"
msgstr "Symbole sauvé en [%s]" msgstr "Symbole sauvé en [%s]"
#: eeschema/libfield.cpp:160
msgid "Edit field"
msgstr "Editer Champ"
#: eeschema/libfield.cpp:175
#, c-format
msgid ""
"The field name <%s> is an existing alias of the component <%s>.\n"
"Please choose another name that does not conflict with any names in the alias list."
msgstr ""
"Le nom de champ <%s> est un alias existant du composant%s>.\n"
"SVP choisir un autre nom qui n'est pas déjà existant dans la liste des alias."
#: eeschema/libfield.cpp:189
#, c-format
msgid ""
"The field name <%s> conflicts with an existing entry in the component library <%s>.\n"
"Please choose another name that does not conflict with any library entries."
msgstr ""
#: eeschema/libfield.cpp:211
msgid "No new text: no change"
msgstr "Pas de nouveau texte: pas de changements"
#: eeschema/hierarch.cpp:119 #: eeschema/hierarch.cpp:119
msgid "Navigator" msgid "Navigator"
msgstr "Navigateur" msgstr "Navigateur"
...@@ -7170,34 +7041,196 @@ msgstr "Couleur du Fond:" ...@@ -7170,34 +7041,196 @@ msgstr "Couleur du Fond:"
msgid "Eeschema is already running, Continue?" msgid "Eeschema is already running, Continue?"
msgstr "Eeschema est en cours d'exécution. Continuer ?" msgstr "Eeschema est en cours d'exécution. Continuer ?"
#: eeschema/class_libentry_fields.cpp:82 #: eeschema/libedit.cpp:30
#: eeschema/class_libentry_fields.cpp:568 msgid "Component Library Editor: "
msgid "Field" msgstr "Editeur de Composants"
msgstr "Champ"
#: eeschema/class_libentry_fields.cpp:142
msgid "invalid field number defined"
msgstr "numéro de champ défini invalide"
#: eeschema/class_libentry_fields.cpp:560
msgid "Datasheet"
msgstr "Documentation"
#: eeschema/files-io.cpp:71
msgid "Clear Schematic Hierarchy (modified!)?"
msgstr "Effacer la hiérarchie schématique (modifiée!)?"
#: eeschema/files-io.cpp:80
msgid "Open Schematic"
msgstr "Ouvrir Schématique"
#: eeschema/files-io.cpp:130 #: eeschema/libedit.cpp:71
msgid "" msgid ""
"Ready\n" "Current part not saved.\n"
"Working dir: \n" "\n"
"Discard current changes?"
msgstr "" msgstr ""
"Prêt\n" "Composant courant non sauvé.\n"
"Répertoire de travail: \n" "\n"
"Perdre les changements en cours ?"
#: eeschema/libedit.cpp:101
#, c-format
msgid "Component or alias name \"%s\" not found in library \"%s\"."
msgstr "Composant ou alias \"%s\" non trouvé en librairie \"%s\"."
#: eeschema/libedit.cpp:171
#, c-format
msgid "Could not create copy of part <%s> in library <%s>."
msgstr "Ne peut créer une copie de l'élément <%s> en librairie <%s>."
#: eeschema/libedit.cpp:252
msgid "Include last component changes?"
msgstr "Inclure les dernières modifications du composant"
#: eeschema/libedit.cpp:264
msgid "Modify library file \""
msgstr "Modifier le fichier Librairie \""
#: eeschema/libedit.cpp:264
msgid "\"?"
msgstr "\"?"
#: eeschema/libedit.cpp:275
msgid "Error while saving library file \""
msgstr "Erreur en sauvant le fichier librairie \""
#: eeschema/libedit.cpp:276
msgid "\"."
msgstr "\"."
#: eeschema/libedit.cpp:277
msgid "*** ERROR: ***"
msgstr "***ERREUR:****"
#: eeschema/libedit.cpp:282
msgid "Library file \""
msgstr "Fichier librairie \""
#: eeschema/libedit.cpp:284
msgid "Document file \""
msgstr "Fichier de doc \""
#: eeschema/libedit.cpp:324
msgid "Unit"
msgstr "Unité"
#: eeschema/libedit.cpp:327
msgid "Convert"
msgstr "Convert"
#: eeschema/libedit.cpp:331
msgid "Body"
msgstr "Body"
#: eeschema/libedit.cpp:334
msgid "Power Symbol"
msgstr "Symbole d'Alimentation"
#: eeschema/libedit.cpp:336
msgid "Component"
msgstr "Composant"
#: eeschema/libedit.cpp:386
msgid "Please select a component library."
msgstr "SVP sélectionner une librairie de composants."
#: eeschema/libedit.cpp:395
#, c-format
msgid "Component library <%s> is empty."
msgstr "Fichier librairie de composants <%s> vide"
#: eeschema/libedit.cpp:397
msgid "Delete Entry Error"
msgstr "Erreur en suppression d'élément"
#: eeschema/libedit.cpp:402
#, c-format
msgid ""
"Select 1 of %d components to delete\n"
"from library <%s>."
msgstr ""
"Selection 1 de %d composants a supprimer\n"
"de la librairie <%s>."
#: eeschema/libedit.cpp:406
msgid "Delete Component"
msgstr "Suppression Composant"
#: eeschema/libedit.cpp:415
#, c-format
msgid "Entry <%s> not found in library <%s>."
msgstr "Element <%s> non trouvé en librairie <%s>."
#: eeschema/libedit.cpp:422
#, c-format
msgid "Delete component \"%s\" from library \"%s\"?"
msgstr "Supprimer composant \"%s\" de la librairie \"%s\"?"
#: eeschema/libedit.cpp:442
msgid "The component being deleted has been modified. All changes will be lost. Discard changes?"
msgstr ""
#: eeschema/libedit.cpp:497
msgid ""
"All changes to the current component will be lost!\n"
"\n"
"Clear the current component from the screen?"
msgstr ""
#: eeschema/libedit.cpp:511
msgid "This new component has no name and cannot be created. Aborted"
msgstr "Ce noveau composant n'a pas de nom et ne peut être créé, Abandon"
#: eeschema/libedit.cpp:522
#, c-format
msgid "Component \"%s\" already exists in library \"%s\"."
msgstr "Composant \"%s\" déjà existant en librairie \"%s\"."
#: eeschema/libedit.cpp:587
msgid "No component to save."
msgstr "Pas de composant à sauver."
#: eeschema/libedit.cpp:596
msgid "No library specified."
msgstr "Pas de librairie spécifiée."
#: eeschema/libedit.cpp:606
#, c-format
msgid "Component \"%s\" exists. Change it?"
msgstr "Le composant \" %s\" existe, Le changer ?"
#: eeschema/libedit.cpp:624
#, c-format
msgid "Component %s saved in library %s"
msgstr "Composant %s sauvé en librairie %s"
#: eeschema/class_libentry.cpp:67
msgid "none"
msgstr "rien"
#: eeschema/class_libentry.cpp:330
msgid "value"
msgstr "valeur"
#: eeschema/class_libentry.cpp:330
msgid "reference"
msgstr "référence"
#: eeschema/class_libentry.cpp:332
#, fuzzy, c-format
msgid "An attempt was made to remove the %s field from component %s in library %s."
msgstr "Alias <%s> non trouvé pour le component <%s> en librairie <%s>."
#: eeschema/class_libentry.cpp:674
msgid "file ended prematurely loading component draw element"
msgstr ""
#: eeschema/class_libentry.cpp:729
msgid "file ended prematurely while attempting to flush to end of drawing section."
msgstr ""
#: eeschema/files-io.cpp:71
msgid "Clear Schematic Hierarchy (modified!)?"
msgstr "Effacer la hiérarchie schématique (modifiée!)?"
#: eeschema/files-io.cpp:80
msgid "Open Schematic"
msgstr "Ouvrir Schématique"
#: eeschema/files-io.cpp:130
msgid ""
"Ready\n"
"Working dir: \n"
msgstr ""
"Prêt\n"
"Répertoire de travail: \n"
#: eeschema/files-io.cpp:190 #: eeschema/files-io.cpp:190
#, c-format #, c-format
...@@ -7274,10 +7307,6 @@ msgstr "Exporter" ...@@ -7274,10 +7307,6 @@ msgstr "Exporter"
msgid "Arc %.1f deg" msgid "Arc %.1f deg"
msgstr "Arc %.1f deg" msgstr "Arc %.1f deg"
#: eeschema/viewlibs.cpp:108
msgid "Library Browser"
msgstr "Visualisateur de Librairies"
#: eeschema/getpart.cpp:98 #: eeschema/getpart.cpp:98
#, c-format #, c-format
msgid "component selection (%d items loaded):" msgid "component selection (%d items loaded):"
...@@ -8474,6 +8503,10 @@ msgstr "" ...@@ -8474,6 +8503,10 @@ msgstr ""
"\n" "\n"
"#End List\n" "#End List\n"
#: eeschema/build_BOM.cpp:620
msgid "Field"
msgstr "Champ"
#: eeschema/build_BOM.cpp:628 #: eeschema/build_BOM.cpp:628
msgid "" msgid ""
"\n" "\n"
...@@ -8514,17 +8547,21 @@ msgstr "> %-28.28s PinSheet %-7.7s (Feuille %s) pos: %3.3f, %3.3f\n" ...@@ -8514,17 +8547,21 @@ msgstr "> %-28.28s PinSheet %-7.7s (Feuille %s) pos: %3.3f, %3.3f\n"
msgid "#End labels\n" msgid "#End labels\n"
msgstr "#End labels\n" msgstr "#End labels\n"
#: eeschema/class_libentry.cpp:70 #: eeschema/dialog_edit_libentry_fields_in_lib.cpp:160
msgid "none" #: eeschema/dialog_edit_libentry_fields_in_lib.cpp:165
msgstr "rien" msgid "Pos "
msgstr "Pos "
#: eeschema/class_libentry.cpp:695
msgid "file ended prematurely loading component draw element"
msgstr ""
#: eeschema/class_libentry.cpp:750 #: eeschema/dialog_edit_libentry_fields_in_lib.cpp:226
msgid "file ended prematurely while attempting to flush to end of drawing section." #, c-format
msgid ""
"A new name is entered for this component\n"
"An alias %s already exists!\n"
"Cannot update this component"
msgstr "" msgstr ""
"Un noveau nom a été entré pour ce composant\n"
"Un alias %s existe déjà!\n"
"Ne peut mettre à jour ce composant"
#: eeschema/edit_component_in_lib.cpp:145 #: eeschema/edit_component_in_lib.cpp:145
#, c-format #, c-format
...@@ -8589,7 +8626,7 @@ msgstr "Filtrage Modules" ...@@ -8589,7 +8626,7 @@ msgstr "Filtrage Modules"
#: eeschema/edit_component_in_lib.cpp:493 #: eeschema/edit_component_in_lib.cpp:493
#, c-format #, c-format
msgid "Foot print filter <%s> is already defined." msgid "Foot print filter <%s> is already defined."
msgstr "" msgstr "Filtre de module <%s> déjà défini."
#: eeschema/dialog_eeschema_config_fbp.cpp:20 #: eeschema/dialog_eeschema_config_fbp.cpp:20
msgid "Component library files" msgid "Component library files"
...@@ -8860,77 +8897,6 @@ msgstr "Imprimer Page Courante" ...@@ -8860,77 +8897,6 @@ msgstr "Imprimer Page Courante"
msgid "Print All" msgid "Print All"
msgstr "Imprimer Tout" msgstr "Imprimer Tout"
#: eeschema/class_library.cpp:24
#, c-format
msgid "Component library <%s> has duplicate entry name <%s>. This may cause some unexpected behavior when loading components into a schematic."
msgstr ""
#: eeschema/class_library.cpp:201
#, c-format
msgid "Cannot add duplicate alias <%s> to library <%s>."
msgstr "Ne peut ajouter un double de l'alias <%s> en librairie <%s>."
#: eeschema/class_library.cpp:240
#, c-format
msgid "Conflict in library <%s>: alias <%s> already has root name <%s> and will not be assigned to root name <%s>."
msgstr ""
#: eeschema/class_library.cpp:470
msgid "The component library file name is not set."
msgstr "Le nom du fichier librairie est non sélectionné."
#: eeschema/class_library.cpp:478
msgid "The file could not be opened."
msgstr "Le fichier n'a pas pu être ouvert."
#: eeschema/class_library.cpp:484
msgid "The file is empty!"
msgstr "Fichier vide!"
#: eeschema/class_library.cpp:507
msgid "The file is NOT an EESCHEMA library!"
msgstr "Le fichier n'est PAS une librairie EESCHEMA !"
#: eeschema/class_library.cpp:513
msgid "The file header is missing version and time stamp information."
msgstr ""
#: eeschema/class_library.cpp:520
msgid "The file header version information is invalid."
msgstr ""
#: eeschema/class_library.cpp:532
#, c-format
msgid ""
"The component library <%s> header version number is invalid.\n"
"\n"
"In future versions of EESchema this library may not load correctly. To resolve this problem open the library in the library editor and save it. If this library is the project cache library, save the current schematic."
msgstr ""
#: eeschema/class_library.cpp:556
msgid "An error occured attempting to read the header."
msgstr "Une 'erreur s'est produite lors de la lecture de l'entête."
#: eeschema/class_library.cpp:586
#, c-format
msgid "Library <%s> component load error %s."
msgstr "Librairie <%s> erreur de chargement du composant %s."
#: eeschema/class_library.cpp:656
#, c-format
msgid "Could not open component document libray file <%s>."
msgstr "Ne peut ouvrir le fichier document du composant <%s>."
#: eeschema/class_library.cpp:663
#, c-format
msgid "Component document libray file <%s> is empty."
msgstr "Fichier document de composants <%s> vide"
#: eeschema/class_library.cpp:671
#, c-format
msgid "File <%s> is not a valid component library document file."
msgstr "<%s> n'est pas un fichier documentation de composant valide."
#: eeschema/dialog_print_using_printer_base.cpp:52 #: eeschema/dialog_print_using_printer_base.cpp:52
msgid "Current" msgid "Current"
msgstr "Courant" msgstr "Courant"
...@@ -9336,182 +9302,127 @@ msgstr "Fichiers Schématiques" ...@@ -9336,182 +9302,127 @@ msgstr "Fichiers Schématiques"
msgid "File write operation failed." msgid "File write operation failed."
msgstr "Erreur sur écriture sur fichier." msgstr "Erreur sur écriture sur fichier."
#: eeschema/class_sch_component.cpp:1086 #: eeschema/class_library.cpp:24
msgid "Power symbol" #, c-format
msgstr "Symbole d'alimentation" msgid "Component library <%s> has duplicate entry name <%s>. This may cause some unexpected behavior when loading components into a schematic."
msgstr ""
#: eeschema/class_drc_erc_item.cpp:39
msgid "ERC err unspecified"
msgstr "Erreur ERC non specifiée"
#: eeschema/class_drc_erc_item.cpp:41
msgid "Duplicate sheet names within a given sheet"
msgstr "Nom de feuille en double dans une feuile donnée"
#: eeschema/class_drc_erc_item.cpp:43
msgid "Pin not connected (and no connect symbol found on this pin)"
msgstr "Pin non connectée (pas de symbole de non connexion trouvé sur cette pin)"
#: eeschema/class_drc_erc_item.cpp:45
msgid "Pin connected to some others pins but no pin to drive it"
msgstr "Pin connectée à d'autres pins, mais aucune pin pour la piloter"
#: eeschema/class_drc_erc_item.cpp:47
msgid "Conflict problem between pins. Severity: warning"
msgstr "Problème de conflit entre pins. Sévérité: warning"
#: eeschema/class_drc_erc_item.cpp:49
msgid "Conflict problem between pins. Severity: error"
msgstr "Problème de conflit entre pins. Sévérité: erreur"
#: eeschema/class_drc_erc_item.cpp:51
msgid "Mismatch between hierarchical labels and pins sheets"
msgstr "Différence entre labels de hiérarchieet pins de hiérarchie"
#: eeschema/class_drc_erc_item.cpp:53
msgid "A no connect symbol is connected to more than 1 pin"
msgstr "Un symbole de non connexion est connecté à plus de une pin"
#: eeschema/dialog_create_component.cpp:172
msgid "As Convert"
msgstr "A une forme \"convertie\""
#: eeschema/dialog_create_component.cpp:201
msgid "&1"
msgstr "&1"
#: eeschema/dialog_create_component.cpp:202
msgid "&2"
msgstr "&2"
#: eeschema/dialog_create_component.cpp:203
msgid "&3"
msgstr "&3"
#: eeschema/dialog_create_component.cpp:204
msgid "&4"
msgstr "&4"
#: eeschema/dialog_create_component.cpp:205
msgid "&5"
msgstr "&5"
#: eeschema/dialog_create_component.cpp:206
msgid "&6"
msgstr "&6"
#: eeschema/dialog_create_component.cpp:207
msgid "&7"
msgstr "&7"
#: eeschema/dialog_create_component.cpp:208
msgid "&8"
msgstr "&8"
#: eeschema/dialog_create_component.cpp:209
msgid "&9"
msgstr "&9"
#: eeschema/dialog_create_component.cpp:210 #: eeschema/class_library.cpp:207
msgid "&10" #, c-format
msgstr "&10" msgid "Cannot add duplicate alias <%s> to library <%s>."
msgstr "Ne peut ajouter un double de l'alias <%s> en librairie <%s>."
#: eeschema/dialog_create_component.cpp:211 #: eeschema/class_library.cpp:246
msgid "&11" #, c-format
msgstr "&11" msgid "Conflict in library <%s>: alias <%s> already has root name <%s> and will not be assigned to root name <%s>."
msgstr ""
#: eeschema/dialog_create_component.cpp:212 #: eeschema/class_library.cpp:476
msgid "&12" msgid "The component library file name is not set."
msgstr "&12" msgstr "Le nom du fichier librairie est non sélectionné."
#: eeschema/dialog_create_component.cpp:213 #: eeschema/class_library.cpp:484
msgid "&13" msgid "The file could not be opened."
msgstr "&13" msgstr "Le fichier n'a pas pu être ouvert."
#: eeschema/dialog_create_component.cpp:214 #: eeschema/class_library.cpp:490
msgid "&14" msgid "The file is empty!"
msgstr "&14" msgstr "Fichier vide!"
#: eeschema/dialog_create_component.cpp:215 #: eeschema/class_library.cpp:513
msgid "&15" msgid "The file is NOT an EESCHEMA library!"
msgstr "&15" msgstr "Le fichier n'est PAS une librairie EESCHEMA !"
#: eeschema/dialog_create_component.cpp:216 #: eeschema/class_library.cpp:519
msgid "&16" msgid "The file header is missing version and time stamp information."
msgstr "&16" msgstr ""
#: eeschema/dialog_create_component.cpp:217 #: eeschema/class_library.cpp:526
msgid "&17" msgid "The file header version information is invalid."
msgstr "&17" msgstr ""
#: eeschema/dialog_create_component.cpp:218 #: eeschema/class_library.cpp:538
msgid "&18" #, c-format
msgstr "&18" msgid ""
"The component library <%s> header version number is invalid.\n"
"\n"
"In future versions of EESchema this library may not load correctly. To resolve this problem open the library in the library editor and save it. If this library is the project cache library, save the current schematic."
msgstr ""
#: eeschema/dialog_create_component.cpp:219 #: eeschema/class_library.cpp:562
msgid "&19" msgid "An error occured attempting to read the header."
msgstr "&19" msgstr "Une 'erreur s'est produite lors de la lecture de l'entête."
#: eeschema/dialog_create_component.cpp:220 #: eeschema/class_library.cpp:592
msgid "&20" #, c-format
msgstr "&20" msgid "Library <%s> component load error %s."
msgstr "Librairie <%s> erreur de chargement du composant %s."
#: eeschema/dialog_create_component.cpp:221 #: eeschema/class_library.cpp:662
msgid "&21" #, c-format
msgstr "&21" msgid "Could not open component document libray file <%s>."
msgstr "Ne peut ouvrir le fichier document du composant <%s>."
#: eeschema/dialog_create_component.cpp:222 #: eeschema/class_library.cpp:669
msgid "&22" #, c-format
msgstr "&22" msgid "Component document libray file <%s> is empty."
msgstr "Fichier document de composants <%s> vide"
#: eeschema/dialog_create_component.cpp:223 #: eeschema/class_library.cpp:677
msgid "&23" #, c-format
msgstr "&23" msgid "File <%s> is not a valid component library document file."
msgstr "<%s> n'est pas un fichier documentation de composant valide."
#: eeschema/dialog_create_component.cpp:224 #: eeschema/class_drc_erc_item.cpp:39
msgid "&24" msgid "ERC err unspecified"
msgstr "&24" msgstr "Erreur ERC non specifiée"
#: eeschema/dialog_create_component.cpp:225 #: eeschema/class_drc_erc_item.cpp:41
msgid "&25" msgid "Duplicate sheet names within a given sheet"
msgstr "&25" msgstr "Nom de feuille en double dans une feuile donnée"
#: eeschema/dialog_create_component.cpp:226 #: eeschema/class_drc_erc_item.cpp:43
msgid "&26" msgid "Pin not connected (and no connect symbol found on this pin)"
msgstr "&26" msgstr "Pin non connectée (pas de symbole de non connexion trouvé sur cette pin)"
#: eeschema/dialog_create_component.cpp:227 #: eeschema/class_drc_erc_item.cpp:45
msgid "Parts per component" msgid "Pin connected to some others pins but no pin to drive it"
msgstr "Parts par composant" msgstr "Pin connectée à d'autres pins, mais aucune pin pour la piloter"
#: eeschema/dialog_create_component.cpp:233 #: eeschema/class_drc_erc_item.cpp:47
msgid "Draw options" msgid "Conflict problem between pins. Severity: warning"
msgstr "Options de Tracé" msgstr "Problème de conflit entre pins. Sévérité: warning"
#: eeschema/dialog_create_component.cpp:237 #: eeschema/class_drc_erc_item.cpp:49
msgid "Show Pin Number" msgid "Conflict problem between pins. Severity: error"
msgstr "Montrer Numéro de Pin" msgstr "Problème de conflit entre pins. Sévérité: erreur"
#: eeschema/dialog_create_component.cpp:241 #: eeschema/class_drc_erc_item.cpp:51
msgid "Show Pin Name" msgid "Mismatch between hierarchical labels and pins sheets"
msgstr "Montre Nom de Pin" msgstr "Différence entre labels de hiérarchieet pins de hiérarchie"
#: eeschema/dialog_create_component.cpp:245 #: eeschema/class_drc_erc_item.cpp:53
msgid "Pin Name Inside" msgid "A no connect symbol is connected to more than 1 pin"
msgstr "Nom de pin à l'intérieur" msgstr "Un symbole de non connexion est connecté à plus de une pin"
#: eeschema/dialog_create_component.cpp:249 #: eeschema/dialog_edit_component_in_schematic.cpp:170
msgid "Skew:" msgid "No Component Name!"
msgstr "Décalage:" msgstr "Pas de nom de composant!"
#: eeschema/dialog_create_component.cpp:303 #: eeschema/dialog_edit_component_in_schematic.cpp:177
msgid "You must provide a name for this component" #, c-format
msgstr "Vous devez fournir un nom pour ce composant" msgid "Component [%s] not found!"
msgstr "Composant [%s] non trouvé!"
#: eeschema/dialog_edit_component_in_lib_base.cpp:25 #: eeschema/dialog_edit_component_in_lib_base.cpp:25
msgid "General :" msgid "General :"
msgstr "Général :" msgstr "Général :"
#: eeschema/dialog_edit_component_in_lib_base.cpp:27
#: eeschema/dialog_create_component.cpp:172
msgid "As Convert"
msgstr "A une forme \"convertie\""
#: eeschema/dialog_edit_component_in_lib_base.cpp:29 #: eeschema/dialog_edit_component_in_lib_base.cpp:29
msgid "" msgid ""
"Check this option for components that have a De Morgan representation.\n" "Check this option for components that have a De Morgan representation.\n"
...@@ -9526,10 +9437,20 @@ msgstr "Montre Numéro de Pin" ...@@ -9526,10 +9437,20 @@ msgstr "Montre Numéro de Pin"
msgid "Show or hide pin numbers" msgid "Show or hide pin numbers"
msgstr "Affichage ou non des numéroes de pins" msgstr "Affichage ou non des numéroes de pins"
#: eeschema/dialog_edit_component_in_lib_base.cpp:40
#: eeschema/dialog_create_component.cpp:241
msgid "Show Pin Name"
msgstr "Montre Nom de Pin"
#: eeschema/dialog_edit_component_in_lib_base.cpp:43 #: eeschema/dialog_edit_component_in_lib_base.cpp:43
msgid "Show or hide pin names" msgid "Show or hide pin names"
msgstr "Affichage ou non des noms des pins" msgstr "Affichage ou non des noms des pins"
#: eeschema/dialog_edit_component_in_lib_base.cpp:47
#: eeschema/dialog_create_component.cpp:245
msgid "Pin Name Inside"
msgstr "Nom de pin à l'intérieur"
#: eeschema/dialog_edit_component_in_lib_base.cpp:50 #: eeschema/dialog_edit_component_in_lib_base.cpp:50
msgid "" msgid ""
"Check this option to have pin names inside the body and pin number outside.\n" "Check this option to have pin names inside the body and pin number outside.\n"
...@@ -9540,6 +9461,11 @@ msgstr "" ...@@ -9540,6 +9461,11 @@ msgstr ""
msgid "Number of Units:" msgid "Number of Units:"
msgstr "Nombre de Parts:" msgstr "Nombre de Parts:"
#: eeschema/dialog_edit_component_in_lib_base.cpp:77
#: eeschema/dialog_create_component.cpp:249
msgid "Skew:"
msgstr "Décalage:"
#: eeschema/dialog_edit_component_in_lib_base.cpp:93 #: eeschema/dialog_edit_component_in_lib_base.cpp:93
msgid "" msgid ""
"Check this option for power symbols.\n" "Check this option for power symbols.\n"
...@@ -9665,6 +9591,14 @@ msgstr "Incrément Label:" ...@@ -9665,6 +9591,14 @@ msgstr "Incrément Label:"
msgid "Default Label Size" msgid "Default Label Size"
msgstr "Taille Label par défaut" msgstr "Taille Label par défaut"
#: eeschema/class_libentry_fields.cpp:143
msgid "invalid field number defined"
msgstr "numéro de champ défini invalide"
#: eeschema/class_libentry_fields.cpp:561
msgid "Datasheet"
msgstr "Documentation"
#: eeschema/edit_component_in_schematic.cpp:37 #: eeschema/edit_component_in_schematic.cpp:37
msgid "No Field to move" msgid "No Field to move"
msgstr "Pas de champ à déplacer" msgstr "Pas de champ à déplacer"
...@@ -9710,32 +9644,9 @@ msgstr "Module du Composant" ...@@ -9710,32 +9644,9 @@ msgstr "Module du Composant"
msgid "text only had %d parameters of the required 8" msgid "text only had %d parameters of the required 8"
msgstr "le texte a seulement %d paramètres sur les 8 requis" msgstr "le texte a seulement %d paramètres sur les 8 requis"
#: eeschema/dialog_edit_component_in_schematic.cpp:94 #: eeschema/class_sch_component.cpp:1083
#: eeschema/dialog_edit_component_in_schematic.cpp:99 msgid "Power symbol"
#: eeschema/dialog_edit_libentry_fields_in_lib.cpp:160 msgstr "Symbole d'alimentation"
#: eeschema/dialog_edit_libentry_fields_in_lib.cpp:165
msgid "Pos "
msgstr "Pos "
#: eeschema/dialog_edit_component_in_schematic.cpp:170
msgid "No Component Name!"
msgstr "Pas de nom de composant!"
#: eeschema/dialog_edit_component_in_schematic.cpp:177
#, c-format
msgid "Component [%s] not found!"
msgstr "Composant [%s] non trouvé!"
#: eeschema/dialog_edit_libentry_fields_in_lib.cpp:226
#, c-format
msgid ""
"A new name is entered for this component\n"
"An alias %s already exists!\n"
"Cannot update this component"
msgstr ""
"Un noveau nom a été entré pour ce composant\n"
"Un alias %s existe déjà!\n"
"Ne peut mettre à jour ce composant"
#: eeschema/dialog_erc_base.cpp:38 #: eeschema/dialog_erc_base.cpp:38
msgid "Erc File Report:" msgid "Erc File Report:"
...@@ -9825,6 +9736,126 @@ msgstr " (alias de " ...@@ -9825,6 +9736,126 @@ msgstr " (alias de "
msgid "%8.8lX/" msgid "%8.8lX/"
msgstr "%8.8lX/" msgstr "%8.8lX/"
#: eeschema/dialog_create_component.cpp:201
msgid "&1"
msgstr "&1"
#: eeschema/dialog_create_component.cpp:202
msgid "&2"
msgstr "&2"
#: eeschema/dialog_create_component.cpp:203
msgid "&3"
msgstr "&3"
#: eeschema/dialog_create_component.cpp:204
msgid "&4"
msgstr "&4"
#: eeschema/dialog_create_component.cpp:205
msgid "&5"
msgstr "&5"
#: eeschema/dialog_create_component.cpp:206
msgid "&6"
msgstr "&6"
#: eeschema/dialog_create_component.cpp:207
msgid "&7"
msgstr "&7"
#: eeschema/dialog_create_component.cpp:208
msgid "&8"
msgstr "&8"
#: eeschema/dialog_create_component.cpp:209
msgid "&9"
msgstr "&9"
#: eeschema/dialog_create_component.cpp:210
msgid "&10"
msgstr "&10"
#: eeschema/dialog_create_component.cpp:211
msgid "&11"
msgstr "&11"
#: eeschema/dialog_create_component.cpp:212
msgid "&12"
msgstr "&12"
#: eeschema/dialog_create_component.cpp:213
msgid "&13"
msgstr "&13"
#: eeschema/dialog_create_component.cpp:214
msgid "&14"
msgstr "&14"
#: eeschema/dialog_create_component.cpp:215
msgid "&15"
msgstr "&15"
#: eeschema/dialog_create_component.cpp:216
msgid "&16"
msgstr "&16"
#: eeschema/dialog_create_component.cpp:217
msgid "&17"
msgstr "&17"
#: eeschema/dialog_create_component.cpp:218
msgid "&18"
msgstr "&18"
#: eeschema/dialog_create_component.cpp:219
msgid "&19"
msgstr "&19"
#: eeschema/dialog_create_component.cpp:220
msgid "&20"
msgstr "&20"
#: eeschema/dialog_create_component.cpp:221
msgid "&21"
msgstr "&21"
#: eeschema/dialog_create_component.cpp:222
msgid "&22"
msgstr "&22"
#: eeschema/dialog_create_component.cpp:223
msgid "&23"
msgstr "&23"
#: eeschema/dialog_create_component.cpp:224
msgid "&24"
msgstr "&24"
#: eeschema/dialog_create_component.cpp:225
msgid "&25"
msgstr "&25"
#: eeschema/dialog_create_component.cpp:226
msgid "&26"
msgstr "&26"
#: eeschema/dialog_create_component.cpp:227
msgid "Parts per component"
msgstr "Parts par composant"
#: eeschema/dialog_create_component.cpp:233
msgid "Draw options"
msgstr "Options de Tracé"
#: eeschema/dialog_create_component.cpp:237
msgid "Show Pin Number"
msgstr "Montrer Numéro de Pin"
#: eeschema/dialog_create_component.cpp:303
msgid "You must provide a name for this component"
msgstr "Vous devez fournir un nom pour ce composant"
#: eeschema/dialog_lib_edit_draw_item_base.cpp:22 #: eeschema/dialog_lib_edit_draw_item_base.cpp:22
msgid "General" msgid "General"
msgstr "Général " msgstr "Général "
...@@ -11939,7 +11970,7 @@ msgstr "Effacements Globaux" ...@@ -11939,7 +11970,7 @@ msgstr "Effacements Globaux"
msgid "Footprints Orientation" msgid "Footprints Orientation"
msgstr "Orientation des Modules" msgstr "Orientation des Modules"
#: pcbnew/dialog_track_options_base.h:81 #: pcbnew/dialog_track_options_base.h:79
msgid "Tracks and Vias Sizes" msgid "Tracks and Vias Sizes"
msgstr "Dims Pistes et Vias" msgstr "Dims Pistes et Vias"
...@@ -11951,7 +11982,7 @@ msgstr "Dialogue Netliste" ...@@ -11951,7 +11982,7 @@ msgstr "Dialogue Netliste"
msgid "Create SVG file" msgid "Create SVG file"
msgstr "Créer Fichier SVG" msgstr "Créer Fichier SVG"
#: pcbnew/dialog_design_rules_base.h:100 #: pcbnew/dialog_design_rules_base.h:104
msgid "Design Rules Editor" msgid "Design Rules Editor"
msgstr "Editeur de Règles de Conception" msgstr "Editeur de Règles de Conception"
...@@ -12031,7 +12062,7 @@ msgstr "Afficher Modules Cmp" ...@@ -12031,7 +12062,7 @@ msgstr "Afficher Modules Cmp"
msgid "Show Modules Cu" msgid "Show Modules Cu"
msgstr "Afficher Modules Cu" msgstr "Afficher Modules Cu"
#: pcbnew/dialog_drc_base.h:98 #: pcbnew/dialog_drc_base.h:96
msgid "DRC Control" msgid "DRC Control"
msgstr "Contrôle DRC" msgstr "Contrôle DRC"
...@@ -12340,6 +12371,16 @@ msgstr "DCodes id." ...@@ -12340,6 +12371,16 @@ msgstr "DCodes id."
msgid "Page Settings" msgid "Page Settings"
msgstr "Ajustage opt Page" msgstr "Ajustage opt Page"
#~ msgid "Default Via Drill"
#~ msgstr "Perçage vias par défaut"
#~ msgid ""
#~ "Enter the default via drill diameter\n"
#~ "All vias drills not set to a specific drill value will have this drill "
#~ "value."
#~ msgstr ""
#~ "Entrer le preçage des vias par défault\n"
#~ "Tous les perçages de vias non ajusté à une valeur spécifique auront cette "
#~ "valeur de perçage."
#~ msgid "Copper &Layers" #~ msgid "Copper &Layers"
#~ msgstr "Couches &Cuivre." #~ msgstr "Couches &Cuivre."
#~ msgid "Select copper layers count and layers names" #~ msgid "Select copper layers count and layers names"
...@@ -12412,8 +12453,6 @@ msgstr "Ajustage opt Page" ...@@ -12412,8 +12453,6 @@ msgstr "Ajustage opt Page"
#~ msgstr "Diamètre via" #~ msgstr "Diamètre via"
#~ msgid "Micro Via Size" #~ msgid "Micro Via Size"
#~ msgstr "Diamètre Micro Via" #~ msgstr "Diamètre Micro Via"
#~ msgid "Micro Via Drill"
#~ msgstr "Perçage Micro Via"
#~ msgid "Enter the current track width" #~ msgid "Enter the current track width"
#~ msgstr "Entrer la largeur de piste courante" #~ msgstr "Entrer la largeur de piste courante"
#~ msgid "This is the clearance between tracks, vias and pads for DRC." #~ msgid "This is the clearance between tracks, vias and pads for DRC."
......
...@@ -60,6 +60,8 @@ set(PCBNEW_SRCS ...@@ -60,6 +60,8 @@ set(PCBNEW_SRCS
dialog_pad_properties_base.cpp dialog_pad_properties_base.cpp
dialog_pcbnew_config_libs_and_paths.cpp dialog_pcbnew_config_libs_and_paths.cpp
dialog_pcbnew_config_libs_and_paths_fbp.cpp dialog_pcbnew_config_libs_and_paths_fbp.cpp
dialog_print_for_modedit.cpp
dialog_print_for_modedit_base.cpp
dialog_print_using_printer.cpp dialog_print_using_printer.cpp
dialog_orient_footprints.cpp dialog_orient_footprints.cpp
dialog_track_options.cpp dialog_track_options.cpp
...@@ -95,6 +97,7 @@ set(PCBNEW_SRCS ...@@ -95,6 +97,7 @@ set(PCBNEW_SRCS
initpcb.cpp initpcb.cpp
ioascii.cpp ioascii.cpp
print_board_functions.cpp print_board_functions.cpp
printout_controler.cpp
librairi.cpp librairi.cpp
loadcmp.cpp loadcmp.cpp
locate.cpp locate.cpp
......
...@@ -825,7 +825,7 @@ bool DIALOG_DESIGN_RULES::TestDataValidity() ...@@ -825,7 +825,7 @@ bool DIALOG_DESIGN_RULES::TestDataValidity()
if( muviadrill < minUViaDrill ) if( muviadrill < minUViaDrill )
{ {
result = false; result = false;
msg.Printf( _( "%s: <b>MicroVia Drill</b> &ge; <b>MicroVia Min Drill</b><br>" ), msg.Printf( _( "%s: <b>MicroVia Drill</b> &lt; <b>MicroVia Min Drill</b><br>" ),
GetChars( m_grid->GetRowLabelValue(row)) ); GetChars( m_grid->GetRowLabelValue(row)) );
m_MessagesList->AppendToPage( msg ); m_MessagesList->AppendToPage( msg );
......
/****************************************/
/* File: dialog_print_for_modedit.cpp */
/****************************************/
// Set this to 1 if you want to test PostScript printing under MSW.
#define wxTEST_POSTSCRIPT_IN_MSW 1
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "pcbnew.h"
#include "wxPcbStruct.h"
#include "pcbplot.h"
#include "dialog_print_for_modedit_base.h"
#include "printout_controler.h"
#define WIDTH_MAX_VALUE 1000
#define WIDTH_MIN_VALUE 1
static double s_ScaleList[] =
{ 0, 0.5, 0.7, 1.0, 1.4, 2.0, 3.0, 4.0, 8.0, 16.0 };
// static print data and page setup data, to remember settings during the session
static PRINT_PARAMETERS s_Parameters;
static wxPrintData* g_PrintData;
/* Dialog to print schematic. Class derived from DIALOG_PRINT_FOR_MODEDIT_BASE
* created by wxFormBuilder
*/
class DIALOG_PRINT_FOR_MODEDIT : public DIALOG_PRINT_FOR_MODEDIT_BASE
{
private:
WinEDA_DrawFrame* m_Parent;
wxConfig* m_Config;
public:
DIALOG_PRINT_FOR_MODEDIT( WinEDA_DrawFrame* parent );
~DIALOG_PRINT_FOR_MODEDIT() {};
private:
void OnCloseWindow( wxCloseEvent& event );
void OnInitDialog( wxInitDialogEvent& event );
void OnPrintSetup( wxCommandEvent& event );
void OnPrintPreview( wxCommandEvent& event );
void OnPrintButtonClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event ) { Close(); }
void SetPenWidth();
void InitValues( );
};
/*************************************************************/
void WinEDA_ModuleEditFrame::ToPrinter( wxCommandEvent& event )
/*************************************************************/
/* Virtual function:
* Display the print dialog
*/
{
if( g_PrintData == NULL ) // First print
{
g_PrintData = new wxPrintData();
if( !g_PrintData->Ok() )
{
DisplayError( this, _( "Error Init Printer info" ) );
}
g_PrintData->SetQuality( wxPRINT_QUALITY_HIGH ); // Default resolution = HIGHT;
g_PrintData->SetOrientation( DEFAULT_ORIENTATION_PAPER );
}
DIALOG_PRINT_FOR_MODEDIT* frame = new DIALOG_PRINT_FOR_MODEDIT( this );
frame->ShowModal(); frame->Destroy();
}
/*************************************************************************************/
DIALOG_PRINT_FOR_MODEDIT::DIALOG_PRINT_FOR_MODEDIT( WinEDA_DrawFrame* parent ) :
DIALOG_PRINT_FOR_MODEDIT_BASE( parent )
/*************************************************************************************/
{
m_Parent = parent;
s_Parameters.m_ForceCentered = true;
m_Config = wxGetApp().m_EDA_Config;
InitValues();
if( GetSizer() )
{
GetSizer()->SetSizeHints( this );
}
}
/************************************************************************/
void DIALOG_PRINT_FOR_MODEDIT::InitValues( )
/************************************************************************/
{
SetFocus();
// Read the scale adjust option
int scale_Select = 3; // default selected scale = ScaleList[3] = 1
if( m_Config )
{
m_Config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &s_Parameters.m_PenMinSize );
m_Config->Read( OPTKEY_PRINT_MODULE_SCALE, &scale_Select );
m_Config->Read( OPTKEY_PRINT_MONOCHROME_MODE, &s_Parameters.m_Print_Black_and_White, 1);
}
m_ScaleOption->SetSelection( scale_Select );
if( s_Parameters.m_Print_Black_and_White )
m_ModeColorOption->SetSelection( 1 );
AddUnitSymbol( *m_TextPenWidth, g_UnitMetric );
m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UnitMetric, s_Parameters.m_PenMinSize, m_Parent->m_InternalUnits ) );
}
/********************************************************************/
void DIALOG_PRINT_FOR_MODEDIT::OnCloseWindow( wxCloseEvent& event )
/********************************************************************/
{
SetPenWidth();
if( m_Config )
{
m_Config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, s_Parameters.m_PenMinSize );
m_Config->Write( OPTKEY_PRINT_MODULE_SCALE, m_ScaleOption->GetSelection() );
m_Config->Write( OPTKEY_PRINT_MONOCHROME_MODE, s_Parameters.m_Print_Black_and_White);
}
EndModal( 0 );
}
/**********************************************/
void DIALOG_PRINT_FOR_MODEDIT::SetPenWidth()
/***********************************************/
/* Get the new pen width value, and verify min et max value
* NOTE: s_Parameters.m_PenMinSize is in internal units
*/
{
s_Parameters.m_PenMinSize = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
if( s_Parameters.m_PenMinSize > WIDTH_MAX_VALUE )
{
s_Parameters.m_PenMinSize = WIDTH_MAX_VALUE;
}
if( s_Parameters.m_PenMinSize < WIDTH_MIN_VALUE )
{
s_Parameters.m_PenMinSize = WIDTH_MIN_VALUE;
}
m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UnitMetric, s_Parameters.m_PenMinSize, m_Parent->m_InternalUnits ) );
}
/**********************************************************/
void DIALOG_PRINT_FOR_MODEDIT::OnPrintSetup( wxCommandEvent& event )
/**********************************************************/
/* Open a dialog box for printer setup (printer options, page size ...)
*/
{
wxPrintDialogData printDialogData( *g_PrintData );
if( printDialogData.Ok() )
{
wxPrintDialog printerDialog( this, &printDialogData );
printerDialog.ShowModal();
*g_PrintData = printerDialog.GetPrintDialogData().GetPrintData();
}
else
DisplayError( this, _( "Printer Problem!" ) );
}
/************************************************************/
void DIALOG_PRINT_FOR_MODEDIT::OnPrintPreview( wxCommandEvent& event )
/************************************************************/
/* Open and display a previewer frame for printing
*/
{
SetPenWidth();
s_Parameters.m_Print_Black_and_White = m_ModeColorOption->GetSelection();
s_Parameters.m_PrintScale = s_ScaleList[m_ScaleOption->GetSelection()];
// Pass two printout objects: for preview, and possible printing.
wxString title = _( "Print Preview" );
wxPrintPreview* preview =
new wxPrintPreview( new BOARD_PRINTOUT_CONTROLER( s_Parameters, m_Parent, title ),
new BOARD_PRINTOUT_CONTROLER( s_Parameters, m_Parent, title ),
g_PrintData );
if( preview == NULL )
{
DisplayError( this, wxT( "OnPrintPreview() problem" ) );
return;
}
// Uses the parent position and size.
// @todo uses last position and size ans store them when exit in m_Config
wxPoint WPos = m_Parent->GetPosition();
wxSize WSize = m_Parent->GetSize();
wxPreviewFrame* frame = new wxPreviewFrame( preview, this, title, WPos, WSize );
frame->Initialize();
frame->Show( TRUE );
}
/***************************************************************************/
void DIALOG_PRINT_FOR_MODEDIT::OnPrintButtonClick( wxCommandEvent& event )
/***************************************************************************/
/* Called on activate Print button
*/
{
SetPenWidth();
s_Parameters.m_Print_Black_and_White = m_ModeColorOption->GetSelection();
s_Parameters.m_PrintScale = s_ScaleList[m_ScaleOption->GetSelection()];
g_pcb_plot_options.ScaleAdjX = s_Parameters.m_XScaleAdjust;
g_pcb_plot_options.ScaleAdjX = s_Parameters.m_YScaleAdjust;
g_pcb_plot_options.Scale = s_Parameters.m_PrintScale;
wxPrintDialogData printDialogData( *g_PrintData );
wxPrinter printer( &printDialogData );
BOARD_PRINTOUT_CONTROLER printout( s_Parameters, m_Parent, _( "Print Footprint" ) );
#if !defined(__WINDOWS__) && !wxCHECK_VERSION(2,9,0)
wxDC* dc = printout.GetDC();
( (wxPostScriptDC*) dc )->SetResolution( 600 ); // Postscript DC resolution is 600 ppi
#endif
if( !printer.Print( this, &printout, TRUE ) )
{
if( wxPrinter::GetLastError() == wxPRINTER_ERROR )
DisplayError( this, _( "There was a problem printing" ) );
return;
}
else
{
*g_PrintData = printer.GetPrintDialogData().GetPrintData();
}
}
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_print_for_modedit_base.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_PRINT_FOR_MODEDIT_BASE::DIALOG_PRINT_FOR_MODEDIT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bmiddleLeftSizer;
bmiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
wxString m_ScaleOptionChoices[] = { _("fit in page"), _("Scale 0.5"), _("Scale 0.7"), _("Scale 1"), _("Scale 1.4"), _("Scale 2"), _("Scale 3"), _("Scale 4"), _("Scale 8"), _("Scale 16") };
int m_ScaleOptionNChoices = sizeof( m_ScaleOptionChoices ) / sizeof( wxString );
m_ScaleOption = new wxRadioBox( this, wxID_ANY, _("Approx. Scale:"), wxDefaultPosition, wxDefaultSize, m_ScaleOptionNChoices, m_ScaleOptionChoices, 1, wxRA_SPECIFY_COLS );
m_ScaleOption->SetSelection( 3 );
bmiddleLeftSizer->Add( m_ScaleOption, 0, wxALL, 5 );
bMainSizer->Add( bmiddleLeftSizer, 0, wxEXPAND, 5 );
wxBoxSizer* bmiddleRightSizer;
bmiddleRightSizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbOptionsSizer;
sbOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL );
m_TextPenWidth = new wxStaticText( this, wxID_ANY, _("Pen Width Mini"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextPenWidth->Wrap( -1 );
sbOptionsSizer->Add( m_TextPenWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_DialogPenWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_DialogPenWidth->SetToolTip( _("Selection of the minimum pen thickness used to draw items.") );
sbOptionsSizer->Add( m_DialogPenWidth, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bmiddleRightSizer->Add( sbOptionsSizer, 0, wxEXPAND|wxALL, 5 );
bmiddleRightSizer->Add( 10, 10, 0, 0, 5 );
wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") };
int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
m_ModeColorOption = new wxRadioBox( this, wxID_PRINT_MODE, _("Print Mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
m_ModeColorOption->SetSelection( 1 );
m_ModeColorOption->SetToolTip( _("Choose if you wand to draw the sheet like it appears on screen,\nor in black and white mode, better to print it when using black and white printers") );
bmiddleRightSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 );
bMainSizer->Add( bmiddleRightSizer, 0, wxEXPAND, 5 );
wxBoxSizer* bbuttonsSizer;
bbuttonsSizer = new wxBoxSizer( wxVERTICAL );
m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Options"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonOption, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonPreview = new wxButton( this, wxID_PREVIEW, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonPreview, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonPrint = new wxButton( this, wxID_PRINT_ALL, _("Print"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonPrint, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonQuit, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bMainSizer->Add( bbuttonsSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
this->SetSizer( bMainSizer );
this->Layout();
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnCloseWindow ) );
m_ScaleOption->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::SetScale ), NULL, this );
m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintSetup ), NULL, this );
m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintPreview ), NULL, this );
m_buttonPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintButtonClick ), NULL, this );
m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnButtonCancelClick ), NULL, this );
}
DIALOG_PRINT_FOR_MODEDIT_BASE::~DIALOG_PRINT_FOR_MODEDIT_BASE()
{
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnCloseWindow ) );
m_ScaleOption->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::SetScale ), NULL, this );
m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintSetup ), NULL, this );
m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintPreview ), NULL, this );
m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintButtonClick ), NULL, this );
m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnButtonCancelClick ), NULL, this );
}
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_print_for_modedit_base__
#define __dialog_print_for_modedit_base__
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/radiobox.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/statbox.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_PRINT_FOR_MODEDIT_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_PRINT_FOR_MODEDIT_BASE : public wxDialog
{
private:
protected:
enum
{
wxID_PRINT_MODE = 1000,
wxID_PRINT_OPTIONS,
wxID_PRINT_ALL,
};
wxRadioBox* m_ScaleOption;
wxStaticText* m_TextPenWidth;
wxTextCtrl* m_DialogPenWidth;
wxRadioBox* m_ModeColorOption;
wxButton* m_buttonOption;
wxButton* m_buttonPreview;
wxButton* m_buttonPrint;
wxButton* m_buttonQuit;
// Virtual event handlers, overide them in your derived class
virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); }
virtual void SetScale( wxCommandEvent& event ){ event.Skip(); }
virtual void OnPrintSetup( wxCommandEvent& event ){ event.Skip(); }
virtual void OnPrintPreview( wxCommandEvent& event ){ event.Skip(); }
virtual void OnPrintButtonClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnButtonCancelClick( wxCommandEvent& event ){ event.Skip(); }
public:
DIALOG_PRINT_FOR_MODEDIT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Print"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 369,250 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PRINT_FOR_MODEDIT_BASE();
};
#endif //__dialog_print_for_modedit_base__
...@@ -11,15 +11,12 @@ ...@@ -11,15 +11,12 @@
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include <wx/dcps.h>
#include "dialog_print_using_printer_base.h" #include "dialog_print_using_printer_base.h"
#include "printout_controler.h"
#include "pcbnew.h" #include "pcbnew.h"
#include "protos.h"
#include "pcbplot.h" #include "pcbplot.h"
#define DEFAULT_ORIENTATION_PAPER wxLANDSCAPE // other option is wxPORTRAIT
#define WIDTH_MAX_VALUE 1000 #define WIDTH_MAX_VALUE 1000
#define WIDTH_MIN_VALUE 1 #define WIDTH_MIN_VALUE 1
...@@ -35,13 +32,7 @@ static double s_ScaleList[] = ...@@ -35,13 +32,7 @@ static double s_ScaleList[] =
static wxPrintData* g_PrintData; static wxPrintData* g_PrintData;
// Variables locales // Variables locales
static int s_PrintPenMinWidth = 50; // A reasonnable value to draw items that do dot have aspecifed line width static PRINT_PARAMETERS s_Parameters;
static int s_PrintMaskLayer;
static int s_OptionPrintPage = 0;
static int s_Print_Black_and_White = TRUE;
static int s_Scale_Select = 3; // default selected scale = ScaleList[3] = 1
static bool s_PrintMirror;
static bool s_Print_Sheet_Ref = TRUE;
/* Dialog to print schematic. Class derived from DIALOG_PRINT_USING_PRINTER_base /* Dialog to print schematic. Class derived from DIALOG_PRINT_USING_PRINTER_base
...@@ -53,8 +44,7 @@ private: ...@@ -53,8 +44,7 @@ private:
WinEDA_DrawFrame* m_Parent; WinEDA_DrawFrame* m_Parent;
wxConfig* m_Config; wxConfig* m_Config;
wxCheckBox* m_BoxSelectLayer[32]; wxCheckBox* m_BoxSelectLayer[32];
public: static bool m_ExcludeEdgeLayer;
double m_XScaleAdjust, m_YScaleAdjust;
public: public:
DIALOG_PRINT_USING_PRINTER( WinEDA_DrawFrame* parent ); DIALOG_PRINT_USING_PRINTER( WinEDA_DrawFrame* parent );
...@@ -68,8 +58,9 @@ private: ...@@ -68,8 +58,9 @@ private:
void OnPrintButtonClick( wxCommandEvent& event ); void OnPrintButtonClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event ) { Close(); } void OnButtonCancelClick( wxCommandEvent& event ) { Close(); }
void SetScale( wxCommandEvent& event ); void SetPrintParameters( );
void SetPenWidth(); void SetPenWidth();
void InitValues( );
public: public:
bool IsMirrored() { return m_Print_Mirror->IsChecked(); } bool IsMirrored() { return m_Print_Mirror->IsChecked(); }
...@@ -78,39 +69,9 @@ public: ...@@ -78,39 +69,9 @@ public:
int SetLayerMaskFromListSelection(); int SetLayerMaskFromListSelection();
}; };
/***************************/ bool DIALOG_PRINT_USING_PRINTER::m_ExcludeEdgeLayer;
/* Gestion de l'impression */
/***************************/
class EDA_Printout : public wxPrintout
{
public:
bool m_Print_Sheet_Ref;
public:
WinEDA_DrawFrame* m_Parent;
DIALOG_PRINT_USING_PRINTER* m_PrintFrame;
EDA_Printout( DIALOG_PRINT_USING_PRINTER* print_frame,
WinEDA_DrawFrame* parent,
const wxString& title,
bool print_ref ) :
wxPrintout( title )
{
m_PrintFrame = print_frame;
m_Parent = parent;
s_PrintMaskLayer = 0xFFFFFFFF;
m_Print_Sheet_Ref = print_ref;
}
bool OnPrintPage( int page );
bool HasPage( int page );
bool OnBeginDocument( int startPage, int endPage );
void GetPageInfo( int* minPage, int* maxPage, int* selPageFrom, int* selPageTo );
void DrawPage();
};
/*******************************************************/ /*******************************************************/
void WinEDA_DrawFrame::ToPrinter( wxCommandEvent& event ) void WinEDA_DrawFrame::ToPrinter( wxCommandEvent& event )
...@@ -145,11 +106,18 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_DrawFrame* parent ...@@ -145,11 +106,18 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_DrawFrame* parent
{ {
m_Parent = parent; m_Parent = parent;
m_Config = wxGetApp().m_EDA_Config; m_Config = wxGetApp().m_EDA_Config;
InitValues( );
if( GetSizer() )
{
GetSizer()->SetSizeHints( this );
}
} }
/************************************************************************/ /************************************************************************/
void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event ) void DIALOG_PRINT_USING_PRINTER::InitValues( )
/************************************************************************/ /************************************************************************/
{ {
SetFocus(); SetFocus();
...@@ -158,7 +126,7 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event ) ...@@ -158,7 +126,7 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event )
#ifdef GERBVIEW #ifdef GERBVIEW
layer_max = 32; layer_max = 32;
m_Exclude_Edges_Pcb->SetValue( true ); // no meaning in gerbview m_ExcludeEdgeLayer = true; // no meaning in gerbview
m_Exclude_Edges_Pcb->Show( false ); m_Exclude_Edges_Pcb->Show( false );
msg = _( "Layers:" ); msg = _( "Layers:" );
...@@ -195,19 +163,24 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event ) ...@@ -195,19 +163,24 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event )
m_Exclude_Edges_Pcb->Show( true ); m_Exclude_Edges_Pcb->Show( true );
#endif #endif
m_XScaleAdjust = m_YScaleAdjust = 1.0; // Default value for scale
// Read the scale adjust option // Read the scale adjust option
int scale_idx = 4; // default selected scale = ScaleList[4] = 1.000
if( m_Config ) if( m_Config )
{ {
m_Config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &s_PrintPenMinWidth ); m_Config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &s_Parameters.m_PenMinSize );
m_Config->Read( OPTKEY_PRINT_X_FINESCALE_ADJ, &m_XScaleAdjust ); m_Config->Read( OPTKEY_PRINT_X_FINESCALE_ADJ, &s_Parameters.m_XScaleAdjust );
m_Config->Read( OPTKEY_PRINT_Y_FINESCALE_ADJ, &m_YScaleAdjust ); m_Config->Read( OPTKEY_PRINT_Y_FINESCALE_ADJ, &s_Parameters.m_YScaleAdjust );
m_Config->Read( OPTKEY_PRINT_SCALE, &s_Scale_Select ); m_Config->Read( OPTKEY_PRINT_SCALE, &scale_idx );
m_Config->Read( OPTKEY_PRINT_PAGE_FRAME, &s_Parameters.m_Print_Sheet_Ref, 1);
m_Config->Read( OPTKEY_PRINT_MONOCHROME_MODE, &s_Parameters.m_Print_Black_and_White, 1);
// Test for a reasonnable scale value. Set to 1 if problem // Test for a reasonnable scale value. Set to 1 if problem
if( m_XScaleAdjust < MIN_SCALE || m_YScaleAdjust < MIN_SCALE || m_XScaleAdjust > if( s_Parameters.m_XScaleAdjust < MIN_SCALE ||
MAX_SCALE || m_YScaleAdjust > MAX_SCALE ) s_Parameters.m_YScaleAdjust < MIN_SCALE ||
m_XScaleAdjust = m_YScaleAdjust = 1.0; s_Parameters.m_XScaleAdjust > MAX_SCALE ||
s_Parameters.m_YScaleAdjust > MAX_SCALE )
s_Parameters.m_XScaleAdjust = s_Parameters.m_YScaleAdjust = 1.0;
s_SelectedLayers = 0; s_SelectedLayers = 0;
for( int layer = 0; layer<layer_max; ++layer ) for( int layer = 0; layer<layer_max; ++layer )
...@@ -227,26 +200,27 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event ) ...@@ -227,26 +200,27 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event )
} }
} }
m_ScaleOption->SetSelection( s_Scale_Select ); m_ScaleOption->SetSelection( scale_idx );
m_Print_Mirror->SetValue(s_Parameters.m_PrintMirror);
m_Exclude_Edges_Pcb->SetValue(m_ExcludeEdgeLayer);
m_Print_Sheet_Ref->SetValue( s_Parameters.m_Print_Sheet_Ref );
if( s_Print_Black_and_White )
if( s_Parameters.m_Print_Black_and_White )
m_ModeColorOption->SetSelection( 1 ); m_ModeColorOption->SetSelection( 1 );
else
m_ModeColorOption->SetSelection( 0 );
AddUnitSymbol( *m_TextPenWidth, g_UnitMetric ); AddUnitSymbol( *m_TextPenWidth, g_UnitMetric );
m_DialogPenWidth->SetValue( m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UnitMetric, s_PrintPenMinWidth, m_Parent->m_InternalUnits ) ); ReturnStringFromValue( g_UnitMetric, s_Parameters.m_PenMinSize, m_Parent->m_InternalUnits ) );
// Create scale adjust option // Create scale adjust option
msg.Printf( wxT( "%f" ), m_XScaleAdjust ); msg.Printf( wxT( "%f" ), s_Parameters.m_XScaleAdjust );
m_FineAdjustXscaleOpt->SetValue( msg ); m_FineAdjustXscaleOpt->SetValue( msg );
msg.Printf( wxT( "%f" ), m_YScaleAdjust ); msg.Printf( wxT( "%f" ), s_Parameters.m_YScaleAdjust );
m_FineAdjustYscaleOpt->SetValue( msg ); m_FineAdjustYscaleOpt->SetValue( msg );
if( GetSizer() )
{
GetSizer()->SetSizeHints( this );
}
} }
...@@ -260,16 +234,25 @@ int DIALOG_PRINT_USING_PRINTER::SetLayerMaskFromListSelection() ...@@ -260,16 +234,25 @@ int DIALOG_PRINT_USING_PRINTER::SetLayerMaskFromListSelection()
if( m_Parent->m_Ident == GERBER_FRAME ) if( m_Parent->m_Ident == GERBER_FRAME )
layers_count = 32; layers_count = 32;
s_PrintMaskLayer = 0; s_Parameters.m_PrintMaskLayer = 0;
int ii; int ii;
for( ii = 0, page_count = 0; ii < layers_count; ii++ ) for( ii = 0, page_count = 0; ii < layers_count; ii++ )
{ {
if( m_BoxSelectLayer[ii]->IsChecked() ) if( m_BoxSelectLayer[ii]->IsChecked() )
{ {
page_count++; page_count++;
s_PrintMaskLayer |= 1 << ii; s_Parameters.m_PrintMaskLayer |= 1 << ii;
} }
} }
// In pcbnew: force the EDGE layer to be printed or not with the other layers
m_ExcludeEdgeLayer = m_Exclude_Edges_Pcb->IsChecked();
if( m_ExcludeEdgeLayer )
s_Parameters.m_Flags = 0;
else
s_Parameters.m_Flags = 1;
s_Parameters.m_PageCount = page_count;
return page_count; return page_count;
} }
...@@ -279,26 +262,16 @@ int DIALOG_PRINT_USING_PRINTER::SetLayerMaskFromListSelection() ...@@ -279,26 +262,16 @@ int DIALOG_PRINT_USING_PRINTER::SetLayerMaskFromListSelection()
void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event ) void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event )
/********************************************************************/ /********************************************************************/
{ {
s_Print_Black_and_White = m_ModeColorOption->GetSelection(); SetPrintParameters();
m_Print_Sheet_Ref->SetValue( s_Print_Sheet_Ref );
SetPenWidth();
if( m_Config ) if( m_Config )
{ {
m_Config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, s_PrintPenMinWidth ); m_Config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, s_Parameters.m_PenMinSize );
} m_Config->Write( OPTKEY_PRINT_X_FINESCALE_ADJ, s_Parameters.m_XScaleAdjust );
m_Config->Write( OPTKEY_PRINT_Y_FINESCALE_ADJ, s_Parameters.m_YScaleAdjust );
if( m_FineAdjustXscaleOpt ) m_Config->Write( OPTKEY_PRINT_SCALE, m_ScaleOption->GetSelection() );
m_FineAdjustXscaleOpt->GetValue().ToDouble( &m_XScaleAdjust ); m_Config->Write( OPTKEY_PRINT_PAGE_FRAME, s_Parameters.m_Print_Sheet_Ref);
if( m_FineAdjustYscaleOpt ) m_Config->Write( OPTKEY_PRINT_MONOCHROME_MODE, s_Parameters.m_Print_Black_and_White);
m_FineAdjustYscaleOpt->GetValue().ToDouble( &m_YScaleAdjust );
SetPenWidth();
if( m_Config )
{
m_Config->Write( OPTKEY_PRINT_X_FINESCALE_ADJ, m_XScaleAdjust );
m_Config->Write( OPTKEY_PRINT_Y_FINESCALE_ADJ, m_YScaleAdjust );
m_Config->Write( OPTKEY_PRINT_SCALE, s_Scale_Select );
wxString layerKey; wxString layerKey;
int layers_count = NB_LAYERS; int layers_count = NB_LAYERS;
if( m_Parent->m_Ident == GERBER_FRAME ) if( m_Parent->m_Ident == GERBER_FRAME )
...@@ -314,17 +287,42 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event ) ...@@ -314,17 +287,42 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event )
/******************************************************************/ /******************************************************************/
void DIALOG_PRINT_USING_PRINTER::SetScale( wxCommandEvent& event ) void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
/******************************************************************/ /******************************************************************/
{ {
s_Scale_Select = m_ScaleOption->GetSelection(); s_Parameters.m_PrintMirror = m_Print_Mirror->GetValue();
g_pcb_plot_options.Scale = s_ScaleList[s_Scale_Select]; s_Parameters.m_Print_Sheet_Ref = m_Print_Sheet_Ref->GetValue();
s_Parameters.m_Print_Black_and_White =
m_ModeColorOption->GetSelection() != 0;
if( m_PagesOption )
s_Parameters.m_OptionPrintPage = m_PagesOption->GetSelection() != 0;
SetLayerMaskFromListSelection();
int idx = m_ScaleOption->GetSelection();
s_Parameters.m_PrintScale = s_ScaleList[idx];
g_pcb_plot_options.Scale = s_Parameters.m_PrintScale;
if( m_FineAdjustXscaleOpt ) if( m_FineAdjustXscaleOpt )
m_FineAdjustXscaleOpt->GetValue().ToDouble( &m_XScaleAdjust ); {
if( s_Parameters.m_XScaleAdjust > MAX_SCALE ||
s_Parameters.m_YScaleAdjust > MAX_SCALE )
DisplayInfoMessage( NULL, _( "Warning: Scale option set to a very large value" ) );
m_FineAdjustXscaleOpt->GetValue().ToDouble( &s_Parameters.m_XScaleAdjust );
}
if( m_FineAdjustYscaleOpt ) if( m_FineAdjustYscaleOpt )
m_FineAdjustYscaleOpt->GetValue().ToDouble( &m_YScaleAdjust ); {
g_pcb_plot_options.ScaleAdjX = m_XScaleAdjust; // Test for a reasonnable scale value
g_pcb_plot_options.ScaleAdjX = m_YScaleAdjust; if( s_Parameters.m_XScaleAdjust < MIN_SCALE ||
s_Parameters.m_YScaleAdjust < MIN_SCALE )
DisplayInfoMessage( NULL, _( "Warning: Scale option set to a very small value" ) );
m_FineAdjustYscaleOpt->GetValue().ToDouble( &s_Parameters.m_YScaleAdjust );
}
g_pcb_plot_options.ScaleAdjX = s_Parameters.m_XScaleAdjust;
g_pcb_plot_options.ScaleAdjX = s_Parameters.m_YScaleAdjust;
SetPenWidth();
} }
...@@ -333,23 +331,23 @@ void DIALOG_PRINT_USING_PRINTER::SetPenWidth() ...@@ -333,23 +331,23 @@ void DIALOG_PRINT_USING_PRINTER::SetPenWidth()
/***********************************************/ /***********************************************/
/* Get the new pen width value, and verify min et max value /* Get the new pen width value, and verify min et max value
* NOTE: s_PrintPenMinWidth is in internal units * NOTE: s_Parameters.m_PenMinSize is in internal units
*/ */
{ {
s_PrintPenMinWidth = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits ); s_Parameters.m_PenMinSize = ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
if( s_PrintPenMinWidth > WIDTH_MAX_VALUE ) if( s_Parameters.m_PenMinSize > WIDTH_MAX_VALUE )
{ {
s_PrintPenMinWidth = WIDTH_MAX_VALUE; s_Parameters.m_PenMinSize = WIDTH_MAX_VALUE;
} }
if( s_PrintPenMinWidth < WIDTH_MIN_VALUE ) if( s_Parameters.m_PenMinSize < WIDTH_MIN_VALUE )
{ {
s_PrintPenMinWidth = WIDTH_MIN_VALUE; s_Parameters.m_PenMinSize = WIDTH_MIN_VALUE;
} }
m_DialogPenWidth->SetValue( m_DialogPenWidth->SetValue(
ReturnStringFromValue( g_UnitMetric, s_PrintPenMinWidth, m_Parent->m_InternalUnits ) ); ReturnStringFromValue( g_UnitMetric, s_Parameters.m_PenMinSize, m_Parent->m_InternalUnits ) );
} }
...@@ -382,21 +380,13 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) ...@@ -382,21 +380,13 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
/* Open and display a previewer frame for printing /* Open and display a previewer frame for printing
*/ */
{ {
SetScale( event ); SetPrintParameters( );
SetPenWidth();
s_Print_Black_and_White = m_ModeColorOption->GetSelection();
if( m_PagesOption )
s_OptionPrintPage = m_PagesOption->GetSelection();
s_Print_Sheet_Ref = m_Print_Sheet_Ref->GetValue();
// Pass two printout objects: for preview, and possible printing. // Pass two printout objects: for preview, and possible printing.
wxString title = _( "Print Preview" ); wxString title = _( "Print Preview" );
wxPrintPreview* preview = wxPrintPreview* preview =
new wxPrintPreview( new EDA_Printout( this, m_Parent, title, s_Print_Sheet_Ref ), new wxPrintPreview( new BOARD_PRINTOUT_CONTROLER( s_Parameters, m_Parent, title ),
new EDA_Printout( this, m_Parent, title, s_Print_Sheet_Ref ), new BOARD_PRINTOUT_CONTROLER( s_Parameters, m_Parent, title ),
g_PrintData ); g_PrintData );
if( preview == NULL ) if( preview == NULL )
...@@ -409,7 +399,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event ) ...@@ -409,7 +399,7 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintPreview( wxCommandEvent& event )
// If no layer selected, we have no plot. prompt user if it happens // If no layer selected, we have no plot. prompt user if it happens
// because he could think there is a bug in pcbnew: // because he could think there is a bug in pcbnew:
if( s_PrintMaskLayer == 0 ) if( s_Parameters.m_PrintMaskLayer == 0 )
{ {
DisplayError( this, _( "No layer selected" ) ); DisplayError( this, _( "No layer selected" ) );
return; return;
...@@ -435,35 +425,22 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event ) ...@@ -435,35 +425,22 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
/* Called on activate Print button /* Called on activate Print button
*/ */
{ {
SetScale( event ); SetPrintParameters( );
s_Print_Black_and_White = m_ModeColorOption->GetSelection();
s_OptionPrintPage = 0;
if( m_PagesOption )
s_OptionPrintPage = m_PagesOption->GetSelection();
s_Print_Sheet_Ref = m_Print_Sheet_Ref->GetValue();
SetLayerMaskFromListSelection();
// If no layer selected, we have no plot. prompt user if it happens // If no layer selected, we have no plot. prompt user if it happens
// because he could think there is a bug in pcbnew: // because he could think there is a bug in pcbnew:
if( s_PrintMaskLayer == 0 ) if( s_Parameters.m_PrintMaskLayer == 0 )
{ {
DisplayError( this, _( "No layer selected" ) ); DisplayError( this, _( "No layer selected" ) );
return; return;
} }
SetPenWidth();
wxPrintDialogData printDialogData( *g_PrintData ); wxPrintDialogData printDialogData( *g_PrintData );
wxPrinter printer( &printDialogData ); wxPrinter printer( &printDialogData );
wxString title = _( "Print" ); wxString title = _( "Print" );
EDA_Printout printout( this, m_Parent, title, s_Print_Sheet_Ref ); BOARD_PRINTOUT_CONTROLER printout( s_Parameters, m_Parent, title );
#if !defined(__WINDOWS__) && !wxCHECK_VERSION(2,9,0) #if !defined(__WINDOWS__) && !wxCHECK_VERSION(2,9,0)
wxDC* dc = printout.GetDC(); wxDC* dc = printout.GetDC();
...@@ -482,289 +459,3 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event ) ...@@ -482,289 +459,3 @@ void DIALOG_PRINT_USING_PRINTER::OnPrintButtonClick( wxCommandEvent& event )
} }
} }
/***************************************/
bool EDA_Printout::OnPrintPage( int page )
/***************************************/
{
wxString msg;
msg.Printf( _( "Print page %d" ), page );
m_Parent->Affiche_Message( msg );
int layers_count = NB_LAYERS;
if( m_Parent->m_Ident == GERBER_FRAME )
layers_count = 32;
m_PrintFrame->SetLayerMaskFromListSelection();
if( s_OptionPrintPage == 0 ) // compute layer mask from page number
{
int ii, jj, mask = 1;
for( ii = 0, jj = 0; ii < layers_count; ii++ )
{
if( s_PrintMaskLayer & mask )
jj++;
if( jj == page )
{
s_PrintMaskLayer = mask;
break;
}
mask <<= 1;
}
}
if( s_PrintMaskLayer == 0 )
return false;
DrawPage();
return TRUE;
}
/*********************************************************/
void EDA_Printout::GetPageInfo( int* minPage, int* maxPage,
int* selPageFrom, int* selPageTo )
/*********************************************************/
{
int ii = 1;
*minPage = 1;
*selPageFrom = 1;
switch( s_OptionPrintPage )
{
case 0:
ii = m_PrintFrame->SetLayerMaskFromListSelection();
break;
case 1:
ii = 1;
break;
}
*maxPage = ii;
*selPageTo = ii;
}
/**************************************/
bool EDA_Printout::HasPage( int pageNum )
/**************************************/
{
return TRUE;
}
/*************************************************************/
bool EDA_Printout::OnBeginDocument( int startPage, int endPage )
/*************************************************************/
{
if( !wxPrintout::OnBeginDocument( startPage, endPage ) )
return false;
return TRUE;
}
/********************************/
void EDA_Printout::DrawPage()
/********************************/
/*
* This is the real print function: print the active screen
*/
{
int tmpzoom;
wxPoint tmp_startvisu;
wxSize PageSize_in_mm;
wxSize SheetSize; // Page size in internal units
wxSize PlotAreaSize; // plot area size in pixels
double scaleX, scaleY, scale;
wxPoint old_org;
wxPoint DrawOffset; // Offset de trace
double userscale;
double DrawZoom = 1;
wxDC* dc = GetDC();
s_PrintMirror = m_PrintFrame->IsMirrored();
wxBusyCursor dummy;
GetPageSizeMM( &PageSize_in_mm.x, &PageSize_in_mm.y );
/* Save old draw scale and draw offset */
tmp_startvisu = ActiveScreen->m_StartVisu;
tmpzoom = ActiveScreen->GetZoom();
old_org = ActiveScreen->m_DrawOrg;
/* Change draw scale and offset to draw the whole page */
ActiveScreen->SetScalingFactor( DrawZoom );
ActiveScreen->m_DrawOrg.x = ActiveScreen->m_DrawOrg.y = 0;
ActiveScreen->m_StartVisu.x = ActiveScreen->m_StartVisu.y = 0;
// Gerbview uses a very large sheet (called "World" in gerber language)
// to print a sheet, uses A4 is better
SheetSize = ActiveScreen->m_CurrentSheetDesc->m_Size; // size in 1/1000 inch
if( m_Parent->m_Ident == GERBER_FRAME )
{
SheetSize = g_Sheet_A4.m_Size; // size in 1/1000 inch
}
SheetSize.x *= m_Parent->m_InternalUnits / 1000;
SheetSize.y *= m_Parent->m_InternalUnits / 1000; // size in pixels
// Get the size of the DC in pixels
dc->GetSize( &PlotAreaSize.x, &PlotAreaSize.y );
WinEDA_BasePcbFrame* pcbframe = (WinEDA_BasePcbFrame*) m_Parent;
pcbframe->GetBoard()->ComputeBoundaryBox();
/* Compute the PCB size in internal units*/
userscale = s_ScaleList[s_Scale_Select];
if( userscale == 0 ) // fit in page
{
int extra_margin = 8000; // Margin = 8000/2 units pcb = 0,4 inch
SheetSize.x = pcbframe->GetBoard()->m_BoundaryBox.GetWidth() + extra_margin;
SheetSize.y = pcbframe->GetBoard()->m_BoundaryBox.GetHeight() + extra_margin;
userscale = 0.99;
}
if( (s_ScaleList[s_Scale_Select] > 1.0) // scale > 1 -> Recadrage
|| (s_ScaleList[s_Scale_Select] == 0) ) // fit in page
{
DrawOffset.x += pcbframe->GetBoard()->m_BoundaryBox.Centre().x;
DrawOffset.y += pcbframe->GetBoard()->m_BoundaryBox.Centre().y;
}
// Calculate a suitable scaling factor
scaleX = (double) SheetSize.x / PlotAreaSize.x;
scaleY = (double) SheetSize.y / PlotAreaSize.y;
scale = wxMax( scaleX, scaleY ) / userscale; // Use x or y scaling factor, whichever fits on the DC
if( m_PrintFrame->m_XScaleAdjust > MAX_SCALE || m_PrintFrame->m_YScaleAdjust > MAX_SCALE )
DisplayInfoMessage( NULL, _( "Warning: Scale option set to a very large value" ) );
// Test for a reasonnable scale value
if( m_PrintFrame->m_XScaleAdjust < MIN_SCALE || m_PrintFrame->m_YScaleAdjust < MIN_SCALE )
DisplayInfoMessage( NULL, _( "Warning: Scale option set to a very small value" ) );
// ajust the real draw scale
double accurate_Xscale, accurate_Yscale;
dc->SetUserScale( DrawZoom / scale * m_PrintFrame->m_XScaleAdjust,
DrawZoom / scale * m_PrintFrame->m_YScaleAdjust );
// Compute Accurate scale 1
{
int w, h;
GetPPIPrinter( &w, &h );
accurate_Xscale = ( (double) ( DrawZoom * w ) ) / PCB_INTERNAL_UNIT;
accurate_Yscale = ( (double) ( DrawZoom * h ) ) / PCB_INTERNAL_UNIT;
if( IsPreview() ) // Scale must take in account the DC size in Preview
{
// Get the size of the DC in pixels
dc->GetSize( &PlotAreaSize.x, &PlotAreaSize.y );
GetPageSizePixels( &w, &h );
accurate_Xscale *= PlotAreaSize.x; accurate_Xscale /= w;
accurate_Yscale *= PlotAreaSize.y; accurate_Yscale /= h;
}
accurate_Xscale *= m_PrintFrame->m_XScaleAdjust;
accurate_Yscale *= m_PrintFrame->m_YScaleAdjust;
}
if( (s_ScaleList[s_Scale_Select] > 1.0) // scale > 1 -> Recadrage
|| (s_ScaleList[s_Scale_Select] == 0) ) // fit in page
{
DrawOffset.x -= (int) ( (PlotAreaSize.x / 2) * scale );
DrawOffset.y -= (int) ( (PlotAreaSize.y / 3) * scale );
}
DrawOffset.x += (int) ( (SheetSize.x / 2) * (m_PrintFrame->m_XScaleAdjust - 1.0) );
DrawOffset.y += (int) ( (SheetSize.y / 2) * (m_PrintFrame->m_YScaleAdjust - 1.0) );
ActiveScreen->m_DrawOrg = DrawOffset;
GRResetPenAndBrush( dc );
if( s_Print_Black_and_White )
GRForceBlackPen( TRUE );
SetPenMinWidth( 1 ); // min width = 1 pixel
WinEDA_DrawPanel* panel = m_Parent->DrawPanel;
EDA_Rect tmp = panel->m_ClipBox;
panel->m_ClipBox.SetOrigin( wxPoint( 0, 0 ) );
panel->m_ClipBox.SetSize( wxSize( 0x7FFFFF0, 0x7FFFFF0 ) );
m_Parent->GetBaseScreen()->m_IsPrinting = true;
int bg_color = g_DrawBgColor;
if( m_Print_Sheet_Ref )
m_Parent->TraceWorkSheet( dc, ActiveScreen, 0 );
if( userscale == 1.0 ) // Draw the Sheet refs at optimum scale, and board at 1.0 scale
{
dc->SetUserScale( accurate_Xscale, accurate_Yscale );
}
if( s_PrintMirror )
{
// To plot mirror, we reverse the y axis, and modify the plot y origin
double sx, sy;
dc->GetUserScale( &sx, &sy );
dc->SetAxisOrientation( TRUE, TRUE );
if( userscale < 1.0 )
sy /= userscale;
/* Plot offset y is moved by the y plot area size in order to have
* the old draw area in the new draw area, because the draw origin has not moved
* (this is the upper left corner) but the Y axis is reversed, therefore the plotting area
* is the y coordinate values from - PlotAreaSize.y to 0 */
int ysize = (int) ( PlotAreaSize.y / sy );
DrawOffset.y += ysize;
/* in order to keep the board position in the sheet
* (when user scale <= 1) the y offset in moved by the distance between
* the middle of the page and the middle of the board
* This is equivalent to put the mirror axis to the board centre
* for scales > 1, the DrawOffset was already computed to have the board centre
* to the middle of the page.
*/
wxPoint pcb_centre = pcbframe->GetBoard()->m_BoundaryBox.Centre();
if( userscale <= 1.0 )
DrawOffset.y += pcb_centre.y - (ysize / 2);
ActiveScreen->m_DrawOrg = DrawOffset;
panel->m_ClipBox.SetOrigin( wxPoint( -0x7FFFFF, -0x7FFFFF ) );
}
#ifndef GERBVIEW
if( !m_PrintFrame->ExcludeEdges() )
s_PrintMaskLayer |= EDGE_LAYER;
#endif
g_DrawBgColor = WHITE;
/* when printing in color mode, we use the graphic OR mode that gives the same look as the screen
* But because the backgroud is white when printing, we must use a trick:
* In order to plot on a white background in OR mode we must:
* 1 - Plot all items in black, this creates a local black backgroud
* 2 - Plot in OR mode on black "local" background
*/
if( ! s_Print_Black_and_White )
{
GRForceBlackPen( true );
panel->PrintPage( dc, 0, s_PrintMaskLayer, s_PrintMirror );
GRForceBlackPen( false );
}
panel->PrintPage( dc, 0, s_PrintMaskLayer, s_PrintMirror );
g_DrawBgColor = bg_color;
m_Parent->GetBaseScreen()->m_IsPrinting = false;
panel->m_ClipBox = tmp;
SetPenMinWidth( 1 );
GRForceBlackPen( false );
ActiveScreen->m_StartVisu = tmp_startvisu;
ActiveScreen->m_DrawOrg = old_org;
ActiveScreen->SetZoom( tmpzoom );
}
...@@ -135,8 +135,6 @@ DIALOG_PRINT_USING_PRINTER_base::DIALOG_PRINT_USING_PRINTER_base( wxWindow* pare ...@@ -135,8 +135,6 @@ DIALOG_PRINT_USING_PRINTER_base::DIALOG_PRINT_USING_PRINTER_base( wxWindow* pare
// Connect Events // Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnCloseWindow ) ); this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnCloseWindow ) );
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnInitDialog ) );
m_ScaleOption->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::SetScale ), NULL, this );
m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintSetup ), NULL, this ); m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintSetup ), NULL, this );
m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintPreview ), NULL, this ); m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintPreview ), NULL, this );
m_buttonPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintButtonClick ), NULL, this ); m_buttonPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintButtonClick ), NULL, this );
...@@ -147,8 +145,6 @@ DIALOG_PRINT_USING_PRINTER_base::~DIALOG_PRINT_USING_PRINTER_base() ...@@ -147,8 +145,6 @@ DIALOG_PRINT_USING_PRINTER_base::~DIALOG_PRINT_USING_PRINTER_base()
{ {
// Disconnect Events // Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnCloseWindow ) ); this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnCloseWindow ) );
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnInitDialog ) );
m_ScaleOption->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::SetScale ), NULL, this );
m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintSetup ), NULL, this ); m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintSetup ), NULL, this );
m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintPreview ), NULL, this ); m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintPreview ), NULL, this );
m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintButtonClick ), NULL, this ); m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_USING_PRINTER_base::OnPrintButtonClick ), NULL, this );
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<property name="first_id">1000</property> <property name="first_id">1000</property>
<property name="help_provider">none</property> <property name="help_provider">none</property>
<property name="internationalize">1</property> <property name="internationalize">1</property>
<property name="name">DialogSVGPrint_base</property> <property name="name">DialogPrint_base</property>
<property name="namespace"></property> <property name="namespace"></property>
<property name="path">.</property> <property name="path">.</property>
<property name="precompiled_header"></property> <property name="precompiled_header"></property>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<event name="OnHibernate"></event> <event name="OnHibernate"></event>
<event name="OnIconize"></event> <event name="OnIconize"></event>
<event name="OnIdle"></event> <event name="OnIdle"></event>
<event name="OnInitDialog">OnInitDialog</event> <event name="OnInitDialog"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
<event name="OnKeyUp"></event> <event name="OnKeyUp"></event>
<event name="OnKillFocus"></event> <event name="OnKillFocus"></event>
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
<event name="OnMouseEvents"></event> <event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event> <event name="OnMouseWheel"></event>
<event name="OnPaint"></event> <event name="OnPaint"></event>
<event name="OnRadioBox">SetScale</event> <event name="OnRadioBox"></event>
<event name="OnRightDClick"></event> <event name="OnRightDClick"></event>
<event name="OnRightDown"></event> <event name="OnRightDown"></event>
<event name="OnRightUp"></event> <event name="OnRightUp"></event>
......
...@@ -64,8 +64,6 @@ class DIALOG_PRINT_USING_PRINTER_base : public wxDialog ...@@ -64,8 +64,6 @@ class DIALOG_PRINT_USING_PRINTER_base : public wxDialog
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); } virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); }
virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); }
virtual void SetScale( wxCommandEvent& event ){ event.Skip(); }
virtual void OnPrintSetup( wxCommandEvent& event ){ event.Skip(); } virtual void OnPrintSetup( wxCommandEvent& event ){ event.Skip(); }
virtual void OnPrintPreview( wxCommandEvent& event ){ event.Skip(); } virtual void OnPrintPreview( wxCommandEvent& event ){ event.Skip(); }
virtual void OnPrintButtonClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnPrintButtonClick( wxCommandEvent& event ){ event.Skip(); }
......
...@@ -57,7 +57,7 @@ EVT_TOOL( ID_MODEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART, ...@@ -57,7 +57,7 @@ EVT_TOOL( ID_MODEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART,
WinEDA_ModuleEditFrame::Process_Special_Functions ) WinEDA_ModuleEditFrame::Process_Special_Functions )
EVT_TOOL( ID_MODEDIT_SHEET_SET, EVT_TOOL( ID_MODEDIT_SHEET_SET,
WinEDA_ModuleEditFrame::Process_Special_Functions ) WinEDA_ModuleEditFrame::Process_Special_Functions )
EVT_TOOL( ID_GEN_PRINT, WinEDA_DrawFrame::ToPrinter ) EVT_TOOL( ID_GEN_PRINT, WinEDA_ModuleEditFrame::ToPrinter )
EVT_TOOL( ID_MODEDIT_LOAD_MODULE, EVT_TOOL( ID_MODEDIT_LOAD_MODULE,
WinEDA_ModuleEditFrame::Process_Special_Functions ) WinEDA_ModuleEditFrame::Process_Special_Functions )
EVT_TOOL( ID_MODEDIT_CHECK, EVT_TOOL( ID_MODEDIT_CHECK,
...@@ -333,14 +333,9 @@ void WinEDA_ModuleEditFrame::SetToolbars() ...@@ -333,14 +333,9 @@ void WinEDA_ModuleEditFrame::SetToolbars()
m_CursorShape ); m_CursorShape );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
!m_DisplayViaFill );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
m_DisplayViaFill ?
_( "Show Vias Sketch mode" ) :
_( "Show vias filled mode" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH, m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
!m_DisplayPadFill ); !m_DisplayPadFill );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_PADS_SKETCH, m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
m_DisplayPadFill ? m_DisplayPadFill ?
_( "Show Pads Sketch mode" ) : _( "Show Pads Sketch mode" ) :
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
#define OPTKEY_PRINT_X_FINESCALE_ADJ wxT( "PrintXFineScaleAdj" ) #define OPTKEY_PRINT_X_FINESCALE_ADJ wxT( "PrintXFineScaleAdj" )
#define OPTKEY_PRINT_Y_FINESCALE_ADJ wxT( "PrintYFineScaleAdj" ) #define OPTKEY_PRINT_Y_FINESCALE_ADJ wxT( "PrintYFineScaleAdj" )
#define OPTKEY_PRINT_SCALE wxT( "PrintScale" ) #define OPTKEY_PRINT_SCALE wxT( "PrintScale" )
#define OPTKEY_PRINT_MODULE_SCALE wxT( "PrintModuleScale" )
#define OPTKEY_PRINT_PAGE_FRAME wxT( "PrintPageFrame" )
#define OPTKEY_PRINT_MONOCHROME_MODE wxT( "PrintMonochrome" )
/* Constantes de conversion d'unites */ /* Constantes de conversion d'unites */
/* coeff de conversion dim en 0.1 mil -> dim en unite PS: (unite PS = pouce) */ /* coeff de conversion dim en 0.1 mil -> dim en unite PS: (unite PS = pouce) */
......
/**************************/
/* printout_controler.cpp */
/**************************/
// Set this to 1 if you want to test PostScript printing under MSW.
#define wxTEST_POSTSCRIPT_IN_MSW 1
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "pcbnew.h"
#include "protos.h"
#include "pcbplot.h"
#include "printout_controler.h"
// This class is an helper to pass print parameters to print functions
PRINT_PARAMETERS::PRINT_PARAMETERS()
{
m_PenMinSize = 50; // A reasonnable minimal value to draw items
// mainly that do not have a specifed line width
m_PrintScale = 1.0;
m_XScaleAdjust = m_YScaleAdjust = 1.0;
m_Print_Sheet_Ref = false;
m_PrintMaskLayer = 0xFFFFFFFF;
m_PrintMirror = false;
m_Print_Black_and_White = true;
m_OptionPrintPage = 1;
m_PageCount = 1;
m_ForceCentered = false;
m_Flags = 0;
}
BOARD_PRINTOUT_CONTROLER::BOARD_PRINTOUT_CONTROLER( const PRINT_PARAMETERS& print_params,
WinEDA_DrawFrame* parent,
const wxString& title ) :
wxPrintout( title )
{
m_PrintParams = print_params; // Make a local copy of parameters.
// So they can change in printout controler
m_Parent = parent;
}
/*****************************************************/
bool BOARD_PRINTOUT_CONTROLER::OnPrintPage( int page )
/*****************************************************/
{
int layers_count = NB_LAYERS;
if( m_Parent->m_Ident == GERBER_FRAME )
layers_count = 32;
int mask_layer = m_PrintParams.m_PrintMaskLayer;
// compute layer mask from page number if we want one page per layer
if( m_PrintParams.m_OptionPrintPage == 0 )
{
int ii, jj, mask = 1;
for( ii = 0, jj = 0; ii < layers_count; ii++ )
{
if( mask_layer & mask )
jj++;
if( jj == page )
{
m_PrintParams.m_PrintMaskLayer = mask;
break;
}
mask <<= 1;
}
}
if( m_PrintParams.m_PrintMaskLayer == 0 )
return false;
// In pcbnew we can want the layer EDGE always printed
if( m_PrintParams.m_Flags == 1 )
m_PrintParams.m_PrintMaskLayer |= EDGE_LAYER;
DrawPage();
m_PrintParams.m_PrintMaskLayer = mask_layer;
return true;
}
/*********************************************************/
void BOARD_PRINTOUT_CONTROLER::GetPageInfo( int* minPage, int* maxPage,
int* selPageFrom, int* selPageTo )
/*********************************************************/
{
*minPage = 1;
*selPageFrom = 1;
int icnt = 1;
if( m_PrintParams.m_OptionPrintPage == 0 )
icnt = m_PrintParams.m_PageCount;
*maxPage = icnt;
*selPageTo = icnt;
}
/****************************************/
void BOARD_PRINTOUT_CONTROLER::DrawPage()
/****************************************/
/*
* This is the real print function: print the active screen
*/
{
int tmpzoom;
wxPoint tmp_startvisu;
wxSize PageSize_in_mm;
wxSize SheetSize; // Page size in internal units
wxSize PlotAreaSize; // plot area size in pixels
double scaleX, scaleY, scale;
wxPoint old_org;
wxPoint DrawOffset; // Offset de trace
double userscale;
double DrawZoom = 1;
wxDC* dc = GetDC();
bool printMirror = m_PrintParams.m_PrintMirror;
wxBusyCursor dummy;
GetPageSizeMM( &PageSize_in_mm.x, &PageSize_in_mm.y );
/* Save old draw scale and draw offset */
tmp_startvisu = ActiveScreen->m_StartVisu;
tmpzoom = ActiveScreen->GetZoom();
old_org = ActiveScreen->m_DrawOrg;
/* Change draw scale and offset to draw the whole page */
ActiveScreen->SetScalingFactor( DrawZoom );
ActiveScreen->m_DrawOrg.x = ActiveScreen->m_DrawOrg.y = 0;
ActiveScreen->m_StartVisu.x = ActiveScreen->m_StartVisu.y = 0;
// Gerbview uses a very large sheet (called "World" in gerber language)
// to print a sheet, uses A4 is better
SheetSize = ActiveScreen->m_CurrentSheetDesc->m_Size; // size in 1/1000 inch
if( m_Parent->m_Ident == GERBER_FRAME )
{
SheetSize = g_Sheet_A4.m_Size; // size in 1/1000 inch
}
SheetSize.x *= m_Parent->m_InternalUnits / 1000;
SheetSize.y *= m_Parent->m_InternalUnits / 1000; // size in pixels
// Get the size of the DC in pixels
dc->GetSize( &PlotAreaSize.x, &PlotAreaSize.y );
WinEDA_BasePcbFrame* pcbframe = (WinEDA_BasePcbFrame*) m_Parent;
pcbframe->GetBoard()->ComputeBoundaryBox();
/* Compute the PCB size in internal units*/
userscale = m_PrintParams.m_PrintScale;
if( userscale == 0 ) // fit in page
{
int extra_margin = 8000; // Margin = 8000/2 units pcb = 0,4 inch
SheetSize.x = pcbframe->GetBoard()->m_BoundaryBox.GetWidth() + extra_margin;
SheetSize.y = pcbframe->GetBoard()->m_BoundaryBox.GetHeight() + extra_margin;
userscale = 0.99;
}
if( (m_PrintParams.m_PrintScale > 1.0) // scale > 1 -> Recadrage
|| (m_PrintParams.m_PrintScale == 0) ) // fit in page
{
DrawOffset.x += pcbframe->GetBoard()->m_BoundaryBox.Centre().x;
DrawOffset.y += pcbframe->GetBoard()->m_BoundaryBox.Centre().y;
}
// Calculate a suitable scaling factor
scaleX = (double) SheetSize.x / PlotAreaSize.x;
scaleY = (double) SheetSize.y / PlotAreaSize.y;
scale = wxMax( scaleX, scaleY ) / userscale; // Use x or y scaling factor, whichever fits on the DC
// ajust the real draw scale
double accurate_Xscale, accurate_Yscale;
dc->SetUserScale( DrawZoom / scale * m_PrintParams.m_XScaleAdjust,
DrawZoom / scale * m_PrintParams.m_YScaleAdjust );
// Compute Accurate scale 1
{
int w, h;
GetPPIPrinter( &w, &h );
accurate_Xscale = ( (double) ( DrawZoom * w ) ) / PCB_INTERNAL_UNIT;
accurate_Yscale = ( (double) ( DrawZoom * h ) ) / PCB_INTERNAL_UNIT;
if( IsPreview() ) // Scale must take in account the DC size in Preview
{
// Get the size of the DC in pixels
dc->GetSize( &PlotAreaSize.x, &PlotAreaSize.y );
GetPageSizePixels( &w, &h );
accurate_Xscale *= PlotAreaSize.x; accurate_Xscale /= w;
accurate_Yscale *= PlotAreaSize.y; accurate_Yscale /= h;
}
accurate_Xscale *= m_PrintParams.m_XScaleAdjust;
accurate_Yscale *= m_PrintParams.m_YScaleAdjust;
}
/* In some cases the plot origin is the centre of the page
* when:
* - Asked
* - scale > 1
* - fit in page
*/
if( m_PrintParams.m_ForceCentered
|| (m_PrintParams.m_PrintScale > 1.0) // scale > 1
|| (m_PrintParams.m_PrintScale == 0) ) // fit in page
{
DrawOffset.x -= (int) ( (PlotAreaSize.x / 2) * scale );
DrawOffset.y -= (int) ( (PlotAreaSize.y / 2) * scale );
}
DrawOffset.x += (int) ( (SheetSize.x / 2) * (m_PrintParams.m_XScaleAdjust - 1.0) );
DrawOffset.y += (int) ( (SheetSize.y / 2) * (m_PrintParams.m_YScaleAdjust - 1.0) );
ActiveScreen->m_DrawOrg = DrawOffset;
GRResetPenAndBrush( dc );
if( m_PrintParams.m_Print_Black_and_White )
GRForceBlackPen( true );
WinEDA_DrawPanel* panel = m_Parent->DrawPanel;
EDA_Rect tmp = panel->m_ClipBox;
panel->m_ClipBox.SetOrigin( wxPoint( 0, 0 ) );
panel->m_ClipBox.SetSize( wxSize( 0x7FFFFF0, 0x7FFFFF0 ) );
m_Parent->GetBaseScreen()->m_IsPrinting = true;
int bg_color = g_DrawBgColor;
SetPenMinWidth( m_PrintParams.m_PenMinSize );
if( m_PrintParams.m_Print_Sheet_Ref )
m_Parent->TraceWorkSheet( dc, ActiveScreen, 0 );
if( userscale == 1.0 ) // Draw the Sheet refs at optimum scale, and board at 1.0 scale
{
dc->SetUserScale( accurate_Xscale, accurate_Yscale );
}
if( printMirror )
{
// To plot mirror, we reverse the y axis, and modify the plot y origin
double sx, sy;
dc->GetUserScale( &sx, &sy );
dc->SetAxisOrientation( true, true );
if( userscale < 1.0 )
sy /= userscale;
/* Plot offset y is moved by the y plot area size in order to have
* the old draw area in the new draw area, because the draw origin has not moved
* (this is the upper left corner) but the Y axis is reversed, therefore the plotting area
* is the y coordinate values from - PlotAreaSize.y to 0 */
int ysize = (int) ( PlotAreaSize.y / sy );
DrawOffset.y += ysize;
/* in order to keep the board position in the sheet
* (when user scale <= 1) the y offset in moved by the distance between
* the middle of the page and the middle of the board
* This is equivalent to put the mirror axis to the board centre
* for scales > 1, the DrawOffset was already computed to have the board centre
* to the middle of the page.
*/
wxPoint pcb_centre = pcbframe->GetBoard()->m_BoundaryBox.Centre();
if( userscale <= 1.0 )
DrawOffset.y += pcb_centre.y - (ysize / 2);
ActiveScreen->m_DrawOrg = DrawOffset;
panel->m_ClipBox.SetOrigin( wxPoint( -0x7FFFFF, -0x7FFFFF ) );
}
g_DrawBgColor = WHITE;
/* when printing in color mode, we use the graphic OR mode that gives the same look as the screen
* But because the backgroud is white when printing, we must use a trick:
* In order to plot on a white background in OR mode we must:
* 1 - Plot all items in black, this creates a local black backgroud
* 2 - Plot in OR mode on black "local" background
*/
if( !m_PrintParams.m_Print_Black_and_White )
{
GRForceBlackPen( true );
panel->PrintPage( dc, 0, m_PrintParams.m_PrintMaskLayer, printMirror );
GRForceBlackPen( false );
}
panel->PrintPage( dc, 0, m_PrintParams.m_PrintMaskLayer, printMirror );
g_DrawBgColor = bg_color;
m_Parent->GetBaseScreen()->m_IsPrinting = false;
panel->m_ClipBox = tmp;
SetPenMinWidth( 1 );
GRForceBlackPen( false );
ActiveScreen->m_StartVisu = tmp_startvisu;
ActiveScreen->m_DrawOrg = old_org;
ActiveScreen->SetZoom( tmpzoom );
}
/**************************/
/* printout_controler.h */
/**************************/
#ifndef PRINTOUT_CONTROLER_H
#define PRINTOUT_CONTROLER_H
#include <wx/dcps.h>
#define DEFAULT_ORIENTATION_PAPER wxLANDSCAPE // other option is wxPORTRAIT
/**
* This class handle parameters used to draw (print) a board
* layers, scale and others options
*/
class PRINT_PARAMETERS
{
public:
int m_PenMinSize; // A minimal value pen size to plot/print items
double m_PrintScale; // general scale when printing
double m_XScaleAdjust, m_YScaleAdjust; // fine scale adjust for X and Y axis
bool m_Print_Sheet_Ref; // Option: pring page references
long m_PrintMaskLayer; // Layers to print
bool m_PrintMirror; // Option: Print mirroed
bool m_Print_Black_and_White; // Option: Print in B&W ou Color
int m_OptionPrintPage; // Option: 0 = a layer per page, all layers at once
int m_PageCount; // Nmuber of page to print
bool m_ForceCentered; // Forge plot origin to page centre (used in modedit)
int m_Flags; // auxiliary variable: can be used to pass some other info
public:
PRINT_PARAMETERS();
};
/**
* This class derived from wxPrintout handle the necessary info
* to control a printer when printing a board
*/
class BOARD_PRINTOUT_CONTROLER : public wxPrintout
{
private:
WinEDA_DrawFrame* m_Parent;
PRINT_PARAMETERS m_PrintParams;
public:
BOARD_PRINTOUT_CONTROLER( const PRINT_PARAMETERS& print_params,
WinEDA_DrawFrame* parent,
const wxString& title );
bool OnPrintPage( int page );
bool HasPage( int page ) { return true; } // do not test page num
void GetPageInfo( int* minPage, int* maxPage, int* selPageFrom, int* selPageTo );
void DrawPage();
};
#endif // ifndef PRINTOUT_CONTROLER_H
...@@ -229,10 +229,6 @@ void WinEDA_ModuleEditFrame::ReCreateOptToolbar() ...@@ -229,10 +229,6 @@ void WinEDA_ModuleEditFrame::ReCreateOptToolbar()
wxBitmap( pad_sketch_xpm ), wxBitmap( pad_sketch_xpm ),
_( "Show Pads Sketch" ) ); _( "Show Pads Sketch" ) );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_VIAS_SKETCH, wxEmptyString,
wxBitmap( via_sketch_xpm ),
_( "Show Vias Sketch" ) );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH, m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH,
wxEmptyString, wxEmptyString,
wxBitmap( text_sketch_xpm ), wxBitmap( text_sketch_xpm ),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment