1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
#!/usr/bin/perl
use strict;
use warnings;
use KDEUi4;
use Qt4::GlobalSpace qw( i18n ki18n );
sub main
{
my $aboutData = KDE::AboutData(
# The program name used internally.
Qt4::ByteArray( 'tutorial1' ),
# The message catalog name
# If null, program name is used instead.
Qt4::ByteArray(),
# A displayable program name string.
ki18n('Tutorial 1'),
# The program version string.
Qt4::ByteArray( '1.0' ),
# Short description of what the app does.
ki18n('Displays a KMessageBox popup'),
# The license this code is released under
KDE::AboutData::License_GPL(),
# Copyright Statement
ki18n('(c) 2007'),
# Optional text shown in the About box.
# Can contain any information desired.
ki18n('Some text...'),
# The program homepage string.
Qt4::ByteArray( 'http://tutorial.com/' ),
# The bug report email address
Qt4::ByteArray( 'submit@bugs.kde.org' ) );
KDE::CmdLineArgs::init( scalar @ARGV, \@ARGV, $aboutData );
my $app = KDE::Application();
my $yesButton = KDE::GuiItem( i18n( 'Hello' ), '',
i18n( 'This is a tooltip' ),
i18n( 'This is a WhatsThis help text.' ) );
KDE::MessageBox::questionYesNo( undef, i18n( 'Hello World' ),
i18n( 'Hello' ), $yesButton );
return 0;
}
exit main();
|