Permalink
Browse files

Added - sample Python scripts

Added - new icons (panose, compare)
  • Loading branch information...
Pierre Marchand
Pierre Marchand committed May 1, 2009
1 parent 929203a commit 792da69b2fb5c2b9aa1800f3f003340cbbed241e
@@ -118,7 +118,7 @@ PythonQt::PythonQt(int flags)
_p->_PythonQtObjectPtr_metaId = qRegisterMetaType<PythonQtObjectPtr>("PythonQtObjectPtr");
- Py_SetProgramName("PythonQt");
+ Py_SetProgramName(QString("PythonQt").toLocal8Bit().data());
if (flags & IgnoreSiteModule) {
// this prevents the automatic importing of Python site files
Py_NoSiteFlag = 1;
@@ -233,7 +233,7 @@ PythonQtImporter_load_module(PyObject *obj, PyObject *args)
Py_DECREF(code);
if (Py_VerboseFlag)
PySys_WriteStderr("import %s # loaded from %s\n",
- fullname, modpath);
+ fullname, modpath.toLocal8Bit().data());
return mod;
error:
Py_DECREF(code);
@@ -759,7 +759,7 @@ void PythonQtImport::init()
mod = Py_InitModule4("PythonQtImport", NULL, mlabimport_doc,
NULL, PYTHON_API_VERSION);
- PythonQtImportError = PyErr_NewException("PythonQtImport.PythonQtImportError",
+ PythonQtImportError = PyErr_NewException(QString("PythonQtImport.PythonQtImportError").toLocal8Bit().data(),
PyExc_ImportError, NULL);
if (PythonQtImportError == NULL)
return;
@@ -776,7 +776,7 @@ void PythonQtImport::init()
// set our importer into the path_hooks to handle all path on sys.path
PyObject* classobj = PyDict_GetItemString(PyModule_GetDict(mod), "PythonQtImporter");
- PyObject* path_hooks = PySys_GetObject("path_hooks");
+ PyObject* path_hooks = PySys_GetObject(QString("path_hooks").toLocal8Bit().data());
PyList_Append(path_hooks, classobj);
#ifndef WIN32
View
@@ -225,6 +225,7 @@ QT4_ADD_TRANSLATION ( fontmatrix_QMS ${fontmatrix_TSS} )
ADD_CUSTOM_TARGET ( translation_release ALL DEPENDS ${fontmatrix_QMS} )
# ADD_SUBDIRECTORY(messages)
+ADD_SUBDIRECTORY(scripts)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
View
@@ -10,33 +10,34 @@
<file alias="fontmatrix_glypg.png" >graphic-resources/font-glyph.png</file>
<file alias="fontmatrix_playground.png" >graphic-resources/font-playground.png</file>
<file alias="fontmatrix_tags.png" >graphic-resources/font-tag.png</file>
+ <file alias="fontmatrix_compare.png" >graphic-resources/font-compare.png</file>
<file alias="fontmatrix_tags_graphic.png" >graphic-resources/fontmatrix-tag-graphic.png</file>
- <file alias="fontmatrix_sampletext.png" >graphic-resources/font-sampletext.png</file>
<file alias="fontmatrix_zoom.png" >graphic-resources/fontmatrix-zoom.png</file>
+ <file alias="fontmatrix_clasification.png" >graphic-resources/font-class.png</file>
<file alias="fontmatrix_antialias.png" >graphic-resources/fontmatrix-AA.png</file>
<file alias="fontmatrix_tagseteditor.png" >graphic-resources/fontmatrix-tagseteditor.png</file>
<file alias="fontmatrix_tagseteditor_icon.png" >graphic-resources/fontmatrix-tagseteditor-icon.png</file>
<file alias="fontmatrix_fontbookexport_icon.png" >graphic-resources/fontmatrix-fontbookexport-icon.png</file>
<file alias="fontmatrix_import_icon.png" >graphic-resources/fontmatrix-import-icon.png</file>
<file alias="icon-TTF" >icons/font_truetype16.png</file>
<file alias="icon-PS1" >icons/font_type116.png</file>
+ <file alias="fontmatrix_sampletext.png" >graphic-resources/font-sampletext2.png</file>
<file alias="icon-OTF" >icons/font_otf16.png</file>
<file alias="icon_empty.png" >icons/action-empty-128.png</file>
</qresource>
- <qresource prefix="/help">
- <!-- produce in icons/help/ with: "for i in *.png;do echo "<file alias=\"$i\">icons/help/$i</file>";done" -->
- <file alias="document-print.png">icons/help/document-print.png</file>
- <file alias="exit.png">icons/help/exit.png</file>
- <file alias="go-bottom.png">icons/help/go-bottom.png</file>
- <file alias="go-down.png">icons/help/go-down.png</file>
- <file alias="go-first.png">icons/help/go-first.png</file>
- <file alias="go-home.png">icons/help/go-home.png</file>
- <file alias="go-last.png">icons/help/go-last.png</file>
- <file alias="go-next.png">icons/help/go-next.png</file>
- <file alias="go-previous.png">icons/help/go-previous.png</file>
- <file alias="go-top.png">icons/help/go-top.png</file>
- <file alias="go-up.png">icons/help/go-up.png</file>
-<file alias="help-browser.png">icons/help/help-browser.png</file>
+ <qresource prefix="/help" >
+ <file alias="document-print.png" >icons/help/document-print.png</file>
+ <file alias="exit.png" >icons/help/exit.png</file>
+ <file alias="go-bottom.png" >icons/help/go-bottom.png</file>
+ <file alias="go-down.png" >icons/help/go-down.png</file>
+ <file alias="go-first.png" >icons/help/go-first.png</file>
+ <file alias="go-home.png" >icons/help/go-home.png</file>
+ <file alias="go-last.png" >icons/help/go-last.png</file>
+ <file alias="go-next.png" >icons/help/go-next.png</file>
+ <file alias="go-previous.png" >icons/help/go-previous.png</file>
+ <file alias="go-top.png" >icons/help/go-top.png</file>
+ <file alias="go-up.png" >icons/help/go-up.png</file>
+ <file alias="help-browser.png" >icons/help/help-browser.png</file>
</qresource>
<qresource prefix="/texts" >
<file alias="about" >messages/about.html</file>
View
@@ -89,7 +89,7 @@ void FMPythonW::run()
PythonQt::self()->registerCPPClassNames ( exposedClassesCPP );
mainContext.addObject ( "Fontmatrix", this );
- QString pHead ( "from PythonQt import *\n" );
+ QString pHead ( "# -*- coding: utf-8 -*-\n\nfrom PythonQt import *\n" );
mainContext.evalScript ( pHead + m_scriptAsString , Py_file_input );
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -0,0 +1,266 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ id="svg2310"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="font-compare.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-filename="/home/vlada/fontmatrix/src/graphic-resources/font-sampletext.png"
+ inkscape:export-xdpi="22.5"
+ inkscape:export-ydpi="22.5"
+ version="1.0">
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="8"
+ inkscape:cx="2.1074411"
+ inkscape:cy="12.522932"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:document-units="px"
+ inkscape:grid-bbox="true"
+ inkscape:window-width="1014"
+ inkscape:window-height="767"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:object-paths="true"
+ inkscape:object-nodes="true"
+ inkscape:snap-intersection-line-segments="true"
+ inkscape:snap-guide="true"
+ inkscape:snap-center="true"
+ objecttolerance="5"
+ inkscape:snap-global="true"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2984"
+ visible="true"
+ enabled="true" />
+ </sodipodi:namedview>
+ <defs
+ id="defs2312">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 32 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="64 : 32 : 1"
+ inkscape:persp3d-origin="32 : 21.333333 : 1"
+ id="perspective2982" />
+ <radialGradient
+ r="5.171875"
+ fy="58.000893"
+ fx="93.754448"
+ cy="58.000893"
+ cx="93.754448"
+ gradientTransform="matrix(2.3213164,0.5347427,-0.4786352,2.0777682,-13.214195,35.998469)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient14986"
+ xlink:href="#linearGradient12030"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.7825207,3.1594937,-1.5483636,0.8735563,-63.066864,-637.44012)"
+ r="37.867733"
+ fy="141.2906"
+ fx="230.35513"
+ cy="141.2906"
+ cx="230.35513"
+ id="radialGradient7581"
+ xlink:href="#linearGradient7583"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient7583"
+ inkscape:collect="always">
+ <stop
+ id="stop7585"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop7587"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient12030">
+ <stop
+ id="stop12032"
+ offset="0"
+ style="stop-color:#4e2a2a;stop-opacity:0;" />
+ <stop
+ id="stop12034"
+ offset="1"
+ style="stop-color:#888ea3;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient21803">
+ <stop
+ id="stop21805"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ style="stop-color:#bcbcbc;stop-opacity:1;"
+ offset="0.5"
+ id="stop21811" />
+ <stop
+ id="stop21813"
+ offset="0.75"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop21807"
+ offset="1"
+ style="stop-color:#c6c6c6;stop-opacity:1;" />
+ </linearGradient>
+ <radialGradient
+ id="path3787_1_"
+ cx="317.72061"
+ cy="371.81049"
+ r="182.03979"
+ gradientTransform="matrix(1.3286,0,0,2.1048,-161.1227,-218.4496)"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ offset="0"
+ style="stop-color:#F2F2EC"
+ id="stop3130" />
+ <stop
+ offset="1"
+ style="stop-color:#FFCC66"
+ id="stop3132" />
+ </radialGradient>
+ <linearGradient
+ id="path3787_2_"
+ gradientUnits="userSpaceOnUse"
+ x1="313.37689"
+ y1="447.8848"
+ x2="459.92059"
+ y2="266.35721">
+ <stop
+ offset="0"
+ style="stop-color:#3C3C3C"
+ id="stop3135" />
+ <stop
+ offset="1"
+ style="stop-color:#CDCDCD"
+ id="stop3137" />
+ </linearGradient>
+ <linearGradient
+ id="path3789_1_"
+ gradientUnits="userSpaceOnUse"
+ x1="483.87009"
+ y1="319.73001"
+ x2="595.55969"
+ y2="295.03641">
+ <stop
+ offset="0"
+ style="stop-color:#000000"
+ id="stop3141" />
+ <stop
+ offset="1"
+ style="stop-color:#000000"
+ id="stop3143" />
+ </linearGradient>
+ </defs>
+ <metadata
+ id="metadata2315">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <rect
+ style="opacity:1;fill:#9c0f0f;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect2318"
+ width="6.0216618"
+ height="6.0216618"
+ x="1.5054159"
+ y="-0.40337509"
+ transform="matrix(0.9659258,0.2588191,-0.2588191,0.9659258,0,0)"
+ inkscape:export-filename="/home/savic/Public/fontmatrix/src/icons/font-compare.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <rect
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/savic/Public/fontmatrix/src/icons/font-compare.png"
+ transform="matrix(0.9659258,0.2588191,-0.2588191,0.9659258,0,0)"
+ y="-0.30926365"
+ x="10.330481"
+ height="6.0216618"
+ width="6.0216618"
+ id="rect3826"
+ style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="opacity:1;fill:#f38080;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect3828"
+ width="6.0216618"
+ height="6.0216618"
+ x="5.8226752"
+ y="7.4984851"
+ transform="matrix(0.9659258,0.2588191,-0.2588191,0.9659258,0,0)"
+ inkscape:export-filename="/home/savic/Public/fontmatrix/src/icons/font-compare.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <g
+ id="g3841">
+ <g
+ id="g3846" />
+ </g>
+ <rect
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/savic/Public/fontmatrix/src/icons/font-compare.png"
+ transform="matrix(0.9659258,0.2588191,-0.2588191,0.9659258,0,0)"
+ y="4.4541287"
+ x="-20.486734"
+ height="6.0216618"
+ width="6.0216618"
+ id="rect3868"
+ style="opacity:1;fill:#9c0f0f;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect3870"
+ width="6.0216618"
+ height="6.0216618"
+ x="-11.66167"
+ y="4.5482402"
+ transform="matrix(0.9659258,0.2588191,-0.2588191,0.9659258,0,0)"
+ inkscape:export-filename="/home/savic/Public/fontmatrix/src/icons/font-compare.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <rect
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/savic/Public/fontmatrix/src/icons/font-compare.png"
+ transform="matrix(0.9659258,0.2588191,-0.2588191,0.9659258,0,0)"
+ y="12.355989"
+ x="-16.169476"
+ height="6.0216618"
+ width="6.0216618"
+ id="rect3872"
+ style="opacity:1;fill:#f38080;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+</svg>
Oops, something went wrong.

0 comments on commit 792da69

Please sign in to comment.