UI::Di...Dialog(3pm)
β¨ 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. π
menu( )
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::DialogUI::Dialog::KDEUI::Dialog::BackendUI::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 AND LICENSE π
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 viaperl v5.28.0on2018-10-27, which is genuinely giving vintage, and it's theUI::Di...Dialog(3pm)page β so go forth, call some widgets, and slay π β¨
π¦ where this page comes from
- ubuntu jammy: libui-dialog-perl 1.21-0.1 Β· LGPL-2.1-or-later
- ubuntu noble: libui-dialog-perl 1.21-0.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms