UI::Di...Dialog(3pm)

πŸ“¦
version 1.21 Β· 3 versions
, in ubuntu jammy, ubuntu noble

✨ UI::Dialog::Backend::KDialog ✨

okay bestie, so this is the UI::Dialog::Backend::KDialog page from the User Contributed Perl Documentation β€” it's the backend for the KDE dialog variant πŸ’–


🌸 NAME 🌸

UI::Dialog::Backend::KDialog β€” backend for the KDE dialog variant. that's the whole vibe, fr fr 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

use UI::Dialog::Backend::KDialog;
my $d = new UI::Dialog::Backend::KDialog ( backtitle => 'Demo',
                                           title => 'Default' );

$d->msgbox( title => 'Welcome!', text => 'Welcome one and all!' );

πŸŽ€ ABSTRACT πŸŽ€

UI::Dialog::Backend::KDialog is the UI::Dialog backend for the KDE dialog variant. so like, when you're using this module through UI::Dialog or any other loader module, only the compatible methods are ever accessible β€” that's the deal, periodt.

but !! when you use this module directly in your application (like in the SYNOPSIS example up there πŸ’…), you get access to all the options and features of the real kdialog(1) application. main character energy, honestly πŸ‘‘


πŸ’œ DESCRIPTION πŸ’œ

so this dialog variant doesn't have any progress meters, bestie β€” that's a real thing, no cap. but what it does have? the benefits of many different file/uri/directory widgets ✨ and honestly, it's a shame that this is the only dialog variant for KDE 😭 like, where's the rest of them??


πŸ“ EXPORT πŸ“

None

literally none. nothing. it exports nothing, and that's on purpose πŸ™ˆ


🌈 INHERITS 🌈

UI::Dialog::Backend

it inherits from UI::Dialog::Backend, iykyk πŸ’–


πŸ‘‘ CONSTRUCTOR πŸ‘‘

new( @options )

EXAMPLE

my $d = new( title => 'Default Title', backtitle => 'Backtitle',
             width => 65, height => 20, listheight => 5 );

DESCRIPTION

this is the Class Constructor method πŸ’… it accepts a list of key => value pairs, and then uses them as the defaults whenever you're interacting with the various widgets. slay.

RETURNS

a blessed object reference of the UI::Dialog::Backend::KDialog class ✨ iconic.

OPTIONS

the (...)'s after each option show you the default for that option, bestie. and an * means it's supported by all the widget methods on a per-use policy β€” defaulting to the values decided during object creation. so set it once at construction and let it ride πŸ¦‹

  • debug = 0,1,2 (0)
  • literal = 0,1 (0)
  • backtitle = "backtitle" ('') *
  • title = "title" ('') *
  • nocancel = 0,1 (0) *
  • defaultno = 0,1 (0) *
  • beepbefore = 0,1 (0) *
  • beepafter = 0,1 (0) *
  • extrabutton = 0,1 (0) *
  • extralabel = "extra label" (0) *
  • helpbutton = 0,1 (0) *
  • helplabel = "help label" (0) *
  • maxinput = \d+ (0) *

🧚 WIDGET METHODS 🧚

yesno( ) yesnocancel( ) warningyesno( ) warningyesnocancel( )

EXAMPLE

# if ($d->warningyesnocancel( text => 'A question?') ) {
# if ($d->warningyesno( text => 'A question?') ) {
# if ($d->yesnocancel( text => 'A question?') ) {
if ($d->yesno( text => 'A binary type question?') ) {
    # user pressed yes
} else {
    # user pressed no or cancel
}

DESCRIPTION

you're presenting the end user with a message box that has two buttons: yes and no 🫢 that's it, that's the widget.

RETURNS

TRUE (1) for a response of YES, or FALSE (0) for anything else. periodt πŸ’…


msgbox( )

EXAMPLE

$d->msgbox( text => 'A simple message' );

DESCRIPTION

you're presenting the end user with a message box that has an OK button ✨

RETURNS

TRUE (1) for a response of OK, or FALSE (0) for anything else. πŸ’–


password( )

EXAMPLE

my $string = $d->password( text => 'Enter some (hidden) text.' );

DESCRIPTION

