Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Functions
guiapp.h File Reference
#include "cmdvar.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 PyDoc_STRVAR (scribus_messagebartext__doc__, QT_TR_NOOP("messagebarText(\"string\")\n\ \n\ Writes the \"string\" into the Scribus message bar (status line). The text\n\ must be UTF8 encoded or 'unicode' string(recommended).\n\ "))
 Scribus GUI tool.
PyObject * scribus_messagebartext (PyObject *, PyObject *args)
 Changes the status bar string.
 PyDoc_STRVAR (scribus_progressreset__doc__, QT_TR_NOOP("progressReset()\n\ \n\ Cleans up the Scribus progress bar previous settings. It is called before the\n\ new progress bar use. See progressSet.\n\ "))
 docstring
PyObject * scribus_progressreset (PyObject *)
 PyDoc_STRVAR (scribus_progresssettotalsteps__doc__, QT_TR_NOOP("progressTotal(max)\n\ \n\ Sets the progress bar's maximum steps value to the specified number.\n\ See progressSet.\n\ "))
 docstring
PyObject * scribus_progresssettotalsteps (PyObject *, PyObject *args)
 PyDoc_STRVAR (scribus_progresssetprogress__doc__, QT_TR_NOOP("progressSet(nr)\n\ \n\ Set the progress bar position to \"nr\", a value relative to the previously set\n\ progressTotal. The progress bar uses the concept of steps; you give it the\n\ total number of steps and the number of steps completed so far and it will\n\ display the percentage of steps that have been completed. You can specify the\n\ total number of steps with progressTotal(). The current number of steps is set\n\ with progressSet(). The progress bar can be rewound to the beginning with\n\ progressReset(). [based on info taken from Trolltech's Qt docs]\n\ "))
 docstring
PyObject * scribus_progresssetprogress (PyObject *, PyObject *args)
 PyDoc_STRVAR (scribus_setcursor__doc__, QT_TR_NOOP("setCursor()\n\ \n\ [UNSUPPORTED!] This might break things, so steer clear for now.\n\ "))
 docstring
PyObject * scribus_setcursor (PyObject *, PyObject *args)
 Cursor handling (Petr Vanek 02/19/04)
 PyDoc_STRVAR (scribus_docchanged__doc__, QT_TR_NOOP("docChanged(bool)\n\ \n\ Enable/disable save icon in the Scribus icon bar and the Save menu item. It's\n\ useful to call this procedure when you're changing the document, because Scribus\n\ won't automatically notice when you change the document using a script.\n\ "))
 docstring
PyObject * scribus_docchanged (PyObject *, PyObject *args)
 Enable/disable save icon (Petr Vanek 02/20/04)
 PyDoc_STRVAR (scribus_zoomdocument__doc__, QT_TR_NOOP("zoomDocument(double)\n\ \n\ Zoom the document in main GUI window. Actions have whole number\n\ values like 20.0, 100.0, etc. Zoom to Fit uses -100 as a marker.\n\ "))
PyObject * scribus_zoomdocument (PyObject *, PyObject *args)
 Zooming the document.

Function Documentation

