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

KIO

  • sources
  • kde-4.14
  • kdelibs
  • 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 
32 using namespace KIO;
33 
34 SkipDialog::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 
58 SkipDialog::~SkipDialog()
59 {
60 }
61 
62 void SkipDialog::cancelPressed()
63 {
64  done(S_CANCEL);
65 }
66 
67 void SkipDialog::skipPressed()
68 {
69  done(S_SKIP);
70 }
71 
72 void SkipDialog::autoSkipPressed()
73 {
74  done(S_AUTO_SKIP);
75 }
76 
77 #include "skipdialog.moc"
i18n
QString i18n(const char *text)
KIO::SkipDialog::~SkipDialog
~SkipDialog()
Definition: skipdialog.cpp:58
QWidget
KIO::S_SKIP
Definition: skipdialog.h:29
kurl.h
KIO::S_AUTO_SKIP
Definition: skipdialog.h:29
QDialog::done
virtual void done(int r)
KDialog
klocale.h
QWidget::resize
void resize(int w, int h)
KIO::S_CANCEL
Definition: skipdialog.h:29
QDialog::sizeHint
virtual QSize sizeHint() const
QString
Cancel
KIO::SkipDialog::SkipDialog
SkipDialog(QWidget *parent, bool _multi, const QString &_error_text)
Definition: skipdialog.cpp:34
QWidget::setCaption
void setCaption(const QString &c)
skipdialog.h
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QLabel
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:53 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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

Search



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