• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KIO

  • kio
  • kio
skipdialog.cpp
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 Copyright (C) 2000 David Faure <faure@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18
19#include "kio/skipdialog.h"
20
21#include <stdio.h>
22#include <assert.h>
23
24#include <QtGui/QMessageBox>
25#include <QtGui/QWidget>
26#include <QtGui/QLayout>
27#include <QtGui/QLabel>
28
29#include <klocale.h>
30#include <kurl.h>
31
32using namespace KIO;
33
34SkipDialog::SkipDialog(QWidget *parent, bool _multi, const QString& _error_text )
35 : KDialog ( parent ), d( 0 )
36{
37 setCaption( i18n( "Information" ) );
38
39 if ( !_multi ) {
40 setButtons( Cancel );
41 } else {
42 setButtons( Cancel | User1 | User2 );
43
44 setButtonText( User1, i18n( "Skip" ) );
45 connect( this, SIGNAL(user1Clicked()), SLOT(skipPressed()) );
46
47 setButtonText( User2, i18n( "AutoSkip" ) );
48 connect( this, SIGNAL(user2Clicked()), SLOT(autoSkipPressed()) );
49 }
50
51 connect( this, SIGNAL(cancelClicked()), SLOT(cancelPressed()) );
52
53 setMainWidget( new QLabel( _error_text, this ) );
54
55 resize( sizeHint() );
56}
57
58SkipDialog::~SkipDialog()
59{
60}
61
62void SkipDialog::cancelPressed()
63{
64 done(S_CANCEL);
65}
66
67void SkipDialog::skipPressed()
68{
69 done(S_SKIP);
70}
71
72void SkipDialog::autoSkipPressed()
73{
74 done(S_AUTO_SKIP);
75}
76
77#include "skipdialog.moc"
KDialog
KDialog::setMainWidget
void setMainWidget(QWidget *widget)
KDialog::sizeHint
virtual QSize sizeHint() const
KDialog::setButtons
void setButtons(ButtonCodes buttonMask)
KDialog::user2Clicked
void user2Clicked()
KDialog::User1
User1
KDialog::Cancel
Cancel
KDialog::User2
User2
KDialog::setButtonText
void setButtonText(ButtonCode id, const QString &text)
KDialog::cancelClicked
void cancelClicked()
KDialog::setCaption
virtual void setCaption(const QString &caption)
KDialog::user1Clicked
void user1Clicked()
KIO::SkipDialog::SkipDialog
SkipDialog(QWidget *parent, bool _multi, const QString &_error_text)
Definition: skipdialog.cpp:34
KIO::SkipDialog::~SkipDialog
~SkipDialog()
Definition: skipdialog.cpp:58
QLabel
QWidget
klocale.h
i18n
QString i18n(const char *text)
kurl.h
KIO
A namespace for KIO globals.
Definition: kbookmarkmenu.h:55
KIO::S_SKIP
@ S_SKIP
Definition: skipdialog.h:29
KIO::S_CANCEL
@ S_CANCEL
Definition: skipdialog.h:29
KIO::S_AUTO_SKIP
@ S_AUTO_SKIP
Definition: skipdialog.h:29
skipdialog.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal