You are not logged in.

#1 2017-03-29 20:45

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

kdialog --slider "unknown option"??

I am playing with some scripts and wanted a slider for user to select number between 1 and 100. I thought this would be quite simple as I recall using this feature before.

I checked the man page and could find no mention of slider...

I googled and found some examples but I just get "unknown option" when I try any of them...

Has this option been removed from kdialog?

I checked in a VM on debian stable KDE and it works ok there. I don't have a testing VM with KDE so couldn't test that (I'm using Scorpion so probably should try for a comparison).

Any ideas?

I also just tried with Orion (in VM) and it's an unknown option there too...

Offline

#2 2017-03-30 02:39

JimW
Member
Registered: 2015-12-08
Posts: 400

Re: kdialog --slider "unknown option"??

Hey Dia, I hit that same wall. Examples on the net said kdialog --slider.... but Q4OS said "unknown option". I finally did a kdialog --help and slider was not listed in the options. So I decided it was not included in our flavor of kdialog! smile
It would be nice to have it.

On another note - ffmpeg -vol --- what is the max for that? Or does it vary by system?

Offline

#3 2017-03-30 07:14

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,230
Website

Re: kdialog --slider "unknown option"??

We can confirm, '--slider' option is not available in TDE 14.0.4/5, unfortunately. Nonetheless, you might find 'kommander-trinity' package useful as a 'kdialog' replacement.

EDIT:
Kommander package description: Visual dialog builder and executor tool

Kommander is a visual dialog building tool whose primary objective is
to create as much functionality as possible without using any scripting
language.
.
More specifically, Kommander is a set of tools that allow you to create
dynamic GUI dialogs that generate, based on their state, a piece of
text. The piece of text can be a command line to a program, any piece
of code, business documents that contain a lot of repetitious or
templated text and so on.
.
The resulting generated text can then be executed as a command line
program (hence the name "Kommander"), written to a file, passed to a
script for extended processing, and literally anything else you can
think of. And you aren't required to write a single line of code!
.
As well as building dialogs, Kommander may be expanded to create full
mainwindow applications.

Offline

#4 2017-03-30 09:00

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: kdialog --slider "unknown option"??

Thanks Team, I will have a look at Kommander, although it might be just as easy (for me) to create a simple pyqt4 dialog and use that for a slider. It does seem strange that kdialog is missing this though... Maybe it is worth putting an enhancement request to TDE guys for this.

JimW wrote:

On another note - ffmpeg -vol --- what is the max for that? Or does it vary by system?

The information I have seen is for -volume although I imagine it would be the same and I have found a few references that use

-af volume=-3dB

or

-af 'volume=0.5'

I would have imagined that it would have been 0 - 100 (as in percent) but if a dB value can be entered then I'm not so sure... I would try a few tests using different values (use a small audio file) and see what the results are, it may turn out that it will accept different values depending on how the value is defined. Although I could not find anything in the man page or on-line documentation for this (directly). But I did not search extensively, just a quick google. smile

EDIT:
@JimW
This page says you can use 0.0 to 1.0 for 0 to 100% volume and 1.5 for 150% volume so maybe there is no upper limit (but I imagine there is).

Last edited by Dai_trying (2017-03-30 09:34)

Offline

#5 2017-03-30 22:35

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: kdialog --slider "unknown option"??

This is a bit of a strange issue, I checked in Debian KDE and the version of kdialog is reported as 1.0 the exact same version reported in Trinity!! and checking the help page for each one shows these options missing from TDE version

  --yes-label <text>        Use text as Yes button label
  --no-label <text>         Use text as No button label
  --cancel-label <text>     Use text as Cancel button label
  --continue-label <text>   Use text as Continue button label
  --detailedsorry <text> <details> 'Sorry' message box with expandable Details field
  --detailederror <text> <details> 'Error' message box with expandable Details field
  --getcolor                Colour dialog to select a colour
  --slider <text> [minvalue] [maxvalue] [step] Slider dialog box, returns selected value
  --calendar <text>         Calendar dialog box, returns selected date

So it looks like nobody is reporting the correct kdialog version so how can we tell which version we are using? sad

Offline

#6 2017-03-31 01:33

JimW
Member
Registered: 2015-12-08
Posts: 400

Re: kdialog --slider "unknown option"??

Now that you mention it I have tried to use the calendar option and found it did not work. Again, it would be nice to see all of those available since you never know when you may want to use one of them.

On ffmpeg - I have been using the -vol <value> option but the -af volume seems to permit more control - thanks for pointing it out!

Offline

#7 2017-03-31 07:00

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,230
Website

Re: kdialog --slider "unknown option"??

Dai_trying wrote:

This is a bit of a strange issue, I checked in Debian KDE and the version of kdialog is reported as 1.0 the exact same version reported in Trinity!!
...
So it looks like nobody is reporting the correct kdialog version so how can we tell which version we are using? sad

Yes, we agree. The most correct way would be probably to rename TDE version of 'kdialog' to clarify it's something another, then KDE version. It's obviously task for TDE devs. For now, you could determine the version by path, '/opt/trinity/bin/kdialog' for TDE and '/usr/bin/kdialog' for KDE.

Offline

#8 2017-03-31 17:34

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: kdialog --slider "unknown option"??

q4osteam wrote:

For now, you could determine the version by path, '/opt/trinity/bin/kdialog' for TDE and '/usr/bin/kdialog' for KDE.

At the risk of sounding a bit dumb, how can I determine version by path?

Offline

#9 2017-03-31 17:55

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,230
Website

Re: kdialog --slider "unknown option"??

Dai_trying wrote:

At the risk of sounding a bit dumb, how can I determine version by path?

We have expressed ourselves in a bad way. Of course, it's not possible determine version by path.

The question was:

Dai_trying wrote:

So it looks like nobody is reporting the correct kdialog version so how can we tell which version we are using?

We didn't understand well here, what would you need to know and for what purpose ?

Last edited by q4osteam (2017-03-31 18:10)

Offline

#10 2017-03-31 18:04

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: kdialog --slider "unknown option"??

It was only to see what version each desktop used to try and determine how much change there was between to two code bases. It's really not important, I was going to look through a load of code to see if I could fudge something together, but TBH I don't think it is worth the trouble.
I looked a little at kommander but can find very little by way of helpful documentation, so I am going to code a simple python dialog to use, thanks for your time on this but I don't think it is worth more investigation. smile

Offline

#11 2017-03-31 20:01

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: kdialog --slider "unknown option"??

I have created a simple slider dialog using python and pyqt4, I will share it in case it is useful to anyone else.

To use the script place it in your path and make it executable you can simply run the script and it will show a dialog where you can enter a number between 1 and 100, when you click OK it will output that number to stdout, in a script I would use it like this:-

result=$(py_slider -title "Please enter a value")

and you will have the value in the "result" variable to use in your script. If you do not provide a title it will default to "Slider Dialog".
Hope this might help some of you.

Dai


Attachments:
py_slider, Size: 1.77 KiB, Downloads: 779

Offline

#12 2017-04-03 15:39

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: kdialog --slider "unknown option"??

I have added a little more functionality to this script so the user (script writer) can add the minimum/maximum/step values along with the title, you can also use the -h/--help and -v (version) options.


Attachments:
py_slider, Size: 3.01 KiB, Downloads: 794

Offline

Board footer

Powered by FluxBB