PyDoc_STRVAR ( scribus_messagebartext__doc__  ,
QT_TR_NOOP("messagebarText(\"string\")\n\\n\Writes the \"string\" into the Scribus message bar (status line). The text\n\must be UTF8 encoded or 'unicode' string(recommended).\n\")   
)

Scribus GUI tool.

docstring

PyDoc_STRVAR ( scribus_progressreset__doc__  ,
QT_TR_NOOP("progressReset()\n\\n\Cleans up the Scribus progress bar previous settings. It is called before the\n\new progress bar use. See progressSet.\n\")   
)

docstring

PyDoc_STRVAR ( scribus_progresssettotalsteps__doc__  ,
QT_TR_NOOP("progressTotal(max)\n\\n\Sets the progress bar's maximum steps value to the specified number.\n\See progressSet.\n\")   
)

docstring

PyDoc_STRVAR ( scribus_progresssetprogress__doc__  ,
QT_TR_NOOP("progressSet(nr)\n\\n\Set the progress bar position to \"nr\", a value relative to the previously set\n\progressTotal. The progress bar uses the concept of steps; you give it the\n\total number of steps and the number of steps completed so far and it will\n\display the percentage of steps that have been completed. You can specify the\n\total number of steps with progressTotal(). The current number of steps is set\n\with progressSet(). The progress bar can be rewound to the beginning with\n\progressReset(). [based on info taken from Trolltech's Qt docs]\n\")   
)

docstring

PyDoc_STRVAR ( scribus_setcursor__doc__  ,
QT_TR_NOOP("setCursor()\n\\n\[UNSUPPORTED!] This might break things, so steer clear for now.\n\")   
)

docstring

PyDoc_STRVAR ( scribus_docchanged__doc__  ,
QT_TR_NOOP("docChanged(bool)\n\\n\Enable/disable save icon in the Scribus icon bar and the Save menu item. It's\n\useful to call this procedure when you're changing the document, because Scribus\n\won't automatically notice when you change the document using a script.\n\")   
)

docstring

PyDoc_STRVAR ( scribus_zoomdocument__doc__  ,
QT_TR_NOOP("zoomDocument(double)\n\\n\Zoom the document in main GUI window. Actions have whole number\n\values like 20.0, 100.0, etc. Zoom to Fit uses -100 as a marker.\n\")   
)
PyObject* scribus_docchanged ( PyObject *  ,
PyObject *  args 
)

Enable/disable save icon (Petr Vanek 02/20/04)

Definition at line 79 of file guiapp.cpp.

{
       int aValue;
       if (!PyArg_ParseTuple(args, "i", &aValue))
              return NULL;
       if(!checkHaveDocument())
              return NULL;
       ScCore->primaryMainWindow()->slotDocCh(static_cast<bool>(aValue));
       /*
       if (aValue>0)
              ScCore->primaryMainWindow()->slotDocCh(true);
       else
              ScCore->primaryMainWindow()->slotDocCh(false);*/
//     Py_INCREF(Py_None);
//     return Py_None;
       Py_RETURN_NONE;
}

Here is the call graph for this function:

PyObject* scribus_messagebartext ( PyObject *  ,
PyObject *  args 
)

Changes the status bar string.

(Petr Vanek 02/19/04)

Definition at line 13 of file guiapp.cpp.

{
       char *aText;
       if (!PyArg_ParseTuple(args, "es", "utf-8", &aText))
              return NULL;
       ScCore->primaryMainWindow()->setStatusBarInfoText(QString::fromUtf8(aText));
//     Py_INCREF(Py_None);
//     return Py_None;
       Py_RETURN_NONE;
}

Here is the call graph for this function:

PyObject* scribus_progressreset ( PyObject *  )

Definition at line 24 of file guiapp.cpp.

{
       ScCore->primaryMainWindow()->mainWindowProgressBar->reset();
       qApp->processEvents();
//     Py_INCREF(Py_None);
//     return Py_None;
       Py_RETURN_NONE;
}

Here is the call graph for this function:

PyObject* scribus_progresssetprogress ( PyObject *  ,
PyObject *  args 
)

Definition at line 46 of file guiapp.cpp.

{
       int position;
       if (!PyArg_ParseTuple(args, "i", &position))
              return NULL;
       if (position > ScCore->primaryMainWindow()->mainWindowProgressBar->totalSteps())
       {
              PyErr_SetString(PyExc_ValueError, QString("Tried to set progress > maximum progress"));
              return NULL;
       }
       ScCore->primaryMainWindow()->mainWindowProgressBar->setProgress(position);
       qApp->processEvents();
//     Py_INCREF(Py_None);
//     return Py_None;
       Py_RETURN_NONE;
}

Here is the call graph for this function:

PyObject* scribus_progresssettotalsteps ( PyObject *  ,
PyObject *  args 
)

Definition at line 33 of file guiapp.cpp.

{
       int steps;
       if (!PyArg_ParseTuple(args, "i", &steps))
              return NULL;
       ScCore->primaryMainWindow()->mainWindowProgressBar->setTotalSteps(steps);
       ScCore->primaryMainWindow()->mainWindowProgressBar->setProgress(0);
       qApp->processEvents();
//     Py_INCREF(Py_None);
//     return Py_None;
       Py_RETURN_NONE;
}

Here is the call graph for this function:

PyObject* scribus_setcursor ( PyObject *  ,
PyObject *  args 
)

Cursor handling (Petr Vanek 02/19/04)

Definition at line 64 of file guiapp.cpp.

{
       char *aCursor;
       qDebug("WARNING! SetCursor() is not stable!");
       if (!PyArg_ParseTuple(args, "es", "ascii", &aCursor))
              return NULL;
       if (strcmp(aCursor, "wait") == 0)
              qApp->setOverrideCursor(Qt::WaitCursor);
       else
              qApp->restoreOverrideCursor();
//     Py_INCREF(Py_None);
//     return Py_None;
       Py_RETURN_NONE;
}
PyObject* scribus_zoomdocument ( PyObject *  ,
PyObject *  args 
)

Zooming the document.

Author:
Petr Vanek petr@.nosp@m.yarp.nosp@m.en.cz

Definition at line 97 of file guiapp.cpp.

{
       double zoomFactor;
       if (!PyArg_ParseTuple(args, "d", &zoomFactor))
              return NULL;
       if(!checkHaveDocument())
              return NULL;
       if (zoomFactor > 0.0 || zoomFactor == -100.0)
              ScCore->primaryMainWindow()->slotZoom(zoomFactor);
       else
       {
              PyErr_SetString(PyExc_ValueError, QString("The zoom factor should be greater than 0.0 or equal to -100.0. See help(zoomFactor)."));
              return NULL;
       }
//     Py_INCREF(Py_None);
//     return Py_None;
       Py_RETURN_NONE;
}

Here is the call graph for this function: