summaryrefslogtreecommitdiff
authorzecke <zecke>2004-03-14 17:00:46 (UTC)
committer zecke <zecke>2004-03-14 17:00:46 (UTC)
commit52169e2469a1edcca986e9f0404c3ca815d5833b (patch) (unidiff)
tree9c6651125f29fe63df33fe56b352d3288b2ea8df
parent59106c8ffcf25181925281c519a2b49d6835ef9e (diff)
downloadopie-52169e2469a1edcca986e9f0404c3ca815d5833b.zip
opie-52169e2469a1edcca986e9f0404c3ca815d5833b.tar.gz
opie-52169e2469a1edcca986e9f0404c3ca815d5833b.tar.bz2
Change Signature of Signals to obey namespace
Make example compile
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/examples/opieui/osplitter_example/osplitter_example.cpp1
-rw-r--r--libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp1
-rw-r--r--libopie2/opiecore/oprocess.h12
-rw-r--r--libopie2/opienet/opcap.h2
-rw-r--r--libopie2/opieui/opopupmenu.h2
-rw-r--r--libopie2/opieui/otimepicker.h3
-rw-r--r--libopie2/opieui/oversatileview.h48
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,33 +1,34 @@
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
14using namespace Opie::Ui; 14using namespace Opie::Ui;
15using namespace Opie::Core;
15 16
16OPIE_EXPORT_APP( OApplicationFactory<OSplitterExample> ) 17OPIE_EXPORT_APP( OApplicationFactory<OSplitterExample> )
17 18
18OSplitterExample::OSplitterExample( QWidget *w,const char* n,WFlags f ) 19OSplitterExample::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 );
31 splitter->addWidget( selector, "zoom", tr("Selector 2") ); 32 splitter->addWidget( selector, "zoom", tr("Selector 2") );
32 33
33} 34}
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
@@ -1,69 +1,70 @@
1/* 1/*
2 * You may use, modify and distribute this example without any limitation 2 * You may use, modify and distribute this example without any limitation
3 */ 3 */
4 4
5#include "owidgetstack_example.h" 5#include "owidgetstack_example.h"
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
22using namespace Opie::Core;
22using namespace Opie::Ui; 23using namespace Opie::Ui;
23 24
24OPIE_EXPORT_APP( OApplicationFactory<StackExample> ) 25OPIE_EXPORT_APP( OApplicationFactory<StackExample> )
25 26
26StackExample::StackExample( QWidget* parent, const char* name, WFlags fl ) 27StackExample::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 );
38 39
39 /* only a menubar here */ 40 /* only a menubar here */
40 QToolBar* holder = new QToolBar( this ); 41 QToolBar* holder = new QToolBar( this );
41 holder->setHorizontalStretchable( true ); 42 holder->setHorizontalStretchable( true );
42 43
43 QMenuBar *bar = new QMenuBar( holder ); 44 QMenuBar *bar = new QMenuBar( holder );
44 QPopupMenu *menu = new QPopupMenu( this ); 45 QPopupMenu *menu = new QPopupMenu( this );
45 46
46 QAction* a = new QAction( tr("Show MainWidget"), Resource::loadPixmap("zoom"), 47 QAction* a = new QAction( tr("Show MainWidget"), Resource::loadPixmap("zoom"),
47 QString::null, 0, this, 0 ); 48 QString::null, 0, this, 0 );
48 sm->setMapping(a, 1 ); 49 sm->setMapping(a, 1 );
49 connect(a, SIGNAL(activated() ), 50 connect(a, SIGNAL(activated() ),
50 sm, SLOT(map() ) ); 51 sm, SLOT(map() ) );
51 a->addTo( menu ); 52 a->addTo( menu );
52 53
53 a = new QAction( tr("Show Details Small"), Resource::loadPixmap("zoom"), 54 a = new QAction( tr("Show Details Small"), Resource::loadPixmap("zoom"),
54 QString::null, 0, this, 0 ); 55 QString::null, 0, this, 0 );
55 sm->setMapping(a, 2 ); 56 sm->setMapping(a, 2 );
56 connect(a, SIGNAL(activated() ), 57 connect(a, SIGNAL(activated() ),
57 sm, SLOT(map() ) ); 58 sm, SLOT(map() ) );
58 a->addTo( menu ); 59 a->addTo( menu );
59 60
60 a = new QAction( tr("Show Details More"), Resource::loadPixmap("zoom"), 61 a = new QAction( tr("Show Details More"), Resource::loadPixmap("zoom"),
61 QString::null, 0, this, 0 ); 62 QString::null, 0, this, 0 );
62 sm->setMapping(a, 3 ); 63 sm->setMapping(a, 3 );
63 connect(a, SIGNAL(activated() ), 64 connect(a, SIGNAL(activated() ),
64 sm, SLOT(map() ) ); 65 sm, SLOT(map() ) );
65 a->addTo( menu ); 66 a->addTo( menu );
66 67
67 a = new QAction( tr("Show Details All"), Resource::loadPixmap("zoom"), 68 a = new QAction( tr("Show Details All"), Resource::loadPixmap("zoom"),
68 QString::null, 0, this, 0 ); 69 QString::null, 0, this, 0 );
69 sm->setMapping(a, 4 ); 70 sm->setMapping(a, 4 );
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
@@ -56,98 +56,98 @@ class OProcessPrivate;
56 * 56 *
57 * @sect General usage and features 57 * @sect General usage and features
58 * 58 *
59 *This class allows a KDE and OPIE application to start child processes without having 59 *This class allows a KDE and OPIE application to start child processes without having
60 *to worry about UN*X signal handling issues and zombie process reaping. 60 *to worry about UN*X signal handling issues and zombie process reaping.
61 * 61 *
62 *@see KProcIO 62 *@see KProcIO
63 * 63 *
64 *Basically, this class distinguishes three different ways of running 64 *Basically, this class distinguishes three different ways of running
65 *child processes: 65 *child processes:
66 * 66 *
67 *@li OProcess::DontCare -- The child process is invoked and both the child 67 *@li OProcess::DontCare -- The child process is invoked and both the child
68 *process and the parent process continue concurrently. 68 *process and the parent process continue concurrently.
69 * 69 *
70 *Starting a DontCare child process means that the application is 70 *Starting a DontCare child process means that the application is
71 *not interested in any notification to determine whether the 71 *not interested in any notification to determine whether the
72 *child process has already exited or not. 72 *child process has already exited or not.
73 * 73 *
74 *@li OProcess::NotifyOnExit -- The child process is invoked and both the 74 *@li OProcess::NotifyOnExit -- The child process is invoked and both the
75 *child and the parent process run concurrently. 75 *child and the parent process run concurrently.
76 * 76 *
77 *When the child process exits, the OProcess instance 77 *When the child process exits, the OProcess instance
78 *corresponding to it emits the Qt signal @ref processExited(). 78 *corresponding to it emits the Qt signal @ref processExited().
79 * 79 *
80 *Since this signal is @em not emitted from within a UN*X 80 *Since this signal is @em not emitted from within a UN*X
81 *signal handler, arbitrary function calls can be made. 81 *signal handler, arbitrary function calls can be made.
82 * 82 *
83 *Be aware: When the OProcess objects gets destructed, the child 83 *Be aware: When the OProcess objects gets destructed, the child
84 *process will be killed if it is still running! 84 *process will be killed if it is still running!
85 *This means in particular, that you cannot use a OProcess on the stack 85 *This means in particular, that you cannot use a OProcess on the stack
86 *with OProcess::NotifyOnExit. 86 *with OProcess::NotifyOnExit.
87 * 87 *
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 *
122 *@li bool @ref writeStdin(char *buffer, int buflen); 122 *@li bool @ref writeStdin(char *buffer, int buflen);
123 *@li -- Transmit data to the child process's stdin. 123 *@li -- Transmit data to the child process's stdin.
124 * 124 *
125 *@li bool @ref closeStdin(); 125 *@li bool @ref closeStdin();
126 *@li -- Closes the child process's stdin (which causes it to see an feof(stdin)). 126 *@li -- Closes the child process's stdin (which causes it to see an feof(stdin)).
127 *Returns false if you try to close stdin for a process that has been started 127 *Returns false if you try to close stdin for a process that has been started
128 *without a communication channel to stdin. 128 *without a communication channel to stdin.
129 * 129 *
130 *@li bool @ref closeStdout(); 130 *@li bool @ref closeStdout();
131 *@li -- Closes the child process's stdout. 131 *@li -- Closes the child process's stdout.
132 *Returns false if you try to close stdout for a process that has been started 132 *Returns false if you try to close stdout for a process that has been started
133 *without a communication channel to stdout. 133 *without a communication channel to stdout.
134 * 134 *
135 *@li bool @ref closeStderr(); 135 *@li bool @ref closeStderr();
136 *@li -- Closes the child process's stderr. 136 *@li -- Closes the child process's stderr.
137 *Returns false if you try to close stderr for a process that has been started 137 *Returns false if you try to close stderr for a process that has been started
138 *without a communication channel to stderr. 138 *without a communication channel to stderr.
139 * 139 *
140 * 140 *
141 *@sect QT signals: 141 *@sect QT signals:
142 * 142 *
143 *@li void @ref receivedStdout(OProcess *proc, char *buffer, int buflen); 143 *@li void @ref receivedStdout(OProcess *proc, char *buffer, int buflen);
144 *@li void @ref receivedStderr(OProcess *proc, char *buffer, int buflen); 144 *@li void @ref receivedStderr(OProcess *proc, char *buffer, int buflen);
145 *@li -- Indicates that new data has arrived from either the 145 *@li -- Indicates that new data has arrived from either the
146 *child process's stdout or stderr. 146 *child process's stdout or stderr.
147 * 147 *
148 *@li void @ref wroteStdin(OProcess *proc); 148 *@li void @ref wroteStdin(OProcess *proc);
149 *@li -- Indicates that all data that has been sent to the child process 149 *@li -- Indicates that all data that has been sent to the child process
150 *by a prior call to @ref writeStdin() has actually been transmitted to the 150 *by a prior call to @ref writeStdin() has actually been transmitted to the
151 *client . 151 *client .
152 * 152 *
153 *@author Christian Czezakte e9025461@student.tuwien.ac.at 153 *@author Christian Czezakte e9025461@student.tuwien.ac.at
@@ -435,154 +435,154 @@ public:
435 * Changes the current working directory (CWD) of the process 435 * Changes the current working directory (CWD) of the process
436 * to be started. 436 * to be started.
437 * This function must be called before starting the process. 437 * This function must be called before starting the process.
438 */ 438 */
439 void setWorkingDirectory( const QString &dir ); 439 void setWorkingDirectory( const QString &dir );
440 440
441 /** 441 /**
442 * Specify whether to start the command via a shell or directly. 442 * Specify whether to start the command via a shell or directly.
443 * The default is to start the command directly. 443 * The default is to start the command directly.
444 * If @p useShell is true @p shell will be used as shell, or 444 * If @p useShell is true @p shell will be used as shell, or
445 * if shell is empty, the standard shell is used. 445 * if shell is empty, the standard shell is used.
446 * @p quote A flag indicating whether to quote the arguments. 446 * @p quote A flag indicating whether to quote the arguments.
447 * 447 *
448 * When using a shell, the caller should make sure that all filenames etc. 448 * When using a shell, the caller should make sure that all filenames etc.
449 * are properly quoted when passed as argument. 449 * are properly quoted when passed as argument.
450 * @see quote() 450 * @see quote()
451 */ 451 */
452 void setUseShell( bool useShell, const char *shell = 0 ); 452 void setUseShell( bool useShell, const char *shell = 0 );
453 453
454 /** 454 /**
455 * This function can be used to quote an argument string such that 455 * This function can be used to quote an argument string such that
456 * the shell processes it properly. This is e. g. necessary for 456 * the shell processes it properly. This is e. g. necessary for
457 * user-provided file names which may contain spaces or quotes. 457 * user-provided file names which may contain spaces or quotes.
458 * It also prevents expansion of wild cards and environment variables. 458 * It also prevents expansion of wild cards and environment variables.
459 */ 459 */
460 static QString quote( const QString &arg ); 460 static QString quote( const QString &arg );
461 461
462 /** 462 /**
463 * Detaches OProcess from child process. All communication is closed. 463 * Detaches OProcess from child process. All communication is closed.
464 * No exit notification is emitted any more for the child process. 464 * No exit notification is emitted any more for the child process.
465 * Deleting the OProcess will no longer kill the child process. 465 * Deleting the OProcess will no longer kill the child process.
466 * Note that the current process remains the parent process of the 466 * Note that the current process remains the parent process of the
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
476signals: 476signals:
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
542protected slots: 542protected 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
557 */ 557 */
558 558
559 /** 559 /**
560 * Called when another bulk of data can be sent to the child's 560 * Called when another bulk of data can be sent to the child's
561 * stdin. If there is no more data to be sent to stdin currently 561 * stdin. If there is no more data to be sent to stdin currently
562 * available, this function must disable the QSocketNotifier "innot". 562 * available, this function must disable the QSocketNotifier "innot".
563 */ 563 */
564 void slotSendData( int dummy ); 564 void slotSendData( int dummy );
565 565
566protected: 566protected:
567 567
568 /** 568 /**
569 * Sets up the environment according to the data passed via 569 * Sets up the environment according to the data passed via
570 * setEnvironment(...) 570 * setEnvironment(...)
571 */ 571 */
572 void setupEnvironment(); 572 void setupEnvironment();
573 573
574 /** 574 /**
575 * The list of the process' command line arguments. The first entry 575 * The list of the process' command line arguments. The first entry
576 * in this list is the executable itself. 576 * in this list is the executable itself.
577 */ 577 */
578 QValueList<QCString> arguments; 578 QValueList<QCString> arguments;
579 /** 579 /**
580 * How to run the process (Block, NotifyOnExit, DontCare). You should 580 * How to run the process (Block, NotifyOnExit, DontCare). You should
581 * not modify this data member directly from derived classes. 581 * not modify this data member directly from derived classes.
582 */ 582 */
583 RunMode run_mode; 583 RunMode run_mode;
584 /** 584 /**
585 * true if the process is currently running. You should not 585 * true if the process is currently running. You should not
586 * modify this data member directly from derived classes. For 586 * modify this data member directly from derived classes. For
587 * reading the value of this data member, please use "isRunning()" 587 * reading the value of this data member, please use "isRunning()"
588 * since "runs" will probably be made private in later versions 588 * since "runs" will probably be made private in later versions
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
@@ -653,69 +653,69 @@ class OPacketCapturer : public QObject
653 * @returns the next @ref OPacket from the packet capturer. 653 * @returns the next @ref OPacket from the packet capturer.
654 * @note If blocking mode is true then this call might block. 654 * @note If blocking mode is true then this call might block.
655 */ 655 */
656 OPacket* next(); 656 OPacket* next();
657 /** 657 /**
658 * @returns the next @ref OPacket from the packet capturer, if 658 * @returns the next @ref OPacket from the packet capturer, if
659 * one arrives within @a time milliseconds. 659 * one arrives within @a time milliseconds.
660 */ 660 */
661 OPacket* next( int time ); 661 OPacket* next( int time );
662 /** 662 /**
663 * Open the packet capturer to capture packets in live-mode from @a interface. 663 * Open the packet capturer to capture packets in live-mode from @a interface.
664 */ 664 */
665 bool open( const QString& interface ); 665 bool open( const QString& interface );
666 /** 666 /**
667 * Open the packet capturer to capture packets in offline-mode from @a file. 667 * Open the packet capturer to capture packets in offline-mode from @a file.
668 */ 668 */
669 bool open( const QFile& file ); 669 bool open( const QFile& file );
670 /** 670 /**
671 * Open a prerecorded tcpdump compatible capture file for use with @ref dump() 671 * Open a prerecorded tcpdump compatible capture file for use with @ref dump()
672 */ 672 */
673 bool openDumpFile( const QString& filename ); 673 bool openDumpFile( const QString& filename );
674 /** 674 /**
675 * @returns true if the packet capturer is open 675 * @returns true if the packet capturer is open
676 */ 676 */
677 bool isOpen() const; 677 bool isOpen() const;
678 /** 678 /**
679 * @returns the snapshot length of this packet capturer 679 * @returns the snapshot length of this packet capturer
680 */ 680 */
681 int snapShot() const; 681 int snapShot() const;
682 /** 682 /**
683 * @returns true if the input capture file has a different byte-order 683 * @returns true if the input capture file has a different byte-order
684 * than the byte-order of the running system. 684 * than the byte-order of the running system.
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}
718} 718}
719 719
720#endif // OPCAP_H 720#endif // OPCAP_H
721 721
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
@@ -189,76 +189,76 @@ public:
189 * Defaults to off. 189 * Defaults to off.
190 * @since 3.1 190 * @since 3.1
191 */ 191 */
192 void setKeyboardShortcutsExecute(bool enable); 192 void setKeyboardShortcutsExecute(bool enable);
193 193
194 /** 194 /**
195 * Obsolete method provided for backwards compatibility only. Use the 195 * Obsolete method provided for backwards compatibility only. Use the
196 * normal constructor and insertTitle instead. 196 * normal constructor and insertTitle instead.
197 */ 197 */
198 OPopupMenu(const QString &title, QWidget *parent=0, const char *name=0); 198 OPopupMenu(const QString &title, QWidget *parent=0, const char *name=0);
199 /** 199 /**
200 * Obsolete method provided for backwards compatibility only. Use 200 * Obsolete method provided for backwards compatibility only. Use
201 * insertTitle and changeTitle instead. 201 * insertTitle and changeTitle instead.
202 */ 202 */
203 void setTitle(const QString &title); 203 void setTitle(const QString &title);
204 204
205 /** 205 /**
206 * Returns the context menu associated with this menu 206 * Returns the context menu associated with this menu
207 * @since 3.2 207 * @since 3.2
208 */ 208 */
209 QPopupMenu* contextMenu(); 209 QPopupMenu* contextMenu();
210 210
211 /** 211 /**
212 * Hides the context menu if shown 212 * Hides the context menu if shown
213 * @since 3.2 213 * @since 3.2
214 */ 214 */
215 void cancelContextMenuShow(); 215 void cancelContextMenuShow();
216 216
217 /** 217 /**
218 * Returns the OPopupMenu associated with the current context menu 218 * Returns the OPopupMenu associated with the current context menu
219 * @since 3.2 219 * @since 3.2
220 */ 220 */
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
229signals: 229signals:
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
239protected: 239protected:
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
247protected slots: 247protected 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);
254 void ctxMenuHiding(); 254 void ctxMenuHiding();
255 255
256private: 256private:
257 class OPopupMenuPrivate; 257 class OPopupMenuPrivate;
258 OPopupMenuPrivate *d; 258 OPopupMenuPrivate *d;
259}; 259};
260 260
261} 261}
262} 262}
263 263
264#endif 264#endif
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
@@ -80,53 +80,50 @@ private:
80 80
81private slots: 81private slots:
82 void slotHour(bool b); 82 void slotHour(bool b);
83 void slotMinute(bool b); 83 void slotMinute(bool b);
84 84
85signals: 85signals:
86 /** 86 /**
87 * gets emitted when the time got changed by the user 87 * gets emitted when the time got changed by the user
88 */ 88 */
89 void timeChanged(const QTime &); 89 void timeChanged(const QTime &);
90}; 90};
91 91
92/** 92/**
93 * 93 *
94 * @short A small dialog to pick a time 94 * @short A small dialog to pick a time
95 * @version 1.0 95 * @version 1.0
96 * @author Stefan Eilers 96 * @author Stefan Eilers
97 * 97 *
98 **/ 98 **/
99 99
100class OTimePickerDialog: public OTimePickerDialogBase 100class OTimePickerDialog: public OTimePickerDialogBase
101{ 101{
102 Q_OBJECT 102 Q_OBJECT
103 103
104public: 104public:
105 OTimePickerDialog ( QWidget* parent = 0, const char* name = NULL, WFlags fl = 0 ); 105 OTimePickerDialog ( QWidget* parent = 0, const char* name = NULL, WFlags fl = 0 );
106 ~OTimePickerDialog() { }; 106 ~OTimePickerDialog() { };
107 107
108 QTime time()const; 108 QTime time()const;
109 109
110public slots: 110public slots:
111 void setTime( const QTime& time ); 111 void setTime( const QTime& time );
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
115private: 115private:
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
129typedef 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
@@ -102,298 +102,298 @@ class OVersatileView : public QWidgetStack
102 int _viewmode; 102 int _viewmode;
103 bool _synchronization; 103 bool _synchronization;
104 mutable int _warningpolicy; 104 mutable int _warningpolicy;
105 105
106 OListView* _listview; 106 OListView* _listview;
107 QIconView* _iconview; 107 QIconView* _iconview;
108 108
109 QPixmap _treeleaf; 109 QPixmap _treeleaf;
110 QPixmap _treeopened; 110 QPixmap _treeopened;
111 QPixmap _treeclosed; 111 QPixmap _treeclosed;
112 112
113 QPixmap _iconleaf; 113 QPixmap _iconleaf;
114 QPixmap _iconopened; 114 QPixmap _iconopened;
115 QPixmap _iconclosed; 115 QPixmap _iconclosed;
116 116
117 QPopupMenu* _contextmenu; 117 QPopupMenu* _contextmenu;
118 118
119 int _iconstyle; 119 int _iconstyle;
120 int _treestyle; 120 int _treestyle;
121 121
122 private slots: 122 private slots:
123 123
124 void contextMenuRequested( QListViewItem*, const QPoint&, int ); 124 void contextMenuRequested( QListViewItem*, const QPoint&, int );
125 void contextMenuRequested( QIconViewItem*, const QPoint& ); 125 void contextMenuRequested( QIconViewItem*, const QPoint& );
126 126
127 // type converting signal forwarders 127 // type converting signal forwarders
128 128
129 void selectionChanged( QListViewItem * ); 129 void selectionChanged( QListViewItem * );
130 void currentChanged( QListViewItem * ); 130 void currentChanged( QListViewItem * );
131 void clicked( QListViewItem * ); 131 void clicked( QListViewItem * );
132 void pressed( QListViewItem * ); 132 void pressed( QListViewItem * );
133 void doubleClicked( QListViewItem * ); 133 void doubleClicked( QListViewItem * );
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
163public: 163public:
164 164
165 /* 165 /*
166 enum Arrangement { // QIconView 166 enum Arrangement { // QIconView
167 LeftToRight = 0, 167 LeftToRight = 0,
168 TopToBottom 168 TopToBottom
169 }; 169 };
170 enum ResizeMode { // QIconView 170 enum ResizeMode { // QIconView
171 Fixed = 0, 171 Fixed = 0,
172 Adjust 172 Adjust
173 }; 173 };
174 enum ItemTextPos { // QIconView 174 enum ItemTextPos { // QIconView
175 Bottom = 0, 175 Bottom = 0,
176 Right 176 Right
177 }; 177 };
178 */ 178 */
179 179
180 // 180 //
181 // only in QListView 181 // only in QListView
182 // 182 //
183 183
184 int treeStepSize() const; // QListView 184 int treeStepSize() const; // QListView
185 virtual void setTreeStepSize( int ); // QListView 185 virtual void setTreeStepSize( int ); // QListView
186 186
187 QHeader * header() const; // QListView 187 QHeader * header() const; // QListView
188 188
189 virtual int addColumn( const QString &label, int size = -1); // QListView 189 virtual int addColumn( const QString &label, int size = -1); // QListView
190 virtual int addColumn( const QIconSet& iconset, const QString &label, int size = -1); // QListView 190 virtual int addColumn( const QIconSet& iconset, const QString &label, int size = -1); // QListView
191 void removeColumn( int index ); // #### make virtual in next major release! // QListView 191 void removeColumn( int index ); // #### make virtual in next major release! // QListView
192 virtual void setColumnText( int column, const QString &label ); // QListView 192 virtual void setColumnText( int column, const QString &label ); // QListView
193 virtual void setColumnText( int column, const QIconSet& iconset, const QString &label ); // QListView 193 virtual void setColumnText( int column, const QIconSet& iconset, const QString &label ); // QListView
194 QString columnText( int column ) const; // QListView 194 QString columnText( int column ) const; // QListView
195 virtual void setColumnWidth( int column, int width ); // QListView 195 virtual void setColumnWidth( int column, int width ); // QListView
196 int columnWidth( int column ) const; // QListView 196 int columnWidth( int column ) const; // QListView
197 enum WidthMode { Manual, Maximum }; // QListView 197 enum WidthMode { Manual, Maximum }; // QListView
198 virtual void setColumnWidthMode( int column, WidthMode ); // QListView 198 virtual void setColumnWidthMode( int column, WidthMode ); // QListView
199 WidthMode columnWidthMode( int column ) const; // QListView 199 WidthMode columnWidthMode( int column ) const; // QListView
200 int columns() const; // QListView 200 int columns() const; // QListView
201 201
202 virtual void setColumnAlignment( int, int ); // QListView 202 virtual void setColumnAlignment( int, int ); // QListView
203 int columnAlignment( int ) const; // QListView 203 int columnAlignment( int ) const; // QListView
204 204
205 OVersatileViewItem * itemAt( const QPoint & screenPos ) const; // QListView 205 OVersatileViewItem * itemAt( const QPoint & screenPos ) const; // QListView
206 QRect itemRect( const OVersatileViewItem * ) const; // QListView 206 QRect itemRect( const OVersatileViewItem * ) const; // QListView
207 int itemPos( const OVersatileViewItem * ); // QListView 207 int itemPos( const OVersatileViewItem * ); // QListView
208 208
209 bool isSelected( const OVersatileViewItem * ) const; // QListView // also in QIconViewItem but not in QIconView *shrug* 209 bool isSelected( const OVersatileViewItem * ) const; // QListView // also in QIconViewItem but not in QIconView *shrug*
210 210
211 virtual void setMultiSelection( bool enable ); // QListView 211 virtual void setMultiSelection( bool enable ); // QListView
212 bool isMultiSelection() const; // QListView 212 bool isMultiSelection() const; // QListView
213 213
214 OVersatileViewItem * selectedItem() const; // QListView 214 OVersatileViewItem * selectedItem() const; // QListView
215 virtual void setOpen( OVersatileViewItem *, bool ); // QListView 215 virtual void setOpen( OVersatileViewItem *, bool ); // QListView
216 bool isOpen( const OVersatileViewItem * ) const; // QListView 216 bool isOpen( const OVersatileViewItem * ) const; // QListView
217 217
218 OVersatileViewItem * firstChild() const; // QListView 218 OVersatileViewItem * firstChild() const; // QListView
219 int childCount() const; // QListView 219 int childCount() const; // QListView
220 220
221 virtual void setAllColumnsShowFocus( bool ); // QListView 221 virtual void setAllColumnsShowFocus( bool ); // QListView
222 bool allColumnsShowFocus() const; // QListView 222 bool allColumnsShowFocus() const; // QListView
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
257 257
258 virtual void setGridX( int rx ); // QIconView 258 virtual void setGridX( int rx ); // QIconView
259 virtual void setGridY( int ry ); // QIconView 259 virtual void setGridY( int ry ); // QIconView
260 int gridX() const; // QIconView 260 int gridX() const; // QIconView
261 int gridY() const; // QIconView 261 int gridY() const; // QIconView
262 virtual void setSpacing( int sp ); // QIconView 262 virtual void setSpacing( int sp ); // QIconView
263 int spacing() const; // QIconView 263 int spacing() const; // QIconView
264 virtual void setItemTextPos( QIconView::ItemTextPos pos ); // QIconView 264 virtual void setItemTextPos( QIconView::ItemTextPos pos ); // QIconView
265 QIconView::ItemTextPos itemTextPos() const; // QIconView 265 QIconView::ItemTextPos itemTextPos() const; // QIconView
266 virtual void setItemTextBackground( const QBrush &b ); // QIconView 266 virtual void setItemTextBackground( const QBrush &b ); // QIconView
267 QBrush itemTextBackground() const; // QIconView 267 QBrush itemTextBackground() const; // QIconView
268 virtual void setArrangement( QIconView::Arrangement am ); // QIconView 268 virtual void setArrangement( QIconView::Arrangement am ); // QIconView
269 QIconView::Arrangement arrangement() const; // QIconView 269 QIconView::Arrangement arrangement() const; // QIconView
270 virtual void setResizeMode( QIconView::ResizeMode am ); // QIconView 270 virtual void setResizeMode( QIconView::ResizeMode am ); // QIconView
271 QIconView::ResizeMode resizeMode() const; // QIconView 271 QIconView::ResizeMode resizeMode() const; // QIconView
272 virtual void setMaxItemWidth( int w ); // QIconView 272 virtual void setMaxItemWidth( int w ); // QIconView
273 int maxItemWidth() const; // QIconView 273 int maxItemWidth() const; // QIconView
274 virtual void setMaxItemTextLength( int w ); // QIconView 274 virtual void setMaxItemTextLength( int w ); // QIconView
275 int maxItemTextLength() const; // QIconView 275 int maxItemTextLength() const; // QIconView
276 virtual void setAutoArrange( bool b ); // QIconView 276 virtual void setAutoArrange( bool b ); // QIconView
277 bool autoArrange() const; // QIconView 277 bool autoArrange() const; // QIconView
278 virtual void setShowToolTips( bool b ); // QIconView 278 virtual void setShowToolTips( bool b ); // QIconView
279 bool showToolTips() const; // QIconView 279 bool showToolTips() const; // QIconView
280 280
281 bool sorting() const; // QIconView 281 bool sorting() const; // QIconView
282 bool sortDirection() const; // QIconView 282 bool sortDirection() const; // QIconView
283 283
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 & );
318 virtual void setPalette( const QPalette & ); 318 virtual void setPalette( const QPalette & );
319 319
320 virtual void takeItem( OVersatileViewItem * ); 320 virtual void takeItem( OVersatileViewItem * );
321 321
322 void setSelectionMode( SelectionMode mode ); 322 void setSelectionMode( SelectionMode mode );
323 SelectionMode selectionMode() const; 323 SelectionMode selectionMode() const;
324 324
325 virtual void selectAll( bool select ); 325 virtual void selectAll( bool select );
326 virtual void clearSelection(); 326 virtual void clearSelection();
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