author | llornkcor <llornkcor> | 2002-11-03 21:45:32 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-03 21:45:32 (UTC) |
commit | bf62b8f48d08f5a5e92681e1487a5f43d5c7a231 (patch) (unidiff) | |
tree | f2a02844f411d874e9afd703c18b6ebd70d97172 /core/multimedia/opieplayer/inputDialog.cpp | |
parent | 5ba841a12e67b326833751ea502cf054e423114d (diff) | |
download | opie-bf62b8f48d08f5a5e92681e1487a5f43d5c7a231.zip opie-bf62b8f48d08f5a5e92681e1487a5f43d5c7a231.tar.gz opie-bf62b8f48d08f5a5e92681e1487a5f43d5c7a231.tar.bz2 |
m3u stuff and op2 skins
Diffstat (limited to 'core/multimedia/opieplayer/inputDialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/inputDialog.cpp | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/core/multimedia/opieplayer/inputDialog.cpp b/core/multimedia/opieplayer/inputDialog.cpp index da8e276..62240b2 100644 --- a/core/multimedia/opieplayer/inputDialog.cpp +++ b/core/multimedia/opieplayer/inputDialog.cpp | |||
@@ -1,67 +1,62 @@ | |||
1 | /**************************************************************************** | ||
2 | ** Form implementation generated from reading ui file 'inputDialog.ui' | ||
3 | ** | ||
4 | ** Created: Sat Mar 2 07:55:03 2002 | ||
5 | ** by: The User Interface Compiler (uic) | ||
6 | ** | ||
7 | ** WARNING! All changes made in this file will be lost! | ||
8 | ****************************************************************************/ | ||
9 | #include "inputDialog.h" | 1 | #include "inputDialog.h" |
10 | 2 | ||
11 | #include <qpe/resource.h> | 3 | #include <qpe/resource.h> |
12 | 4 | ||
13 | #include <opie/ofiledialog.h> | 5 | #include <opie/ofiledialog.h> |
14 | 6 | ||
15 | #include <qlineedit.h> | 7 | #include <qlineedit.h> |
16 | #include <qlayout.h> | 8 | #include <qlayout.h> |
17 | #include <qvariant.h> | 9 | #include <qvariant.h> |
18 | #include <qpushbutton.h> | 10 | #include <qpushbutton.h> |
19 | #include <qwhatsthis.h> | 11 | #include <qwhatsthis.h> |
20 | 12 | ||
21 | InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) | 13 | InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) |
22 | : QDialog( parent, name, modal, fl ) | 14 | : QDialog( parent, name, modal, fl ) { |
23 | { | 15 | if ( !name ) { |
24 | if ( !name ) | 16 | setName( "InputDialog" ); |
25 | setName( "InputDialog" ); | 17 | } |
26 | resize( 234, 115); | 18 | resize( 234, 115); |
27 | setMaximumSize( QSize( 240, 40)); | 19 | setMaximumSize( QSize( 240, 40)); |
28 | setCaption( tr(name ) ); | 20 | setCaption( tr( name ) ); |
29 | 21 | ||
30 | QPushButton *browserButton; | 22 | QPushButton *browserButton; |
31 | browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton"); | 23 | browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton"); |
32 | browserButton->setGeometry( QRect( 205, 10, 22, 22)); | 24 | browserButton->setGeometry( QRect( 205, 10, 22, 22)); |
33 | connect( browserButton, SIGNAL(released()),this,SLOT(browse())); | 25 | connect( browserButton, SIGNAL(released()),this,SLOT(browse())); |
34 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); | 26 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); |
35 | LineEdit1->setGeometry( QRect( 4, 10, 190, 22 ) ); | 27 | LineEdit1->setGeometry( QRect( 4, 10, 190, 22 ) ); |
28 | LineEdit1->setFocus(); | ||
29 | } | ||
30 | /* | ||
31 | * return the current text(input) | ||
32 | */ | ||
33 | QString InputDialog::text() const { | ||
34 | return LineEdit1->text(); | ||
36 | } | 35 | } |
37 | |||
38 | /* | 36 | /* |
39 | * Destroys the object and frees any allocated resources | 37 | * Destroys the object and frees any allocated resources |
40 | */ | 38 | */ |
41 | InputDialog::~InputDialog() | 39 | InputDialog::~InputDialog() { |
42 | { | ||
43 | inputText= LineEdit1->text(); | ||
44 | |||
45 | } | 40 | } |
46 | 41 | ||
47 | void InputDialog::browse() { | 42 | void InputDialog::browse() { |
48 | 43 | ||
49 | MimeTypes types; | 44 | MimeTypes types; |
50 | QStringList audio, video, all; | 45 | QStringList audio, video, all; |
51 | audio << "audio/*"; | 46 | audio << "audio/*"; |
52 | audio << "playlist/plain"; | 47 | audio << "playlist/plain"; |
53 | audio << "audio/x-mpegurl"; | 48 | audio << "audio/x-mpegurl"; |
54 | 49 | ||
55 | video << "video/*"; | 50 | video << "video/*"; |
56 | video << "playlist/plain"; | 51 | video << "playlist/plain"; |
57 | 52 | ||
58 | all += audio; | 53 | all += audio; |
59 | all += video; | 54 | all += video; |
60 | types.insert("All Media Files", all ); | 55 | types.insert("All Media Files", all ); |
61 | types.insert("Audio", audio ); | 56 | types.insert("Audio", audio ); |
62 | types.insert("Video", video ); | 57 | types.insert("Video", video ); |
63 | 58 | ||
64 | QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 ); | 59 | QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 ); |
65 | LineEdit1->setText(str); | 60 | LineEdit1->setText(str); |
66 | } | 61 | } |
67 | 62 | ||