summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/inputDialog.cpp
Side-by-side diff
Diffstat (limited to 'core/multimedia/opieplayer/inputDialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/inputDialog.cpp27
1 files changed, 11 insertions, 16 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 @@
-/****************************************************************************
-** Form implementation generated from reading ui file 'inputDialog.ui'
-**
-** Created: Sat Mar 2 07:55:03 2002
-** by: The User Interface Compiler (uic)
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
#include "inputDialog.h"
#include <qpe/resource.h>
#include <opie/ofiledialog.h>
#include <qlineedit.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qpushbutton.h>
#include <qwhatsthis.h>
InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
- : QDialog( parent, name, modal, fl )
-{
- if ( !name )
+ : QDialog( parent, name, modal, fl ) {
+ if ( !name ) {
setName( "InputDialog" );
+ }
resize( 234, 115);
setMaximumSize( QSize( 240, 40));
setCaption( tr(name ) );
QPushButton *browserButton;
browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton");
browserButton->setGeometry( QRect( 205, 10, 22, 22));
connect( browserButton, SIGNAL(released()),this,SLOT(browse()));
LineEdit1 = new QLineEdit( this, "LineEdit1" );
LineEdit1->setGeometry( QRect( 4, 10, 190, 22 ) );
+ LineEdit1->setFocus();
+}
+/*
+ * return the current text(input)
+ */
+QString InputDialog::text() const {
+ return LineEdit1->text();
}
-
/*
* Destroys the object and frees any allocated resources
*/
-InputDialog::~InputDialog()
-{
- inputText= LineEdit1->text();
-
+InputDialog::~InputDialog() {
}
void InputDialog::browse() {
MimeTypes types;
QStringList audio, video, all;
audio << "audio/*";
audio << "playlist/plain";
audio << "audio/x-mpegurl";
video << "video/*";
video << "playlist/plain";
all += audio;
all += video;
types.insert("All Media Files", all );
types.insert("Audio", audio );
types.insert("Video", video );
QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 );
LineEdit1->setText(str);
}