author | zecke <zecke> | 2004-03-14 17:00:46 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 17:00:46 (UTC) |
commit | 52169e2469a1edcca986e9f0404c3ca815d5833b (patch) (unidiff) | |
tree | 9c6651125f29fe63df33fe56b352d3288b2ea8df | |
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 | |||
@@ -1,30 +1,31 @@ | |||
1 | #include "osplitter_example.h" | 1 | #include "osplitter_example.h" |
2 | 2 | ||
3 | /* OPIE */ | 3 | /* OPIE */ |
4 | 4 | ||
5 | #include <opie2/osplitter.h> | 5 | #include <opie2/osplitter.h> |
6 | #include <opie2/ofileselector.h> | 6 | #include <opie2/ofileselector.h> |
7 | #include <qpe/qpeapplication.h> | 7 | #include <qpe/qpeapplication.h> |
8 | #include <opie2/oapplicationfactory.h> | 8 | #include <opie2/oapplicationfactory.h> |
9 | 9 | ||
10 | /* QT*/ | 10 | /* QT*/ |
11 | #include <qdir.h> | 11 | #include <qdir.h> |
12 | #include <qlayout.h> | 12 | #include <qlayout.h> |
13 | 13 | ||
14 | using namespace Opie::Ui; | 14 | using namespace Opie::Ui; |
15 | using namespace Opie::Core; | ||
15 | 16 | ||
16 | OPIE_EXPORT_APP( OApplicationFactory<OSplitterExample> ) | 17 | OPIE_EXPORT_APP( OApplicationFactory<OSplitterExample> ) |
17 | 18 | ||
18 | OSplitterExample::OSplitterExample( QWidget *w,const char* n,WFlags f ) | 19 | OSplitterExample::OSplitterExample( QWidget *w,const char* n,WFlags f ) |
19 | : QWidget( w, n, f ){ | 20 | : QWidget( w, n, f ){ |
20 | QVBoxLayout * lay = new QVBoxLayout(this); | 21 | QVBoxLayout * lay = new QVBoxLayout(this); |
21 | OSplitter * splitter = new OSplitter( Horizontal, this ); | 22 | OSplitter * splitter = new OSplitter( Horizontal, this ); |
22 | lay->addWidget( splitter ); | 23 | lay->addWidget( splitter ); |
23 | 24 | ||
24 | OFileSelector *selector = new OFileSelector( splitter, OFileSelector::FileSelector, | 25 | OFileSelector *selector = new OFileSelector( splitter, OFileSelector::FileSelector, |
25 | OFileSelector::Normal, QDir::homeDirPath(), | 26 | OFileSelector::Normal, QDir::homeDirPath(), |
26 | QString::null ); | 27 | QString::null ); |
27 | splitter->addWidget( selector, "zoom", tr("Selector 1") ); | 28 | splitter->addWidget( selector, "zoom", tr("Selector 1") ); |
28 | 29 | ||
29 | selector = new OFileSelector( splitter, OFileSelector::FileSelector, OFileSelector::Normal, | 30 | selector = new OFileSelector( splitter, OFileSelector::FileSelector, OFileSelector::Normal, |
30 | QDir::homeDirPath(), QString::null ); | 31 | 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 | |||
@@ -6,32 +6,33 @@ | |||
6 | 6 | ||
7 | /* OPIE */ | 7 | /* OPIE */ |
8 | #include <opie2/oapplicationfactory.h> | 8 | #include <opie2/oapplicationfactory.h> |
9 | #include <opie2/owidgetstack.h> | 9 | #include <opie2/owidgetstack.h> |
10 | #include <qpe/resource.h> | 10 | #include <qpe/resource.h> |
11 | 11 | ||
12 | /* QT */ | 12 | /* QT */ |
13 | #include <qaction.h> | 13 | #include <qaction.h> |
14 | #include <qtoolbar.h> | 14 | #include <qtoolbar.h> |
15 | #include <qpopupmenu.h> | 15 | #include <qpopupmenu.h> |
16 | #include <qmenubar.h> | 16 | #include <qmenubar.h> |
17 | #include <qlayout.h> | 17 | #include <qlayout.h> |
18 | #include <qlabel.h> | 18 | #include <qlabel.h> |
19 | #include <qpushbutton.h> | 19 | #include <qpushbutton.h> |
20 | #include <qsignalmapper.h> | 20 | #include <qsignalmapper.h> |
21 | 21 | ||
22 | using namespace Opie::Core; | ||
22 | using namespace Opie::Ui; | 23 | using namespace Opie::Ui; |
23 | 24 | ||
24 | OPIE_EXPORT_APP( OApplicationFactory<StackExample> ) | 25 | OPIE_EXPORT_APP( OApplicationFactory<StackExample> ) |
25 | 26 | ||
26 | StackExample::StackExample( QWidget* parent, const char* name, WFlags fl ) | 27 | StackExample::StackExample( QWidget* parent, const char* name, WFlags fl ) |
27 | : QMainWindow( parent, name, fl ) | 28 | : QMainWindow( parent, name, fl ) |
28 | { | 29 | { |
29 | m_stack = new OWidgetStack( this ); | 30 | m_stack = new OWidgetStack( this ); |
30 | setCentralWidget( m_stack ); | 31 | setCentralWidget( m_stack ); |
31 | 32 | ||
32 | /* nice Signal Mapper ;) */ | 33 | /* nice Signal Mapper ;) */ |
33 | QSignalMapper *sm = new QSignalMapper(this); | 34 | QSignalMapper *sm = new QSignalMapper(this); |
34 | connect(sm, SIGNAL(mapped(int) ), m_stack, SLOT(raiseWidget(int)) ); | 35 | connect(sm, SIGNAL(mapped(int) ), m_stack, SLOT(raiseWidget(int)) ); |
35 | 36 | ||
36 | /* toolbar first but this should be known from the other examples */ | 37 | /* toolbar first but this should be known from the other examples */ |
37 | setToolBarsMovable( false ); | 38 | setToolBarsMovable( false ); |
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 | |||
@@ -88,34 +88,34 @@ class OProcessPrivate; | |||
88 | *@li OProcess::Block -- The child process starts and the parent process | 88 | *@li OProcess::Block -- The child process starts and the parent process |
89 | *is suspended until the child process exits. (@em Really not recommended | 89 | *is suspended until the child process exits. (@em Really not recommended |
90 | *for programs with a GUI.) | 90 | *for programs with a GUI.) |
91 | * | 91 | * |
92 | *OProcess also provides several functions for determining the exit status | 92 | *OProcess also provides several functions for determining the exit status |
93 | *and the pid of the child process it represents. | 93 | *and the pid of the child process it represents. |
94 | * | 94 | * |
95 | *Furthermore it is possible to supply command-line arguments to the process | 95 | *Furthermore it is possible to supply command-line arguments to the process |
96 | *in a clean fashion (no null -- terminated stringlists and such...) | 96 | *in a clean fashion (no null -- terminated stringlists and such...) |
97 | * | 97 | * |
98 | *A small usage example: | 98 | *A small usage example: |
99 | *<pre> | 99 | *<pre> |
100 | *OProcess *proc = new OProcess; | 100 | *OProcess *proc = new OProcess; |
101 | * | 101 | * |
102 | **proc << "my_executable"; | 102 | **proc << "my_executable"; |
103 | **proc << "These" << "are" << "the" << "command" << "line" << "args"; | 103 | **proc << "These" << "are" << "the" << "command" << "line" << "args"; |
104 | *QApplication::connect(proc, SIGNAL(processExited(OProcess *)), | 104 | *QApplication::connect(proc, SIGNAL(processExited(Opie::Core::OProcess *)), |
105 | * pointer_to_my_object, SLOT(my_objects_slot(OProcess *))); | 105 | * pointer_to_my_object, SLOT(my_objects_slot(Opie::Core::OProcess *))); |
106 | *proc->start(); | 106 | *proc->start(); |
107 | *</pre> | 107 | *</pre> |
108 | * | 108 | * |
109 | *This will start "my_executable" with the commandline arguments "These"... | 109 | *This will start "my_executable" with the commandline arguments "These"... |
110 | * | 110 | * |
111 | *When the child process exits, the respective Qt signal will be emitted. | 111 | *When the child process exits, the respective Qt signal will be emitted. |
112 | * | 112 | * |
113 | *@sect Communication with the child process | 113 | *@sect Communication with the child process |
114 | * | 114 | * |
115 | *OProcess supports communication with the child process through | 115 | *OProcess supports communication with the child process through |
116 | *stdin/stdout/stderr. | 116 | *stdin/stdout/stderr. |
117 | * | 117 | * |
118 | *The following functions are provided for getting data from the child | 118 | *The following functions are provided for getting data from the child |
119 | *process or sending data to the child's stdin (For more information, | 119 | *process or sending data to the child's stdin (For more information, |
120 | *have a look at the documentation of each function): | 120 | *have a look at the documentation of each function): |
121 | * | 121 | * |
@@ -467,90 +467,90 @@ public: | |||
467 | * child process. | 467 | * child process. |
468 | */ | 468 | */ |
469 | void detach(); | 469 | void detach(); |
470 | 470 | ||
471 | /** | 471 | /** |
472 | * @return the PID of @a process, or -1 if the process is not running | 472 | * @return the PID of @a process, or -1 if the process is not running |
473 | */ | 473 | */ |
474 | static int processPID( const QString& process ); | 474 | static int processPID( const QString& process ); |
475 | 475 | ||
476 | signals: | 476 | signals: |
477 | 477 | ||
478 | /** | 478 | /** |
479 | * Emitted after the process has terminated when | 479 | * Emitted after the process has terminated when |
480 | * the process was run in the @p NotifyOnExit (==default option to | 480 | * the process was run in the @p NotifyOnExit (==default option to |
481 | * @ref start()) or the @ref Block mode. | 481 | * @ref start()) or the @ref Block mode. |
482 | **/ | 482 | **/ |
483 | void processExited( OProcess *proc ); | 483 | void processExited( Opie::Core::OProcess *proc ); |
484 | 484 | ||
485 | 485 | ||
486 | /** | 486 | /** |
487 | * Emitted, when output from the child process has | 487 | * Emitted, when output from the child process has |
488 | * been received on stdout. | 488 | * been received on stdout. |
489 | * | 489 | * |
490 | * To actually get | 490 | * To actually get |
491 | * these signals, the respective communication link (stdout/stderr) | 491 | * these signals, the respective communication link (stdout/stderr) |
492 | * has to be turned on in @ref start(). | 492 | * has to be turned on in @ref start(). |
493 | * | 493 | * |
494 | * @param buffer The data received. | 494 | * @param buffer The data received. |
495 | * @param buflen The number of bytes that are available. | 495 | * @param buflen The number of bytes that are available. |
496 | * | 496 | * |
497 | * You should copy the information contained in @p buffer to your private | 497 | * You should copy the information contained in @p buffer to your private |
498 | * data structures before returning from this slot. | 498 | * data structures before returning from this slot. |
499 | **/ | 499 | **/ |
500 | void receivedStdout( OProcess *proc, char *buffer, int buflen ); | 500 | void receivedStdout( Opie::Core::OProcess *proc, char *buffer, int buflen ); |
501 | 501 | ||
502 | /** | 502 | /** |
503 | * Emitted when output from the child process has | 503 | * Emitted when output from the child process has |
504 | * been received on stdout. | 504 | * been received on stdout. |
505 | * | 505 | * |
506 | * To actually get these signals, the respective communications link | 506 | * To actually get these signals, the respective communications link |
507 | * (stdout/stderr) has to be turned on in @ref start() and the | 507 | * (stdout/stderr) has to be turned on in @ref start() and the |
508 | * @p NoRead flag should have been passed. | 508 | * @p NoRead flag should have been passed. |
509 | * | 509 | * |
510 | * You will need to explicitly call resume() after your call to start() | 510 | * You will need to explicitly call resume() after your call to start() |
511 | * to begin processing data from the child process's stdout. This is | 511 | * to begin processing data from the child process's stdout. This is |
512 | * to ensure that this signal is not emitted when no one is connected | 512 | * to ensure that this signal is not emitted when no one is connected |
513 | * to it, otherwise this signal will not be emitted. | 513 | * to it, otherwise this signal will not be emitted. |
514 | * | 514 | * |
515 | * The data still has to be read from file descriptor @p fd. | 515 | * The data still has to be read from file descriptor @p fd. |
516 | **/ | 516 | **/ |
517 | void receivedStdout( int fd, int &len ); | 517 | void receivedStdout( int fd, int &len ); |
518 | 518 | ||
519 | 519 | ||
520 | /** | 520 | /** |
521 | * Emitted, when output from the child process has | 521 | * Emitted, when output from the child process has |
522 | * been received on stderr. | 522 | * been received on stderr. |
523 | * To actually get | 523 | * To actually get |
524 | * these signals, the respective communication link (stdout/stderr) | 524 | * these signals, the respective communication link (stdout/stderr) |
525 | * has to be turned on in @ref start(). | 525 | * has to be turned on in @ref start(). |
526 | * | 526 | * |
527 | * @param buffer The data received. | 527 | * @param buffer The data received. |
528 | * @param buflen The number of bytes that are available. | 528 | * @param buflen The number of bytes that are available. |
529 | * | 529 | * |
530 | * You should copy the information contained in @p buffer to your private | 530 | * You should copy the information contained in @p buffer to your private |
531 | * data structures before returning from this slot. | 531 | * data structures before returning from this slot. |
532 | */ | 532 | */ |
533 | void receivedStderr( OProcess *proc, char *buffer, int buflen ); | 533 | void receivedStderr( Opie::Core::OProcess *proc, char *buffer, int buflen ); |
534 | 534 | ||
535 | /** | 535 | /** |
536 | * Emitted after all the data that has been | 536 | * Emitted after all the data that has been |
537 | * specified by a prior call to @ref writeStdin() has actually been | 537 | * specified by a prior call to @ref writeStdin() has actually been |
538 | * written to the child process. | 538 | * written to the child process. |
539 | **/ | 539 | **/ |
540 | void wroteStdin( OProcess *proc ); | 540 | void wroteStdin( Opie::Core::OProcess *proc ); |
541 | 541 | ||
542 | protected slots: | 542 | protected slots: |
543 | 543 | ||
544 | /** | 544 | /** |
545 | * This slot gets activated when data from the child's stdout arrives. | 545 | * This slot gets activated when data from the child's stdout arrives. |
546 | * It usually calls "childOutput" | 546 | * It usually calls "childOutput" |
547 | */ | 547 | */ |
548 | void slotChildOutput( int fdno ); | 548 | void slotChildOutput( int fdno ); |
549 | 549 | ||
550 | /** | 550 | /** |
551 | * This slot gets activated when data from the child's stderr arrives. | 551 | * This slot gets activated when data from the child's stderr arrives. |
552 | * It usually calls "childError" | 552 | * It usually calls "childError" |
553 | */ | 553 | */ |
554 | void slotChildError( int fdno ); | 554 | void slotChildError( int fdno ); |
555 | /* | 555 | /* |
556 | Slot functions for capturing stdout and stderr of the child | 556 | Slot functions for capturing stdout and stderr of the child |
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 | |||
@@ -685,33 +685,33 @@ class OPacketCapturer : public QObject | |||
685 | */ | 685 | */ |
686 | bool swapped() const; | 686 | bool swapped() const; |
687 | /** | 687 | /** |
688 | * @returns the libpcap version string used to write the input capture file. | 688 | * @returns the libpcap version string used to write the input capture file. |
689 | */ | 689 | */ |
690 | QString version() const; | 690 | QString version() const; |
691 | /** | 691 | /** |
692 | * @returns the packet statistic database. | 692 | * @returns the packet statistic database. |
693 | * @see QMap | 693 | * @see QMap |
694 | */ | 694 | */ |
695 | const QMap<QString,int>& statistics() const; | 695 | const QMap<QString,int>& statistics() const; |
696 | 696 | ||
697 | signals: | 697 | signals: |
698 | /** | 698 | /** |
699 | * This signal is emitted, when a packet has been received. | 699 | * This signal is emitted, when a packet has been received. |
700 | */ | 700 | */ |
701 | void receivedPacket( OPacket* ); | 701 | void receivedPacket( Opie::Net::OPacket* ); |
702 | 702 | ||
703 | protected slots: | 703 | protected slots: |
704 | void readyToReceive(); | 704 | void readyToReceive(); |
705 | 705 | ||
706 | protected: | 706 | protected: |
707 | QString _name; // devicename | 707 | QString _name; // devicename |
708 | bool _open; // check this before doing pcap calls | 708 | bool _open; // check this before doing pcap calls |
709 | pcap_t* _pch; // pcap library handle | 709 | pcap_t* _pch; // pcap library handle |
710 | pcap_dumper_t* _pcd; // pcap dumper handle | 710 | pcap_dumper_t* _pcd; // pcap dumper handle |
711 | QSocketNotifier* _sn; // socket notifier for main loop | 711 | QSocketNotifier* _sn; // socket notifier for main loop |
712 | mutable char _errbuf[PCAP_ERRBUF_SIZE]; // holds error strings from libpcap | 712 | mutable char _errbuf[PCAP_ERRBUF_SIZE]; // holds error strings from libpcap |
713 | QMap<QString, int> _stats; // statistics; | 713 | QMap<QString, int> _stats; // statistics; |
714 | class Private; // Private Forward declaration | 714 | class Private; // Private Forward declaration |
715 | Private *d; // if we need to add data | 715 | Private *d; // if we need to add data |
716 | }; | 716 | }; |
717 | } | 717 | } |
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 | |||
@@ -221,33 +221,33 @@ public: | |||
221 | static OPopupMenu* contextMenuFocus(); | 221 | static OPopupMenu* contextMenuFocus(); |
222 | 222 | ||
223 | /** | 223 | /** |
224 | * returns the ID of the menuitem associated with the current context menu | 224 | * returns the ID of the menuitem associated with the current context menu |
225 | * @since 3.2 | 225 | * @since 3.2 |
226 | */ | 226 | */ |
227 | static int contextMenuFocusItem(); | 227 | static int contextMenuFocusItem(); |
228 | 228 | ||
229 | signals: | 229 | signals: |
230 | /** | 230 | /** |
231 | * connect to this signal to be notified when a context menu is about to be shown | 231 | * connect to this signal to be notified when a context menu is about to be shown |
232 | * @param menu The menu that the context menu is about to be shown for | 232 | * @param menu The menu that the context menu is about to be shown for |
233 | * @param menuItem The menu item that the context menu is currently on | 233 | * @param menuItem The menu item that the context menu is currently on |
234 | * @param ctxMenu The context menu itself | 234 | * @param ctxMenu The context menu itself |
235 | * @since 3.2 | 235 | * @since 3.2 |
236 | */ | 236 | */ |
237 | void aboutToShowContextMenu(OPopupMenu* menu, int menuItem, QPopupMenu* ctxMenu); | 237 | void aboutToShowContextMenu(Opie::Ui::OPopupMenu* menu, int menuItem, QPopupMenu* ctxMenu); |
238 | 238 | ||
239 | protected: | 239 | protected: |
240 | virtual void closeEvent(QCloseEvent *); | 240 | virtual void closeEvent(QCloseEvent *); |
241 | virtual void keyPressEvent(QKeyEvent* e); | 241 | virtual void keyPressEvent(QKeyEvent* e); |
242 | virtual bool eventFilter(QObject* obj, QEvent* event); | 242 | virtual bool eventFilter(QObject* obj, QEvent* event); |
243 | virtual void hideEvent(QHideEvent*); | 243 | virtual void hideEvent(QHideEvent*); |
244 | 244 | ||
245 | virtual void virtual_hook( int id, void* data ); | 245 | virtual void virtual_hook( int id, void* data ); |
246 | 246 | ||
247 | protected slots: | 247 | protected slots: |
248 | /// @since 3.1 | 248 | /// @since 3.1 |
249 | QString underlineText(const QString& text, uint length); | 249 | QString underlineText(const QString& text, uint length); |
250 | /// @since 3.1 | 250 | /// @since 3.1 |
251 | void resetKeyboardVars(bool noMatches = false); | 251 | void resetKeyboardVars(bool noMatches = false); |
252 | void itemHighlighted(int whichItem); | 252 | void itemHighlighted(int whichItem); |
253 | void showCtxMenu(QPoint pos); | 253 | void showCtxMenu(QPoint pos); |
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 | |||
@@ -112,21 +112,18 @@ public slots: | |||
112 | void setHour( const QString& hour ); | 112 | void setHour( const QString& hour ); |
113 | void setMinute( const QString& minute ); | 113 | void setMinute( const QString& minute ); |
114 | 114 | ||
115 | private: | 115 | private: |
116 | OTimePicker *m_timePicker; | 116 | OTimePicker *m_timePicker; |
117 | QTime m_time; | 117 | QTime m_time; |
118 | class Private; | 118 | class Private; |
119 | Private* d; | 119 | Private* d; |
120 | }; | 120 | }; |
121 | 121 | ||
122 | } | 122 | } |
123 | } | 123 | } |
124 | 124 | ||
125 | /* for Qt2 */ | 125 | /* for Qt2 */ |
126 | #if ( QT_VERSION-0 >= 0x030000 ) | 126 | #if ( QT_VERSION-0 >= 0x030000 ) |
127 | #error "Fix the UI File to use namespaces" | 127 | #error "Fix the UI File to use namespaces" |
128 | #else | ||
129 | typedef Opie::Ui::OTimePicker OUIOTimePicker; | ||
130 | #endif | 128 | #endif |
131 | #endif | 129 | #endif |
132 | |||
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 | |||
@@ -134,33 +134,33 @@ class OVersatileView : public QWidgetStack | |||
134 | void returnPressed( QListViewItem * ); | 134 | void returnPressed( QListViewItem * ); |
135 | void onItem( QListViewItem * ); | 135 | void onItem( QListViewItem * ); |
136 | 136 | ||
137 | void selectionChanged( QIconViewItem * ); | 137 | void selectionChanged( QIconViewItem * ); |
138 | void currentChanged( QIconViewItem * ); | 138 | void currentChanged( QIconViewItem * ); |
139 | void clicked( QIconViewItem * ); | 139 | void clicked( QIconViewItem * ); |
140 | void pressed( QIconViewItem * ); | 140 | void pressed( QIconViewItem * ); |
141 | void doubleClicked( QIconViewItem * ); | 141 | void doubleClicked( QIconViewItem * ); |
142 | void returnPressed( QIconViewItem * ); | 142 | void returnPressed( QIconViewItem * ); |
143 | void onItem( QIconViewItem * ); | 143 | void onItem( QIconViewItem * ); |
144 | 144 | ||
145 | void expanded( QListViewItem * item ); // QListView | 145 | void expanded( QListViewItem * item ); // QListView |
146 | void collapsed( QListViewItem * item ); // QListView | 146 | void collapsed( QListViewItem * item ); // QListView |
147 | 147 | ||
148 | signals: | 148 | signals: |
149 | 149 | ||
150 | void contextMenuRequested( OVersatileViewItem * item, const QPoint& pos, int col ); | 150 | void contextMenuRequested( Opie::Ui::OVersatileViewItem * item, const QPoint& pos, int col ); |
151 | 151 | ||
152 | /*#ifndef QT_NO_DRAGANDDROP | 152 | /*#ifndef QT_NO_DRAGANDDROP |
153 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView | 153 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView |
154 | #endif | 154 | #endif |
155 | void itemRenamed( OVersatileViewItem *item, const QString & ); // QIconView | 155 | void itemRenamed( OVersatileViewItem *item, const QString & ); // QIconView |
156 | void itemRenamed( OVersatileViewItem *item ); // QIconView | 156 | void itemRenamed( OVersatileViewItem *item ); // QIconView |
157 | */ | 157 | */ |
158 | 158 | ||
159 | //==============================================================================================// | 159 | //==============================================================================================// |
160 | // "Derived" API - Case 1: Methods existing either only in QListView or only in QIconView | 160 | // "Derived" API - Case 1: Methods existing either only in QListView or only in QIconView |
161 | //==============================================================================================// | 161 | //==============================================================================================// |
162 | 162 | ||
163 | public: | 163 | public: |
164 | 164 | ||
165 | /* | 165 | /* |
166 | enum Arrangement { // QIconView | 166 | enum Arrangement { // QIconView |
@@ -223,34 +223,34 @@ public: | |||
223 | 223 | ||
224 | virtual void setItemMargin( int ); // QListView | 224 | virtual void setItemMargin( int ); // QListView |
225 | int itemMargin() const; // QListView | 225 | int itemMargin() const; // QListView |
226 | 226 | ||
227 | virtual void setRootIsDecorated( bool ); // QListView | 227 | virtual void setRootIsDecorated( bool ); // QListView |
228 | bool rootIsDecorated() const; // QListView | 228 | bool rootIsDecorated() const; // QListView |
229 | 229 | ||
230 | void setShowSortIndicator( bool show ); // QListView | 230 | void setShowSortIndicator( bool show ); // QListView |
231 | bool showSortIndicator() const; // QListView | 231 | bool showSortIndicator() const; // QListView |
232 | 232 | ||
233 | int index( const OVersatileViewItem *item ) const; // QIconView | 233 | int index( const OVersatileViewItem *item ) const; // QIconView |
234 | 234 | ||
235 | public slots: | 235 | public slots: |
236 | void triggerUpdate(); // QListView | 236 | void triggerUpdate(); // QListView |
237 | 237 | ||
238 | signals: | 238 | signals: |
239 | void expanded( OVersatileViewItem *item ); // QListView | 239 | void expanded( Opie::Ui::OVersatileViewItem *item ); // QListView |
240 | void collapsed( OVersatileViewItem *item ); // QListView | 240 | void collapsed( Opie::Ui::OVersatileViewItem *item ); // QListView |
241 | 241 | ||
242 | // | 242 | // |
243 | // only in QIconView | 243 | // only in QIconView |
244 | // | 244 | // |
245 | 245 | ||
246 | public: | 246 | public: |
247 | uint count() const; // QIconView | 247 | uint count() const; // QIconView |
248 | 248 | ||
249 | OVersatileViewItem *firstItem() const; // QIconView | 249 | OVersatileViewItem *firstItem() const; // QIconView |
250 | OVersatileViewItem *lastItem() const; // QIconView | 250 | OVersatileViewItem *lastItem() const; // QIconView |
251 | 251 | ||
252 | OVersatileViewItem *findItem( const QPoint &pos ) const; // QIconView | 252 | OVersatileViewItem *findItem( const QPoint &pos ) const; // QIconView |
253 | OVersatileViewItem *findItem( const QString &text ) const; // QIconView | 253 | OVersatileViewItem *findItem( const QString &text ) const; // QIconView |
254 | 254 | ||
255 | OVersatileViewItem* findFirstVisibleItem( const QRect &r ) const; // QIconView | 255 | OVersatileViewItem* findFirstVisibleItem( const QRect &r ) const; // QIconView |
256 | OVersatileViewItem* findLastVisibleItem( const QRect &r ) const; // QIconView | 256 | OVersatileViewItem* findLastVisibleItem( const QRect &r ) const; // QIconView |
@@ -284,34 +284,34 @@ public: | |||
284 | virtual void setItemsMovable( bool b ); // QIconView | 284 | virtual void setItemsMovable( bool b ); // QIconView |
285 | bool itemsMovable() const; // QIconView | 285 | bool itemsMovable() const; // QIconView |
286 | virtual void setWordWrapIconText( bool b ); // QIconView | 286 | virtual void setWordWrapIconText( bool b ); // QIconView |
287 | bool wordWrapIconText() const; // QIconView | 287 | bool wordWrapIconText() const; // QIconView |
288 | 288 | ||
289 | public slots: | 289 | public slots: |
290 | virtual void arrangeItemsInGrid( const QSize &grid, bool update = TRUE ); // QIconView | 290 | virtual void arrangeItemsInGrid( const QSize &grid, bool update = TRUE ); // QIconView |
291 | virtual void arrangeItemsInGrid( bool update = TRUE ); // QIconView | 291 | virtual void arrangeItemsInGrid( bool update = TRUE ); // QIconView |
292 | virtual void updateContents(); // QIconView | 292 | virtual void updateContents(); // QIconView |
293 | 293 | ||
294 | signals: | 294 | signals: |
295 | /*#ifndef QT_NO_DRAGANDDROP | 295 | /*#ifndef QT_NO_DRAGANDDROP |
296 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView | 296 | void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst ); // QIconView |
297 | #endif | 297 | #endif |
298 | */ | 298 | */ |
299 | void moved(); // QIconView | 299 | void moved(); // QIconView |
300 | void itemRenamed( OVersatileViewItem *item, const QString & ); // QIconView | 300 | void itemRenamed( Opie::Ui::OVersatileViewItem *item, const QString & ); // QIconView |
301 | void itemRenamed( OVersatileViewItem *item ); // QIconView | 301 | void itemRenamed( Opie::Ui::OVersatileViewItem *item ); // QIconView |
302 | 302 | ||
303 | //==============================================================================================// | 303 | //==============================================================================================// |
304 | // "Derived" API - Case 2: Methods existing in QListView and QIconView with the same signatures | 304 | // "Derived" API - Case 2: Methods existing in QListView and QIconView with the same signatures |
305 | //==============================================================================================// | 305 | //==============================================================================================// |
306 | 306 | ||
307 | public: | 307 | public: |
308 | enum SelectionMode { | 308 | enum SelectionMode { |
309 | Single = 0, | 309 | Single = 0, |
310 | Multi, | 310 | Multi, |
311 | Extended, | 311 | Extended, |
312 | NoSelection | 312 | NoSelection |
313 | }; | 313 | }; |
314 | 314 | ||
315 | virtual void clear(); | 315 | virtual void clear(); |
316 | 316 | ||
317 | virtual void setFont( const QFont & ); | 317 | virtual void setFont( const QFont & ); |
@@ -327,73 +327,73 @@ public: | |||
327 | virtual void invertSelection(); | 327 | virtual void invertSelection(); |
328 | 328 | ||
329 | void ensureItemVisible( const OVersatileViewItem * ); | 329 | void ensureItemVisible( const OVersatileViewItem * ); |
330 | virtual void repaintItem( const OVersatileViewItem * ) const; | 330 | virtual void repaintItem( const OVersatileViewItem * ) const; |
331 | 331 | ||
332 | virtual void setCurrentItem( OVersatileViewItem * ); | 332 | virtual void setCurrentItem( OVersatileViewItem * ); |
333 | OVersatileViewItem * currentItem() const; | 333 | OVersatileViewItem * currentItem() const; |
334 | 334 | ||
335 | // bool eventFilter( QObject * o, QEvent * ); // use QWidgetStack implementation | 335 | // bool eventFilter( QObject * o, QEvent * ); // use QWidgetStack implementation |
336 | 336 | ||
337 | // QSize minimumSizeHint() const; // use QWidgetStack implementation | 337 | // QSize minimumSizeHint() const; // use QWidgetStack implementation |
338 | // QSizePolicy sizePolicy() const; // use QWidgetStack implementation | 338 | // QSizePolicy sizePolicy() const; // use QWidgetStack implementation |
339 | // QSize sizeHint() const; // use QWidgetStack implementation | 339 | // QSize sizeHint() const; // use QWidgetStack implementation |
340 | 340 | ||
341 | signals: | 341 | signals: |
342 | void selectionChanged(); | 342 | void selectionChanged(); |
343 | void selectionChanged( OVersatileViewItem * ); | 343 | void selectionChanged( Opie::Ui::OVersatileViewItem * ); |
344 | void currentChanged( OVersatileViewItem * ); | 344 | void currentChanged( Opie::Ui::OVersatileViewItem * ); |
345 | void clicked( OVersatileViewItem * ); | 345 | void clicked( Opie::Ui::OVersatileViewItem * ); |
346 | void pressed( OVersatileViewItem * ); | 346 | void pressed( Opie::Ui::OVersatileViewItem * ); |
347 | 347 | ||
348 | void doubleClicked( OVersatileViewItem * ); | 348 | void doubleClicked( Opie::Ui::OVersatileViewItem * ); |
349 | void returnPressed( OVersatileViewItem * ); | 349 | void returnPressed( Opie::Ui::OVersatileViewItem * ); |
350 | 350 | ||
351 | void onItem( OVersatileViewItem * ); | 351 | void onItem( Opie::Ui::OVersatileViewItem * ); |
352 | void onViewport(); | 352 | void onViewport(); |
353 | 353 | ||
354 | //==============================================================================================// | 354 | //==============================================================================================// |
355 | // "Derived" API - Case 2: Methods existing in QListView and QIconView with differing signatures | 355 | // "Derived" API - Case 2: Methods existing in QListView and QIconView with differing signatures |
356 | //==============================================================================================// | 356 | //==============================================================================================// |
357 | 357 | ||
358 | /* | 358 | /* |
359 | 359 | ||
360 | public: | 360 | public: |
361 | virtual void insertItem( OVersatileViewItem * ); // QListView | 361 | virtual void insertItem( OVersatileViewItem * ); // QListView |
362 | virtual void insertItem( OVersatileViewItem *item, OVersatileViewItem *after = 0L ); // QIconView | 362 | virtual void insertItem( OVersatileViewItem *item, OVersatileViewItem *after = 0L ); // QIconView |
363 | 363 | ||
364 | virtual void setSelected( OVersatileViewItem *, bool ); // QListView | 364 | virtual void setSelected( OVersatileViewItem *, bool ); // QListView |
365 | virtual void setSelected( OVersatileViewItem *item, bool s, bool cb = FALSE ); // QIconView | 365 | virtual void setSelected( OVersatileViewItem *item, bool s, bool cb = FALSE ); // QIconView |
366 | 366 | ||
367 | virtual void setSorting( int column, bool increasing = TRUE ); // QListView | 367 | virtual void setSorting( int column, bool increasing = TRUE ); // QListView |
368 | void setSorting( bool sort, bool ascending = TRUE ); // QIconView | 368 | void setSorting( bool sort, bool ascending = TRUE ); // QIconView |
369 | 369 | ||
370 | void sort(); // #### make virtual in next major release // QListView | 370 | void sort(); // #### make virtual in next major release // QListView |
371 | virtual void sort( bool ascending = TRUE ); // QIconView | 371 | virtual void sort( bool ascending = TRUE ); // QIconView |
372 | 372 | ||
373 | */ | 373 | */ |
374 | 374 | ||
375 | signals: | 375 | signals: |
376 | void clicked( OVersatileViewItem *, const QPoint &, int ); // QListView | 376 | void clicked( Opie::Ui::OVersatileViewItem *, const QPoint &, int ); // QListView |
377 | void clicked( OVersatileViewItem *, const QPoint & ); // QIconView | 377 | void clicked( Opie::Ui::OVersatileViewItem *, const QPoint & ); // QIconView |
378 | 378 | ||
379 | void pressed( OVersatileViewItem *, const QPoint &, int ); // QListView | 379 | void pressed( Opie::Ui::OVersatileViewItem *, const QPoint &, int ); // QListView |
380 | void pressed( OVersatileViewItem *, const QPoint & ); // QIconView | 380 | void pressed( Opie::Ui::OVersatileViewItem *, const QPoint & ); // QIconView |
381 | 381 | ||
382 | void rightButtonClicked( OVersatileViewItem* item, const QPoint& pos ); // QIconView | 382 | void rightButtonClicked( Opie::Ui::OVersatileViewItem* item, const QPoint& pos ); // QIconView |
383 | void rightButtonClicked( OVersatileViewItem *, const QPoint&, int ); // QListView | 383 | void rightButtonClicked( Opie::Ui::OVersatileViewItem *, const QPoint&, int ); // QListView |
384 | 384 | ||
385 | void rightButtonPressed( OVersatileViewItem* item, const QPoint& pos ); // QIconView | 385 | void rightButtonPressed( Opie::Ui::OVersatileViewItem* item, const QPoint& pos ); // QIconView |
386 | void rightButtonPressed( OVersatileViewItem *, const QPoint&, int ); // QListView | 386 | void rightButtonPressed( Opie::Ui::OVersatileViewItem *, const QPoint&, int ); // QListView |
387 | 387 | ||
388 | void mouseButtonPressed( int, OVersatileViewItem *, const QPoint& , int ); // QListView | 388 | void mouseButtonPressed( int, Opie::Ui::OVersatileViewItem *, const QPoint& , int ); // QListView |
389 | void mouseButtonPressed( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView | 389 | void mouseButtonPressed( int button, Opie::Ui::OVersatileViewItem* item, const QPoint& pos ); // QIconView |
390 | 390 | ||
391 | void mouseButtonClicked( int, OVersatileViewItem *, const QPoint&, int ); // QListView | 391 | void mouseButtonClicked( int, Opie::Ui::OVersatileViewItem *, const QPoint&, int ); // QListView |
392 | void mouseButtonClicked( int button, OVersatileViewItem* item, const QPoint& pos ); // QIconView | 392 | void mouseButtonClicked( int button, Opie::Ui::OVersatileViewItem* item, const QPoint& pos ); // QIconView |
393 | 393 | ||
394 | }; | 394 | }; |
395 | 395 | ||
396 | } | 396 | } |
397 | } | 397 | } |
398 | #endif | 398 | #endif |
399 | 399 | ||