// qdialogbuttonbox.sip generated by MetaSIP on Fri Sep 28 17:07:47 2007 // // This file is part of the QtGui Python extension module. // // Copyright (c) 2007 // Phil Thompson // // This file is part of PyQt. // // This copy of PyQt is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 as published by // the Free Software Foundation and appearing in the file LICENSE included in the // packaging of this file. // // PyQt is supplied in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more // details. // // You should have received a copy of the GNU General Public License along with // PyQt; see the file LICENSE. If not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. %If (Qt_4_2_0 -) %ModuleCode #include %End %End %If (Qt_4_2_0 -) class QDialogButtonBox : QWidget { %TypeHeaderCode #include %End public: enum ButtonLayout { WinLayout, MacLayout, KdeLayout, GnomeLayout, }; 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 StandardButtons; QDialogButtonBox(QWidget *parent /TransferThis/ = 0); QDialogButtonBox(Qt::Orientation orientation, QWidget *parent /TransferThis/ = 0); QDialogButtonBox(QFlags buttons, Qt::Orientation orientation = Qt::Horizontal, QWidget *parent /TransferThis/ = 0); 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 buttons() const; QDialogButtonBox::ButtonRole buttonRole(QAbstractButton *button) const; void setStandardButtons(QFlags buttons); QFlags 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); private: QDialogButtonBox(const QDialogButtonBox &); }; %End %If (Qt_4_2_0 -) QFlags operator|(QDialogButtonBox::StandardButton f1, QFlags f2); %End %If (Qt_4_2_0 -) QFlags operator|(QDialogButtonBox::StandardButton f1, QDialogButtonBox::StandardButton f2); %End