File: qinputdialog.sip

package info (click to toggle)
pyqt5 5.3.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 18,480 kB
  • ctags: 5,875
  • sloc: python: 97,645; cpp: 19,584; xml: 283; makefile: 267; sh: 31
file content (134 lines) | stat: -rw-r--r-- 5,446 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// qinputdialog.sip generated by MetaSIP on Fri Sep 12 22:59:02 2014
//
// This file is part of the QtWidgets Python extension module.
//
// Copyright (c) 2014 Riverbank Computing Limited <info@riverbankcomputing.com>
// 
// This file is part of PyQt5.
// 
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file.  Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
// 
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license.  For more information contact
// info@riverbankcomputing.com.
// 
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%ModuleCode
#include <qinputdialog.h>
%End

class QInputDialog : QDialog
{
%TypeHeaderCode
#include <qinputdialog.h>
%End

public:
    enum InputDialogOption
    {
        NoButtons,
        UseListViewForComboBoxItems,
%If (Qt_5_2_0 -)
        UsePlainTextEditForTextInput,
%End
    };

    typedef QFlags<QInputDialog::InputDialogOption> InputDialogOptions;

    enum InputMode
    {
        TextInput,
        IntInput,
        DoubleInput,
    };

    static QString getText(QWidget *parent, const QString &title, const QString &label, QLineEdit::EchoMode echo = QLineEdit::Normal, const QString &text = QString(), bool *ok = 0, Qt::WindowFlags flags = 0, Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
    static int getInt(QWidget *parent, const QString &title, const QString &label, int value = 0, int min = -2147483647, int max = 2147483647, int step = 1, bool *ok = 0, Qt::WindowFlags flags = 0);
    static double getDouble(QWidget *parent, const QString &title, const QString &label, double value = 0, double min = -2147483647, double max = 2147483647, int decimals = 1, bool *ok = 0, Qt::WindowFlags flags = 0) /ReleaseGIL/;
    static QString getItem(QWidget *parent, const QString &title, const QString &label, const QStringList &items, int current = 0, bool editable = true, bool *ok = 0, Qt::WindowFlags flags = 0, Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
%If (Qt_5_2_0 -)
    static QString getMultiLineText(QWidget *parent, const QString &title, const QString &label, const QString &text /DocValue="''"/ = QString(), bool *ok = 0, Qt::WindowFlags flags = 0, Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
%End
    QInputDialog(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0);

private:
    QInputDialog(const QInputDialog &);

public:
    virtual ~QInputDialog();
    void setInputMode(QInputDialog::InputMode mode);
    QInputDialog::InputMode inputMode() const;
    void setLabelText(const QString &text);
    QString labelText() const;
    void setOption(QInputDialog::InputDialogOption option, bool on = true);
    bool testOption(QInputDialog::InputDialogOption option) const;
    void setOptions(QFlags<QInputDialog::InputDialogOption> options);
    QFlags<QInputDialog::InputDialogOption> options() const;
    void setTextValue(const QString &text);
    QString textValue() const;
    void setTextEchoMode(QLineEdit::EchoMode mode);
    QLineEdit::EchoMode textEchoMode() const;
    void setComboBoxEditable(bool editable);
    bool isComboBoxEditable() const;
    void setComboBoxItems(const QStringList &items);
    QStringList comboBoxItems() const;
    void setIntValue(int value);
    int intValue() const;
    void setIntMinimum(int min);
    int intMinimum() const;
    void setIntMaximum(int max);
    int intMaximum() const;
    void setIntRange(int min, int max);
    void setIntStep(int step);
    int intStep() const;
    void setDoubleValue(double value);
    double doubleValue() const;
    void setDoubleMinimum(double min);
    double doubleMinimum() const;
    void setDoubleMaximum(double max);
    double doubleMaximum() const;
    void setDoubleRange(double min, double max);
    void setDoubleDecimals(int decimals);
    int doubleDecimals() const;
    void setOkButtonText(const QString &text);
    QString okButtonText() const;
    void setCancelButtonText(const QString &text);
    QString cancelButtonText() const;
    virtual void open();
    void open(SIP_PYOBJECT slot /DocType="slot"/);
%MethodCode
        QObject *receiver;
        QByteArray slot_signature;
        
        if ((sipError = pyqt5_qtwidgets_get_connection_parts(a0, sipCpp, "()", false, &receiver, slot_signature)) == sipErrorNone)
        {
            sipCpp->open(receiver, slot_signature.constData());
        }
        else if (sipError == sipErrorContinue)
        {
            sipError = sipBadCallableArg(0, a0);
        }
%End

    virtual QSize minimumSizeHint() const;
    virtual QSize sizeHint() const;
    virtual void setVisible(bool visible);
    virtual void done(int result);

signals:
    void textValueChanged(const QString &text);
    void textValueSelected(const QString &text);
    void intValueChanged(int value);
    void intValueSelected(int value);
    void doubleValueChanged(double value);
    void doubleValueSelected(double value);
};

QFlags<QInputDialog::InputDialogOption> operator|(QInputDialog::InputDialogOption f1, QFlags<QInputDialog::InputDialogOption> f2);