init
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# Automatically generated configuration for PyQt5.QtWidgets.
|
||||
|
||||
sip-version = "6.8.6"
|
||||
sip-abi-version = "12.15"
|
||||
module-tags = ["Qt_5_15_14", "WS_MACX"]
|
||||
module-disabled-features = []
|
||||
@@ -0,0 +1,172 @@
|
||||
// QtWidgetsmod.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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.
|
||||
|
||||
|
||||
%Module(name=PyQt5.QtWidgets, keyword_arguments="Optional", use_limited_api=True)
|
||||
|
||||
%Import QtCore/QtCoremod.sip
|
||||
%Import QtGui/QtGuimod.sip
|
||||
|
||||
%Copying
|
||||
Copyright (c) 2024 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.
|
||||
%End
|
||||
|
||||
%DefaultSupertype sip.simplewrapper
|
||||
|
||||
%Include qabstractbutton.sip
|
||||
%Include qabstractitemdelegate.sip
|
||||
%Include qabstractitemview.sip
|
||||
%Include qabstractscrollarea.sip
|
||||
%Include qabstractslider.sip
|
||||
%Include qabstractspinbox.sip
|
||||
%Include qaction.sip
|
||||
%Include qactiongroup.sip
|
||||
%Include qapplication.sip
|
||||
%Include qboxlayout.sip
|
||||
%Include qbuttongroup.sip
|
||||
%Include qcalendarwidget.sip
|
||||
%Include qcheckbox.sip
|
||||
%Include qcolordialog.sip
|
||||
%Include qcolumnview.sip
|
||||
%Include qcombobox.sip
|
||||
%Include qcommandlinkbutton.sip
|
||||
%Include qcommonstyle.sip
|
||||
%Include qcompleter.sip
|
||||
%Include qdatawidgetmapper.sip
|
||||
%Include qdatetimeedit.sip
|
||||
%Include qdesktopwidget.sip
|
||||
%Include qdial.sip
|
||||
%Include qdialog.sip
|
||||
%Include qdialogbuttonbox.sip
|
||||
%Include qdirmodel.sip
|
||||
%Include qdockwidget.sip
|
||||
%Include qdrawutil.sip
|
||||
%Include qerrormessage.sip
|
||||
%Include qfiledialog.sip
|
||||
%Include qfileiconprovider.sip
|
||||
%Include qfilesystemmodel.sip
|
||||
%Include qfocusframe.sip
|
||||
%Include qfontcombobox.sip
|
||||
%Include qfontdialog.sip
|
||||
%Include qformlayout.sip
|
||||
%Include qframe.sip
|
||||
%Include qgesture.sip
|
||||
%Include qgesturerecognizer.sip
|
||||
%Include qgraphicsanchorlayout.sip
|
||||
%Include qgraphicseffect.sip
|
||||
%Include qgraphicsgridlayout.sip
|
||||
%Include qgraphicsitem.sip
|
||||
%Include qgraphicslayout.sip
|
||||
%Include qgraphicslayoutitem.sip
|
||||
%Include qgraphicslinearlayout.sip
|
||||
%Include qgraphicsproxywidget.sip
|
||||
%Include qgraphicsscene.sip
|
||||
%Include qgraphicssceneevent.sip
|
||||
%Include qgraphicstransform.sip
|
||||
%Include qgraphicsview.sip
|
||||
%Include qgraphicswidget.sip
|
||||
%Include qgridlayout.sip
|
||||
%Include qgroupbox.sip
|
||||
%Include qheaderview.sip
|
||||
%Include qinputdialog.sip
|
||||
%Include qitemdelegate.sip
|
||||
%Include qitemeditorfactory.sip
|
||||
%Include qkeyeventtransition.sip
|
||||
%Include qkeysequenceedit.sip
|
||||
%Include qlabel.sip
|
||||
%Include qlayout.sip
|
||||
%Include qlayoutitem.sip
|
||||
%Include qlcdnumber.sip
|
||||
%Include qlineedit.sip
|
||||
%Include qlistview.sip
|
||||
%Include qlistwidget.sip
|
||||
%Include qmainwindow.sip
|
||||
%Include qmdiarea.sip
|
||||
%Include qmdisubwindow.sip
|
||||
%Include qmenu.sip
|
||||
%Include qmenubar.sip
|
||||
%Include qmessagebox.sip
|
||||
%Include qmouseeventtransition.sip
|
||||
%Include qopenglwidget.sip
|
||||
%Include qplaintextedit.sip
|
||||
%Include qprogressbar.sip
|
||||
%Include qprogressdialog.sip
|
||||
%Include qproxystyle.sip
|
||||
%Include qpushbutton.sip
|
||||
%Include qradiobutton.sip
|
||||
%Include qrubberband.sip
|
||||
%Include qscrollarea.sip
|
||||
%Include qscrollbar.sip
|
||||
%Include qscroller.sip
|
||||
%Include qscrollerproperties.sip
|
||||
%Include qshortcut.sip
|
||||
%Include qsizegrip.sip
|
||||
%Include qsizepolicy.sip
|
||||
%Include qslider.sip
|
||||
%Include qspinbox.sip
|
||||
%Include qsplashscreen.sip
|
||||
%Include qsplitter.sip
|
||||
%Include qstackedlayout.sip
|
||||
%Include qstackedwidget.sip
|
||||
%Include qstatusbar.sip
|
||||
%Include qstyle.sip
|
||||
%Include qstyleditemdelegate.sip
|
||||
%Include qstylefactory.sip
|
||||
%Include qstyleoption.sip
|
||||
%Include qstylepainter.sip
|
||||
%Include qsystemtrayicon.sip
|
||||
%Include qtabbar.sip
|
||||
%Include qtableview.sip
|
||||
%Include qtablewidget.sip
|
||||
%Include qtabwidget.sip
|
||||
%Include qtextbrowser.sip
|
||||
%Include qtextedit.sip
|
||||
%Include qtoolbar.sip
|
||||
%Include qtoolbox.sip
|
||||
%Include qtoolbutton.sip
|
||||
%Include qtooltip.sip
|
||||
%Include qtreeview.sip
|
||||
%Include qtreewidget.sip
|
||||
%Include qtreewidgetitemiterator.sip
|
||||
%Include qundogroup.sip
|
||||
%Include qundostack.sip
|
||||
%Include qundoview.sip
|
||||
%Include qwhatsthis.sip
|
||||
%Include qwidget.sip
|
||||
%Include qwidgetaction.sip
|
||||
%Include qwizard.sip
|
||||
%Include qpywidgets_qlist.sip
|
||||
%Include qmaccocoaviewcontainer.sip
|
||||
@@ -0,0 +1,82 @@
|
||||
// qabstractbutton.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QAbstractButton : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstractbutton.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QAbstractButton(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QAbstractButton();
|
||||
void setAutoRepeatDelay(int);
|
||||
int autoRepeatDelay() const;
|
||||
void setAutoRepeatInterval(int);
|
||||
int autoRepeatInterval() const;
|
||||
void setText(const QString &text);
|
||||
QString text() const;
|
||||
void setIcon(const QIcon &icon);
|
||||
QIcon icon() const;
|
||||
QSize iconSize() const;
|
||||
void setShortcut(const QKeySequence &key);
|
||||
QKeySequence shortcut() const;
|
||||
void setCheckable(bool);
|
||||
bool isCheckable() const;
|
||||
bool isChecked() const;
|
||||
void setDown(bool);
|
||||
bool isDown() const;
|
||||
void setAutoRepeat(bool);
|
||||
bool autoRepeat() const;
|
||||
void setAutoExclusive(bool);
|
||||
bool autoExclusive() const;
|
||||
QButtonGroup *group() const;
|
||||
|
||||
public slots:
|
||||
void setIconSize(const QSize &size);
|
||||
void animateClick(int msecs = 100);
|
||||
void click();
|
||||
void toggle();
|
||||
void setChecked(bool);
|
||||
|
||||
signals:
|
||||
void pressed();
|
||||
void released();
|
||||
void clicked(bool checked = false);
|
||||
void toggled(bool checked);
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent *e) = 0;
|
||||
virtual bool hitButton(const QPoint &pos) const;
|
||||
virtual void checkStateSet();
|
||||
virtual void nextCheckState();
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void keyPressEvent(QKeyEvent *e);
|
||||
virtual void keyReleaseEvent(QKeyEvent *e);
|
||||
virtual void mousePressEvent(QMouseEvent *e);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *e);
|
||||
virtual void mouseMoveEvent(QMouseEvent *e);
|
||||
virtual void focusInEvent(QFocusEvent *e);
|
||||
virtual void focusOutEvent(QFocusEvent *e);
|
||||
virtual void changeEvent(QEvent *e);
|
||||
virtual void timerEvent(QTimerEvent *e);
|
||||
};
|
||||
@@ -0,0 +1,55 @@
|
||||
// qabstractitemdelegate.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QAbstractItemDelegate : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstractitemdelegate.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum EndEditHint
|
||||
{
|
||||
NoHint,
|
||||
EditNextItem,
|
||||
EditPreviousItem,
|
||||
SubmitModelCache,
|
||||
RevertModelCache,
|
||||
};
|
||||
|
||||
explicit QAbstractItemDelegate(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QAbstractItemDelegate();
|
||||
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option /NoCopy/, const QModelIndex &index) const = 0;
|
||||
virtual QSize sizeHint(const QStyleOptionViewItem &option /NoCopy/, const QModelIndex &index) const = 0;
|
||||
virtual QWidget *createEditor(QWidget *parent /TransferThis/, const QStyleOptionViewItem &option /NoCopy/, const QModelIndex &index) const /Factory/;
|
||||
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const;
|
||||
virtual void setModelData(QWidget *editor, QAbstractItemModel *model /KeepReference/, const QModelIndex &index) const;
|
||||
virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option /NoCopy/, const QModelIndex &index) const;
|
||||
virtual void destroyEditor(QWidget *editor, const QModelIndex &index) const;
|
||||
virtual bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option /NoCopy/, const QModelIndex &index);
|
||||
virtual bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index);
|
||||
|
||||
signals:
|
||||
void commitData(QWidget *editor);
|
||||
void closeEditor(QWidget *editor, QAbstractItemDelegate::EndEditHint hint = QAbstractItemDelegate::NoHint);
|
||||
void sizeHintChanged(const QModelIndex &);
|
||||
};
|
||||
@@ -0,0 +1,294 @@
|
||||
// qabstractitemview.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QAbstractItemView : public QAbstractScrollArea
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstractitemview.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum DragDropMode
|
||||
{
|
||||
NoDragDrop,
|
||||
DragOnly,
|
||||
DropOnly,
|
||||
DragDrop,
|
||||
InternalMove,
|
||||
};
|
||||
|
||||
enum EditTrigger
|
||||
{
|
||||
NoEditTriggers,
|
||||
CurrentChanged,
|
||||
DoubleClicked,
|
||||
SelectedClicked,
|
||||
EditKeyPressed,
|
||||
AnyKeyPressed,
|
||||
AllEditTriggers,
|
||||
};
|
||||
|
||||
typedef QFlags<QAbstractItemView::EditTrigger> EditTriggers;
|
||||
|
||||
enum ScrollHint
|
||||
{
|
||||
EnsureVisible,
|
||||
PositionAtTop,
|
||||
PositionAtBottom,
|
||||
PositionAtCenter,
|
||||
};
|
||||
|
||||
enum ScrollMode
|
||||
{
|
||||
ScrollPerItem,
|
||||
ScrollPerPixel,
|
||||
};
|
||||
|
||||
enum SelectionBehavior
|
||||
{
|
||||
SelectItems,
|
||||
SelectRows,
|
||||
SelectColumns,
|
||||
};
|
||||
|
||||
enum SelectionMode
|
||||
{
|
||||
NoSelection,
|
||||
SingleSelection,
|
||||
MultiSelection,
|
||||
ExtendedSelection,
|
||||
ContiguousSelection,
|
||||
};
|
||||
|
||||
explicit QAbstractItemView(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QAbstractItemView();
|
||||
virtual void setModel(QAbstractItemModel *model /KeepReference/);
|
||||
QAbstractItemModel *model() const;
|
||||
virtual void setSelectionModel(QItemSelectionModel *selectionModel /KeepReference/);
|
||||
QItemSelectionModel *selectionModel() const;
|
||||
void setItemDelegate(QAbstractItemDelegate *delegate /KeepReference/);
|
||||
QAbstractItemDelegate *itemDelegate() const;
|
||||
void setSelectionMode(QAbstractItemView::SelectionMode mode);
|
||||
QAbstractItemView::SelectionMode selectionMode() const;
|
||||
void setSelectionBehavior(QAbstractItemView::SelectionBehavior behavior);
|
||||
QAbstractItemView::SelectionBehavior selectionBehavior() const;
|
||||
QModelIndex currentIndex() const;
|
||||
QModelIndex rootIndex() const;
|
||||
void setEditTriggers(QAbstractItemView::EditTriggers triggers);
|
||||
QAbstractItemView::EditTriggers editTriggers() const;
|
||||
void setAutoScroll(bool enable);
|
||||
bool hasAutoScroll() const;
|
||||
void setTabKeyNavigation(bool enable);
|
||||
bool tabKeyNavigation() const;
|
||||
void setDropIndicatorShown(bool enable);
|
||||
bool showDropIndicator() const;
|
||||
void setDragEnabled(bool enable);
|
||||
bool dragEnabled() const;
|
||||
void setAlternatingRowColors(bool enable);
|
||||
bool alternatingRowColors() const;
|
||||
void setIconSize(const QSize &size);
|
||||
QSize iconSize() const;
|
||||
void setTextElideMode(Qt::TextElideMode mode);
|
||||
Qt::TextElideMode textElideMode() const;
|
||||
virtual void keyboardSearch(const QString &search);
|
||||
virtual QRect visualRect(const QModelIndex &index) const = 0;
|
||||
virtual void scrollTo(const QModelIndex &index, QAbstractItemView::ScrollHint hint = QAbstractItemView::EnsureVisible) = 0;
|
||||
virtual QModelIndex indexAt(const QPoint &p) const = 0;
|
||||
QSize sizeHintForIndex(const QModelIndex &index) const;
|
||||
virtual int sizeHintForRow(int row) const;
|
||||
virtual int sizeHintForColumn(int column) const;
|
||||
void openPersistentEditor(const QModelIndex &index);
|
||||
void closePersistentEditor(const QModelIndex &index);
|
||||
void setIndexWidget(const QModelIndex &index, QWidget *widget /Transfer/);
|
||||
%MethodCode
|
||||
// We have to break the association with any existing widget.
|
||||
QWidget *w = sipCpp->indexWidget(*a0);
|
||||
|
||||
if (w)
|
||||
{
|
||||
PyObject *wo = sipGetPyObject(w, sipType_QWidget);
|
||||
|
||||
if (wo)
|
||||
sipTransferTo(wo, 0);
|
||||
}
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->setIndexWidget(*a0, a1);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
QWidget *indexWidget(const QModelIndex &index) const;
|
||||
|
||||
public slots:
|
||||
virtual void reset();
|
||||
virtual void setRootIndex(const QModelIndex &index);
|
||||
virtual void selectAll();
|
||||
void edit(const QModelIndex &index);
|
||||
void clearSelection();
|
||||
void setCurrentIndex(const QModelIndex &index);
|
||||
void scrollToTop();
|
||||
void scrollToBottom();
|
||||
void update();
|
||||
void update(const QModelIndex &index);
|
||||
|
||||
protected slots:
|
||||
virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int>());
|
||||
virtual void rowsInserted(const QModelIndex &parent, int start, int end);
|
||||
virtual void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
|
||||
virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
virtual void updateEditorData();
|
||||
virtual void updateEditorGeometries();
|
||||
virtual void updateGeometries();
|
||||
virtual void verticalScrollbarAction(int action);
|
||||
virtual void horizontalScrollbarAction(int action);
|
||||
virtual void verticalScrollbarValueChanged(int value);
|
||||
virtual void horizontalScrollbarValueChanged(int value);
|
||||
virtual void closeEditor(QWidget *editor, QAbstractItemDelegate::EndEditHint hint);
|
||||
virtual void commitData(QWidget *editor);
|
||||
virtual void editorDestroyed(QObject *editor);
|
||||
|
||||
signals:
|
||||
void pressed(const QModelIndex &index);
|
||||
void clicked(const QModelIndex &index);
|
||||
void doubleClicked(const QModelIndex &index);
|
||||
void activated(const QModelIndex &index);
|
||||
void entered(const QModelIndex &index);
|
||||
void viewportEntered();
|
||||
%If (Qt_5_5_0 -)
|
||||
void iconSizeChanged(const QSize &size);
|
||||
%End
|
||||
|
||||
protected:
|
||||
enum CursorAction
|
||||
{
|
||||
MoveUp,
|
||||
MoveDown,
|
||||
MoveLeft,
|
||||
MoveRight,
|
||||
MoveHome,
|
||||
MoveEnd,
|
||||
MovePageUp,
|
||||
MovePageDown,
|
||||
MoveNext,
|
||||
MovePrevious,
|
||||
};
|
||||
|
||||
virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) = 0;
|
||||
virtual int horizontalOffset() const = 0;
|
||||
virtual int verticalOffset() const = 0;
|
||||
virtual bool isIndexHidden(const QModelIndex &index) const = 0;
|
||||
virtual void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command) = 0;
|
||||
virtual QRegion visualRegionForSelection(const QItemSelection &selection) const = 0;
|
||||
virtual QModelIndexList selectedIndexes() const;
|
||||
virtual bool edit(const QModelIndex &index, QAbstractItemView::EditTrigger trigger, QEvent *event);
|
||||
virtual QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex &index, const QEvent *event = 0) const;
|
||||
virtual void startDrag(Qt::DropActions supportedActions);
|
||||
virtual QStyleOptionViewItem viewOptions() const;
|
||||
|
||||
enum State
|
||||
{
|
||||
NoState,
|
||||
DraggingState,
|
||||
DragSelectingState,
|
||||
EditingState,
|
||||
ExpandingState,
|
||||
CollapsingState,
|
||||
AnimatingState,
|
||||
};
|
||||
|
||||
QAbstractItemView::State state() const;
|
||||
void setState(QAbstractItemView::State state);
|
||||
void scheduleDelayedItemsLayout();
|
||||
void executeDelayedItemsLayout();
|
||||
void scrollDirtyRegion(int dx, int dy);
|
||||
void setDirtyRegion(const QRegion ®ion);
|
||||
QPoint dirtyRegionOffset() const;
|
||||
virtual bool event(QEvent *event);
|
||||
virtual bool viewportEvent(QEvent *e);
|
||||
virtual void mousePressEvent(QMouseEvent *e);
|
||||
virtual void mouseMoveEvent(QMouseEvent *e);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *e);
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent *e);
|
||||
virtual void dragEnterEvent(QDragEnterEvent *e);
|
||||
virtual void dragMoveEvent(QDragMoveEvent *e);
|
||||
virtual void dragLeaveEvent(QDragLeaveEvent *e);
|
||||
virtual void dropEvent(QDropEvent *e);
|
||||
virtual void focusInEvent(QFocusEvent *e);
|
||||
virtual void focusOutEvent(QFocusEvent *e);
|
||||
virtual void keyPressEvent(QKeyEvent *e);
|
||||
virtual void resizeEvent(QResizeEvent *e);
|
||||
virtual void timerEvent(QTimerEvent *e);
|
||||
|
||||
enum DropIndicatorPosition
|
||||
{
|
||||
OnItem,
|
||||
AboveItem,
|
||||
BelowItem,
|
||||
OnViewport,
|
||||
};
|
||||
|
||||
QAbstractItemView::DropIndicatorPosition dropIndicatorPosition() const;
|
||||
|
||||
public:
|
||||
void setVerticalScrollMode(QAbstractItemView::ScrollMode mode);
|
||||
QAbstractItemView::ScrollMode verticalScrollMode() const;
|
||||
void setHorizontalScrollMode(QAbstractItemView::ScrollMode mode);
|
||||
QAbstractItemView::ScrollMode horizontalScrollMode() const;
|
||||
void setDragDropOverwriteMode(bool overwrite);
|
||||
bool dragDropOverwriteMode() const;
|
||||
void setDragDropMode(QAbstractItemView::DragDropMode behavior);
|
||||
QAbstractItemView::DragDropMode dragDropMode() const;
|
||||
void setItemDelegateForRow(int row, QAbstractItemDelegate *delegate /KeepReference/);
|
||||
QAbstractItemDelegate *itemDelegateForRow(int row) const;
|
||||
void setItemDelegateForColumn(int column, QAbstractItemDelegate *delegate /KeepReference/);
|
||||
QAbstractItemDelegate *itemDelegateForColumn(int column) const;
|
||||
QAbstractItemDelegate *itemDelegate(const QModelIndex &index) const;
|
||||
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
|
||||
void setAutoScrollMargin(int margin);
|
||||
int autoScrollMargin() const;
|
||||
|
||||
protected:
|
||||
virtual bool focusNextPrevChild(bool next);
|
||||
virtual void inputMethodEvent(QInputMethodEvent *event);
|
||||
%If (Qt_5_2_0 -)
|
||||
virtual QSize viewportSizeHint() const;
|
||||
%End
|
||||
%If (Qt_5_11_0 -)
|
||||
virtual bool eventFilter(QObject *object, QEvent *event);
|
||||
%End
|
||||
|
||||
public:
|
||||
void setDefaultDropAction(Qt::DropAction dropAction);
|
||||
Qt::DropAction defaultDropAction() const;
|
||||
%If (Qt_5_7_0 -)
|
||||
void resetVerticalScrollMode();
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
void resetHorizontalScrollMode();
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
bool isPersistentEditorOpen(const QModelIndex &index) const;
|
||||
%End
|
||||
};
|
||||
|
||||
QFlags<QAbstractItemView::EditTrigger> operator|(QAbstractItemView::EditTrigger f1, QFlags<QAbstractItemView::EditTrigger> f2);
|
||||
@@ -0,0 +1,95 @@
|
||||
// qabstractscrollarea.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QAbstractScrollArea : public QFrame
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstractscrollarea.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QAbstractScrollArea(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QAbstractScrollArea();
|
||||
Qt::ScrollBarPolicy verticalScrollBarPolicy() const;
|
||||
void setVerticalScrollBarPolicy(Qt::ScrollBarPolicy);
|
||||
QScrollBar *verticalScrollBar() const /Transfer/;
|
||||
Qt::ScrollBarPolicy horizontalScrollBarPolicy() const;
|
||||
void setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy);
|
||||
QScrollBar *horizontalScrollBar() const /Transfer/;
|
||||
QWidget *viewport() const /Transfer/;
|
||||
QSize maximumViewportSize() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
virtual QSize sizeHint() const;
|
||||
|
||||
protected:
|
||||
void setViewportMargins(int left, int top, int right, int bottom);
|
||||
void setViewportMargins(const QMargins &margins);
|
||||
%If (Qt_5_5_0 -)
|
||||
QMargins viewportMargins() const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
virtual QSize viewportSizeHint() const;
|
||||
%End
|
||||
virtual bool event(QEvent *);
|
||||
virtual bool viewportEvent(QEvent *);
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void mousePressEvent(QMouseEvent *);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *);
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent *);
|
||||
virtual void mouseMoveEvent(QMouseEvent *);
|
||||
virtual void wheelEvent(QWheelEvent *);
|
||||
virtual void contextMenuEvent(QContextMenuEvent *);
|
||||
virtual void dragEnterEvent(QDragEnterEvent *);
|
||||
virtual void dragMoveEvent(QDragMoveEvent *);
|
||||
virtual void dragLeaveEvent(QDragLeaveEvent *);
|
||||
virtual void dropEvent(QDropEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
virtual bool eventFilter(QObject *, QEvent *);
|
||||
virtual void scrollContentsBy(int dx, int dy);
|
||||
|
||||
public:
|
||||
void setVerticalScrollBar(QScrollBar *scrollbar /Transfer/);
|
||||
void setHorizontalScrollBar(QScrollBar *scrollbar /Transfer/);
|
||||
QWidget *cornerWidget() const;
|
||||
void setCornerWidget(QWidget *widget /Transfer/);
|
||||
void addScrollBarWidget(QWidget *widget /Transfer/, Qt::Alignment alignment);
|
||||
QWidgetList scrollBarWidgets(Qt::Alignment alignment) /Transfer/;
|
||||
void setViewport(QWidget *widget /Transfer/);
|
||||
virtual void setupViewport(QWidget *viewport);
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
enum SizeAdjustPolicy
|
||||
{
|
||||
AdjustIgnored,
|
||||
AdjustToContentsOnFirstShow,
|
||||
AdjustToContents,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QAbstractScrollArea::SizeAdjustPolicy sizeAdjustPolicy() const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void setSizeAdjustPolicy(QAbstractScrollArea::SizeAdjustPolicy policy);
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,98 @@
|
||||
// qabstractslider.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QAbstractSlider : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstractslider.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QAbstractSlider(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QAbstractSlider();
|
||||
Qt::Orientation orientation() const;
|
||||
void setMinimum(int);
|
||||
int minimum() const;
|
||||
void setMaximum(int);
|
||||
int maximum() const;
|
||||
void setRange(int min, int max);
|
||||
void setSingleStep(int);
|
||||
int singleStep() const;
|
||||
void setPageStep(int);
|
||||
int pageStep() const;
|
||||
void setTracking(bool enable);
|
||||
bool hasTracking() const;
|
||||
void setSliderDown(bool);
|
||||
bool isSliderDown() const;
|
||||
void setSliderPosition(int);
|
||||
int sliderPosition() const;
|
||||
void setInvertedAppearance(bool);
|
||||
bool invertedAppearance() const;
|
||||
void setInvertedControls(bool);
|
||||
bool invertedControls() const;
|
||||
|
||||
enum SliderAction
|
||||
{
|
||||
SliderNoAction,
|
||||
SliderSingleStepAdd,
|
||||
SliderSingleStepSub,
|
||||
SliderPageStepAdd,
|
||||
SliderPageStepSub,
|
||||
SliderToMinimum,
|
||||
SliderToMaximum,
|
||||
SliderMove,
|
||||
};
|
||||
|
||||
int value() const;
|
||||
void triggerAction(QAbstractSlider::SliderAction action);
|
||||
|
||||
public slots:
|
||||
void setValue(int);
|
||||
void setOrientation(Qt::Orientation);
|
||||
|
||||
signals:
|
||||
void valueChanged(int value);
|
||||
void sliderPressed();
|
||||
void sliderMoved(int position);
|
||||
void sliderReleased();
|
||||
void rangeChanged(int min, int max);
|
||||
void actionTriggered(int action);
|
||||
|
||||
protected:
|
||||
void setRepeatAction(QAbstractSlider::SliderAction action, int thresholdTime = 500, int repeatTime = 50);
|
||||
QAbstractSlider::SliderAction repeatAction() const;
|
||||
|
||||
enum SliderChange
|
||||
{
|
||||
SliderRangeChange,
|
||||
SliderOrientationChange,
|
||||
SliderStepsChange,
|
||||
SliderValueChange,
|
||||
};
|
||||
|
||||
virtual void sliderChange(QAbstractSlider::SliderChange change);
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void keyPressEvent(QKeyEvent *ev);
|
||||
virtual void timerEvent(QTimerEvent *);
|
||||
virtual void wheelEvent(QWheelEvent *e);
|
||||
virtual void changeEvent(QEvent *e);
|
||||
};
|
||||
@@ -0,0 +1,133 @@
|
||||
// qabstractspinbox.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QAbstractSpinBox : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qabstractspinbox.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QAbstractSpinBox(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QAbstractSpinBox();
|
||||
|
||||
enum StepEnabledFlag
|
||||
{
|
||||
StepNone,
|
||||
StepUpEnabled,
|
||||
StepDownEnabled,
|
||||
};
|
||||
|
||||
typedef QFlags<QAbstractSpinBox::StepEnabledFlag> StepEnabled;
|
||||
|
||||
enum ButtonSymbols
|
||||
{
|
||||
UpDownArrows,
|
||||
PlusMinus,
|
||||
NoButtons,
|
||||
};
|
||||
|
||||
QAbstractSpinBox::ButtonSymbols buttonSymbols() const;
|
||||
void setButtonSymbols(QAbstractSpinBox::ButtonSymbols bs);
|
||||
QString text() const;
|
||||
QString specialValueText() const;
|
||||
void setSpecialValueText(const QString &s);
|
||||
bool wrapping() const;
|
||||
void setWrapping(bool w);
|
||||
void setReadOnly(bool r);
|
||||
bool isReadOnly() const;
|
||||
void setAlignment(Qt::Alignment flag);
|
||||
Qt::Alignment alignment() const;
|
||||
void setFrame(bool);
|
||||
bool hasFrame() const;
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
void interpretText();
|
||||
virtual bool event(QEvent *event);
|
||||
virtual QValidator::State validate(QString &input /In,Out/, int &pos /In,Out/) const;
|
||||
virtual void fixup(QString &input /In,Out/) const;
|
||||
virtual void stepBy(int steps);
|
||||
|
||||
public slots:
|
||||
void stepUp();
|
||||
void stepDown();
|
||||
void selectAll();
|
||||
virtual void clear();
|
||||
|
||||
signals:
|
||||
void editingFinished();
|
||||
|
||||
protected:
|
||||
virtual void resizeEvent(QResizeEvent *e);
|
||||
virtual void keyPressEvent(QKeyEvent *e);
|
||||
virtual void keyReleaseEvent(QKeyEvent *e);
|
||||
virtual void wheelEvent(QWheelEvent *e);
|
||||
virtual void focusInEvent(QFocusEvent *e);
|
||||
virtual void focusOutEvent(QFocusEvent *e);
|
||||
virtual void contextMenuEvent(QContextMenuEvent *e);
|
||||
virtual void changeEvent(QEvent *e);
|
||||
virtual void closeEvent(QCloseEvent *e);
|
||||
virtual void hideEvent(QHideEvent *e);
|
||||
virtual void mousePressEvent(QMouseEvent *e);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *e);
|
||||
virtual void mouseMoveEvent(QMouseEvent *e);
|
||||
virtual void timerEvent(QTimerEvent *e);
|
||||
virtual void paintEvent(QPaintEvent *e);
|
||||
virtual void showEvent(QShowEvent *e);
|
||||
QLineEdit *lineEdit() const;
|
||||
void setLineEdit(QLineEdit *e /Transfer/);
|
||||
virtual QAbstractSpinBox::StepEnabled stepEnabled() const;
|
||||
void initStyleOption(QStyleOptionSpinBox *option) const;
|
||||
|
||||
public:
|
||||
enum CorrectionMode
|
||||
{
|
||||
CorrectToPreviousValue,
|
||||
CorrectToNearestValue,
|
||||
};
|
||||
|
||||
void setCorrectionMode(QAbstractSpinBox::CorrectionMode cm);
|
||||
QAbstractSpinBox::CorrectionMode correctionMode() const;
|
||||
bool hasAcceptableInput() const;
|
||||
void setAccelerated(bool on);
|
||||
bool isAccelerated() const;
|
||||
void setKeyboardTracking(bool kt);
|
||||
bool keyboardTracking() const;
|
||||
virtual QVariant inputMethodQuery(Qt::InputMethodQuery) const;
|
||||
%If (Qt_5_3_0 -)
|
||||
void setGroupSeparatorShown(bool shown);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
bool isGroupSeparatorShown() const;
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
|
||||
enum StepType
|
||||
{
|
||||
DefaultStepType,
|
||||
AdaptiveDecimalStepType,
|
||||
};
|
||||
|
||||
%End
|
||||
};
|
||||
|
||||
QFlags<QAbstractSpinBox::StepEnabledFlag> operator|(QAbstractSpinBox::StepEnabledFlag f1, QFlags<QAbstractSpinBox::StepEnabledFlag> f2);
|
||||
@@ -0,0 +1,148 @@
|
||||
// qaction.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QAction : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qaction.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_5_7_0 -)
|
||||
explicit QAction(QObject *parent /TransferThis/ = 0);
|
||||
%End
|
||||
%If (- Qt_5_7_0)
|
||||
explicit QAction(QObject *parent /TransferThis/);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
QAction(const QString &text, QObject *parent /TransferThis/ = 0);
|
||||
%End
|
||||
%If (- Qt_5_7_0)
|
||||
QAction(const QString &text, QObject *parent /TransferThis/);
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
QAction(const QIcon &icon, const QString &text, QObject *parent /TransferThis/ = 0);
|
||||
%End
|
||||
%If (- Qt_5_7_0)
|
||||
QAction(const QIcon &icon, const QString &text, QObject *parent /TransferThis/);
|
||||
%End
|
||||
virtual ~QAction();
|
||||
void setActionGroup(QActionGroup *group /KeepReference/);
|
||||
QActionGroup *actionGroup() const;
|
||||
void setIcon(const QIcon &icon);
|
||||
QIcon icon() const;
|
||||
void setText(const QString &text);
|
||||
QString text() const;
|
||||
void setIconText(const QString &text);
|
||||
QString iconText() const;
|
||||
void setToolTip(const QString &tip);
|
||||
QString toolTip() const;
|
||||
void setStatusTip(const QString &statusTip);
|
||||
QString statusTip() const;
|
||||
void setWhatsThis(const QString &what);
|
||||
QString whatsThis() const;
|
||||
QMenu *menu() const;
|
||||
void setMenu(QMenu *menu /KeepReference/);
|
||||
void setSeparator(bool b);
|
||||
bool isSeparator() const;
|
||||
void setShortcut(const QKeySequence &shortcut);
|
||||
QKeySequence shortcut() const;
|
||||
void setShortcutContext(Qt::ShortcutContext context);
|
||||
Qt::ShortcutContext shortcutContext() const;
|
||||
void setFont(const QFont &font);
|
||||
QFont font() const;
|
||||
void setCheckable(bool);
|
||||
bool isCheckable() const;
|
||||
QVariant data() const;
|
||||
void setData(const QVariant &var);
|
||||
bool isChecked() const;
|
||||
bool isEnabled() const;
|
||||
bool isVisible() const;
|
||||
|
||||
enum ActionEvent
|
||||
{
|
||||
Trigger,
|
||||
Hover,
|
||||
};
|
||||
|
||||
void activate(QAction::ActionEvent event);
|
||||
bool showStatusText(QWidget *widget = 0);
|
||||
QWidget *parentWidget() const;
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *);
|
||||
|
||||
public slots:
|
||||
void trigger();
|
||||
void hover();
|
||||
void setChecked(bool);
|
||||
void toggle();
|
||||
void setEnabled(bool);
|
||||
void setDisabled(bool b);
|
||||
void setVisible(bool);
|
||||
|
||||
signals:
|
||||
void changed();
|
||||
void triggered(bool checked = false);
|
||||
void hovered();
|
||||
void toggled(bool);
|
||||
|
||||
public:
|
||||
enum MenuRole
|
||||
{
|
||||
NoRole,
|
||||
TextHeuristicRole,
|
||||
ApplicationSpecificRole,
|
||||
AboutQtRole,
|
||||
AboutRole,
|
||||
PreferencesRole,
|
||||
QuitRole,
|
||||
};
|
||||
|
||||
void setShortcuts(const QList<QKeySequence> &shortcuts);
|
||||
void setShortcuts(QKeySequence::StandardKey);
|
||||
QList<QKeySequence> shortcuts() const;
|
||||
void setAutoRepeat(bool);
|
||||
bool autoRepeat() const;
|
||||
void setMenuRole(QAction::MenuRole menuRole);
|
||||
QAction::MenuRole menuRole() const;
|
||||
QList<QWidget *> associatedWidgets() const;
|
||||
QList<QGraphicsWidget *> associatedGraphicsWidgets() const;
|
||||
void setIconVisibleInMenu(bool visible);
|
||||
bool isIconVisibleInMenu() const;
|
||||
|
||||
enum Priority
|
||||
{
|
||||
LowPriority,
|
||||
NormalPriority,
|
||||
HighPriority,
|
||||
};
|
||||
|
||||
void setPriority(QAction::Priority priority);
|
||||
QAction::Priority priority() const;
|
||||
%If (Qt_5_10_0 -)
|
||||
void setShortcutVisibleInContextMenu(bool show);
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
bool isShortcutVisibleInContextMenu() const;
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,74 @@
|
||||
// qactiongroup.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QActionGroup : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qactiongroup.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QActionGroup(QObject *parent /TransferThis/);
|
||||
virtual ~QActionGroup();
|
||||
QAction *addAction(QAction *a /Transfer/);
|
||||
QAction *addAction(const QString &text) /Transfer/;
|
||||
QAction *addAction(const QIcon &icon, const QString &text) /Transfer/;
|
||||
void removeAction(QAction *a /TransferBack/);
|
||||
QList<QAction *> actions() const;
|
||||
QAction *checkedAction() const;
|
||||
bool isExclusive() const;
|
||||
bool isEnabled() const;
|
||||
bool isVisible() const;
|
||||
|
||||
public slots:
|
||||
void setEnabled(bool);
|
||||
void setDisabled(bool b);
|
||||
void setVisible(bool);
|
||||
void setExclusive(bool);
|
||||
|
||||
signals:
|
||||
void triggered(QAction *);
|
||||
void hovered(QAction *);
|
||||
|
||||
public:
|
||||
%If (Qt_5_14_0 -)
|
||||
|
||||
enum class ExclusionPolicy
|
||||
{
|
||||
None /PyName=None_/,
|
||||
Exclusive,
|
||||
ExclusiveOptional,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
QActionGroup::ExclusionPolicy exclusionPolicy() const;
|
||||
%End
|
||||
|
||||
public slots:
|
||||
%If (Qt_5_14_0 -)
|
||||
void setExclusionPolicy(QActionGroup::ExclusionPolicy policy);
|
||||
%End
|
||||
|
||||
private:
|
||||
QActionGroup(const QActionGroup &);
|
||||
};
|
||||
@@ -0,0 +1,361 @@
|
||||
// qapplication.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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.
|
||||
|
||||
|
||||
// QApplication *qApp
|
||||
QApplication *qApp {
|
||||
%AccessCode
|
||||
// Qt implements this has a #define to a function call so we have to handle
|
||||
// it like this.
|
||||
return qApp;
|
||||
%End
|
||||
};
|
||||
typedef QList<QWidget *> QWidgetList;
|
||||
|
||||
class QApplication : public QGuiApplication
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qapplication.h>
|
||||
%End
|
||||
|
||||
%ConvertToSubClassCode
|
||||
static struct class_graph {
|
||||
const char *name;
|
||||
sipTypeDef **type;
|
||||
int yes, no;
|
||||
} graph[] = {
|
||||
{sipName_QKeyEventTransition, &sipType_QKeyEventTransition, -1, 1},
|
||||
{sipName_QUndoStack, &sipType_QUndoStack, -1, 2},
|
||||
{sipName_QAbstractItemDelegate, &sipType_QAbstractItemDelegate, 26, 3},
|
||||
{sipName_QGraphicsTransform, &sipType_QGraphicsTransform, 28, 4},
|
||||
{sipName_QCompleter, &sipType_QCompleter, -1, 5},
|
||||
{sipName_QActionGroup, &sipType_QActionGroup, -1, 6},
|
||||
{sipName_QShortcut, &sipType_QShortcut, -1, 7},
|
||||
{sipName_QButtonGroup, &sipType_QButtonGroup, -1, 8},
|
||||
{sipName_QPlainTextDocumentLayout, &sipType_QPlainTextDocumentLayout, -1, 9},
|
||||
{sipName_QGraphicsAnchor, &sipType_QGraphicsAnchor, -1, 10},
|
||||
{sipName_QFileSystemModel, &sipType_QFileSystemModel, -1, 11},
|
||||
{sipName_QGesture, &sipType_QGesture, 30, 12},
|
||||
{sipName_QApplication, &sipType_QApplication, -1, 13},
|
||||
{sipName_QLayout, &sipType_QLayout, 35, 14},
|
||||
{sipName_QDirModel, &sipType_QDirModel, -1, 15},
|
||||
{sipName_QDataWidgetMapper, &sipType_QDataWidgetMapper, -1, 16},
|
||||
{sipName_QGraphicsObject, &sipType_QGraphicsObject, 41, 17},
|
||||
{sipName_QScroller, &sipType_QScroller, -1, 18},
|
||||
{sipName_QGraphicsScene, &sipType_QGraphicsScene, -1, 19},
|
||||
{sipName_QUndoGroup, &sipType_QUndoGroup, -1, 20},
|
||||
{sipName_QMouseEventTransition, &sipType_QMouseEventTransition, -1, 21},
|
||||
{sipName_QGraphicsEffect, &sipType_QGraphicsEffect, 44, 22},
|
||||
{sipName_QWidget, &sipType_QWidget, 48, 23},
|
||||
{sipName_QStyle, &sipType_QStyle, 122, 24},
|
||||
{sipName_QAction, &sipType_QAction, 124, 25},
|
||||
{sipName_QSystemTrayIcon, &sipType_QSystemTrayIcon, -1, -1},
|
||||
{sipName_QStyledItemDelegate, &sipType_QStyledItemDelegate, -1, 27},
|
||||
{sipName_QItemDelegate, &sipType_QItemDelegate, -1, -1},
|
||||
{sipName_QGraphicsRotation, &sipType_QGraphicsRotation, -1, 29},
|
||||
{sipName_QGraphicsScale, &sipType_QGraphicsScale, -1, -1},
|
||||
{sipName_QSwipeGesture, &sipType_QSwipeGesture, -1, 31},
|
||||
{sipName_QTapGesture, &sipType_QTapGesture, -1, 32},
|
||||
{sipName_QPanGesture, &sipType_QPanGesture, -1, 33},
|
||||
{sipName_QPinchGesture, &sipType_QPinchGesture, -1, 34},
|
||||
{sipName_QTapAndHoldGesture, &sipType_QTapAndHoldGesture, -1, -1},
|
||||
{sipName_QStackedLayout, &sipType_QStackedLayout, -1, 36},
|
||||
{sipName_QFormLayout, &sipType_QFormLayout, -1, 37},
|
||||
{sipName_QBoxLayout, &sipType_QBoxLayout, 39, 38},
|
||||
{sipName_QGridLayout, &sipType_QGridLayout, -1, -1},
|
||||
{sipName_QVBoxLayout, &sipType_QVBoxLayout, -1, 40},
|
||||
{sipName_QHBoxLayout, &sipType_QHBoxLayout, -1, -1},
|
||||
{sipName_QGraphicsWidget, &sipType_QGraphicsWidget, 43, 42},
|
||||
{sipName_QGraphicsTextItem, &sipType_QGraphicsTextItem, -1, -1},
|
||||
{sipName_QGraphicsProxyWidget, &sipType_QGraphicsProxyWidget, -1, -1},
|
||||
{sipName_QGraphicsBlurEffect, &sipType_QGraphicsBlurEffect, -1, 45},
|
||||
{sipName_QGraphicsColorizeEffect, &sipType_QGraphicsColorizeEffect, -1, 46},
|
||||
{sipName_QGraphicsDropShadowEffect, &sipType_QGraphicsDropShadowEffect, -1, 47},
|
||||
{sipName_QGraphicsOpacityEffect, &sipType_QGraphicsOpacityEffect, -1, -1},
|
||||
{sipName_QDockWidget, &sipType_QDockWidget, -1, 49},
|
||||
{sipName_QProgressBar, &sipType_QProgressBar, -1, 50},
|
||||
#if QT_VERSION >= 0x050400 && defined(SIP_FEATURE_PyQt_OpenGL)
|
||||
{sipName_QOpenGLWidget, &sipType_QOpenGLWidget, -1, 51},
|
||||
#else
|
||||
{0, 0, -1, 51},
|
||||
#endif
|
||||
{sipName_QAbstractButton, &sipType_QAbstractButton, 78, 52},
|
||||
{sipName_QSplashScreen, &sipType_QSplashScreen, -1, 53},
|
||||
{sipName_QMenuBar, &sipType_QMenuBar, -1, 54},
|
||||
{sipName_QStatusBar, &sipType_QStatusBar, -1, 55},
|
||||
{sipName_QMenu, &sipType_QMenu, -1, 56},
|
||||
{sipName_QMdiSubWindow, &sipType_QMdiSubWindow, -1, 57},
|
||||
{sipName_QTabWidget, &sipType_QTabWidget, -1, 58},
|
||||
#if defined(Q_OS_MAC) && defined(SIP_FEATURE_PyQt_MacOSXOnly)
|
||||
{sipName_QMacCocoaViewContainer, &sipType_QMacCocoaViewContainer, -1, 59},
|
||||
#else
|
||||
{0, 0, -1, 59},
|
||||
#endif
|
||||
{sipName_QLineEdit, &sipType_QLineEdit, -1, 60},
|
||||
{sipName_QFrame, &sipType_QFrame, 83, 61},
|
||||
{sipName_QComboBox, &sipType_QComboBox, 105, 62},
|
||||
{sipName_QRubberBand, &sipType_QRubberBand, -1, 63},
|
||||
{sipName_QAbstractSpinBox, &sipType_QAbstractSpinBox, 106, 64},
|
||||
{sipName_QDialog, &sipType_QDialog, 111, 65},
|
||||
#if QT_VERSION >= 0x050200
|
||||
{sipName_QKeySequenceEdit, &sipType_QKeySequenceEdit, -1, 66},
|
||||
#else
|
||||
{0, 0, -1, 66},
|
||||
#endif
|
||||
{sipName_QAbstractSlider, &sipType_QAbstractSlider, 119, 67},
|
||||
{sipName_QWizardPage, &sipType_QWizardPage, -1, 68},
|
||||
{sipName_QDesktopWidget, &sipType_QDesktopWidget, -1, 69},
|
||||
{sipName_QDialogButtonBox, &sipType_QDialogButtonBox, -1, 70},
|
||||
{sipName_QToolBar, &sipType_QToolBar, -1, 71},
|
||||
{sipName_QSizeGrip, &sipType_QSizeGrip, -1, 72},
|
||||
{sipName_QSplitterHandle, &sipType_QSplitterHandle, -1, 73},
|
||||
{sipName_QTabBar, &sipType_QTabBar, -1, 74},
|
||||
{sipName_QGroupBox, &sipType_QGroupBox, -1, 75},
|
||||
{sipName_QMainWindow, &sipType_QMainWindow, -1, 76},
|
||||
{sipName_QCalendarWidget, &sipType_QCalendarWidget, -1, 77},
|
||||
{sipName_QFocusFrame, &sipType_QFocusFrame, -1, -1},
|
||||
{sipName_QCheckBox, &sipType_QCheckBox, -1, 79},
|
||||
{sipName_QRadioButton, &sipType_QRadioButton, -1, 80},
|
||||
{sipName_QPushButton, &sipType_QPushButton, 82, 81},
|
||||
{sipName_QToolButton, &sipType_QToolButton, -1, -1},
|
||||
{sipName_QCommandLinkButton, &sipType_QCommandLinkButton, -1, -1},
|
||||
{sipName_QAbstractScrollArea, &sipType_QAbstractScrollArea, 89, 84},
|
||||
{sipName_QToolBox, &sipType_QToolBox, -1, 85},
|
||||
{sipName_QSplitter, &sipType_QSplitter, -1, 86},
|
||||
{sipName_QStackedWidget, &sipType_QStackedWidget, -1, 87},
|
||||
{sipName_QLabel, &sipType_QLabel, -1, 88},
|
||||
{sipName_QLCDNumber, &sipType_QLCDNumber, -1, -1},
|
||||
{sipName_QScrollArea, &sipType_QScrollArea, -1, 90},
|
||||
{sipName_QPlainTextEdit, &sipType_QPlainTextEdit, -1, 91},
|
||||
{sipName_QGraphicsView, &sipType_QGraphicsView, -1, 92},
|
||||
{sipName_QAbstractItemView, &sipType_QAbstractItemView, 95, 93},
|
||||
{sipName_QTextEdit, &sipType_QTextEdit, 104, 94},
|
||||
{sipName_QMdiArea, &sipType_QMdiArea, -1, -1},
|
||||
{sipName_QHeaderView, &sipType_QHeaderView, -1, 96},
|
||||
{sipName_QTableView, &sipType_QTableView, 100, 97},
|
||||
{sipName_QListView, &sipType_QListView, 101, 98},
|
||||
{sipName_QTreeView, &sipType_QTreeView, 103, 99},
|
||||
{sipName_QColumnView, &sipType_QColumnView, -1, -1},
|
||||
{sipName_QTableWidget, &sipType_QTableWidget, -1, -1},
|
||||
{sipName_QListWidget, &sipType_QListWidget, -1, 102},
|
||||
{sipName_QUndoView, &sipType_QUndoView, -1, -1},
|
||||
{sipName_QTreeWidget, &sipType_QTreeWidget, -1, -1},
|
||||
{sipName_QTextBrowser, &sipType_QTextBrowser, -1, -1},
|
||||
{sipName_QFontComboBox, &sipType_QFontComboBox, -1, -1},
|
||||
{sipName_QDateTimeEdit, &sipType_QDateTimeEdit, 109, 107},
|
||||
{sipName_QSpinBox, &sipType_QSpinBox, -1, 108},
|
||||
{sipName_QDoubleSpinBox, &sipType_QDoubleSpinBox, -1, -1},
|
||||
{sipName_QDateEdit, &sipType_QDateEdit, -1, 110},
|
||||
{sipName_QTimeEdit, &sipType_QTimeEdit, -1, -1},
|
||||
{sipName_QFontDialog, &sipType_QFontDialog, -1, 112},
|
||||
{sipName_QErrorMessage, &sipType_QErrorMessage, -1, 113},
|
||||
{sipName_QMessageBox, &sipType_QMessageBox, -1, 114},
|
||||
{sipName_QProgressDialog, &sipType_QProgressDialog, -1, 115},
|
||||
{sipName_QColorDialog, &sipType_QColorDialog, -1, 116},
|
||||
{sipName_QFileDialog, &sipType_QFileDialog, -1, 117},
|
||||
{sipName_QInputDialog, &sipType_QInputDialog, -1, 118},
|
||||
{sipName_QWizard, &sipType_QWizard, -1, -1},
|
||||
{sipName_QDial, &sipType_QDial, -1, 120},
|
||||
{sipName_QScrollBar, &sipType_QScrollBar, -1, 121},
|
||||
{sipName_QSlider, &sipType_QSlider, -1, -1},
|
||||
{sipName_QCommonStyle, &sipType_QCommonStyle, 123, -1},
|
||||
{sipName_QProxyStyle, &sipType_QProxyStyle, -1, -1},
|
||||
{sipName_QWidgetAction, &sipType_QWidgetAction, -1, -1},
|
||||
};
|
||||
|
||||
int i = 0;
|
||||
|
||||
sipType = NULL;
|
||||
|
||||
do
|
||||
{
|
||||
struct class_graph *cg = &graph[i];
|
||||
|
||||
if (cg->name != NULL && sipCpp->inherits(cg->name))
|
||||
{
|
||||
sipType = *cg->type;
|
||||
i = cg->yes;
|
||||
}
|
||||
else
|
||||
i = cg->no;
|
||||
}
|
||||
while (i >= 0);
|
||||
%End
|
||||
|
||||
public:
|
||||
QApplication(SIP_PYLIST argv /TypeHint="List[str]"/) /PostHook=__pyQtQAppHook__/ [(int &argc, char **argv, int = ApplicationFlags)];
|
||||
%MethodCode
|
||||
// The Python interface is a list of argument strings that is modified.
|
||||
|
||||
int argc;
|
||||
char **argv;
|
||||
|
||||
// Convert the list.
|
||||
if ((argv = pyqt5_qtwidgets_from_argv_list(a0, argc)) == NULL)
|
||||
sipIsErr = 1;
|
||||
else
|
||||
{
|
||||
// Create it now the arguments are right.
|
||||
static int nargc;
|
||||
nargc = argc;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp = new sipQApplication(nargc, argv, QCoreApplication::ApplicationFlags);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
// Now modify the original list.
|
||||
pyqt5_qtwidgets_update_argv_list(a0, argc, argv);
|
||||
}
|
||||
%End
|
||||
|
||||
virtual ~QApplication() /ReleaseGIL/;
|
||||
%MethodCode
|
||||
pyqt5_qtwidgets_cleanup_qobjects();
|
||||
%End
|
||||
|
||||
static QStyle *style();
|
||||
static void setStyle(QStyle * /Transfer/);
|
||||
static QStyle *setStyle(const QString &);
|
||||
|
||||
enum ColorSpec
|
||||
{
|
||||
NormalColor,
|
||||
CustomColor,
|
||||
ManyColor,
|
||||
};
|
||||
|
||||
static int colorSpec();
|
||||
static void setColorSpec(int);
|
||||
static QPalette palette();
|
||||
static QPalette palette(const QWidget *);
|
||||
static QPalette palette(const char *className);
|
||||
static void setPalette(const QPalette &, const char *className = 0);
|
||||
static QFont font();
|
||||
static QFont font(const QWidget *);
|
||||
static QFont font(const char *className);
|
||||
static void setFont(const QFont &, const char *className = 0);
|
||||
static QFontMetrics fontMetrics();
|
||||
static void setWindowIcon(const QIcon &icon);
|
||||
static QIcon windowIcon();
|
||||
static QWidgetList allWidgets();
|
||||
static QWidgetList topLevelWidgets();
|
||||
static QDesktopWidget *desktop();
|
||||
static QWidget *activePopupWidget();
|
||||
static QWidget *activeModalWidget();
|
||||
static QWidget *focusWidget();
|
||||
static QWidget *activeWindow();
|
||||
static void setActiveWindow(QWidget *act);
|
||||
static QWidget *widgetAt(const QPoint &p);
|
||||
static QWidget *widgetAt(int x, int y);
|
||||
static QWidget *topLevelAt(const QPoint &p);
|
||||
static QWidget *topLevelAt(int x, int y);
|
||||
static void beep();
|
||||
static void alert(QWidget *widget, int msecs = 0) /ReleaseGIL/;
|
||||
static void setCursorFlashTime(int);
|
||||
static int cursorFlashTime();
|
||||
static void setDoubleClickInterval(int);
|
||||
static int doubleClickInterval();
|
||||
static void setKeyboardInputInterval(int);
|
||||
static int keyboardInputInterval();
|
||||
static void setWheelScrollLines(int);
|
||||
static int wheelScrollLines();
|
||||
static void setGlobalStrut(const QSize &);
|
||||
static QSize globalStrut();
|
||||
static void setStartDragTime(int ms);
|
||||
static int startDragTime();
|
||||
static void setStartDragDistance(int l);
|
||||
static int startDragDistance();
|
||||
static bool isEffectEnabled(Qt::UIEffect);
|
||||
static void setEffectEnabled(Qt::UIEffect, bool enabled = true);
|
||||
static int exec() /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,PyName=exec_,ReleaseGIL/;
|
||||
%If (Py_v3)
|
||||
static int exec() /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,ReleaseGIL/;
|
||||
%End
|
||||
virtual bool notify(QObject *, QEvent *) /ReleaseGIL/;
|
||||
bool autoSipEnabled() const;
|
||||
QString styleSheet() const;
|
||||
|
||||
signals:
|
||||
void focusChanged(QWidget *old, QWidget *now);
|
||||
|
||||
public slots:
|
||||
static void aboutQt();
|
||||
static void closeAllWindows();
|
||||
void setAutoSipEnabled(const bool enabled);
|
||||
void setStyleSheet(const QString &sheet);
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *);
|
||||
};
|
||||
|
||||
%ModuleHeaderCode
|
||||
// Imports from QtCore.
|
||||
typedef void (*pyqt5_qtwidgets_cleanup_qobjects_t)();
|
||||
extern pyqt5_qtwidgets_cleanup_qobjects_t pyqt5_qtwidgets_cleanup_qobjects;
|
||||
|
||||
typedef char **(*pyqt5_qtwidgets_from_argv_list_t)(PyObject *, int &);
|
||||
extern pyqt5_qtwidgets_from_argv_list_t pyqt5_qtwidgets_from_argv_list;
|
||||
|
||||
typedef sipErrorState (*pyqt5_qtwidgets_get_connection_parts_t)(PyObject *, QObject *, const char *, bool, QObject **, QByteArray &);
|
||||
extern pyqt5_qtwidgets_get_connection_parts_t pyqt5_qtwidgets_get_connection_parts;
|
||||
|
||||
typedef sipErrorState (*pyqt5_qtwidgets_get_signal_signature_t)(PyObject *, QObject *, QByteArray &);
|
||||
extern pyqt5_qtwidgets_get_signal_signature_t pyqt5_qtwidgets_get_signal_signature;
|
||||
|
||||
typedef void (*pyqt5_qtwidgets_update_argv_list_t)(PyObject *, int, char **);
|
||||
extern pyqt5_qtwidgets_update_argv_list_t pyqt5_qtwidgets_update_argv_list;
|
||||
|
||||
// This is needed for Qt v5.0.0.
|
||||
#if defined(B0)
|
||||
#undef B0
|
||||
#endif
|
||||
%End
|
||||
|
||||
%ModuleCode
|
||||
#include "qpywidgets_api.h"
|
||||
|
||||
// Imports from QtCore.
|
||||
pyqt5_qtwidgets_cleanup_qobjects_t pyqt5_qtwidgets_cleanup_qobjects;
|
||||
pyqt5_qtwidgets_from_argv_list_t pyqt5_qtwidgets_from_argv_list;
|
||||
pyqt5_qtwidgets_get_connection_parts_t pyqt5_qtwidgets_get_connection_parts;
|
||||
pyqt5_qtwidgets_get_signal_signature_t pyqt5_qtwidgets_get_signal_signature;
|
||||
pyqt5_qtwidgets_update_argv_list_t pyqt5_qtwidgets_update_argv_list;
|
||||
%End
|
||||
|
||||
%PostInitialisationCode
|
||||
// Imports from QtCore.
|
||||
pyqt5_qtwidgets_cleanup_qobjects = (pyqt5_qtwidgets_cleanup_qobjects_t)sipImportSymbol("pyqt5_cleanup_qobjects");
|
||||
Q_ASSERT(pyqt5_qtwidgets_cleanup_qobjects);
|
||||
|
||||
pyqt5_qtwidgets_from_argv_list = (pyqt5_qtwidgets_from_argv_list_t)sipImportSymbol("pyqt5_from_argv_list");
|
||||
Q_ASSERT(pyqt5_qtwidgets_from_argv_list);
|
||||
|
||||
pyqt5_qtwidgets_get_connection_parts = (pyqt5_qtwidgets_get_connection_parts_t)sipImportSymbol("pyqt5_get_connection_parts");
|
||||
Q_ASSERT(pyqt5_qtwidgets_get_connection_parts);
|
||||
|
||||
pyqt5_qtwidgets_get_signal_signature = (pyqt5_qtwidgets_get_signal_signature_t)sipImportSymbol("pyqt5_get_signal_signature");
|
||||
Q_ASSERT(pyqt5_qtwidgets_get_signal_signature);
|
||||
|
||||
pyqt5_qtwidgets_update_argv_list = (pyqt5_qtwidgets_update_argv_list_t)sipImportSymbol("pyqt5_update_argv_list");
|
||||
Q_ASSERT(pyqt5_qtwidgets_update_argv_list);
|
||||
|
||||
qpywidgets_post_init();
|
||||
%End
|
||||
@@ -0,0 +1,145 @@
|
||||
// qboxlayout.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QBoxLayout : public QLayout
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qboxlayout.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Direction
|
||||
{
|
||||
LeftToRight,
|
||||
RightToLeft,
|
||||
TopToBottom,
|
||||
BottomToTop,
|
||||
Down,
|
||||
Up,
|
||||
};
|
||||
|
||||
QBoxLayout(QBoxLayout::Direction direction, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QBoxLayout();
|
||||
QBoxLayout::Direction direction() const;
|
||||
void setDirection(QBoxLayout::Direction);
|
||||
void addSpacing(int size);
|
||||
void addStretch(int stretch = 0);
|
||||
void addWidget(QWidget * /GetWrapper/, int stretch = 0, Qt::Alignment alignment = Qt::Alignment());
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->addWidget(a0, a1, *a2);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
// The layout's parent widget (if there is one) will now have ownership.
|
||||
QWidget *parent = sipCpp->parentWidget();
|
||||
|
||||
if (parent)
|
||||
{
|
||||
PyObject *py_parent = sipGetPyObject(parent, sipType_QWidget);
|
||||
|
||||
if (py_parent)
|
||||
sipTransferTo(a0Wrapper, py_parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For now give the Python ownership to the layout. This maintains
|
||||
// compatibility with previous versions and allows addWidget(QWidget()).
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
}
|
||||
%End
|
||||
|
||||
void addLayout(QLayout *layout /Transfer/, int stretch = 0);
|
||||
void addStrut(int);
|
||||
virtual void addItem(QLayoutItem * /Transfer/);
|
||||
void insertSpacing(int index, int size);
|
||||
void insertStretch(int index, int stretch = 0);
|
||||
void insertWidget(int index, QWidget *widget /GetWrapper/, int stretch = 0, Qt::Alignment alignment = Qt::Alignment());
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->insertWidget(a0, a1, a2, *a3);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
// The layout's parent widget (if there is one) will now have ownership.
|
||||
QWidget *parent = sipCpp->parentWidget();
|
||||
|
||||
if (parent)
|
||||
{
|
||||
PyObject *py_parent = sipGetPyObject(parent, sipType_QWidget);
|
||||
|
||||
if (py_parent)
|
||||
sipTransferTo(a1Wrapper, py_parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For now give the Python ownership to the layout. This maintains
|
||||
// compatibility with previous versions and allows insertWidget(QWidget()).
|
||||
sipTransferTo(a1Wrapper, sipSelf);
|
||||
}
|
||||
%End
|
||||
|
||||
void insertLayout(int index, QLayout *layout /Transfer/, int stretch = 0);
|
||||
bool setStretchFactor(QWidget *w, int stretch);
|
||||
bool setStretchFactor(QLayout *l, int stretch);
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSize() const;
|
||||
virtual QSize maximumSize() const;
|
||||
virtual bool hasHeightForWidth() const;
|
||||
virtual int heightForWidth(int) const;
|
||||
virtual int minimumHeightForWidth(int) const;
|
||||
virtual Qt::Orientations expandingDirections() const;
|
||||
virtual void invalidate();
|
||||
virtual QLayoutItem *itemAt(int) const;
|
||||
virtual QLayoutItem *takeAt(int) /TransferBack/;
|
||||
virtual int count() const;
|
||||
virtual void setGeometry(const QRect &);
|
||||
int spacing() const;
|
||||
void setSpacing(int spacing);
|
||||
void addSpacerItem(QSpacerItem *spacerItem /Transfer/);
|
||||
void insertSpacerItem(int index, QSpacerItem *spacerItem /Transfer/);
|
||||
void setStretch(int index, int stretch);
|
||||
int stretch(int index) const;
|
||||
void insertItem(int index, QLayoutItem * /Transfer/);
|
||||
};
|
||||
|
||||
class QHBoxLayout : public QBoxLayout
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qboxlayout.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QHBoxLayout();
|
||||
explicit QHBoxLayout(QWidget *parent /TransferThis/);
|
||||
virtual ~QHBoxLayout();
|
||||
};
|
||||
|
||||
class QVBoxLayout : public QBoxLayout
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qboxlayout.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QVBoxLayout();
|
||||
explicit QVBoxLayout(QWidget *parent /TransferThis/);
|
||||
virtual ~QVBoxLayout();
|
||||
};
|
||||
@@ -0,0 +1,68 @@
|
||||
// qbuttongroup.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QButtonGroup : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qbuttongroup.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QButtonGroup(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QButtonGroup();
|
||||
void setExclusive(bool);
|
||||
bool exclusive() const;
|
||||
void addButton(QAbstractButton *, int id = -1);
|
||||
void removeButton(QAbstractButton *);
|
||||
QList<QAbstractButton *> buttons() const;
|
||||
QAbstractButton *button(int id) const;
|
||||
QAbstractButton *checkedButton() const;
|
||||
void setId(QAbstractButton *button, int id);
|
||||
int id(QAbstractButton *button) const;
|
||||
int checkedId() const;
|
||||
|
||||
signals:
|
||||
void buttonClicked(QAbstractButton *);
|
||||
void buttonClicked(int);
|
||||
void buttonPressed(QAbstractButton *);
|
||||
void buttonPressed(int);
|
||||
void buttonReleased(QAbstractButton *);
|
||||
void buttonReleased(int);
|
||||
%If (Qt_5_2_0 -)
|
||||
void buttonToggled(QAbstractButton *, bool);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void buttonToggled(int, bool);
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
void idClicked(int);
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
void idPressed(int);
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
void idReleased(int);
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
void idToggled(int, bool);
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,123 @@
|
||||
// qcalendarwidget.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QCalendarWidget : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcalendarwidget.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum HorizontalHeaderFormat
|
||||
{
|
||||
NoHorizontalHeader,
|
||||
SingleLetterDayNames,
|
||||
ShortDayNames,
|
||||
LongDayNames,
|
||||
};
|
||||
|
||||
enum VerticalHeaderFormat
|
||||
{
|
||||
NoVerticalHeader,
|
||||
ISOWeekNumbers,
|
||||
};
|
||||
|
||||
enum SelectionMode
|
||||
{
|
||||
NoSelection,
|
||||
SingleSelection,
|
||||
};
|
||||
|
||||
explicit QCalendarWidget(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QCalendarWidget();
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
QDate selectedDate() const;
|
||||
int yearShown() const;
|
||||
int monthShown() const;
|
||||
QDate minimumDate() const;
|
||||
void setMinimumDate(const QDate &date);
|
||||
QDate maximumDate() const;
|
||||
void setMaximumDate(const QDate &date);
|
||||
Qt::DayOfWeek firstDayOfWeek() const;
|
||||
void setFirstDayOfWeek(Qt::DayOfWeek dayOfWeek);
|
||||
bool isGridVisible() const;
|
||||
void setGridVisible(bool show);
|
||||
QCalendarWidget::SelectionMode selectionMode() const;
|
||||
void setSelectionMode(QCalendarWidget::SelectionMode mode);
|
||||
QCalendarWidget::HorizontalHeaderFormat horizontalHeaderFormat() const;
|
||||
void setHorizontalHeaderFormat(QCalendarWidget::HorizontalHeaderFormat format);
|
||||
QCalendarWidget::VerticalHeaderFormat verticalHeaderFormat() const;
|
||||
void setVerticalHeaderFormat(QCalendarWidget::VerticalHeaderFormat format);
|
||||
QTextCharFormat headerTextFormat() const;
|
||||
void setHeaderTextFormat(const QTextCharFormat &format);
|
||||
QTextCharFormat weekdayTextFormat(Qt::DayOfWeek dayOfWeek) const;
|
||||
void setWeekdayTextFormat(Qt::DayOfWeek dayOfWeek, const QTextCharFormat &format);
|
||||
QMap<QDate, QTextCharFormat> dateTextFormat() const;
|
||||
QTextCharFormat dateTextFormat(const QDate &date) const;
|
||||
void setDateTextFormat(const QDate &date, const QTextCharFormat &color);
|
||||
|
||||
protected:
|
||||
void updateCell(const QDate &date);
|
||||
void updateCells();
|
||||
virtual bool event(QEvent *event);
|
||||
virtual bool eventFilter(QObject *watched, QEvent *event);
|
||||
virtual void mousePressEvent(QMouseEvent *event);
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
virtual void paintCell(QPainter *painter, const QRect &rect, const QDate &date) const;
|
||||
|
||||
public slots:
|
||||
void setCurrentPage(int year, int month);
|
||||
void setDateRange(const QDate &min, const QDate &max);
|
||||
void setSelectedDate(const QDate &date);
|
||||
void showNextMonth();
|
||||
void showNextYear();
|
||||
void showPreviousMonth();
|
||||
void showPreviousYear();
|
||||
void showSelectedDate();
|
||||
void showToday();
|
||||
|
||||
signals:
|
||||
void activated(const QDate &date);
|
||||
void clicked(const QDate &date);
|
||||
void currentPageChanged(int year, int month);
|
||||
void selectionChanged();
|
||||
|
||||
public:
|
||||
bool isNavigationBarVisible() const;
|
||||
bool isDateEditEnabled() const;
|
||||
void setDateEditEnabled(bool enable);
|
||||
int dateEditAcceptDelay() const;
|
||||
void setDateEditAcceptDelay(int delay);
|
||||
|
||||
public slots:
|
||||
void setNavigationBarVisible(bool visible);
|
||||
|
||||
public:
|
||||
%If (Qt_5_14_0 -)
|
||||
QCalendar calendar() const;
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
void setCalendar(QCalendar calendar);
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
// qcheckbox.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QCheckBox : public QAbstractButton
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcheckbox.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QCheckBox(QWidget *parent /TransferThis/ = 0);
|
||||
QCheckBox(const QString &text, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QCheckBox();
|
||||
virtual QSize sizeHint() const;
|
||||
void setTristate(bool on = true);
|
||||
bool isTristate() const;
|
||||
Qt::CheckState checkState() const;
|
||||
void setCheckState(Qt::CheckState state);
|
||||
virtual QSize minimumSizeHint() const;
|
||||
|
||||
signals:
|
||||
void stateChanged(int);
|
||||
|
||||
protected:
|
||||
virtual bool hitButton(const QPoint &pos) const;
|
||||
virtual void checkStateSet();
|
||||
virtual void nextCheckState();
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void mouseMoveEvent(QMouseEvent *);
|
||||
void initStyleOption(QStyleOptionButton *option) const;
|
||||
};
|
||||
@@ -0,0 +1,83 @@
|
||||
// qcolordialog.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QColorDialog : public QDialog
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcolordialog.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum ColorDialogOption
|
||||
{
|
||||
ShowAlphaChannel,
|
||||
NoButtons,
|
||||
DontUseNativeDialog,
|
||||
};
|
||||
|
||||
typedef QFlags<QColorDialog::ColorDialogOption> ColorDialogOptions;
|
||||
explicit QColorDialog(QWidget *parent /TransferThis/ = 0);
|
||||
QColorDialog(const QColor &initial, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QColorDialog();
|
||||
static QColor getColor(const QColor &initial = Qt::white, QWidget *parent = 0, const QString &title = QString(), QColorDialog::ColorDialogOptions options = QColorDialog::ColorDialogOptions()) /ReleaseGIL/;
|
||||
static int customCount();
|
||||
static QColor customColor(int index);
|
||||
static void setCustomColor(int index, QColor color);
|
||||
static QColor standardColor(int index);
|
||||
static void setStandardColor(int index, QColor color);
|
||||
|
||||
signals:
|
||||
void colorSelected(const QColor &color);
|
||||
void currentColorChanged(const QColor &color);
|
||||
|
||||
protected:
|
||||
virtual void changeEvent(QEvent *e);
|
||||
virtual void done(int result);
|
||||
|
||||
public:
|
||||
void setCurrentColor(const QColor &color);
|
||||
QColor currentColor() const;
|
||||
QColor selectedColor() const;
|
||||
void setOption(QColorDialog::ColorDialogOption option, bool on = true);
|
||||
bool testOption(QColorDialog::ColorDialogOption option) const;
|
||||
void setOptions(QColorDialog::ColorDialogOptions options);
|
||||
QColorDialog::ColorDialogOptions options() 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 void setVisible(bool visible);
|
||||
};
|
||||
|
||||
QFlags<QColorDialog::ColorDialogOption> operator|(QColorDialog::ColorDialogOption f1, QFlags<QColorDialog::ColorDialogOption> f2);
|
||||
@@ -0,0 +1,65 @@
|
||||
// qcolumnview.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QColumnView : public QAbstractItemView
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcolumnview.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QColumnView(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QColumnView();
|
||||
QList<int> columnWidths() const;
|
||||
QWidget *previewWidget() const;
|
||||
bool resizeGripsVisible() const;
|
||||
void setColumnWidths(const QList<int> &list);
|
||||
void setPreviewWidget(QWidget *widget /Transfer/);
|
||||
void setResizeGripsVisible(bool visible);
|
||||
virtual QModelIndex indexAt(const QPoint &point) const;
|
||||
virtual void scrollTo(const QModelIndex &index, QAbstractItemView::ScrollHint hint = QAbstractItemView::EnsureVisible);
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QRect visualRect(const QModelIndex &index) const;
|
||||
virtual void setModel(QAbstractItemModel *model /KeepReference/);
|
||||
virtual void setSelectionModel(QItemSelectionModel *selectionModel /KeepReference/);
|
||||
virtual void setRootIndex(const QModelIndex &index);
|
||||
virtual void selectAll();
|
||||
|
||||
signals:
|
||||
void updatePreviewWidget(const QModelIndex &index);
|
||||
|
||||
protected:
|
||||
virtual QAbstractItemView *createColumn(const QModelIndex &rootIndex);
|
||||
void initializeColumn(QAbstractItemView *column) const;
|
||||
virtual bool isIndexHidden(const QModelIndex &index) const;
|
||||
virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers);
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
virtual void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command);
|
||||
virtual QRegion visualRegionForSelection(const QItemSelection &selection) const;
|
||||
virtual int horizontalOffset() const;
|
||||
virtual int verticalOffset() const;
|
||||
virtual void scrollContentsBy(int dx, int dy);
|
||||
virtual void rowsInserted(const QModelIndex &parent, int start, int end);
|
||||
|
||||
protected slots:
|
||||
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
};
|
||||
@@ -0,0 +1,170 @@
|
||||
// qcombobox.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QComboBox : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcombobox.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QComboBox(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QComboBox();
|
||||
int maxVisibleItems() const;
|
||||
void setMaxVisibleItems(int maxItems);
|
||||
int count() const /__len__/;
|
||||
void setMaxCount(int max);
|
||||
int maxCount() const;
|
||||
bool duplicatesEnabled() const;
|
||||
void setDuplicatesEnabled(bool enable);
|
||||
void setFrame(bool);
|
||||
bool hasFrame() const;
|
||||
int findText(const QString &text, Qt::MatchFlags flags = Qt::MatchExactly|Qt::MatchCaseSensitive) const;
|
||||
int findData(const QVariant &data, int role = Qt::UserRole, Qt::MatchFlags flags = Qt::MatchExactly|Qt::MatchCaseSensitive) const;
|
||||
|
||||
enum InsertPolicy
|
||||
{
|
||||
NoInsert,
|
||||
InsertAtTop,
|
||||
InsertAtCurrent,
|
||||
InsertAtBottom,
|
||||
InsertAfterCurrent,
|
||||
InsertBeforeCurrent,
|
||||
InsertAlphabetically,
|
||||
};
|
||||
|
||||
QComboBox::InsertPolicy insertPolicy() const;
|
||||
void setInsertPolicy(QComboBox::InsertPolicy policy);
|
||||
|
||||
enum SizeAdjustPolicy
|
||||
{
|
||||
AdjustToContents,
|
||||
AdjustToContentsOnFirstShow,
|
||||
AdjustToMinimumContentsLength,
|
||||
AdjustToMinimumContentsLengthWithIcon,
|
||||
};
|
||||
|
||||
QComboBox::SizeAdjustPolicy sizeAdjustPolicy() const;
|
||||
void setSizeAdjustPolicy(QComboBox::SizeAdjustPolicy policy);
|
||||
int minimumContentsLength() const;
|
||||
void setMinimumContentsLength(int characters);
|
||||
QSize iconSize() const;
|
||||
void setIconSize(const QSize &size);
|
||||
bool isEditable() const;
|
||||
void setEditable(bool editable);
|
||||
void setLineEdit(QLineEdit *edit /Transfer/);
|
||||
QLineEdit *lineEdit() const;
|
||||
void setValidator(const QValidator *v /KeepReference/);
|
||||
const QValidator *validator() const;
|
||||
QAbstractItemDelegate *itemDelegate() const;
|
||||
void setItemDelegate(QAbstractItemDelegate *delegate /KeepReference/);
|
||||
QAbstractItemModel *model() const;
|
||||
void setModel(QAbstractItemModel *model /KeepReference/);
|
||||
QModelIndex rootModelIndex() const;
|
||||
void setRootModelIndex(const QModelIndex &index);
|
||||
int modelColumn() const;
|
||||
void setModelColumn(int visibleColumn);
|
||||
int currentIndex() const;
|
||||
void setCurrentIndex(int index);
|
||||
QString currentText() const;
|
||||
QString itemText(int index) const;
|
||||
QIcon itemIcon(int index) const;
|
||||
QVariant itemData(int index, int role = Qt::UserRole) const;
|
||||
void addItems(const QStringList &texts);
|
||||
void addItem(const QString &text, const QVariant &userData = QVariant());
|
||||
void addItem(const QIcon &icon, const QString &text, const QVariant &userData = QVariant());
|
||||
void insertItem(int index, const QString &text, const QVariant &userData = QVariant());
|
||||
void insertItem(int index, const QIcon &icon, const QString &text, const QVariant &userData = QVariant());
|
||||
void insertItems(int index, const QStringList &texts);
|
||||
void removeItem(int index);
|
||||
void setItemText(int index, const QString &text);
|
||||
void setItemIcon(int index, const QIcon &icon);
|
||||
void setItemData(int index, const QVariant &value, int role = Qt::ItemDataRole::UserRole);
|
||||
QAbstractItemView *view() const;
|
||||
void setView(QAbstractItemView *itemView /Transfer/);
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
virtual void showPopup();
|
||||
virtual void hidePopup();
|
||||
virtual bool event(QEvent *event);
|
||||
void setCompleter(QCompleter *c /KeepReference/);
|
||||
QCompleter *completer() const;
|
||||
void insertSeparator(int index);
|
||||
|
||||
public slots:
|
||||
void clear();
|
||||
void clearEditText();
|
||||
void setEditText(const QString &text);
|
||||
void setCurrentText(const QString &text);
|
||||
|
||||
signals:
|
||||
void editTextChanged(const QString &);
|
||||
void activated(int index);
|
||||
void activated(const QString &);
|
||||
void currentIndexChanged(int index);
|
||||
void currentIndexChanged(const QString &);
|
||||
void currentTextChanged(const QString &);
|
||||
void highlighted(int index);
|
||||
void highlighted(const QString &);
|
||||
|
||||
protected:
|
||||
void initStyleOption(QStyleOptionComboBox *option) const;
|
||||
virtual void focusInEvent(QFocusEvent *e);
|
||||
virtual void focusOutEvent(QFocusEvent *e);
|
||||
virtual void changeEvent(QEvent *e);
|
||||
virtual void resizeEvent(QResizeEvent *e);
|
||||
virtual void paintEvent(QPaintEvent *e);
|
||||
virtual void showEvent(QShowEvent *e);
|
||||
virtual void hideEvent(QHideEvent *e);
|
||||
virtual void mousePressEvent(QMouseEvent *e);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *e);
|
||||
virtual void keyPressEvent(QKeyEvent *e);
|
||||
virtual void keyReleaseEvent(QKeyEvent *e);
|
||||
virtual void wheelEvent(QWheelEvent *e);
|
||||
virtual void contextMenuEvent(QContextMenuEvent *e);
|
||||
virtual void inputMethodEvent(QInputMethodEvent *);
|
||||
|
||||
public:
|
||||
virtual QVariant inputMethodQuery(Qt::InputMethodQuery) const;
|
||||
%If (Qt_5_2_0 -)
|
||||
QVariant currentData(int role = Qt::ItemDataRole::UserRole) const;
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
QVariant inputMethodQuery(Qt::InputMethodQuery query, const QVariant &argument) const;
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_5_14_0 -)
|
||||
void textActivated(const QString &);
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
void textHighlighted(const QString &);
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_5_15_0 -)
|
||||
void setPlaceholderText(const QString &placeholderText);
|
||||
%End
|
||||
%If (Qt_5_15_0 -)
|
||||
QString placeholderText() const;
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
// qcommandlinkbutton.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QCommandLinkButton : public QPushButton
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcommandlinkbutton.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QCommandLinkButton(QWidget *parent /TransferThis/ = 0);
|
||||
QCommandLinkButton(const QString &text, QWidget *parent /TransferThis/ = 0);
|
||||
QCommandLinkButton(const QString &text, const QString &description, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QCommandLinkButton();
|
||||
QString description() const;
|
||||
void setDescription(const QString &description);
|
||||
|
||||
protected:
|
||||
virtual QSize sizeHint() const;
|
||||
virtual int heightForWidth(int) const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
// qcommonstyle.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QCommonStyle : public QStyle
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcommonstyle.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QCommonStyle();
|
||||
virtual ~QCommonStyle();
|
||||
virtual void polish(QWidget *widget);
|
||||
virtual void unpolish(QWidget *widget);
|
||||
virtual void polish(QApplication *app);
|
||||
virtual void unpolish(QApplication *application);
|
||||
virtual void polish(QPalette & /In,Out/);
|
||||
virtual void drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *widget = 0) const;
|
||||
virtual void drawControl(QStyle::ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *widget = 0) const;
|
||||
virtual QRect subElementRect(QStyle::SubElement r, const QStyleOption *opt, const QWidget *widget = 0) const;
|
||||
virtual void drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget = 0) const;
|
||||
virtual QStyle::SubControl hitTestComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget = 0) const;
|
||||
virtual QRect subControlRect(QStyle::ComplexControl cc, const QStyleOptionComplex *opt, QStyle::SubControl sc, const QWidget *widget = 0) const;
|
||||
virtual QSize sizeFromContents(QStyle::ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *widget = 0) const;
|
||||
virtual int pixelMetric(QStyle::PixelMetric m, const QStyleOption *option = 0, const QWidget *widget = 0) const;
|
||||
virtual int styleHint(QStyle::StyleHint sh, const QStyleOption *option = 0, const QWidget *widget = 0, QStyleHintReturn *returnData = 0) const;
|
||||
virtual QPixmap standardPixmap(QStyle::StandardPixmap sp, const QStyleOption *option = 0, const QWidget *widget = 0) const;
|
||||
virtual QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const;
|
||||
virtual QIcon standardIcon(QStyle::StandardPixmap standardIcon, const QStyleOption *option = 0, const QWidget *widget = 0) const;
|
||||
virtual int layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option = 0, const QWidget *widget = 0) const;
|
||||
};
|
||||
@@ -0,0 +1,99 @@
|
||||
// qcompleter.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QCompleter : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qcompleter.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum CompletionMode
|
||||
{
|
||||
PopupCompletion,
|
||||
UnfilteredPopupCompletion,
|
||||
InlineCompletion,
|
||||
};
|
||||
|
||||
enum ModelSorting
|
||||
{
|
||||
UnsortedModel,
|
||||
CaseSensitivelySortedModel,
|
||||
CaseInsensitivelySortedModel,
|
||||
};
|
||||
|
||||
QCompleter(QAbstractItemModel *model, QObject *parent /TransferThis/ = 0);
|
||||
QCompleter(const QStringList &list, QObject *parent /TransferThis/ = 0);
|
||||
QCompleter(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QCompleter();
|
||||
void setWidget(QWidget *widget /Transfer/);
|
||||
QWidget *widget() const;
|
||||
void setModel(QAbstractItemModel *c /KeepReference/);
|
||||
QAbstractItemModel *model() const;
|
||||
void setCompletionMode(QCompleter::CompletionMode mode);
|
||||
QCompleter::CompletionMode completionMode() const;
|
||||
QAbstractItemView *popup() const;
|
||||
void setPopup(QAbstractItemView *popup /Transfer/);
|
||||
void setCaseSensitivity(Qt::CaseSensitivity caseSensitivity);
|
||||
Qt::CaseSensitivity caseSensitivity() const;
|
||||
void setModelSorting(QCompleter::ModelSorting sorting);
|
||||
QCompleter::ModelSorting modelSorting() const;
|
||||
void setCompletionColumn(int column);
|
||||
int completionColumn() const;
|
||||
void setCompletionRole(int role);
|
||||
int completionRole() const;
|
||||
int completionCount() const;
|
||||
bool setCurrentRow(int row);
|
||||
int currentRow() const;
|
||||
QModelIndex currentIndex() const;
|
||||
QString currentCompletion() const;
|
||||
QAbstractItemModel *completionModel() const;
|
||||
QString completionPrefix() const;
|
||||
virtual QString pathFromIndex(const QModelIndex &index) const;
|
||||
virtual QStringList splitPath(const QString &path) const;
|
||||
bool wrapAround() const;
|
||||
|
||||
public slots:
|
||||
void complete(const QRect &rect = QRect());
|
||||
void setCompletionPrefix(const QString &prefix);
|
||||
void setWrapAround(bool wrap);
|
||||
|
||||
protected:
|
||||
virtual bool eventFilter(QObject *o, QEvent *e);
|
||||
virtual bool event(QEvent *);
|
||||
|
||||
signals:
|
||||
void activated(const QString &text);
|
||||
void activated(const QModelIndex &index);
|
||||
void highlighted(const QString &text);
|
||||
void highlighted(const QModelIndex &index);
|
||||
|
||||
public:
|
||||
int maxVisibleItems() const;
|
||||
void setMaxVisibleItems(int maxItems);
|
||||
%If (Qt_5_2_0 -)
|
||||
void setFilterMode(Qt::MatchFlags filterMode);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
Qt::MatchFlags filterMode() const;
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
// qdatawidgetmapper.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QDataWidgetMapper : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdatawidgetmapper.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum SubmitPolicy
|
||||
{
|
||||
AutoSubmit,
|
||||
ManualSubmit,
|
||||
};
|
||||
|
||||
explicit QDataWidgetMapper(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QDataWidgetMapper();
|
||||
void setModel(QAbstractItemModel *model /KeepReference/);
|
||||
QAbstractItemModel *model() const;
|
||||
void setItemDelegate(QAbstractItemDelegate *delegate /KeepReference/);
|
||||
QAbstractItemDelegate *itemDelegate() const;
|
||||
void setRootIndex(const QModelIndex &index);
|
||||
QModelIndex rootIndex() const;
|
||||
void setOrientation(Qt::Orientation aOrientation);
|
||||
Qt::Orientation orientation() const;
|
||||
void setSubmitPolicy(QDataWidgetMapper::SubmitPolicy policy);
|
||||
QDataWidgetMapper::SubmitPolicy submitPolicy() const;
|
||||
void addMapping(QWidget *widget, int section);
|
||||
void addMapping(QWidget *widget, int section, const QByteArray &propertyName);
|
||||
void removeMapping(QWidget *widget);
|
||||
QByteArray mappedPropertyName(QWidget *widget) const;
|
||||
int mappedSection(QWidget *widget) const;
|
||||
QWidget *mappedWidgetAt(int section) const;
|
||||
void clearMapping();
|
||||
int currentIndex() const;
|
||||
|
||||
public slots:
|
||||
void revert();
|
||||
virtual void setCurrentIndex(int index);
|
||||
void setCurrentModelIndex(const QModelIndex &index);
|
||||
bool submit();
|
||||
void toFirst();
|
||||
void toLast();
|
||||
void toNext();
|
||||
void toPrevious();
|
||||
|
||||
signals:
|
||||
void currentIndexChanged(int index);
|
||||
};
|
||||
@@ -0,0 +1,154 @@
|
||||
// qdatetimeedit.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QDateTimeEdit : public QAbstractSpinBox
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdatetimeedit.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Section
|
||||
{
|
||||
NoSection,
|
||||
AmPmSection,
|
||||
MSecSection,
|
||||
SecondSection,
|
||||
MinuteSection,
|
||||
HourSection,
|
||||
DaySection,
|
||||
MonthSection,
|
||||
YearSection,
|
||||
TimeSections_Mask,
|
||||
DateSections_Mask,
|
||||
};
|
||||
|
||||
typedef QFlags<QDateTimeEdit::Section> Sections;
|
||||
explicit QDateTimeEdit(QWidget *parent /TransferThis/ = 0);
|
||||
QDateTimeEdit(const QDateTime &datetime, QWidget *parent /TransferThis/ = 0);
|
||||
QDateTimeEdit(const QDate &date, QWidget *parent /TransferThis/ = 0);
|
||||
QDateTimeEdit(const QTime &time, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QDateTimeEdit();
|
||||
QDateTime dateTime() const;
|
||||
QDate date() const;
|
||||
QTime time() const;
|
||||
QDate minimumDate() const;
|
||||
void setMinimumDate(const QDate &min);
|
||||
void clearMinimumDate();
|
||||
QDate maximumDate() const;
|
||||
void setMaximumDate(const QDate &max);
|
||||
void clearMaximumDate();
|
||||
void setDateRange(const QDate &min, const QDate &max);
|
||||
QTime minimumTime() const;
|
||||
void setMinimumTime(const QTime &min);
|
||||
void clearMinimumTime();
|
||||
QTime maximumTime() const;
|
||||
void setMaximumTime(const QTime &max);
|
||||
void clearMaximumTime();
|
||||
void setTimeRange(const QTime &min, const QTime &max);
|
||||
QDateTimeEdit::Sections displayedSections() const;
|
||||
QDateTimeEdit::Section currentSection() const;
|
||||
void setCurrentSection(QDateTimeEdit::Section section);
|
||||
QString sectionText(QDateTimeEdit::Section s) const;
|
||||
QString displayFormat() const;
|
||||
void setDisplayFormat(const QString &format);
|
||||
bool calendarPopup() const;
|
||||
void setCalendarPopup(bool enable);
|
||||
void setSelectedSection(QDateTimeEdit::Section section);
|
||||
virtual QSize sizeHint() const;
|
||||
virtual void clear();
|
||||
virtual void stepBy(int steps);
|
||||
virtual bool event(QEvent *e);
|
||||
QDateTimeEdit::Section sectionAt(int index) const;
|
||||
int currentSectionIndex() const;
|
||||
void setCurrentSectionIndex(int index);
|
||||
int sectionCount() const;
|
||||
|
||||
signals:
|
||||
void dateTimeChanged(const QDateTime &date);
|
||||
void timeChanged(const QTime &date);
|
||||
void dateChanged(const QDate &date);
|
||||
|
||||
public slots:
|
||||
void setDateTime(const QDateTime &dateTime);
|
||||
void setDate(const QDate &date);
|
||||
void setTime(const QTime &time);
|
||||
|
||||
protected:
|
||||
void initStyleOption(QStyleOptionSpinBox *option) const;
|
||||
virtual void keyPressEvent(QKeyEvent *e);
|
||||
virtual void wheelEvent(QWheelEvent *e);
|
||||
virtual void focusInEvent(QFocusEvent *e);
|
||||
virtual bool focusNextPrevChild(bool next);
|
||||
virtual void mousePressEvent(QMouseEvent *event);
|
||||
virtual void paintEvent(QPaintEvent *event);
|
||||
virtual QValidator::State validate(QString &input /In,Out/, int &pos /In,Out/) const;
|
||||
virtual void fixup(QString &input /In,Out/) const;
|
||||
virtual QDateTime dateTimeFromText(const QString &text) const;
|
||||
virtual QString textFromDateTime(const QDateTime &dt) const;
|
||||
virtual QAbstractSpinBox::StepEnabled stepEnabled() const;
|
||||
|
||||
public:
|
||||
QDateTime minimumDateTime() const;
|
||||
void clearMinimumDateTime();
|
||||
void setMinimumDateTime(const QDateTime &dt);
|
||||
QDateTime maximumDateTime() const;
|
||||
void clearMaximumDateTime();
|
||||
void setMaximumDateTime(const QDateTime &dt);
|
||||
void setDateTimeRange(const QDateTime &min, const QDateTime &max);
|
||||
QCalendarWidget *calendarWidget() const;
|
||||
void setCalendarWidget(QCalendarWidget *calendarWidget /Transfer/);
|
||||
Qt::TimeSpec timeSpec() const;
|
||||
void setTimeSpec(Qt::TimeSpec spec);
|
||||
%If (Qt_5_14_0 -)
|
||||
QCalendar calendar() const;
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
void setCalendar(QCalendar calendar);
|
||||
%End
|
||||
};
|
||||
|
||||
class QTimeEdit : public QDateTimeEdit
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdatetimeedit.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QTimeEdit(QWidget *parent /TransferThis/ = 0);
|
||||
QTimeEdit(const QTime &time, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QTimeEdit();
|
||||
};
|
||||
|
||||
class QDateEdit : public QDateTimeEdit
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdatetimeedit.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QDateEdit(QWidget *parent /TransferThis/ = 0);
|
||||
QDateEdit(const QDate &date, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QDateEdit();
|
||||
};
|
||||
|
||||
QFlags<QDateTimeEdit::Section> operator|(QDateTimeEdit::Section f1, QFlags<QDateTimeEdit::Section> f2);
|
||||
@@ -0,0 +1,55 @@
|
||||
// qdesktopwidget.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QDesktopWidget : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdesktopwidget.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QDesktopWidget();
|
||||
virtual ~QDesktopWidget();
|
||||
bool isVirtualDesktop() const;
|
||||
int primaryScreen() const;
|
||||
int screenNumber(const QWidget *widget = 0) const;
|
||||
int screenNumber(const QPoint &) const;
|
||||
QWidget *screen(int screen = -1);
|
||||
int screenCount() const;
|
||||
const QRect screenGeometry(int screen = -1) const;
|
||||
const QRect screenGeometry(const QWidget *widget) const;
|
||||
const QRect screenGeometry(const QPoint &point) const;
|
||||
const QRect availableGeometry(int screen = -1) const;
|
||||
const QRect availableGeometry(const QWidget *widget) const;
|
||||
const QRect availableGeometry(const QPoint &point) const;
|
||||
|
||||
signals:
|
||||
void resized(int);
|
||||
void workAreaResized(int);
|
||||
void screenCountChanged(int);
|
||||
%If (Qt_5_6_0 -)
|
||||
void primaryScreenChanged();
|
||||
%End
|
||||
|
||||
protected:
|
||||
virtual void resizeEvent(QResizeEvent *e);
|
||||
};
|
||||
@@ -0,0 +1,53 @@
|
||||
// qdial.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QDial : public QAbstractSlider
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdial.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QDial(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QDial();
|
||||
bool wrapping() const;
|
||||
int notchSize() const;
|
||||
void setNotchTarget(double target);
|
||||
qreal notchTarget() const;
|
||||
bool notchesVisible() const;
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
|
||||
public slots:
|
||||
void setNotchesVisible(bool visible);
|
||||
void setWrapping(bool on);
|
||||
|
||||
protected:
|
||||
void initStyleOption(QStyleOptionSlider *option) const;
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void resizeEvent(QResizeEvent *re);
|
||||
virtual void paintEvent(QPaintEvent *pe);
|
||||
virtual void mousePressEvent(QMouseEvent *me);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *me);
|
||||
virtual void mouseMoveEvent(QMouseEvent *me);
|
||||
virtual void sliderChange(QAbstractSlider::SliderChange change);
|
||||
};
|
||||
@@ -0,0 +1,98 @@
|
||||
// qdialog.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QDialog : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdialog.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QDialog(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
virtual ~QDialog();
|
||||
|
||||
enum DialogCode
|
||||
{
|
||||
Rejected,
|
||||
Accepted,
|
||||
};
|
||||
|
||||
int result() const;
|
||||
virtual void setVisible(bool visible);
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
void setSizeGripEnabled(bool);
|
||||
bool isSizeGripEnabled() const;
|
||||
void setModal(bool modal);
|
||||
void setResult(int r);
|
||||
virtual int exec() /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,PyName=exec_,ReleaseGIL/;
|
||||
%MethodCode
|
||||
// Transfer ownership back to Python (a modal dialog will probably have the
|
||||
// main window as it's parent). This means the Qt dialog will be deleted when
|
||||
// the Python wrapper is garbage collected. Although this is a little
|
||||
// inconsistent, it saves having to code it explicitly to avoid the memory
|
||||
// leak.
|
||||
sipTransferBack(sipSelf);
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipRes = sipSelfWasArg ? sipCpp->QDialog::exec()
|
||||
: sipCpp->exec();
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
%If (Py_v3)
|
||||
virtual int exec() /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,ReleaseGIL/;
|
||||
%MethodCode
|
||||
// Transfer ownership back to Python (a modal dialog will probably have the
|
||||
// main window as it's parent). This means the Qt dialog will be deleted when
|
||||
// the Python wrapper is garbage collected. Although this is a little
|
||||
// inconsistent, it saves having to code it explicitly to avoid the memory
|
||||
// leak.
|
||||
sipTransferBack(sipSelf);
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipRes = sipSelfWasArg ? sipCpp->QDialog::exec()
|
||||
: sipCpp->exec();
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
%End
|
||||
|
||||
public slots:
|
||||
virtual void done(int);
|
||||
virtual void accept();
|
||||
virtual void reject();
|
||||
virtual void open();
|
||||
|
||||
signals:
|
||||
void accepted();
|
||||
void finished(int result);
|
||||
void rejected();
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
virtual void closeEvent(QCloseEvent *);
|
||||
virtual void showEvent(QShowEvent *);
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
virtual void contextMenuEvent(QContextMenuEvent *);
|
||||
virtual bool eventFilter(QObject *, QEvent *);
|
||||
};
|
||||
@@ -0,0 +1,118 @@
|
||||
// qdialogbuttonbox.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QDialogButtonBox : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdialogbuttonbox.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum ButtonLayout
|
||||
{
|
||||
WinLayout,
|
||||
MacLayout,
|
||||
KdeLayout,
|
||||
GnomeLayout,
|
||||
%If (Qt_5_10_0 -)
|
||||
AndroidLayout,
|
||||
%End
|
||||
};
|
||||
|
||||
enum ButtonRole
|
||||
{
|
||||
InvalidRole,
|
||||
AcceptRole,
|
||||
RejectRole,
|
||||
DestructiveRole,
|
||||
ActionRole,
|
||||
HelpRole,
|
||||
YesRole,
|
||||
NoRole,
|
||||
ResetRole,
|
||||
ApplyRole,
|
||||
};
|
||||
|
||||
enum StandardButton
|
||||
{
|
||||
NoButton,
|
||||
Ok,
|
||||
Save,
|
||||
SaveAll,
|
||||
Open,
|
||||
Yes,
|
||||
YesToAll,
|
||||
No,
|
||||
NoToAll,
|
||||
Abort,
|
||||
Retry,
|
||||
Ignore,
|
||||
Close,
|
||||
Cancel,
|
||||
Discard,
|
||||
Help,
|
||||
Apply,
|
||||
Reset,
|
||||
RestoreDefaults,
|
||||
};
|
||||
|
||||
typedef QFlags<QDialogButtonBox::StandardButton> StandardButtons;
|
||||
QDialogButtonBox(QWidget *parent /TransferThis/ = 0);
|
||||
QDialogButtonBox(Qt::Orientation orientation, QWidget *parent /TransferThis/ = 0);
|
||||
%If (Qt_5_2_0 -)
|
||||
QDialogButtonBox(QDialogButtonBox::StandardButtons buttons, QWidget *parent /TransferThis/ = 0);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QDialogButtonBox(QDialogButtonBox::StandardButtons buttons, Qt::Orientation orientation, QWidget *parent /TransferThis/ = 0);
|
||||
%End
|
||||
%If (- Qt_5_2_0)
|
||||
QDialogButtonBox(QFlags<QDialogButtonBox::StandardButton> buttons, Qt::Orientation orientation = Qt::Horizontal, QWidget *parent /TransferThis/ = 0);
|
||||
%End
|
||||
virtual ~QDialogButtonBox();
|
||||
void setOrientation(Qt::Orientation orientation);
|
||||
Qt::Orientation orientation() const;
|
||||
void addButton(QAbstractButton *button /Transfer/, QDialogButtonBox::ButtonRole role);
|
||||
QPushButton *addButton(const QString &text, QDialogButtonBox::ButtonRole role) /Transfer/;
|
||||
QPushButton *addButton(QDialogButtonBox::StandardButton button) /Transfer/;
|
||||
void removeButton(QAbstractButton *button /TransferBack/);
|
||||
void clear();
|
||||
QList<QAbstractButton *> buttons() const;
|
||||
QDialogButtonBox::ButtonRole buttonRole(QAbstractButton *button) const;
|
||||
void setStandardButtons(QDialogButtonBox::StandardButtons buttons);
|
||||
QDialogButtonBox::StandardButtons standardButtons() const;
|
||||
QDialogButtonBox::StandardButton standardButton(QAbstractButton *button) const;
|
||||
QPushButton *button(QDialogButtonBox::StandardButton which) const;
|
||||
void setCenterButtons(bool center);
|
||||
bool centerButtons() const;
|
||||
|
||||
signals:
|
||||
void accepted();
|
||||
void clicked(QAbstractButton *button);
|
||||
void helpRequested();
|
||||
void rejected();
|
||||
|
||||
protected:
|
||||
virtual void changeEvent(QEvent *event);
|
||||
virtual bool event(QEvent *event);
|
||||
};
|
||||
|
||||
QFlags<QDialogButtonBox::StandardButton> operator|(QDialogButtonBox::StandardButton f1, QFlags<QDialogButtonBox::StandardButton> f2);
|
||||
@@ -0,0 +1,79 @@
|
||||
// qdirmodel.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QDirModel : public QAbstractItemModel
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdirmodel.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Roles
|
||||
{
|
||||
FileIconRole,
|
||||
FilePathRole,
|
||||
FileNameRole,
|
||||
};
|
||||
|
||||
QDirModel(const QStringList &nameFilters, QDir::Filters filters, QDir::SortFlags sort, QObject *parent /TransferThis/ = 0);
|
||||
explicit QDirModel(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QDirModel();
|
||||
virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual QModelIndex parent(const QModelIndex &child) const;
|
||||
QObject *parent() const;
|
||||
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
|
||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
||||
virtual bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
virtual void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
|
||||
virtual QStringList mimeTypes() const;
|
||||
virtual QMimeData *mimeData(const QModelIndexList &indexes) const /TransferBack/;
|
||||
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
|
||||
virtual Qt::DropActions supportedDropActions() const;
|
||||
void setIconProvider(QFileIconProvider *provider /KeepReference/);
|
||||
QFileIconProvider *iconProvider() const;
|
||||
void setNameFilters(const QStringList &filters);
|
||||
QStringList nameFilters() const;
|
||||
void setFilter(QDir::Filters filters);
|
||||
QDir::Filters filter() const;
|
||||
void setSorting(QDir::SortFlags sort);
|
||||
QDir::SortFlags sorting() const;
|
||||
void setResolveSymlinks(bool enable);
|
||||
bool resolveSymlinks() const;
|
||||
void setReadOnly(bool enable);
|
||||
bool isReadOnly() const;
|
||||
void setLazyChildCount(bool enable);
|
||||
bool lazyChildCount() const;
|
||||
void refresh(const QModelIndex &parent = QModelIndex());
|
||||
QModelIndex index(const QString &path, int column = 0) const;
|
||||
bool isDir(const QModelIndex &index) const;
|
||||
QModelIndex mkdir(const QModelIndex &parent, const QString &name);
|
||||
bool rmdir(const QModelIndex &index);
|
||||
bool remove(const QModelIndex &index);
|
||||
QString filePath(const QModelIndex &index) const;
|
||||
QString fileName(const QModelIndex &index) const;
|
||||
QIcon fileIcon(const QModelIndex &index) const;
|
||||
QFileInfo fileInfo(const QModelIndex &index) const;
|
||||
};
|
||||
@@ -0,0 +1,73 @@
|
||||
// qdockwidget.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QDockWidget : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qdockwidget.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QDockWidget(const QString &title, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
QDockWidget(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
virtual ~QDockWidget();
|
||||
QWidget *widget() const;
|
||||
void setWidget(QWidget *widget /Transfer/);
|
||||
|
||||
enum DockWidgetFeature
|
||||
{
|
||||
DockWidgetClosable,
|
||||
DockWidgetMovable,
|
||||
DockWidgetFloatable,
|
||||
DockWidgetVerticalTitleBar,
|
||||
AllDockWidgetFeatures,
|
||||
NoDockWidgetFeatures,
|
||||
};
|
||||
|
||||
typedef QFlags<QDockWidget::DockWidgetFeature> DockWidgetFeatures;
|
||||
void setFeatures(QDockWidget::DockWidgetFeatures features);
|
||||
QDockWidget::DockWidgetFeatures features() const;
|
||||
void setFloating(bool floating);
|
||||
bool isFloating() const;
|
||||
void setAllowedAreas(Qt::DockWidgetAreas areas);
|
||||
Qt::DockWidgetAreas allowedAreas() const;
|
||||
bool isAreaAllowed(Qt::DockWidgetArea area) const;
|
||||
QAction *toggleViewAction() const /Transfer/;
|
||||
void setTitleBarWidget(QWidget *widget /Transfer/);
|
||||
QWidget *titleBarWidget() const;
|
||||
|
||||
signals:
|
||||
void featuresChanged(QDockWidget::DockWidgetFeatures features);
|
||||
void topLevelChanged(bool topLevel);
|
||||
void allowedAreasChanged(Qt::DockWidgetAreas allowedAreas);
|
||||
void dockLocationChanged(Qt::DockWidgetArea area);
|
||||
void visibilityChanged(bool visible);
|
||||
|
||||
protected:
|
||||
void initStyleOption(QStyleOptionDockWidget *option) const;
|
||||
virtual void changeEvent(QEvent *event);
|
||||
virtual void closeEvent(QCloseEvent *event);
|
||||
virtual void paintEvent(QPaintEvent *event);
|
||||
virtual bool event(QEvent *event);
|
||||
};
|
||||
|
||||
QFlags<QDockWidget::DockWidgetFeature> operator|(QDockWidget::DockWidgetFeature f1, QFlags<QDockWidget::DockWidgetFeature> f2);
|
||||
@@ -0,0 +1,39 @@
|
||||
// qdrawutil.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 <qdrawutil.h>
|
||||
%End
|
||||
|
||||
void qDrawShadeLine(QPainter *p, int x1, int y1, int x2, int y2, const QPalette &pal, bool sunken = true, int lineWidth = 1, int midLineWidth = 0);
|
||||
void qDrawShadeLine(QPainter *p, const QPoint &p1, const QPoint &p2, const QPalette &pal, bool sunken = true, int lineWidth = 1, int midLineWidth = 0);
|
||||
void qDrawShadeRect(QPainter *p, int x, int y, int w, int h, const QPalette &pal, bool sunken = false, int lineWidth = 1, int midLineWidth = 0, const QBrush *fill = 0);
|
||||
void qDrawShadeRect(QPainter *p, const QRect &r, const QPalette &pal, bool sunken = false, int lineWidth = 1, int midLineWidth = 0, const QBrush *fill = 0);
|
||||
void qDrawShadePanel(QPainter *p, int x, int y, int w, int h, const QPalette &pal, bool sunken = false, int lineWidth = 1, const QBrush *fill = 0);
|
||||
void qDrawShadePanel(QPainter *p, const QRect &r, const QPalette &pal, bool sunken = false, int lineWidth = 1, const QBrush *fill = 0);
|
||||
void qDrawWinButton(QPainter *p, int x, int y, int w, int h, const QPalette &pal, bool sunken = false, const QBrush *fill = 0);
|
||||
void qDrawWinButton(QPainter *p, const QRect &r, const QPalette &pal, bool sunken = false, const QBrush *fill = 0);
|
||||
void qDrawWinPanel(QPainter *p, int x, int y, int w, int h, const QPalette &pal, bool sunken = false, const QBrush *fill = 0);
|
||||
void qDrawWinPanel(QPainter *p, const QRect &r, const QPalette &pal, bool sunken = false, const QBrush *fill = 0);
|
||||
void qDrawPlainRect(QPainter *p, int x, int y, int w, int h, const QColor &, int lineWidth = 1, const QBrush *fill = 0);
|
||||
void qDrawPlainRect(QPainter *p, const QRect &r, const QColor &, int lineWidth = 1, const QBrush *fill = 0);
|
||||
void qDrawBorderPixmap(QPainter *painter, const QRect &target, const QMargins &margins, const QPixmap &pixmap);
|
||||
@@ -0,0 +1,41 @@
|
||||
// qerrormessage.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QErrorMessage : public QDialog
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qerrormessage.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QErrorMessage(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QErrorMessage();
|
||||
static QErrorMessage *qtHandler();
|
||||
|
||||
public slots:
|
||||
void showMessage(const QString &message);
|
||||
void showMessage(const QString &message, const QString &type);
|
||||
|
||||
protected:
|
||||
virtual void changeEvent(QEvent *e);
|
||||
virtual void done(int);
|
||||
};
|
||||
@@ -0,0 +1,355 @@
|
||||
// qfiledialog.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QFileDialog : public QDialog
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qfiledialog.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum ViewMode
|
||||
{
|
||||
Detail,
|
||||
List,
|
||||
};
|
||||
|
||||
enum FileMode
|
||||
{
|
||||
AnyFile,
|
||||
ExistingFile,
|
||||
Directory,
|
||||
ExistingFiles,
|
||||
DirectoryOnly,
|
||||
};
|
||||
|
||||
enum AcceptMode
|
||||
{
|
||||
AcceptOpen,
|
||||
AcceptSave,
|
||||
};
|
||||
|
||||
enum DialogLabel
|
||||
{
|
||||
LookIn,
|
||||
FileName,
|
||||
FileType,
|
||||
Accept,
|
||||
Reject,
|
||||
};
|
||||
|
||||
enum Option
|
||||
{
|
||||
ShowDirsOnly,
|
||||
DontResolveSymlinks,
|
||||
DontConfirmOverwrite,
|
||||
DontUseSheet,
|
||||
DontUseNativeDialog,
|
||||
ReadOnly,
|
||||
HideNameFilterDetails,
|
||||
%If (Qt_5_2_0 -)
|
||||
DontUseCustomDirectoryIcons,
|
||||
%End
|
||||
};
|
||||
|
||||
typedef QFlags<QFileDialog::Option> Options;
|
||||
QFileDialog(QWidget *parent /TransferThis/, Qt::WindowFlags f);
|
||||
QFileDialog(QWidget *parent /TransferThis/ = 0, const QString &caption = QString(), const QString &directory = QString(), const QString &filter = QString());
|
||||
virtual ~QFileDialog();
|
||||
void setDirectory(const QString &directory);
|
||||
void setDirectory(const QDir &adirectory);
|
||||
QDir directory() const;
|
||||
void selectFile(const QString &filename);
|
||||
QStringList selectedFiles() const;
|
||||
void setViewMode(QFileDialog::ViewMode mode);
|
||||
QFileDialog::ViewMode viewMode() const;
|
||||
void setFileMode(QFileDialog::FileMode mode);
|
||||
QFileDialog::FileMode fileMode() const;
|
||||
void setAcceptMode(QFileDialog::AcceptMode mode);
|
||||
QFileDialog::AcceptMode acceptMode() const;
|
||||
void setDefaultSuffix(const QString &suffix);
|
||||
QString defaultSuffix() const;
|
||||
void setHistory(const QStringList &paths);
|
||||
QStringList history() const;
|
||||
void setItemDelegate(QAbstractItemDelegate *delegate /KeepReference/);
|
||||
QAbstractItemDelegate *itemDelegate() const;
|
||||
void setIconProvider(QFileIconProvider *provider /KeepReference/);
|
||||
QFileIconProvider *iconProvider() const;
|
||||
void setLabelText(QFileDialog::DialogLabel label, const QString &text);
|
||||
QString labelText(QFileDialog::DialogLabel label) const;
|
||||
|
||||
signals:
|
||||
void currentChanged(const QString &path);
|
||||
void directoryEntered(const QString &directory);
|
||||
void filesSelected(const QStringList &files);
|
||||
void filterSelected(const QString &filter);
|
||||
void fileSelected(const QString &file);
|
||||
|
||||
public:
|
||||
static QString getExistingDirectory(QWidget *parent = 0, const QString &caption = QString(), const QString &directory = QString(), QFileDialog::Options options = QFileDialog::ShowDirsOnly) /ReleaseGIL/;
|
||||
%If (Qt_5_2_0 -)
|
||||
static QUrl getExistingDirectoryUrl(QWidget *parent = 0, const QString &caption = QString(), const QUrl &directory = QUrl(), QFileDialog::Options options = QFileDialog::ShowDirsOnly, const QStringList &supportedSchemes = QStringList()) /ReleaseGIL/;
|
||||
%End
|
||||
static SIP_PYTUPLE getOpenFileName(QWidget *parent = 0, const QString &caption = QString(), const QString &directory = QString(), const QString &filter = QString(), const QString &initialFilter = QString(), Options options = 0) /TypeHint="Tuple[QString, QString]", ReleaseGIL/;
|
||||
%MethodCode
|
||||
QString *name;
|
||||
QString *filter = new QString(*a4);
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
|
||||
name = new QString(QFileDialog::getOpenFileName(a0, *a1, *a2, *a3, filter, *a5));
|
||||
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
PyObject *name_obj = sipConvertFromNewType(name, sipType_QString, NULL);
|
||||
PyObject *filter_obj = sipConvertFromNewType(filter, sipType_QString, NULL);
|
||||
|
||||
if (name_obj && filter_obj)
|
||||
sipRes = PyTuple_Pack(2, name_obj, filter_obj);
|
||||
|
||||
Py_XDECREF(name_obj);
|
||||
Py_XDECREF(filter_obj);
|
||||
%End
|
||||
|
||||
static SIP_PYTUPLE getOpenFileNames(QWidget *parent = 0, const QString &caption = QString(), const QString &directory = QString(), const QString &filter = QString(), const QString &initialFilter = QString(), Options options = 0) /TypeHint="Tuple[QStringList, QString]", ReleaseGIL/;
|
||||
%MethodCode
|
||||
QStringList *names;
|
||||
QString *filter = new QString(*a4);
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
|
||||
names = new QStringList(QFileDialog::getOpenFileNames(a0, *a1, *a2, *a3, filter, *a5));
|
||||
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
PyObject *names_obj = sipConvertFromNewType(names, sipType_QStringList, NULL);
|
||||
PyObject *filter_obj = sipConvertFromNewType(filter, sipType_QString, NULL);
|
||||
|
||||
if (names_obj && filter_obj)
|
||||
sipRes = PyTuple_Pack(2, names_obj, filter_obj);
|
||||
|
||||
Py_XDECREF(names_obj);
|
||||
Py_XDECREF(filter_obj);
|
||||
%End
|
||||
|
||||
static SIP_PYTUPLE getSaveFileName(QWidget *parent = 0, const QString &caption = QString(), const QString &directory = QString(), const QString &filter = QString(), const QString &initialFilter = QString(), Options options = 0) /TypeHint="Tuple[QString, QString]", ReleaseGIL/;
|
||||
%MethodCode
|
||||
QString *name;
|
||||
QString *filter = new QString(*a4);
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
|
||||
name = new QString(QFileDialog::getSaveFileName(a0, *a1, *a2, *a3, filter, *a5));
|
||||
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
PyObject *name_obj = sipConvertFromNewType(name, sipType_QString, NULL);
|
||||
PyObject *filter_obj = sipConvertFromNewType(filter, sipType_QString, NULL);
|
||||
|
||||
if (name_obj && filter_obj)
|
||||
sipRes = PyTuple_Pack(2, name_obj, filter_obj);
|
||||
|
||||
Py_XDECREF(name_obj);
|
||||
Py_XDECREF(filter_obj);
|
||||
%End
|
||||
|
||||
protected:
|
||||
virtual void done(int result);
|
||||
virtual void accept();
|
||||
virtual void changeEvent(QEvent *e);
|
||||
|
||||
public:
|
||||
void setSidebarUrls(const QList<QUrl> &urls);
|
||||
QList<QUrl> sidebarUrls() const;
|
||||
QByteArray saveState() const;
|
||||
bool restoreState(const QByteArray &state);
|
||||
void setProxyModel(QAbstractProxyModel *model /Transfer/);
|
||||
QAbstractProxyModel *proxyModel() const;
|
||||
void setNameFilter(const QString &filter);
|
||||
void setNameFilters(const QStringList &filters);
|
||||
QStringList nameFilters() const;
|
||||
void selectNameFilter(const QString &filter);
|
||||
QString selectedNameFilter() const;
|
||||
QDir::Filters filter() const;
|
||||
void setFilter(QDir::Filters filters);
|
||||
void setOption(QFileDialog::Option option, bool on = true);
|
||||
bool testOption(QFileDialog::Option option) const;
|
||||
void setOptions(QFileDialog::Options options);
|
||||
QFileDialog::Options options() 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 void setVisible(bool visible);
|
||||
%If (Qt_5_2_0 -)
|
||||
void setDirectoryUrl(const QUrl &directory);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QUrl directoryUrl() const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void selectUrl(const QUrl &url);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QList<QUrl> selectedUrls() const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void setMimeTypeFilters(const QStringList &filters);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QStringList mimeTypeFilters() const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void selectMimeTypeFilter(const QString &filter);
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_5_2_0 -)
|
||||
void urlSelected(const QUrl &url);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void urlsSelected(const QList<QUrl> &urls);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void currentUrlChanged(const QUrl &url);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void directoryUrlEntered(const QUrl &directory);
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_5_2_0 -)
|
||||
static SIP_PYTUPLE getOpenFileUrl(QWidget *parent = 0, const QString &caption = QString(), const QUrl &directory = QUrl(), const QString &filter = QString(), const QString &initialFilter = QString(), Options options = 0, const QStringList &supportedSchemes = QStringList()) /TypeHint="Tuple[QUrl, QString]", ReleaseGIL/;
|
||||
%MethodCode
|
||||
QUrl *url;
|
||||
QString *filter = new QString(*a4);
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
|
||||
url = new QUrl(QFileDialog::getOpenFileUrl(a0, *a1, *a2, *a3, filter, *a5, *a6));
|
||||
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
PyObject *url_obj = sipConvertFromNewType(url, sipType_QUrl, NULL);
|
||||
PyObject *filter_obj = sipConvertFromNewType(filter, sipType_QString, NULL);
|
||||
|
||||
if (url_obj && filter_obj)
|
||||
sipRes = PyTuple_Pack(2, url_obj, filter_obj);
|
||||
|
||||
Py_XDECREF(url_obj);
|
||||
Py_XDECREF(filter_obj);
|
||||
%End
|
||||
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
static SIP_PYTUPLE getOpenFileUrls(QWidget *parent = 0, const QString &caption = QString(), const QUrl &directory = QUrl(), const QString &filter = QString(), const QString &initialFilter = QString(), Options options = 0, const QStringList &supportedSchemes = QStringList()) /TypeHint="Tuple[List[QUrl], QString]", ReleaseGIL/;
|
||||
%MethodCode
|
||||
QList<QUrl> url_list;
|
||||
QString *filter = new QString(*a4);
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
|
||||
url_list = QFileDialog::getOpenFileUrls(a0, *a1, *a2, *a3, filter, *a5, *a6);
|
||||
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
PyObject *url_list_obj = PyList_New(url_list.size());
|
||||
|
||||
if (url_list_obj)
|
||||
{
|
||||
for (int i = 0; i < url_list.size(); ++i)
|
||||
{
|
||||
QUrl *url = new QUrl(url_list.at(i));
|
||||
PyObject *url_obj = sipConvertFromNewType(url, sipType_QUrl, NULL);
|
||||
|
||||
if (!url_obj)
|
||||
{
|
||||
delete url;
|
||||
Py_DECREF(url_list_obj);
|
||||
url_list_obj = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
PyList_SetItem(url_list_obj, i, url_obj);
|
||||
}
|
||||
}
|
||||
|
||||
PyObject *filter_obj = sipConvertFromNewType(filter, sipType_QString, NULL);
|
||||
|
||||
if (url_list_obj && filter_obj)
|
||||
sipRes = PyTuple_Pack(2, url_list_obj, filter_obj);
|
||||
|
||||
Py_XDECREF(url_list_obj);
|
||||
Py_XDECREF(filter_obj);
|
||||
%End
|
||||
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
static SIP_PYTUPLE getSaveFileUrl(QWidget *parent = 0, const QString &caption = QString(), const QUrl &directory = QUrl(), const QString &filter = QString(), const QString &initialFilter = QString(), Options options = 0, const QStringList &supportedSchemes = QStringList()) /TypeHint="Tuple[QUrl, QString]", ReleaseGIL/;
|
||||
%MethodCode
|
||||
QUrl *url;
|
||||
QString *filter = new QString(*a4);
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
|
||||
url = new QUrl(QFileDialog::getSaveFileUrl(a0, *a1, *a2, *a3, filter, *a5, *a6));
|
||||
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
PyObject *url_obj = sipConvertFromNewType(url, sipType_QUrl, NULL);
|
||||
PyObject *filter_obj = sipConvertFromNewType(filter, sipType_QString, NULL);
|
||||
|
||||
if (url_obj && filter_obj)
|
||||
sipRes = PyTuple_Pack(2, url_obj, filter_obj);
|
||||
|
||||
Py_XDECREF(url_obj);
|
||||
Py_XDECREF(filter_obj);
|
||||
%End
|
||||
|
||||
%End
|
||||
%If (Qt_5_6_0 -)
|
||||
void setSupportedSchemes(const QStringList &schemes);
|
||||
%End
|
||||
%If (Qt_5_6_0 -)
|
||||
QStringList supportedSchemes() const;
|
||||
%End
|
||||
%If (Qt_5_9_0 -)
|
||||
QString selectedMimeTypeFilter() const;
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
static void saveFileContent(const QByteArray &fileContent, const QString &fileNameHint = QString()) /ReleaseGIL/;
|
||||
%End
|
||||
};
|
||||
|
||||
QFlags<QFileDialog::Option> operator|(QFileDialog::Option f1, QFlags<QFileDialog::Option> f2);
|
||||
@@ -0,0 +1,71 @@
|
||||
// qfileiconprovider.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QFileIconProvider
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qfileiconprovider.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QFileIconProvider();
|
||||
virtual ~QFileIconProvider();
|
||||
|
||||
enum IconType
|
||||
{
|
||||
Computer,
|
||||
Desktop,
|
||||
Trashcan,
|
||||
Network,
|
||||
Drive,
|
||||
Folder,
|
||||
File,
|
||||
};
|
||||
|
||||
virtual QIcon icon(QFileIconProvider::IconType type) const;
|
||||
virtual QIcon icon(const QFileInfo &info) const;
|
||||
virtual QString type(const QFileInfo &info) const;
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
enum Option
|
||||
{
|
||||
DontUseCustomDirectoryIcons,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
typedef QFlags<QFileIconProvider::Option> Options;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void setOptions(QFileIconProvider::Options options);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QFileIconProvider::Options options() const;
|
||||
%End
|
||||
|
||||
private:
|
||||
QFileIconProvider(const QFileIconProvider &);
|
||||
};
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
QFlags<QFileIconProvider::Option> operator|(QFileIconProvider::Option f1, QFlags<QFileIconProvider::Option> f2);
|
||||
%End
|
||||
@@ -0,0 +1,128 @@
|
||||
// qfilesystemmodel.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QFileSystemModel : public QAbstractItemModel
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qfilesystemmodel.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Roles
|
||||
{
|
||||
FileIconRole,
|
||||
FilePathRole,
|
||||
FileNameRole,
|
||||
FilePermissions,
|
||||
};
|
||||
|
||||
explicit QFileSystemModel(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QFileSystemModel();
|
||||
virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
||||
QModelIndex index(const QString &path, int column = 0) const;
|
||||
virtual QModelIndex parent(const QModelIndex &child) const;
|
||||
virtual bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual bool canFetchMore(const QModelIndex &parent) const;
|
||||
virtual void fetchMore(const QModelIndex &parent);
|
||||
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
QVariant myComputer(int role = Qt::ItemDataRole::DisplayRole) const;
|
||||
virtual QVariant data(const QModelIndex &index, int role = Qt::ItemDataRole::DisplayRole) const;
|
||||
virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::ItemDataRole::EditRole);
|
||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::ItemDataRole::DisplayRole) const;
|
||||
virtual Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
virtual void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
|
||||
virtual QStringList mimeTypes() const;
|
||||
virtual QMimeData *mimeData(const QModelIndexList &indexes) const;
|
||||
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
|
||||
virtual Qt::DropActions supportedDropActions() const;
|
||||
QModelIndex setRootPath(const QString &path);
|
||||
QString rootPath() const;
|
||||
QDir rootDirectory() const;
|
||||
void setIconProvider(QFileIconProvider *provider /KeepReference/);
|
||||
QFileIconProvider *iconProvider() const;
|
||||
void setFilter(QDir::Filters filters);
|
||||
QDir::Filters filter() const;
|
||||
void setResolveSymlinks(bool enable);
|
||||
bool resolveSymlinks() const;
|
||||
void setReadOnly(bool enable);
|
||||
bool isReadOnly() const;
|
||||
void setNameFilterDisables(bool enable);
|
||||
bool nameFilterDisables() const;
|
||||
void setNameFilters(const QStringList &filters);
|
||||
QStringList nameFilters() const;
|
||||
QString filePath(const QModelIndex &index) const;
|
||||
bool isDir(const QModelIndex &index) const;
|
||||
qint64 size(const QModelIndex &index) const;
|
||||
QString type(const QModelIndex &index) const;
|
||||
QDateTime lastModified(const QModelIndex &index) const;
|
||||
QModelIndex mkdir(const QModelIndex &parent, const QString &name);
|
||||
QFileDevice::Permissions permissions(const QModelIndex &index) const;
|
||||
bool rmdir(const QModelIndex &index);
|
||||
QString fileName(const QModelIndex &aindex) const;
|
||||
QIcon fileIcon(const QModelIndex &aindex) const;
|
||||
QFileInfo fileInfo(const QModelIndex &aindex) const;
|
||||
bool remove(const QModelIndex &index);
|
||||
|
||||
signals:
|
||||
void fileRenamed(const QString &path, const QString &oldName, const QString &newName);
|
||||
void rootPathChanged(const QString &newPath);
|
||||
void directoryLoaded(const QString &path);
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *event);
|
||||
virtual void timerEvent(QTimerEvent *event);
|
||||
|
||||
public:
|
||||
%If (Qt_5_7_0 -)
|
||||
virtual QModelIndex sibling(int row, int column, const QModelIndex &idx) const;
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
|
||||
enum Option
|
||||
{
|
||||
DontWatchForChanges,
|
||||
DontResolveSymlinks,
|
||||
DontUseCustomDirectoryIcons,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
typedef QFlags<QFileSystemModel::Option> Options;
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
void setOption(QFileSystemModel::Option option, bool on = true);
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
bool testOption(QFileSystemModel::Option option) const;
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
void setOptions(QFileSystemModel::Options options);
|
||||
%End
|
||||
%If (Qt_5_14_0 -)
|
||||
QFileSystemModel::Options options() const;
|
||||
%End
|
||||
};
|
||||
|
||||
%If (Qt_5_14_0 -)
|
||||
QFlags<QFileSystemModel::Option> operator|(QFileSystemModel::Option f1, QFlags<QFileSystemModel::Option> f2);
|
||||
%End
|
||||
@@ -0,0 +1,40 @@
|
||||
// qfocusframe.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QFocusFrame : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qfocusframe.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QFocusFrame(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QFocusFrame();
|
||||
void setWidget(QWidget *widget);
|
||||
QWidget *widget() const;
|
||||
|
||||
protected:
|
||||
void initStyleOption(QStyleOption *option) const;
|
||||
virtual bool eventFilter(QObject *, QEvent *);
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
};
|
||||
@@ -0,0 +1,59 @@
|
||||
// qfontcombobox.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QFontComboBox : public QComboBox
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qfontcombobox.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum FontFilter
|
||||
{
|
||||
AllFonts,
|
||||
ScalableFonts,
|
||||
NonScalableFonts,
|
||||
MonospacedFonts,
|
||||
ProportionalFonts,
|
||||
};
|
||||
|
||||
QFontComboBox::FontFilters fontFilters() const;
|
||||
explicit QFontComboBox(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QFontComboBox();
|
||||
void setWritingSystem(QFontDatabase::WritingSystem);
|
||||
QFontDatabase::WritingSystem writingSystem() const;
|
||||
typedef QFlags<QFontComboBox::FontFilter> FontFilters;
|
||||
void setFontFilters(QFontComboBox::FontFilters filters);
|
||||
QFont currentFont() const;
|
||||
virtual QSize sizeHint() const;
|
||||
|
||||
public slots:
|
||||
void setCurrentFont(const QFont &f);
|
||||
|
||||
signals:
|
||||
void currentFontChanged(const QFont &f);
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *e);
|
||||
};
|
||||
|
||||
QFlags<QFontComboBox::FontFilter> operator|(QFontComboBox::FontFilter f1, QFlags<QFontComboBox::FontFilter> f2);
|
||||
@@ -0,0 +1,91 @@
|
||||
// qfontdialog.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QFontDialog : public QDialog
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qfontdialog.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum FontDialogOption
|
||||
{
|
||||
NoButtons,
|
||||
DontUseNativeDialog,
|
||||
%If (Qt_5_2_0 -)
|
||||
ScalableFonts,
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
NonScalableFonts,
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
MonospacedFonts,
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
ProportionalFonts,
|
||||
%End
|
||||
};
|
||||
|
||||
typedef QFlags<QFontDialog::FontDialogOption> FontDialogOptions;
|
||||
explicit QFontDialog(QWidget *parent /TransferThis/ = 0);
|
||||
QFontDialog(const QFont &initial, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QFontDialog();
|
||||
static QFont getFont(bool *ok, const QFont &initial, QWidget *parent = 0, const QString &caption = QString(), QFontDialog::FontDialogOptions options = QFontDialog::FontDialogOptions()) /ReleaseGIL/;
|
||||
static QFont getFont(bool *ok, QWidget *parent = 0) /ReleaseGIL/;
|
||||
|
||||
protected:
|
||||
virtual void changeEvent(QEvent *e);
|
||||
virtual void done(int result);
|
||||
virtual bool eventFilter(QObject *object, QEvent *event);
|
||||
|
||||
public:
|
||||
void setCurrentFont(const QFont &font);
|
||||
QFont currentFont() const;
|
||||
QFont selectedFont() const;
|
||||
void setOption(QFontDialog::FontDialogOption option, bool on = true);
|
||||
bool testOption(QFontDialog::FontDialogOption option) const;
|
||||
void setOptions(QFontDialog::FontDialogOptions options);
|
||||
QFontDialog::FontDialogOptions options() 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 void setVisible(bool visible);
|
||||
|
||||
signals:
|
||||
void currentFontChanged(const QFont &font);
|
||||
void fontSelected(const QFont &font);
|
||||
};
|
||||
|
||||
QFlags<QFontDialog::FontDialogOption> operator|(QFontDialog::FontDialogOption f1, QFlags<QFontDialog::FontDialogOption> f2);
|
||||
@@ -0,0 +1,131 @@
|
||||
// qformlayout.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QFormLayout : public QLayout
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qformlayout.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum FieldGrowthPolicy
|
||||
{
|
||||
FieldsStayAtSizeHint,
|
||||
ExpandingFieldsGrow,
|
||||
AllNonFixedFieldsGrow,
|
||||
};
|
||||
|
||||
enum RowWrapPolicy
|
||||
{
|
||||
DontWrapRows,
|
||||
WrapLongRows,
|
||||
WrapAllRows,
|
||||
};
|
||||
|
||||
enum ItemRole
|
||||
{
|
||||
LabelRole,
|
||||
FieldRole,
|
||||
SpanningRole,
|
||||
};
|
||||
|
||||
explicit QFormLayout(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QFormLayout();
|
||||
void setFieldGrowthPolicy(QFormLayout::FieldGrowthPolicy policy);
|
||||
QFormLayout::FieldGrowthPolicy fieldGrowthPolicy() const;
|
||||
void setRowWrapPolicy(QFormLayout::RowWrapPolicy policy);
|
||||
QFormLayout::RowWrapPolicy rowWrapPolicy() const;
|
||||
void setLabelAlignment(Qt::Alignment alignment);
|
||||
Qt::Alignment labelAlignment() const;
|
||||
void setFormAlignment(Qt::Alignment alignment);
|
||||
Qt::Alignment formAlignment() const;
|
||||
void setHorizontalSpacing(int spacing);
|
||||
int horizontalSpacing() const;
|
||||
void setVerticalSpacing(int spacing);
|
||||
int verticalSpacing() const;
|
||||
int spacing() const;
|
||||
void setSpacing(int);
|
||||
void addRow(QWidget *label /Transfer/, QWidget *field /Transfer/);
|
||||
void addRow(QWidget *label /Transfer/, QLayout *field /Transfer/);
|
||||
void addRow(const QString &labelText, QWidget *field /Transfer/);
|
||||
void addRow(const QString &labelText, QLayout *field /Transfer/);
|
||||
void addRow(QWidget *widget /Transfer/);
|
||||
void addRow(QLayout *layout /Transfer/);
|
||||
void insertRow(int row, QWidget *label /Transfer/, QWidget *field /Transfer/);
|
||||
void insertRow(int row, QWidget *label /Transfer/, QLayout *field /Transfer/);
|
||||
void insertRow(int row, const QString &labelText, QWidget *field /Transfer/);
|
||||
void insertRow(int row, const QString &labelText, QLayout *field /Transfer/);
|
||||
void insertRow(int row, QWidget *widget /Transfer/);
|
||||
void insertRow(int row, QLayout *layout /Transfer/);
|
||||
void setItem(int row, QFormLayout::ItemRole role, QLayoutItem *item /Transfer/);
|
||||
void setWidget(int row, QFormLayout::ItemRole role, QWidget *widget /Transfer/);
|
||||
void setLayout(int row, QFormLayout::ItemRole role, QLayout *layout /Transfer/);
|
||||
QLayoutItem *itemAt(int row, QFormLayout::ItemRole role) const;
|
||||
void getItemPosition(int index, int *rowPtr, QFormLayout::ItemRole *rolePtr) const;
|
||||
void getWidgetPosition(QWidget *widget, int *rowPtr, QFormLayout::ItemRole *rolePtr) const;
|
||||
void getLayoutPosition(QLayout *layout, int *rowPtr, QFormLayout::ItemRole *rolePtr) const;
|
||||
QWidget *labelForField(QWidget *field) const;
|
||||
QWidget *labelForField(QLayout *field) const;
|
||||
virtual void addItem(QLayoutItem *item /Transfer/);
|
||||
virtual QLayoutItem *itemAt(int index) const;
|
||||
virtual QLayoutItem *takeAt(int index) /TransferBack/;
|
||||
virtual void setGeometry(const QRect &rect);
|
||||
virtual QSize minimumSize() const;
|
||||
virtual QSize sizeHint() const;
|
||||
virtual void invalidate();
|
||||
virtual bool hasHeightForWidth() const;
|
||||
virtual int heightForWidth(int width) const;
|
||||
virtual Qt::Orientations expandingDirections() const;
|
||||
virtual int count() const;
|
||||
int rowCount() const;
|
||||
%If (Qt_5_8_0 -)
|
||||
|
||||
struct TakeRowResult
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qformlayout.h>
|
||||
%End
|
||||
|
||||
QLayoutItem *labelItem;
|
||||
QLayoutItem *fieldItem;
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
void removeRow(int row);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
void removeRow(QWidget *widget);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
void removeRow(QLayout *layout);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
QFormLayout::TakeRowResult takeRow(int row);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
QFormLayout::TakeRowResult takeRow(QWidget *widget);
|
||||
%End
|
||||
%If (Qt_5_8_0 -)
|
||||
QFormLayout::TakeRowResult takeRow(QLayout *layout);
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,79 @@
|
||||
// qframe.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QFrame : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qframe.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Shadow
|
||||
{
|
||||
Plain,
|
||||
Raised,
|
||||
Sunken,
|
||||
};
|
||||
|
||||
enum Shape
|
||||
{
|
||||
NoFrame,
|
||||
Box,
|
||||
Panel,
|
||||
WinPanel,
|
||||
HLine,
|
||||
VLine,
|
||||
StyledPanel,
|
||||
};
|
||||
|
||||
enum StyleMask
|
||||
{
|
||||
Shadow_Mask,
|
||||
Shape_Mask,
|
||||
};
|
||||
|
||||
QFrame(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
virtual ~QFrame();
|
||||
int frameStyle() const;
|
||||
void setFrameStyle(int);
|
||||
int frameWidth() const;
|
||||
virtual QSize sizeHint() const;
|
||||
QFrame::Shape frameShape() const;
|
||||
void setFrameShape(QFrame::Shape);
|
||||
QFrame::Shadow frameShadow() const;
|
||||
void setFrameShadow(QFrame::Shadow);
|
||||
int lineWidth() const;
|
||||
void setLineWidth(int);
|
||||
int midLineWidth() const;
|
||||
void setMidLineWidth(int);
|
||||
QRect frameRect() const;
|
||||
void setFrameRect(const QRect &);
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void changeEvent(QEvent *);
|
||||
void drawFrame(QPainter *);
|
||||
%If (Qt_5_5_0 -)
|
||||
void initStyleOption(QStyleOptionFrame *option) const;
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,191 @@
|
||||
// qgesture.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGesture : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgesture.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QGesture(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QGesture();
|
||||
Qt::GestureType gestureType() const;
|
||||
Qt::GestureState state() const;
|
||||
QPointF hotSpot() const;
|
||||
void setHotSpot(const QPointF &value);
|
||||
bool hasHotSpot() const;
|
||||
void unsetHotSpot();
|
||||
|
||||
enum GestureCancelPolicy
|
||||
{
|
||||
CancelNone,
|
||||
CancelAllInContext,
|
||||
};
|
||||
|
||||
void setGestureCancelPolicy(QGesture::GestureCancelPolicy policy);
|
||||
QGesture::GestureCancelPolicy gestureCancelPolicy() const;
|
||||
};
|
||||
|
||||
class QPanGesture : public QGesture
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgesture.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QPanGesture(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QPanGesture();
|
||||
QPointF lastOffset() const;
|
||||
QPointF offset() const;
|
||||
QPointF delta() const;
|
||||
qreal acceleration() const;
|
||||
void setLastOffset(const QPointF &value);
|
||||
void setOffset(const QPointF &value);
|
||||
void setAcceleration(qreal value);
|
||||
};
|
||||
|
||||
class QPinchGesture : public QGesture
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgesture.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum ChangeFlag
|
||||
{
|
||||
ScaleFactorChanged,
|
||||
RotationAngleChanged,
|
||||
CenterPointChanged,
|
||||
};
|
||||
|
||||
typedef QFlags<QPinchGesture::ChangeFlag> ChangeFlags;
|
||||
explicit QPinchGesture(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QPinchGesture();
|
||||
QPinchGesture::ChangeFlags totalChangeFlags() const;
|
||||
void setTotalChangeFlags(QPinchGesture::ChangeFlags value);
|
||||
QPinchGesture::ChangeFlags changeFlags() const;
|
||||
void setChangeFlags(QPinchGesture::ChangeFlags value);
|
||||
QPointF startCenterPoint() const;
|
||||
QPointF lastCenterPoint() const;
|
||||
QPointF centerPoint() const;
|
||||
void setStartCenterPoint(const QPointF &value);
|
||||
void setLastCenterPoint(const QPointF &value);
|
||||
void setCenterPoint(const QPointF &value);
|
||||
qreal totalScaleFactor() const;
|
||||
qreal lastScaleFactor() const;
|
||||
qreal scaleFactor() const;
|
||||
void setTotalScaleFactor(qreal value);
|
||||
void setLastScaleFactor(qreal value);
|
||||
void setScaleFactor(qreal value);
|
||||
qreal totalRotationAngle() const;
|
||||
qreal lastRotationAngle() const;
|
||||
qreal rotationAngle() const;
|
||||
void setTotalRotationAngle(qreal value);
|
||||
void setLastRotationAngle(qreal value);
|
||||
void setRotationAngle(qreal value);
|
||||
};
|
||||
|
||||
class QSwipeGesture : public QGesture
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgesture.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum SwipeDirection
|
||||
{
|
||||
NoDirection,
|
||||
Left,
|
||||
Right,
|
||||
Up,
|
||||
Down,
|
||||
};
|
||||
|
||||
explicit QSwipeGesture(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QSwipeGesture();
|
||||
QSwipeGesture::SwipeDirection horizontalDirection() const;
|
||||
QSwipeGesture::SwipeDirection verticalDirection() const;
|
||||
qreal swipeAngle() const;
|
||||
void setSwipeAngle(qreal value);
|
||||
};
|
||||
|
||||
class QTapGesture : public QGesture
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgesture.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QTapGesture(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QTapGesture();
|
||||
QPointF position() const;
|
||||
void setPosition(const QPointF &pos);
|
||||
};
|
||||
|
||||
class QTapAndHoldGesture : public QGesture
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgesture.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QTapAndHoldGesture(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QTapAndHoldGesture();
|
||||
QPointF position() const;
|
||||
void setPosition(const QPointF &pos);
|
||||
static void setTimeout(int msecs);
|
||||
static int timeout();
|
||||
};
|
||||
|
||||
class QGestureEvent : public QEvent
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgesture.h>
|
||||
%End
|
||||
|
||||
%ConvertToSubClassCode
|
||||
sipType = ((sipCpp->type() == QEvent::Gesture) ? sipType_QGestureEvent : 0);
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QGestureEvent(const QList<QGesture *> &gestures);
|
||||
virtual ~QGestureEvent();
|
||||
QList<QGesture *> gestures() const;
|
||||
QGesture *gesture(Qt::GestureType type) const;
|
||||
QList<QGesture *> activeGestures() const;
|
||||
QList<QGesture *> canceledGestures() const;
|
||||
void setAccepted(bool accepted);
|
||||
bool isAccepted() const;
|
||||
void accept();
|
||||
void ignore();
|
||||
void setAccepted(QGesture *, bool);
|
||||
void accept(QGesture *);
|
||||
void ignore(QGesture *);
|
||||
bool isAccepted(QGesture *) const;
|
||||
void setAccepted(Qt::GestureType, bool);
|
||||
void accept(Qt::GestureType);
|
||||
void ignore(Qt::GestureType);
|
||||
bool isAccepted(Qt::GestureType) const;
|
||||
QWidget *widget() const;
|
||||
QPointF mapToGraphicsScene(const QPointF &gesturePoint) const;
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
// qgesturerecognizer.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGestureRecognizer /Supertype=sip.wrapper/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgesturerecognizer.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum ResultFlag
|
||||
{
|
||||
Ignore,
|
||||
MayBeGesture,
|
||||
TriggerGesture,
|
||||
FinishGesture,
|
||||
CancelGesture,
|
||||
ConsumeEventHint,
|
||||
};
|
||||
|
||||
typedef QFlags<QGestureRecognizer::ResultFlag> Result;
|
||||
QGestureRecognizer();
|
||||
virtual ~QGestureRecognizer();
|
||||
virtual QGesture *create(QObject *target) /Factory/;
|
||||
virtual QFlags<QGestureRecognizer::ResultFlag> recognize(QGesture *state, QObject *watched, QEvent *event) = 0;
|
||||
virtual void reset(QGesture *state);
|
||||
static Qt::GestureType registerRecognizer(QGestureRecognizer *recognizer /Transfer/);
|
||||
static void unregisterRecognizer(Qt::GestureType type);
|
||||
};
|
||||
|
||||
QFlags<QGestureRecognizer::ResultFlag> operator|(QGestureRecognizer::ResultFlag f1, QFlags<QGestureRecognizer::ResultFlag> f2);
|
||||
@@ -0,0 +1,67 @@
|
||||
// qgraphicsanchorlayout.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGraphicsAnchor : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsanchorlayout.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
virtual ~QGraphicsAnchor();
|
||||
void setSpacing(qreal spacing);
|
||||
void unsetSpacing();
|
||||
qreal spacing() const;
|
||||
void setSizePolicy(QSizePolicy::Policy policy);
|
||||
QSizePolicy::Policy sizePolicy() const;
|
||||
|
||||
private:
|
||||
QGraphicsAnchor(QGraphicsAnchorLayout *parent);
|
||||
};
|
||||
|
||||
class QGraphicsAnchorLayout : public QGraphicsLayout
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsanchorlayout.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QGraphicsAnchorLayout(QGraphicsLayoutItem *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsAnchorLayout();
|
||||
QGraphicsAnchor *addAnchor(QGraphicsLayoutItem *firstItem /Transfer/, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem /Transfer/, Qt::AnchorPoint secondEdge);
|
||||
QGraphicsAnchor *anchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge);
|
||||
void addCornerAnchors(QGraphicsLayoutItem *firstItem /Transfer/, Qt::Corner firstCorner, QGraphicsLayoutItem *secondItem /Transfer/, Qt::Corner secondCorner);
|
||||
void addAnchors(QGraphicsLayoutItem *firstItem /Transfer/, QGraphicsLayoutItem *secondItem /Transfer/, Qt::Orientations orientations = Qt::Horizontal | Qt::Vertical);
|
||||
void setHorizontalSpacing(qreal spacing);
|
||||
void setVerticalSpacing(qreal spacing);
|
||||
void setSpacing(qreal spacing);
|
||||
qreal horizontalSpacing() const;
|
||||
qreal verticalSpacing() const;
|
||||
virtual void removeAt(int index);
|
||||
virtual void setGeometry(const QRectF &rect);
|
||||
virtual int count() const;
|
||||
virtual QGraphicsLayoutItem *itemAt(int index) const;
|
||||
virtual void invalidate();
|
||||
|
||||
protected:
|
||||
virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
|
||||
};
|
||||
@@ -0,0 +1,187 @@
|
||||
// qgraphicseffect.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGraphicsEffect : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicseffect.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum ChangeFlag
|
||||
{
|
||||
SourceAttached,
|
||||
SourceDetached,
|
||||
SourceBoundingRectChanged,
|
||||
SourceInvalidated,
|
||||
};
|
||||
|
||||
typedef QFlags<QGraphicsEffect::ChangeFlag> ChangeFlags;
|
||||
|
||||
enum PixmapPadMode
|
||||
{
|
||||
NoPad,
|
||||
PadToTransparentBorder,
|
||||
PadToEffectiveBoundingRect,
|
||||
};
|
||||
|
||||
QGraphicsEffect(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsEffect();
|
||||
virtual QRectF boundingRectFor(const QRectF &sourceRect) const;
|
||||
QRectF boundingRect() const;
|
||||
bool isEnabled() const;
|
||||
|
||||
public slots:
|
||||
void setEnabled(bool enable);
|
||||
void update();
|
||||
|
||||
signals:
|
||||
void enabledChanged(bool enabled);
|
||||
|
||||
protected:
|
||||
virtual void draw(QPainter *painter) = 0;
|
||||
virtual void sourceChanged(QGraphicsEffect::ChangeFlags flags);
|
||||
void updateBoundingRect();
|
||||
bool sourceIsPixmap() const;
|
||||
QRectF sourceBoundingRect(Qt::CoordinateSystem system = Qt::LogicalCoordinates) const;
|
||||
void drawSource(QPainter *painter);
|
||||
QPixmap sourcePixmap(Qt::CoordinateSystem system = Qt::LogicalCoordinates, QPoint *offset /Out/ = 0, QGraphicsEffect::PixmapPadMode mode = QGraphicsEffect::PadToEffectiveBoundingRect) const;
|
||||
};
|
||||
|
||||
QFlags<QGraphicsEffect::ChangeFlag> operator|(QGraphicsEffect::ChangeFlag f1, QFlags<QGraphicsEffect::ChangeFlag> f2);
|
||||
|
||||
class QGraphicsColorizeEffect : public QGraphicsEffect
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicseffect.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QGraphicsColorizeEffect(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsColorizeEffect();
|
||||
QColor color() const;
|
||||
qreal strength() const;
|
||||
|
||||
public slots:
|
||||
void setColor(const QColor &c);
|
||||
void setStrength(qreal strength);
|
||||
|
||||
signals:
|
||||
void colorChanged(const QColor &color);
|
||||
void strengthChanged(qreal strength);
|
||||
|
||||
protected:
|
||||
virtual void draw(QPainter *painter);
|
||||
};
|
||||
|
||||
class QGraphicsBlurEffect : public QGraphicsEffect
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicseffect.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum BlurHint
|
||||
{
|
||||
PerformanceHint,
|
||||
QualityHint,
|
||||
AnimationHint,
|
||||
};
|
||||
|
||||
typedef QFlags<QGraphicsBlurEffect::BlurHint> BlurHints;
|
||||
QGraphicsBlurEffect(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsBlurEffect();
|
||||
virtual QRectF boundingRectFor(const QRectF &rect) const;
|
||||
qreal blurRadius() const;
|
||||
QGraphicsBlurEffect::BlurHints blurHints() const;
|
||||
|
||||
public slots:
|
||||
void setBlurRadius(qreal blurRadius);
|
||||
void setBlurHints(QGraphicsBlurEffect::BlurHints hints);
|
||||
|
||||
signals:
|
||||
void blurRadiusChanged(qreal blurRadius);
|
||||
void blurHintsChanged(QGraphicsBlurEffect::BlurHints hints /ScopesStripped=1/);
|
||||
|
||||
protected:
|
||||
virtual void draw(QPainter *painter);
|
||||
};
|
||||
|
||||
QFlags<QGraphicsBlurEffect::BlurHint> operator|(QGraphicsBlurEffect::BlurHint f1, QFlags<QGraphicsBlurEffect::BlurHint> f2);
|
||||
|
||||
class QGraphicsDropShadowEffect : public QGraphicsEffect
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicseffect.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QGraphicsDropShadowEffect(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsDropShadowEffect();
|
||||
virtual QRectF boundingRectFor(const QRectF &rect) const;
|
||||
QPointF offset() const;
|
||||
qreal xOffset() const;
|
||||
qreal yOffset() const;
|
||||
qreal blurRadius() const;
|
||||
QColor color() const;
|
||||
|
||||
public slots:
|
||||
void setOffset(const QPointF &ofs);
|
||||
void setOffset(qreal dx, qreal dy);
|
||||
void setOffset(qreal d);
|
||||
void setXOffset(qreal dx);
|
||||
void setYOffset(qreal dy);
|
||||
void setBlurRadius(qreal blurRadius);
|
||||
void setColor(const QColor &color);
|
||||
|
||||
signals:
|
||||
void offsetChanged(const QPointF &offset);
|
||||
void blurRadiusChanged(qreal blurRadius);
|
||||
void colorChanged(const QColor &color);
|
||||
|
||||
protected:
|
||||
virtual void draw(QPainter *painter);
|
||||
};
|
||||
|
||||
class QGraphicsOpacityEffect : public QGraphicsEffect
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicseffect.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QGraphicsOpacityEffect(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsOpacityEffect();
|
||||
qreal opacity() const;
|
||||
QBrush opacityMask() const;
|
||||
|
||||
public slots:
|
||||
void setOpacity(qreal opacity);
|
||||
void setOpacityMask(const QBrush &mask);
|
||||
|
||||
signals:
|
||||
void opacityChanged(qreal opacity);
|
||||
void opacityMaskChanged(const QBrush &mask);
|
||||
|
||||
protected:
|
||||
virtual void draw(QPainter *painter);
|
||||
};
|
||||
@@ -0,0 +1,100 @@
|
||||
// qgraphicsgridlayout.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGraphicsGridLayout : public QGraphicsLayout
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsgridlayout.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QGraphicsGridLayout(QGraphicsLayoutItem *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsGridLayout();
|
||||
void addItem(QGraphicsLayoutItem *item /Transfer/, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment = Qt::Alignment());
|
||||
void addItem(QGraphicsLayoutItem *item /Transfer/, int row, int column, Qt::Alignment alignment = Qt::Alignment());
|
||||
void setHorizontalSpacing(qreal spacing);
|
||||
qreal horizontalSpacing() const;
|
||||
void setVerticalSpacing(qreal spacing);
|
||||
qreal verticalSpacing() const;
|
||||
void setSpacing(qreal spacing);
|
||||
void setRowSpacing(int row, qreal spacing);
|
||||
qreal rowSpacing(int row) const;
|
||||
void setColumnSpacing(int column, qreal spacing);
|
||||
qreal columnSpacing(int column) const;
|
||||
void setRowStretchFactor(int row, int stretch);
|
||||
int rowStretchFactor(int row) const;
|
||||
void setColumnStretchFactor(int column, int stretch);
|
||||
int columnStretchFactor(int column) const;
|
||||
void setRowMinimumHeight(int row, qreal height);
|
||||
qreal rowMinimumHeight(int row) const;
|
||||
void setRowPreferredHeight(int row, qreal height);
|
||||
qreal rowPreferredHeight(int row) const;
|
||||
void setRowMaximumHeight(int row, qreal height);
|
||||
qreal rowMaximumHeight(int row) const;
|
||||
void setRowFixedHeight(int row, qreal height);
|
||||
void setColumnMinimumWidth(int column, qreal width);
|
||||
qreal columnMinimumWidth(int column) const;
|
||||
void setColumnPreferredWidth(int column, qreal width);
|
||||
qreal columnPreferredWidth(int column) const;
|
||||
void setColumnMaximumWidth(int column, qreal width);
|
||||
qreal columnMaximumWidth(int column) const;
|
||||
void setColumnFixedWidth(int column, qreal width);
|
||||
void setRowAlignment(int row, Qt::Alignment alignment);
|
||||
Qt::Alignment rowAlignment(int row) const;
|
||||
void setColumnAlignment(int column, Qt::Alignment alignment);
|
||||
Qt::Alignment columnAlignment(int column) const;
|
||||
void setAlignment(QGraphicsLayoutItem *item, Qt::Alignment alignment);
|
||||
Qt::Alignment alignment(QGraphicsLayoutItem *item) const;
|
||||
int rowCount() const;
|
||||
int columnCount() const;
|
||||
QGraphicsLayoutItem *itemAt(int row, int column) const;
|
||||
virtual int count() const;
|
||||
virtual QGraphicsLayoutItem *itemAt(int index) const;
|
||||
virtual void removeAt(int index);
|
||||
%MethodCode
|
||||
// The ownership of any existing item must be passed back to Python.
|
||||
QGraphicsLayoutItem *itm;
|
||||
|
||||
if (a0 < sipCpp->count())
|
||||
itm = sipCpp->itemAt(a0);
|
||||
else
|
||||
itm = 0;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipSelfWasArg ? sipCpp->QGraphicsGridLayout::removeAt(a0)
|
||||
: sipCpp->removeAt(a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (itm)
|
||||
{
|
||||
PyObject *itmo = sipGetPyObject(itm, sipType_QGraphicsLayoutItem);
|
||||
|
||||
if (itmo)
|
||||
sipTransferBack(itmo);
|
||||
}
|
||||
%End
|
||||
|
||||
virtual void invalidate();
|
||||
virtual void setGeometry(const QRectF &rect);
|
||||
virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
|
||||
void removeItem(QGraphicsLayoutItem *item /TransferBack/);
|
||||
};
|
||||
@@ -0,0 +1,703 @@
|
||||
// qgraphicsitem.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGraphicsItem /Supertype=sip.wrapper/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsitem.h>
|
||||
%End
|
||||
|
||||
%ConvertToSubClassCode
|
||||
switch (sipCpp->type())
|
||||
{
|
||||
case 2:
|
||||
sipType = sipType_QGraphicsPathItem;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
sipType = sipType_QGraphicsRectItem;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
sipType = sipType_QGraphicsEllipseItem;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
sipType = sipType_QGraphicsPolygonItem;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
sipType = sipType_QGraphicsLineItem;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
sipType = sipType_QGraphicsPixmapItem;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
// Switch to the QObject convertor.
|
||||
*sipCppRet = static_cast<QGraphicsTextItem *>(sipCpp);
|
||||
sipType = sipType_QObject;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
sipType = sipType_QGraphicsSimpleTextItem;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
sipType = sipType_QGraphicsItemGroup;
|
||||
break;
|
||||
|
||||
case 11:
|
||||
// Switch to the QObject convertor.
|
||||
*sipCppRet = static_cast<QGraphicsWidget *>(sipCpp);
|
||||
sipType = sipType_QObject;
|
||||
break;
|
||||
|
||||
case 12:
|
||||
// Switch to the QObject convertor.
|
||||
*sipCppRet = static_cast<QGraphicsProxyWidget *>(sipCpp);
|
||||
sipType = sipType_QObject;
|
||||
break;
|
||||
|
||||
default:
|
||||
sipType = 0;
|
||||
}
|
||||
%End
|
||||
|
||||
public:
|
||||
enum CacheMode
|
||||
{
|
||||
NoCache,
|
||||
ItemCoordinateCache,
|
||||
DeviceCoordinateCache,
|
||||
};
|
||||
|
||||
enum GraphicsItemChange
|
||||
{
|
||||
ItemPositionChange,
|
||||
ItemMatrixChange,
|
||||
ItemVisibleChange,
|
||||
ItemEnabledChange,
|
||||
ItemSelectedChange,
|
||||
ItemParentChange,
|
||||
ItemChildAddedChange,
|
||||
ItemChildRemovedChange,
|
||||
ItemTransformChange,
|
||||
ItemPositionHasChanged,
|
||||
ItemTransformHasChanged,
|
||||
ItemSceneChange,
|
||||
ItemVisibleHasChanged,
|
||||
ItemEnabledHasChanged,
|
||||
ItemSelectedHasChanged,
|
||||
ItemParentHasChanged,
|
||||
ItemSceneHasChanged,
|
||||
ItemCursorChange,
|
||||
ItemCursorHasChanged,
|
||||
ItemToolTipChange,
|
||||
ItemToolTipHasChanged,
|
||||
ItemFlagsChange,
|
||||
ItemFlagsHaveChanged,
|
||||
ItemZValueChange,
|
||||
ItemZValueHasChanged,
|
||||
ItemOpacityChange,
|
||||
ItemOpacityHasChanged,
|
||||
ItemScenePositionHasChanged,
|
||||
ItemRotationChange,
|
||||
ItemRotationHasChanged,
|
||||
ItemScaleChange,
|
||||
ItemScaleHasChanged,
|
||||
ItemTransformOriginPointChange,
|
||||
ItemTransformOriginPointHasChanged,
|
||||
};
|
||||
|
||||
enum GraphicsItemFlag
|
||||
{
|
||||
ItemIsMovable,
|
||||
ItemIsSelectable,
|
||||
ItemIsFocusable,
|
||||
ItemClipsToShape,
|
||||
ItemClipsChildrenToShape,
|
||||
ItemIgnoresTransformations,
|
||||
ItemIgnoresParentOpacity,
|
||||
ItemDoesntPropagateOpacityToChildren,
|
||||
ItemStacksBehindParent,
|
||||
ItemUsesExtendedStyleOption,
|
||||
ItemHasNoContents,
|
||||
ItemSendsGeometryChanges,
|
||||
ItemAcceptsInputMethod,
|
||||
ItemNegativeZStacksBehindParent,
|
||||
ItemIsPanel,
|
||||
ItemSendsScenePositionChanges,
|
||||
%If (Qt_5_4_0 -)
|
||||
ItemContainsChildrenInShape,
|
||||
%End
|
||||
};
|
||||
|
||||
typedef QFlags<QGraphicsItem::GraphicsItemFlag> GraphicsItemFlags;
|
||||
static const int Type;
|
||||
static const int UserType;
|
||||
explicit QGraphicsItem(QGraphicsItem *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsItem();
|
||||
QGraphicsScene *scene() const;
|
||||
QGraphicsItem *parentItem() const;
|
||||
QGraphicsItem *topLevelItem() const;
|
||||
void setParentItem(QGraphicsItem *parent /TransferThis/);
|
||||
QGraphicsItemGroup *group() const;
|
||||
void setGroup(QGraphicsItemGroup *group /KeepReference/);
|
||||
QGraphicsItem::GraphicsItemFlags flags() const;
|
||||
void setFlag(QGraphicsItem::GraphicsItemFlag flag, bool enabled = true);
|
||||
void setFlags(QGraphicsItem::GraphicsItemFlags flags);
|
||||
QString toolTip() const;
|
||||
void setToolTip(const QString &toolTip);
|
||||
QCursor cursor() const;
|
||||
void setCursor(const QCursor &cursor);
|
||||
bool hasCursor() const;
|
||||
void unsetCursor();
|
||||
bool isVisible() const;
|
||||
void setVisible(bool visible);
|
||||
void hide();
|
||||
void show();
|
||||
bool isEnabled() const;
|
||||
void setEnabled(bool enabled);
|
||||
bool isSelected() const;
|
||||
void setSelected(bool selected);
|
||||
bool acceptDrops() const;
|
||||
void setAcceptDrops(bool on);
|
||||
Qt::MouseButtons acceptedMouseButtons() const;
|
||||
void setAcceptedMouseButtons(Qt::MouseButtons buttons);
|
||||
bool hasFocus() const;
|
||||
void setFocus(Qt::FocusReason focusReason = Qt::OtherFocusReason);
|
||||
void clearFocus();
|
||||
QPointF pos() const;
|
||||
qreal x() const;
|
||||
qreal y() const;
|
||||
QPointF scenePos() const;
|
||||
void setPos(const QPointF &pos);
|
||||
void moveBy(qreal dx, qreal dy);
|
||||
void ensureVisible(const QRectF &rect = QRectF(), int xMargin = 50, int yMargin = 50);
|
||||
virtual void advance(int phase);
|
||||
qreal zValue() const;
|
||||
void setZValue(qreal z);
|
||||
virtual QRectF boundingRect() const = 0;
|
||||
QRectF childrenBoundingRect() const;
|
||||
QRectF sceneBoundingRect() const;
|
||||
virtual QPainterPath shape() const;
|
||||
virtual bool contains(const QPointF &point) const;
|
||||
virtual bool collidesWithItem(const QGraphicsItem *other, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
|
||||
virtual bool collidesWithPath(const QPainterPath &path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
|
||||
QList<QGraphicsItem *> collidingItems(Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
|
||||
virtual bool isObscuredBy(const QGraphicsItem *item) const;
|
||||
virtual QPainterPath opaqueArea() const;
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) = 0;
|
||||
void update(const QRectF &rect = QRectF());
|
||||
QPointF mapToItem(const QGraphicsItem *item, const QPointF &point) const;
|
||||
QPointF mapToParent(const QPointF &point) const;
|
||||
QPointF mapToScene(const QPointF &point) const;
|
||||
QPolygonF mapToItem(const QGraphicsItem *item, const QRectF &rect) const;
|
||||
QPolygonF mapToParent(const QRectF &rect) const;
|
||||
QPolygonF mapToScene(const QRectF &rect) const;
|
||||
QPolygonF mapToItem(const QGraphicsItem *item, const QPolygonF &polygon) const;
|
||||
QPolygonF mapToParent(const QPolygonF &polygon) const;
|
||||
QPolygonF mapToScene(const QPolygonF &polygon) const;
|
||||
QPainterPath mapToItem(const QGraphicsItem *item, const QPainterPath &path) const;
|
||||
QPainterPath mapToParent(const QPainterPath &path) const;
|
||||
QPainterPath mapToScene(const QPainterPath &path) const;
|
||||
QPointF mapFromItem(const QGraphicsItem *item, const QPointF &point) const;
|
||||
QPointF mapFromParent(const QPointF &point) const;
|
||||
QPointF mapFromScene(const QPointF &point) const;
|
||||
QPolygonF mapFromItem(const QGraphicsItem *item, const QRectF &rect) const;
|
||||
QPolygonF mapFromParent(const QRectF &rect) const;
|
||||
QPolygonF mapFromScene(const QRectF &rect) const;
|
||||
QPolygonF mapFromItem(const QGraphicsItem *item, const QPolygonF &polygon) const;
|
||||
QPolygonF mapFromParent(const QPolygonF &polygon) const;
|
||||
QPolygonF mapFromScene(const QPolygonF &polygon) const;
|
||||
QPainterPath mapFromItem(const QGraphicsItem *item, const QPainterPath &path) const;
|
||||
QPainterPath mapFromParent(const QPainterPath &path) const;
|
||||
QPainterPath mapFromScene(const QPainterPath &path) const;
|
||||
bool isAncestorOf(const QGraphicsItem *child) const;
|
||||
QVariant data(int key) const;
|
||||
void setData(int key, const QVariant &value);
|
||||
virtual int type() const;
|
||||
void installSceneEventFilter(QGraphicsItem *filterItem);
|
||||
void removeSceneEventFilter(QGraphicsItem *filterItem);
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
|
||||
virtual void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
|
||||
virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
|
||||
virtual void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
|
||||
virtual void dropEvent(QGraphicsSceneDragDropEvent *event);
|
||||
virtual void focusInEvent(QFocusEvent *event);
|
||||
virtual void focusOutEvent(QFocusEvent *event);
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void inputMethodEvent(QInputMethodEvent *event);
|
||||
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
|
||||
virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value);
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
virtual void keyReleaseEvent(QKeyEvent *event);
|
||||
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
void prepareGeometryChange();
|
||||
virtual bool sceneEvent(QEvent *event);
|
||||
virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
||||
virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
|
||||
|
||||
public:
|
||||
void setPos(qreal ax, qreal ay);
|
||||
void ensureVisible(qreal x, qreal y, qreal w, qreal h, int xMargin = 50, int yMargin = 50);
|
||||
void update(qreal ax, qreal ay, qreal width, qreal height);
|
||||
QPointF mapToItem(const QGraphicsItem *item, qreal ax, qreal ay) const;
|
||||
QPointF mapToParent(qreal ax, qreal ay) const;
|
||||
QPointF mapToScene(qreal ax, qreal ay) const;
|
||||
QPointF mapFromItem(const QGraphicsItem *item, qreal ax, qreal ay) const;
|
||||
QPointF mapFromParent(qreal ax, qreal ay) const;
|
||||
QPointF mapFromScene(qreal ax, qreal ay) const;
|
||||
QTransform transform() const;
|
||||
QTransform sceneTransform() const;
|
||||
QTransform deviceTransform(const QTransform &viewportTransform) const;
|
||||
void setTransform(const QTransform &matrix, bool combine = false);
|
||||
void resetTransform();
|
||||
bool isObscured(const QRectF &rect = QRectF()) const;
|
||||
bool isObscured(qreal ax, qreal ay, qreal w, qreal h) const;
|
||||
QPolygonF mapToItem(const QGraphicsItem *item, qreal ax, qreal ay, qreal w, qreal h) const;
|
||||
QPolygonF mapToParent(qreal ax, qreal ay, qreal w, qreal h) const;
|
||||
QPolygonF mapToScene(qreal ax, qreal ay, qreal w, qreal h) const;
|
||||
QPolygonF mapFromItem(const QGraphicsItem *item, qreal ax, qreal ay, qreal w, qreal h) const;
|
||||
QPolygonF mapFromParent(qreal ax, qreal ay, qreal w, qreal h) const;
|
||||
QPolygonF mapFromScene(qreal ax, qreal ay, qreal w, qreal h) const;
|
||||
QGraphicsWidget *parentWidget() const;
|
||||
QGraphicsWidget *topLevelWidget() const;
|
||||
QGraphicsWidget *window() const;
|
||||
QList<QGraphicsItem *> childItems() const;
|
||||
bool isWidget() const;
|
||||
bool isWindow() const;
|
||||
QGraphicsItem::CacheMode cacheMode() const;
|
||||
void setCacheMode(QGraphicsItem::CacheMode mode, const QSize &logicalCacheSize = QSize());
|
||||
bool isVisibleTo(const QGraphicsItem *parent) const;
|
||||
bool acceptHoverEvents() const;
|
||||
void setAcceptHoverEvents(bool enabled);
|
||||
void grabMouse();
|
||||
void ungrabMouse();
|
||||
void grabKeyboard();
|
||||
void ungrabKeyboard();
|
||||
QRegion boundingRegion(const QTransform &itemToDeviceTransform) const;
|
||||
qreal boundingRegionGranularity() const;
|
||||
void setBoundingRegionGranularity(qreal granularity);
|
||||
void scroll(qreal dx, qreal dy, const QRectF &rect = QRectF());
|
||||
QGraphicsItem *commonAncestorItem(const QGraphicsItem *other) const;
|
||||
bool isUnderMouse() const;
|
||||
qreal opacity() const;
|
||||
qreal effectiveOpacity() const;
|
||||
void setOpacity(qreal opacity);
|
||||
QTransform itemTransform(const QGraphicsItem *other, bool *ok = 0) const;
|
||||
bool isClipped() const;
|
||||
QPainterPath clipPath() const;
|
||||
QRectF mapRectToItem(const QGraphicsItem *item, const QRectF &rect) const;
|
||||
QRectF mapRectToParent(const QRectF &rect) const;
|
||||
QRectF mapRectToScene(const QRectF &rect) const;
|
||||
QRectF mapRectFromItem(const QGraphicsItem *item, const QRectF &rect) const;
|
||||
QRectF mapRectFromParent(const QRectF &rect) const;
|
||||
QRectF mapRectFromScene(const QRectF &rect) const;
|
||||
QRectF mapRectToItem(const QGraphicsItem *item, qreal ax, qreal ay, qreal w, qreal h) const;
|
||||
QRectF mapRectToParent(qreal ax, qreal ay, qreal w, qreal h) const;
|
||||
QRectF mapRectToScene(qreal ax, qreal ay, qreal w, qreal h) const;
|
||||
QRectF mapRectFromItem(const QGraphicsItem *item, qreal ax, qreal ay, qreal w, qreal h) const;
|
||||
QRectF mapRectFromParent(qreal ax, qreal ay, qreal w, qreal h) const;
|
||||
QRectF mapRectFromScene(qreal ax, qreal ay, qreal w, qreal h) const;
|
||||
|
||||
enum PanelModality
|
||||
{
|
||||
NonModal,
|
||||
PanelModal,
|
||||
SceneModal,
|
||||
};
|
||||
|
||||
QGraphicsObject *parentObject() const;
|
||||
QGraphicsItem *panel() const;
|
||||
bool isPanel() const;
|
||||
QGraphicsObject *toGraphicsObject();
|
||||
QGraphicsItem::PanelModality panelModality() const;
|
||||
void setPanelModality(QGraphicsItem::PanelModality panelModality);
|
||||
bool isBlockedByModalPanel(QGraphicsItem **blockingPanel /Out/ = 0) const;
|
||||
QGraphicsEffect *graphicsEffect() const;
|
||||
void setGraphicsEffect(QGraphicsEffect *effect /Transfer/);
|
||||
bool acceptTouchEvents() const;
|
||||
void setAcceptTouchEvents(bool enabled);
|
||||
bool filtersChildEvents() const;
|
||||
void setFiltersChildEvents(bool enabled);
|
||||
bool isActive() const;
|
||||
void setActive(bool active);
|
||||
QGraphicsItem *focusProxy() const;
|
||||
void setFocusProxy(QGraphicsItem *item /KeepReference/);
|
||||
QGraphicsItem *focusItem() const;
|
||||
void setX(qreal x);
|
||||
void setY(qreal y);
|
||||
void setRotation(qreal angle);
|
||||
qreal rotation() const;
|
||||
void setScale(qreal scale);
|
||||
qreal scale() const;
|
||||
QList<QGraphicsTransform *> transformations() const;
|
||||
void setTransformations(const QList<QGraphicsTransform *> &transformations /KeepReference/);
|
||||
QPointF transformOriginPoint() const;
|
||||
void setTransformOriginPoint(const QPointF &origin);
|
||||
void setTransformOriginPoint(qreal ax, qreal ay);
|
||||
void stackBefore(const QGraphicsItem *sibling);
|
||||
Qt::InputMethodHints inputMethodHints() const;
|
||||
void setInputMethodHints(Qt::InputMethodHints hints);
|
||||
|
||||
protected:
|
||||
void updateMicroFocus();
|
||||
|
||||
private:
|
||||
QGraphicsItem(const QGraphicsItem &);
|
||||
};
|
||||
|
||||
QFlags<QGraphicsItem::GraphicsItemFlag> operator|(QGraphicsItem::GraphicsItemFlag f1, QFlags<QGraphicsItem::GraphicsItemFlag> f2);
|
||||
|
||||
class QAbstractGraphicsShapeItem : public QGraphicsItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsitem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QAbstractGraphicsShapeItem(QGraphicsItem *parent /TransferThis/ = 0);
|
||||
virtual ~QAbstractGraphicsShapeItem();
|
||||
QPen pen() const;
|
||||
void setPen(const QPen &pen);
|
||||
QBrush brush() const;
|
||||
void setBrush(const QBrush &brush);
|
||||
virtual bool isObscuredBy(const QGraphicsItem *item) const;
|
||||
virtual QPainterPath opaqueArea() const;
|
||||
};
|
||||
|
||||
class QGraphicsPathItem : public QAbstractGraphicsShapeItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsitem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QGraphicsPathItem(QGraphicsItem *parent /TransferThis/ = 0);
|
||||
QGraphicsPathItem(const QPainterPath &path, QGraphicsItem *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsPathItem();
|
||||
QPainterPath path() const;
|
||||
void setPath(const QPainterPath &path);
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual QPainterPath shape() const;
|
||||
virtual bool contains(const QPointF &point) const;
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
virtual bool isObscuredBy(const QGraphicsItem *item) const;
|
||||
virtual QPainterPath opaqueArea() const;
|
||||
virtual int type() const;
|
||||
};
|
||||
|
||||
class QGraphicsRectItem : public QAbstractGraphicsShapeItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsitem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QGraphicsRectItem(QGraphicsItem *parent /TransferThis/ = 0);
|
||||
QGraphicsRectItem(const QRectF &rect, QGraphicsItem *parent /TransferThis/ = 0);
|
||||
QGraphicsRectItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsRectItem();
|
||||
QRectF rect() const;
|
||||
void setRect(const QRectF &rect);
|
||||
void setRect(qreal ax, qreal ay, qreal w, qreal h);
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual QPainterPath shape() const;
|
||||
virtual bool contains(const QPointF &point) const;
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
virtual bool isObscuredBy(const QGraphicsItem *item) const;
|
||||
virtual QPainterPath opaqueArea() const;
|
||||
virtual int type() const;
|
||||
};
|
||||
|
||||
class QGraphicsEllipseItem : public QAbstractGraphicsShapeItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsitem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QGraphicsEllipseItem(QGraphicsItem *parent /TransferThis/ = 0);
|
||||
QGraphicsEllipseItem(const QRectF &rect, QGraphicsItem *parent /TransferThis/ = 0);
|
||||
QGraphicsEllipseItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsEllipseItem();
|
||||
QRectF rect() const;
|
||||
void setRect(const QRectF &rect);
|
||||
void setRect(qreal ax, qreal ay, qreal w, qreal h);
|
||||
int startAngle() const;
|
||||
void setStartAngle(int angle);
|
||||
int spanAngle() const;
|
||||
void setSpanAngle(int angle);
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual QPainterPath shape() const;
|
||||
virtual bool contains(const QPointF &point) const;
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
virtual bool isObscuredBy(const QGraphicsItem *item) const;
|
||||
virtual QPainterPath opaqueArea() const;
|
||||
virtual int type() const;
|
||||
};
|
||||
|
||||
class QGraphicsPolygonItem : public QAbstractGraphicsShapeItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsitem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QGraphicsPolygonItem(QGraphicsItem *parent /TransferThis/ = 0);
|
||||
QGraphicsPolygonItem(const QPolygonF &polygon, QGraphicsItem *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsPolygonItem();
|
||||
QPolygonF polygon() const;
|
||||
void setPolygon(const QPolygonF &polygon);
|
||||
Qt::FillRule fillRule() const;
|
||||
void setFillRule(Qt::FillRule rule);
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual QPainterPath shape() const;
|
||||
virtual bool contains(const QPointF &point) const;
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
virtual bool isObscuredBy(const QGraphicsItem *item) const;
|
||||
virtual QPainterPath opaqueArea() const;
|
||||
virtual int type() const;
|
||||
};
|
||||
|
||||
class QGraphicsLineItem : public QGraphicsItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsitem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QGraphicsLineItem(QGraphicsItem *parent /TransferThis/ = 0);
|
||||
QGraphicsLineItem(const QLineF &line, QGraphicsItem *parent /TransferThis/ = 0);
|
||||
QGraphicsLineItem(qreal x1, qreal y1, qreal x2, qreal y2, QGraphicsItem *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsLineItem();
|
||||
QPen pen() const;
|
||||
void setPen(const QPen &pen);
|
||||
QLineF line() const;
|
||||
void setLine(const QLineF &line);
|
||||
void setLine(qreal x1, qreal y1, qreal x2, qreal y2);
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual QPainterPath shape() const;
|
||||
virtual bool contains(const QPointF &point) const;
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
virtual bool isObscuredBy(const QGraphicsItem *item) const;
|
||||
virtual QPainterPath opaqueArea() const;
|
||||
virtual int type() const;
|
||||
};
|
||||
|
||||
class QGraphicsPixmapItem : public QGraphicsItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsitem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum ShapeMode
|
||||
{
|
||||
MaskShape,
|
||||
BoundingRectShape,
|
||||
HeuristicMaskShape,
|
||||
};
|
||||
|
||||
explicit QGraphicsPixmapItem(QGraphicsItem *parent /TransferThis/ = 0);
|
||||
QGraphicsPixmapItem(const QPixmap &pixmap, QGraphicsItem *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsPixmapItem();
|
||||
QPixmap pixmap() const;
|
||||
void setPixmap(const QPixmap &pixmap);
|
||||
Qt::TransformationMode transformationMode() const;
|
||||
void setTransformationMode(Qt::TransformationMode mode);
|
||||
QPointF offset() const;
|
||||
void setOffset(const QPointF &offset);
|
||||
void setOffset(qreal ax, qreal ay);
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual QPainterPath shape() const;
|
||||
virtual bool contains(const QPointF &point) const;
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
virtual bool isObscuredBy(const QGraphicsItem *item) const;
|
||||
virtual QPainterPath opaqueArea() const;
|
||||
virtual int type() const;
|
||||
QGraphicsPixmapItem::ShapeMode shapeMode() const;
|
||||
void setShapeMode(QGraphicsPixmapItem::ShapeMode mode);
|
||||
};
|
||||
|
||||
class QGraphicsSimpleTextItem : public QAbstractGraphicsShapeItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsitem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QGraphicsSimpleTextItem(QGraphicsItem *parent /TransferThis/ = 0);
|
||||
QGraphicsSimpleTextItem(const QString &text, QGraphicsItem *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsSimpleTextItem();
|
||||
void setText(const QString &text);
|
||||
QString text() const;
|
||||
void setFont(const QFont &font);
|
||||
QFont font() const;
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual QPainterPath shape() const;
|
||||
virtual bool contains(const QPointF &point) const;
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
virtual bool isObscuredBy(const QGraphicsItem *item) const;
|
||||
virtual QPainterPath opaqueArea() const;
|
||||
virtual int type() const;
|
||||
};
|
||||
|
||||
class QGraphicsItemGroup : public QGraphicsItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsitem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QGraphicsItemGroup(QGraphicsItem *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsItemGroup();
|
||||
void addToGroup(QGraphicsItem *item /Transfer/);
|
||||
void removeFromGroup(QGraphicsItem *item /GetWrapper/);
|
||||
%MethodCode
|
||||
sipCpp->removeFromGroup(a0);
|
||||
|
||||
// The item will be passed to the group's parent if there is one. If not,
|
||||
// transfer ownership back to Python.
|
||||
if (sipCpp->parentItem())
|
||||
sipTransferTo(a0Wrapper, sipGetPyObject(sipCpp->parentItem(), sipType_QGraphicsItem));
|
||||
else
|
||||
sipTransferBack(a0Wrapper);
|
||||
%End
|
||||
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
virtual bool isObscuredBy(const QGraphicsItem *item) const;
|
||||
virtual QPainterPath opaqueArea() const;
|
||||
virtual int type() const;
|
||||
};
|
||||
|
||||
class QGraphicsObject : public QObject, public QGraphicsItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsitem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QGraphicsObject(QGraphicsItem *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsObject();
|
||||
void grabGesture(Qt::GestureType type, Qt::GestureFlags flags = Qt::GestureFlags());
|
||||
void ungrabGesture(Qt::GestureType type);
|
||||
|
||||
signals:
|
||||
void parentChanged();
|
||||
void opacityChanged();
|
||||
void visibleChanged();
|
||||
void enabledChanged();
|
||||
void xChanged();
|
||||
void yChanged();
|
||||
void zChanged();
|
||||
void rotationChanged();
|
||||
void scaleChanged();
|
||||
|
||||
protected slots:
|
||||
void updateMicroFocus();
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *ev);
|
||||
};
|
||||
|
||||
class QGraphicsTextItem : public QGraphicsObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsitem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QGraphicsTextItem(QGraphicsItem *parent /TransferThis/ = 0);
|
||||
QGraphicsTextItem(const QString &text, QGraphicsItem *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsTextItem();
|
||||
QString toHtml() const;
|
||||
void setHtml(const QString &html);
|
||||
QString toPlainText() const;
|
||||
void setPlainText(const QString &text);
|
||||
QFont font() const;
|
||||
void setFont(const QFont &font);
|
||||
void setDefaultTextColor(const QColor &c);
|
||||
QColor defaultTextColor() const;
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual QPainterPath shape() const;
|
||||
virtual bool contains(const QPointF &point) const;
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
virtual bool isObscuredBy(const QGraphicsItem *item) const;
|
||||
virtual QPainterPath opaqueArea() const;
|
||||
virtual int type() const;
|
||||
void setTextWidth(qreal width);
|
||||
qreal textWidth() const;
|
||||
void adjustSize();
|
||||
void setDocument(QTextDocument *document /KeepReference/);
|
||||
QTextDocument *document() const;
|
||||
void setTextInteractionFlags(Qt::TextInteractionFlags flags);
|
||||
Qt::TextInteractionFlags textInteractionFlags() const;
|
||||
void setTabChangesFocus(bool b);
|
||||
bool tabChangesFocus() const;
|
||||
void setOpenExternalLinks(bool open);
|
||||
bool openExternalLinks() const;
|
||||
void setTextCursor(const QTextCursor &cursor);
|
||||
QTextCursor textCursor() const;
|
||||
|
||||
signals:
|
||||
void linkActivated(const QString &);
|
||||
void linkHovered(const QString &);
|
||||
|
||||
protected:
|
||||
virtual bool sceneEvent(QEvent *event);
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
virtual void keyReleaseEvent(QKeyEvent *event);
|
||||
virtual void focusInEvent(QFocusEvent *event);
|
||||
virtual void focusOutEvent(QFocusEvent *event);
|
||||
virtual void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
|
||||
virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
|
||||
virtual void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
|
||||
virtual void dropEvent(QGraphicsSceneDragDropEvent *event);
|
||||
virtual void inputMethodEvent(QInputMethodEvent *event);
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
|
||||
};
|
||||
|
||||
%ModuleCode
|
||||
// These are needed by the %ConvertToSubClassCode.
|
||||
#include <qgraphicsproxywidget.h>
|
||||
#include <qgraphicswidget.h>
|
||||
%End
|
||||
@@ -0,0 +1,45 @@
|
||||
// qgraphicslayout.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGraphicsLayout : public QGraphicsLayoutItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicslayout.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QGraphicsLayout(QGraphicsLayoutItem *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsLayout();
|
||||
void setContentsMargins(qreal left, qreal top, qreal right, qreal bottom);
|
||||
virtual void getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const;
|
||||
void activate();
|
||||
bool isActivated() const;
|
||||
virtual void invalidate();
|
||||
virtual void widgetEvent(QEvent *e);
|
||||
virtual int count() const = 0 /__len__/;
|
||||
virtual QGraphicsLayoutItem *itemAt(int i) const = 0;
|
||||
virtual void removeAt(int index) = 0;
|
||||
virtual void updateGeometry();
|
||||
|
||||
protected:
|
||||
void addChildLayoutItem(QGraphicsLayoutItem *layoutItem /Transfer/);
|
||||
};
|
||||
@@ -0,0 +1,75 @@
|
||||
// qgraphicslayoutitem.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGraphicsLayoutItem /Supertype=sip.wrapper/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicslayoutitem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QGraphicsLayoutItem(QGraphicsLayoutItem *parent /TransferThis/ = 0, bool isLayout = false);
|
||||
virtual ~QGraphicsLayoutItem();
|
||||
void setSizePolicy(const QSizePolicy &policy);
|
||||
void setSizePolicy(QSizePolicy::Policy hPolicy, QSizePolicy::Policy vPolicy, QSizePolicy::ControlType controlType = QSizePolicy::DefaultType);
|
||||
QSizePolicy sizePolicy() const;
|
||||
void setMinimumSize(const QSizeF &size);
|
||||
QSizeF minimumSize() const;
|
||||
void setMinimumWidth(qreal width);
|
||||
void setMinimumHeight(qreal height);
|
||||
void setPreferredSize(const QSizeF &size);
|
||||
QSizeF preferredSize() const;
|
||||
void setPreferredWidth(qreal width);
|
||||
void setPreferredHeight(qreal height);
|
||||
void setMaximumSize(const QSizeF &size);
|
||||
QSizeF maximumSize() const;
|
||||
void setMaximumWidth(qreal width);
|
||||
void setMaximumHeight(qreal height);
|
||||
virtual void setGeometry(const QRectF &rect);
|
||||
QRectF geometry() const;
|
||||
virtual void getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const;
|
||||
QRectF contentsRect() const;
|
||||
QSizeF effectiveSizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
|
||||
virtual void updateGeometry();
|
||||
QGraphicsLayoutItem *parentLayoutItem() const;
|
||||
void setParentLayoutItem(QGraphicsLayoutItem *parent /TransferThis/);
|
||||
bool isLayout() const;
|
||||
void setMinimumSize(qreal aw, qreal ah);
|
||||
void setPreferredSize(qreal aw, qreal ah);
|
||||
void setMaximumSize(qreal aw, qreal ah);
|
||||
qreal minimumWidth() const;
|
||||
qreal minimumHeight() const;
|
||||
qreal preferredWidth() const;
|
||||
qreal preferredHeight() const;
|
||||
qreal maximumWidth() const;
|
||||
qreal maximumHeight() const;
|
||||
QGraphicsItem *graphicsItem() const;
|
||||
bool ownedByLayout() const;
|
||||
|
||||
protected:
|
||||
virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const = 0;
|
||||
void setGraphicsItem(QGraphicsItem *item);
|
||||
void setOwnedByLayout(bool ownedByLayout);
|
||||
|
||||
private:
|
||||
QGraphicsLayoutItem(const QGraphicsLayoutItem &);
|
||||
};
|
||||
@@ -0,0 +1,79 @@
|
||||
// qgraphicslinearlayout.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGraphicsLinearLayout : public QGraphicsLayout
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicslinearlayout.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QGraphicsLinearLayout(QGraphicsLayoutItem *parent /TransferThis/ = 0);
|
||||
QGraphicsLinearLayout(Qt::Orientation orientation, QGraphicsLayoutItem *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsLinearLayout();
|
||||
void setOrientation(Qt::Orientation orientation);
|
||||
Qt::Orientation orientation() const;
|
||||
void addItem(QGraphicsLayoutItem *item /Transfer/);
|
||||
void addStretch(int stretch = 1);
|
||||
void insertItem(int index, QGraphicsLayoutItem *item /Transfer/);
|
||||
void insertStretch(int index, int stretch = 1);
|
||||
void removeItem(QGraphicsLayoutItem *item /TransferBack/);
|
||||
virtual void removeAt(int index);
|
||||
%MethodCode
|
||||
// The ownership of any existing item must be passed back to Python.
|
||||
QGraphicsLayoutItem *itm;
|
||||
|
||||
if (a0 < sipCpp->count())
|
||||
itm = sipCpp->itemAt(a0);
|
||||
else
|
||||
itm = 0;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipSelfWasArg ? sipCpp->QGraphicsLinearLayout::removeAt(a0)
|
||||
: sipCpp->removeAt(a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
// The Qt documentation isn't quite correct as ownership isn't always passed
|
||||
// back to the caller.
|
||||
if (itm && !itm->parentLayoutItem())
|
||||
{
|
||||
PyObject *itmo = sipGetPyObject(itm, sipType_QGraphicsLayoutItem);
|
||||
|
||||
if (itmo)
|
||||
sipTransferBack(itmo);
|
||||
}
|
||||
%End
|
||||
|
||||
void setSpacing(qreal spacing);
|
||||
qreal spacing() const;
|
||||
void setItemSpacing(int index, qreal spacing);
|
||||
qreal itemSpacing(int index) const;
|
||||
void setStretchFactor(QGraphicsLayoutItem *item, int stretch);
|
||||
int stretchFactor(QGraphicsLayoutItem *item) const;
|
||||
void setAlignment(QGraphicsLayoutItem *item, Qt::Alignment alignment);
|
||||
Qt::Alignment alignment(QGraphicsLayoutItem *item) const;
|
||||
virtual void setGeometry(const QRectF &rect);
|
||||
virtual int count() const;
|
||||
virtual QGraphicsLayoutItem *itemAt(int index) const;
|
||||
virtual void invalidate();
|
||||
virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
|
||||
};
|
||||
@@ -0,0 +1,88 @@
|
||||
// qgraphicsproxywidget.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGraphicsProxyWidget : public QGraphicsWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsproxywidget.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QGraphicsProxyWidget(QGraphicsItem *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
virtual ~QGraphicsProxyWidget();
|
||||
void setWidget(QWidget *widget /Transfer/);
|
||||
%MethodCode
|
||||
// The ownership of any existing widget must be passed back to Python.
|
||||
QWidget *w = sipCpp->widget();
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->setWidget(a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (w)
|
||||
{
|
||||
PyObject *wo = sipGetPyObject(w, sipType_QWidget);
|
||||
|
||||
if (wo)
|
||||
sipTransferBack(wo);
|
||||
}
|
||||
%End
|
||||
|
||||
QWidget *widget() const;
|
||||
QRectF subWidgetRect(const QWidget *widget) const;
|
||||
virtual void setGeometry(const QRectF &rect);
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
virtual int type() const;
|
||||
QGraphicsProxyWidget *createProxyForChildWidget(QWidget *child) /Factory/;
|
||||
|
||||
protected:
|
||||
virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value);
|
||||
virtual bool event(QEvent *event);
|
||||
virtual bool eventFilter(QObject *object, QEvent *event);
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
virtual void hideEvent(QHideEvent *event);
|
||||
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void grabMouseEvent(QEvent *event);
|
||||
virtual void ungrabMouseEvent(QEvent *event);
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
virtual void keyReleaseEvent(QKeyEvent *event);
|
||||
virtual void focusInEvent(QFocusEvent *event);
|
||||
virtual void focusOutEvent(QFocusEvent *event);
|
||||
virtual bool focusNextPrevChild(bool next);
|
||||
virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
|
||||
virtual void resizeEvent(QGraphicsSceneResizeEvent *event);
|
||||
virtual void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
|
||||
virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
|
||||
virtual void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
|
||||
virtual void dropEvent(QGraphicsSceneDragDropEvent *event);
|
||||
QGraphicsProxyWidget *newProxyWidget(const QWidget *) /Factory/;
|
||||
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
|
||||
virtual void inputMethodEvent(QInputMethodEvent *event);
|
||||
};
|
||||
@@ -0,0 +1,182 @@
|
||||
// qgraphicsscene.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGraphicsScene : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsscene.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum ItemIndexMethod
|
||||
{
|
||||
BspTreeIndex,
|
||||
NoIndex,
|
||||
};
|
||||
|
||||
QGraphicsScene(QObject *parent /TransferThis/ = 0);
|
||||
QGraphicsScene(const QRectF &sceneRect, QObject *parent /TransferThis/ = 0);
|
||||
QGraphicsScene(qreal x, qreal y, qreal width, qreal height, QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsScene();
|
||||
QRectF sceneRect() const;
|
||||
qreal width() const;
|
||||
qreal height() const;
|
||||
void setSceneRect(const QRectF &rect);
|
||||
void setSceneRect(qreal x, qreal y, qreal w, qreal h);
|
||||
void render(QPainter *painter, const QRectF &target = QRectF(), const QRectF &source = QRectF(), Qt::AspectRatioMode mode = Qt::KeepAspectRatio);
|
||||
QGraphicsScene::ItemIndexMethod itemIndexMethod() const;
|
||||
void setItemIndexMethod(QGraphicsScene::ItemIndexMethod method);
|
||||
QRectF itemsBoundingRect() const;
|
||||
QList<QGraphicsItem *> items(Qt::SortOrder order = Qt::DescendingOrder) const;
|
||||
QList<QGraphicsItem *> items(const QPointF &pos, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape, Qt::SortOrder order = Qt::DescendingOrder, const QTransform &deviceTransform = QTransform()) const;
|
||||
QList<QGraphicsItem *> items(const QRectF &rect, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape, Qt::SortOrder order = Qt::DescendingOrder, const QTransform &deviceTransform = QTransform()) const;
|
||||
QList<QGraphicsItem *> items(const QPolygonF &polygon, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape, Qt::SortOrder order = Qt::DescendingOrder, const QTransform &deviceTransform = QTransform()) const;
|
||||
QList<QGraphicsItem *> items(const QPainterPath &path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape, Qt::SortOrder order = Qt::DescendingOrder, const QTransform &deviceTransform = QTransform()) const;
|
||||
QList<QGraphicsItem *> items(qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform = QTransform()) const;
|
||||
QList<QGraphicsItem *> collidingItems(const QGraphicsItem *item, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
|
||||
QList<QGraphicsItem *> selectedItems() const;
|
||||
void setSelectionArea(const QPainterPath &path, const QTransform &deviceTransform);
|
||||
void setSelectionArea(const QPainterPath &path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape, const QTransform &deviceTransform = QTransform());
|
||||
void clearSelection();
|
||||
QGraphicsItemGroup *createItemGroup(const QList<QGraphicsItem *> &items /Transfer/);
|
||||
void destroyItemGroup(QGraphicsItemGroup *group /Transfer/);
|
||||
void addItem(QGraphicsItem *item /Transfer/);
|
||||
QGraphicsEllipseItem *addEllipse(const QRectF &rect, const QPen &pen = QPen(), const QBrush &brush = QBrush());
|
||||
QGraphicsEllipseItem *addEllipse(qreal x, qreal y, qreal w, qreal h, const QPen &pen = QPen(), const QBrush &brush = QBrush());
|
||||
QGraphicsLineItem *addLine(const QLineF &line, const QPen &pen = QPen());
|
||||
QGraphicsLineItem *addLine(qreal x1, qreal y1, qreal x2, qreal y2, const QPen &pen = QPen());
|
||||
QGraphicsPathItem *addPath(const QPainterPath &path, const QPen &pen = QPen(), const QBrush &brush = QBrush());
|
||||
QGraphicsPixmapItem *addPixmap(const QPixmap &pixmap);
|
||||
QGraphicsPolygonItem *addPolygon(const QPolygonF &polygon, const QPen &pen = QPen(), const QBrush &brush = QBrush());
|
||||
QGraphicsRectItem *addRect(const QRectF &rect, const QPen &pen = QPen(), const QBrush &brush = QBrush());
|
||||
QGraphicsRectItem *addRect(qreal x, qreal y, qreal w, qreal h, const QPen &pen = QPen(), const QBrush &brush = QBrush());
|
||||
QGraphicsSimpleTextItem *addSimpleText(const QString &text, const QFont &font = QFont());
|
||||
QGraphicsTextItem *addText(const QString &text, const QFont &font = QFont());
|
||||
void removeItem(QGraphicsItem *item /TransferBack/);
|
||||
QGraphicsItem *focusItem() const;
|
||||
void setFocusItem(QGraphicsItem *item, Qt::FocusReason focusReason = Qt::OtherFocusReason);
|
||||
bool hasFocus() const;
|
||||
void setFocus(Qt::FocusReason focusReason = Qt::OtherFocusReason);
|
||||
void clearFocus();
|
||||
QGraphicsItem *mouseGrabberItem() const;
|
||||
QBrush backgroundBrush() const;
|
||||
void setBackgroundBrush(const QBrush &brush);
|
||||
QBrush foregroundBrush() const;
|
||||
void setForegroundBrush(const QBrush &brush);
|
||||
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
|
||||
QList<QGraphicsView *> views() const;
|
||||
|
||||
public slots:
|
||||
void advance();
|
||||
void update(const QRectF &rect = QRectF());
|
||||
void invalidate(const QRectF &rect = QRectF(), QGraphicsScene::SceneLayers layers = QGraphicsScene::AllLayers);
|
||||
void clear();
|
||||
|
||||
signals:
|
||||
void changed(const QList<QRectF> ®ion);
|
||||
void sceneRectChanged(const QRectF &rect);
|
||||
void selectionChanged();
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *event);
|
||||
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
|
||||
virtual void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
|
||||
virtual void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
|
||||
virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
|
||||
virtual void dropEvent(QGraphicsSceneDragDropEvent *event);
|
||||
virtual void focusInEvent(QFocusEvent *event);
|
||||
virtual void focusOutEvent(QFocusEvent *event);
|
||||
virtual void helpEvent(QGraphicsSceneHelpEvent *event);
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
virtual void keyReleaseEvent(QKeyEvent *event);
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
|
||||
virtual void inputMethodEvent(QInputMethodEvent *event);
|
||||
virtual void drawBackground(QPainter *painter, const QRectF &rect);
|
||||
virtual void drawForeground(QPainter *painter, const QRectF &rect);
|
||||
|
||||
public:
|
||||
enum SceneLayer
|
||||
{
|
||||
ItemLayer,
|
||||
BackgroundLayer,
|
||||
ForegroundLayer,
|
||||
AllLayers,
|
||||
};
|
||||
|
||||
typedef QFlags<QGraphicsScene::SceneLayer> SceneLayers;
|
||||
int bspTreeDepth() const;
|
||||
void setBspTreeDepth(int depth);
|
||||
QPainterPath selectionArea() const;
|
||||
void update(qreal x, qreal y, qreal w, qreal h);
|
||||
QGraphicsProxyWidget *addWidget(QWidget *widget /Transfer/, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
QStyle *style() const;
|
||||
void setStyle(QStyle *style /Transfer/);
|
||||
QFont font() const;
|
||||
void setFont(const QFont &font);
|
||||
QPalette palette() const;
|
||||
void setPalette(const QPalette &palette);
|
||||
QGraphicsWidget *activeWindow() const;
|
||||
void setActiveWindow(QGraphicsWidget *widget);
|
||||
|
||||
protected:
|
||||
virtual bool eventFilter(QObject *watched, QEvent *event);
|
||||
bool focusNextPrevChild(bool next);
|
||||
|
||||
public:
|
||||
void setStickyFocus(bool enabled);
|
||||
bool stickyFocus() const;
|
||||
QGraphicsItem *itemAt(const QPointF &pos, const QTransform &deviceTransform) const;
|
||||
QGraphicsItem *itemAt(qreal x, qreal y, const QTransform &deviceTransform) const;
|
||||
bool isActive() const;
|
||||
QGraphicsItem *activePanel() const;
|
||||
void setActivePanel(QGraphicsItem *item);
|
||||
bool sendEvent(QGraphicsItem *item, QEvent *event);
|
||||
void invalidate(qreal x, qreal y, qreal w, qreal h, QGraphicsScene::SceneLayers layers = QGraphicsScene::AllLayers);
|
||||
%If (Qt_5_4_0 -)
|
||||
qreal minimumRenderSize() const;
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
void setMinimumRenderSize(qreal minSize);
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_5_1_0 -)
|
||||
void focusItemChanged(QGraphicsItem *newFocus, QGraphicsItem *oldFocus, Qt::FocusReason reason);
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_5_5_0 -)
|
||||
void setSelectionArea(const QPainterPath &path, Qt::ItemSelectionOperation selectionOperation, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape, const QTransform &deviceTransform = QTransform());
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
bool focusOnTouch() const;
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
void setFocusOnTouch(bool enabled);
|
||||
%End
|
||||
};
|
||||
|
||||
QFlags<QGraphicsScene::SceneLayer> operator|(QGraphicsScene::SceneLayer f1, QFlags<QGraphicsScene::SceneLayer> f2);
|
||||
@@ -0,0 +1,251 @@
|
||||
// qgraphicssceneevent.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGraphicsSceneEvent : public QEvent /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicssceneevent.h>
|
||||
%End
|
||||
|
||||
%ConvertToSubClassCode
|
||||
switch (sipCpp->type())
|
||||
{
|
||||
case QEvent::GraphicsSceneContextMenu:
|
||||
sipType = sipType_QGraphicsSceneContextMenuEvent;
|
||||
break;
|
||||
|
||||
case QEvent::GraphicsSceneDragEnter:
|
||||
case QEvent::GraphicsSceneDragLeave:
|
||||
case QEvent::GraphicsSceneDragMove:
|
||||
case QEvent::GraphicsSceneDrop:
|
||||
sipType = sipType_QGraphicsSceneDragDropEvent;
|
||||
break;
|
||||
|
||||
case QEvent::GraphicsSceneHelp:
|
||||
sipType = sipType_QGraphicsSceneHelpEvent;
|
||||
break;
|
||||
|
||||
case QEvent::GraphicsSceneHoverEnter:
|
||||
case QEvent::GraphicsSceneHoverLeave:
|
||||
case QEvent::GraphicsSceneHoverMove:
|
||||
sipType = sipType_QGraphicsSceneHoverEvent;
|
||||
break;
|
||||
|
||||
case QEvent::GraphicsSceneMouseDoubleClick:
|
||||
case QEvent::GraphicsSceneMouseMove:
|
||||
case QEvent::GraphicsSceneMousePress:
|
||||
case QEvent::GraphicsSceneMouseRelease:
|
||||
sipType = sipType_QGraphicsSceneMouseEvent;
|
||||
break;
|
||||
|
||||
case QEvent::GraphicsSceneWheel:
|
||||
sipType = sipType_QGraphicsSceneWheelEvent;
|
||||
break;
|
||||
|
||||
case QEvent::GraphicsSceneMove:
|
||||
sipType = sipType_QGraphicsSceneMoveEvent;
|
||||
break;
|
||||
|
||||
case QEvent::GraphicsSceneResize:
|
||||
sipType = sipType_QGraphicsSceneResizeEvent;
|
||||
break;
|
||||
|
||||
default:
|
||||
sipType = 0;
|
||||
}
|
||||
%End
|
||||
|
||||
public:
|
||||
virtual ~QGraphicsSceneEvent();
|
||||
QWidget *widget() const;
|
||||
|
||||
private:
|
||||
QGraphicsSceneEvent(const QGraphicsSceneEvent &);
|
||||
};
|
||||
|
||||
class QGraphicsSceneMouseEvent : public QGraphicsSceneEvent /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicssceneevent.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
virtual ~QGraphicsSceneMouseEvent();
|
||||
QPointF pos() const;
|
||||
QPointF scenePos() const;
|
||||
QPoint screenPos() const;
|
||||
QPointF buttonDownPos(Qt::MouseButton button) const;
|
||||
QPointF buttonDownScenePos(Qt::MouseButton button) const;
|
||||
QPoint buttonDownScreenPos(Qt::MouseButton button) const;
|
||||
QPointF lastPos() const;
|
||||
QPointF lastScenePos() const;
|
||||
QPoint lastScreenPos() const;
|
||||
Qt::MouseButtons buttons() const;
|
||||
Qt::MouseButton button() const;
|
||||
Qt::KeyboardModifiers modifiers() const;
|
||||
%If (Qt_5_4_0 -)
|
||||
Qt::MouseEventSource source() const;
|
||||
%End
|
||||
%If (Qt_5_4_0 -)
|
||||
Qt::MouseEventFlags flags() const;
|
||||
%End
|
||||
|
||||
private:
|
||||
QGraphicsSceneMouseEvent(const QGraphicsSceneMouseEvent &);
|
||||
};
|
||||
|
||||
class QGraphicsSceneWheelEvent : public QGraphicsSceneEvent /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicssceneevent.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
virtual ~QGraphicsSceneWheelEvent();
|
||||
QPointF pos() const;
|
||||
QPointF scenePos() const;
|
||||
QPoint screenPos() const;
|
||||
Qt::MouseButtons buttons() const;
|
||||
Qt::KeyboardModifiers modifiers() const;
|
||||
int delta() const;
|
||||
Qt::Orientation orientation() const;
|
||||
|
||||
private:
|
||||
QGraphicsSceneWheelEvent(const QGraphicsSceneWheelEvent &);
|
||||
};
|
||||
|
||||
class QGraphicsSceneContextMenuEvent : public QGraphicsSceneEvent /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicssceneevent.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Reason
|
||||
{
|
||||
Mouse,
|
||||
Keyboard,
|
||||
Other,
|
||||
};
|
||||
|
||||
virtual ~QGraphicsSceneContextMenuEvent();
|
||||
QPointF pos() const;
|
||||
QPointF scenePos() const;
|
||||
QPoint screenPos() const;
|
||||
Qt::KeyboardModifiers modifiers() const;
|
||||
QGraphicsSceneContextMenuEvent::Reason reason() const;
|
||||
|
||||
private:
|
||||
QGraphicsSceneContextMenuEvent(const QGraphicsSceneContextMenuEvent &);
|
||||
};
|
||||
|
||||
class QGraphicsSceneHoverEvent : public QGraphicsSceneEvent /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicssceneevent.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
virtual ~QGraphicsSceneHoverEvent();
|
||||
QPointF pos() const;
|
||||
QPointF scenePos() const;
|
||||
QPoint screenPos() const;
|
||||
QPointF lastPos() const;
|
||||
QPointF lastScenePos() const;
|
||||
QPoint lastScreenPos() const;
|
||||
Qt::KeyboardModifiers modifiers() const;
|
||||
|
||||
private:
|
||||
QGraphicsSceneHoverEvent(const QGraphicsSceneHoverEvent &);
|
||||
};
|
||||
|
||||
class QGraphicsSceneHelpEvent : public QGraphicsSceneEvent /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicssceneevent.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
virtual ~QGraphicsSceneHelpEvent();
|
||||
QPointF scenePos() const;
|
||||
QPoint screenPos() const;
|
||||
|
||||
private:
|
||||
QGraphicsSceneHelpEvent(const QGraphicsSceneHelpEvent &);
|
||||
};
|
||||
|
||||
class QGraphicsSceneDragDropEvent : public QGraphicsSceneEvent /NoDefaultCtors/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicssceneevent.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
virtual ~QGraphicsSceneDragDropEvent();
|
||||
QPointF pos() const;
|
||||
QPointF scenePos() const;
|
||||
QPoint screenPos() const;
|
||||
Qt::MouseButtons buttons() const;
|
||||
Qt::KeyboardModifiers modifiers() const;
|
||||
Qt::DropActions possibleActions() const;
|
||||
Qt::DropAction proposedAction() const;
|
||||
void acceptProposedAction();
|
||||
Qt::DropAction dropAction() const;
|
||||
void setDropAction(Qt::DropAction action);
|
||||
QWidget *source() const;
|
||||
const QMimeData *mimeData() const;
|
||||
|
||||
private:
|
||||
QGraphicsSceneDragDropEvent(const QGraphicsSceneDragDropEvent &);
|
||||
};
|
||||
|
||||
class QGraphicsSceneResizeEvent : public QGraphicsSceneEvent
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicssceneevent.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QGraphicsSceneResizeEvent();
|
||||
virtual ~QGraphicsSceneResizeEvent();
|
||||
QSizeF oldSize() const;
|
||||
QSizeF newSize() const;
|
||||
|
||||
private:
|
||||
QGraphicsSceneResizeEvent(const QGraphicsSceneResizeEvent &);
|
||||
};
|
||||
|
||||
class QGraphicsSceneMoveEvent : public QGraphicsSceneEvent
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicssceneevent.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QGraphicsSceneMoveEvent();
|
||||
virtual ~QGraphicsSceneMoveEvent();
|
||||
QPointF oldPos() const;
|
||||
QPointF newPos() const;
|
||||
|
||||
private:
|
||||
QGraphicsSceneMoveEvent(const QGraphicsSceneMoveEvent &);
|
||||
};
|
||||
@@ -0,0 +1,87 @@
|
||||
// qgraphicstransform.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGraphicsTransform : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicstransform.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QGraphicsTransform(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsTransform();
|
||||
virtual void applyTo(QMatrix4x4 *matrix) const = 0;
|
||||
|
||||
protected slots:
|
||||
void update();
|
||||
};
|
||||
|
||||
class QGraphicsScale : public QGraphicsTransform
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicstransform.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QGraphicsScale(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsScale();
|
||||
QVector3D origin() const;
|
||||
void setOrigin(const QVector3D &point);
|
||||
qreal xScale() const;
|
||||
void setXScale(qreal);
|
||||
qreal yScale() const;
|
||||
void setYScale(qreal);
|
||||
qreal zScale() const;
|
||||
void setZScale(qreal);
|
||||
virtual void applyTo(QMatrix4x4 *matrix) const;
|
||||
|
||||
signals:
|
||||
void originChanged();
|
||||
void scaleChanged();
|
||||
void xScaleChanged();
|
||||
void yScaleChanged();
|
||||
void zScaleChanged();
|
||||
};
|
||||
|
||||
class QGraphicsRotation : public QGraphicsTransform
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicstransform.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QGraphicsRotation(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsRotation();
|
||||
QVector3D origin() const;
|
||||
void setOrigin(const QVector3D &point);
|
||||
qreal angle() const;
|
||||
void setAngle(qreal);
|
||||
QVector3D axis() const;
|
||||
void setAxis(const QVector3D &axis);
|
||||
void setAxis(Qt::Axis axis);
|
||||
virtual void applyTo(QMatrix4x4 *matrix) const;
|
||||
|
||||
signals:
|
||||
void originChanged();
|
||||
void angleChanged();
|
||||
void axisChanged();
|
||||
};
|
||||
@@ -0,0 +1,194 @@
|
||||
// qgraphicsview.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGraphicsView : public QAbstractScrollArea
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicsview.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum CacheModeFlag
|
||||
{
|
||||
CacheNone,
|
||||
CacheBackground,
|
||||
};
|
||||
|
||||
typedef QFlags<QGraphicsView::CacheModeFlag> CacheMode;
|
||||
|
||||
enum DragMode
|
||||
{
|
||||
NoDrag,
|
||||
ScrollHandDrag,
|
||||
RubberBandDrag,
|
||||
};
|
||||
|
||||
enum ViewportAnchor
|
||||
{
|
||||
NoAnchor,
|
||||
AnchorViewCenter,
|
||||
AnchorUnderMouse,
|
||||
};
|
||||
|
||||
QGraphicsView(QWidget *parent /TransferThis/ = 0);
|
||||
QGraphicsView(QGraphicsScene *scene /KeepReference/, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QGraphicsView();
|
||||
virtual QSize sizeHint() const;
|
||||
QPainter::RenderHints renderHints() const;
|
||||
void setRenderHint(QPainter::RenderHint hint, bool on = true);
|
||||
void setRenderHints(QPainter::RenderHints hints);
|
||||
Qt::Alignment alignment() const;
|
||||
void setAlignment(Qt::Alignment alignment);
|
||||
QGraphicsView::ViewportAnchor transformationAnchor() const;
|
||||
void setTransformationAnchor(QGraphicsView::ViewportAnchor anchor);
|
||||
QGraphicsView::ViewportAnchor resizeAnchor() const;
|
||||
void setResizeAnchor(QGraphicsView::ViewportAnchor anchor);
|
||||
QGraphicsView::DragMode dragMode() const;
|
||||
void setDragMode(QGraphicsView::DragMode mode);
|
||||
QGraphicsView::CacheMode cacheMode() const;
|
||||
void setCacheMode(QGraphicsView::CacheMode mode);
|
||||
void resetCachedContent();
|
||||
bool isInteractive() const;
|
||||
void setInteractive(bool allowed);
|
||||
QGraphicsScene *scene() const;
|
||||
void setScene(QGraphicsScene *scene /KeepReference/);
|
||||
QRectF sceneRect() const;
|
||||
void setSceneRect(const QRectF &rect);
|
||||
void rotate(qreal angle);
|
||||
void scale(qreal sx, qreal sy);
|
||||
void shear(qreal sh, qreal sv);
|
||||
void translate(qreal dx, qreal dy);
|
||||
void centerOn(const QPointF &pos);
|
||||
void centerOn(const QGraphicsItem *item);
|
||||
void ensureVisible(const QRectF &rect, int xMargin = 50, int yMargin = 50);
|
||||
void ensureVisible(const QGraphicsItem *item, int xMargin = 50, int yMargin = 50);
|
||||
void fitInView(const QRectF &rect, Qt::AspectRatioMode mode = Qt::IgnoreAspectRatio);
|
||||
void fitInView(const QGraphicsItem *item, Qt::AspectRatioMode mode = Qt::IgnoreAspectRatio);
|
||||
void render(QPainter *painter, const QRectF &target = QRectF(), const QRect &source = QRect(), Qt::AspectRatioMode mode = Qt::KeepAspectRatio);
|
||||
QList<QGraphicsItem *> items() const;
|
||||
QList<QGraphicsItem *> items(const QPoint &pos) const;
|
||||
QList<QGraphicsItem *> items(int x, int y) const;
|
||||
QList<QGraphicsItem *> items(int x, int y, int w, int h, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
|
||||
QList<QGraphicsItem *> items(const QRect &rect, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
|
||||
QList<QGraphicsItem *> items(const QPolygon &polygon, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
|
||||
QList<QGraphicsItem *> items(const QPainterPath &path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
|
||||
QGraphicsItem *itemAt(const QPoint &pos) const;
|
||||
QPointF mapToScene(const QPoint &point) const;
|
||||
QPolygonF mapToScene(const QRect &rect) const;
|
||||
QPolygonF mapToScene(const QPolygon &polygon) const;
|
||||
QPainterPath mapToScene(const QPainterPath &path) const;
|
||||
QPoint mapFromScene(const QPointF &point) const;
|
||||
QPolygon mapFromScene(const QRectF &rect) const;
|
||||
QPolygon mapFromScene(const QPolygonF &polygon) const;
|
||||
QPainterPath mapFromScene(const QPainterPath &path) const;
|
||||
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
|
||||
QBrush backgroundBrush() const;
|
||||
void setBackgroundBrush(const QBrush &brush);
|
||||
QBrush foregroundBrush() const;
|
||||
void setForegroundBrush(const QBrush &brush);
|
||||
|
||||
public slots:
|
||||
void invalidateScene(const QRectF &rect = QRectF(), QGraphicsScene::SceneLayers layers = QGraphicsScene::AllLayers);
|
||||
void updateScene(const QList<QRectF> &rects);
|
||||
void updateSceneRect(const QRectF &rect);
|
||||
|
||||
protected slots:
|
||||
virtual void setupViewport(QWidget *widget);
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *event);
|
||||
virtual bool viewportEvent(QEvent *event);
|
||||
virtual void contextMenuEvent(QContextMenuEvent *event);
|
||||
virtual void dragEnterEvent(QDragEnterEvent *event);
|
||||
virtual void dragLeaveEvent(QDragLeaveEvent *event);
|
||||
virtual void dragMoveEvent(QDragMoveEvent *event);
|
||||
virtual void dropEvent(QDropEvent *event);
|
||||
virtual void focusInEvent(QFocusEvent *event);
|
||||
virtual void focusOutEvent(QFocusEvent *event);
|
||||
virtual bool focusNextPrevChild(bool next);
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
virtual void keyReleaseEvent(QKeyEvent *event);
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent *event);
|
||||
virtual void mousePressEvent(QMouseEvent *event);
|
||||
virtual void mouseMoveEvent(QMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *event);
|
||||
virtual void wheelEvent(QWheelEvent *event);
|
||||
virtual void paintEvent(QPaintEvent *event);
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
virtual void scrollContentsBy(int dx, int dy);
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
virtual void inputMethodEvent(QInputMethodEvent *event);
|
||||
virtual void drawBackground(QPainter *painter, const QRectF &rect);
|
||||
virtual void drawForeground(QPainter *painter, const QRectF &rect);
|
||||
|
||||
public:
|
||||
void setSceneRect(qreal ax, qreal ay, qreal aw, qreal ah);
|
||||
void centerOn(qreal ax, qreal ay);
|
||||
void ensureVisible(qreal x, qreal y, qreal w, qreal h, int xMargin = 50, int yMargin = 50);
|
||||
void fitInView(qreal x, qreal y, qreal w, qreal h, Qt::AspectRatioMode mode = Qt::IgnoreAspectRatio);
|
||||
QGraphicsItem *itemAt(int ax, int ay) const;
|
||||
QPointF mapToScene(int ax, int ay) const;
|
||||
QPolygonF mapToScene(int ax, int ay, int w, int h) const;
|
||||
QPoint mapFromScene(qreal ax, qreal ay) const;
|
||||
QPolygon mapFromScene(qreal ax, qreal ay, qreal w, qreal h) const;
|
||||
|
||||
enum ViewportUpdateMode
|
||||
{
|
||||
FullViewportUpdate,
|
||||
MinimalViewportUpdate,
|
||||
SmartViewportUpdate,
|
||||
BoundingRectViewportUpdate,
|
||||
NoViewportUpdate,
|
||||
};
|
||||
|
||||
enum OptimizationFlag
|
||||
{
|
||||
DontClipPainter,
|
||||
DontSavePainterState,
|
||||
DontAdjustForAntialiasing,
|
||||
};
|
||||
|
||||
typedef QFlags<QGraphicsView::OptimizationFlag> OptimizationFlags;
|
||||
QGraphicsView::ViewportUpdateMode viewportUpdateMode() const;
|
||||
void setViewportUpdateMode(QGraphicsView::ViewportUpdateMode mode);
|
||||
QGraphicsView::OptimizationFlags optimizationFlags() const;
|
||||
void setOptimizationFlag(QGraphicsView::OptimizationFlag flag, bool enabled = true);
|
||||
void setOptimizationFlags(QGraphicsView::OptimizationFlags flags);
|
||||
Qt::ItemSelectionMode rubberBandSelectionMode() const;
|
||||
void setRubberBandSelectionMode(Qt::ItemSelectionMode mode);
|
||||
QTransform transform() const;
|
||||
QTransform viewportTransform() const;
|
||||
void setTransform(const QTransform &matrix, bool combine = false);
|
||||
void resetTransform();
|
||||
bool isTransformed() const;
|
||||
%If (Qt_5_1_0 -)
|
||||
QRect rubberBandRect() const;
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_5_1_0 -)
|
||||
void rubberBandChanged(QRect viewportRect, QPointF fromScenePoint, QPointF toScenePoint);
|
||||
%End
|
||||
};
|
||||
|
||||
QFlags<QGraphicsView::CacheModeFlag> operator|(QGraphicsView::CacheModeFlag f1, QFlags<QGraphicsView::CacheModeFlag> f2);
|
||||
QFlags<QGraphicsView::OptimizationFlag> operator|(QGraphicsView::OptimizationFlag f1, QFlags<QGraphicsView::OptimizationFlag> f2);
|
||||
@@ -0,0 +1,126 @@
|
||||
// qgraphicswidget.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGraphicsWidget : public QGraphicsObject, public QGraphicsLayoutItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgraphicswidget.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QGraphicsWidget(QGraphicsItem *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
virtual ~QGraphicsWidget();
|
||||
QGraphicsLayout *layout() const;
|
||||
void setLayout(QGraphicsLayout *layout /Transfer/);
|
||||
void adjustSize();
|
||||
Qt::LayoutDirection layoutDirection() const;
|
||||
void setLayoutDirection(Qt::LayoutDirection direction);
|
||||
void unsetLayoutDirection();
|
||||
QStyle *style() const;
|
||||
void setStyle(QStyle *style /KeepReference/);
|
||||
QFont font() const;
|
||||
void setFont(const QFont &font);
|
||||
QPalette palette() const;
|
||||
void setPalette(const QPalette &palette);
|
||||
void resize(const QSizeF &size);
|
||||
void resize(qreal w, qreal h);
|
||||
QSizeF size() const;
|
||||
virtual void setGeometry(const QRectF &rect);
|
||||
QRectF rect() const;
|
||||
%If (Qt_5_14_0 -)
|
||||
void setContentsMargins(QMarginsF margins);
|
||||
%End
|
||||
void setContentsMargins(qreal left, qreal top, qreal right, qreal bottom);
|
||||
virtual void getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const;
|
||||
%If (Qt_5_14_0 -)
|
||||
void setWindowFrameMargins(QMarginsF margins);
|
||||
%End
|
||||
void setWindowFrameMargins(qreal left, qreal top, qreal right, qreal bottom);
|
||||
void getWindowFrameMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const;
|
||||
void unsetWindowFrameMargins();
|
||||
QRectF windowFrameGeometry() const;
|
||||
QRectF windowFrameRect() const;
|
||||
Qt::WindowFlags windowFlags() const;
|
||||
Qt::WindowType windowType() const;
|
||||
void setWindowFlags(Qt::WindowFlags wFlags);
|
||||
bool isActiveWindow() const;
|
||||
void setWindowTitle(const QString &title);
|
||||
QString windowTitle() const;
|
||||
Qt::FocusPolicy focusPolicy() const;
|
||||
void setFocusPolicy(Qt::FocusPolicy policy);
|
||||
static void setTabOrder(QGraphicsWidget *first, QGraphicsWidget *second);
|
||||
QGraphicsWidget *focusWidget() const;
|
||||
int grabShortcut(const QKeySequence &sequence, Qt::ShortcutContext context = Qt::WindowShortcut);
|
||||
void releaseShortcut(int id);
|
||||
void setShortcutEnabled(int id, bool enabled = true);
|
||||
void setShortcutAutoRepeat(int id, bool enabled = true);
|
||||
void addAction(QAction *action);
|
||||
void addActions(QList<QAction *> actions);
|
||||
void insertAction(QAction *before, QAction *action);
|
||||
void insertActions(QAction *before, QList<QAction *> actions);
|
||||
void removeAction(QAction *action);
|
||||
QList<QAction *> actions() const;
|
||||
void setAttribute(Qt::WidgetAttribute attribute, bool on = true);
|
||||
bool testAttribute(Qt::WidgetAttribute attribute) const;
|
||||
virtual int type() const;
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
virtual void paintWindowFrame(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual QPainterPath shape() const;
|
||||
void setGeometry(qreal ax, qreal ay, qreal aw, qreal ah);
|
||||
|
||||
public slots:
|
||||
bool close();
|
||||
|
||||
protected:
|
||||
virtual void initStyleOption(QStyleOption *option) const;
|
||||
virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
|
||||
virtual void updateGeometry();
|
||||
virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value);
|
||||
virtual bool sceneEvent(QEvent *event);
|
||||
virtual bool windowFrameEvent(QEvent *e);
|
||||
virtual Qt::WindowFrameSection windowFrameSectionAt(const QPointF &pos) const;
|
||||
virtual bool event(QEvent *event);
|
||||
virtual void changeEvent(QEvent *event);
|
||||
virtual void closeEvent(QCloseEvent *event);
|
||||
virtual void focusInEvent(QFocusEvent *event);
|
||||
virtual bool focusNextPrevChild(bool next);
|
||||
virtual void focusOutEvent(QFocusEvent *event);
|
||||
virtual void hideEvent(QHideEvent *event);
|
||||
virtual void moveEvent(QGraphicsSceneMoveEvent *event);
|
||||
virtual void polishEvent();
|
||||
virtual void resizeEvent(QGraphicsSceneResizeEvent *event);
|
||||
virtual void showEvent(QShowEvent *event);
|
||||
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void grabMouseEvent(QEvent *event);
|
||||
virtual void ungrabMouseEvent(QEvent *event);
|
||||
virtual void grabKeyboardEvent(QEvent *event);
|
||||
virtual void ungrabKeyboardEvent(QEvent *event);
|
||||
|
||||
public:
|
||||
bool autoFillBackground() const;
|
||||
void setAutoFillBackground(bool enabled);
|
||||
|
||||
signals:
|
||||
void geometryChanged();
|
||||
};
|
||||
@@ -0,0 +1,145 @@
|
||||
// qgridlayout.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGridLayout : public QLayout
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgridlayout.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QGridLayout(QWidget *parent /TransferThis/);
|
||||
QGridLayout();
|
||||
virtual ~QGridLayout();
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSize() const;
|
||||
virtual QSize maximumSize() const;
|
||||
void setRowStretch(int row, int stretch);
|
||||
void setColumnStretch(int column, int stretch);
|
||||
int rowStretch(int row) const;
|
||||
int columnStretch(int column) const;
|
||||
void setRowMinimumHeight(int row, int minSize);
|
||||
void setColumnMinimumWidth(int column, int minSize);
|
||||
int rowMinimumHeight(int row) const;
|
||||
int columnMinimumWidth(int column) const;
|
||||
int columnCount() const;
|
||||
int rowCount() const;
|
||||
QRect cellRect(int row, int column) const;
|
||||
virtual bool hasHeightForWidth() const;
|
||||
virtual int heightForWidth(int) const;
|
||||
virtual int minimumHeightForWidth(int) const;
|
||||
virtual Qt::Orientations expandingDirections() const;
|
||||
virtual void invalidate();
|
||||
void addWidget(QWidget *w /GetWrapper/);
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->addWidget(a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
// The layout's parent widget (if there is one) will now have ownership.
|
||||
QWidget *parent = sipCpp->parentWidget();
|
||||
|
||||
if (parent)
|
||||
{
|
||||
PyObject *py_parent = sipGetPyObject(parent, sipType_QWidget);
|
||||
|
||||
if (py_parent)
|
||||
sipTransferTo(a0Wrapper, py_parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For now give the Python ownership to the layout. This maintains
|
||||
// compatibility with previous versions and allows addWidget(QWidget()).
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
}
|
||||
%End
|
||||
|
||||
void addWidget(QWidget * /GetWrapper/, int row, int column, Qt::Alignment alignment = Qt::Alignment());
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->addWidget(a0, a1, a2, *a3);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
// The layout's parent widget (if there is one) will now have ownership.
|
||||
QWidget *parent = sipCpp->parentWidget();
|
||||
|
||||
if (parent)
|
||||
{
|
||||
PyObject *py_parent = sipGetPyObject(parent, sipType_QWidget);
|
||||
|
||||
if (py_parent)
|
||||
sipTransferTo(a0Wrapper, py_parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For now give the Python ownership to the layout. This maintains
|
||||
// compatibility with previous versions and allows addWidget(QWidget()).
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
}
|
||||
%End
|
||||
|
||||
void addWidget(QWidget * /GetWrapper/, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment = Qt::Alignment());
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->addWidget(a0, a1, a2, a3, a4, *a5);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
// The layout's parent widget (if there is one) will now have ownership.
|
||||
QWidget *parent = sipCpp->parentWidget();
|
||||
|
||||
if (parent)
|
||||
{
|
||||
PyObject *py_parent = sipGetPyObject(parent, sipType_QWidget);
|
||||
|
||||
if (py_parent)
|
||||
sipTransferTo(a0Wrapper, py_parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For now give the Python ownership to the layout. This maintains
|
||||
// compatibility with previous versions and allows addWidget(QWidget()).
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
}
|
||||
%End
|
||||
|
||||
void addLayout(QLayout * /Transfer/, int row, int column, Qt::Alignment alignment = Qt::Alignment());
|
||||
void addLayout(QLayout * /Transfer/, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment = Qt::Alignment());
|
||||
void setOriginCorner(Qt::Corner);
|
||||
Qt::Corner originCorner() const;
|
||||
virtual QLayoutItem *itemAt(int) const;
|
||||
virtual QLayoutItem *takeAt(int) /TransferBack/;
|
||||
virtual int count() const;
|
||||
virtual void setGeometry(const QRect &);
|
||||
void addItem(QLayoutItem *item /Transfer/, int row, int column, int rowSpan = 1, int columnSpan = 1, Qt::Alignment alignment = Qt::Alignment());
|
||||
void setDefaultPositioning(int n, Qt::Orientation orient);
|
||||
void getItemPosition(int idx, int *row, int *column, int *rowSpan, int *columnSpan) const;
|
||||
void setHorizontalSpacing(int spacing);
|
||||
int horizontalSpacing() const;
|
||||
void setVerticalSpacing(int spacing);
|
||||
int verticalSpacing() const;
|
||||
void setSpacing(int spacing);
|
||||
int spacing() const;
|
||||
QLayoutItem *itemAtPosition(int row, int column) const;
|
||||
|
||||
protected:
|
||||
virtual void addItem(QLayoutItem * /Transfer/);
|
||||
};
|
||||
@@ -0,0 +1,62 @@
|
||||
// qgroupbox.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QGroupBox : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qgroupbox.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QGroupBox(QWidget *parent /TransferThis/ = 0);
|
||||
QGroupBox(const QString &title, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QGroupBox();
|
||||
QString title() const;
|
||||
void setTitle(const QString &);
|
||||
Qt::Alignment alignment() const;
|
||||
void setAlignment(int);
|
||||
virtual QSize minimumSizeHint() const;
|
||||
bool isFlat() const;
|
||||
void setFlat(bool b);
|
||||
bool isCheckable() const;
|
||||
void setCheckable(bool b);
|
||||
bool isChecked() const;
|
||||
|
||||
public slots:
|
||||
void setChecked(bool b);
|
||||
|
||||
signals:
|
||||
void clicked(bool checked = false);
|
||||
void toggled(bool);
|
||||
|
||||
protected:
|
||||
void initStyleOption(QStyleOptionGroupBox *option) const;
|
||||
virtual bool event(QEvent *);
|
||||
virtual void childEvent(QChildEvent *);
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void focusInEvent(QFocusEvent *);
|
||||
virtual void changeEvent(QEvent *);
|
||||
virtual void mousePressEvent(QMouseEvent *event);
|
||||
virtual void mouseMoveEvent(QMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *event);
|
||||
};
|
||||
@@ -0,0 +1,183 @@
|
||||
// qheaderview.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QHeaderView : public QAbstractItemView
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qheaderview.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum ResizeMode
|
||||
{
|
||||
Interactive,
|
||||
Fixed,
|
||||
Stretch,
|
||||
ResizeToContents,
|
||||
Custom,
|
||||
};
|
||||
|
||||
QHeaderView(Qt::Orientation orientation, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QHeaderView();
|
||||
virtual void setModel(QAbstractItemModel *model /KeepReference/);
|
||||
Qt::Orientation orientation() const;
|
||||
int offset() const;
|
||||
int length() const;
|
||||
virtual QSize sizeHint() const;
|
||||
int sectionSizeHint(int logicalIndex) const;
|
||||
int visualIndexAt(int position) const;
|
||||
int logicalIndexAt(int position) const;
|
||||
int sectionSize(int logicalIndex) const;
|
||||
int sectionPosition(int logicalIndex) const;
|
||||
int sectionViewportPosition(int logicalIndex) const;
|
||||
void moveSection(int from, int to);
|
||||
void resizeSection(int logicalIndex, int size);
|
||||
bool isSectionHidden(int logicalIndex) const;
|
||||
void setSectionHidden(int logicalIndex, bool hide);
|
||||
int count() const /__len__/;
|
||||
int visualIndex(int logicalIndex) const;
|
||||
int logicalIndex(int visualIndex) const;
|
||||
void setHighlightSections(bool highlight);
|
||||
bool highlightSections() const;
|
||||
int stretchSectionCount() const;
|
||||
void setSortIndicatorShown(bool show);
|
||||
bool isSortIndicatorShown() const;
|
||||
void setSortIndicator(int logicalIndex, Qt::SortOrder order);
|
||||
int sortIndicatorSection() const;
|
||||
Qt::SortOrder sortIndicatorOrder() const;
|
||||
bool stretchLastSection() const;
|
||||
void setStretchLastSection(bool stretch);
|
||||
bool sectionsMoved() const;
|
||||
|
||||
public slots:
|
||||
void setOffset(int offset);
|
||||
void headerDataChanged(Qt::Orientation orientation, int logicalFirst, int logicalLast);
|
||||
void setOffsetToSectionPosition(int visualIndex);
|
||||
|
||||
signals:
|
||||
void geometriesChanged();
|
||||
void sectionMoved(int logicalIndex, int oldVisualIndex, int newVisualIndex);
|
||||
void sectionResized(int logicalIndex, int oldSize, int newSize);
|
||||
void sectionPressed(int logicalIndex);
|
||||
void sectionClicked(int logicalIndex);
|
||||
void sectionDoubleClicked(int logicalIndex);
|
||||
void sectionCountChanged(int oldCount, int newCount);
|
||||
void sectionHandleDoubleClicked(int logicalIndex);
|
||||
|
||||
protected slots:
|
||||
void updateSection(int logicalIndex);
|
||||
void resizeSections();
|
||||
void sectionsInserted(const QModelIndex &parent, int logicalFirst, int logicalLast);
|
||||
void sectionsAboutToBeRemoved(const QModelIndex &parent, int logicalFirst, int logicalLast);
|
||||
|
||||
protected:
|
||||
void initialize();
|
||||
void initializeSections();
|
||||
void initializeSections(int start, int end);
|
||||
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &old);
|
||||
virtual bool event(QEvent *e);
|
||||
virtual bool viewportEvent(QEvent *e);
|
||||
virtual void paintEvent(QPaintEvent *e);
|
||||
virtual void mousePressEvent(QMouseEvent *e);
|
||||
virtual void mouseMoveEvent(QMouseEvent *e);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *e);
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent *e);
|
||||
virtual void paintSection(QPainter *painter, const QRect &rect, int logicalIndex) const;
|
||||
virtual QSize sectionSizeFromContents(int logicalIndex) const;
|
||||
virtual int horizontalOffset() const;
|
||||
virtual int verticalOffset() const;
|
||||
virtual void updateGeometries();
|
||||
virtual void scrollContentsBy(int dx, int dy);
|
||||
virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int>());
|
||||
virtual void rowsInserted(const QModelIndex &parent, int start, int end);
|
||||
virtual QRect visualRect(const QModelIndex &index) const;
|
||||
virtual void scrollTo(const QModelIndex &index, QAbstractItemView::ScrollHint hint);
|
||||
virtual QModelIndex indexAt(const QPoint &p) const;
|
||||
virtual bool isIndexHidden(const QModelIndex &index) const;
|
||||
virtual QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers);
|
||||
virtual void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags flags);
|
||||
virtual QRegion visualRegionForSelection(const QItemSelection &selection) const;
|
||||
|
||||
public:
|
||||
int logicalIndexAt(int ax, int ay) const;
|
||||
int logicalIndexAt(const QPoint &apos) const;
|
||||
void hideSection(int alogicalIndex);
|
||||
void showSection(int alogicalIndex);
|
||||
void resizeSections(QHeaderView::ResizeMode mode);
|
||||
int hiddenSectionCount() const;
|
||||
int defaultSectionSize() const;
|
||||
void setDefaultSectionSize(int size);
|
||||
Qt::Alignment defaultAlignment() const;
|
||||
void setDefaultAlignment(Qt::Alignment alignment);
|
||||
bool sectionsHidden() const;
|
||||
void swapSections(int first, int second);
|
||||
bool cascadingSectionResizes() const;
|
||||
void setCascadingSectionResizes(bool enable);
|
||||
int minimumSectionSize() const;
|
||||
void setMinimumSectionSize(int size);
|
||||
QByteArray saveState() const;
|
||||
bool restoreState(const QByteArray &state);
|
||||
virtual void reset();
|
||||
|
||||
public slots:
|
||||
void setOffsetToLastSection();
|
||||
|
||||
signals:
|
||||
void sectionEntered(int logicalIndex);
|
||||
void sortIndicatorChanged(int logicalIndex, Qt::SortOrder order);
|
||||
|
||||
protected:
|
||||
void initStyleOption(QStyleOptionHeader *option) const;
|
||||
|
||||
public:
|
||||
void setSectionsMovable(bool movable);
|
||||
bool sectionsMovable() const;
|
||||
void setSectionsClickable(bool clickable);
|
||||
bool sectionsClickable() const;
|
||||
QHeaderView::ResizeMode sectionResizeMode(int logicalIndex) const;
|
||||
void setSectionResizeMode(int logicalIndex, QHeaderView::ResizeMode mode);
|
||||
void setSectionResizeMode(QHeaderView::ResizeMode mode);
|
||||
%If (Qt_5_2_0 -)
|
||||
virtual void setVisible(bool v);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void setResizeContentsPrecision(int precision);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
int resizeContentsPrecision() const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
int maximumSectionSize() const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void setMaximumSectionSize(int size);
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
void resetDefaultSectionSize();
|
||||
%End
|
||||
%If (Qt_5_11_0 -)
|
||||
void setFirstSectionMovable(bool movable);
|
||||
%End
|
||||
%If (Qt_5_11_0 -)
|
||||
bool isFirstSectionMovable() const;
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,136 @@
|
||||
// qinputdialog.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 : public 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/;
|
||||
%If (Qt_5_10_0 -)
|
||||
static double getDouble(QWidget *parent, const QString &title, const QString &label, double value, double minValue, double maxValue, int decimals, bool *ok, Qt::WindowFlags flags, double step);
|
||||
%End
|
||||
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);
|
||||
|
||||
public:
|
||||
%If (Qt_5_10_0 -)
|
||||
void setDoubleStep(double step);
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
double doubleStep() const;
|
||||
%End
|
||||
};
|
||||
|
||||
QFlags<QInputDialog::InputDialogOption> operator|(QInputDialog::InputDialogOption f1, QFlags<QInputDialog::InputDialogOption> f2);
|
||||
@@ -0,0 +1,51 @@
|
||||
// qitemdelegate.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QItemDelegate : public QAbstractItemDelegate
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qitemdelegate.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QItemDelegate(QObject *parent /TransferThis/ = 0);
|
||||
virtual ~QItemDelegate();
|
||||
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option /NoCopy/, const QModelIndex &index) const;
|
||||
virtual QSize sizeHint(const QStyleOptionViewItem &option /NoCopy/, const QModelIndex &index) const;
|
||||
virtual QWidget *createEditor(QWidget *parent /TransferThis/, const QStyleOptionViewItem &option /NoCopy/, const QModelIndex &index) const /Factory/;
|
||||
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const;
|
||||
virtual void setModelData(QWidget *editor, QAbstractItemModel *model /KeepReference/, const QModelIndex &index) const;
|
||||
virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option /NoCopy/, const QModelIndex &index) const;
|
||||
QItemEditorFactory *itemEditorFactory() const;
|
||||
void setItemEditorFactory(QItemEditorFactory *factory /KeepReference/);
|
||||
bool hasClipping() const;
|
||||
void setClipping(bool clip);
|
||||
|
||||
protected:
|
||||
void drawBackground(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
||||
virtual void drawCheck(QPainter *painter, const QStyleOptionViewItem &option /NoCopy/, const QRect &rect, Qt::CheckState state) const;
|
||||
virtual void drawDecoration(QPainter *painter, const QStyleOptionViewItem &option /NoCopy/, const QRect &rect, const QPixmap &pixmap) const;
|
||||
virtual void drawDisplay(QPainter *painter, const QStyleOptionViewItem &option /NoCopy/, const QRect &rect, const QString &text) const;
|
||||
virtual void drawFocus(QPainter *painter, const QStyleOptionViewItem &option /NoCopy/, const QRect &rect) const;
|
||||
virtual bool eventFilter(QObject *object, QEvent *event);
|
||||
virtual bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option /NoCopy/, const QModelIndex &index);
|
||||
};
|
||||
@@ -0,0 +1,49 @@
|
||||
// qitemeditorfactory.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QItemEditorCreatorBase /Supertype=sip.wrapper/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qitemeditorfactory.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
virtual ~QItemEditorCreatorBase();
|
||||
virtual QWidget *createWidget(QWidget *parent /TransferThis/) const = 0 /Factory/;
|
||||
virtual QByteArray valuePropertyName() const = 0;
|
||||
};
|
||||
|
||||
class QItemEditorFactory /Supertype=sip.wrapper/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qitemeditorfactory.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QItemEditorFactory();
|
||||
virtual ~QItemEditorFactory();
|
||||
virtual QWidget *createEditor(int userType, QWidget *parent /TransferThis/) const;
|
||||
virtual QByteArray valuePropertyName(int userType) const;
|
||||
void registerEditor(int userType, QItemEditorCreatorBase *creator /Transfer/);
|
||||
static const QItemEditorFactory *defaultFactory();
|
||||
static void setDefaultFactory(QItemEditorFactory *factory /Transfer/);
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
// qkeyeventtransition.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QKeyEventTransition : public QEventTransition
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qkeyeventtransition.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QKeyEventTransition(QState *sourceState /TransferThis/ = 0);
|
||||
QKeyEventTransition(QObject *object /KeepReference=10/, QEvent::Type type, int key, QState *sourceState /TransferThis/ = 0);
|
||||
virtual ~QKeyEventTransition();
|
||||
int key() const;
|
||||
void setKey(int key);
|
||||
Qt::KeyboardModifiers modifierMask() const;
|
||||
void setModifierMask(Qt::KeyboardModifiers modifiers);
|
||||
|
||||
protected:
|
||||
virtual void onTransition(QEvent *event);
|
||||
virtual bool eventTest(QEvent *event);
|
||||
};
|
||||
@@ -0,0 +1,52 @@
|
||||
// qkeysequenceedit.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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.
|
||||
|
||||
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
class QKeySequenceEdit : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qkeysequenceedit.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QKeySequenceEdit(QWidget *parent /TransferThis/ = 0);
|
||||
QKeySequenceEdit(const QKeySequence &keySequence, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QKeySequenceEdit();
|
||||
QKeySequence keySequence() const;
|
||||
|
||||
public slots:
|
||||
void setKeySequence(const QKeySequence &keySequence);
|
||||
void clear();
|
||||
|
||||
signals:
|
||||
void editingFinished();
|
||||
void keySequenceChanged(const QKeySequence &keySequence);
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
virtual void keyReleaseEvent(QKeyEvent *);
|
||||
virtual void timerEvent(QTimerEvent *);
|
||||
};
|
||||
|
||||
%End
|
||||
@@ -0,0 +1,90 @@
|
||||
// qlabel.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QLabel : public QFrame
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlabel.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QLabel(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
QLabel(const QString &text, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
virtual ~QLabel();
|
||||
QString text() const;
|
||||
const QPixmap *pixmap() const;
|
||||
const QPicture *picture() const;
|
||||
QMovie *movie() const;
|
||||
Qt::TextFormat textFormat() const;
|
||||
void setTextFormat(Qt::TextFormat);
|
||||
Qt::Alignment alignment() const;
|
||||
void setAlignment(Qt::Alignment);
|
||||
void setWordWrap(bool on);
|
||||
bool wordWrap() const;
|
||||
int indent() const;
|
||||
void setIndent(int);
|
||||
int margin() const;
|
||||
void setMargin(int);
|
||||
bool hasScaledContents() const;
|
||||
void setScaledContents(bool);
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
void setBuddy(QWidget * /KeepReference/);
|
||||
QWidget *buddy() const;
|
||||
virtual int heightForWidth(int) const;
|
||||
bool openExternalLinks() const;
|
||||
void setTextInteractionFlags(Qt::TextInteractionFlags flags);
|
||||
Qt::TextInteractionFlags textInteractionFlags() const;
|
||||
void setOpenExternalLinks(bool open);
|
||||
|
||||
public slots:
|
||||
void clear();
|
||||
void setMovie(QMovie *movie /KeepReference/);
|
||||
void setNum(double /Constrained/);
|
||||
void setNum(int);
|
||||
void setPicture(const QPicture &);
|
||||
void setPixmap(const QPixmap &);
|
||||
void setText(const QString &);
|
||||
|
||||
signals:
|
||||
void linkActivated(const QString &link);
|
||||
void linkHovered(const QString &link);
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void changeEvent(QEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *ev);
|
||||
virtual void mousePressEvent(QMouseEvent *ev);
|
||||
virtual void mouseMoveEvent(QMouseEvent *ev);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *ev);
|
||||
virtual void contextMenuEvent(QContextMenuEvent *ev);
|
||||
virtual void focusInEvent(QFocusEvent *ev);
|
||||
virtual void focusOutEvent(QFocusEvent *ev);
|
||||
virtual bool focusNextPrevChild(bool next);
|
||||
|
||||
public:
|
||||
void setSelection(int, int);
|
||||
bool hasSelectedText() const;
|
||||
QString selectedText() const;
|
||||
int selectionStart() const;
|
||||
};
|
||||
@@ -0,0 +1,173 @@
|
||||
// qlayout.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QLayout : public QObject, public QLayoutItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlayout.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum SizeConstraint
|
||||
{
|
||||
SetDefaultConstraint,
|
||||
SetNoConstraint,
|
||||
SetMinimumSize,
|
||||
SetFixedSize,
|
||||
SetMaximumSize,
|
||||
SetMinAndMaxSize,
|
||||
};
|
||||
|
||||
QLayout(QWidget *parent /TransferThis/);
|
||||
QLayout();
|
||||
virtual ~QLayout();
|
||||
int spacing() const;
|
||||
void setSpacing(int);
|
||||
bool setAlignment(QWidget *w, Qt::Alignment alignment);
|
||||
bool setAlignment(QLayout *l, Qt::Alignment alignment);
|
||||
void setAlignment(Qt::Alignment alignment);
|
||||
void setSizeConstraint(QLayout::SizeConstraint);
|
||||
QLayout::SizeConstraint sizeConstraint() const;
|
||||
void setMenuBar(QWidget *w /GetWrapper/);
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->setMenuBar(a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
// The layout's parent widget (if there is one) will now have ownership.
|
||||
QWidget *parent = sipCpp->parentWidget();
|
||||
|
||||
if (a0 && parent)
|
||||
{
|
||||
PyObject *py_parent = sipGetPyObject(parent, sipType_QWidget);
|
||||
|
||||
if (py_parent)
|
||||
sipTransferTo(a0Wrapper, py_parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For now give the Python ownership to the layout. This maintains
|
||||
// compatibility with previous versions and allows setMenuBar(QWidget()).
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
}
|
||||
%End
|
||||
|
||||
QWidget *menuBar() const;
|
||||
QWidget *parentWidget() const;
|
||||
virtual void invalidate();
|
||||
virtual QRect geometry() const;
|
||||
bool activate();
|
||||
void update();
|
||||
void addWidget(QWidget *w /GetWrapper/);
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->addWidget(a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
// The layout's parent widget (if there is one) will now have ownership.
|
||||
QWidget *parent = sipCpp->parentWidget();
|
||||
|
||||
if (parent)
|
||||
{
|
||||
PyObject *py_parent = sipGetPyObject(parent, sipType_QWidget);
|
||||
|
||||
if (py_parent)
|
||||
sipTransferTo(a0Wrapper, py_parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For now give the Python ownership to the layout. This maintains
|
||||
// compatibility with previous versions and allows addWidget(QWidget()).
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
}
|
||||
%End
|
||||
|
||||
virtual void addItem(QLayoutItem * /Transfer/) = 0;
|
||||
void removeWidget(QWidget *w /TransferBack/);
|
||||
void removeItem(QLayoutItem * /TransferBack/);
|
||||
virtual Qt::Orientations expandingDirections() const;
|
||||
virtual QSize minimumSize() const;
|
||||
virtual QSize maximumSize() const;
|
||||
virtual void setGeometry(const QRect &);
|
||||
virtual QLayoutItem *itemAt(int index) const = 0;
|
||||
virtual QLayoutItem *takeAt(int index) = 0 /TransferBack/;
|
||||
virtual int indexOf(QWidget *) const;
|
||||
%If (Qt_5_12_0 -)
|
||||
int indexOf(QLayoutItem *) const;
|
||||
%End
|
||||
virtual int count() const = 0 /__len__/;
|
||||
virtual bool isEmpty() const;
|
||||
int totalHeightForWidth(int w) const;
|
||||
QSize totalMinimumSize() const;
|
||||
QSize totalMaximumSize() const;
|
||||
QSize totalSizeHint() const;
|
||||
virtual QLayout *layout();
|
||||
void setEnabled(bool);
|
||||
bool isEnabled() const;
|
||||
static QSize closestAcceptableSize(const QWidget *w, const QSize &s);
|
||||
|
||||
protected:
|
||||
void widgetEvent(QEvent *);
|
||||
virtual void childEvent(QChildEvent *e);
|
||||
void addChildLayout(QLayout *l /Transfer/);
|
||||
void addChildWidget(QWidget *w /GetWrapper/);
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
#if defined(SIP_PROTECTED_IS_PUBLIC)
|
||||
sipCpp->addChildWidget(a0);
|
||||
#else
|
||||
sipCpp->sipProtect_addChildWidget(a0);
|
||||
#endif
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
// The layout's parent widget (if there is one) will now have ownership.
|
||||
QWidget *parent = sipCpp->parentWidget();
|
||||
|
||||
if (parent)
|
||||
{
|
||||
PyObject *py_parent = sipGetPyObject(parent, sipType_QWidget);
|
||||
|
||||
if (py_parent)
|
||||
sipTransferTo(a0Wrapper, py_parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For now give the Python ownership to the layout. This maintains
|
||||
// compatibility with previous versions and allows
|
||||
// addChildWidget(QWidget()).
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
}
|
||||
%End
|
||||
|
||||
QRect alignmentRect(const QRect &) const;
|
||||
|
||||
public:
|
||||
void setContentsMargins(int left, int top, int right, int bottom);
|
||||
void getContentsMargins(int *left, int *top, int *right, int *bottom) const;
|
||||
QRect contentsRect() const;
|
||||
void setContentsMargins(const QMargins &margins);
|
||||
QMargins contentsMargins() const;
|
||||
virtual QSizePolicy::ControlTypes controlTypes() const;
|
||||
%If (Qt_5_2_0 -)
|
||||
QLayoutItem *replaceWidget(QWidget *from, QWidget *to /Transfer/, Qt::FindChildOptions options = Qt::FindChildrenRecursively) /TransferBack/;
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,114 @@
|
||||
// qlayoutitem.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QLayoutItem /Supertype=sip.wrapper/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlayoutitem.h>
|
||||
%End
|
||||
|
||||
%ConvertToSubClassCode
|
||||
if (sipCpp->widget())
|
||||
{
|
||||
sipType = sipType_QWidgetItem;
|
||||
}
|
||||
else if (sipCpp->spacerItem())
|
||||
{
|
||||
sipType = sipType_QSpacerItem;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Switch to the QObject convertor.
|
||||
*sipCppRet = sipCpp->layout();
|
||||
sipType = sipType_QObject;
|
||||
}
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QLayoutItem(Qt::Alignment alignment = Qt::Alignment());
|
||||
virtual ~QLayoutItem();
|
||||
virtual QSize sizeHint() const = 0;
|
||||
virtual QSize minimumSize() const = 0;
|
||||
virtual QSize maximumSize() const = 0;
|
||||
virtual Qt::Orientations expandingDirections() const = 0;
|
||||
virtual void setGeometry(const QRect &) = 0;
|
||||
virtual QRect geometry() const = 0;
|
||||
virtual bool isEmpty() const = 0;
|
||||
virtual bool hasHeightForWidth() const;
|
||||
virtual int heightForWidth(int) const;
|
||||
virtual int minimumHeightForWidth(int) const;
|
||||
virtual void invalidate();
|
||||
virtual QWidget *widget();
|
||||
virtual QLayout *layout();
|
||||
virtual QSpacerItem *spacerItem();
|
||||
Qt::Alignment alignment() const;
|
||||
void setAlignment(Qt::Alignment a);
|
||||
virtual QSizePolicy::ControlTypes controlTypes() const;
|
||||
};
|
||||
|
||||
class QSpacerItem : public QLayoutItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlayoutitem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QSpacerItem(int w, int h, QSizePolicy::Policy hPolicy = QSizePolicy::Minimum, QSizePolicy::Policy vPolicy = QSizePolicy::Minimum);
|
||||
virtual ~QSpacerItem();
|
||||
void changeSize(int w, int h, QSizePolicy::Policy hPolicy = QSizePolicy::Minimum, QSizePolicy::Policy vPolicy = QSizePolicy::Minimum);
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSize() const;
|
||||
virtual QSize maximumSize() const;
|
||||
virtual Qt::Orientations expandingDirections() const;
|
||||
virtual bool isEmpty() const;
|
||||
virtual void setGeometry(const QRect &);
|
||||
virtual QRect geometry() const;
|
||||
virtual QSpacerItem *spacerItem();
|
||||
%If (Qt_5_5_0 -)
|
||||
QSizePolicy sizePolicy() const;
|
||||
%End
|
||||
};
|
||||
|
||||
class QWidgetItem : public QLayoutItem
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlayoutitem.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QWidgetItem(QWidget *w);
|
||||
virtual ~QWidgetItem();
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSize() const;
|
||||
virtual QSize maximumSize() const;
|
||||
virtual Qt::Orientations expandingDirections() const;
|
||||
virtual bool isEmpty() const;
|
||||
virtual void setGeometry(const QRect &);
|
||||
virtual QRect geometry() const;
|
||||
virtual QWidget *widget();
|
||||
virtual bool hasHeightForWidth() const;
|
||||
virtual int heightForWidth(int) const;
|
||||
virtual QSizePolicy::ControlTypes controlTypes() const;
|
||||
|
||||
private:
|
||||
QWidgetItem(const QWidgetItem &);
|
||||
};
|
||||
@@ -0,0 +1,82 @@
|
||||
// qlcdnumber.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QLCDNumber : public QFrame
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlcdnumber.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QLCDNumber(QWidget *parent /TransferThis/ = 0);
|
||||
QLCDNumber(uint numDigits, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QLCDNumber();
|
||||
|
||||
enum Mode
|
||||
{
|
||||
Hex,
|
||||
Dec,
|
||||
Oct,
|
||||
Bin,
|
||||
};
|
||||
|
||||
enum SegmentStyle
|
||||
{
|
||||
Outline,
|
||||
Filled,
|
||||
Flat,
|
||||
};
|
||||
|
||||
bool smallDecimalPoint() const;
|
||||
int digitCount() const;
|
||||
void setDigitCount(int nDigits);
|
||||
void setNumDigits(int nDigits);
|
||||
%MethodCode
|
||||
// This is implemented for Qt v5 so that .ui files created with Designer for Qt v4 will continue to work.
|
||||
sipCpp->setDigitCount(a0);
|
||||
%End
|
||||
|
||||
bool checkOverflow(double num /Constrained/) const;
|
||||
bool checkOverflow(int num) const;
|
||||
QLCDNumber::Mode mode() const;
|
||||
void setMode(QLCDNumber::Mode);
|
||||
QLCDNumber::SegmentStyle segmentStyle() const;
|
||||
void setSegmentStyle(QLCDNumber::SegmentStyle);
|
||||
double value() const;
|
||||
int intValue() const;
|
||||
virtual QSize sizeHint() const;
|
||||
void display(const QString &str);
|
||||
void display(double num /Constrained/);
|
||||
void display(int num);
|
||||
void setHexMode();
|
||||
void setDecMode();
|
||||
void setOctMode();
|
||||
void setBinMode();
|
||||
void setSmallDecimalPoint(bool);
|
||||
|
||||
signals:
|
||||
void overflow();
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
};
|
||||
@@ -0,0 +1,172 @@
|
||||
// qlineedit.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QLineEdit : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlineedit.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QLineEdit(QWidget *parent /TransferThis/ = 0);
|
||||
QLineEdit(const QString &contents, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QLineEdit();
|
||||
QString text() const;
|
||||
QString displayText() const;
|
||||
int maxLength() const;
|
||||
void setMaxLength(int);
|
||||
void setFrame(bool);
|
||||
bool hasFrame() const;
|
||||
|
||||
enum EchoMode
|
||||
{
|
||||
Normal,
|
||||
NoEcho,
|
||||
Password,
|
||||
PasswordEchoOnEdit,
|
||||
};
|
||||
|
||||
QLineEdit::EchoMode echoMode() const;
|
||||
void setEchoMode(QLineEdit::EchoMode);
|
||||
bool isReadOnly() const;
|
||||
void setReadOnly(bool);
|
||||
void setValidator(const QValidator * /KeepReference/);
|
||||
const QValidator *validator() const;
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
int cursorPosition() const;
|
||||
void setCursorPosition(int);
|
||||
int cursorPositionAt(const QPoint &pos);
|
||||
void setAlignment(Qt::Alignment flag);
|
||||
Qt::Alignment alignment() const;
|
||||
void cursorForward(bool mark, int steps = 1);
|
||||
void cursorBackward(bool mark, int steps = 1);
|
||||
void cursorWordForward(bool mark);
|
||||
void cursorWordBackward(bool mark);
|
||||
void backspace();
|
||||
void del() /PyName=del_/;
|
||||
void home(bool mark);
|
||||
void end(bool mark);
|
||||
bool isModified() const;
|
||||
void setModified(bool);
|
||||
void setSelection(int, int);
|
||||
bool hasSelectedText() const;
|
||||
QString selectedText() const;
|
||||
int selectionStart() const;
|
||||
bool isUndoAvailable() const;
|
||||
bool isRedoAvailable() const;
|
||||
void setDragEnabled(bool b);
|
||||
bool dragEnabled() const;
|
||||
QString inputMask() const;
|
||||
void setInputMask(const QString &inputMask);
|
||||
bool hasAcceptableInput() const;
|
||||
void setText(const QString &);
|
||||
void clear();
|
||||
void selectAll();
|
||||
void undo();
|
||||
void redo();
|
||||
void cut();
|
||||
void copy() const;
|
||||
void paste();
|
||||
void deselect();
|
||||
void insert(const QString &);
|
||||
QMenu *createStandardContextMenu() /Factory/;
|
||||
|
||||
signals:
|
||||
void textChanged(const QString &);
|
||||
void textEdited(const QString &);
|
||||
void cursorPositionChanged(int, int);
|
||||
void returnPressed();
|
||||
void editingFinished();
|
||||
void selectionChanged();
|
||||
|
||||
protected:
|
||||
void initStyleOption(QStyleOptionFrame *option) const;
|
||||
virtual void mousePressEvent(QMouseEvent *);
|
||||
virtual void mouseMoveEvent(QMouseEvent *);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *);
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
virtual void focusInEvent(QFocusEvent *);
|
||||
virtual void focusOutEvent(QFocusEvent *);
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void dragEnterEvent(QDragEnterEvent *);
|
||||
virtual void dragMoveEvent(QDragMoveEvent *e);
|
||||
virtual void dragLeaveEvent(QDragLeaveEvent *e);
|
||||
virtual void dropEvent(QDropEvent *);
|
||||
virtual void changeEvent(QEvent *);
|
||||
virtual void contextMenuEvent(QContextMenuEvent *);
|
||||
virtual void inputMethodEvent(QInputMethodEvent *);
|
||||
QRect cursorRect() const;
|
||||
|
||||
public:
|
||||
virtual QVariant inputMethodQuery(Qt::InputMethodQuery) const;
|
||||
virtual bool event(QEvent *);
|
||||
void setCompleter(QCompleter *completer /KeepReference/);
|
||||
QCompleter *completer() const;
|
||||
void setTextMargins(int left, int top, int right, int bottom);
|
||||
void getTextMargins(int *left, int *top, int *right, int *bottom) const;
|
||||
void setTextMargins(const QMargins &margins);
|
||||
QMargins textMargins() const;
|
||||
QString placeholderText() const;
|
||||
void setPlaceholderText(const QString &);
|
||||
void setCursorMoveStyle(Qt::CursorMoveStyle style);
|
||||
Qt::CursorMoveStyle cursorMoveStyle() const;
|
||||
%If (Qt_5_2_0 -)
|
||||
|
||||
enum ActionPosition
|
||||
{
|
||||
LeadingPosition,
|
||||
TrailingPosition,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void setClearButtonEnabled(bool enable);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
bool isClearButtonEnabled() const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void addAction(QAction *action);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void addAction(QAction *action, QLineEdit::ActionPosition position);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QAction *addAction(const QIcon &icon, QLineEdit::ActionPosition position) /Transfer/;
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
QVariant inputMethodQuery(Qt::InputMethodQuery property, QVariant argument) const;
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
int selectionEnd() const;
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
int selectionLength() const;
|
||||
%End
|
||||
|
||||
signals:
|
||||
%If (Qt_5_12_0 -)
|
||||
void inputRejected();
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,147 @@
|
||||
// qlistview.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QListView : public QAbstractItemView
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlistview.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Movement
|
||||
{
|
||||
Static,
|
||||
Free,
|
||||
Snap,
|
||||
};
|
||||
|
||||
enum Flow
|
||||
{
|
||||
LeftToRight,
|
||||
TopToBottom,
|
||||
};
|
||||
|
||||
enum ResizeMode
|
||||
{
|
||||
Fixed,
|
||||
Adjust,
|
||||
};
|
||||
|
||||
enum LayoutMode
|
||||
{
|
||||
SinglePass,
|
||||
Batched,
|
||||
};
|
||||
|
||||
enum ViewMode
|
||||
{
|
||||
ListMode,
|
||||
IconMode,
|
||||
};
|
||||
|
||||
explicit QListView(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QListView();
|
||||
void setMovement(QListView::Movement movement);
|
||||
QListView::Movement movement() const;
|
||||
void setFlow(QListView::Flow flow);
|
||||
QListView::Flow flow() const;
|
||||
void setWrapping(bool enable);
|
||||
bool isWrapping() const;
|
||||
void setResizeMode(QListView::ResizeMode mode);
|
||||
QListView::ResizeMode resizeMode() const;
|
||||
void setLayoutMode(QListView::LayoutMode mode);
|
||||
QListView::LayoutMode layoutMode() const;
|
||||
void setSpacing(int space);
|
||||
int spacing() const;
|
||||
void setGridSize(const QSize &size);
|
||||
QSize gridSize() const;
|
||||
void setViewMode(QListView::ViewMode mode);
|
||||
QListView::ViewMode viewMode() const;
|
||||
void clearPropertyFlags();
|
||||
bool isRowHidden(int row) const;
|
||||
void setRowHidden(int row, bool hide);
|
||||
void setModelColumn(int column);
|
||||
int modelColumn() const;
|
||||
void setUniformItemSizes(bool enable);
|
||||
bool uniformItemSizes() const;
|
||||
virtual QRect visualRect(const QModelIndex &index) const;
|
||||
virtual void scrollTo(const QModelIndex &index, QAbstractItemView::ScrollHint hint = QAbstractItemView::EnsureVisible);
|
||||
virtual QModelIndex indexAt(const QPoint &p) const;
|
||||
virtual void reset();
|
||||
virtual void setRootIndex(const QModelIndex &index);
|
||||
|
||||
signals:
|
||||
void indexesMoved(const QModelIndexList &indexes);
|
||||
|
||||
protected:
|
||||
virtual void scrollContentsBy(int dx, int dy);
|
||||
virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int>());
|
||||
virtual void rowsInserted(const QModelIndex &parent, int start, int end);
|
||||
virtual void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void mouseMoveEvent(QMouseEvent *e);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *e);
|
||||
virtual void timerEvent(QTimerEvent *e);
|
||||
virtual void resizeEvent(QResizeEvent *e);
|
||||
virtual void dragMoveEvent(QDragMoveEvent *e);
|
||||
virtual void dragLeaveEvent(QDragLeaveEvent *e);
|
||||
virtual void dropEvent(QDropEvent *e);
|
||||
%If (Qt_5_6_0 -)
|
||||
virtual void wheelEvent(QWheelEvent *e);
|
||||
%End
|
||||
virtual void startDrag(Qt::DropActions supportedActions);
|
||||
virtual QStyleOptionViewItem viewOptions() const;
|
||||
virtual void paintEvent(QPaintEvent *e);
|
||||
virtual int horizontalOffset() const;
|
||||
virtual int verticalOffset() const;
|
||||
virtual QModelIndex moveCursor(QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers);
|
||||
QRect rectForIndex(const QModelIndex &index) const;
|
||||
void setPositionForIndex(const QPoint &position, const QModelIndex &index);
|
||||
virtual void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command);
|
||||
virtual QRegion visualRegionForSelection(const QItemSelection &selection) const;
|
||||
virtual QModelIndexList selectedIndexes() const;
|
||||
virtual void updateGeometries();
|
||||
virtual bool isIndexHidden(const QModelIndex &index) const;
|
||||
%If (Qt_5_2_0 -)
|
||||
virtual QSize viewportSizeHint() const;
|
||||
%End
|
||||
|
||||
public:
|
||||
void setBatchSize(int batchSize);
|
||||
int batchSize() const;
|
||||
void setWordWrap(bool on);
|
||||
bool wordWrap() const;
|
||||
void setSelectionRectVisible(bool show);
|
||||
bool isSelectionRectVisible() const;
|
||||
|
||||
protected:
|
||||
virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
|
||||
public:
|
||||
%If (Qt_5_12_0 -)
|
||||
void setItemAlignment(Qt::Alignment alignment);
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
Qt::Alignment itemAlignment() const;
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,196 @@
|
||||
// qlistwidget.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QListWidgetItem /Supertype=sip.wrapper/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlistwidget.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum ItemType
|
||||
{
|
||||
Type,
|
||||
UserType,
|
||||
};
|
||||
|
||||
QListWidgetItem(QListWidget *parent /TransferThis/ = 0, int type = Type);
|
||||
QListWidgetItem(const QString &text, QListWidget *parent /TransferThis/ = 0, int type = Type);
|
||||
QListWidgetItem(const QIcon &icon, const QString &text, QListWidget *parent /TransferThis/ = 0, int type = Type);
|
||||
QListWidgetItem(const QListWidgetItem &other);
|
||||
virtual ~QListWidgetItem();
|
||||
virtual QListWidgetItem *clone() const /Factory/;
|
||||
QListWidget *listWidget() const;
|
||||
Qt::ItemFlags flags() const;
|
||||
QString text() const;
|
||||
QIcon icon() const;
|
||||
QString statusTip() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QFont font() const;
|
||||
int textAlignment() const;
|
||||
void setTextAlignment(int alignment);
|
||||
Qt::CheckState checkState() const;
|
||||
void setCheckState(Qt::CheckState state);
|
||||
QSize sizeHint() const;
|
||||
void setSizeHint(const QSize &size);
|
||||
virtual QVariant data(int role) const;
|
||||
virtual void setData(int role, const QVariant &value);
|
||||
virtual bool operator<(const QListWidgetItem &other /NoCopy/) const;
|
||||
virtual void read(QDataStream &in) /ReleaseGIL/;
|
||||
virtual void write(QDataStream &out) const /ReleaseGIL/;
|
||||
int type() const;
|
||||
void setFlags(Qt::ItemFlags aflags);
|
||||
void setText(const QString &atext);
|
||||
void setIcon(const QIcon &aicon);
|
||||
void setStatusTip(const QString &astatusTip);
|
||||
void setToolTip(const QString &atoolTip);
|
||||
void setWhatsThis(const QString &awhatsThis);
|
||||
void setFont(const QFont &afont);
|
||||
QBrush background() const;
|
||||
void setBackground(const QBrush &brush);
|
||||
QBrush foreground() const;
|
||||
void setForeground(const QBrush &brush);
|
||||
void setSelected(bool aselect);
|
||||
bool isSelected() const;
|
||||
void setHidden(bool ahide);
|
||||
bool isHidden() const;
|
||||
|
||||
private:
|
||||
QListWidgetItem &operator=(const QListWidgetItem &);
|
||||
};
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const QListWidgetItem &item /Constrained/) /ReleaseGIL/;
|
||||
QDataStream &operator>>(QDataStream &in, QListWidgetItem &item /Constrained/) /ReleaseGIL/;
|
||||
|
||||
class QListWidget : public QListView
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qlistwidget.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QListWidget(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QListWidget();
|
||||
QListWidgetItem *item(int row) const;
|
||||
int row(const QListWidgetItem *item) const;
|
||||
void insertItem(int row, QListWidgetItem *item /Transfer/);
|
||||
void insertItem(int row, const QString &label);
|
||||
void insertItems(int row, const QStringList &labels);
|
||||
void addItem(QListWidgetItem *aitem /Transfer/);
|
||||
void addItem(const QString &label);
|
||||
void addItems(const QStringList &labels);
|
||||
QListWidgetItem *takeItem(int row) /TransferBack/;
|
||||
int count() const /__len__/;
|
||||
QListWidgetItem *currentItem() const;
|
||||
void setCurrentItem(QListWidgetItem *item);
|
||||
void setCurrentItem(QListWidgetItem *item, QItemSelectionModel::SelectionFlags command);
|
||||
int currentRow() const;
|
||||
void setCurrentRow(int row);
|
||||
void setCurrentRow(int row, QItemSelectionModel::SelectionFlags command);
|
||||
QListWidgetItem *itemAt(const QPoint &p) const;
|
||||
QListWidgetItem *itemAt(int ax, int ay) const;
|
||||
QWidget *itemWidget(QListWidgetItem *item) const;
|
||||
void setItemWidget(QListWidgetItem *item, QWidget *widget /Transfer/);
|
||||
%MethodCode
|
||||
// We have to break the association with any existing widget.
|
||||
QWidget *w = sipCpp->itemWidget(a0);
|
||||
|
||||
if (w)
|
||||
{
|
||||
PyObject *wo = sipGetPyObject(w, sipType_QWidget);
|
||||
|
||||
if (wo)
|
||||
sipTransferTo(wo, 0);
|
||||
}
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->setItemWidget(a0, a1);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
QRect visualItemRect(const QListWidgetItem *item) const;
|
||||
void sortItems(Qt::SortOrder order = Qt::AscendingOrder);
|
||||
void editItem(QListWidgetItem *item);
|
||||
void openPersistentEditor(QListWidgetItem *item);
|
||||
void closePersistentEditor(QListWidgetItem *item);
|
||||
QList<QListWidgetItem *> selectedItems() const;
|
||||
QList<QListWidgetItem *> findItems(const QString &text, Qt::MatchFlags flags) const;
|
||||
|
||||
public slots:
|
||||
void clear();
|
||||
void scrollToItem(const QListWidgetItem *item, QAbstractItemView::ScrollHint hint = QAbstractItemView::EnsureVisible);
|
||||
|
||||
signals:
|
||||
void itemPressed(QListWidgetItem *item);
|
||||
void itemClicked(QListWidgetItem *item);
|
||||
void itemDoubleClicked(QListWidgetItem *item);
|
||||
void itemActivated(QListWidgetItem *item);
|
||||
void itemEntered(QListWidgetItem *item);
|
||||
void itemChanged(QListWidgetItem *item);
|
||||
void currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous);
|
||||
void currentTextChanged(const QString ¤tText);
|
||||
void currentRowChanged(int currentRow);
|
||||
void itemSelectionChanged();
|
||||
|
||||
protected:
|
||||
virtual QStringList mimeTypes() const;
|
||||
virtual QMimeData *mimeData(const QList<QListWidgetItem *> items) const /TransferBack/;
|
||||
virtual bool dropMimeData(int index, const QMimeData *data, Qt::DropAction action);
|
||||
virtual Qt::DropActions supportedDropActions() const;
|
||||
QList<QListWidgetItem *> items(const QMimeData *data) const;
|
||||
QModelIndex indexFromItem(QListWidgetItem *item) const;
|
||||
QListWidgetItem *itemFromIndex(const QModelIndex &index) const;
|
||||
virtual bool event(QEvent *e);
|
||||
|
||||
public:
|
||||
void setSortingEnabled(bool enable);
|
||||
bool isSortingEnabled() const;
|
||||
virtual void dropEvent(QDropEvent *event);
|
||||
void removeItemWidget(QListWidgetItem *aItem);
|
||||
%MethodCode
|
||||
// We have to break the association with any existing widget.
|
||||
QWidget *w = sipCpp->itemWidget(a0);
|
||||
|
||||
if (w)
|
||||
{
|
||||
PyObject *wo = sipGetPyObject(w, sipType_QWidget);
|
||||
|
||||
if (wo)
|
||||
sipTransferTo(wo, 0);
|
||||
}
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->removeItemWidget(a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
%If (Qt_5_7_0 -)
|
||||
virtual void setSelectionModel(QItemSelectionModel *selectionModel);
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
bool isPersistentEditorOpen(QListWidgetItem *item) const;
|
||||
%End
|
||||
|
||||
private:
|
||||
virtual void setModel(QAbstractItemModel *model /KeepReference/);
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
// This is the SIP interface definition for the QMacCocoaViewContainer.
|
||||
//
|
||||
// Copyright (c) 2024 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.
|
||||
|
||||
|
||||
%If (WS_MACX)
|
||||
%If (PyQt_MacOSXOnly)
|
||||
|
||||
class QMacCocoaViewContainer : QWidget /FileExtension=".mm"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <QMacCocoaViewContainer>
|
||||
%End
|
||||
|
||||
public:
|
||||
QMacCocoaViewContainer(void *cocoaViewToWrap, QWidget *parent /TransferThis/ = 0) [(NSView *, QWidget *)];
|
||||
virtual ~QMacCocoaViewContainer();
|
||||
|
||||
void setCocoaView(void *cocoaViewToWrap) [void (NSView *)];
|
||||
void *cocoaView() const [NSView * ()];
|
||||
|
||||
private:
|
||||
QMacCocoaViewContainer(const QMacCocoaViewContainer &);
|
||||
};
|
||||
|
||||
%End
|
||||
%End
|
||||
@@ -0,0 +1,123 @@
|
||||
// qmainwindow.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QMainWindow : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmainwindow.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QMainWindow(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
virtual ~QMainWindow();
|
||||
QSize iconSize() const;
|
||||
void setIconSize(const QSize &iconSize);
|
||||
Qt::ToolButtonStyle toolButtonStyle() const;
|
||||
void setToolButtonStyle(Qt::ToolButtonStyle toolButtonStyle);
|
||||
QMenuBar *menuBar() const /Transfer/;
|
||||
void setMenuBar(QMenuBar *menubar /Transfer/);
|
||||
QStatusBar *statusBar() const /Transfer/;
|
||||
void setStatusBar(QStatusBar *statusbar /Transfer/);
|
||||
QWidget *centralWidget() const;
|
||||
void setCentralWidget(QWidget *widget /Transfer/);
|
||||
void setCorner(Qt::Corner corner, Qt::DockWidgetArea area);
|
||||
Qt::DockWidgetArea corner(Qt::Corner corner) const;
|
||||
void addToolBarBreak(Qt::ToolBarArea area = Qt::TopToolBarArea);
|
||||
void insertToolBarBreak(QToolBar *before);
|
||||
void addToolBar(Qt::ToolBarArea area, QToolBar *toolbar /Transfer/);
|
||||
void addToolBar(QToolBar *toolbar /Transfer/);
|
||||
QToolBar *addToolBar(const QString &title) /Transfer/;
|
||||
void insertToolBar(QToolBar *before, QToolBar *toolbar /Transfer/);
|
||||
void removeToolBar(QToolBar *toolbar);
|
||||
Qt::ToolBarArea toolBarArea(QToolBar *toolbar) const;
|
||||
void addDockWidget(Qt::DockWidgetArea area, QDockWidget *dockwidget /Transfer/);
|
||||
void addDockWidget(Qt::DockWidgetArea area, QDockWidget *dockwidget /Transfer/, Qt::Orientation orientation);
|
||||
void splitDockWidget(QDockWidget *after, QDockWidget *dockwidget /Transfer/, Qt::Orientation orientation);
|
||||
void removeDockWidget(QDockWidget *dockwidget /TransferBack/);
|
||||
Qt::DockWidgetArea dockWidgetArea(QDockWidget *dockwidget) const;
|
||||
QByteArray saveState(int version = 0) const;
|
||||
bool restoreState(const QByteArray &state, int version = 0);
|
||||
virtual QMenu *createPopupMenu();
|
||||
|
||||
public slots:
|
||||
void setAnimated(bool enabled);
|
||||
void setDockNestingEnabled(bool enabled);
|
||||
|
||||
signals:
|
||||
void iconSizeChanged(const QSize &iconSize);
|
||||
void toolButtonStyleChanged(Qt::ToolButtonStyle toolButtonStyle);
|
||||
%If (Qt_5_8_0 -)
|
||||
void tabifiedDockWidgetActivated(QDockWidget *dockWidget);
|
||||
%End
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent(QContextMenuEvent *event);
|
||||
virtual bool event(QEvent *event);
|
||||
|
||||
public:
|
||||
bool isAnimated() const;
|
||||
bool isDockNestingEnabled() const;
|
||||
bool isSeparator(const QPoint &pos) const;
|
||||
QWidget *menuWidget() const;
|
||||
void setMenuWidget(QWidget *menubar /Transfer/);
|
||||
void tabifyDockWidget(QDockWidget *first, QDockWidget *second);
|
||||
|
||||
enum DockOption
|
||||
{
|
||||
AnimatedDocks,
|
||||
AllowNestedDocks,
|
||||
AllowTabbedDocks,
|
||||
ForceTabbedDocks,
|
||||
VerticalTabs,
|
||||
%If (Qt_5_6_0 -)
|
||||
GroupedDragging,
|
||||
%End
|
||||
};
|
||||
|
||||
typedef QFlags<QMainWindow::DockOption> DockOptions;
|
||||
void setDockOptions(QMainWindow::DockOptions options);
|
||||
QMainWindow::DockOptions dockOptions() const;
|
||||
void removeToolBarBreak(QToolBar *before);
|
||||
bool toolBarBreak(QToolBar *toolbar) const;
|
||||
%If (Qt_5_2_0 -)
|
||||
void setUnifiedTitleAndToolBarOnMac(bool set);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
bool unifiedTitleAndToolBarOnMac() const;
|
||||
%End
|
||||
bool restoreDockWidget(QDockWidget *dockwidget);
|
||||
bool documentMode() const;
|
||||
void setDocumentMode(bool enabled);
|
||||
QTabWidget::TabShape tabShape() const;
|
||||
void setTabShape(QTabWidget::TabShape tabShape);
|
||||
QTabWidget::TabPosition tabPosition(Qt::DockWidgetArea area) const;
|
||||
void setTabPosition(Qt::DockWidgetAreas areas, QTabWidget::TabPosition tabPosition);
|
||||
QList<QDockWidget *> tabifiedDockWidgets(QDockWidget *dockwidget) const;
|
||||
%If (Qt_5_2_0 -)
|
||||
QWidget *takeCentralWidget() /TransferBack/;
|
||||
%End
|
||||
%If (Qt_5_6_0 -)
|
||||
void resizeDocks(const QList<QDockWidget *> &docks, const QList<int> &sizes, Qt::Orientation orientation);
|
||||
%End
|
||||
};
|
||||
|
||||
QFlags<QMainWindow::DockOption> operator|(QMainWindow::DockOption f1, QFlags<QMainWindow::DockOption> f2);
|
||||
@@ -0,0 +1,127 @@
|
||||
// qmdiarea.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QMdiArea : public QAbstractScrollArea
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmdiarea.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum AreaOption
|
||||
{
|
||||
DontMaximizeSubWindowOnActivation,
|
||||
};
|
||||
|
||||
typedef QFlags<QMdiArea::AreaOption> AreaOptions;
|
||||
|
||||
enum ViewMode
|
||||
{
|
||||
SubWindowView,
|
||||
TabbedView,
|
||||
};
|
||||
|
||||
enum WindowOrder
|
||||
{
|
||||
CreationOrder,
|
||||
StackingOrder,
|
||||
ActivationHistoryOrder,
|
||||
};
|
||||
|
||||
QMdiArea(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QMdiArea();
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
QMdiSubWindow *activeSubWindow() const;
|
||||
QMdiSubWindow *addSubWindow(QWidget *widget /Transfer/, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
QList<QMdiSubWindow *> subWindowList(QMdiArea::WindowOrder order = QMdiArea::CreationOrder) const;
|
||||
QMdiSubWindow *currentSubWindow() const;
|
||||
void removeSubWindow(QWidget *widget /GetWrapper/);
|
||||
%MethodCode
|
||||
// We need to implement /TransferBack/ on the argument, but it might be the
|
||||
// QMdiSubWindow that wraps the widget we are really after.
|
||||
QMdiSubWindow *swin = qobject_cast<QMdiSubWindow *>(a0);
|
||||
|
||||
if (swin)
|
||||
{
|
||||
QWidget *w = swin->widget();
|
||||
|
||||
a0Wrapper = (w ? sipGetPyObject(w, sipType_QWidget) : 0);
|
||||
}
|
||||
else
|
||||
a0Wrapper = 0;
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->removeSubWindow(a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (a0Wrapper)
|
||||
sipTransferBack(a0Wrapper);
|
||||
%End
|
||||
|
||||
QBrush background() const;
|
||||
void setBackground(const QBrush &background);
|
||||
void setOption(QMdiArea::AreaOption option, bool on = true);
|
||||
bool testOption(QMdiArea::AreaOption opton) const;
|
||||
|
||||
signals:
|
||||
void subWindowActivated(QMdiSubWindow *);
|
||||
|
||||
public slots:
|
||||
void setActiveSubWindow(QMdiSubWindow *window);
|
||||
void tileSubWindows();
|
||||
void cascadeSubWindows();
|
||||
void closeActiveSubWindow();
|
||||
void closeAllSubWindows();
|
||||
void activateNextSubWindow();
|
||||
void activatePreviousSubWindow();
|
||||
|
||||
protected:
|
||||
virtual void setupViewport(QWidget *viewport);
|
||||
virtual bool event(QEvent *event);
|
||||
virtual bool eventFilter(QObject *object, QEvent *event);
|
||||
virtual void paintEvent(QPaintEvent *paintEvent);
|
||||
virtual void childEvent(QChildEvent *childEvent);
|
||||
virtual void resizeEvent(QResizeEvent *resizeEvent);
|
||||
virtual void timerEvent(QTimerEvent *timerEvent);
|
||||
virtual void showEvent(QShowEvent *showEvent);
|
||||
virtual bool viewportEvent(QEvent *event);
|
||||
virtual void scrollContentsBy(int dx, int dy);
|
||||
|
||||
public:
|
||||
QMdiArea::WindowOrder activationOrder() const;
|
||||
void setActivationOrder(QMdiArea::WindowOrder order);
|
||||
void setViewMode(QMdiArea::ViewMode mode);
|
||||
QMdiArea::ViewMode viewMode() const;
|
||||
void setTabShape(QTabWidget::TabShape shape);
|
||||
QTabWidget::TabShape tabShape() const;
|
||||
void setTabPosition(QTabWidget::TabPosition position);
|
||||
QTabWidget::TabPosition tabPosition() const;
|
||||
bool documentMode() const;
|
||||
void setDocumentMode(bool enabled);
|
||||
void setTabsClosable(bool closable);
|
||||
bool tabsClosable() const;
|
||||
void setTabsMovable(bool movable);
|
||||
bool tabsMovable() const;
|
||||
};
|
||||
|
||||
QFlags<QMdiArea::AreaOption> operator|(QMdiArea::AreaOption f1, QFlags<QMdiArea::AreaOption> f2);
|
||||
@@ -0,0 +1,119 @@
|
||||
// qmdisubwindow.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QMdiSubWindow : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmdisubwindow.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum SubWindowOption
|
||||
{
|
||||
RubberBandResize,
|
||||
RubberBandMove,
|
||||
};
|
||||
|
||||
typedef QFlags<QMdiSubWindow::SubWindowOption> SubWindowOptions;
|
||||
QMdiSubWindow(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
virtual ~QMdiSubWindow();
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
void setWidget(QWidget *widget /Transfer/);
|
||||
%MethodCode
|
||||
// We have to implement /TransferBack/ on any existing widget.
|
||||
QWidget *w = sipCpp->widget();
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->setWidget(a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (w)
|
||||
{
|
||||
PyObject *wo = sipGetPyObject(w, sipType_QWidget);
|
||||
|
||||
if (wo)
|
||||
sipTransferBack(wo);
|
||||
}
|
||||
%End
|
||||
|
||||
QWidget *widget() const;
|
||||
bool isShaded() const;
|
||||
void setOption(QMdiSubWindow::SubWindowOption option, bool on = true);
|
||||
bool testOption(QMdiSubWindow::SubWindowOption) const;
|
||||
void setKeyboardSingleStep(int step);
|
||||
int keyboardSingleStep() const;
|
||||
void setKeyboardPageStep(int step);
|
||||
int keyboardPageStep() const;
|
||||
void setSystemMenu(QMenu *systemMenu /Transfer/);
|
||||
%MethodCode
|
||||
// We have to break the parent association on any existing menu.
|
||||
QMenu *w = sipCpp->systemMenu();
|
||||
|
||||
if (w)
|
||||
{
|
||||
PyObject *wo = sipGetPyObject(w, sipType_QMenu);
|
||||
|
||||
if (wo)
|
||||
sipTransferTo(wo, 0);
|
||||
}
|
||||
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp->setSystemMenu(a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
%End
|
||||
|
||||
QMenu *systemMenu() const;
|
||||
QMdiArea *mdiArea() const;
|
||||
|
||||
signals:
|
||||
void windowStateChanged(Qt::WindowStates oldState, Qt::WindowStates newState);
|
||||
void aboutToActivate();
|
||||
|
||||
public slots:
|
||||
void showSystemMenu();
|
||||
void showShaded();
|
||||
|
||||
protected:
|
||||
virtual bool eventFilter(QObject *object, QEvent *event);
|
||||
virtual bool event(QEvent *event);
|
||||
virtual void showEvent(QShowEvent *showEvent);
|
||||
virtual void hideEvent(QHideEvent *hideEvent);
|
||||
virtual void changeEvent(QEvent *changeEvent);
|
||||
virtual void closeEvent(QCloseEvent *closeEvent);
|
||||
virtual void leaveEvent(QEvent *leaveEvent);
|
||||
virtual void resizeEvent(QResizeEvent *resizeEvent);
|
||||
virtual void timerEvent(QTimerEvent *timerEvent);
|
||||
virtual void moveEvent(QMoveEvent *moveEvent);
|
||||
virtual void paintEvent(QPaintEvent *paintEvent);
|
||||
virtual void mousePressEvent(QMouseEvent *mouseEvent);
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent *mouseEvent);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *mouseEvent);
|
||||
virtual void mouseMoveEvent(QMouseEvent *mouseEvent);
|
||||
virtual void keyPressEvent(QKeyEvent *keyEvent);
|
||||
virtual void contextMenuEvent(QContextMenuEvent *contextMenuEvent);
|
||||
virtual void focusInEvent(QFocusEvent *focusInEvent);
|
||||
virtual void focusOutEvent(QFocusEvent *focusOutEvent);
|
||||
virtual void childEvent(QChildEvent *childEvent);
|
||||
};
|
||||
|
||||
QFlags<QMdiSubWindow::SubWindowOption> operator|(QMdiSubWindow::SubWindowOption f1, QFlags<QMdiSubWindow::SubWindowOption> f2);
|
||||
@@ -0,0 +1,163 @@
|
||||
// qmenu.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QMenu : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmenu.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QMenu(QWidget *parent /TransferThis/ = 0);
|
||||
QMenu(const QString &title, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QMenu();
|
||||
void addAction(QAction *action);
|
||||
QAction *addAction(const QString &text) /Transfer/;
|
||||
QAction *addAction(const QIcon &icon, const QString &text) /Transfer/;
|
||||
QAction *addAction(const QString &text, SIP_PYOBJECT slot /TypeHint="PYQT_SLOT"/, const QKeySequence &shortcut = 0) /Transfer/;
|
||||
%MethodCode
|
||||
QObject *receiver;
|
||||
QByteArray slot_signature;
|
||||
|
||||
if ((sipError = pyqt5_qtwidgets_get_connection_parts(a1, sipCpp, "()", false, &receiver, slot_signature)) == sipErrorNone)
|
||||
{
|
||||
sipRes = sipCpp->addAction(*a0, receiver, slot_signature.constData(), *a2);
|
||||
}
|
||||
else if (sipError == sipErrorContinue)
|
||||
{
|
||||
sipError = sipBadCallableArg(1, a1);
|
||||
}
|
||||
%End
|
||||
|
||||
QAction *addAction(const QIcon &icon, const QString &text, SIP_PYOBJECT slot /TypeHint="PYQT_SLOT"/, const QKeySequence &shortcut = 0) /Transfer/;
|
||||
%MethodCode
|
||||
QObject *receiver;
|
||||
QByteArray slot_signature;
|
||||
|
||||
if ((sipError = pyqt5_qtwidgets_get_connection_parts(a2, sipCpp, "()", false, &receiver, slot_signature)) == sipErrorNone)
|
||||
{
|
||||
sipRes = sipCpp->addAction(*a0, *a1, receiver, slot_signature.constData(), *a3);
|
||||
}
|
||||
else if (sipError == sipErrorContinue)
|
||||
{
|
||||
sipError = sipBadCallableArg(2, a2);
|
||||
}
|
||||
%End
|
||||
|
||||
QAction *addMenu(QMenu *menu);
|
||||
QMenu *addMenu(const QString &title) /Transfer/;
|
||||
QMenu *addMenu(const QIcon &icon, const QString &title) /Transfer/;
|
||||
QAction *addSeparator() /Transfer/;
|
||||
QAction *insertMenu(QAction *before, QMenu *menu);
|
||||
QAction *insertSeparator(QAction *before) /Transfer/;
|
||||
void clear();
|
||||
void setTearOffEnabled(bool);
|
||||
bool isTearOffEnabled() const;
|
||||
bool isTearOffMenuVisible() const;
|
||||
void hideTearOffMenu();
|
||||
void setDefaultAction(QAction * /KeepReference/);
|
||||
QAction *defaultAction() const;
|
||||
void setActiveAction(QAction *act);
|
||||
QAction *activeAction() const;
|
||||
void popup(const QPoint &p, QAction *action = 0);
|
||||
QAction *exec() /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,PyName=exec_,ReleaseGIL/;
|
||||
%If (Py_v3)
|
||||
QAction *exec() /ReleaseGIL/;
|
||||
%End
|
||||
QAction *exec(const QPoint &p, QAction *action = 0) /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,PyName=exec_,ReleaseGIL/;
|
||||
%If (Py_v3)
|
||||
QAction *exec(const QPoint &pos, QAction *action = 0) /ReleaseGIL/;
|
||||
%End
|
||||
static QAction *exec(QList<QAction*> actions, const QPoint &pos, QAction *at = 0, QWidget *parent = 0) /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,PyName=exec_,ReleaseGIL/;
|
||||
%If (Py_v3)
|
||||
static QAction *exec(QList<QAction *> actions, const QPoint &pos, QAction *at = 0, QWidget *parent = 0) /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,ReleaseGIL/;
|
||||
%End
|
||||
virtual QSize sizeHint() const;
|
||||
QRect actionGeometry(QAction *) const;
|
||||
QAction *actionAt(const QPoint &) const;
|
||||
QAction *menuAction() const;
|
||||
QString title() const;
|
||||
void setTitle(const QString &title);
|
||||
QIcon icon() const;
|
||||
void setIcon(const QIcon &icon);
|
||||
void setNoReplayFor(QWidget *widget);
|
||||
|
||||
signals:
|
||||
void aboutToHide();
|
||||
void aboutToShow();
|
||||
void hovered(QAction *action);
|
||||
void triggered(QAction *action);
|
||||
|
||||
protected:
|
||||
int columnCount() const;
|
||||
void initStyleOption(QStyleOptionMenuItem *option, const QAction *action) const;
|
||||
virtual void changeEvent(QEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *);
|
||||
virtual void mousePressEvent(QMouseEvent *);
|
||||
virtual void mouseMoveEvent(QMouseEvent *);
|
||||
virtual void wheelEvent(QWheelEvent *);
|
||||
virtual void enterEvent(QEvent *);
|
||||
virtual void leaveEvent(QEvent *);
|
||||
virtual void hideEvent(QHideEvent *);
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void actionEvent(QActionEvent *);
|
||||
virtual void timerEvent(QTimerEvent *);
|
||||
virtual bool event(QEvent *);
|
||||
virtual bool focusNextPrevChild(bool next);
|
||||
|
||||
public:
|
||||
bool isEmpty() const;
|
||||
bool separatorsCollapsible() const;
|
||||
void setSeparatorsCollapsible(bool collapse);
|
||||
%If (Qt_5_1_0 -)
|
||||
QAction *addSection(const QString &text) /Transfer/;
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
QAction *addSection(const QIcon &icon, const QString &text) /Transfer/;
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
QAction *insertSection(QAction *before, const QString &text) /Transfer/;
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
QAction *insertSection(QAction *before, const QIcon &icon, const QString &text) /Transfer/;
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
bool toolTipsVisible() const;
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
void setToolTipsVisible(bool visible);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
%If (WS_MACX)
|
||||
%If (PyQt_MacOSXOnly)
|
||||
void setAsDockMenu();
|
||||
%End
|
||||
%End
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
void showTearOffMenu();
|
||||
%End
|
||||
%If (Qt_5_7_0 -)
|
||||
void showTearOffMenu(const QPoint &pos);
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,93 @@
|
||||
// qmenubar.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QMenuBar : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmenubar.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QMenuBar(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QMenuBar();
|
||||
void addAction(QAction *action);
|
||||
QAction *addAction(const QString &text) /Transfer/;
|
||||
QAction *addAction(const QString &text, SIP_PYOBJECT slot /TypeHint="PYQT_SLOT"/) /Transfer/;
|
||||
%MethodCode
|
||||
QObject *receiver;
|
||||
QByteArray slot_signature;
|
||||
|
||||
if ((sipError = pyqt5_qtwidgets_get_connection_parts(a1, sipCpp, "()", false, &receiver, slot_signature)) == sipErrorNone)
|
||||
{
|
||||
sipRes = sipCpp->addAction(*a0, receiver, slot_signature.constData());
|
||||
}
|
||||
else if (sipError == sipErrorContinue)
|
||||
{
|
||||
sipError = sipBadCallableArg(1, a1);
|
||||
}
|
||||
%End
|
||||
|
||||
QAction *addMenu(QMenu *menu);
|
||||
QMenu *addMenu(const QString &title) /Transfer/;
|
||||
QMenu *addMenu(const QIcon &icon, const QString &title) /Transfer/;
|
||||
QAction *addSeparator() /Transfer/;
|
||||
QAction *insertMenu(QAction *before, QMenu *menu);
|
||||
QAction *insertSeparator(QAction *before) /Transfer/;
|
||||
void clear();
|
||||
QAction *activeAction() const;
|
||||
void setActiveAction(QAction *action);
|
||||
void setDefaultUp(bool);
|
||||
bool isDefaultUp() const;
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
virtual int heightForWidth(int) const;
|
||||
QRect actionGeometry(QAction *) const;
|
||||
QAction *actionAt(const QPoint &) const;
|
||||
void setCornerWidget(QWidget *widget /Transfer/, Qt::Corner corner = Qt::TopRightCorner);
|
||||
QWidget *cornerWidget(Qt::Corner corner = Qt::TopRightCorner) const;
|
||||
virtual void setVisible(bool visible);
|
||||
|
||||
signals:
|
||||
void triggered(QAction *action);
|
||||
void hovered(QAction *action);
|
||||
|
||||
protected:
|
||||
void initStyleOption(QStyleOptionMenuItem *option, const QAction *action) const;
|
||||
virtual void changeEvent(QEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *);
|
||||
virtual void mousePressEvent(QMouseEvent *);
|
||||
virtual void mouseMoveEvent(QMouseEvent *);
|
||||
virtual void leaveEvent(QEvent *);
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
virtual void actionEvent(QActionEvent *);
|
||||
virtual void focusOutEvent(QFocusEvent *);
|
||||
virtual void focusInEvent(QFocusEvent *);
|
||||
virtual bool eventFilter(QObject *, QEvent *);
|
||||
virtual bool event(QEvent *);
|
||||
virtual void timerEvent(QTimerEvent *);
|
||||
|
||||
public:
|
||||
bool isNativeMenuBar() const;
|
||||
void setNativeMenuBar(bool nativeMenuBar);
|
||||
};
|
||||
@@ -0,0 +1,172 @@
|
||||
// qmessagebox.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QMessageBox : public QDialog
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmessagebox.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum ButtonRole
|
||||
{
|
||||
InvalidRole,
|
||||
AcceptRole,
|
||||
RejectRole,
|
||||
DestructiveRole,
|
||||
ActionRole,
|
||||
HelpRole,
|
||||
YesRole,
|
||||
NoRole,
|
||||
ResetRole,
|
||||
ApplyRole,
|
||||
};
|
||||
|
||||
enum Icon
|
||||
{
|
||||
NoIcon,
|
||||
Information,
|
||||
Warning,
|
||||
Critical,
|
||||
Question,
|
||||
};
|
||||
|
||||
enum StandardButton
|
||||
{
|
||||
NoButton,
|
||||
Ok,
|
||||
Save,
|
||||
SaveAll,
|
||||
Open,
|
||||
Yes,
|
||||
YesToAll,
|
||||
No,
|
||||
NoToAll,
|
||||
Abort,
|
||||
Retry,
|
||||
Ignore,
|
||||
Close,
|
||||
Cancel,
|
||||
Discard,
|
||||
Help,
|
||||
Apply,
|
||||
Reset,
|
||||
RestoreDefaults,
|
||||
FirstButton,
|
||||
LastButton,
|
||||
YesAll,
|
||||
NoAll,
|
||||
Default,
|
||||
Escape,
|
||||
FlagMask,
|
||||
ButtonMask,
|
||||
};
|
||||
|
||||
typedef QFlags<QMessageBox::StandardButton> StandardButtons;
|
||||
typedef QMessageBox::StandardButton Button;
|
||||
explicit QMessageBox(QWidget *parent /TransferThis/ = 0);
|
||||
QMessageBox(QMessageBox::Icon icon, const QString &title, const QString &text, QMessageBox::StandardButtons buttons = QMessageBox::NoButton, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint);
|
||||
virtual ~QMessageBox();
|
||||
QString text() const;
|
||||
void setText(const QString &);
|
||||
QMessageBox::Icon icon() const;
|
||||
void setIcon(QMessageBox::Icon);
|
||||
QPixmap iconPixmap() const;
|
||||
void setIconPixmap(const QPixmap &);
|
||||
Qt::TextFormat textFormat() const;
|
||||
void setTextFormat(Qt::TextFormat);
|
||||
static QMessageBox::StandardButton information(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons = QMessageBox::Ok, QMessageBox::StandardButton defaultButton = QMessageBox::NoButton) /ReleaseGIL/;
|
||||
static QMessageBox::StandardButton question(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons = QMessageBox::StandardButtons(QMessageBox::Yes | QMessageBox::No), QMessageBox::StandardButton defaultButton = QMessageBox::NoButton) /ReleaseGIL/;
|
||||
static QMessageBox::StandardButton warning(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons = QMessageBox::Ok, QMessageBox::StandardButton defaultButton = QMessageBox::NoButton) /ReleaseGIL/;
|
||||
static QMessageBox::StandardButton critical(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons = QMessageBox::Ok, QMessageBox::StandardButton defaultButton = QMessageBox::NoButton) /ReleaseGIL/;
|
||||
static void about(QWidget *parent, const QString &caption, const QString &text) /ReleaseGIL/;
|
||||
static void aboutQt(QWidget *parent, const QString &title = QString()) /ReleaseGIL/;
|
||||
static QPixmap standardIcon(QMessageBox::Icon icon);
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
virtual void showEvent(QShowEvent *);
|
||||
virtual void closeEvent(QCloseEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
virtual void changeEvent(QEvent *);
|
||||
|
||||
public:
|
||||
void addButton(QAbstractButton *button /Transfer/, QMessageBox::ButtonRole role);
|
||||
QPushButton *addButton(const QString &text, QMessageBox::ButtonRole role) /Transfer/;
|
||||
QPushButton *addButton(QMessageBox::StandardButton button) /Transfer/;
|
||||
void removeButton(QAbstractButton *button /TransferBack/);
|
||||
void setStandardButtons(QMessageBox::StandardButtons buttons);
|
||||
QMessageBox::StandardButtons standardButtons() const;
|
||||
QMessageBox::StandardButton standardButton(QAbstractButton *button) const;
|
||||
QAbstractButton *button(QMessageBox::StandardButton which) const;
|
||||
QPushButton *defaultButton() const;
|
||||
void setDefaultButton(QPushButton *button /KeepReference/);
|
||||
void setDefaultButton(QMessageBox::StandardButton button);
|
||||
QAbstractButton *escapeButton() const;
|
||||
void setEscapeButton(QAbstractButton *button /KeepReference/);
|
||||
void setEscapeButton(QMessageBox::StandardButton button);
|
||||
QAbstractButton *clickedButton() const;
|
||||
QString informativeText() const;
|
||||
void setInformativeText(const QString &text);
|
||||
QString detailedText() const;
|
||||
void setDetailedText(const QString &text);
|
||||
void setWindowTitle(const QString &title);
|
||||
void setWindowModality(Qt::WindowModality windowModality);
|
||||
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
|
||||
|
||||
QList<QAbstractButton *> buttons() const;
|
||||
QMessageBox::ButtonRole buttonRole(QAbstractButton *button) const;
|
||||
|
||||
signals:
|
||||
void buttonClicked(QAbstractButton *button);
|
||||
|
||||
public:
|
||||
%If (Qt_5_1_0 -)
|
||||
void setTextInteractionFlags(Qt::TextInteractionFlags flags);
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
Qt::TextInteractionFlags textInteractionFlags() const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void setCheckBox(QCheckBox *cb);
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
QCheckBox *checkBox() const;
|
||||
%End
|
||||
};
|
||||
|
||||
QFlags<QMessageBox::StandardButton> operator|(QMessageBox::StandardButton f1, QFlags<QMessageBox::StandardButton> f2);
|
||||
@@ -0,0 +1,43 @@
|
||||
// qmouseeventtransition.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QMouseEventTransition : public QEventTransition
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qmouseeventtransition.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QMouseEventTransition(QState *sourceState /TransferThis/ = 0);
|
||||
QMouseEventTransition(QObject *object /KeepReference=10/, QEvent::Type type, Qt::MouseButton button, QState *sourceState /TransferThis/ = 0);
|
||||
virtual ~QMouseEventTransition();
|
||||
Qt::MouseButton button() const;
|
||||
void setButton(Qt::MouseButton button);
|
||||
Qt::KeyboardModifiers modifierMask() const;
|
||||
void setModifierMask(Qt::KeyboardModifiers modifiers);
|
||||
QPainterPath hitTestPath() const;
|
||||
void setHitTestPath(const QPainterPath &path);
|
||||
|
||||
protected:
|
||||
virtual void onTransition(QEvent *event);
|
||||
virtual bool eventTest(QEvent *event);
|
||||
};
|
||||
@@ -0,0 +1,85 @@
|
||||
// qopenglwidget.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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.
|
||||
|
||||
|
||||
%If (Qt_5_4_0 -)
|
||||
%If (PyQt_OpenGL)
|
||||
|
||||
class QOpenGLWidget : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qopenglwidget.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QOpenGLWidget(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
virtual ~QOpenGLWidget();
|
||||
void setFormat(const QSurfaceFormat &format);
|
||||
QSurfaceFormat format() const;
|
||||
bool isValid() const;
|
||||
void makeCurrent();
|
||||
void doneCurrent();
|
||||
QOpenGLContext *context() const;
|
||||
GLuint defaultFramebufferObject() const;
|
||||
QImage grabFramebuffer();
|
||||
|
||||
signals:
|
||||
void aboutToCompose();
|
||||
void frameSwapped();
|
||||
void aboutToResize();
|
||||
void resized();
|
||||
|
||||
protected:
|
||||
virtual void initializeGL();
|
||||
virtual void resizeGL(int w, int h);
|
||||
virtual void paintGL();
|
||||
virtual void paintEvent(QPaintEvent *e);
|
||||
virtual void resizeEvent(QResizeEvent *e);
|
||||
virtual bool event(QEvent *e);
|
||||
virtual int metric(QPaintDevice::PaintDeviceMetric metric) const;
|
||||
virtual QPaintEngine *paintEngine() const;
|
||||
|
||||
public:
|
||||
%If (Qt_5_5_0 -)
|
||||
|
||||
enum UpdateBehavior
|
||||
{
|
||||
NoPartialUpdate,
|
||||
PartialUpdate,
|
||||
};
|
||||
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
void setUpdateBehavior(QOpenGLWidget::UpdateBehavior updateBehavior);
|
||||
%End
|
||||
%If (Qt_5_5_0 -)
|
||||
QOpenGLWidget::UpdateBehavior updateBehavior() const;
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
GLenum textureFormat() const;
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
void setTextureFormat(GLenum texFormat);
|
||||
%End
|
||||
};
|
||||
|
||||
%End
|
||||
%End
|
||||
@@ -0,0 +1,217 @@
|
||||
// qplaintextedit.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QPlainTextEdit : public QAbstractScrollArea
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qplaintextedit.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum LineWrapMode
|
||||
{
|
||||
NoWrap,
|
||||
WidgetWidth,
|
||||
};
|
||||
|
||||
explicit QPlainTextEdit(QWidget *parent /TransferThis/ = 0);
|
||||
QPlainTextEdit(const QString &text, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QPlainTextEdit();
|
||||
void setDocument(QTextDocument *document /KeepReference/);
|
||||
QTextDocument *document() const;
|
||||
void setTextCursor(const QTextCursor &cursor);
|
||||
QTextCursor textCursor() const;
|
||||
bool isReadOnly() const;
|
||||
void setReadOnly(bool ro);
|
||||
void setTextInteractionFlags(Qt::TextInteractionFlags flags);
|
||||
Qt::TextInteractionFlags textInteractionFlags() const;
|
||||
void mergeCurrentCharFormat(const QTextCharFormat &modifier);
|
||||
void setCurrentCharFormat(const QTextCharFormat &format);
|
||||
QTextCharFormat currentCharFormat() const;
|
||||
bool tabChangesFocus() const;
|
||||
void setTabChangesFocus(bool b);
|
||||
void setDocumentTitle(const QString &title);
|
||||
QString documentTitle() const;
|
||||
bool isUndoRedoEnabled() const;
|
||||
void setUndoRedoEnabled(bool enable);
|
||||
void setMaximumBlockCount(int maximum);
|
||||
int maximumBlockCount() const;
|
||||
QPlainTextEdit::LineWrapMode lineWrapMode() const;
|
||||
void setLineWrapMode(QPlainTextEdit::LineWrapMode mode);
|
||||
QTextOption::WrapMode wordWrapMode() const;
|
||||
void setWordWrapMode(QTextOption::WrapMode policy);
|
||||
void setBackgroundVisible(bool visible);
|
||||
bool backgroundVisible() const;
|
||||
void setCenterOnScroll(bool enabled);
|
||||
bool centerOnScroll() const;
|
||||
bool find(const QString &exp, QTextDocument::FindFlags options = QTextDocument::FindFlags());
|
||||
QString toPlainText() const;
|
||||
void ensureCursorVisible();
|
||||
virtual QVariant loadResource(int type, const QUrl &name);
|
||||
QMenu *createStandardContextMenu() /Factory/;
|
||||
%If (Qt_5_5_0 -)
|
||||
QMenu *createStandardContextMenu(const QPoint &position) /Factory/;
|
||||
%End
|
||||
QTextCursor cursorForPosition(const QPoint &pos) const;
|
||||
QRect cursorRect(const QTextCursor &cursor) const;
|
||||
QRect cursorRect() const;
|
||||
bool overwriteMode() const;
|
||||
void setOverwriteMode(bool overwrite);
|
||||
int tabStopWidth() const;
|
||||
void setTabStopWidth(int width);
|
||||
int cursorWidth() const;
|
||||
void setCursorWidth(int width);
|
||||
void setExtraSelections(const QList<QTextEdit::ExtraSelection> &selections);
|
||||
QList<QTextEdit::ExtraSelection> extraSelections() const;
|
||||
void moveCursor(QTextCursor::MoveOperation operation, QTextCursor::MoveMode mode = QTextCursor::MoveAnchor);
|
||||
bool canPaste() const;
|
||||
%If (PyQt_Printer)
|
||||
void print(QPagedPaintDevice *printer) const /PyName=print_/;
|
||||
%End
|
||||
%If (Py_v3)
|
||||
%If (PyQt_Printer)
|
||||
void print(QPagedPaintDevice *printer) const;
|
||||
%End
|
||||
%End
|
||||
int blockCount() const;
|
||||
|
||||
public slots:
|
||||
void setPlainText(const QString &text);
|
||||
void cut();
|
||||
void copy();
|
||||
void paste();
|
||||
void undo();
|
||||
void redo();
|
||||
void clear();
|
||||
void selectAll();
|
||||
void insertPlainText(const QString &text);
|
||||
void appendPlainText(const QString &text);
|
||||
void appendHtml(const QString &html);
|
||||
void centerCursor();
|
||||
|
||||
signals:
|
||||
void textChanged();
|
||||
void undoAvailable(bool b);
|
||||
void redoAvailable(bool b);
|
||||
void copyAvailable(bool b);
|
||||
void selectionChanged();
|
||||
void cursorPositionChanged();
|
||||
void updateRequest(const QRect &rect, int dy);
|
||||
void blockCountChanged(int newBlockCount);
|
||||
void modificationChanged(bool);
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void timerEvent(QTimerEvent *e);
|
||||
virtual void keyPressEvent(QKeyEvent *e);
|
||||
virtual void keyReleaseEvent(QKeyEvent *e);
|
||||
virtual void resizeEvent(QResizeEvent *e);
|
||||
virtual void paintEvent(QPaintEvent *e);
|
||||
virtual void mousePressEvent(QMouseEvent *e);
|
||||
virtual void mouseMoveEvent(QMouseEvent *e);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *e);
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent *e);
|
||||
virtual bool focusNextPrevChild(bool next);
|
||||
virtual void contextMenuEvent(QContextMenuEvent *e);
|
||||
virtual void dragEnterEvent(QDragEnterEvent *e);
|
||||
virtual void dragLeaveEvent(QDragLeaveEvent *e);
|
||||
virtual void dragMoveEvent(QDragMoveEvent *e);
|
||||
virtual void dropEvent(QDropEvent *e);
|
||||
virtual void focusInEvent(QFocusEvent *e);
|
||||
virtual void focusOutEvent(QFocusEvent *e);
|
||||
virtual void showEvent(QShowEvent *);
|
||||
virtual void changeEvent(QEvent *e);
|
||||
virtual void wheelEvent(QWheelEvent *e);
|
||||
virtual void inputMethodEvent(QInputMethodEvent *);
|
||||
|
||||
public:
|
||||
virtual QVariant inputMethodQuery(Qt::InputMethodQuery property) const;
|
||||
|
||||
protected:
|
||||
virtual QMimeData *createMimeDataFromSelection() const /Factory/;
|
||||
virtual bool canInsertFromMimeData(const QMimeData *source) const;
|
||||
virtual void insertFromMimeData(const QMimeData *source);
|
||||
virtual void scrollContentsBy(int dx, int dy);
|
||||
QTextBlock firstVisibleBlock() const;
|
||||
QPointF contentOffset() const;
|
||||
QRectF blockBoundingRect(const QTextBlock &block) const;
|
||||
QRectF blockBoundingGeometry(const QTextBlock &block) const;
|
||||
QAbstractTextDocumentLayout::PaintContext getPaintContext() const;
|
||||
|
||||
public:
|
||||
QString anchorAt(const QPoint &pos) const;
|
||||
|
||||
public slots:
|
||||
%If (Qt_5_1_0 -)
|
||||
void zoomIn(int range = 1);
|
||||
%End
|
||||
%If (Qt_5_1_0 -)
|
||||
void zoomOut(int range = 1);
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_5_3_0 -)
|
||||
void setPlaceholderText(const QString &placeholderText);
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QString placeholderText() const;
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
bool find(const QRegExp &exp, QTextDocument::FindFlags options = QTextDocument::FindFlags());
|
||||
%End
|
||||
%If (Qt_5_13_0 -)
|
||||
bool find(const QRegularExpression &exp, QTextDocument::FindFlags options = QTextDocument::FindFlags());
|
||||
%End
|
||||
%If (Qt_5_3_0 -)
|
||||
QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument) const;
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
qreal tabStopDistance() const;
|
||||
%End
|
||||
%If (Qt_5_10_0 -)
|
||||
void setTabStopDistance(qreal distance);
|
||||
%End
|
||||
};
|
||||
|
||||
class QPlainTextDocumentLayout : public QAbstractTextDocumentLayout
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qplaintextedit.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QPlainTextDocumentLayout(QTextDocument *document);
|
||||
virtual ~QPlainTextDocumentLayout();
|
||||
virtual void draw(QPainter *, const QAbstractTextDocumentLayout::PaintContext &);
|
||||
virtual int hitTest(const QPointF &, Qt::HitTestAccuracy) const;
|
||||
virtual int pageCount() const;
|
||||
virtual QSizeF documentSize() const;
|
||||
virtual QRectF frameBoundingRect(QTextFrame *) const;
|
||||
virtual QRectF blockBoundingRect(const QTextBlock &block) const;
|
||||
void ensureBlockLayout(const QTextBlock &block) const;
|
||||
void setCursorWidth(int width);
|
||||
int cursorWidth() const;
|
||||
void requestUpdate();
|
||||
|
||||
protected:
|
||||
virtual void documentChanged(int from, int, int charsAdded);
|
||||
};
|
||||
@@ -0,0 +1,72 @@
|
||||
// qprogressbar.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QProgressBar : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qprogressbar.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Direction
|
||||
{
|
||||
TopToBottom,
|
||||
BottomToTop,
|
||||
};
|
||||
|
||||
explicit QProgressBar(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QProgressBar();
|
||||
int minimum() const;
|
||||
int maximum() const;
|
||||
void setRange(int minimum, int maximum);
|
||||
int value() const;
|
||||
virtual QString text() const;
|
||||
void setTextVisible(bool visible);
|
||||
bool isTextVisible() const;
|
||||
Qt::Alignment alignment() const;
|
||||
void setAlignment(Qt::Alignment alignment);
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
Qt::Orientation orientation() const;
|
||||
void setInvertedAppearance(bool invert);
|
||||
void setTextDirection(QProgressBar::Direction textDirection);
|
||||
void setFormat(const QString &format);
|
||||
QString format() const;
|
||||
%If (Qt_5_1_0 -)
|
||||
void resetFormat();
|
||||
%End
|
||||
|
||||
public slots:
|
||||
void reset();
|
||||
void setMinimum(int minimum);
|
||||
void setMaximum(int maximum);
|
||||
void setValue(int value);
|
||||
void setOrientation(Qt::Orientation);
|
||||
|
||||
signals:
|
||||
void valueChanged(int value);
|
||||
|
||||
protected:
|
||||
void initStyleOption(QStyleOptionProgressBar *option) const;
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
};
|
||||
@@ -0,0 +1,85 @@
|
||||
// qprogressdialog.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QProgressDialog : public QDialog
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qprogressdialog.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QProgressDialog(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
QProgressDialog(const QString &labelText, const QString &cancelButtonText, int minimum, int maximum, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
virtual ~QProgressDialog();
|
||||
void setLabel(QLabel *label /Transfer/);
|
||||
void setCancelButton(QPushButton *button /Transfer/);
|
||||
void setBar(QProgressBar *bar /Transfer/);
|
||||
bool wasCanceled() const;
|
||||
int minimum() const;
|
||||
int maximum() const;
|
||||
void setRange(int minimum, int maximum);
|
||||
int value() const;
|
||||
virtual QSize sizeHint() const;
|
||||
QString labelText() const;
|
||||
int minimumDuration() const;
|
||||
void setAutoReset(bool b);
|
||||
bool autoReset() const;
|
||||
void setAutoClose(bool b);
|
||||
bool autoClose() const;
|
||||
|
||||
public slots:
|
||||
void cancel();
|
||||
void reset();
|
||||
void setMaximum(int maximum);
|
||||
void setMinimum(int minimum);
|
||||
void setValue(int progress);
|
||||
void setLabelText(const QString &);
|
||||
void setCancelButtonText(const QString &);
|
||||
void setMinimumDuration(int ms);
|
||||
|
||||
signals:
|
||||
void canceled();
|
||||
|
||||
protected:
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
virtual void closeEvent(QCloseEvent *);
|
||||
virtual void changeEvent(QEvent *);
|
||||
virtual void showEvent(QShowEvent *e);
|
||||
void forceShow();
|
||||
|
||||
public:
|
||||
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
|
||||
};
|
||||
@@ -0,0 +1,61 @@
|
||||
// qproxystyle.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QProxyStyle : public QCommonStyle
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qproxystyle.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QProxyStyle(QStyle *style /Transfer/ = 0);
|
||||
QProxyStyle(const QString &key);
|
||||
virtual ~QProxyStyle();
|
||||
QStyle *baseStyle() const;
|
||||
void setBaseStyle(QStyle *style /Transfer/);
|
||||
virtual void drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = 0) const;
|
||||
virtual void drawControl(QStyle::ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = 0) const;
|
||||
virtual void drawComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget = 0) const;
|
||||
virtual void drawItemText(QPainter *painter, const QRect &rect, int flags, const QPalette &pal, bool enabled, const QString &text, QPalette::ColorRole textRole = QPalette::NoRole) const;
|
||||
virtual void drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const;
|
||||
virtual QSize sizeFromContents(QStyle::ContentsType type, const QStyleOption *option, const QSize &size, const QWidget *widget) const;
|
||||
virtual QRect subElementRect(QStyle::SubElement element, const QStyleOption *option, const QWidget *widget) const;
|
||||
virtual QRect subControlRect(QStyle::ComplexControl cc, const QStyleOptionComplex *opt, QStyle::SubControl sc, const QWidget *widget) const;
|
||||
virtual QRect itemTextRect(const QFontMetrics &fm, const QRect &r, int flags, bool enabled, const QString &text) const;
|
||||
virtual QRect itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const;
|
||||
virtual QStyle::SubControl hitTestComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex *option, const QPoint &pos, const QWidget *widget = 0) const;
|
||||
virtual int styleHint(QStyle::StyleHint hint, const QStyleOption *option = 0, const QWidget *widget = 0, QStyleHintReturn *returnData = 0) const;
|
||||
virtual int pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option = 0, const QWidget *widget = 0) const;
|
||||
virtual int layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option = 0, const QWidget *widget = 0) const;
|
||||
virtual QIcon standardIcon(QStyle::StandardPixmap standardIcon, const QStyleOption *option = 0, const QWidget *widget = 0) const;
|
||||
virtual QPixmap standardPixmap(QStyle::StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget = 0) const;
|
||||
virtual QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const;
|
||||
virtual QPalette standardPalette() const;
|
||||
virtual void polish(QWidget *widget);
|
||||
virtual void polish(QPalette &pal /In,Out/);
|
||||
virtual void polish(QApplication *app);
|
||||
virtual void unpolish(QWidget *widget);
|
||||
virtual void unpolish(QApplication *app);
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *e);
|
||||
};
|
||||
@@ -0,0 +1,64 @@
|
||||
// qpushbutton.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QPushButton : public QAbstractButton
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qpushbutton.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QPushButton(QWidget *parent /TransferThis/ = 0);
|
||||
QPushButton(const QString &text, QWidget *parent /TransferThis/ = 0);
|
||||
QPushButton(const QIcon &icon, const QString &text, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QPushButton();
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
bool autoDefault() const;
|
||||
void setAutoDefault(bool);
|
||||
bool isDefault() const;
|
||||
void setDefault(bool);
|
||||
void setMenu(QMenu *menu /KeepReference/);
|
||||
QMenu *menu() const;
|
||||
void setFlat(bool);
|
||||
bool isFlat() const;
|
||||
|
||||
public slots:
|
||||
void showMenu();
|
||||
|
||||
protected:
|
||||
void initStyleOption(QStyleOptionButton *option) const;
|
||||
virtual bool event(QEvent *e) /ReleaseGIL/;
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
virtual void focusInEvent(QFocusEvent *);
|
||||
virtual void focusOutEvent(QFocusEvent *);
|
||||
%If (Qt_5_15_0 -)
|
||||
virtual bool hitButton(const QPoint &pos) const;
|
||||
%End
|
||||
// Protected platform specific methods.
|
||||
%If (- Qt_5_15_0)
|
||||
%If (WS_MACX)
|
||||
bool hitButton(const QPoint &pos) const;
|
||||
%End
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,124 @@
|
||||
// This is the SIP interface definition for the QList based mapped types
|
||||
// specific to the QtWidgets module.
|
||||
//
|
||||
// Copyright (c) 2024 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.
|
||||
|
||||
|
||||
%MappedType QList<QWizard::WizardButton>
|
||||
/TypeHintIn="Iterable[QWizard.WizardButton]",
|
||||
TypeHintOut="List[QWizard.WizardButton]", TypeHintValue="[]"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qwizard.h>
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
PyObject *l = PyList_New(sipCpp->size());
|
||||
|
||||
if (!l)
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < sipCpp->size(); ++i)
|
||||
{
|
||||
PyObject *eobj = sipConvertFromEnum(sipCpp->at(i),
|
||||
sipType_QWizard_WizardButton);
|
||||
|
||||
if (!eobj)
|
||||
{
|
||||
Py_DECREF(l);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
PyList_SetItem(l, i, eobj);
|
||||
}
|
||||
|
||||
return l;
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
PyObject *iter = PyObject_GetIter(sipPy);
|
||||
|
||||
if (!sipIsErr)
|
||||
{
|
||||
PyErr_Clear();
|
||||
Py_XDECREF(iter);
|
||||
|
||||
return (iter
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
&& !PyString_Check(sipPy)
|
||||
#endif
|
||||
&& !PyUnicode_Check(sipPy));
|
||||
}
|
||||
|
||||
if (!iter)
|
||||
{
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
QList<QWizard::WizardButton> *ql = new QList<QWizard::WizardButton>;
|
||||
|
||||
for (Py_ssize_t i = 0; ; ++i)
|
||||
{
|
||||
PyErr_Clear();
|
||||
PyObject *itm = PyIter_Next(iter);
|
||||
|
||||
if (!itm)
|
||||
{
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
int v = sipConvertToEnum(itm, sipType_QWizard_WizardButton);
|
||||
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"index %zd has type '%s' but 'QWizard.WizardButton' is expected",
|
||||
i, sipPyTypeName(Py_TYPE(itm)));
|
||||
|
||||
Py_DECREF(itm);
|
||||
delete ql;
|
||||
Py_DECREF(iter);
|
||||
*sipIsErr = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ql->append(static_cast<QWizard::WizardButton>(v));
|
||||
|
||||
Py_DECREF(itm);
|
||||
}
|
||||
|
||||
Py_DECREF(iter);
|
||||
|
||||
*sipCppPtr = ql;
|
||||
|
||||
return sipGetState(sipTransferObj);
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
// qradiobutton.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QRadioButton : public QAbstractButton
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qradiobutton.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QRadioButton(QWidget *parent /TransferThis/ = 0);
|
||||
QRadioButton(const QString &text, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QRadioButton();
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
|
||||
protected:
|
||||
void initStyleOption(QStyleOptionButton *button) const;
|
||||
virtual bool hitButton(const QPoint &) const;
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void mouseMoveEvent(QMouseEvent *);
|
||||
};
|
||||
@@ -0,0 +1,54 @@
|
||||
// qrubberband.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QRubberBand : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qrubberband.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum Shape
|
||||
{
|
||||
Line,
|
||||
Rectangle,
|
||||
};
|
||||
|
||||
QRubberBand(QRubberBand::Shape, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QRubberBand();
|
||||
QRubberBand::Shape shape() const;
|
||||
void setGeometry(const QRect &r);
|
||||
void setGeometry(int ax, int ay, int aw, int ah);
|
||||
void move(const QPoint &p);
|
||||
void move(int ax, int ay);
|
||||
void resize(int w, int h);
|
||||
void resize(const QSize &s);
|
||||
|
||||
protected:
|
||||
void initStyleOption(QStyleOptionRubberBand *option) const;
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void changeEvent(QEvent *);
|
||||
virtual void showEvent(QShowEvent *);
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
virtual void moveEvent(QMoveEvent *);
|
||||
};
|
||||
@@ -0,0 +1,52 @@
|
||||
// qscrollarea.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QScrollArea : public QAbstractScrollArea
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qscrollarea.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QScrollArea(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QScrollArea();
|
||||
QWidget *widget() const;
|
||||
void setWidget(QWidget *w /Transfer/);
|
||||
QWidget *takeWidget() /TransferBack/;
|
||||
bool widgetResizable() const;
|
||||
void setWidgetResizable(bool resizable);
|
||||
Qt::Alignment alignment() const;
|
||||
void setAlignment(Qt::Alignment);
|
||||
virtual QSize sizeHint() const;
|
||||
virtual bool focusNextPrevChild(bool next);
|
||||
void ensureVisible(int x, int y, int xMargin = 50, int yMargin = 50);
|
||||
void ensureWidgetVisible(QWidget *childWidget, int xMargin = 50, int yMargin = 50);
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *);
|
||||
virtual bool eventFilter(QObject *, QEvent *);
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
virtual void scrollContentsBy(int dx, int dy);
|
||||
%If (Qt_5_2_0 -)
|
||||
virtual QSize viewportSizeHint() const;
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
// qscrollbar.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QScrollBar : public QAbstractSlider
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qscrollbar.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QScrollBar(QWidget *parent /TransferThis/ = 0);
|
||||
QScrollBar(Qt::Orientation orientation, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QScrollBar();
|
||||
virtual QSize sizeHint() const;
|
||||
virtual bool event(QEvent *event);
|
||||
|
||||
protected:
|
||||
void initStyleOption(QStyleOptionSlider *option) const;
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void mousePressEvent(QMouseEvent *);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *);
|
||||
virtual void mouseMoveEvent(QMouseEvent *);
|
||||
virtual void hideEvent(QHideEvent *);
|
||||
virtual void contextMenuEvent(QContextMenuEvent *);
|
||||
virtual void wheelEvent(QWheelEvent *);
|
||||
virtual void sliderChange(QAbstractSlider::SliderChange change);
|
||||
};
|
||||
@@ -0,0 +1,88 @@
|
||||
// qscroller.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QScroller : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qscroller.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum State
|
||||
{
|
||||
Inactive,
|
||||
Pressed,
|
||||
Dragging,
|
||||
Scrolling,
|
||||
};
|
||||
|
||||
enum ScrollerGestureType
|
||||
{
|
||||
TouchGesture,
|
||||
LeftMouseButtonGesture,
|
||||
RightMouseButtonGesture,
|
||||
MiddleMouseButtonGesture,
|
||||
};
|
||||
|
||||
enum Input
|
||||
{
|
||||
InputPress,
|
||||
InputMove,
|
||||
InputRelease,
|
||||
};
|
||||
|
||||
static bool hasScroller(QObject *target);
|
||||
static QScroller *scroller(QObject *target);
|
||||
static Qt::GestureType grabGesture(QObject *target, QScroller::ScrollerGestureType scrollGestureType = QScroller::TouchGesture);
|
||||
static Qt::GestureType grabbedGesture(QObject *target);
|
||||
static void ungrabGesture(QObject *target);
|
||||
static QList<QScroller *> activeScrollers();
|
||||
QObject *target() const;
|
||||
QScroller::State state() const;
|
||||
bool handleInput(QScroller::Input input, const QPointF &position, qint64 timestamp = 0);
|
||||
void stop();
|
||||
QPointF velocity() const;
|
||||
QPointF finalPosition() const;
|
||||
QPointF pixelPerMeter() const;
|
||||
QScrollerProperties scrollerProperties() const;
|
||||
void setSnapPositionsX(const QList<qreal> &positions);
|
||||
void setSnapPositionsX(qreal first, qreal interval);
|
||||
void setSnapPositionsY(const QList<qreal> &positions);
|
||||
void setSnapPositionsY(qreal first, qreal interval);
|
||||
|
||||
public slots:
|
||||
void setScrollerProperties(const QScrollerProperties &prop);
|
||||
void scrollTo(const QPointF &pos);
|
||||
void scrollTo(const QPointF &pos, int scrollTime);
|
||||
void ensureVisible(const QRectF &rect, qreal xmargin, qreal ymargin);
|
||||
void ensureVisible(const QRectF &rect, qreal xmargin, qreal ymargin, int scrollTime);
|
||||
void resendPrepareEvent();
|
||||
|
||||
signals:
|
||||
void stateChanged(QScroller::State newstate);
|
||||
void scrollerPropertiesChanged(const QScrollerProperties &);
|
||||
|
||||
private:
|
||||
QScroller(QObject *target);
|
||||
virtual ~QScroller();
|
||||
QScroller(const QScroller &);
|
||||
};
|
||||
@@ -0,0 +1,80 @@
|
||||
// qscrollerproperties.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QScrollerProperties
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qscrollerproperties.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QScrollerProperties();
|
||||
QScrollerProperties(const QScrollerProperties &sp);
|
||||
virtual ~QScrollerProperties();
|
||||
bool operator==(const QScrollerProperties &sp) const;
|
||||
bool operator!=(const QScrollerProperties &sp) const;
|
||||
static void setDefaultScrollerProperties(const QScrollerProperties &sp);
|
||||
static void unsetDefaultScrollerProperties();
|
||||
|
||||
enum OvershootPolicy
|
||||
{
|
||||
OvershootWhenScrollable,
|
||||
OvershootAlwaysOff,
|
||||
OvershootAlwaysOn,
|
||||
};
|
||||
|
||||
enum FrameRates
|
||||
{
|
||||
Standard,
|
||||
Fps60,
|
||||
Fps30,
|
||||
Fps20,
|
||||
};
|
||||
|
||||
enum ScrollMetric
|
||||
{
|
||||
MousePressEventDelay,
|
||||
DragStartDistance,
|
||||
DragVelocitySmoothingFactor,
|
||||
AxisLockThreshold,
|
||||
ScrollingCurve,
|
||||
DecelerationFactor,
|
||||
MinimumVelocity,
|
||||
MaximumVelocity,
|
||||
MaximumClickThroughVelocity,
|
||||
AcceleratingFlickMaximumTime,
|
||||
AcceleratingFlickSpeedupFactor,
|
||||
SnapPositionRatio,
|
||||
SnapTime,
|
||||
OvershootDragResistanceFactor,
|
||||
OvershootDragDistanceFactor,
|
||||
OvershootScrollDistanceFactor,
|
||||
OvershootScrollTime,
|
||||
HorizontalOvershootPolicy,
|
||||
VerticalOvershootPolicy,
|
||||
FrameRate,
|
||||
ScrollMetricCount,
|
||||
};
|
||||
|
||||
QVariant scrollMetric(QScrollerProperties::ScrollMetric metric) const;
|
||||
void setScrollMetric(QScrollerProperties::ScrollMetric metric, const QVariant &value);
|
||||
};
|
||||
@@ -0,0 +1,101 @@
|
||||
// qshortcut.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QShortcut : public QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qshortcut.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QShortcut(QWidget *parent /TransferThis/);
|
||||
QShortcut(const QKeySequence &key, QWidget *parent /TransferThis/, SIP_PYOBJECT member /TypeHint="PYQT_SLOT"/ = 0, SIP_PYOBJECT ambiguousMember /TypeHint="PYQT_SLOT"/ = 0, Qt::ShortcutContext context = Qt::WindowShortcut) [(const QKeySequence &key, QWidget *parent, const char *member = 0, const char *ambiguousMember = 0, Qt::ShortcutContext context = Qt::WindowShortcut)];
|
||||
%MethodCode
|
||||
// Construct the shortcut without any connections.
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipCpp = new sipQShortcut(*a0, a1, 0, 0, a4);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
if (a2)
|
||||
{
|
||||
QObject *rx2;
|
||||
QByteArray member2;
|
||||
|
||||
if ((sipError = pyqt5_qtwidgets_get_connection_parts(a2, sipCpp, "()", false, &rx2, member2)) == sipErrorNone)
|
||||
{
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
QObject::connect(sipCpp, SIGNAL(activated()), rx2,
|
||||
member2.constData());
|
||||
Py_END_ALLOW_THREADS
|
||||
}
|
||||
else
|
||||
{
|
||||
delete sipCpp;
|
||||
|
||||
if (sipError == sipErrorContinue)
|
||||
sipError = sipBadCallableArg(2, a2);
|
||||
}
|
||||
}
|
||||
|
||||
if (a3)
|
||||
{
|
||||
QObject *rx3;
|
||||
QByteArray member3;
|
||||
|
||||
if ((sipError = pyqt5_qtwidgets_get_connection_parts(a3, sipCpp, "()", false, &rx3, member3)) == sipErrorNone)
|
||||
{
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
QObject::connect(sipCpp, SIGNAL(activatedAmbiguously()), rx3,
|
||||
member3.constData());
|
||||
Py_END_ALLOW_THREADS
|
||||
}
|
||||
else
|
||||
{
|
||||
delete sipCpp;
|
||||
|
||||
if (sipError == sipErrorContinue)
|
||||
sipError = sipBadCallableArg(3, a3);
|
||||
}
|
||||
}
|
||||
%End
|
||||
|
||||
virtual ~QShortcut();
|
||||
void setKey(const QKeySequence &key);
|
||||
QKeySequence key() const;
|
||||
void setEnabled(bool enable);
|
||||
bool isEnabled() const;
|
||||
void setContext(Qt::ShortcutContext context);
|
||||
Qt::ShortcutContext context() const;
|
||||
void setWhatsThis(const QString &text);
|
||||
QString whatsThis() const;
|
||||
int id() const;
|
||||
QWidget *parentWidget() const;
|
||||
void setAutoRepeat(bool on);
|
||||
bool autoRepeat() const;
|
||||
|
||||
signals:
|
||||
void activated();
|
||||
void activatedAmbiguously();
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *e);
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
// qsizegrip.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QSizeGrip : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsizegrip.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QSizeGrip(QWidget *parent /TransferThis/);
|
||||
virtual ~QSizeGrip();
|
||||
virtual QSize sizeHint() const;
|
||||
virtual void setVisible(bool);
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void mousePressEvent(QMouseEvent *);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *mouseEvent);
|
||||
virtual void mouseMoveEvent(QMouseEvent *);
|
||||
virtual bool eventFilter(QObject *, QEvent *);
|
||||
virtual bool event(QEvent *);
|
||||
virtual void moveEvent(QMoveEvent *moveEvent);
|
||||
virtual void showEvent(QShowEvent *showEvent);
|
||||
virtual void hideEvent(QHideEvent *hideEvent);
|
||||
};
|
||||
@@ -0,0 +1,118 @@
|
||||
// qsizepolicy.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QSizePolicy
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsizepolicy.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum PolicyFlag
|
||||
{
|
||||
GrowFlag,
|
||||
ExpandFlag,
|
||||
ShrinkFlag,
|
||||
IgnoreFlag,
|
||||
};
|
||||
|
||||
enum Policy
|
||||
{
|
||||
Fixed,
|
||||
Minimum,
|
||||
Maximum,
|
||||
Preferred,
|
||||
MinimumExpanding,
|
||||
Expanding,
|
||||
Ignored,
|
||||
};
|
||||
|
||||
QSizePolicy();
|
||||
QSizePolicy(QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical, QSizePolicy::ControlType type = QSizePolicy::DefaultType);
|
||||
QSizePolicy(const QVariant &variant /GetWrapper/) /NoDerived/;
|
||||
%MethodCode
|
||||
if (a0->canConvert<QSizePolicy>())
|
||||
sipCpp = new QSizePolicy(a0->value<QSizePolicy>());
|
||||
else
|
||||
sipError = sipBadCallableArg(0, a0Wrapper);
|
||||
%End
|
||||
|
||||
QSizePolicy::Policy horizontalPolicy() const;
|
||||
QSizePolicy::Policy verticalPolicy() const;
|
||||
void setHorizontalPolicy(QSizePolicy::Policy d);
|
||||
void setVerticalPolicy(QSizePolicy::Policy d);
|
||||
Qt::Orientations expandingDirections() const;
|
||||
void setHeightForWidth(bool b);
|
||||
bool hasHeightForWidth() const;
|
||||
bool operator==(const QSizePolicy &s) const;
|
||||
bool operator!=(const QSizePolicy &s) const;
|
||||
int horizontalStretch() const;
|
||||
int verticalStretch() const;
|
||||
void setHorizontalStretch(int stretchFactor);
|
||||
void setVerticalStretch(int stretchFactor);
|
||||
void transpose();
|
||||
%If (Qt_5_9_0 -)
|
||||
QSizePolicy transposed() const;
|
||||
%End
|
||||
|
||||
enum ControlType
|
||||
{
|
||||
DefaultType,
|
||||
ButtonBox,
|
||||
CheckBox,
|
||||
ComboBox,
|
||||
Frame,
|
||||
GroupBox,
|
||||
Label,
|
||||
Line,
|
||||
LineEdit,
|
||||
PushButton,
|
||||
RadioButton,
|
||||
Slider,
|
||||
SpinBox,
|
||||
TabWidget,
|
||||
ToolButton,
|
||||
};
|
||||
|
||||
typedef QFlags<QSizePolicy::ControlType> ControlTypes;
|
||||
QSizePolicy::ControlType controlType() const;
|
||||
void setControlType(QSizePolicy::ControlType type);
|
||||
void setWidthForHeight(bool b);
|
||||
bool hasWidthForHeight() const;
|
||||
%If (Qt_5_2_0 -)
|
||||
bool retainSizeWhenHidden() const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void setRetainSizeWhenHidden(bool retainSize);
|
||||
%End
|
||||
%If (Qt_5_6_0 -)
|
||||
long __hash__() const;
|
||||
%MethodCode
|
||||
sipRes = qHash(*sipCpp);
|
||||
%End
|
||||
|
||||
%End
|
||||
};
|
||||
|
||||
QDataStream &operator<<(QDataStream &, const QSizePolicy & /Constrained/) /ReleaseGIL/;
|
||||
QDataStream &operator>>(QDataStream &, QSizePolicy & /Constrained/) /ReleaseGIL/;
|
||||
QFlags<QSizePolicy::ControlType> operator|(QSizePolicy::ControlType f1, QFlags<QSizePolicy::ControlType> f2);
|
||||
@@ -0,0 +1,57 @@
|
||||
// qslider.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QSlider : public QAbstractSlider
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qslider.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum TickPosition
|
||||
{
|
||||
NoTicks,
|
||||
TicksAbove,
|
||||
TicksLeft,
|
||||
TicksBelow,
|
||||
TicksRight,
|
||||
TicksBothSides,
|
||||
};
|
||||
|
||||
explicit QSlider(QWidget *parent /TransferThis/ = 0);
|
||||
QSlider(Qt::Orientation orientation, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QSlider();
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
void setTickPosition(QSlider::TickPosition position);
|
||||
QSlider::TickPosition tickPosition() const;
|
||||
void setTickInterval(int ti);
|
||||
int tickInterval() const;
|
||||
virtual bool event(QEvent *event);
|
||||
|
||||
protected:
|
||||
void initStyleOption(QStyleOptionSlider *option) const;
|
||||
virtual void paintEvent(QPaintEvent *ev);
|
||||
virtual void mousePressEvent(QMouseEvent *ev);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *ev);
|
||||
virtual void mouseMoveEvent(QMouseEvent *ev);
|
||||
};
|
||||
@@ -0,0 +1,124 @@
|
||||
// qspinbox.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QSpinBox : public QAbstractSpinBox
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qspinbox.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QSpinBox(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QSpinBox();
|
||||
int value() const;
|
||||
QString prefix() const;
|
||||
void setPrefix(const QString &p);
|
||||
QString suffix() const;
|
||||
void setSuffix(const QString &s);
|
||||
QString cleanText() const;
|
||||
int singleStep() const;
|
||||
void setSingleStep(int val);
|
||||
int minimum() const;
|
||||
void setMinimum(int min);
|
||||
int maximum() const;
|
||||
void setMaximum(int max);
|
||||
void setRange(int min, int max);
|
||||
|
||||
protected:
|
||||
virtual QValidator::State validate(QString &input /In,Out/, int &pos /In,Out/) const;
|
||||
virtual int valueFromText(const QString &text) const;
|
||||
virtual QString textFromValue(int v) const;
|
||||
virtual void fixup(QString &str /In,Out/) const;
|
||||
virtual bool event(QEvent *e);
|
||||
|
||||
public slots:
|
||||
void setValue(int val);
|
||||
|
||||
signals:
|
||||
void valueChanged(int);
|
||||
void valueChanged(const QString &);
|
||||
%If (Qt_5_14_0 -)
|
||||
void textChanged(const QString &);
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_5_2_0 -)
|
||||
int displayIntegerBase() const;
|
||||
%End
|
||||
%If (Qt_5_2_0 -)
|
||||
void setDisplayIntegerBase(int base);
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
QAbstractSpinBox::StepType stepType() const;
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
void setStepType(QAbstractSpinBox::StepType stepType);
|
||||
%End
|
||||
};
|
||||
|
||||
class QDoubleSpinBox : public QAbstractSpinBox
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qspinbox.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QDoubleSpinBox(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QDoubleSpinBox();
|
||||
double value() const;
|
||||
QString prefix() const;
|
||||
void setPrefix(const QString &p);
|
||||
QString suffix() const;
|
||||
void setSuffix(const QString &s);
|
||||
QString cleanText() const;
|
||||
double singleStep() const;
|
||||
void setSingleStep(double val);
|
||||
double minimum() const;
|
||||
void setMinimum(double min);
|
||||
double maximum() const;
|
||||
void setMaximum(double max);
|
||||
void setRange(double min, double max);
|
||||
int decimals() const;
|
||||
void setDecimals(int prec);
|
||||
virtual QValidator::State validate(QString &input /In,Out/, int &pos /In,Out/) const;
|
||||
virtual double valueFromText(const QString &text) const;
|
||||
virtual QString textFromValue(double v) const;
|
||||
virtual void fixup(QString &str /In,Out/) const;
|
||||
|
||||
public slots:
|
||||
void setValue(double val);
|
||||
|
||||
signals:
|
||||
void valueChanged(double);
|
||||
void valueChanged(const QString &);
|
||||
%If (Qt_5_14_0 -)
|
||||
void textChanged(const QString &);
|
||||
%End
|
||||
|
||||
public:
|
||||
%If (Qt_5_12_0 -)
|
||||
QAbstractSpinBox::StepType stepType() const;
|
||||
%End
|
||||
%If (Qt_5_12_0 -)
|
||||
void setStepType(QAbstractSpinBox::StepType stepType);
|
||||
%End
|
||||
};
|
||||
@@ -0,0 +1,55 @@
|
||||
// qsplashscreen.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QSplashScreen : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsplashscreen.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QSplashScreen(const QPixmap &pixmap = QPixmap(), Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
QSplashScreen(QWidget *parent /TransferThis/, const QPixmap &pixmap = QPixmap(), Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
%If (Qt_5_15_0 -)
|
||||
QSplashScreen(QScreen *screen, const QPixmap &pixmap = QPixmap(), Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
%End
|
||||
virtual ~QSplashScreen();
|
||||
void setPixmap(const QPixmap &pixmap);
|
||||
const QPixmap pixmap() const;
|
||||
void finish(QWidget *w);
|
||||
void repaint();
|
||||
%If (Qt_5_2_0 -)
|
||||
QString message() const;
|
||||
%End
|
||||
|
||||
public slots:
|
||||
void showMessage(const QString &message, int alignment = Qt::AlignLeft, const QColor &color = Qt::black);
|
||||
void clearMessage();
|
||||
|
||||
signals:
|
||||
void messageChanged(const QString &message);
|
||||
|
||||
protected:
|
||||
virtual void drawContents(QPainter *painter);
|
||||
virtual bool event(QEvent *e);
|
||||
virtual void mousePressEvent(QMouseEvent *);
|
||||
};
|
||||
@@ -0,0 +1,100 @@
|
||||
// qsplitter.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QSplitter : public QFrame
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsplitter.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QSplitter(QWidget *parent /TransferThis/ = 0);
|
||||
QSplitter(Qt::Orientation orientation, QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QSplitter();
|
||||
void addWidget(QWidget *widget /Transfer/);
|
||||
void insertWidget(int index, QWidget *widget /Transfer/);
|
||||
void setOrientation(Qt::Orientation);
|
||||
Qt::Orientation orientation() const;
|
||||
void setChildrenCollapsible(bool);
|
||||
bool childrenCollapsible() const;
|
||||
void setCollapsible(int index, bool);
|
||||
bool isCollapsible(int index) const;
|
||||
void setOpaqueResize(bool opaque = true);
|
||||
bool opaqueResize() const;
|
||||
void refresh();
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSizeHint() const;
|
||||
QList<int> sizes() const;
|
||||
void setSizes(const QList<int> &list);
|
||||
QByteArray saveState() const;
|
||||
bool restoreState(const QByteArray &state);
|
||||
int handleWidth() const;
|
||||
void setHandleWidth(int);
|
||||
int indexOf(QWidget *w) const;
|
||||
QWidget *widget(int index) const;
|
||||
int count() const /__len__/;
|
||||
void getRange(int index, int *, int *) const;
|
||||
QSplitterHandle *handle(int index) const /Transfer/;
|
||||
void setStretchFactor(int index, int stretch);
|
||||
%If (Qt_5_9_0 -)
|
||||
QWidget *replaceWidget(int index, QWidget *widget /Transfer/) /TransferBack/;
|
||||
%End
|
||||
|
||||
signals:
|
||||
void splitterMoved(int pos, int index);
|
||||
|
||||
protected:
|
||||
virtual QSplitterHandle *createHandle() /Transfer/;
|
||||
virtual void childEvent(QChildEvent *);
|
||||
virtual bool event(QEvent *);
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
virtual void changeEvent(QEvent *);
|
||||
void moveSplitter(int pos, int index);
|
||||
void setRubberBand(int position);
|
||||
int closestLegalPosition(int, int);
|
||||
};
|
||||
|
||||
class QSplitterHandle : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qsplitter.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
QSplitterHandle(Qt::Orientation o, QSplitter *parent /TransferThis/);
|
||||
virtual ~QSplitterHandle();
|
||||
void setOrientation(Qt::Orientation o);
|
||||
Qt::Orientation orientation() const;
|
||||
bool opaqueResize() const;
|
||||
QSplitter *splitter() const;
|
||||
virtual QSize sizeHint() const;
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void mouseMoveEvent(QMouseEvent *);
|
||||
virtual void mousePressEvent(QMouseEvent *);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *);
|
||||
virtual bool event(QEvent *);
|
||||
void moveSplitter(int p);
|
||||
int closestLegalPosition(int p);
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
};
|
||||
@@ -0,0 +1,113 @@
|
||||
// qstackedlayout.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QStackedLayout : public QLayout
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qstackedlayout.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
enum StackingMode
|
||||
{
|
||||
StackOne,
|
||||
StackAll,
|
||||
};
|
||||
|
||||
QStackedLayout();
|
||||
explicit QStackedLayout(QWidget *parent /TransferThis/);
|
||||
explicit QStackedLayout(QLayout *parentLayout /TransferThis/);
|
||||
virtual ~QStackedLayout();
|
||||
int addWidget(QWidget *w /GetWrapper/);
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipRes = sipCpp->addWidget(a0);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
// The layout's parent widget (if there is one) will now have ownership.
|
||||
QWidget *parent = sipCpp->parentWidget();
|
||||
|
||||
if (parent)
|
||||
{
|
||||
PyObject *py_parent = sipGetPyObject(parent, sipType_QWidget);
|
||||
|
||||
if (py_parent)
|
||||
sipTransferTo(a0Wrapper, py_parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For now give the Python ownership to the layout. This maintains
|
||||
// compatibility with previous versions and allows addWidget(QWidget()).
|
||||
sipTransferTo(a0Wrapper, sipSelf);
|
||||
}
|
||||
%End
|
||||
|
||||
int insertWidget(int index, QWidget *w /GetWrapper/);
|
||||
%MethodCode
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sipRes = sipCpp->insertWidget(a0, a1);
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
// The layout's parent widget (if there is one) will now have ownership.
|
||||
QWidget *parent = sipCpp->parentWidget();
|
||||
|
||||
if (parent)
|
||||
{
|
||||
PyObject *py_parent = sipGetPyObject(parent, sipType_QWidget);
|
||||
|
||||
if (py_parent)
|
||||
sipTransferTo(a1Wrapper, py_parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For now give the Python ownership to the layout. This maintains
|
||||
// compatibility with previous versions and allows insertWidget(QWidget()).
|
||||
sipTransferTo(a1Wrapper, sipSelf);
|
||||
}
|
||||
%End
|
||||
|
||||
QWidget *currentWidget() const;
|
||||
int currentIndex() const;
|
||||
QWidget *widget(int) const;
|
||||
virtual QWidget *widget();
|
||||
virtual int count() const;
|
||||
virtual void addItem(QLayoutItem *item /Transfer/);
|
||||
virtual QSize sizeHint() const;
|
||||
virtual QSize minimumSize() const;
|
||||
virtual QLayoutItem *itemAt(int) const;
|
||||
virtual QLayoutItem *takeAt(int) /TransferBack/;
|
||||
virtual void setGeometry(const QRect &rect);
|
||||
|
||||
signals:
|
||||
void widgetRemoved(int index);
|
||||
void currentChanged(int index);
|
||||
|
||||
public slots:
|
||||
void setCurrentIndex(int index);
|
||||
void setCurrentWidget(QWidget *w);
|
||||
|
||||
public:
|
||||
QStackedLayout::StackingMode stackingMode() const;
|
||||
void setStackingMode(QStackedLayout::StackingMode stackingMode);
|
||||
virtual bool hasHeightForWidth() const;
|
||||
virtual int heightForWidth(int width) const;
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
// qstackedwidget.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QStackedWidget : public QFrame
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qstackedwidget.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QStackedWidget(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QStackedWidget();
|
||||
int addWidget(QWidget *w /Transfer/);
|
||||
int insertWidget(int index, QWidget *w /Transfer/);
|
||||
void removeWidget(QWidget *w);
|
||||
QWidget *currentWidget() const;
|
||||
int currentIndex() const;
|
||||
int indexOf(QWidget *) const;
|
||||
QWidget *widget(int) const;
|
||||
int count() const /__len__/;
|
||||
|
||||
public slots:
|
||||
void setCurrentIndex(int index);
|
||||
void setCurrentWidget(QWidget *w);
|
||||
|
||||
signals:
|
||||
void currentChanged(int);
|
||||
void widgetRemoved(int index);
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *e);
|
||||
};
|
||||
@@ -0,0 +1,55 @@
|
||||
// qstatusbar.sip generated by MetaSIP
|
||||
//
|
||||
// This file is part of the QtWidgets Python extension module.
|
||||
//
|
||||
// Copyright (c) 2024 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 QStatusBar : public QWidget
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <qstatusbar.h>
|
||||
%End
|
||||
|
||||
public:
|
||||
explicit QStatusBar(QWidget *parent /TransferThis/ = 0);
|
||||
virtual ~QStatusBar();
|
||||
void addWidget(QWidget *widget /Transfer/, int stretch = 0);
|
||||
void addPermanentWidget(QWidget *widget /Transfer/, int stretch = 0);
|
||||
void removeWidget(QWidget *widget);
|
||||
void setSizeGripEnabled(bool);
|
||||
bool isSizeGripEnabled() const;
|
||||
QString currentMessage() const;
|
||||
int insertWidget(int index, QWidget *widget /Transfer/, int stretch = 0);
|
||||
int insertPermanentWidget(int index, QWidget *widget /Transfer/, int stretch = 0);
|
||||
|
||||
public slots:
|
||||
void showMessage(const QString &message, int msecs = 0);
|
||||
void clearMessage();
|
||||
|
||||
signals:
|
||||
void messageChanged(const QString &text);
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent *);
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
void reformat();
|
||||
void hideOrShow();
|
||||
virtual bool event(QEvent *);
|
||||
virtual void showEvent(QShowEvent *);
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user