you're presenting the end user with a text input field that doesn't reveal the input (except to the script, sneaky πŸ‘€) plus a message. secretive queen behavior, we love her.

RETURNS

a SCALAR if the response is OK, and FALSE (0) for anything else. 🌸


inputbox( )

EXAMPLE

my $string = $d->inputbox( text => 'Enter some text.',
                           entry => 'this is the input field' );

DESCRIPTION

you're presenting the end user with a text input field and a message. simple, clean, effective πŸŽ€

RETURNS

a SCALAR if the response is OK, and FALSE (0) for anything else. ⭐


textbox( )

EXAMPLE

$d->textbox( path => '/path/to/a/text/file' );

DESCRIPTION

you're presenting the end user with a simple scrolling box containing the contents of the given text file πŸ¦‹

RETURNS

TRUE (1) if the response is OK, and FALSE (0) for anything else. πŸ’œ


EXAMPLE

my $selection1 = $d->menu( text => 'Select one:',
                           list => [ 'tag1', 'item1',
                                     'tag2', 'item2',
                                     'tag3', 'item3' ]
                         );

DESCRIPTION

you're presenting the user with a selectable list πŸ‘‘

RETURNS

a SCALAR of the chosen tag if the response is OK, and FALSE (0) for anything else. ✨


checklist( )

EXAMPLE

my @selection = $d->checklist( text => 'Select one:',
                               list => [ 'tag1', [ 'item1', 0 ],
                                         'tag2', [ 'item2', 1 ],
                                         'tag3', [ 'item3', 1 ] ]
                             );

DESCRIPTION

you're presenting the user with a selectable checklist πŸŽ€ multiple picks, we're feeling generous today.

RETURNS

an ARRAY of the chosen tags if the response is OK, and FALSE (0) for anything else. πŸ’–


radiolist( )

EXAMPLE

my $selection = $d->radiolist( text => 'Select one:',
                               list => [ 'tag1', [ 'item1', 0 ],
                                         'tag2', [ 'item2', 1 ],
                                         'tag3', [ 'item3', 0 ] ]
                             );

DESCRIPTION

you're presenting the user with a selectable radiolist 🌸

RETURNS

a SCALAR of the chosen tag if the response is OK, and FALSE (0) for anything else. 🌈


fselect( ) getopenfilename( ) getsavefilename( ) getopenurl( ) getsaveurl( )

EXAMPLE

# my $text = $d->getsaveurl( path => '/path/' );
# my $text = $d->getopenurl( path => '/path/' );
# my $text = $d->getsavefilename( path => '/path/' );
# my $text = $d->getopenfilename( path => '/path/' );
my $text = $d->fselect( path => '/path/to/a/file/or/directory' );

DESCRIPTION

you're presenting the user with a file selection widget, preset with the given path πŸ—‚οΈ

RETURNS

a SCALAR if the response is OK, and FALSE (0) for anything else. ⭐


dselect( ) getexistingdirectory( )

EXAMPLE

# my $text = $d->getexistingdirectory( path => '/path/to/a/dir' );
my $text = $d->dselect( path => '/path/to/a/directory' );

DESCRIPTION

you're presenting the user with a file selection widget, preset with the given path. but heads up bestie β€” unlike fselect() this widget will only return a directory selection πŸ“ directories only, no files allowed, she's picky and we respect it.

RETURNS

a SCALAR if the response is OK, and FALSE (0) for anything else. πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯

PERLDOC

  • UI::Dialog
  • UI::Dialog::KDE
  • UI::Dialog::Backend
  • UI::Dialog::Backend::XOSD

MAN FILES

None. just run kdialog --help from a command line, bestie πŸ’…


πŸ’€ BUGS πŸ’€

please email the author with any bug reports 🫢 and include the name of the module in the subject line β€” that's the assignment, don't skip it.


🌟 AUTHOR 🌟

Kevin C. Krinke, <kevin@krinke.ca>


Copyright (C) 2004-2016  Kevin C. Krinke <kevin@krinke.ca>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA

and that's a wrap, bestie πŸŽ€ this whole thing came to you via perl v5.28.0 on 2018-10-27, which is genuinely giving vintage, and it's the UI::Di...Dialog(3pm) page β€” so go forth, call some widgets, and slay πŸ’…βœ¨
πŸ“¦ where this page comes from