summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/inputDialog.cpp
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/inputDialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/inputDialog.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/inputDialog.cpp b/core/multimedia/opieplayer/inputDialog.cpp
index 38b8f53..44a1cdd 100644
--- a/core/multimedia/opieplayer/inputDialog.cpp
+++ b/core/multimedia/opieplayer/inputDialog.cpp
@@ -1,57 +1,58 @@
1#include "inputDialog.h" 1#include "inputDialog.h"
2 2
3#include <qpe/resource.h> 3#include <qpe/resource.h>
4 4
5#include <opie/ofiledialog.h> 5#include <opie2/ofiledialog.h>
6 6
7#include <qlineedit.h> 7#include <qlineedit.h>
8#include <qpushbutton.h> 8#include <qpushbutton.h>
9 9
10using namespace Opie::Ui;
10InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) 11InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
11 : QDialog( parent, name, modal, fl ) { 12 : QDialog( parent, name, modal, fl ) {
12 if ( !name ) { 13 if ( !name ) {
13 setName( "InputDialog" ); 14 setName( "InputDialog" );
14 } 15 }
15 resize( 234, 115); 16 resize( 234, 115);
16 setMaximumSize( QSize( 240, 40)); 17 setMaximumSize( QSize( 240, 40));
17 setCaption( tr( name ) ); 18 setCaption( tr( name ) );
18 19
19 QPushButton *browserButton; 20 QPushButton *browserButton;
20 browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton"); 21 browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton");
21 browserButton->setGeometry( QRect( 205, 10, 22, 22)); 22 browserButton->setGeometry( QRect( 205, 10, 22, 22));
22 connect( browserButton, SIGNAL(released()),this,SLOT(browse())); 23 connect( browserButton, SIGNAL(released()),this,SLOT(browse()));
23 LineEdit1 = new QLineEdit( this, "LineEdit1" ); 24 LineEdit1 = new QLineEdit( this, "LineEdit1" );
24 LineEdit1->setGeometry( QRect( 4, 10, 190, 22 ) ); 25 LineEdit1->setGeometry( QRect( 4, 10, 190, 22 ) );
25 LineEdit1->setFocus(); 26 LineEdit1->setFocus();
26} 27}
27/* 28/*
28 * return the current text(input) 29 * return the current text(input)
29 */ 30 */
30QString InputDialog::text() const { 31QString InputDialog::text() const {
31 return LineEdit1->text(); 32 return LineEdit1->text();
32} 33}
33/* 34/*
34 * Destroys the object and frees any allocated resources 35 * Destroys the object and frees any allocated resources
35 */ 36 */
36InputDialog::~InputDialog() { 37InputDialog::~InputDialog() {
37} 38}
38 39
39void InputDialog::browse() { 40void InputDialog::browse() {
40 41
41 MimeTypes types; 42 MimeTypes types;
42 QStringList audio, video, all; 43 QStringList audio, video, all;
43 audio << "audio/*"; 44 audio << "audio/*";
44 audio << "playlist/plain"; 45 audio << "playlist/plain";
45 audio << "audio/x-mpegurl"; 46 audio << "audio/x-mpegurl";
46 47
47 video << "video/*"; 48 video << "video/*";
48 video << "playlist/plain"; 49 video << "playlist/plain";
49 50
50 all += audio; 51 all += audio;
51 all += video; 52 all += video;
52 types.insert("All Media Files", all ); 53 types.insert("All Media Files", all );
53 types.insert("Audio", audio ); 54 types.insert("Audio", audio );
54 types.insert("Video", video ); 55 types.insert("Video", video );
55 56
56 QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 ); 57 QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 );
57 LineEdit1->setText(str); 58 LineEdit1->setText(str);