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

blogilo

  • sources
  • kde-4.14
  • kdepim
  • blogilo
  • src
sendtoblogdialog.cpp
Go to the documentation of this file.
1 /*
2  This file is part of Blogilo, A KDE Blogging Client
3 
4  Copyright (C) 2008-2010 Mehrdad Momeny <mehrdad.momeny@gmail.com>
5  Copyright (C) 2008-2010 Golnaz Nilieh <g382nilieh@gmail.com>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License or (at your option) version 3 or any later version
11  accepted by the membership of KDE e.V. (or its successor approved
12  by the membership of KDE e.V.), which shall act as a proxy
13  defined in Section 14 of version 3 of the license.
14 
15 
16  This program is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with this program; if not, see http://www.gnu.org/licenses/
23 */
24 
25 #include "sendtoblogdialog.h"
26 #include "ui_sendtoblogbase.h"
27 #include <kdebug.h>
28 
29 class SendToBlogDialog::Private
30 {
31 public:
32  Private()
33  : mIsPrivate(false),
34  mIsNew(false)
35  {
36  }
37 
38  Ui::SendToBlogBase ui;
39  bool mIsPrivate;
40  bool mIsNew;
41 };
42 SendToBlogDialog::SendToBlogDialog( bool isNew, bool isPrivate, QWidget *parent )
43  : KDialog(parent), d(new Private)
44 {
45  QWidget *dialog = new QWidget( this );
46  d->ui.setupUi( dialog );
47  dialog->setAttribute( Qt::WA_DeleteOnClose );
48  this->setMainWidget( dialog );
49  setWindowTitle( i18n( "Submitting as..." ) );
50  if ( isNew ) {
51  d->ui.pubAsModify->setEnabled( false );
52  d->ui.pubAsNewPost->setChecked( true );
53  } else {
54  d->ui.pubAsModify->setChecked( true );
55  }
56  if ( isPrivate )
57  d->ui.saveDraft->setChecked(true);
58  d->mIsNew = isNew;
59  d->mIsPrivate = isPrivate;
60 }
61 
62 SendToBlogDialog::~SendToBlogDialog()
63 {
64  delete d;
65 }
66 
67 bool SendToBlogDialog::isPrivate() const
68 {
69  return d->mIsPrivate;
70 }
71 
72 bool SendToBlogDialog::isNew() const
73 {
74  return d->mIsNew;
75 }
76 
77 void SendToBlogDialog::accept()
78 {
79  d->mIsPrivate = d->ui.saveDraft->isChecked();
80  d->mIsNew = !d->ui.pubAsModify->isChecked();
81  KDialog::accept();
82 }
83 
QWidget
SendToBlogDialog::~SendToBlogDialog
~SendToBlogDialog()
Definition: sendtoblogdialog.cpp:62
QWidget::setAttribute
void setAttribute(Qt::WidgetAttribute attribute, bool on)
KDialog
SendToBlogDialog::isNew
bool isNew() const
Definition: sendtoblogdialog.cpp:72
SendToBlogDialog::isPrivate
bool isPrivate() const
Definition: sendtoblogdialog.cpp:67
SendToBlogDialog::SendToBlogDialog
SendToBlogDialog(bool isNew, bool isPrivate, QWidget *parent=0)
Definition: sendtoblogdialog.cpp:42
sendtoblogdialog.h
SendToBlogDialog::accept
void accept()
Definition: sendtoblogdialog.cpp:77
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:16 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

blogilo

Skip menu "blogilo"
  • 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