Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Functions
guiapp.cpp File Reference
#include "guiapp.h"
#include "cmdutil.h"
#include "scribuscore.h"
#include <qstring.h>
#include <qcursor.h>

Go to the source code of this file.

Functions

PyObject * scribus_messagebartext (PyObject *, PyObject *args)
 Changes the status bar string.
PyObject * scribus_progressreset (PyObject *)
PyObject * scribus_progresssettotalsteps (PyObject *, PyObject *args)
PyObject * scribus_progresssetprogress (PyObject *, PyObject *args)
PyObject * scribus_setcursor (PyObject *, PyObject *args)
 Cursor handling (Petr Vanek 02/19/04)
PyObject * scribus_docchanged (PyObject *, PyObject *args)
 Enable/disable save icon (Petr Vanek 02/20/04)
PyObject * scribus_zoomdocument (PyObject *, PyObject *args)
 Zooming the document.
void guiappdocwarnings ()
 HACK: this removes "warning: 'blah' defined but not used" compiler warnings with header files structure untouched (docstrings are kept near declarations) PV.

Function Documentation

HACK: this removes "warning: 'blah' defined but not used" compiler warnings with header files structure untouched (docstrings are kept near declarations) PV.

Definition at line 119 of file guiapp.cpp.

{
    QStringList s;
    s << scribus_messagebartext__doc__ << scribus_progressreset__doc__ << scribus_progresssettotalsteps__doc__ << scribus_progresssetprogress__doc__ << scribus_setcursor__doc__ << scribus_docchanged__doc__ << scribus_zoomdocument__doc__;
}
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: