author | zecke <zecke> | 2004-03-14 17:00:46 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 17:00:46 (UTC) |
commit | 52169e2469a1edcca986e9f0404c3ca815d5833b (patch) (side-by-side diff) | |
tree | 9c6651125f29fe63df33fe56b352d3288b2ea8df /libopie2 | |
parent | 59106c8ffcf25181925281c519a2b49d6835ef9e (diff) | |
download | opie-52169e2469a1edcca986e9f0404c3ca815d5833b.zip opie-52169e2469a1edcca986e9f0404c3ca815d5833b.tar.gz opie-52169e2469a1edcca986e9f0404c3ca815d5833b.tar.bz2 |
Change Signature of Signals to obey namespace
Make example compile
-rw-r--r-- | libopie2/examples/opieui/osplitter_example/osplitter_example.cpp | 1 | ||||
-rw-r--r-- | libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp | 1 | ||||
-rw-r--r-- | libopie2/opiecore/oprocess.h | 12 | ||||
-rw-r--r-- | libopie2/opienet/opcap.h | 2 | ||||
-rw-r--r-- | libopie2/opieui/opopupmenu.h | 2 | ||||
-rw-r--r-- | libopie2/opieui/otimepicker.h | 3 | ||||
-rw-r--r-- | libopie2/opieui/oversatileview.h | 48 |
7 files changed, 34 insertions, 35 deletions
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp b/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp index 4a1468d..07c7e51 100644 --- a/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp +++ b/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp @@ -3,24 +3,25 @@ /* OPIE */ #include <opie2/osplitter.h> #include <opie2/ofileselector.h> #include <qpe/qpeapplication.h> #include <opie2/oapplicationfactory.h> /* QT*/ #include <qdir.h> #include <qlayout.h> using namespace Opie::Ui; +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<OSplitterExample> ) OSplitterExample::OSplitterExample( QWidget *w,const char* n,WFlags f ) : QWidget( w, n, f ){ QVBoxLayout * lay = new QVBoxLayout(this); OSplitter * splitter = new OSplitter( Horizontal, this ); lay->addWidget( splitter ); OFileSelector *selector = new OFileSelector( splitter, OFileSelector::FileSelector, OFileSelector::Normal, QDir::homeDirPath(), QString::null ); diff --git a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp index 50cc11b..272e42b 100644 --- a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp +++ b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp @@ -10,24 +10,25 @@ #include <qpe/resource.h> /* QT */ #include <qaction.h> #include <qtoolbar.h> #include <qpopupmenu.h> #include <qmenubar.h> #include <qlayout.h> #include <qlabel.h> #include <qpushbutton.h> #include <qsignalmapper.h> +using namespace Opie::Core; using namespace Opie::Ui; OPIE_EXPORT_APP( OApplicationFactory<StackExample> ) StackExample::StackExample( QWidget* parent, const char* name, WFlags fl ) : QMainWindow( parent, name, fl ) { m_stack = new OWidgetStack( this ); setCentralWidget( m_stack ); /* nice Signal Mapper ;) */ QSignalMapper *sm = new QSignalMapper(this); diff --git a/libopie2/opiecore/oprocess.h b/libopie2/opiecore/oprocess.h index eb56b03..e23f98c 100644 --- a/libopie2/opiecore/oprocess.h +++ b/libopie2/opiecore/oprocess.h @@ -92,26 +92,26 @@ class OProcessPrivate; *OProcess also provides several functions for determining the exit status *and the pid of the child process it represents. * *Furthermore it is possible to supply command-line arguments to the process *in a clean fashion (no null -- terminated stringlists and such...) * *A small usage example: *<pre> *OProcess *proc = new OProcess; * **proc << "my_executable"; **proc << "These" << "are" << "the" << "command" << "line" << "args"; - *QApplication::connect(proc, SIGNAL(processExited(OProcess *)), - * pointer_to_my_object, SLOT(my_objects_slot(OProcess *))); + *QApplication::connect(proc, SIGNAL(processExited(Opie::Core::OProcess *)), + * pointer_to_my_object, SLOT(my_objects_slot(Opie::Core::OProcess *))); *proc->start(); *</pre> * *This will start "my_executable" with the commandline arguments "These"... * *When the child process exits, the respective Qt signal will be emitted. * *@sect Communication with the child process * *OProcess supports communication with the child process through *stdin/stdout/stderr. * @@ -471,42 +471,42 @@ public: /** * @return the PID of @a process, or -1 if the process is not running */ static int processPID( const QString& process ); signals: /** * Emitted after the process has terminated when * the process was run in the @p NotifyOnExit (==default option to * @ref start()) or the @ref Block mode. **/ - void processExited( OProcess *proc ); + void processExited( Opie::Core::OProcess *proc ); /** * Emitted, when output from the child process has * been received on stdout. * * To actually get * these signals, the respective communication link (stdout/stderr) * has to be turned on in @ref start(). * * @param buffer The data received. * @param buflen The number of bytes that are available. * * You should copy the information contained in @p buffer to your private * data structures before returning from this slot. **/ - void receivedStdout( OProcess *proc, char *buffer, int buflen ); + void receivedStdout( Opie::Core::OProcess *proc, char *buffer, int buflen ); /** * Emitted when output from the child process has * been received on stdout. * * To actually get these signals, the respective communications link * (stdout/stderr) has to be turned on in @ref start() and the * @p NoRead flag should have been passed. * * You will need to explicitly call resume() after your call to start() * to begin processing data from the child process's stdout. This is * to ensure that this signal is not emitted when no one is connected @@ -521,32 +521,32 @@ signals: * Emitted, when output from the child process has * been received on stderr. * To actually get * these signals, the respective communication link (stdout/stderr) * has to be turned on in @ref start(). * * @param buffer The data received. * @param buflen The number of bytes that are available. * * You should copy the information contained in @p buffer to your private * data structures before returning from this slot. */ - void receivedStderr( OProcess *proc, char *buffer, int buflen ); + void receivedStderr( Opie::Core::OProcess *proc, char *buffer, int buflen ); /** * Emitted after all the data that has been * specified by a prior call to @ref writeStdin() has actually been * written to the child process. **/ - void wroteStdin( OProcess *proc ); + void wroteStdin( Opie::Core::OProcess *proc ); protected slots: /** * This slot gets activated when data from the child's stdout arrives. * It usually calls "childOutput" */ void slotChildOutput( int fdno ); /** * This slot gets activated when data from the child's stderr arrives. * It usually calls "childError" diff --git a/libopie2/opienet/opcap.h b/libopie2/opienet/opcap.h index dc609a3..72a78de 100644 --- a/libopie2/opienet/opcap.h +++ b/libopie2/opienet/opcap.h @@ -689,25 +689,25 @@ class OPacketCapturer : public QObject */ QString version() const; /** * @returns the packet statistic database. * @see QMap */ const QMap<QString,int>& statistics() const; signals: /** * This signal is emitted, when a packet has been received. */ - void receivedPacket( OPacket* ); + void receivedPacket( Opie::Net::OPacket* ); protected slots: void readyToReceive(); protected: QString _name; // devicename bool _open; // check this before doing pcap calls pcap_t* _pch; // pcap library handle pcap_dumper_t* _pcd; // pcap dumper handle QSocketNotifier* _sn; // socket notifier for main loop mutable char _errbuf[PCAP_ERRBUF_SIZE]; // holds error strings from libpcap QMap<QString, int> _stats; // statistics; diff --git a/libopie2/opieui/opopupmenu.h b/libopie2/opieui/opopupmenu.h index 419a954..294edcc 100644 --- a/libopie2/opieui/opopupmenu.h +++ b/libopie2/opieui/opopupmenu.h @@ -225,25 +225,25 @@ public: * @since 3.2 */ static int contextMenuFocusItem(); signals: /** * connect to this signal to be notified when a context menu is about to be shown * @param menu The menu that the context menu is about to be shown for * @param menuItem The menu item that the context menu is currently on * @param ctxMenu The context menu itself * @since 3.2 */ - void aboutToShowContextMenu(OPopupMenu* menu, int menuItem, QPopupMenu* ctxMenu); + void aboutToShowContextMenu(Opie::Ui::OPopupMenu* menu, int menuItem, QPopupMenu* ctxMenu); protected: virtual void closeEvent(QCloseEvent *); virtual void keyPressEvent(QKeyEvent* e); virtual bool eventFilter(QObject* obj, QEvent* event); virtual void hideEvent(QHideEvent*); virtual void virtual_hook( int id, void* data ); protected slots: /// @since 3.1 QString underlineText(const QString& text, uint length); diff --git a/libopie2/opieui/otimepicker.h b/libopie2/opieui/otimepicker.h index 01bb557..fb20781 100644 --- a/libopie2/opieui/otimepicker.h +++ b/libopie2/opieui/otimepicker.h @@ -116,17 +116,14 @@ private: OTimePicker *m_timePicker; QTime m_time; class Private; Private* d; }; } } /* for Qt2 */ #if ( QT_VERSION-0 >= 0x030000 ) #error "Fix the UI File to use namespaces" -#else -typedef Opie::Ui::OTimePicker OUIOTimePicker; #endif #endif - diff --git a/libopie2/opieui/oversatileview.h b/libopie2/opieui/oversatileview.h index 61b61db..8cba65c 100644 --- a/libopie2/opieui/oversatileview.h +++ b/libopie2/opieui/oversatileview.h @@ -138,25 +138,25 @@ class OVersatileView : public QWidgetStack void currentChanged( QIconViewItem * ); void clicked( QIconViewItem * ); void pressed( QIconViewItem * ); void doubleClicked( QIconViewItem * ); void returnPressed( QIconViewItem * ); void onItem( QIconViewItem * ); void expanded( QListViewItem * item ); // QListView void collapsed( QListViewItem * item ); // QListView signals: - void contextMenuRequested( OVersatileViewItem * item, const QPoint& pos, int col ); + void contextMenuRequested( Opie::Ui::OVersatileViewItem * item, const QPoint& pos, int col ); /*#ifndef QT_NO_DRAGANDDROP void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView #endif void itemRenamed( OVersatileViewItem *item, const QString & ); // QIconView void itemRenamed( OVersatileViewItem *item ); // QIconView */ //==============================================================================================// // "Derived" API - Case 1: Methods existing either only in QListView or only in QIconView //==============================================================================================// @@ -227,26 +227,26 @@ public: virtual void setRootIsDecorated( bool ); // QListView bool rootIsDecorated() const; // QListView void setShowSortIndicator( bool show ); // QListView bool showSortIndicator() const; // QListView int index( const OVersatileViewItem *item ) const; // QIconView public slots: void triggerUpdate(); // QListView signals: - void expanded( OVersatileViewItem *item ); // QListView - void collapsed( OVersatileViewItem *item ); // QListView + void expanded( Opie::Ui::OVersatileViewItem *item ); // QListView + void collapsed( Opie::Ui::OVersatileViewItem *item ); // QListView // // only in QIconView // public: uint count() const; // QIconView OVersatileViewItem *firstItem() const; // QIconView OVersatileViewItem *lastItem() const; // QIconView OVersatileViewItem *findItem( const QPoint &pos ) const; // QIconView @@ -288,26 +288,26 @@ public: public slots: virtual void arrangeItemsInGrid( const QSize &grid, bool update = TRUE ); // QIconView virtual void arrangeItemsInGrid( bool update = TRUE ); // QIconView virtual void updateContents(); // QIconView signals: /*#ifndef QT_NO_DRAGANDDROP void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView #endif */ void moved(); // QIconView - void itemRenamed( OVersatileViewItem *item, const QString & ); // QIconView - void itemRenamed( OVersatileViewItem *item ); // QIconView + void itemRenamed( Opie::Ui::OVersatileViewItem *item, const QString & ); // QIconView + void itemRenamed( Opie::Ui::OVersatileViewItem *item ); // QIconView //==============================================================================================// // "Derived" API - Case 2: Methods existing in QListView and QIconView with the same signatures //==============================================================================================// public: enum SelectionMode { Single = 0, Multi, Extended, NoSelection }; @@ -331,69 +331,69 @@ public: virtual void setCurrentItem( OVersatileViewItem * ); OVersatileViewItem * currentItem() const; // bool eventFilter( QObject * o, QEvent * ); // use QWidgetStack implementation // QSize minimumSizeHint() const; // use QWidgetStack implementation // QSizePolicy sizePolicy() const; // use QWidgetStack implementation // QSize sizeHint() const; // use QWidgetStack implementation signals: void selectionChanged(); - void selectionChanged( OVersatileViewItem * ); - void currentChanged( OVersatileViewItem * ); - void clicked( OVersatileViewItem * ); - void pressed( OVersatileViewItem * ); + void selectionChanged( Opie::Ui::OVersatileViewItem * ); + void currentChanged( Opie::Ui::OVersatileViewItem * ); + void clicked( Opie::Ui::OVersatileViewItem * ); + void pressed( Opie::Ui::OVersatileViewItem * ); - void doubleClicked( OVersatileViewItem * ); - void returnPressed( OVersatileViewItem * ); + void doubleClicked( Opie::Ui::OVersatileViewItem * ); + void returnPressed( Opie::Ui::OVersatileViewItem * ); - void onItem( OVersatileViewItem * ); + void onItem( Opie::Ui::OVersatileViewItem * ); void onViewport(); //==============================================================================================// // "Derived" API - Case 2: Methods existing in QListView and QIconView with differing signatures //==============================================================================================// /* public: virtual void insertItem( OVersatileViewItem * ); // QListView virtual void insertItem( OVersatileViewItem *item, OVersatileViewItem *after = 0L ); // QIconView virtual void setSelected( OVersatileViewItem *, bool ); // QListView virtual void setSelected( OVersatileViewItem *item, bool s, bool cb = FALSE ); // QIconView virtual void setSorting( int column, bool increasing = TRUE ); // QListView void setSorting( bool sort, bool ascending = TRUE ); // QIconView void sort(); // #### make virtual in next major release // QListView virtual void sort( bool ascending = TRUE ); // QIconView */ signals: - void clicked( OVersatileViewItem *, const QPoint &, int ); // QListView - void clicked( OVersatileViewItem *, const QPoint & ); // QIconView + void clicked( Opie::Ui::OVersatileViewItem *, const QPoint &, int ); // QListView + void clicked( Opie::Ui::OVersatileViewItem *, const QPoint & ); // QIconView - void pressed( OVersatileViewItem *, const QPoint &, int ); // QListView - void pressed( OVersatileViewItem *, const QPoint & ); // QIconView + void pressed( Opie::Ui::OVersatileViewItem *, const QPoint &, int ); // QListView + void pressed( Opie::Ui::OVersatileViewItem *, const QPoint & ); // QIconView - void rightButtonClicked( OVersatileViewItem* item, const QPoint& pos ); // QIconView - void rightButtonClicked( OVersatileViewItem *, const QPoint&, int ); // QListView + void rightButtonClicked( Opie::Ui::OVersatileViewItem* item, const QPoint& pos ); // QIconView + void rightButtonClicked( Opie::Ui::OVersatileViewItem *, const QPoint&, int ); // QListView - void rightButtonPressed( OVersatileViewItem* item, const QPoint& pos ); // QIconView - void rightButtonPressed( OVersatileViewItem *, const QPoint&, int ); // QListView + void rightButtonPressed( Opie::Ui::OVersatileViewItem* item, const QPoint& pos ); // QIconView + void rightButtonPressed( Opie::Ui::OVersatileViewItem *, const QPoint&, int ); // QListView - void mouseButtonPressed( int, OVersatileViewItem *, const QPoint& , int ); // QListView - void mouseButtonPressed( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView + void mouseButtonPressed( int, Opie::Ui::OVersatileViewItem *, const QPoint& , int ); // QListView + void mouseButtonPressed( int button, Opie::Ui::OVersatileViewItem* item, const QPoint& pos ); // QIconView - void mouseButtonClicked( int, OVersatileViewItem *, const QPoint&, int ); // QListView - void mouseButtonClicked( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView + void mouseButtonClicked( int, Opie::Ui::OVersatileViewItem *, const QPoint&, int ); // QListView + void mouseButtonClicked( int button, Opie::Ui::OVersatileViewItem* item, const QPoint& pos ); // QIconView }; } } #endif |