Scribus
Open source desktop publishing at your fingertips
cmddialog.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef CMDDIALOG_H
8 #define CMDDIALOG_H
9 
10 // Pulls in <Python.h> first
11 #include "cmdvar.h"
12 
16 PyDoc_STRVAR(scribus_newdocdia__doc__,
17 QT_TR_NOOP("newDocDialog() -> bool\n\
18 \n\
19 Displays the \"New Document\" dialog box. Creates a new document if the user\n\
20 accepts the settings. Does not create a document if the user presses cancel.\n\
21 Returns true if a new document was created.\n\
22 "));
24 PyObject *scribus_newdocdia(PyObject * /*self*/);
25 
27 PyDoc_STRVAR(scribus_filedia__doc__,
28 QT_TR_NOOP("fileDialog(\"caption\", [\"filter\", \"defaultname\", haspreview, issave, isdir]) -> string with filename\n\
29 \n\
30 Shows a File Open dialog box with the caption \"caption\". Files are filtered\n\
31 with the filter string \"filter\". A default filename or file path can also\n\
32 supplied, leave this string empty when you don't want to use it. A value of\n\
33 True for haspreview enables a small preview widget in the FileSelect box. When\n\
34 the issave parameter is set to True the dialog acts like a \"Save As\" dialog\n\
35 otherwise it acts like a \"File Open Dialog\". When the isdir parameter is True\n\
36 the dialog shows and returns only directories. The default for all of the\n\
37 optional parameters is False.\n\
38 \n\
39 The filter, if specified, takes the form 'comment (*.type *.type2 ...)'.\n\
40 For example 'Images (*.png *.xpm *.jpg)'.\n\
41 \n\
42 Refer to the Qt-Documentation for QFileDialog for details on filters.\n\
43 \n\
44 Example: fileDialog('Open input', 'CSV files (*.csv)')\n\
45 Example: fileDialog('Save report', defaultname='report.txt', issave=True)\n\
46 "));
49 PyObject *scribus_filedia(PyObject * /*self*/, PyObject* args, PyObject* kw);
50 /* duplicity Sends a string into the Message Bar
51 PyObject *scribus_mess(PyObject *self, PyObject* args);
52 */
53 
55 PyDoc_STRVAR(scribus_messdia__doc__,
56 QT_TR_NOOP("messageBox(\"caption\", \"message\",\n\
57  icon=ICON_NONE, button1=BUTTON_OK|BUTTONOPT_DEFAULT,\n\
58  button2=BUTTON_NONE, button3=BUTTON_NONE) -> integer\n\
59 \n\
60 Displays a message box with the title \"caption\", the message \"message\", and\n\
61 an icon \"icon\" and up to 3 buttons. By default no icon is used and a single\n\
62 button, OK, is displayed. Only the caption and message arguments are required,\n\
63 though setting an icon and appropriate button(s) is strongly\n\
64 recommended. The message text may contain simple HTML-like markup.\n\
65 \n\
66 Returns the number of the button the user pressed. Button numbers start\n\
67 at 1.\n\
68 \n\
69 For the icon and the button parameters there are predefined constants available\n\
70 with the same names as in the Qt Documentation. These are the BUTTON_* and\n\
71 ICON_* constants defined in the module. There are also two extra constants that\n\
72 can be binary-ORed with button constants:\n\
73  BUTTONOPT_DEFAULT Pressing enter presses this button.\n\
74  BUTTONOPT_ESCAPE Pressing escape presses this button.\n\
75 \n\
76 Usage examples:\n\
77 result = messageBox('Script failed',\n\
78  'This script only works when you have a text frame selected.',\n\
79  ICON_ERROR)\n\
80 result = messageBox('Monkeys!', 'Something went ook! <i>Was it a monkey?</i>',\n\
81  ICON_WARNING, BUTTON_YES|BUTTONOPT_DEFAULT,\n\
82  BUTTON_NO, BUTTON_IGNORE|BUTTONOPT_ESCAPE)\n\
83 \n\
84 Defined button and icon constants:\n\
85 BUTTON_NONE, BUTTON_ABORT, BUTTON_CANCEL, BUTTON_IGNORE, BUTTON_NO,\n\
86 BUTTON_NOALL, BUTTON_OK, BUTTON_RETRY, BUTTON_YES, BUTTON_YESALL,\n\
87 ICON_NONE, ICON_INFORMATION, ICON_WARNING, ICON_CRITICAL.\n\
88 "));
91 PyObject *scribus_messdia(PyObject * /*self*/, PyObject* args, PyObject* kw);
92 
94 PyDoc_STRVAR(scribus_valdialog__doc__,
95 QT_TR_NOOP("valueDialog(caption, message [,defaultvalue]) -> string\n\
96 \n\
97 Shows the common 'Ask for string' dialog and returns its value as a string\n\
98 Parameters: window title, text in the window and optional 'default' value.\n\
99 \n\
100 Example: valueDialog('title', 'text in the window', 'optional')\n\
101 "));
102 /* 09/24/2004 petr vanek */
103 PyObject *scribus_valdialog(PyObject * /*self*/, PyObject* args);
104 
105 
106 PyDoc_STRVAR(scribus_newstyledialog__doc__,
107 QT_TR_NOOP("newStyleDialog() -> string\n\
108 \n\
109 Shows 'Create new paragraph style' dialog. Function returns real\n\
110 style name or None when user cancels the dialog.\n\
111 "));
112 /* 09/24/2004 petr vanek */
113 PyObject *scribus_newstyledialog(PyObject * /*self*/, PyObject* args);
114 
115 #endif