File: qinputdialog.sip

package info (click to toggle)
pyqt5 5.7%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 19,844 kB
  • ctags: 5,974
  • sloc: python: 93,052; cpp: 20,268; xml: 282; makefile: 270; sh: 31
file content (128 lines) | stat: -rw-r--r-- 5,489 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
// qinputdialog.sip generated by MetaSIP
//
// This file is part of the QtWidgets Python extension module.
//
// Copyright (c) 2016 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.


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 = Qt::WindowFlags(), Qt::InputMethodHints inputMethodHints = Qt::ImhNone) /ReleaseGIL/;
    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 = Qt::WindowFlags()) /ReleaseGIL/;
    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 = Qt::WindowFlags()) /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 = Qt::WindowFlags(), Qt::InputMethodHints inputMethodHints = Qt::ImhNone) /ReleaseGIL/;
%If (Qt_5_2_0 -)
    static QString getMultiLineText(QWidget *parent, const QString &title, const QString &label, const QString &text = QString(), bool *ok = 0, Qt::WindowFlags flags = Qt::WindowFlags(), Qt::InputMethodHints inputMethodHints = Qt::ImhNone) /ReleaseGIL/;
%End
    QInputDialog(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
    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(QInputDialog::InputDialogOptions options);
    QInputDialog::InputDialogOptions 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 /TypeHint="PYQT_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);

private:
    QInputDialog(const QInputDialog &);
};

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