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

kjots

  • sources
  • kde-4.14
  • kdepim
  • kjots
kjotsreplacenextdialog.cpp
Go to the documentation of this file.
1 //
2 // kjots
3 //
4 // Copyright (C) 2008 Stephen Kelly <steveire@gmail.com>
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 //
20 
21 #include "kjotsreplacenextdialog.h"
22 
23 #include <QLabel>
24 
25 #include <KLocalizedString>
26 
27 KJotsReplaceNextDialog::KJotsReplaceNextDialog(QWidget *parent) :
28  KDialog(parent), m_answer(Close)
29 {
30  setModal( true );
31  setCaption( i18n("Replace") );
32  setButtons( User3 | User2 | User1 | Close );
33  setButtonGuiItem( User1, KGuiItem(i18n("&All")) );
34  setButtonGuiItem( User2, KGuiItem(i18n("&Skip")) );
35  setButtonGuiItem( User3, KGuiItem(i18n("Replace")) );
36  setDefaultButton( User3 );
37  showButtonSeparator( false );
38 
39  m_mainLabel = new QLabel( this );
40  setMainWidget( m_mainLabel );
41 
42  connect( this, SIGNAL(user1Clicked()), SLOT(onHandleAll()) );
43  connect( this, SIGNAL(user2Clicked()), SLOT(onHandleSkip()) );
44  connect( this, SIGNAL(user3Clicked()), SLOT(onHandleReplace()) );
45 }
46 
47 void KJotsReplaceNextDialog::setLabel( const QString& pattern, const QString& replacement )
48 {
49  m_mainLabel->setText( i18n("Replace '%1' with '%2'?", pattern, replacement) );
50 }
51 
52 void KJotsReplaceNextDialog::onHandleAll()
53 {
54  m_answer = User1;
55  accept();
56 }
57 
58 void KJotsReplaceNextDialog::onHandleSkip()
59 {
60  m_answer = User2;
61  accept();
62 }
63 
64 void KJotsReplaceNextDialog::onHandleReplace()
65 {
66  m_answer = User3;
67  accept();
68 }
69 
QWidget
KDialog
KJotsReplaceNextDialog::onHandleAll
void onHandleAll(void)
Definition: kjotsreplacenextdialog.cpp:52
KJotsReplaceNextDialog::KJotsReplaceNextDialog
KJotsReplaceNextDialog(QWidget *parent)
Definition: kjotsreplacenextdialog.cpp:27
KJotsReplaceNextDialog::setLabel
void setLabel(const QString &pattern, const QString &replacement)
Definition: kjotsreplacenextdialog.cpp:47
QLabel::setText
void setText(const QString &)
QString
KJotsReplaceNextDialog::onHandleSkip
void onHandleSkip(void)
Definition: kjotsreplacenextdialog.cpp:58
KJotsReplaceNextDialog::onHandleReplace
void onHandleReplace(void)
Definition: kjotsreplacenextdialog.cpp:64
QLabel
kjotsreplacenextdialog.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kjots

Skip menu "kjots"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

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