Git commit 509902841f58145be3361b2ecf426fbe1f3a9347 by Simon Edwards. Committed on 03/07/2014 at 19:52. Pushed by sedwards into branch 'master'. * Added kwidgetsaddons. * Some API updates. M +8 -3 CMakeLists.txt M +0 -1 sip/kcoreaddons/kcoreaddonsmod.sip C +9 -14 sip/kwidgetsaddons/kacceleratormanager.sip [from: sip/kcorea= ddons/kfilesystemtype_p.sip - 067% similarity] A +41 -0 sip/kwidgetsaddons/kactionmenu.sip A +73 -0 sip/kwidgetsaddons/kactionselector.sip C +11 -14 sip/kwidgetsaddons/kanimatedbutton.sip [from: sip/kcoreaddon= s/kfilesystemtype_p.sip - 068% similarity] A +41 -0 sip/kwidgetsaddons/kassistantdialog.sip A +52 -0 sip/kwidgetsaddons/kcapacitybar.sip A +53 -0 sip/kwidgetsaddons/kcharselect.sip A +48 -0 sip/kwidgetsaddons/kcolorbutton.sip C +15 -17 sip/kwidgetsaddons/kcolorcombo.sip [from: sip/solid/networks= hare.sip - 056% similarity] C +11 -14 sip/kwidgetsaddons/kcursor.sip [from: sip/kcoreaddons/kfiles= ystemtype_p.sip - 068% similarity] A +72 -0 sip/kwidgetsaddons/kdatecombobox.sip A +60 -0 sip/kwidgetsaddons/kdatepicker.sip A +109 -0 sip/kwidgetsaddons/kdatetimeedit.sip C +11 -17 sip/kwidgetsaddons/kdragwidgetdecorator.sip [from: sip/solid= /networkshare.sip - 062% similarity] A +54 -0 sip/kwidgetsaddons/kdualaction.sip A +79 -0 sip/kwidgetsaddons/keditlistwidget.sip C +10 -17 sip/kwidgetsaddons/kfontaction.sip [from: sip/solid/networks= hare.sip - 059% similarity] A +77 -0 sip/kwidgetsaddons/kfontchooser.sip C +15 -17 sip/kwidgetsaddons/kfontrequester.sip [from: sip/solid/netwo= rkshare.sip - 054% similarity] C +12 -17 sip/kwidgetsaddons/kfontsizeaction.sip [from: sip/solid/netw= orkshare.sip - 059% similarity] A +48 -0 sip/kwidgetsaddons/kguiitem.sip A +66 -0 sip/kwidgetsaddons/kled.sip A +107 -0 sip/kwidgetsaddons/kmessagebox.sip C +0 -17 sip/kwidgetsaddons/kmessageboxdontaskagaininterface.sip [fro= m: sip/kcoreaddons/kfilesystemtype_p.sip - 078% similarity] C +0 -17 sip/kwidgetsaddons/kmessageboxnotifyinterface.sip [from: sip= /kcoreaddons/kfilesystemtype_p.sip - 078% similarity] A +65 -0 sip/kwidgetsaddons/kmessagewidget.sip A +49 -0 sip/kwidgetsaddons/kmimetypechooser.sip A +96 -0 sip/kwidgetsaddons/kmultitabbar.sip A +50 -0 sip/kwidgetsaddons/knewpassworddialog.sip A +61 -0 sip/kwidgetsaddons/kpagedialog.sip C +14 -14 sip/kwidgetsaddons/kpagemodel.sip [from: sip/kcoreaddons/kfi= lesystemtype_p.sip - 070% similarity] A +53 -0 sip/kwidgetsaddons/kpageview.sip A +44 -0 sip/kwidgetsaddons/kpagewidget.sip A +74 -0 sip/kwidgetsaddons/kpagewidgetmodel.sip A +73 -0 sip/kwidgetsaddons/kpassworddialog.sip C +10 -17 sip/kwidgetsaddons/kpixmapregionselectordialog.sip [from: si= p/solid/networkshare.sip - 051% similarity] A +52 -0 sip/kwidgetsaddons/kpixmapregionselectorwidget.sip C +13 -17 sip/kwidgetsaddons/kpixmapsequence.sip [from: sip/solid/netw= orkshare.sip - 054% similarity] A +43 -0 sip/kwidgetsaddons/kpixmapsequenceoverlaypainter.sip C +10 -17 sip/kwidgetsaddons/kpixmapsequencewidget.sip [from: sip/soli= d/networkshare.sip - 061% similarity] C +15 -17 sip/kwidgetsaddons/kpopupframe.sip [from: sip/solid/networks= hare.sip - 057% similarity] A +49 -0 sip/kwidgetsaddons/kratingpainter.sip A +56 -0 sip/kwidgetsaddons/kratingwidget.sip A +82 -0 sip/kwidgetsaddons/kruler.sip A +79 -0 sip/kwidgetsaddons/kselectaction.sip A +69 -0 sip/kwidgetsaddons/kselector.sip C +9 -14 sip/kwidgetsaddons/kseparator.sip [from: sip/kcoreaddons/kfi= lesystemtype_p.sip - 067% similarity] A +43 -0 sip/kwidgetsaddons/ksqueezedtextlabel.sip A +104 -0 sip/kwidgetsaddons/kstandardguiitem.sip A +73 -0 sip/kwidgetsaddons/ktimecombobox.sip A +59 -0 sip/kwidgetsaddons/ktitlewidget.sip C +9 -17 sip/kwidgetsaddons/ktoggleaction.sip [from: sip/solid/networ= kshare.sip - 064% similarity] C +9 -17 sip/kwidgetsaddons/ktogglefullscreenaction.sip [from: sip/so= lid/networkshare.sip - 063% similarity] C +13 -17 sip/kwidgetsaddons/ktoolbarlabelaction.sip [from: sip/solid/= networkshare.sip - 055% similarity] C +9 -17 sip/kwidgetsaddons/ktoolbarpopupaction.sip [from: sip/solid/= networkshare.sip - 063% similarity] C +8 -14 sip/kwidgetsaddons/ktoolbarspaceraction.sip [from: sip/kcore= addons/kfilesystemtype_p.sip - 075% similarity] A +66 -0 sip/kwidgetsaddons/kurllabel.sip C +10 -17 sip/kwidgetsaddons/kviewstatemaintainerbase.sip [from: sip/s= olid/networkshare.sip - 061% similarity] A +45 -0 sip/kwidgetsaddons/kviewstateserializer.sip A +90 -0 sip/kwidgetsaddons/kwidgetsaddonsmod.sip A +48 -0 sip/kwidgetsaddons/kxyselector.sip R +8 -14 sip/kwidgetsaddons/lineediturldropeventfilter.sip [from: sip= /kcoreaddons/kfilesystemtype_p.sip - 073% similarity] M +18 -3 sip/solid/battery.sip M +1 -1 sip/solid/device.sip M +0 -11 sip/solid/deviceinterface.sip M +1 -2 sip/solid/networkshare.sip M +5 -5 sip/solid/predicate.sip M +20 -13 sip/solid/solidmod.sip http://commits.kde.org/pykde5/509902841f58145be3361b2ecf426fbe1f3a9347 diff --git a/CMakeLists.txt b/CMakeLists.txt index 77be745..77cc2e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ include(PythonMacros) include(FeatureSummary) include(ECMSetupVersion) = -find_package(KF5 CONFIG REQUIRED Auth ItemModels ItemViews Archive Plottin= g Solid CoreAddons Sonnet GuiAddons) +find_package(KF5 CONFIG REQUIRED Auth ItemModels ItemViews Archive Plottin= g Solid CoreAddons Sonnet GuiAddons WidgetsAddons) = #option(PYKDEUIC4_ALTINSTALL "Enable parallel-installation of the PyKDE4 t= ools" FALSE) = @@ -96,7 +96,7 @@ include_directories( ${qt5core_include} ${qt5gui_include} ${qt5widgets_include} - ${solid_include}/solid + ${solid_include}/Solid/solid ${kf5sonnetcore_include}/SonnetCore/sonnet ${kf5sonnetcore_include}/SonnetUi/sonnet ) @@ -152,7 +152,12 @@ file(GLOB kguiaddons_files_sip sip/kguiaddons/*.sip) set(SIP_EXTRA_FILES_DEPEND ${kguiaddons_files_sip}) add_sip_python_module(PyKDE5.kguiaddons sip/kguiaddons/kguiaddonsmod.sip K= F5::GuiAddons) = -set(PYKDE_MODULES "kitemmodels kitemviews karchive kplotting solid kcoread= dons sonnet kguiaddons") +# kwidgetsaddons +file(GLOB kwidgetsaddons_files_sip sip/kwidgetsaddons/*.sip) +set(SIP_EXTRA_FILES_DEPEND ${kwidgetsaddons_files_sip}) +add_sip_python_module(PyKDE5.kwidgetsaddons sip/kwidgetsaddons/kwidgetsadd= onsmod.sip KF5::WidgetsAddons) + +set(PYKDE_MODULES "kitemmodels kitemviews karchive kplotting solid kcoread= dons sonnet kguiaddons kwidgetsaddons") = ##########################################################################= ##### = diff --git a/sip/kcoreaddons/kcoreaddonsmod.sip b/sip/kcoreaddons/kcoreaddo= nsmod.sip index bffc3c4..64f821f 100644 --- a/sip/kcoreaddons/kcoreaddonsmod.sip +++ b/sip/kcoreaddons/kcoreaddonsmod.sip @@ -33,7 +33,6 @@ %Include kdelibs4migration.sip %Include kdirwatch.sip %Include kexportplugin.sip -%Include kfilesystemtype_p.sip %Include kformat.sip %Include kjob.sip %Include kjobtrackerinterface.sip diff --git a/sip/kcoreaddons/kfilesystemtype_p.sip b/sip/kwidgetsaddons/kac= celeratormanager.sip similarity index 67% copy from sip/kcoreaddons/kfilesystemtype_p.sip copy to sip/kwidgetsaddons/kacceleratormanager.sip index fa655a8..4700251 100644 --- a/sip/kcoreaddons/kfilesystemtype_p.sip +++ b/sip/kwidgetsaddons/kacceleratormanager.sip @@ -17,20 +17,15 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -%ModuleHeaderCode -#include +class KAcceleratorManager +{ +%TypeHeaderCode +#include %End = -namespace KFileSystemType -{ -enum Type -{ - Unknown, - Nfs, - Smb, - Fat, - Ramfs, - Other -}; -KFileSystemType::Type fileSystemType (const QString& path); +public: + static void manage (QWidget* widget, bool programmers_mode= =3D 0); + static void last_manage (QString& added, QString& changed,= QString& removed); + static void setNoAccel (QWidget* widget); + static void addStandardActionNames (const QStringList& nam= es); }; diff --git a/sip/kwidgetsaddons/kactionmenu.sip b/sip/kwidgetsaddons/kactio= nmenu.sip new file mode 100644 index 0000000..6cb1bb1 --- /dev/null +++ b/sip/kwidgetsaddons/kactionmenu.sip @@ -0,0 +1,41 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KActionMenu : QWidgetAction +{ +%TypeHeaderCode +#include +%End + +public: + explicit KActionMenu (QObject* parent); + KActionMenu (const QString& text, QObject* par= ent); + KActionMenu (const QIcon& icon, const QString&= text, QObject* parent); + virtual ~KActionMenu (); + void addAction (QAction* action); + QAction* addSeparator (); + void insertAction (QAction* before, QAction* action= ); + QAction* insertSeparator (QAction* before); + void removeAction (QAction* action); + bool delayed () const; + void setDelayed (bool delayed); + bool stickyMenu () const; + void setStickyMenu (bool sticky); + virtual QWidget* createWidget (QWidget* parent); +}; diff --git a/sip/kwidgetsaddons/kactionselector.sip b/sip/kwidgetsaddons/ka= ctionselector.sip new file mode 100644 index 0000000..dff29f5 --- /dev/null +++ b/sip/kwidgetsaddons/kactionselector.sip @@ -0,0 +1,73 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KActionSelector : QWidget +{ +%TypeHeaderCode +#include +%End + +public: + explicit KActionSelector (QWidget* parent =3D 0); + ~KActionSelector (); + QListWidget* availableListWidget () const; + QListWidget* selectedListWidget () const; + enum MoveButton + { + ButtonAdd, + ButtonRemove, + ButtonUp, + ButtonDown + }; + enum InsertionPolicy + { + BelowCurrent, + Sorted, + AtTop, + AtBottom + }; + bool moveOnDoubleClick () const; + void setMoveOnDoubleClick (bool enable); + bool keyboardEnabled () const; + void setKeyboardEnabled (bool enable); + QString availableLabel () const; + void setAvailableLabel (const QString& text); + QString selectedLabel () const; + void setSelectedLabel (const QString& text); + KActionSelector::InsertionPolicy availableInsertionPolicy () const; + void setAvailableInsertionPolicy (KActionSelector::= InsertionPolicy policy); + KActionSelector::InsertionPolicy selectedInsertionPolicy () const; + void setSelectedInsertionPolicy (KActionSelector::I= nsertionPolicy policy); + bool showUpDownButtons () const; + void setShowUpDownButtons (bool show); + void setButtonIcon (const QString& icon, KActionSel= ector::MoveButton button); + void setButtonIconSet (const QIcon& iconset, KActio= nSelector::MoveButton button); + void setButtonTooltip (const QString& tip, KActionS= elector::MoveButton button); + void setButtonWhatsThis (const QString& text, KActi= onSelector::MoveButton button); +signals: + void added (QListWidgetItem* item); + void removed (QListWidgetItem* item); + void movedUp (QListWidgetItem* item); + void movedDown (QListWidgetItem* item); +public: + void setButtonsEnabled (); +protected: + void keyPressEvent (QKeyEvent*); + bool eventFilter (QObject*, QEvent*); +}; diff --git a/sip/kcoreaddons/kfilesystemtype_p.sip b/sip/kwidgetsaddons/kan= imatedbutton.sip similarity index 68% copy from sip/kcoreaddons/kfilesystemtype_p.sip copy to sip/kwidgetsaddons/kanimatedbutton.sip index fa655a8..f7f043d 100644 --- a/sip/kcoreaddons/kfilesystemtype_p.sip +++ b/sip/kwidgetsaddons/kanimatedbutton.sip @@ -17,20 +17,17 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -%ModuleHeaderCode -#include +class KAnimatedButton : QToolButton +{ +%TypeHeaderCode +#include %End = -namespace KFileSystemType -{ -enum Type -{ - Unknown, - Nfs, - Smb, - Fat, - Ramfs, - Other -}; -KFileSystemType::Type fileSystemType (const QString& path); +public: + explicit KAnimatedButton (QWidget* parent =3D 0); + virtual ~KAnimatedButton (); + QString animationPath () const; + void setAnimationPath (const QString& path); + void start (); + void stop (); }; diff --git a/sip/kwidgetsaddons/kassistantdialog.sip b/sip/kwidgetsaddons/k= assistantdialog.sip new file mode 100644 index 0000000..3d17bfe --- /dev/null +++ b/sip/kwidgetsaddons/kassistantdialog.sip @@ -0,0 +1,41 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KAssistantDialog : KPageDialog +{ +%TypeHeaderCode +#include +%End + +public: + explicit KAssistantDialog (QWidget* parent =3D 0, Qt::W= indowFlags flags =3D 0); + virtual ~KAssistantDialog (); + void setValid (KPageWidgetItem* page, bool enable); + bool isValid (KPageWidgetItem* page) const; + void setAppropriate (KPageWidgetItem* page, bool ap= propriate); + bool isAppropriate (KPageWidgetItem* page) const; + QPushButton* nextButton () const; + QPushButton* backButton () const; + QPushButton* finishButton () const; + virtual void back (); + virtual void next (); +protected: + explicit KAssistantDialog (KPageWidget* widget, QWidget= * parent =3D 0, Qt::WindowFlags flags =3D 0); + virtual void showEvent (QShowEvent* event); +}; diff --git a/sip/kwidgetsaddons/kcapacitybar.sip b/sip/kwidgetsaddons/kcapa= citybar.sip new file mode 100644 index 0000000..57607ba --- /dev/null +++ b/sip/kwidgetsaddons/kcapacitybar.sip @@ -0,0 +1,52 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KCapacityBar : QWidget +{ +%TypeHeaderCode +#include +%End + +public: + enum DrawTextMode + { + DrawTextInline, + DrawTextOutline + }; + explicit KCapacityBar (KCapacityBar::DrawTextMode drawT= extMode =3D KCapacityBar::DrawTextMode::DrawTextOutline, QWidget* parent = =3D 0); + ~KCapacityBar (); + void setValue (int value); + int value () const; + void setText (const QString& text); + QString text () const; + void setFillFullBlocks (bool fillFullBlocks); + bool fillFullBlocks () const; + void setContinuous (bool continuous); + bool continuous () const; + void setBarHeight (int barHeight); + int barHeight () const; + void setHorizontalTextAlignment (Qt::Alignment text= Alignment); + Qt::Alignment horizontalTextAlignment () const; + void setDrawTextMode (KCapacityBar::DrawTextMode mo= de); + KCapacityBar::DrawTextMode drawTextMode () const; + void drawCapacityBar (QPainter* p, const QRect& rec= t) const; + virtual QSize minimumSizeHint () const; +protected: + virtual void paintEvent (QPaintEvent* event); +}; diff --git a/sip/kwidgetsaddons/kcharselect.sip b/sip/kwidgetsaddons/kchars= elect.sip new file mode 100644 index 0000000..6ee9203 --- /dev/null +++ b/sip/kwidgetsaddons/kcharselect.sip @@ -0,0 +1,53 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KCharSelect : QWidget +{ +%TypeHeaderCode +#include +%End + +public: + enum Control + { + SearchLine, + FontCombo, + FontSize, + BlockCombos, + CharacterTable, + DetailBrowser, + HistoryButtons, + AllGuiElements + }; + typedef QFlags Controls; + explicit KCharSelect (QWidget* parent, const KCharSelec= t::Controls controls =3D KCharSelect::Control::AllGuiElements); + explicit KCharSelect (QWidget* parent, QObject* actionP= arent, const KCharSelect::Controls controls =3D KCharSelect::Control::AllGu= iElements); + ~KCharSelect (); + virtual QSize sizeHint () const; + QChar currentChar () const; + QFont currentFont () const; + QList displayedChars () const; + void setCurrentChar (const QChar& c); + void setCurrentFont (const QFont& font); +signals: + void currentFontChanged (const QFont& font); + void currentCharChanged (const QChar& c); + void displayedCharsChanged (); + void charSelected (const QChar& c); +}; diff --git a/sip/kwidgetsaddons/kcolorbutton.sip b/sip/kwidgetsaddons/kcolo= rbutton.sip new file mode 100644 index 0000000..75cd017 --- /dev/null +++ b/sip/kwidgetsaddons/kcolorbutton.sip @@ -0,0 +1,48 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KColorButton : QPushButton +{ +%TypeHeaderCode +#include +%End + +public: + explicit KColorButton (QWidget* parent =3D 0); + explicit KColorButton (const QColor& c, QWidget* parent= =3D 0); + KColorButton (const QColor& c, const QColor& d= efaultColor, QWidget* parent =3D 0); + virtual ~KColorButton (); + QColor color () const; + void setColor (const QColor& c); + void setAlphaChannelEnabled (bool alpha); + bool isAlphaChannelEnabled () const; + QColor defaultColor () const; + void setDefaultColor (const QColor& c); + QSize sizeHint () const; + QSize minimumSizeHint () const; +signals: + void changed (const QColor& newColor); +protected: + virtual void paintEvent (QPaintEvent* pe); + virtual void dragEnterEvent (QDragEnterEvent*); + virtual void dropEvent (QDropEvent*); + virtual void mousePressEvent (QMouseEvent* e); + virtual void mouseMoveEvent (QMouseEvent* e); + virtual void keyPressEvent (QKeyEvent* e); +}; diff --git a/sip/solid/networkshare.sip b/sip/kwidgetsaddons/kcolorcombo.sip similarity index 56% copy from sip/solid/networkshare.sip copy to sip/kwidgetsaddons/kcolorcombo.sip index aeb8343..3057a6c 100644 --- a/sip/solid/networkshare.sip +++ b/sip/kwidgetsaddons/kcolorcombo.sip @@ -17,26 +17,24 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -namespace Solid -{ -class NetworkShare : Solid::DeviceInterface +class KColorCombo : QComboBox { %TypeHeaderCode -#include +#include %End = - explicit NetworkShare (QObject* backendObject); public: - virtual ~NetworkShare (); - enum ShareType - { - Unknown, - Nfs, - Cifs, - Upnp - }; - static Solid::DeviceInterface::Type deviceInterfaceType (); - Solid::NetworkShare::ShareType type () const; - QUrl url () const; -}; + explicit KColorCombo (QWidget* parent =3D 0); + ~KColorCombo (); + void setColor (const QColor& col); + QColor color () const; + bool isCustomColor () const; + void setColors (const QList& colors); + QList colors () const; + void showEmptyList (); +signals: + void activated (const QColor& col); + void highlighted (const QColor& col); +protected: + virtual void paintEvent (QPaintEvent* event); }; diff --git a/sip/kcoreaddons/kfilesystemtype_p.sip b/sip/kwidgetsaddons/kcu= rsor.sip similarity index 68% copy from sip/kcoreaddons/kfilesystemtype_p.sip copy to sip/kwidgetsaddons/kcursor.sip index fa655a8..5641a30 100644 --- a/sip/kcoreaddons/kfilesystemtype_p.sip +++ b/sip/kwidgetsaddons/kcursor.sip @@ -17,20 +17,17 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -%ModuleHeaderCode -#include +class KCursor +{ +%TypeHeaderCode +#include %End = -namespace KFileSystemType -{ -enum Type -{ - Unknown, - Nfs, - Smb, - Fat, - Ramfs, - Other -}; -KFileSystemType::Type fileSystemType (const QString& path); +public: + static void setAutoHideCursor (QWidget* w, bool enable, bo= ol customEventFilter =3D 0); + static void setHideCursorDelay (int ms); + static int hideCursorDelay (); + static void autoHideEventFilter (QObject*, QEvent*); +private: + KCursor (); }; diff --git a/sip/kwidgetsaddons/kdatecombobox.sip b/sip/kwidgetsaddons/kdat= ecombobox.sip new file mode 100644 index 0000000..b2d247e --- /dev/null +++ b/sip/kwidgetsaddons/kdatecombobox.sip @@ -0,0 +1,72 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KDateComboBox : QComboBox +{ +%TypeHeaderCode +#include +%End + +public: + enum Option + { + EditDate, + SelectDate, + DatePicker, + DateKeywords, + WarnOnInvalid + }; + typedef QFlags Options; + explicit KDateComboBox (QWidget* parent =3D 0); + virtual ~KDateComboBox (); + QDate date () const; + bool isValid () const; + bool isNull () const; + KDateComboBox::Options options () const; + QLocale::FormatType displayFormat () const; + QDate minimumDate () const; + QDate maximumDate () const; + QMap dateMap () const; +signals: + void dateEntered (const QDate& date); + void dateChanged (const QDate& date); + void dateEdited (const QDate& date); +public: + void setDate (const QDate& date); + void setOptions (KDateComboBox::Options options); + void setDisplayFormat (QLocale::FormatType format); + void setDateRange (const QDate& minDate, const QDat= e& maxDate, const QString& minWarnMsg =3D QString(), const QString& maxWarn= Msg =3D QString()); + void resetDateRange (); + void setMinimumDate (const QDate& minTime, const QS= tring& minWarnMsg =3D QString()); + void resetMinimumDate (); + void setMaximumDate (const QDate& maxDate, const QS= tring& maxWarnMsg =3D QString()); + void resetMaximumDate (); + void setDateMap (QMap dateMap); +protected: + virtual bool eventFilter (QObject* object, QEvent* event); + virtual void showPopup (); + virtual void hidePopup (); + virtual void mousePressEvent (QMouseEvent* event); + virtual void wheelEvent (QWheelEvent* event); + virtual void keyPressEvent (QKeyEvent* event); + virtual void focusInEvent (QFocusEvent* event); + virtual void focusOutEvent (QFocusEvent* event); + virtual void resizeEvent (QResizeEvent* event); + virtual void assignDate (const QDate& date); +}; diff --git a/sip/kwidgetsaddons/kdatepicker.sip b/sip/kwidgetsaddons/kdatep= icker.sip new file mode 100644 index 0000000..6753dc8 --- /dev/null +++ b/sip/kwidgetsaddons/kdatepicker.sip @@ -0,0 +1,60 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KDatePicker : QFrame +{ +%TypeHeaderCode +#include +%End + +public: + explicit KDatePicker (QWidget* parent =3D 0); + explicit KDatePicker (const QDate& dt, QWidget* parent = =3D 0); + virtual ~KDatePicker (); + QSize sizeHint () const; + bool setDate (const QDate& date); + const QDate& date () const; +//ig KDateTable* dateTable () const; + void setFontSize (int); + int fontSize () const; + void setCloseButton (bool enable); + bool hasCloseButton () const; +protected: + virtual bool eventFilter (QObject* o, QEvent* e); + virtual void resizeEvent (QResizeEvent*); + void dateChangedSlot (const QDate& date); + void tableClickedSlot (); + void monthForwardClicked (); + void monthBackwardClicked (); + void yearForwardClicked (); + void yearBackwardClicked (); + void selectMonthClicked (); + void selectYearClicked (); + void uncheckYearSelector (); + void lineEnterPressed (); + void todayButtonClicked (); + void weekSelected (int); +signals: + void dateChanged (const QDate& date); + void dateSelected (const QDate& date); + void dateEntered (const QDate& date); + void tableClicked (); +protected: + void changeEvent (QEvent* event); +}; diff --git a/sip/kwidgetsaddons/kdatetimeedit.sip b/sip/kwidgetsaddons/kdat= etimeedit.sip new file mode 100644 index 0000000..3103ad2 --- /dev/null +++ b/sip/kwidgetsaddons/kdatetimeedit.sip @@ -0,0 +1,109 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KDateTimeEdit : QWidget +{ +%TypeHeaderCode +#include +%End + +public: + enum Option + { + ShowCalendar, + ShowDate, + ShowTime, + ShowTimeZone, + EditDate, + EditTime, + SelectCalendar, + SelectDate, + SelectTime, + SelectTimeZone, + DatePicker, + DateKeywords, + ForceTime, + WarnOnInvalid + }; + typedef QFlags Options; + explicit KDateTimeEdit (QWidget* parent =3D 0); + virtual ~KDateTimeEdit (); + KDateTimeEdit::Options options () const; + QDateTime dateTime () const; + QDate date () const; + QTime time () const; + QTimeZone timeZone () const; + QList calendarLocalesList () const; + QDateTime minimumDateTime () const; + QDateTime maximumDateTime () const; + QLocale::FormatType dateDisplayFormat () const; + QMap dateMap () const; + QLocale::FormatType timeDisplayFormat () const; + int timeListInterval () const; + QList timeList () const; + QList timeZones () const; + bool isValid () const; + bool isNull () const; + bool isValidDate () const; + bool isNullDate () const; + bool isValidTime () const; + bool isNullTime () const; +signals: + void dateTimeEntered (const QDateTime& dateTime); + void dateTimeChanged (const QDateTime& dateTime); + void dateTimeEdited (const QDateTime& dateTime); + void calendarEntered (const QLocale& calendarLocale= ); + void calendarChanged (const QLocale& calendarLocale= ); + void dateEntered (const QDate& date); + void dateChanged (const QDate& date); + void dateEdited (const QDate& date); + void timeEntered (const QTime& time); + void timeChanged (const QTime& time); + void timeEdited (const QTime& time); + void timeZoneEntered (const QTimeZone& zone); + void timeZoneChanged (const QTimeZone& zone); +public: + void setOptions (KDateTimeEdit::Options options); + void setDateTime (const QDateTime& dateTime); + void setDate (const QDate& date); + void setTime (const QTime& time); + void setTimeZone (const QTimeZone& zone); + void setDateTimeRange (const QDateTime& minDateTime= , const QDateTime& maxDateTime, const QString& minWarnMsg =3D QString(), co= nst QString& maxWarnMsg =3D QString()); + void resetDateTimeRange (); + void setMinimumDateTime (const QDateTime& minDateTi= me, const QString& minWarnMsg =3D QString()); + void resetMinimumDateTime (); + void setMaximumDateTime (const QDateTime& maxDateTi= me, const QString& maxWarnMsg =3D QString()); + void resetMaximumDateTime (); + void setDateDisplayFormat (QLocale::FormatType form= at); + void setCalendarLocalesList (const QList& = calendarLocales); + void setDateMap (QMap dateMap); + void setTimeDisplayFormat (QLocale::FormatType form= atOptions); + void setTimeListInterval (int minutes); + void setTimeList (QList timeList, const QStr= ing& minWarnMsg =3D QString(), const QString& maxWarnMsg =3D QString()); + void setTimeZones (const QList& zones); +protected: + virtual bool eventFilter (QObject* object, QEvent* event); + virtual void focusInEvent (QFocusEvent* event); + virtual void focusOutEvent (QFocusEvent* event); + virtual void resizeEvent (QResizeEvent* event); + virtual void assignDateTime (const QDateTime& dateTime); + virtual void assignDate (const QDate& date); + virtual void assignTime (const QTime& time); + void assignTimeZone (const QTimeZone& zone); +}; diff --git a/sip/solid/networkshare.sip b/sip/kwidgetsaddons/kdragwidgetdec= orator.sip similarity index 62% copy from sip/solid/networkshare.sip copy to sip/kwidgetsaddons/kdragwidgetdecorator.sip index aeb8343..2e1ca5f 100644 --- a/sip/solid/networkshare.sip +++ b/sip/kwidgetsaddons/kdragwidgetdecorator.sip @@ -17,26 +17,20 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -namespace Solid -{ -class NetworkShare : Solid::DeviceInterface +class KDragWidgetDecoratorBase : QObject { %TypeHeaderCode -#include +#include %End = - explicit NetworkShare (QObject* backendObject); public: - virtual ~NetworkShare (); - enum ShareType - { - Unknown, - Nfs, - Cifs, - Upnp - }; - static Solid::DeviceInterface::Type deviceInterfaceType (); - Solid::NetworkShare::ShareType type () const; - QUrl url () const; -}; + explicit KDragWidgetDecoratorBase (QWidget* parent =3D = 0); + ~KDragWidgetDecoratorBase (); + void setDragEnabled (bool enable); + bool isDragEnabled () const; +protected: + QWidget* decoratedWidget () const; + virtual QDrag* dragObject (); + virtual bool eventFilter (QObject* watched, QEvent* event); + virtual void startDrag (); }; diff --git a/sip/kwidgetsaddons/kdualaction.sip b/sip/kwidgetsaddons/kduala= ction.sip new file mode 100644 index 0000000..ddc585c --- /dev/null +++ b/sip/kwidgetsaddons/kdualaction.sip @@ -0,0 +1,54 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KDualAction : QAction +{ +%TypeHeaderCode +#include +%End + +public: + explicit KDualAction (QObject* parent); + KDualAction (const QString& inactiveText, cons= t QString& activeText, QObject* parent); + ~KDualAction (); + void setActiveGuiItem (const KGuiItem&); + KGuiItem activeGuiItem () const; + void setInactiveGuiItem (const KGuiItem&); + KGuiItem inactiveGuiItem () const; + void setActiveIcon (const QIcon&); + QIcon activeIcon () const; + void setInactiveIcon (const QIcon&); + QIcon inactiveIcon () const; + void setActiveText (const QString&); + QString activeText () const; + void setInactiveText (const QString&); + QString inactiveText () const; + void setActiveToolTip (const QString&); + QString activeToolTip () const; + void setInactiveToolTip (const QString&); + QString inactiveToolTip () const; + void setIconForStates (const QIcon& icon); + bool isActive () const; + void setAutoToggle (bool); + bool autoToggle () const; + void setActive (bool state); +signals: + void activeChanged (bool); + void activeChangedByUser (bool); +}; diff --git a/sip/kwidgetsaddons/keditlistwidget.sip b/sip/kwidgetsaddons/ke= ditlistwidget.sip new file mode 100644 index 0000000..122a98c --- /dev/null +++ b/sip/kwidgetsaddons/keditlistwidget.sip @@ -0,0 +1,79 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KEditListWidget : QWidget +{ +%TypeHeaderCode +#include +%End + +public: + class CustomEditor /NoDefaultCtors/ + { +%TypeHeaderCode +#include +%End + + public: + CustomEditor (); + CustomEditor (QWidget* repWidget, QLineEdi= t* edit); + CustomEditor (QComboBox* combo); + virtual ~CustomEditor (); + void setRepresentationWidget (QWidget* repWidge= t); + void setLineEdit (QLineEdit* edit); + virtual QWidget* representationWidget () const; + virtual QLineEdit* lineEdit () const; + }; + enum Button + { + Add, + Remove, + UpDown, + All + }; + typedef QFlags Buttons; + explicit KEditListWidget (QWidget* parent =3D 0); + KEditListWidget (const KEditListWidget::Custom= Editor& customEditor, QWidget* parent =3D 0, bool checkAtEntering =3D 0, KE= ditListWidget::Buttons buttons =3D KEditListWidget::Button::All); + virtual ~KEditListWidget (); + QListView* listView () const; + QLineEdit* lineEdit () const; + QPushButton* addButton () const; + QPushButton* removeButton () const; + QPushButton* upButton () const; + QPushButton* downButton () const; + int count () const; + void insertStringList (const QStringList& list, int= index =3D -1); + void insertItem (const QString& text, int index =3D= -1); + void clear (); + QString text (int index) const; + int currentItem () const; + QString currentText () const; + QStringList items () const; + void setItems (const QStringList& items); + KEditListWidget::Buttons buttons () const; + void setButtons (KEditListWidget::Buttons buttons); + void setCheckAtEntering (bool check); + bool checkAtEntering (); + void setCustomEditor (const KEditListWidget::Custom= Editor& editor); + bool eventFilter (QObject* o, QEvent* e); +signals: + void changed (); + void added (const QString& text); + void removed (const QString& text); +}; diff --git a/sip/solid/networkshare.sip b/sip/kwidgetsaddons/kfontaction.sip similarity index 59% copy from sip/solid/networkshare.sip copy to sip/kwidgetsaddons/kfontaction.sip index aeb8343..04a8182 100644 --- a/sip/solid/networkshare.sip +++ b/sip/kwidgetsaddons/kfontaction.sip @@ -17,26 +17,19 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -namespace Solid -{ -class NetworkShare : Solid::DeviceInterface +class KFontAction : KSelectAction { %TypeHeaderCode -#include +#include %End = - explicit NetworkShare (QObject* backendObject); public: - virtual ~NetworkShare (); - enum ShareType - { - Unknown, - Nfs, - Cifs, - Upnp - }; - static Solid::DeviceInterface::Type deviceInterfaceType (); - Solid::NetworkShare::ShareType type () const; - QUrl url () const; -}; + KFontAction (uint fontListCriteria, QObject* p= arent); + explicit KFontAction (QObject* parent); + KFontAction (const QString& text, QObject* par= ent); + KFontAction (const QIcon& icon, const QString&= text, QObject* parent); + virtual ~KFontAction (); + QString font () const; + void setFont (const QString& family); + virtual QWidget* createWidget (QWidget* parent); }; diff --git a/sip/kwidgetsaddons/kfontchooser.sip b/sip/kwidgetsaddons/kfont= chooser.sip new file mode 100644 index 0000000..9e3ab55 --- /dev/null +++ b/sip/kwidgetsaddons/kfontchooser.sip @@ -0,0 +1,77 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KFontChooser : QWidget +{ +%TypeHeaderCode +#include +%End + +public: + enum FontColumn + { + FamilyList, + StyleList, + SizeList + }; + enum FontDiff + { + NoFontDiffFlags, + FontDiffFamily, + FontDiffStyle, + FontDiffSize, + AllFontDiffs + }; + typedef QFlags FontDiffFlags; + enum DisplayFlag + { + NoDisplayFlags, + FixedFontsOnly, + DisplayFrame, + ShowDifferences + }; + typedef QFlags DisplayFlags; + explicit KFontChooser (QWidget* parent =3D 0L, const KF= ontChooser::DisplayFlags& flags =3D KFontChooser::DisplayFlag::DisplayFrame= , const QStringList& fontList =3D QStringList(), int visibleListSize =3D 8); +//, Qt::CheckState* sizeIsRelativeState =3D 0L); + + virtual ~KFontChooser (); + void enableColumn (int column, bool state); + void setFont (const QFont& font, bool onlyFixed =3D= 0); + KFontChooser::FontDiffFlags fontDiffFlags () const; + QFont font () const; + void setColor (const QColor& col); + QColor color () const; + void setBackgroundColor (const QColor& col); + QColor backgroundColor () const; + void setSizeIsRelative (Qt::CheckState relative); + Qt::CheckState sizeIsRelative () const; + QString sampleText () const; + void setSampleText (const QString& text); + void setSampleBoxVisible (bool visible); + enum FontListCriteria + { + FixedWidthFonts, + ScalableFonts, + SmoothScalableFonts + }; + static void getFontList (QStringList& list, uint fontListC= riteria); + virtual QSize sizeHint () const; +signals: + void fontSelected (const QFont& font); +}; diff --git a/sip/solid/networkshare.sip b/sip/kwidgetsaddons/kfontrequester= .sip similarity index 54% copy from sip/solid/networkshare.sip copy to sip/kwidgetsaddons/kfontrequester.sip index aeb8343..047b1c1 100644 --- a/sip/solid/networkshare.sip +++ b/sip/kwidgetsaddons/kfontrequester.sip @@ -17,26 +17,24 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -namespace Solid -{ -class NetworkShare : Solid::DeviceInterface +class KFontRequester : QWidget { %TypeHeaderCode -#include +#include %End = - explicit NetworkShare (QObject* backendObject); public: - virtual ~NetworkShare (); - enum ShareType - { - Unknown, - Nfs, - Cifs, - Upnp - }; - static Solid::DeviceInterface::Type deviceInterfaceType (); - Solid::NetworkShare::ShareType type () const; - QUrl url () const; -}; + explicit KFontRequester (QWidget* parent =3D 0L, bool o= nlyFixed =3D 0); + ~KFontRequester (); + QFont font () const; + bool isFixedOnly () const; + QString sampleText () const; + QString title () const; + QLabel* label () const; + QPushButton* button () const; + virtual void setFont (const QFont& font, bool onlyFixed =3D= 0); + virtual void setSampleText (const QString& text); + virtual void setTitle (const QString& title); +signals: + void fontSelected (const QFont& font); }; diff --git a/sip/solid/networkshare.sip b/sip/kwidgetsaddons/kfontsizeactio= n.sip similarity index 59% copy from sip/solid/networkshare.sip copy to sip/kwidgetsaddons/kfontsizeaction.sip index aeb8343..b39aac7 100644 --- a/sip/solid/networkshare.sip +++ b/sip/kwidgetsaddons/kfontsizeaction.sip @@ -17,26 +17,21 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -namespace Solid -{ -class NetworkShare : Solid::DeviceInterface +class KFontSizeAction : KSelectAction { %TypeHeaderCode -#include +#include %End = - explicit NetworkShare (QObject* backendObject); public: - virtual ~NetworkShare (); - enum ShareType - { - Unknown, - Nfs, - Cifs, - Upnp - }; - static Solid::DeviceInterface::Type deviceInterfaceType (); - Solid::NetworkShare::ShareType type () const; - QUrl url () const; -}; + explicit KFontSizeAction (QObject* parent); + KFontSizeAction (const QString& text, QObject*= parent); + KFontSizeAction (const QIcon& icon, const QStr= ing& text, QObject* parent); + virtual ~KFontSizeAction (); + int fontSize () const; + void setFontSize (int size); +signals: + void fontSizeChanged (int); +protected: + virtual void actionTriggered (QAction* action); }; diff --git a/sip/kwidgetsaddons/kguiitem.sip b/sip/kwidgetsaddons/kguiitem.= sip new file mode 100644 index 0000000..a3be8d3 --- /dev/null +++ b/sip/kwidgetsaddons/kguiitem.sip @@ -0,0 +1,48 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KGuiItem +{ +%TypeHeaderCode +#include +%End + +public: + KGuiItem (); + explicit KGuiItem (const QString& text, const QString& = iconName =3D QString(), const QString& toolTip =3D QString(), const QString= & whatsThis =3D QString()); + KGuiItem (const QString& text, const QIcon& ic= on, const QString& toolTip =3D QString(), const QString& whatsThis =3D QStr= ing()); + KGuiItem (const KGuiItem& rhs); + ~KGuiItem (); + QString text () const; + QString plainText () const; + QIcon icon () const; + QString iconName () const; + QString toolTip () const; + QString whatsThis () const; + bool isEnabled () const; + bool hasIcon () const; + void setText (const QString& text); + void setIcon (const QIcon& iconset); + void setIconName (const QString& iconName); + void setToolTip (const QString& tooltip); + void setWhatsThis (const QString& whatsThis); + void setEnabled (bool enable); + static void assign (QPushButton* button, const KGuiItem& i= tem); +//ig KGuiItem& operator=3D (const KGuiItem& rhs); +}; diff --git a/sip/kwidgetsaddons/kled.sip b/sip/kwidgetsaddons/kled.sip new file mode 100644 index 0000000..3b367a0 --- /dev/null +++ b/sip/kwidgetsaddons/kled.sip @@ -0,0 +1,66 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KLed : QWidget +{ +%TypeHeaderCode +#include +%End + +public: + enum State + { + Off, + On + }; + enum Shape + { + Rectangular, + Circular + }; + enum Look + { + Flat, + Raised, + Sunken + }; + explicit KLed (QWidget* parent =3D 0); + explicit KLed (const QColor& color, QWidget* parent =3D= 0); + KLed (const QColor& color, KLed::State state, = KLed::Look look, KLed::Shape shape, QWidget* parent =3D 0); + ~KLed (); + QColor color () const; + KLed::State state () const; + KLed::Look look () const; + KLed::Shape shape () const; + int darkFactor () const; + void setColor (const QColor& color); + void setState (KLed::State state); + void setLook (KLed::Look look); + void setShape (KLed::Shape shape); + void setDarkFactor (int darkFactor); + virtual QSize sizeHint () const; + virtual QSize minimumSizeHint () const; + void toggle (); + void on (); + void off (); +protected: + void paintEvent (QPaintEvent*); + void resizeEvent (QResizeEvent*); + void updateCachedPixmap (); +}; diff --git a/sip/kwidgetsaddons/kmessagebox.sip b/sip/kwidgetsaddons/kmessa= gebox.sip new file mode 100644 index 0000000..bffaa5e --- /dev/null +++ b/sip/kwidgetsaddons/kmessagebox.sip @@ -0,0 +1,107 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +%ModuleHeaderCode +#include +%End + +namespace KMessageBox +{ +enum ButtonCode +{ + Ok, + Cancel, + Yes, + No, + Continue +}; +enum DialogType +{ + QuestionYesNo, + WarningYesNo, + WarningContinueCancel, + WarningYesNoCancel, + Information, + Sorry, + Error, + QuestionYesNoCancel +}; +enum Option +{ + Notify, + AllowLink, + Dangerous, + PlainCaption, + NoExec, + WindowModal +}; +typedef QFlags Options; +}; +namespace KMessageBox +{ +KMessageBox::ButtonCode questionYesNo (QWidget* parent, const QString& te= xt, const QString& caption =3D QString(), const KGuiItem& buttonYes =3D KSt= andardGuiItem::yes(), const KGuiItem& buttonNo =3D KStandardGuiItem::no(), = const QString& dontAskAgainName =3D QString(), KMessageBox::Options options= =3D KMessageBox::Notify); +KMessageBox::ButtonCode questionYesNoCancel (QWidget* parent, const QStri= ng& text, const QString& caption =3D QString(), const KGuiItem& buttonYes = =3D KStandardGuiItem::yes(), const KGuiItem& buttonNo =3D KStandardGuiItem:= :no(), const KGuiItem& buttonCancel =3D KStandardGuiItem::cancel(), const Q= String& dontAskAgainName =3D QString(), KMessageBox::Options options =3D KM= essageBox::Notify); +KMessageBox::ButtonCode questionYesNoList (QWidget* parent, const QString= & text, const QStringList& strlist, const QString& caption =3D QString(), c= onst KGuiItem& buttonYes =3D KStandardGuiItem::yes(), const KGuiItem& butto= nNo =3D KStandardGuiItem::no(), const QString& dontAskAgainName =3D QString= (), KMessageBox::Options options =3D KMessageBox::Notify); +KMessageBox::ButtonCode warningYesNo (QWidget* parent, const QString& tex= t, const QString& caption =3D QString(), const KGuiItem& buttonYes =3D KSta= ndardGuiItem::yes(), const KGuiItem& buttonNo =3D KStandardGuiItem::no(), c= onst QString& dontAskAgainName =3D QString(), KMessageBox::Options options = =3D KMessageBox::Options(KMessageBox::Notify|KMessageBox::Dangerous)); +KMessageBox::ButtonCode warningYesNoList (QWidget* parent, const QString&= text, const QStringList& strlist, const QString& caption =3D QString(), co= nst KGuiItem& buttonYes =3D KStandardGuiItem::yes(), const KGuiItem& button= No =3D KStandardGuiItem::no(), const QString& dontAskAgainName =3D QString(= ), KMessageBox::Options options =3D KMessageBox::Options(KMessageBox::Notif= y|KMessageBox::Dangerous)); +KMessageBox::ButtonCode warningContinueCancel (QWidget* parent, const QSt= ring& text, const QString& caption =3D QString(), const KGuiItem& buttonCon= tinue =3D KStandardGuiItem::cont(), const KGuiItem& buttonCancel =3D KStand= ardGuiItem::cancel(), const QString& dontAskAgainName =3D QString(), KMessa= geBox::Options options =3D KMessageBox::Notify); +KMessageBox::ButtonCode warningContinueCancelList (QWidget* parent, const= QString& text, const QStringList& strlist, const QString& caption =3D QStr= ing(), const KGuiItem& buttonContinue =3D KStandardGuiItem::cont(), const K= GuiItem& buttonCancel =3D KStandardGuiItem::cancel(), const QString& dontAs= kAgainName =3D QString(), KMessageBox::Options options =3D KMessageBox::Not= ify); +KMessageBox::ButtonCode warningYesNoCancel (QWidget* parent, const QStrin= g& text, const QString& caption =3D QString(), const KGuiItem& buttonYes = =3D KStandardGuiItem::yes(), const KGuiItem& buttonNo =3D KStandardGuiItem:= :no(), const KGuiItem& buttonCancel =3D KStandardGuiItem::cancel(), const Q= String& dontAskAgainName =3D QString(), KMessageBox::Options options =3D KM= essageBox::Notify); +KMessageBox::ButtonCode warningYesNoCancelList (QWidget* parent, const QS= tring& text, const QStringList& strlist, const QString& caption =3D QString= (), const KGuiItem& buttonYes =3D KStandardGuiItem::yes(), const KGuiItem& = buttonNo =3D KStandardGuiItem::no(), const KGuiItem& buttonCancel =3D KStan= dardGuiItem::cancel(), const QString& dontAskAgainName =3D QString(), KMess= ageBox::Options options =3D KMessageBox::Notify); +void error (QWidget* parent, const QString& text, const= QString& caption =3D QString(), KMessageBox::Options options =3D KMessageB= ox::Notify); +void errorList (QWidget* parent, const QString& text, c= onst QStringList& strlist, const QString& caption =3D QString(), KMessageBo= x::Options options =3D KMessageBox::Notify); +void detailedError (QWidget* parent, const QString& tex= t, const QString& details, const QString& caption =3D QString(), KMessageBo= x::Options options =3D KMessageBox::Notify); +void sorry (QWidget* parent, const QString& text, const= QString& caption =3D QString(), KMessageBox::Options options =3D KMessageB= ox::Notify); +void detailedSorry (QWidget* parent, const QString& tex= t, const QString& details, const QString& caption =3D QString(), KMessageBo= x::Options options =3D KMessageBox::Notify); +void information (QWidget* parent, const QString& text,= const QString& caption =3D QString(), const QString& dontShowAgainName =3D= QString(), KMessageBox::Options options =3D KMessageBox::Notify); +void informationList (QWidget* parent, const QString& t= ext, const QStringList& strlist, const QString& caption =3D QString(), cons= t QString& dontShowAgainName =3D QString(), KMessageBox::Options options = =3D KMessageBox::Notify); +void enableAllMessages (); +void enableMessage (const QString& dontShowAgainName); +void about (QWidget* parent, const QString& text, const= QString& caption =3D QString(), KMessageBox::Options options =3D KMessageB= ox::Notify); +KMessageBox::ButtonCode messageBox (QWidget* parent, KMessageBox::DialogT= ype type, const QString& text, const QString& caption =3D QString(), const = KGuiItem& buttonYes =3D KStandardGuiItem::yes(), const KGuiItem& buttonNo = =3D KStandardGuiItem::no(), const KGuiItem& buttonCancel =3D KStandardGuiIt= em::cancel(), const QString& dontShowAskAgainName =3D QString(), KMessageBo= x::Options options =3D KMessageBox::Notify); +bool shouldBeShownYesNo (const QString& dontShowAgainNa= me, KMessageBox::ButtonCode& result); +bool shouldBeShownContinue (const QString& dontShowAgai= nName); +void saveDontShowAgainYesNo (const QString& dontShowAga= inName, KMessageBox::ButtonCode result); +void saveDontShowAgainContinue (const QString& dontShow= AgainName); +//ig void setDontShowAgainConfig (KConfig* cfg); + +// KMessageBoxDontAskAgainInterface is not public. +//ig void setDontShowAgainInterface (KMessageBoxDontAsk= AgainInterface* dontAskAgainInterface); + +//ig void setNotifyInterface (KMessageBoxNotifyInterfac= e* notifyInterface); +QDialogButtonBox::StandardButton createKMessageBox (QDialog* dialog, QDia= logButtonBox* buttons, QMessageBox::Icon icon, const QString& text, const Q= StringList& strlist, const QString& ask, bool* checkboxReturn, KMessageBox:= :Options options, const QString& details =3D QString()); +QDialogButtonBox::StandardButton createKMessageBox (QDialog* dialog, QDia= logButtonBox* buttons, const QIcon& icon, const QString& text, const QStrin= gList& strlist, const QString& ask, bool* checkboxReturn, KMessageBox::Opti= ons options, const QString& details =3D QString(), QMessageBox::Icon notify= Type =3D QMessageBox::Information); +KMessageBox::ButtonCode questionYesNoWId (WId parent_id, const QString& t= ext, const QString& caption =3D QString(), const KGuiItem& buttonYes =3D KS= tandardGuiItem::yes(), const KGuiItem& buttonNo =3D KStandardGuiItem::no(),= const QString& dontAskAgainName =3D QString(), KMessageBox::Options option= s =3D KMessageBox::Notify); +KMessageBox::ButtonCode questionYesNoCancelWId (WId parent_id, const QStr= ing& text, const QString& caption =3D QString(), const KGuiItem& buttonYes = =3D KStandardGuiItem::yes(), const KGuiItem& buttonNo =3D KStandardGuiItem:= :no(), const KGuiItem& buttonCancel =3D KStandardGuiItem::cancel(), const Q= String& dontAskAgainName =3D QString(), KMessageBox::Options options =3D KM= essageBox::Notify); +KMessageBox::ButtonCode questionYesNoListWId (WId parent_id, const QStrin= g& text, const QStringList& strlist, const QString& caption =3D QString(), = const KGuiItem& buttonYes =3D KStandardGuiItem::yes(), const KGuiItem& butt= onNo =3D KStandardGuiItem::no(), const QString& dontAskAgainName =3D QStrin= g(), KMessageBox::Options options =3D KMessageBox::Notify); +KMessageBox::ButtonCode warningYesNoWId (WId parent_id, const QString& te= xt, const QString& caption =3D QString(), const KGuiItem& buttonYes =3D KSt= andardGuiItem::yes(), const KGuiItem& buttonNo =3D KStandardGuiItem::no(), = const QString& dontAskAgainName =3D QString(), KMessageBox::Options options= =3D KMessageBox::Options(KMessageBox::Notify|KMessageBox::Dangerous)); +KMessageBox::ButtonCode warningYesNoListWId (WId parent_id, const QString= & text, const QStringList& strlist, const QString& caption =3D QString(), c= onst KGuiItem& buttonYes =3D KStandardGuiItem::yes(), const KGuiItem& butto= nNo =3D KStandardGuiItem::no(), const QString& dontAskAgainName =3D QString= (), KMessageBox::Options options =3D KMessageBox::Options(KMessageBox::Noti= fy|KMessageBox::Dangerous)); +KMessageBox::ButtonCode warningContinueCancelWId (WId parent_id, const QS= tring& text, const QString& caption =3D QString(), const KGuiItem& buttonCo= ntinue =3D KStandardGuiItem::cont(), const KGuiItem& buttonCancel =3D KStan= dardGuiItem::cancel(), const QString& dontAskAgainName =3D QString(), KMess= ageBox::Options options =3D KMessageBox::Notify); +KMessageBox::ButtonCode warningContinueCancelListWId (WId parent_id, cons= t QString& text, const QStringList& strlist, const QString& caption =3D QSt= ring(), const KGuiItem& buttonContinue =3D KStandardGuiItem::cont(), const = KGuiItem& buttonCancel =3D KStandardGuiItem::cancel(), const QString& dontA= skAgainName =3D QString(), KMessageBox::Options options =3D KMessageBox::No= tify); +KMessageBox::ButtonCode warningYesNoCancelWId (WId parent_id, const QStri= ng& text, const QString& caption =3D QString(), const KGuiItem& buttonYes = =3D KStandardGuiItem::yes(), const KGuiItem& buttonNo =3D KStandardGuiItem:= :no(), const KGuiItem& buttonCancel =3D KStandardGuiItem::cancel(), const Q= String& dontAskAgainName =3D QString(), KMessageBox::Options options =3D KM= essageBox::Notify); +KMessageBox::ButtonCode warningYesNoCancelListWId (WId parent_id, const Q= String& text, const QStringList& strlist, const QString& caption =3D QStrin= g(), const KGuiItem& buttonYes =3D KStandardGuiItem::yes(), const KGuiItem&= buttonNo =3D KStandardGuiItem::no(), const KGuiItem& buttonCancel =3D KSta= ndardGuiItem::cancel(), const QString& dontAskAgainName =3D QString(), KMes= sageBox::Options options =3D KMessageBox::Notify); +void errorWId (WId parent_id, const QString& text, cons= t QString& caption =3D QString(), KMessageBox::Options options =3D KMessage= Box::Notify); +void errorListWId (WId parent_id, const QString& text, = const QStringList& strlist, const QString& caption =3D QString(), KMessageB= ox::Options options =3D KMessageBox::Notify); +void detailedErrorWId (WId parent_id, const QString& te= xt, const QString& details, const QString& caption =3D QString(), KMessageB= ox::Options options =3D KMessageBox::Notify); +void sorryWId (WId parent_id, const QString& text, cons= t QString& caption =3D QString(), KMessageBox::Options options =3D KMessage= Box::Notify); +void detailedSorryWId (WId parent_id, const QString& te= xt, const QString& details, const QString& caption =3D QString(), KMessageB= ox::Options options =3D KMessageBox::Notify); +void informationWId (WId parent_id, const QString& text= , const QString& caption =3D QString(), const QString& dontShowAgainName = =3D QString(), KMessageBox::Options options =3D KMessageBox::Notify); +void informationListWId (WId parent_id, const QString& = text, const QStringList& strlist, const QString& caption =3D QString(), con= st QString& dontShowAgainName =3D QString(), KMessageBox::Options options = =3D KMessageBox::Notify); +KMessageBox::ButtonCode messageBoxWId (WId parent_id, KMessageBox::Dialog= Type type, const QString& text, const QString& caption =3D QString(), const= KGuiItem& buttonYes =3D KStandardGuiItem::yes(), const KGuiItem& buttonNo = =3D KStandardGuiItem::no(), const KGuiItem& buttonCancel =3D KStandardGuiIt= em::cancel(), const QString& dontShowAskAgainName =3D QString(), KMessageBo= x::Options options =3D KMessageBox::Notify); +}; diff --git a/sip/kcoreaddons/kfilesystemtype_p.sip b/sip/kwidgetsaddons/kme= ssageboxdontaskagaininterface.sip similarity index 78% copy from sip/kcoreaddons/kfilesystemtype_p.sip copy to sip/kwidgetsaddons/kmessageboxdontaskagaininterface.sip index fa655a8..4904fb1 100644 --- a/sip/kcoreaddons/kfilesystemtype_p.sip +++ b/sip/kwidgetsaddons/kmessageboxdontaskagaininterface.sip @@ -17,20 +17,3 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -%ModuleHeaderCode -#include -%End - -namespace KFileSystemType -{ -enum Type -{ - Unknown, - Nfs, - Smb, - Fat, - Ramfs, - Other -}; -KFileSystemType::Type fileSystemType (const QString& path); -}; diff --git a/sip/kcoreaddons/kfilesystemtype_p.sip b/sip/kwidgetsaddons/kme= ssageboxnotifyinterface.sip similarity index 78% copy from sip/kcoreaddons/kfilesystemtype_p.sip copy to sip/kwidgetsaddons/kmessageboxnotifyinterface.sip index fa655a8..4904fb1 100644 --- a/sip/kcoreaddons/kfilesystemtype_p.sip +++ b/sip/kwidgetsaddons/kmessageboxnotifyinterface.sip @@ -17,20 +17,3 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -%ModuleHeaderCode -#include -%End - -namespace KFileSystemType -{ -enum Type -{ - Unknown, - Nfs, - Smb, - Fat, - Ramfs, - Other -}; -KFileSystemType::Type fileSystemType (const QString& path); -}; diff --git a/sip/kwidgetsaddons/kmessagewidget.sip b/sip/kwidgetsaddons/kme= ssagewidget.sip new file mode 100644 index 0000000..6fde811 --- /dev/null +++ b/sip/kwidgetsaddons/kmessagewidget.sip @@ -0,0 +1,65 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KMessageWidget : QFrame +{ +%TypeHeaderCode +#include +%End + +public: + enum MessageType + { + Positive, + Information, + Warning, + Error + }; + explicit KMessageWidget (QWidget* parent =3D 0); + explicit KMessageWidget (const QString& text, QWidget* = parent =3D 0); + ~KMessageWidget (); + QString text () const; + bool wordWrap () const; + bool isCloseButtonVisible () const; + KMessageWidget::MessageType messageType () const; + void addAction (QAction* action); + void removeAction (QAction* action); + QSize sizeHint () const; + QSize minimumSizeHint () const; + int heightForWidth (int width) const; + QIcon icon () const; + bool isHideAnimationRunning () const; + bool isShowAnimationRunning () const; + void setText (const QString& text); + void setWordWrap (bool wordWrap); + void setCloseButtonVisible (bool visible); + void setMessageType (KMessageWidget::MessageType ty= pe); + void animatedShow (); + void animatedHide (); + void setIcon (const QIcon& icon); +signals: + void linkActivated (const QString& contents); + void linkHovered (const QString& contents); + void hideAnimationFinished (); + void showAnimationFinished (); +protected: + void paintEvent (QPaintEvent* event); + bool event (QEvent* event); + void resizeEvent (QResizeEvent* event); +}; diff --git a/sip/kwidgetsaddons/kmimetypechooser.sip b/sip/kwidgetsaddons/k= mimetypechooser.sip new file mode 100644 index 0000000..432c36b --- /dev/null +++ b/sip/kwidgetsaddons/kmimetypechooser.sip @@ -0,0 +1,49 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KMimeTypeChooser : QWidget +{ +%TypeHeaderCode +#include +%End + +public: + enum Visuals + { + Comments, + Patterns, + EditButton + }; + explicit KMimeTypeChooser (const QString& text =3D QStr= ing(), const QStringList& selectedMimeTypes =3D QStringList(), const QStrin= g& defaultGroup =3D QString(), const QStringList& groupsToShow =3D QStringL= ist(), int visuals =3D Comments|Patterns|EditButton, QWidget* parent =3D 0); + ~KMimeTypeChooser (); + QStringList mimeTypes () const; + QStringList patterns () const; +}; +class KMimeTypeChooserDialog : QDialog +{ +%TypeHeaderCode +#include +%End + +public: + explicit KMimeTypeChooserDialog (const QString& caption= =3D QString(), const QString& text =3D QString(), const QStringList& selec= tedMimeTypes =3D QStringList(), const QString& defaultGroup =3D QString(), = const QStringList& groupsToShow =3D QStringList(), int visuals =3D KMimeTyp= eChooser::Comments|KMimeTypeChooser::Patterns|KMimeTypeChooser::EditButton,= QWidget* parent =3D 0); + KMimeTypeChooserDialog (const QString& caption= , const QString& text, const QStringList& selectedMimeTypes, const QString&= defaultGroup, QWidget* parent =3D 0); + ~KMimeTypeChooserDialog (); + KMimeTypeChooser* chooser (); +}; diff --git a/sip/kwidgetsaddons/kmultitabbar.sip b/sip/kwidgetsaddons/kmult= itabbar.sip new file mode 100644 index 0000000..8037331 --- /dev/null +++ b/sip/kwidgetsaddons/kmultitabbar.sip @@ -0,0 +1,96 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KMultiTabBar : QWidget +{ +%TypeHeaderCode +#include +%End + +public: + enum KMultiTabBarPosition + { + Left, + Right, + Top, + Bottom + }; + enum KMultiTabBarStyle + { + VSNET, + KDEV3ICON, + STYLELAST + }; + explicit KMultiTabBar (KMultiTabBar::KMultiTabBarPositi= on pos, QWidget* parent =3D 0); + virtual ~KMultiTabBar (); + int appendButton (const QPixmap& pic, int id =3D -= 1, QMenu* popup =3D 0, const QString& not_used_yet =3D QString()); + void removeButton (int id); + int appendTab (const QPixmap& pic, int id =3D -1, = const QString& text =3D QString()); + void removeTab (int id); + void setTab (int id, bool state); + bool isTabRaised (int id) const; + KMultiTabBarButton* button (int id) const; + KMultiTabBarTab* tab (int id) const; + void setPosition (KMultiTabBar::KMultiTabBarPositio= n pos); + KMultiTabBar::KMultiTabBarPosition position () const; + void setStyle (KMultiTabBar::KMultiTabBarStyle styl= e); + KMultiTabBar::KMultiTabBarStyle tabStyle () const; +protected: + virtual void fontChange (const QFont&); + void updateSeparator (); +}; +class KMultiTabBarButton : QPushButton +{ +%TypeHeaderCode +#include +%End + +public: + int id () const; + virtual ~KMultiTabBarButton (); + void setText (const QString& text); +signals: + void clicked (int id); +protected: + virtual void slotClicked (); + virtual void hideEvent (QHideEvent*); + virtual void showEvent (QShowEvent*); + virtual void paintEvent (QPaintEvent*); + KMultiTabBarButton (const QPixmap& pic, const = QString&, int id, QWidget* parent); +}; +class KMultiTabBarTab : KMultiTabBarButton +{ +%TypeHeaderCode +#include +%End + +public: + virtual ~KMultiTabBarTab (); + virtual QSize sizeHint () const; + virtual QSize minimumSizeHint () const; + void setPosition (KMultiTabBar::KMultiTabBarPositio= n); + void setStyle (KMultiTabBar::KMultiTabBarStyle); + void setState (bool state); + void setIcon (const QString&); + void setIcon (const QPixmap&); +protected: + virtual void paintEvent (QPaintEvent*); +private: + KMultiTabBarTab (const QPixmap& pic, const QSt= ring&, int id, QWidget* parent, KMultiTabBar::KMultiTabBarPosition pos, KMu= ltiTabBar::KMultiTabBarStyle style); +}; diff --git a/sip/kwidgetsaddons/knewpassworddialog.sip b/sip/kwidgetsaddons= /knewpassworddialog.sip new file mode 100644 index 0000000..1371c7c --- /dev/null +++ b/sip/kwidgetsaddons/knewpassworddialog.sip @@ -0,0 +1,50 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KNewPasswordDialog : QDialog +{ +%TypeHeaderCode +#include +%End + +public: + explicit KNewPasswordDialog (QWidget* parent =3D 0); + virtual ~KNewPasswordDialog (); + void setPrompt (const QString& prompt); + QString prompt () const; + void setPixmap (const QPixmap&); + QPixmap pixmap () const; + void setAllowEmptyPasswords (bool allowed); + bool allowEmptyPasswords () const; + void setMinimumPasswordLength (int minLength); + int minimumPasswordLength () const; + void setMaximumPasswordLength (int maxLength); + int maximumPasswordLength () const; + void setReasonablePasswordLength (int reasonableLen= gth); + int reasonablePasswordLength () const; + void setPasswordStrengthWarningLevel (int warningLe= vel); + int passwordStrengthWarningLevel () const; + QString password () const; + virtual void accept (); +protected: + virtual bool checkPassword (const QString&); + bool checkAndGetPassword (QString* pwd); +signals: + void newPassword (const QString& password); +}; diff --git a/sip/kwidgetsaddons/kpagedialog.sip b/sip/kwidgetsaddons/kpaged= ialog.sip new file mode 100644 index 0000000..c00d24f --- /dev/null +++ b/sip/kwidgetsaddons/kpagedialog.sip @@ -0,0 +1,61 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KPageDialog : QDialog +{ +%TypeHeaderCode +#include +%End + +public: + enum FaceType + { + Auto, + Plain, + List, + Tree, + Tabbed + }; + explicit KPageDialog (QWidget* parent =3D 0, Qt::Window= Flags flags =3D 0); + ~KPageDialog (); + void setFaceType (KPageDialog::FaceType faceType); + KPageWidgetItem* addPage (QWidget* widget, const QString& name); + void addPage (KPageWidgetItem* item); + KPageWidgetItem* insertPage (KPageWidgetItem* before, QWidget* = widget, const QString& name); + void insertPage (KPageWidgetItem* before, KPageWidg= etItem* item); + KPageWidgetItem* addSubPage (KPageWidgetItem* parent, QWidget* = widget, const QString& name); + void addSubPage (KPageWidgetItem* parent, KPageWidg= etItem* item); + void removePage (KPageWidgetItem* item); + void setCurrentPage (KPageWidgetItem* item); + KPageWidgetItem* currentPage () const; + void setStandardButtons (QDialogButtonBox::Standard= Buttons buttons); + QPushButton* button (QDialogButtonBox::StandardButton which= ) const; +signals: + void currentPageChanged (KPageWidgetItem* current, = KPageWidgetItem* before); + void pageRemoved (KPageWidgetItem* page); +protected: + KPageDialog (KPageWidget* widget, QWidget* par= ent, Qt::WindowFlags flags =3D 0); +//ig KPageDialog (KPageDialogPrivate& dd, KPage= Widget* widget, QWidget* parent, Qt::WindowFlags flags =3D 0); +//ig KPageWidget* pageWidget (); + const KPageWidget* pageWidget () const; + void setPageWidget (KPageWidget* widget); +//ig QDialogButtonBox* buttonBox (); + const QDialogButtonBox* buttonBox () const; + void setButtonBox (QDialogButtonBox* box); +}; diff --git a/sip/kcoreaddons/kfilesystemtype_p.sip b/sip/kwidgetsaddons/kpa= gemodel.sip similarity index 70% copy from sip/kcoreaddons/kfilesystemtype_p.sip copy to sip/kwidgetsaddons/kpagemodel.sip index fa655a8..54e8da4 100644 --- a/sip/kcoreaddons/kfilesystemtype_p.sip +++ b/sip/kwidgetsaddons/kpagemodel.sip @@ -17,20 +17,20 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -%ModuleHeaderCode -#include +class KPageModel : QAbstractItemModel +{ +%TypeHeaderCode +#include %End = -namespace KFileSystemType -{ -enum Type -{ - Unknown, - Nfs, - Smb, - Fat, - Ramfs, - Other -}; -KFileSystemType::Type fileSystemType (const QString& path); +public: + enum Role + { + HeaderRole, + WidgetRole + }; + explicit KPageModel (QObject* parent =3D 0); + virtual ~KPageModel (); +protected: +//ig KPageModel (KPageModelPrivate& dd, QObject= * parent); }; diff --git a/sip/kwidgetsaddons/kpageview.sip b/sip/kwidgetsaddons/kpagevie= w.sip new file mode 100644 index 0000000..596e6fd --- /dev/null +++ b/sip/kwidgetsaddons/kpageview.sip @@ -0,0 +1,53 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KPageView : QWidget +{ +%TypeHeaderCode +#include +%End + +public: + enum FaceType + { + Auto, + Plain, + List, + Tree, + Tabbed + }; + explicit KPageView (QWidget* parent =3D 0); + virtual ~KPageView (); + void setModel (QAbstractItemModel* model); + QAbstractItemModel* model () const; + void setFaceType (KPageView::FaceType faceType); + KPageView::FaceType faceType () const; + void setCurrentPage (const QModelIndex& index); + QModelIndex currentPage () const; + void setItemDelegate (QAbstractItemDelegate* delega= te); + QAbstractItemDelegate* itemDelegate () const; + void setDefaultWidget (QWidget* widget); +signals: + void currentPageChanged (const QModelIndex& current= , const QModelIndex& previous); +protected: + virtual QAbstractItemView* createView (); + virtual bool showPageHeader () const; + virtual Qt::Alignment viewPosition () const; +//ig KPageView (KPageViewPrivate& dd, QWidget* = parent); +}; diff --git a/sip/kwidgetsaddons/kpagewidget.sip b/sip/kwidgetsaddons/kpagew= idget.sip new file mode 100644 index 0000000..ddae45f --- /dev/null +++ b/sip/kwidgetsaddons/kpagewidget.sip @@ -0,0 +1,44 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KPageWidget : KPageView +{ +%TypeHeaderCode +#include +%End + +public: + explicit KPageWidget (QWidget* parent =3D 0); + ~KPageWidget (); + KPageWidgetItem* addPage (QWidget* widget, const QString& name); + void addPage (KPageWidgetItem* item); + KPageWidgetItem* insertPage (KPageWidgetItem* before, QWidget* = widget, const QString& name); + void insertPage (KPageWidgetItem* before, KPageWidg= etItem* item); + KPageWidgetItem* addSubPage (KPageWidgetItem* parent, QWidget* = widget, const QString& name); + void addSubPage (KPageWidgetItem* parent, KPageWidg= etItem* item); + void removePage (KPageWidgetItem* item); + void setCurrentPage (KPageWidgetItem* item); + KPageWidgetItem* currentPage () const; +signals: + void currentPageChanged (KPageWidgetItem* current, = KPageWidgetItem* before); + void pageToggled (KPageWidgetItem* page, bool check= ed); + void pageRemoved (KPageWidgetItem* page); +protected: +//ig KPageWidget (KPageWidgetPrivate& dd, QWidg= et* parent); +}; diff --git a/sip/kwidgetsaddons/kpagewidgetmodel.sip b/sip/kwidgetsaddons/k= pagewidgetmodel.sip new file mode 100644 index 0000000..dcf883e --- /dev/null +++ b/sip/kwidgetsaddons/kpagewidgetmodel.sip @@ -0,0 +1,74 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KPageWidgetItem : QObject +{ +%TypeHeaderCode +#include +%End + +public: + KPageWidgetItem (QWidget* widget); + KPageWidgetItem (QWidget* widget, const QStrin= g& name); + ~KPageWidgetItem (); + QWidget* widget () const; + void setName (const QString& name); + QString name () const; + void setHeader (const QString& header); + QString header () const; + void setIcon (const QIcon& icon); + QIcon icon () const; + void setCheckable (bool checkable); + bool isCheckable () const; + bool isChecked () const; + bool isEnabled () const; + void setEnabled (bool); + void setChecked (bool checked); +signals: + void changed (); + void toggled (bool checked); +}; +class KPageWidgetModel : KPageModel +{ +%TypeHeaderCode +#include +%End + +public: + explicit KPageWidgetModel (QObject* parent =3D 0); + ~KPageWidgetModel (); + KPageWidgetItem* addPage (QWidget* widget, const QString& name); + void addPage (KPageWidgetItem* item); + KPageWidgetItem* insertPage (KPageWidgetItem* before, QWidget* = widget, const QString& name); + void insertPage (KPageWidgetItem* before, KPageWidg= etItem* item); + KPageWidgetItem* addSubPage (KPageWidgetItem* parent, QWidget* = widget, const QString& name); + void addSubPage (KPageWidgetItem* parent, KPageWidg= etItem* item); + void removePage (KPageWidgetItem* item); + virtual int columnCount (const QModelIndex& parent =3D QMo= delIndex()) const; + virtual QVariant data (const QModelIndex& index, int role =3D Q= t::DisplayRole) const; + virtual bool setData (const QModelIndex& index, const QVari= ant& value, int role =3D Qt::EditRole); + virtual Qt::ItemFlags flags (const QModelIndex& index) const; + virtual QModelIndex index (int row, int column, const QModelIndex&= parent =3D QModelIndex()) const; + virtual QModelIndex parent (const QModelIndex& index) const; + virtual int rowCount (const QModelIndex& parent =3D QModel= Index()) const; + KPageWidgetItem* item (const QModelIndex& index) const; + QModelIndex index (const KPageWidgetItem* item) const; +signals: + void toggled (KPageWidgetItem* page, bool checked); +}; diff --git a/sip/kwidgetsaddons/kpassworddialog.sip b/sip/kwidgetsaddons/kp= assworddialog.sip new file mode 100644 index 0000000..6e3a676 --- /dev/null +++ b/sip/kwidgetsaddons/kpassworddialog.sip @@ -0,0 +1,73 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KPasswordDialog : QDialog +{ +%TypeHeaderCode +#include +%End + +public: + enum KPasswordDialogFlag + { + NoFlags, + ShowKeepPassword, + ShowUsernameLine, + UsernameReadOnly, + ShowAnonymousLoginCheckBox, + ShowDomainLine, + DomainReadOnly + }; + typedef QFlags KPasswordDialogFl= ags; + enum ErrorType + { + UnknownError, + UsernameError, + PasswordError, + FatalError, + DomainError + }; + explicit KPasswordDialog (QWidget* parent =3D 0L, const= KPasswordDialog::KPasswordDialogFlags& flags =3D 0); + ~KPasswordDialog (); + void setPrompt (const QString& prompt); + QString prompt () const; + void setPixmap (const QPixmap&); + QPixmap pixmap () const; + void addCommentLine (const QString& label, const QS= tring& comment); + void showErrorMessage (const QString& message, cons= t KPasswordDialog::ErrorType type =3D KPasswordDialog::ErrorType::PasswordE= rror); + QString password () const; + void setUsername (const QString&); + QString username () const; + void setDomain (const QString&); + QString domain () const; + void setAnonymousMode (bool anonymous); + bool anonymousMode () const; + bool keepPassword () const; + void setKeepPassword (bool b); + void setUsernameReadOnly (bool readOnly); + void setPassword (const QString& password); + void setKnownLogins (const QMap& k= nownLogins); + void accept (); + QDialogButtonBox* buttonBox () const; +signals: + void gotPassword (const QString& password, bool kee= p); + void gotUsernameAndPassword (const QString& usernam= e, const QString& password, bool keep); +protected: + virtual bool checkPassword (); +}; diff --git a/sip/solid/networkshare.sip b/sip/kwidgetsaddons/kpixmapregions= electordialog.sip similarity index 51% copy from sip/solid/networkshare.sip copy to sip/kwidgetsaddons/kpixmapregionselectordialog.sip index aeb8343..011f1aa 100644 --- a/sip/solid/networkshare.sip +++ b/sip/kwidgetsaddons/kpixmapregionselectordialog.sip @@ -17,26 +17,19 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -namespace Solid -{ -class NetworkShare : Solid::DeviceInterface +class KPixmapRegionSelectorDialog : QDialog { %TypeHeaderCode -#include +#include %End = - explicit NetworkShare (QObject* backendObject); public: - virtual ~NetworkShare (); - enum ShareType - { - Unknown, - Nfs, - Cifs, - Upnp - }; - static Solid::DeviceInterface::Type deviceInterfaceType (); - Solid::NetworkShare::ShareType type () const; - QUrl url () const; -}; + explicit KPixmapRegionSelectorDialog (QWidget* parent = =3D 0); + ~KPixmapRegionSelectorDialog (); + KPixmapRegionSelectorWidget* pixmapRegionSelectorWidget () const; + static QRect getSelectedRegion (const QPixmap& pixmap, QWid= get* parent =3D 0L); + static QRect getSelectedRegion (const QPixmap& pixmap, int = aspectRatioWidth, int aspectRatioHeight, QWidget* parent =3D 0L); + static QImage getSelectedImage (const QPixmap& pixmap, QWidg= et* parent =3D 0L); + static QImage getSelectedImage (const QPixmap& pixmap, int a= spectRatioWidth, int aspectRatioHeight, QWidget* parent =3D 0L); + void adjustRegionSelectorWidgetSizeToFitScreen (); }; diff --git a/sip/kwidgetsaddons/kpixmapregionselectorwidget.sip b/sip/kwidg= etsaddons/kpixmapregionselectorwidget.sip new file mode 100644 index 0000000..01b03c9 --- /dev/null +++ b/sip/kwidgetsaddons/kpixmapregionselectorwidget.sip @@ -0,0 +1,52 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KPixmapRegionSelectorWidget : QWidget +{ +%TypeHeaderCode +#include +%End + +public: + enum RotateDirection + { + Rotate90, + Rotate180, + Rotate270 + }; + explicit KPixmapRegionSelectorWidget (QWidget* parent = =3D 0); + ~KPixmapRegionSelectorWidget (); + void setPixmap (const QPixmap& pixmap); + QPixmap pixmap () const; + void setSelectedRegion (const QRect& rect); + QRect selectedRegion () const; + QRect unzoomedSelectedRegion () const; + void resetSelection (); + QImage selectedImage () const; + void setSelectionAspectRatio (int width, int height= ); + void setFreeSelectionAspectRatio (); + void setMaximumWidgetSize (int width, int height); + void rotate (KPixmapRegionSelectorWidget::RotateDir= ection direction); + void rotateClockwise (); + void rotateCounterclockwise (); +signals: + void pixmapRotated (); +protected: + virtual QMenu* createPopupMenu (); +}; diff --git a/sip/solid/networkshare.sip b/sip/kwidgetsaddons/kpixmapsequenc= e.sip similarity index 54% copy from sip/solid/networkshare.sip copy to sip/kwidgetsaddons/kpixmapsequence.sip index aeb8343..ac75b74 100644 --- a/sip/solid/networkshare.sip +++ b/sip/kwidgetsaddons/kpixmapsequence.sip @@ -17,26 +17,22 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -namespace Solid -{ -class NetworkShare : Solid::DeviceInterface +class KPixmapSequence { %TypeHeaderCode -#include +#include %End = - explicit NetworkShare (QObject* backendObject); public: - virtual ~NetworkShare (); - enum ShareType - { - Unknown, - Nfs, - Cifs, - Upnp - }; - static Solid::DeviceInterface::Type deviceInterfaceType (); - Solid::NetworkShare::ShareType type () const; - QUrl url () const; -}; + KPixmapSequence (); + KPixmapSequence (const KPixmapSequence& other); + explicit KPixmapSequence (const QPixmap& pixmap, const = QSize& frameSize =3D QSize()); + KPixmapSequence (const QString& fullPath, int = size); + ~KPixmapSequence (); + bool isValid () const; + bool isEmpty () const; + QSize frameSize () const; + int frameCount () const; + QPixmap frameAt (int index) const; +//ig KPixmapSequence& operator=3D (const KPixmapSequence& other); }; diff --git a/sip/kwidgetsaddons/kpixmapsequenceoverlaypainter.sip b/sip/kwi= dgetsaddons/kpixmapsequenceoverlaypainter.sip new file mode 100644 index 0000000..265d15c --- /dev/null +++ b/sip/kwidgetsaddons/kpixmapsequenceoverlaypainter.sip @@ -0,0 +1,43 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KPixmapSequenceOverlayPainter : QObject +{ +%TypeHeaderCode +#include +%End + +public: + KPixmapSequenceOverlayPainter (QObject* parent= =3D 0); + KPixmapSequenceOverlayPainter (const KPixmapSe= quence& seq, QObject* parent =3D 0); + ~KPixmapSequenceOverlayPainter (); + KPixmapSequence sequence () const; + int interval () const; + QRect rect () const; + Qt::Alignment alignment () const; + QPoint offset () const; + void setSequence (const KPixmapSequence& seq); + void setInterval (int msecs); + void setWidget (QWidget* w); + void setRect (const QRect& rect); + void setAlignment (Qt::Alignment align); + void setOffset (const QPoint& offset); + void start (); + void stop (); +}; diff --git a/sip/solid/networkshare.sip b/sip/kwidgetsaddons/kpixmapsequenc= ewidget.sip similarity index 61% copy from sip/solid/networkshare.sip copy to sip/kwidgetsaddons/kpixmapsequencewidget.sip index aeb8343..3a0eda1 100644 --- a/sip/solid/networkshare.sip +++ b/sip/kwidgetsaddons/kpixmapsequencewidget.sip @@ -17,26 +17,19 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -namespace Solid -{ -class NetworkShare : Solid::DeviceInterface +class KPixmapSequenceWidget : QWidget { %TypeHeaderCode -#include +#include %End = - explicit NetworkShare (QObject* backendObject); public: - virtual ~NetworkShare (); - enum ShareType - { - Unknown, - Nfs, - Cifs, - Upnp - }; - static Solid::DeviceInterface::Type deviceInterfaceType (); - Solid::NetworkShare::ShareType type () const; - QUrl url () const; -}; + KPixmapSequenceWidget (QWidget* parent =3D 0); + KPixmapSequenceWidget (const KPixmapSequence& = seq, QWidget* parent =3D 0); + ~KPixmapSequenceWidget (); + KPixmapSequence sequence () const; + int interval () const; + QSize sizeHint () const; + void setSequence (const KPixmapSequence& seq); + void setInterval (int msecs); }; diff --git a/sip/solid/networkshare.sip b/sip/kwidgetsaddons/kpopupframe.sip similarity index 57% copy from sip/solid/networkshare.sip copy to sip/kwidgetsaddons/kpopupframe.sip index aeb8343..210482b 100644 --- a/sip/solid/networkshare.sip +++ b/sip/kwidgetsaddons/kpopupframe.sip @@ -17,26 +17,24 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -namespace Solid -{ -class NetworkShare : Solid::DeviceInterface +class KPopupFrame : QFrame { %TypeHeaderCode -#include +#include %End = - explicit NetworkShare (QObject* backendObject); +protected: + virtual void keyPressEvent (QKeyEvent* e); + virtual void hideEvent (QHideEvent* e); public: - virtual ~NetworkShare (); - enum ShareType - { - Unknown, - Nfs, - Cifs, - Upnp - }; - static Solid::DeviceInterface::Type deviceInterfaceType (); - Solid::NetworkShare::ShareType type () const; - QUrl url () const; -}; + void close (int r); + KPopupFrame (QWidget* parent =3D 0); + ~KPopupFrame (); + void setMainWidget (QWidget* m); + virtual void resizeEvent (QResizeEvent* resize); + void popup (const QPoint& pos); + int exec (const QPoint& p); + int exec (int x, int y); +signals: + void leaveModality (); }; diff --git a/sip/kwidgetsaddons/kratingpainter.sip b/sip/kwidgetsaddons/kra= tingpainter.sip new file mode 100644 index 0000000..a3cf96f --- /dev/null +++ b/sip/kwidgetsaddons/kratingpainter.sip @@ -0,0 +1,49 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KRatingPainter /NoDefaultCtors/ +{ +%TypeHeaderCode +#include +%End + +public: + KRatingPainter (); + ~KRatingPainter (); + int maxRating () const; + bool halfStepsEnabled () const; + Qt::Alignment alignment () const; + Qt::LayoutDirection layoutDirection () const; + QIcon icon () const; + bool isEnabled () const; + QPixmap customPixmap () const; + int spacing () const; + void setMaxRating (int max); + void setHalfStepsEnabled (bool enabled); + void setAlignment (Qt::Alignment align); + void setLayoutDirection (Qt::LayoutDirection direct= ion); + void setIcon (const QIcon& icon); + void setEnabled (bool enabled); + void setCustomPixmap (const QPixmap& pixmap); + void setSpacing (int spacing); + void paint (QPainter* painter, const QRect& rect, i= nt rating, int hoverRating =3D -1) const; + int ratingFromPosition (const QRect& rect, const Q= Point& pos) const; + static void paintRating (QPainter* p, const QRect& rect, Q= t::Alignment align, int rating, int hoverRating =3D -1); + static int getRatingFromPosition (const QRect& rect, Qt::= Alignment align, Qt::LayoutDirection direction, const QPoint& pos); +}; diff --git a/sip/kwidgetsaddons/kratingwidget.sip b/sip/kwidgetsaddons/krat= ingwidget.sip new file mode 100644 index 0000000..2ba23a6 --- /dev/null +++ b/sip/kwidgetsaddons/kratingwidget.sip @@ -0,0 +1,56 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KRatingWidget : QFrame +{ +%TypeHeaderCode +#include +%End + +public: + KRatingWidget (QWidget* parent =3D 0); + ~KRatingWidget (); + unsigned int rating () const; + int maxRating () const; + Qt::Alignment alignment () const; + Qt::LayoutDirection layoutDirection () const; + int spacing () const; + QSize sizeHint () const; + bool halfStepsEnabled () const; + QIcon icon () const; +signals: +//ig void ratingChanged (unsigned int rating); + void ratingChanged (int rating); +public: + void setRating (int rating); + void setMaxRating (int max); + void setHalfStepsEnabled (bool enabled); + void setSpacing (int); + void setAlignment (Qt::Alignment align); + void setLayoutDirection (Qt::LayoutDirection direct= ion); + void setIcon (const QIcon& icon); + void setCustomPixmap (const QPixmap& pixmap); + void setPixmapSize (int size); +protected: + void mousePressEvent (QMouseEvent* e); + void mouseMoveEvent (QMouseEvent* e); + void leaveEvent (QEvent* e); + void paintEvent (QPaintEvent* e); + void resizeEvent (QResizeEvent* e); +}; diff --git a/sip/kwidgetsaddons/kruler.sip b/sip/kwidgetsaddons/kruler.sip new file mode 100644 index 0000000..03d14b1 --- /dev/null +++ b/sip/kwidgetsaddons/kruler.sip @@ -0,0 +1,82 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KRuler : QAbstractSlider +{ +%TypeHeaderCode +#include +%End + +public: + enum MetricStyle + { + Custom, + Pixel, + Inch, + Millimetres, + Centimetres, + Metres + }; + explicit KRuler (QWidget* parent =3D 0); + explicit KRuler (Qt::Orientation orient, QWidget* paren= t =3D 0, Qt::WindowFlags f =3D 0); + KRuler (Qt::Orientation orient, int widgetWidt= h, QWidget* parent =3D 0, Qt::WindowFlags f =3D 0); + ~KRuler (); + void setTinyMarkDistance (int); + int tinyMarkDistance () const; + void setLittleMarkDistance (int); + int littleMarkDistance () const; + void setMediumMarkDistance (int); + int mediumMarkDistance () const; + void setBigMarkDistance (int); + int bigMarkDistance () const; + void setShowTinyMarks (bool); + bool showTinyMarks () const; + void setShowLittleMarks (bool); + bool showLittleMarks () const; + void setShowMediumMarks (bool); + bool showMediumMarks () const; + void setShowBigMarks (bool); + bool showBigMarks () const; + void setShowEndMarks (bool); + bool showEndMarks () const; + void setShowPointer (bool); + bool showPointer () const; + void setFrameStyle (int); + void setShowEndLabel (bool); + bool showEndLabel () const; + void setEndLabel (const QString&); + QString endLabel () const; + void setRulerMetricStyle (KRuler::MetricStyle); + void setPixelPerMark (double rate); + double pixelPerMark () const; + void setLength (int); + int length () const; + void setLengthFixed (bool fix); + bool lengthFixed () const; + void slideUp (int count =3D 1); + void slideDown (int count =3D 1); + void setOffset (int offset); + int offset () const; + int endOffset () const; + void slotNewValue (int); + void slotNewOffset (int); + void slotEndOffset (int); +protected: + virtual void paintEvent (QPaintEvent*); +}; diff --git a/sip/kwidgetsaddons/kselectaction.sip b/sip/kwidgetsaddons/ksel= ectaction.sip new file mode 100644 index 0000000..37e59f9 --- /dev/null +++ b/sip/kwidgetsaddons/kselectaction.sip @@ -0,0 +1,79 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KSelectAction : QWidgetAction +{ +%TypeHeaderCode +#include +%End + +public: + explicit KSelectAction (QObject* parent); + KSelectAction (const QString& text, QObject* p= arent); + KSelectAction (const QIcon& icon, const QStrin= g& text, QObject* parent); + virtual ~KSelectAction (); + enum ToolBarMode + { + MenuMode, + ComboBoxMode + }; + KSelectAction::ToolBarMode toolBarMode () const; + void setToolBarMode (KSelectAction::ToolBarMode mod= e); + QToolButton::ToolButtonPopupMode toolButtonPopupMode () const; + void setToolButtonPopupMode (QToolButton::ToolButto= nPopupMode mode); + QActionGroup* selectableActionGroup () const; + QAction* currentAction () const; + int currentItem () const; + QString currentText () const; + QList actions () const; + QAction* action (int index) const; + QAction* action (const QString& text, Qt::CaseSensitivi= ty cs =3D Qt::CaseSensitive) const; + bool setCurrentAction (QAction* action); + bool setCurrentItem (int index); + bool setCurrentAction (const QString& text, Qt::Cas= eSensitivity cs =3D Qt::CaseSensitive); + void addAction (QAction* action); + QAction* addAction (const QString& text); + QAction* addAction (const QIcon& icon, const QString& t= ext); + virtual QAction* removeAction (QAction* action); + virtual void insertAction (QAction* before, QAction* action= ); + void setItems (const QStringList& lst); + QStringList items () const; + bool isEditable () const; + void setEditable (bool); + int comboWidth () const; + void setComboWidth (int width); + void setMaxComboViewCount (int n); + void clear (); + void removeAllActions (); + void setMenuAccelsEnabled (bool b); + bool menuAccelsEnabled () const; + void changeItem (int index, const QString& text); +signals: + void triggered (QAction* action); + void triggered (int index); + void triggered (const QString& text); +protected: + virtual void actionTriggered (QAction* action); + void slotToggled (bool); + virtual QWidget* createWidget (QWidget* parent); + virtual void deleteWidget (QWidget* widget); + virtual bool event (QEvent* event); + virtual bool eventFilter (QObject* watched, QEvent* event); +//ig KSelectAction (KSelectActionPrivate& dd, Q= Object* parent); +}; diff --git a/sip/kwidgetsaddons/kselector.sip b/sip/kwidgetsaddons/kselecto= r.sip new file mode 100644 index 0000000..31d696a --- /dev/null +++ b/sip/kwidgetsaddons/kselector.sip @@ -0,0 +1,69 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KSelector : QAbstractSlider +{ +%TypeHeaderCode +#include +%End + +public: + explicit KSelector (QWidget* parent =3D 0); + explicit KSelector (Qt::Orientation o, QWidget* parent = =3D 0); + ~KSelector (); + QRect contentsRect () const; + void setIndent (bool i); + bool indent () const; + void setArrowDirection (Qt::ArrowType direction); + Qt::ArrowType arrowDirection () const; +protected: + virtual void drawContents (QPainter*); + virtual void drawArrow (QPainter* painter, const QPoint& po= s); + virtual void paintEvent (QPaintEvent*); + virtual void mousePressEvent (QMouseEvent* e); + virtual void mouseMoveEvent (QMouseEvent* e); + virtual void mouseReleaseEvent (QMouseEvent* e); + virtual void wheelEvent (QWheelEvent*); +}; +class KGradientSelector : KSelector +{ +%TypeHeaderCode +#include +%End + +public: + explicit KGradientSelector (QWidget* parent =3D 0); + explicit KGradientSelector (Qt::Orientation o, QWidget*= parent =3D 0); + ~KGradientSelector (); + void setStops (const QGradientStops& stops); + QGradientStops stops () const; + void setColors (const QColor& col1, const QColor& c= ol2); + void setText (const QString& t1, const QString& t2); + void setFirstColor (const QColor& col); + void setSecondColor (const QColor& col); + void setFirstText (const QString& t); + void setSecondText (const QString& t); + QColor firstColor () const; + QColor secondColor () const; + QString firstText () const; + QString secondText () const; +protected: + virtual void drawContents (QPainter*); + virtual QSize minimumSize () const; +}; diff --git a/sip/kcoreaddons/kfilesystemtype_p.sip b/sip/kwidgetsaddons/kse= parator.sip similarity index 67% copy from sip/kcoreaddons/kfilesystemtype_p.sip copy to sip/kwidgetsaddons/kseparator.sip index fa655a8..9dd4eb0 100644 --- a/sip/kcoreaddons/kfilesystemtype_p.sip +++ b/sip/kwidgetsaddons/kseparator.sip @@ -17,20 +17,15 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -%ModuleHeaderCode -#include +class KSeparator : QFrame +{ +%TypeHeaderCode +#include %End = -namespace KFileSystemType -{ -enum Type -{ - Unknown, - Nfs, - Smb, - Fat, - Ramfs, - Other -}; -KFileSystemType::Type fileSystemType (const QString& path); +public: + explicit KSeparator (QWidget* parent =3D 0, Qt::WindowF= lags f =3D 0); + explicit KSeparator (Qt::Orientation orientation, QWidg= et* parent =3D 0, Qt::WindowFlags f =3D 0); + Qt::Orientation orientation () const; + void setOrientation (Qt::Orientation orientation); }; diff --git a/sip/kwidgetsaddons/ksqueezedtextlabel.sip b/sip/kwidgetsaddons= /ksqueezedtextlabel.sip new file mode 100644 index 0000000..c844bfb --- /dev/null +++ b/sip/kwidgetsaddons/ksqueezedtextlabel.sip @@ -0,0 +1,43 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KSqueezedTextLabel : QLabel +{ +%TypeHeaderCode +#include +%End + +public: + explicit KSqueezedTextLabel (QWidget* parent =3D 0); + explicit KSqueezedTextLabel (const QString& text, QWidg= et* parent =3D 0); + virtual ~KSqueezedTextLabel (); + virtual QSize minimumSizeHint () const; + virtual QSize sizeHint () const; + virtual void setAlignment (Qt::Alignment); + Qt::TextElideMode textElideMode () const; + void setTextElideMode (Qt::TextElideMode mode); + QString fullText () const; + void setText (const QString& text); + void clear (); +protected: + void mouseReleaseEvent (QMouseEvent*); + void resizeEvent (QResizeEvent*); + void contextMenuEvent (QContextMenuEvent*); + void squeezeTextToLabel (); +}; diff --git a/sip/kwidgetsaddons/kstandardguiitem.sip b/sip/kwidgetsaddons/k= standardguiitem.sip new file mode 100644 index 0000000..42985e3 --- /dev/null +++ b/sip/kwidgetsaddons/kstandardguiitem.sip @@ -0,0 +1,104 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +%ModuleHeaderCode +#include +%End + +namespace KStandardGuiItem +{ +enum BidiMode +{ + UseRTL, + IgnoreRTL +}; +enum StandardItem +{ + Ok, + Cancel, + Yes, + No, + Discard, + Save, + DontSave, + SaveAs, + Apply, + Clear, + Help, + Defaults, + Close, + Back, + Forward, + Print, + Continue, + Open, + Quit, + AdminMode, + Reset, + Delete, + Insert, + Configure, + Find, + Stop, + Add, + Remove, + Test, + Properties, + Overwrite, + CloseWindow, + CloseDocument +}; +KGuiItem guiItem (KStandardGuiItem::StandardItem id); +QString standardItem (KStandardGuiItem::StandardItem id); +KGuiItem ok (); +KGuiItem cancel (); +KGuiItem yes (); +KGuiItem no (); +KGuiItem insert (); +KGuiItem discard (); +KGuiItem save (); +KGuiItem help (); +KGuiItem dontSave (); +KGuiItem saveAs (); +KGuiItem apply (); +KGuiItem clear (); +KGuiItem defaults (); +KGuiItem close (); +KGuiItem closeWindow (); +KGuiItem closeDocument (); +KGuiItem print (); +KGuiItem properties (); +KGuiItem reset (); +KGuiItem overwrite (); +KGuiItem adminMode (); +KGuiItem cont (); +KGuiItem del (); +KGuiItem open (); +KGuiItem back (KStandardGuiItem::BidiMode useBidi =3D KStan= dardGuiItem::BidiMode::IgnoreRTL); +KGuiItem forward (KStandardGuiItem::BidiMode useBidi =3D KS= tandardGuiItem::BidiMode::IgnoreRTL); +KGuiItem configure (); +//ig QPair backAndForward (); +KGuiItem quit (); +KGuiItem find (); +KGuiItem stop (); +KGuiItem add (); +KGuiItem remove (); +KGuiItem test (); +void assign (QPushButton* button, KStandardGuiItem::Sta= ndardItem item); +}; diff --git a/sip/kwidgetsaddons/ktimecombobox.sip b/sip/kwidgetsaddons/ktim= ecombobox.sip new file mode 100644 index 0000000..2384cb1 --- /dev/null +++ b/sip/kwidgetsaddons/ktimecombobox.sip @@ -0,0 +1,73 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KTimeComboBox : QComboBox +{ +%TypeHeaderCode +#include +%End + +public: + enum Option + { + EditTime, + SelectTime, + ForceTime, + WarnOnInvalid + }; + typedef QFlags Options; + explicit KTimeComboBox (QWidget* parent =3D 0); + virtual ~KTimeComboBox (); + QTime time () const; + bool isValid () const; + bool isNull () const; + KTimeComboBox::Options options () const; + QLocale::FormatType displayFormat () const; + QTime minimumTime () const; + void resetMinimumTime (); + QTime maximumTime () const; + void resetMaximumTime (); + void setTimeRange (const QTime& minTime, const QTim= e& maxTime, const QString& minWarnMsg =3D QString(), const QString& maxWarn= Msg =3D QString()); + void resetTimeRange (); + int timeListInterval () const; + QList timeList () const; +signals: + void timeEntered (const QTime& time); + void timeChanged (const QTime& time); + void timeEdited (const QTime& time); +public: + void setTime (const QTime& time); + void setOptions (KTimeComboBox::Options options); + void setDisplayFormat (QLocale::FormatType formatOp= tions); + void setMinimumTime (const QTime& minTime, const QS= tring& minWarnMsg =3D QString()); + void setMaximumTime (const QTime& maxTime, const QS= tring& maxWarnMsg =3D QString()); + void setTimeListInterval (int minutes); + void setTimeList (QList timeList, const QStr= ing& minWarnMsg =3D QString(), const QString& maxWarnMsg =3D QString()); +protected: + virtual bool eventFilter (QObject* object, QEvent* event); + virtual void showPopup (); + virtual void hidePopup (); + virtual void mousePressEvent (QMouseEvent* event); + virtual void wheelEvent (QWheelEvent* event); + virtual void keyPressEvent (QKeyEvent* event); + virtual void focusInEvent (QFocusEvent* event); + virtual void focusOutEvent (QFocusEvent* event); + virtual void resizeEvent (QResizeEvent* event); + virtual void assignTime (const QTime& time); +}; diff --git a/sip/kwidgetsaddons/ktitlewidget.sip b/sip/kwidgetsaddons/ktitl= ewidget.sip new file mode 100644 index 0000000..84244f1 --- /dev/null +++ b/sip/kwidgetsaddons/ktitlewidget.sip @@ -0,0 +1,59 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KTitleWidget : QWidget +{ +%TypeHeaderCode +#include +%End + +public: + enum ImageAlignment + { + ImageLeft, + ImageRight + }; + enum MessageType + { + PlainMessage, + InfoMessage, + WarningMessage, + ErrorMessage + }; + explicit KTitleWidget (QWidget* parent =3D 0); + virtual ~KTitleWidget (); + void setWidget (QWidget* widget); + QString text () const; + QString comment () const; + const QPixmap* pixmap () const; + void setBuddy (QWidget* buddy); + int autoHideTimeout () const; + void setText (const QString& text, Qt::Alignment al= ignment =3D Qt::AlignLeft|Qt::AlignVCenter); + void setText (const QString& text, KTitleWidget::Me= ssageType type); + void setComment (const QString& comment, KTitleWidg= et::MessageType type =3D KTitleWidget::MessageType::PlainMessage); + void setPixmap (const QPixmap& pixmap, KTitleWidget= ::ImageAlignment alignment =3D KTitleWidget::ImageAlignment::ImageRight); + void setPixmap (const QString& icon, KTitleWidget::= ImageAlignment alignment =3D KTitleWidget::ImageAlignment::ImageRight); + void setPixmap (const QIcon& icon, KTitleWidget::Im= ageAlignment alignment =3D KTitleWidget::ImageAlignment::ImageRight); + void setPixmap (KTitleWidget::MessageType type, KTi= tleWidget::ImageAlignment alignment =3D KTitleWidget::ImageAlignment::Image= Right); + void setAutoHideTimeout (int msecs); +protected: + void changeEvent (QEvent* e); + void showEvent (QShowEvent* event); + bool eventFilter (QObject* object, QEvent* event); +}; diff --git a/sip/solid/networkshare.sip b/sip/kwidgetsaddons/ktoggleaction.= sip similarity index 64% copy from sip/solid/networkshare.sip copy to sip/kwidgetsaddons/ktoggleaction.sip index aeb8343..2c0a5d7 100644 --- a/sip/solid/networkshare.sip +++ b/sip/kwidgetsaddons/ktoggleaction.sip @@ -17,26 +17,18 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -namespace Solid -{ -class NetworkShare : Solid::DeviceInterface +class KToggleAction : QAction { %TypeHeaderCode -#include +#include %End = - explicit NetworkShare (QObject* backendObject); public: - virtual ~NetworkShare (); - enum ShareType - { - Unknown, - Nfs, - Cifs, - Upnp - }; - static Solid::DeviceInterface::Type deviceInterfaceType (); - Solid::NetworkShare::ShareType type () const; - QUrl url () const; -}; + explicit KToggleAction (QObject* parent); + KToggleAction (const QString& text, QObject* p= arent); + KToggleAction (const QIcon& icon, const QStrin= g& text, QObject* parent); + virtual ~KToggleAction (); + void setCheckedState (const KGuiItem& checkedItem); +protected: + virtual void slotToggled (bool checked); }; diff --git a/sip/solid/networkshare.sip b/sip/kwidgetsaddons/ktogglefullscr= eenaction.sip similarity index 63% copy from sip/solid/networkshare.sip copy to sip/kwidgetsaddons/ktogglefullscreenaction.sip index aeb8343..345167a 100644 --- a/sip/solid/networkshare.sip +++ b/sip/kwidgetsaddons/ktogglefullscreenaction.sip @@ -17,26 +17,18 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -namespace Solid -{ -class NetworkShare : Solid::DeviceInterface +class KToggleFullScreenAction : KToggleAction { %TypeHeaderCode -#include +#include %End = - explicit NetworkShare (QObject* backendObject); public: - virtual ~NetworkShare (); - enum ShareType - { - Unknown, - Nfs, - Cifs, - Upnp - }; - static Solid::DeviceInterface::Type deviceInterfaceType (); - Solid::NetworkShare::ShareType type () const; - QUrl url () const; -}; + explicit KToggleFullScreenAction (QObject* parent); + KToggleFullScreenAction (QWidget* window, QObj= ect* parent); + virtual ~KToggleFullScreenAction (); + void setWindow (QWidget* window); + static void setFullScreen (QWidget* window, bool set); +protected: + bool eventFilter (QObject* object, QEvent* event); }; diff --git a/sip/solid/networkshare.sip b/sip/kwidgetsaddons/ktoolbarlabela= ction.sip similarity index 55% copy from sip/solid/networkshare.sip copy to sip/kwidgetsaddons/ktoolbarlabelaction.sip index aeb8343..74b7407 100644 --- a/sip/solid/networkshare.sip +++ b/sip/kwidgetsaddons/ktoolbarlabelaction.sip @@ -17,26 +17,22 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -namespace Solid -{ -class NetworkShare : Solid::DeviceInterface +class KToolBarLabelAction : QWidgetAction { %TypeHeaderCode -#include +#include %End = - explicit NetworkShare (QObject* backendObject); public: - virtual ~NetworkShare (); - enum ShareType - { - Unknown, - Nfs, - Cifs, - Upnp - }; - static Solid::DeviceInterface::Type deviceInterfaceType (); - Solid::NetworkShare::ShareType type () const; - QUrl url () const; -}; + KToolBarLabelAction (const QString& text, QObj= ect* parent); + KToolBarLabelAction (QAction* buddy, const QSt= ring& text, QObject* parent); + virtual ~KToolBarLabelAction (); + void setBuddy (QAction* buddy); + QAction* buddy () const; + virtual QWidget* createWidget (QWidget* parent); +signals: + void textChanged (const QString& newText); +protected: + virtual bool event (QEvent*); + virtual bool eventFilter (QObject* watched, QEvent* event); }; diff --git a/sip/solid/networkshare.sip b/sip/kwidgetsaddons/ktoolbarpopupa= ction.sip similarity index 63% copy from sip/solid/networkshare.sip copy to sip/kwidgetsaddons/ktoolbarpopupaction.sip index aeb8343..783168e 100644 --- a/sip/solid/networkshare.sip +++ b/sip/kwidgetsaddons/ktoolbarpopupaction.sip @@ -17,26 +17,18 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -namespace Solid -{ -class NetworkShare : Solid::DeviceInterface +class KToolBarPopupAction : QWidgetAction { %TypeHeaderCode -#include +#include %End = - explicit NetworkShare (QObject* backendObject); public: - virtual ~NetworkShare (); - enum ShareType - { - Unknown, - Nfs, - Cifs, - Upnp - }; - static Solid::DeviceInterface::Type deviceInterfaceType (); - Solid::NetworkShare::ShareType type () const; - QUrl url () const; -}; + KToolBarPopupAction (const QIcon& icon, const = QString& text, QObject* parent); + virtual ~KToolBarPopupAction (); + bool delayed () const; + void setDelayed (bool delayed); + bool stickyMenu () const; + void setStickyMenu (bool sticky); + virtual QWidget* createWidget (QWidget* parent); }; diff --git a/sip/kcoreaddons/kfilesystemtype_p.sip b/sip/kwidgetsaddons/kto= olbarspaceraction.sip similarity index 75% copy from sip/kcoreaddons/kfilesystemtype_p.sip copy to sip/kwidgetsaddons/ktoolbarspaceraction.sip index fa655a8..118d14c 100644 --- a/sip/kcoreaddons/kfilesystemtype_p.sip +++ b/sip/kwidgetsaddons/ktoolbarspaceraction.sip @@ -17,20 +17,14 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -%ModuleHeaderCode -#include +class KToolBarSpacerAction : QWidgetAction +{ +%TypeHeaderCode +#include %End = -namespace KFileSystemType -{ -enum Type -{ - Unknown, - Nfs, - Smb, - Fat, - Ramfs, - Other -}; -KFileSystemType::Type fileSystemType (const QString& path); +public: + explicit KToolBarSpacerAction (QObject* parent); + virtual ~KToolBarSpacerAction (); + QWidget* createWidget (QWidget* parent); }; diff --git a/sip/kwidgetsaddons/kurllabel.sip b/sip/kwidgetsaddons/kurllabe= l.sip new file mode 100644 index 0000000..c2530ab --- /dev/null +++ b/sip/kwidgetsaddons/kurllabel.sip @@ -0,0 +1,66 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KUrlLabel : QLabel +{ +%TypeHeaderCode +#include +%End + +public: + explicit KUrlLabel (QWidget* parent =3D 0L); + explicit KUrlLabel (const QString& url, const QString& = text =3D QString(), QWidget* parent =3D 0L); + virtual ~KUrlLabel (); + QString url () const; + QString tipText () const; + bool useTips () const; + bool useCursor () const; + bool isGlowEnabled () const; + bool isFloatEnabled () const; + const QPixmap* alternatePixmap () const; + void setUnderline (bool on =3D 1); + void setUrl (const QString& url); + virtual void setFont (const QFont& font); + void setUseTips (bool on =3D 1); + void setTipText (const QString& tip); + void setHighlightedColor (const QColor& highcolor); + void setHighlightedColor (const QString& highcolor); + void setSelectedColor (const QColor& color); + void setSelectedColor (const QString& color); + void setUseCursor (bool on, QCursor* cursor =3D 0L); + void setGlowEnabled (bool glow =3D 1); + void setFloatEnabled (bool do_float =3D 1); + void setAlternatePixmap (const QPixmap& pixmap); +signals: + void enteredUrl (const QString& url); + void enteredUrl (); + void leftUrl (const QString& url); + void leftUrl (); + void leftClickedUrl (const QString& url); + void leftClickedUrl (); + void rightClickedUrl (const QString& url); + void rightClickedUrl (); + void middleClickedUrl (const QString& url); + void middleClickedUrl (); +protected: + virtual void mouseReleaseEvent (QMouseEvent*); + virtual void enterEvent (QEvent*); + virtual void leaveEvent (QEvent*); + virtual bool event (QEvent*); +}; diff --git a/sip/solid/networkshare.sip b/sip/kwidgetsaddons/kviewstatemain= tainerbase.sip similarity index 61% copy from sip/solid/networkshare.sip copy to sip/kwidgetsaddons/kviewstatemaintainerbase.sip index aeb8343..1338a97 100644 --- a/sip/solid/networkshare.sip +++ b/sip/kwidgetsaddons/kviewstatemaintainerbase.sip @@ -17,26 +17,19 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -namespace Solid -{ -class NetworkShare : Solid::DeviceInterface +class KViewStateMaintainerBase : QObject { %TypeHeaderCode -#include +#include %End = - explicit NetworkShare (QObject* backendObject); public: - virtual ~NetworkShare (); - enum ShareType - { - Unknown, - Nfs, - Cifs, - Upnp - }; - static Solid::DeviceInterface::Type deviceInterfaceType (); - Solid::NetworkShare::ShareType type () const; - QUrl url () const; -}; + KViewStateMaintainerBase (QObject* parent =3D = 0); + ~KViewStateMaintainerBase (); + void setSelectionModel (QItemSelectionModel* select= ionModel); + QItemSelectionModel* selectionModel () const; + void setView (QAbstractItemView* view); + QAbstractItemView* view () const; + virtual void saveState ()=3D0; + virtual void restoreState ()=3D0; }; diff --git a/sip/kwidgetsaddons/kviewstateserializer.sip b/sip/kwidgetsaddo= ns/kviewstateserializer.sip new file mode 100644 index 0000000..53a05a6 --- /dev/null +++ b/sip/kwidgetsaddons/kviewstateserializer.sip @@ -0,0 +1,45 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KViewStateSerializer : QObject +{ +%TypeHeaderCode +#include +%End + +public: + explicit KViewStateSerializer (QObject* parent =3D 0); + ~KViewStateSerializer (); + QAbstractItemView* view () const; + void setView (QAbstractItemView* view); + QItemSelectionModel* selectionModel () const; + void setSelectionModel (QItemSelectionModel* select= ionModel); + QStringList selectionKeys () const; + QStringList expansionKeys () const; + QString currentIndexKey () const; + QPair scrollState () const; + void restoreSelection (const QStringList& indexStri= ngs); + void restoreCurrentItem (const QString& indexString= ); + void restoreExpanded (const QStringList& indexStrin= gs); + void restoreScrollState (int verticalScoll, int hor= izontalScroll); +protected: + virtual QModelIndex indexFromConfigString (const QAbstractItemMode= l* model, const QString& key) const=3D0; + virtual QString indexToConfigString (const QModelIndex& index)= const=3D0; + void restoreState (); +}; diff --git a/sip/kwidgetsaddons/kwidgetsaddonsmod.sip b/sip/kwidgetsaddons/= kwidgetsaddonsmod.sip new file mode 100644 index 0000000..ef192b7 --- /dev/null +++ b/sip/kwidgetsaddons/kwidgetsaddonsmod.sip @@ -0,0 +1,90 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +%Module PyKDE5.kwidgetsaddons + +%ModuleHeaderCode +#pragma GCC visibility push(default) +%End + +%Import typedefs.sip +%Import QtCore/QtCoremod.sip +%Import QtWidgets/QtWidgetsmod.sip + +%Include kmessagebox.sip +%Include kmessageboxdontaskagaininterface.sip +%Include kmessageboxnotifyinterface.sip +%Include kstandardguiitem.sip +%Include kacceleratormanager.sip +%Include kactionmenu.sip +%Include kactionselector.sip +%Include kanimatedbutton.sip +%Include kassistantdialog.sip +%Include kcapacitybar.sip +%Include kcharselect.sip +%Include kcolorbutton.sip +%Include kcolorcombo.sip +%Include kcursor.sip +%Include kdatecombobox.sip +%Include kdatepicker.sip +%Include kdatetimeedit.sip +%Include kdragwidgetdecorator.sip +%Include kdualaction.sip +%Include keditlistwidget.sip +%Include kfontaction.sip +%Include kfontchooser.sip +%Include kfontrequester.sip +%Include kfontsizeaction.sip +%Include kguiitem.sip +%Include kled.sip +%Include kmessagewidget.sip +%Include kmimetypechooser.sip +%Include kmultitabbar.sip +%Include knewpassworddialog.sip +%Include kpagedialog.sip +%Include kpagemodel.sip +%Include kpageview.sip +%Include kpagewidget.sip +%Include kpagewidgetmodel.sip +%Include kpassworddialog.sip +%Include kpixmapregionselectordialog.sip +%Include kpixmapregionselectorwidget.sip +%Include kpixmapsequence.sip +%Include kpixmapsequenceoverlaypainter.sip +%Include kpixmapsequencewidget.sip +%Include kpopupframe.sip +%Include kratingpainter.sip +%Include kratingwidget.sip +%Include kruler.sip +%Include kselectaction.sip +%Include kselector.sip +%Include kseparator.sip +%Include ksqueezedtextlabel.sip +%Include ktimecombobox.sip +%Include ktitlewidget.sip +%Include ktoggleaction.sip +%Include ktogglefullscreenaction.sip +%Include ktoolbarlabelaction.sip +%Include ktoolbarpopupaction.sip +%Include ktoolbarspaceraction.sip +%Include kurllabel.sip +%Include kviewstatemaintainerbase.sip +%Include kviewstateserializer.sip +%Include kxyselector.sip +%Include lineediturldropeventfilter.sip diff --git a/sip/kwidgetsaddons/kxyselector.sip b/sip/kwidgetsaddons/kxysel= ector.sip new file mode 100644 index 0000000..b68e553 --- /dev/null +++ b/sip/kwidgetsaddons/kxyselector.sip @@ -0,0 +1,48 @@ +// Copyright 2014 Simon Edwards + +// Generated by twine2 + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as +// published by the Free Software Foundation; either version 2, or +// (at your option) any later version. + +// This program is distributed 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 Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +class KXYSelector : QWidget +{ +%TypeHeaderCode +#include +%End + +public: + explicit KXYSelector (QWidget* parent =3D 0); + ~KXYSelector (); + void setValues (int xPos, int yPos); + void setXValue (int xPos); + void setYValue (int yPos); + void setRange (int minX, int minY, int maxX, int ma= xY); + void setMarkerColor (const QColor& col); + int xValue () const; + int yValue () const; + QRect contentsRect () const; + virtual QSize minimumSizeHint () const; +signals: + void valueChanged (int x, int y); +protected: + virtual void drawContents (QPainter*); + virtual void drawMarker (QPainter* p, int xp, int yp); + virtual void paintEvent (QPaintEvent* e); + virtual void mousePressEvent (QMouseEvent* e); + virtual void mouseMoveEvent (QMouseEvent* e); + virtual void wheelEvent (QWheelEvent*); + void valuesFromPosition (int x, int y, int& xVal, i= nt& yVal) const; +}; diff --git a/sip/kcoreaddons/kfilesystemtype_p.sip b/sip/kwidgetsaddons/lin= eediturldropeventfilter.sip similarity index 73% rename from sip/kcoreaddons/kfilesystemtype_p.sip rename to sip/kwidgetsaddons/lineediturldropeventfilter.sip index fa655a8..6d318fa 100644 --- a/sip/kcoreaddons/kfilesystemtype_p.sip +++ b/sip/kwidgetsaddons/lineediturldropeventfilter.sip @@ -17,20 +17,14 @@ // Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. = -%ModuleHeaderCode -#include +class LineEditUrlDropEventFilter : QObject +{ +%TypeHeaderCode +#include %End = -namespace KFileSystemType -{ -enum Type -{ - Unknown, - Nfs, - Smb, - Fat, - Ramfs, - Other -}; -KFileSystemType::Type fileSystemType (const QString& path); +public: + LineEditUrlDropEventFilter (QObject* parent = =3D 0); + virtual ~LineEditUrlDropEventFilter (); + virtual bool eventFilter (QObject* obj, QEvent* ev); }; diff --git a/sip/solid/battery.sip b/sip/solid/battery.sip index 766bd14..2247a86 100644 --- a/sip/solid/battery.sip +++ b/sip/solid/battery.sip @@ -43,7 +43,8 @@ public: { NoCharge, Charging, - Discharging + Discharging, + FullyCharged }; enum Technology { @@ -74,10 +75,24 @@ public: signals: void chargePercentChanged (int value, const QString= & udi); void capacityChanged (int value, const QString& udi= ); - void chargeStateChanged (int newState, const QStrin= g& udi); - void plugStateChanged (bool newState, const QString= & udi); void energyChanged (double energy, const QString& u= di); void energyRateChanged (double energyRate, const QS= tring& udi); void powerSupplyStateChanged (bool newState, const = QString& udi); +public: + bool isPresent () const; + qlonglong timeToEmpty () const; + qlonglong timeToFull () const; + double temperature () const; + bool isRecalled () const; + QString recallVendor () const; + QString recallUrl () const; + QString serial () const; +signals: + void presentStateChanged (bool newState, const QStr= ing& udi); + void chargeStateChanged (int newState, const QStrin= g& udi); + void timeToEmptyChanged (qlonglong time, const QStr= ing& udi); + void timeToFullChanged (qlonglong time, const QStri= ng& udi); + void voltageChanged (double voltage, const QString&= udi); + void temperatureChanged (double temperature, const = QString& udi); }; }; diff --git a/sip/solid/device.sip b/sip/solid/device.sip index e21fbe0..832bdf0 100644 --- a/sip/solid/device.sip +++ b/sip/solid/device.sip @@ -33,7 +33,6 @@ public: explicit Device (const QString& udi =3D QString()); Device (const Solid::Device& device); ~Device (); -//ig Solid::Device& operator=3D (const Solid::Device& device); bool isValid () const; QString udi () const; QString parentUdi () const; @@ -46,5 +45,6 @@ public: bool isDeviceInterface (const Solid::DeviceInterfac= e::Type& type) const; //ig Solid::DeviceInterface* asDeviceInterface (const Solid::DeviceInt= erface::Type& type); const Solid::DeviceInterface* asDeviceInterface (const Solid::DeviceI= nterface::Type& type) const; +//ig Solid::Device& operator=3D (const Solid::Device& device); }; }; diff --git a/sip/solid/deviceinterface.sip b/sip/solid/deviceinterface.sip index ebf8117..afff40d 100644 --- a/sip/solid/deviceinterface.sip +++ b/sip/solid/deviceinterface.sip @@ -39,19 +39,8 @@ public: OpticalDisc, Camera, PortableMediaPlayer, - NetworkInterface, - AcAdapter, Battery, - Button, - AudioInterface, - DvbInterface, - Video, - SerialInterface, - SmartCardReader, - InternetGateway, NetworkShare, - Keyboard, - PointingDevice, Last }; virtual ~DeviceInterface (); diff --git a/sip/solid/networkshare.sip b/sip/solid/networkshare.sip index aeb8343..a287084 100644 --- a/sip/solid/networkshare.sip +++ b/sip/solid/networkshare.sip @@ -32,8 +32,7 @@ public: { Unknown, Nfs, - Cifs, - Upnp + Cifs }; static Solid::DeviceInterface::Type deviceInterfaceType (); Solid::NetworkShare::ShareType type () const; diff --git a/sip/solid/predicate.sip b/sip/solid/predicate.sip index de9a573..4a57b35 100644 --- a/sip/solid/predicate.sip +++ b/sip/solid/predicate.sip @@ -45,11 +45,6 @@ public: explicit Predicate (const Solid::DeviceInterface::Type&= ifaceType); explicit Predicate (const QString& ifaceName); ~Predicate (); -//ig Solid::Predicate& operator=3D (const Solid::Predicate& other= ); - Solid::Predicate operator& (const Solid::Predicate& other); - Solid::Predicate& operator&=3D (const Solid::Predicate& other); - Solid::Predicate operator| (const Solid::Predicate& other); - Solid::Predicate& operator|=3D (const Solid::Predicate& other); bool isValid () const; bool matches (const Solid::Device& device) const; QSet usedTypes () const; @@ -62,5 +57,10 @@ public: Solid::Predicate::ComparisonOperator comparisonOperator () const; Solid::Predicate firstOperand () const; Solid::Predicate secondOperand () const; +//ig Solid::Predicate& operator=3D (const Solid::Predicate& other= ); + Solid::Predicate operator& (const Solid::Predicate& other); + Solid::Predicate& operator&=3D (const Solid::Predicate& other); + Solid::Predicate operator| (const Solid::Predicate& other); + Solid::Predicate& operator|=3D (const Solid::Predicate& other); }; }; diff --git a/sip/solid/solidmod.sip b/sip/solid/solidmod.sip index 1c1a66c..9147f2a 100644 --- a/sip/solid/solidmod.sip +++ b/sip/solid/solidmod.sip @@ -26,33 +26,40 @@ %Import typedefs.sip %Import QtCore/QtCoremod.sip = -%Include acadapter.sip -%Include audiointerface.sip +//%Include acadapter.sip +//%Include acpluggedjob.sip +//%Include audiointerface.sip %Include battery.sip %Include block.sip -%Include button.sip +//%Include button.sip %Include camera.sip %Include device.sip %Include deviceinterface.sip %Include devicenotifier.sip -%Include dvbinterface.sip +//%Include dvbinterface.sip %Include genericinterface.sip -%Include internetgateway.sip -%Include keyboard.sip -%Include networking.sip -%Include networkinterface.sip +//%Include inhibition.sip +//%Include inhibitionjob.sip +//%Include internetgateway.sip +//%Include job.sip +//%Include keyboard.sip +//%Include networking.sip +//%Include networkinterface.sip %Include networkshare.sip %Include opticaldisc.sip %Include opticaldrive.sip -%Include pointingdevice.sip +//%Include pointingdevice.sip %Include portablemediaplayer.sip -%Include powermanagement.sip +//%Include power.sip +//%Include powermanagement.sip %Include predicate.sip %Include processor.sip -%Include serialinterface.sip -%Include smartcardreader.sip +//%Include requeststatejob.sip +//%Include serialinterface.sip +//%Include smartcardreader.sip %Include solidnamespace.sip +//%Include statesjob.sip %Include storageaccess.sip %Include storagedrive.sip %Include storagevolume.sip -%Include video.sip +//%Include video.sip