[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Getting a string from the user in a KIOSlave
From: Shaun Jackman <sjackman () home ! com>
Date: 2001-11-16 15:42:52
[Download RAW message or body]
This seems to defeat the modularity of a KIO::Slave. If reading this
information from the user is necessary to the transfer process, then every
application that uses the KIO::Slave would have to duplicate the same code
InputDialog code. I'll describe my application and perhaps you can give me a
better solution.
I'm writing a KIO::Slave for the Nomad Jukebox (an mp3 player with a 6 gig
HD). The NJB uses a system of Album/Artist/Title to organize the
pseudo-directory structure. So, this information is required for a copy to
the device. I extract the information from ID3 tags if possible, but if the
tags aren't present the operation fails. I could return a COULD_NOT_READ and
leave it up to the user to fill the ID3 information in, but it seems to me it
would be much more useful if I could pop up a simple dialog box with three
text inputs. Particularly since this information is usually readily available
from the filename and the user simply has to select the proper text from
filename label and paste it into the proper field in the dialog box. One way
may be the "clean" way, but it's about as useful as dirt. Any ideas?
Thanks,
Shaun
On Fri November 16, 2001 02h17, David Faure wrote:
> On Friday 16 November 2001 06:08, Shaun Jackman wrote:
> > I need to get a one line string from the user in a KIOSlave I'm writing.
> > I tried to use a QInputDialog::getText but got the error
> > QPaintDevice: Must construct a QApplication before a QPaintDevice
> > What's the proper way to do this?
>
> Not doing it. Let the app do the user interaction, the slave isn't supposed
> to do so. The slave can use SlaveBase::messageBox() to let the application
> (in fact kio_uiserver) pop up a message box, but unfortunately this doesn't
> include message boxes with a line edit. Of course if this is for a password
> you can use SlaveBase::openPassDlg.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic