author | mickeyl <mickeyl> | 2004-01-13 19:51:42 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-01-13 19:51:42 (UTC) |
commit | e117e8427cd8bcd0ab1a74abdc5cd4ab12654194 (patch) (unidiff) | |
tree | f013f4f92cceefd20fb519f7e9a4d23f00fadac5 /libopie2/examples | |
parent | 81b48fa5be4806e3afa64a0d1fa254fbdf9b7315 (diff) | |
download | opie-e117e8427cd8bcd0ab1a74abdc5cd4ab12654194.zip opie-e117e8427cd8bcd0ab1a74abdc5cd4ab12654194.tar.gz opie-e117e8427cd8bcd0ab1a74abdc5cd4ab12654194.tar.bz2 |
- add the static method int OProcess::processPID(const QString&)
- add an example program for dealing with OProcess. This should be enhanced...
4 files changed, 30 insertions, 1 deletions
diff --git a/libopie2/examples/opiecore/opiecore.pro b/libopie2/examples/opiecore/opiecore.pro index 8f3aedc..ec14be0 100644 --- a/libopie2/examples/opiecore/opiecore.pro +++ b/libopie2/examples/opiecore/opiecore.pro | |||
@@ -1,3 +1,3 @@ | |||
1 | TEMPLATE = subdirs | 1 | TEMPLATE = subdirs |
2 | unix:SUBDIRS = odebugdemo oconfigdemo oglobalsettingsdemo | 2 | unix:SUBDIRS = odebugdemo oconfigdemo oglobalsettingsdemo oprocessdemo |
3 | 3 | ||
diff --git a/libopie2/examples/opiecore/oprocessdemo/.cvsignore b/libopie2/examples/opiecore/oprocessdemo/.cvsignore new file mode 100644 index 0000000..8f7300c --- a/dev/null +++ b/libopie2/examples/opiecore/oprocessdemo/.cvsignore | |||
@@ -0,0 +1,6 @@ | |||
1 | Makefile* | ||
2 | moc* | ||
3 | *moc | ||
4 | *.o | ||
5 | ~* | ||
6 | |||
diff --git a/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp b/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp new file mode 100644 index 0000000..0abf53e --- a/dev/null +++ b/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp | |||
@@ -0,0 +1,11 @@ | |||
1 | #include <opie2/oprocess.h> | ||
2 | #include <iostream.h> | ||
3 | |||
4 | int main( int argc, char** argv ) | ||
5 | { | ||
6 | printf( "my own PID seems to be '%d'\n", OProcess::processPID( "oprocessdemo" ) ); | ||
7 | printf( "the PID of process 'Mickey' seems to be '%d'\n\n", OProcess::processPID( "Mickey" ) ); | ||
8 | |||
9 | return 0; | ||
10 | } | ||
11 | |||
diff --git a/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.pro b/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.pro new file mode 100644 index 0000000..72dac7f --- a/dev/null +++ b/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.pro | |||
@@ -0,0 +1,12 @@ | |||
1 | TEMPLATE = app | ||
2 | CONFIG = qt warn_on debug | ||
3 | HEADERS = | ||
4 | SOURCES = oprocessdemo.cpp | ||
5 | INCLUDEPATH += $(OPIEDIR)/include | ||
6 | DEPENDPATH += $(OPIEDIR)/include | ||
7 | LIBS += -lopiecore2 | ||
8 | TARGET = oprocessdemo | ||
9 | |||
10 | include ( $(OPIEDIR)/include.pro ) | ||
11 | |||
12 | |||