• 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
postentry.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  Copyright (C) 2013-2015 Laurent Montel <montel@kde.org>
7 
8  This program is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License as
10  published by the Free Software Foundation; either version 2 of
11  the License or (at your option) version 3 or any later version
12  accepted by the membership of KDE e.V. (or its successor approved
13  by the membership of KDE e.V.), which shall act as a proxy
14  defined in Section 14 of version 3 of the license.
15 
16 
17  This program is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with this program; if not, see http://www.gnu.org/licenses/
24 */
25 
26 #include "postentry.h"
27 #include "bilbomedia.h"
28 #include "backend.h"
29 #include "dbman.h"
30 #include "global.h"
31 #include "sendtoblogdialog.h"
32 #include "settings.h"
33 #include "bilboblog.h"
34 #include "syncuploader.h"
35 
36 #include "composer/blogilocomposereditor.h"
37 #include "composer/blogilocomposerview.h"
38 #include "composer/bilbobrowser.h"
39 #include "composer/htmleditor.h"
40 #include "composer/blogilocomposerwidget.h"
41 
42 #include <libkdepim/widgets/spellchecklineedit.h>
43 
44 
45 #include <kdebug.h>
46 #include <klocalizedstring.h>
47 #include <klineedit.h>
48 #include <KMessageBox>
49 #include <ktexteditor/view.h>
50 #include <ktexteditor/document.h>
51 #include <kio/job.h>
52 #include <KTabWidget>
53 
54 #include <QProgressBar>
55 #include <QLabel>
56 #include <QTimer>
57 #include <QLayout>
58 #include <QHBoxLayout>
59 
60 #define MINUTE 60000
61 
62 class PostEntry::Private
63 {
64 public:
65  QPointer<QProgressBar> progress;
66  QGridLayout *gridLayout;
67  QHBoxLayout *horizontalLayout;
68  QLabel *labelTitle;
69  KPIM::SpellCheckLineEdit *txtTitle;
70  QTimer *mTimer;
71  BilboPost mCurrentPost;
72  int mCurrentPostBlogId;
73  QMap <QString, BilboMedia*> mMediaList;
74 
75  int mNumOfFilesToBeUploaded;
76  bool isUploadingMediaFilesFailed;
77  bool isNewPost;
78  bool isPostContentModified;
79 
80 
81  KTabWidget *tabWidget;
82  QWidget *tabVisual;
83  QWidget *tabHtml;
84  QWidget *tabPreview;
85 
86  BlogiloComposerWidget *wysiwygEditor;
87  KTextEditor::View *htmlEditor;
88  BilboBrowser *previewer;
89 
90  int prev_index;
91 };
92 
93 PostEntry::PostEntry( QWidget *parent )
94  : QFrame( parent ), d(new Private)
95 {
96  createUi();
97  connect( d->wysiwygEditor->editor(), SIGNAL(textChanged()), this, SIGNAL(textChanged()) );
98  connect( d->htmlEditor->document(), SIGNAL(textChanged(KTextEditor::Document*)),
99  this, SIGNAL(textChanged()) );
100  layout()->addWidget( d->tabWidget );
101  d->mTimer = new QTimer(this);
102  d->mTimer->start(Settings::autosaveInterval() * MINUTE);
103  connect( d->mTimer, SIGNAL(timeout()), this, SLOT(saveTemporary()) );
104  d->progress = 0L;
105  d->mCurrentPostBlogId = -1;
106  d->mNumOfFilesToBeUploaded = 0;
107  d->isPostContentModified = false;
108  connect( this, SIGNAL(textChanged()), this, SLOT(slotPostModified()) );
109 }
110 
111 PostEntry::~PostEntry()
112 {
113  delete d;
114 }
115 
116 void PostEntry::settingsChanged()
117 {
118  kDebug();
119  d->mTimer->setInterval(Settings::autosaveInterval() * MINUTE);
120  if (Settings::autosaveInterval())
121  d->mTimer->start();
122  else
123  d->mTimer->stop();
124 }
125 
126 void PostEntry::createUi()
127 {
128  d->tabWidget = new KTabWidget(this);
129  d->tabVisual = new QWidget( d->tabWidget );
130  d->tabHtml = new QWidget( d->tabWidget );
131  d->tabPreview = new QWidget( d->tabWidget );
132  d->tabWidget->addTab( d->tabVisual, i18nc( "Software", "Visual Editor" ) );
133  d->tabWidget->addTab( d->tabHtml, i18nc( "Software", "Html Editor" ) );
134  d->tabWidget->addTab( d->tabPreview, i18nc( "preview of the edited post", "Post Preview" ) );
135  connect( d->tabWidget, SIGNAL(currentChanged(int)), this, SLOT(slotSyncEditors(int)) );
136  d->prev_index = 0;
137 
139  BlogiloComposerView *view = new BlogiloComposerView(this);
140  d->wysiwygEditor = new BlogiloComposerWidget(view/*,d->tabVisual*/);
141  QVBoxLayout *vLayout = new QVBoxLayout( d->tabVisual );
142  vLayout->addWidget( d->wysiwygEditor );
143 
145  d->htmlEditor = HtmlEditor::self()->createView( d->tabHtml );
146  QGridLayout *hLayout = new QGridLayout( d->tabHtml );
147  hLayout->addWidget( d->htmlEditor );
148 
150  d->previewer = new BilboBrowser( d->tabPreview );
151  QGridLayout *gLayout = new QGridLayout( d->tabPreview );
152  gLayout->addWidget( d->previewer );
153 
154  connect( d->previewer, SIGNAL(sigSetBlogStyle()), this, SLOT(slotSetPostPreview()) );
155 
156 
157  d->tabWidget->setCurrentIndex( 0 );
158 
159  d->gridLayout = new QGridLayout( this );
160 
161  d->horizontalLayout = new QHBoxLayout();
162  d->horizontalLayout->setSizeConstraint( QLayout::SetDefaultConstraint );
163 
164  d->labelTitle = new QLabel( this );
165  d->labelTitle->setText( i18nc( "noun, the post title", "Title:" ) );
166  d->horizontalLayout->addWidget( d->labelTitle );
167 
168  d->txtTitle = new KPIM::SpellCheckLineEdit( this, QLatin1String( "blogilorc" ) );
169  d->horizontalLayout->addWidget( d->txtTitle );
170  d->labelTitle->setBuddy( d->txtTitle );
171  connect( d->txtTitle, SIGNAL(textChanged()), this,
172  SLOT(slotTitleChanged()) );
173  connect( d->txtTitle, SIGNAL(focusDown()), SLOT(slotFocusEditor()) );
174 
175  d->gridLayout->addLayout( d->horizontalLayout, 0, 0, 1, 1 );
176 }
177 
178 void PostEntry::slotFocusEditor()
179 {
180  switch(d->tabWidget->currentIndex()) {
181  case 0:
182  d->wysiwygEditor->editor()->startEditing();
183  break;
184  case 1:
185  d->htmlEditor->setFocus();
186  break;
187  }
188 }
189 
190 void PostEntry::slotSyncEditors(int index)
191 {
192  if ( index == 0 ) {
193  if ( d->prev_index == 2 ) {
194  d->previewer->stop();
195  d->prev_index = index;
196  return;
197  }//An else clause can do the job of goto, No? -Mehrdad :D
198  d->wysiwygEditor->editor()->setHtmlContent(d->htmlEditor->document()->text());
199  d->wysiwygEditor->editor()->setFocus();
200  d->wysiwygEditor->editor()->startEditing();
201  } else if ( index == 1 ) {
202  if ( d->prev_index == 2 ) {
203  d->previewer->stop();
204  d->prev_index = index;
205  return;
206  }
207  d->htmlEditor->document()->setText( d->wysiwygEditor->editor()->htmlContent() );
208  d->htmlEditor->setFocus();
209  } else {
210  if ( d->prev_index == 1 ) {
211  d->wysiwygEditor->editor()->setHtmlContent(d->htmlEditor->document()->text());
212  } else {
213  d->htmlEditor->document()->setText( d->wysiwygEditor->editor()->htmlContent() );
214  }
215  d->previewer->setHtml( d->txtTitle->toPlainText(), d->htmlEditor->document()->text() );
216  }
217  d->prev_index = index;
218 }
219 
220 void PostEntry::slotSetPostPreview()
221 {
222  if ( d->tabWidget->currentIndex() == 2 ) {
223  d->previewer->setHtml( d->txtTitle->toPlainText(), d->htmlEditor->document()->text() );
224  }
225 }
226 
227 QString PostEntry::htmlContent() const
228 {
229  if ( d->tabWidget->currentIndex() == 1 ) {
230  d->wysiwygEditor->editor()->setHtmlContent( d->htmlEditor->document()->text() );
231  } else {
232  d->htmlEditor->document()->setText( d->wysiwygEditor->editor()->htmlContent() );
233  }
234  return d->htmlEditor->document()->text();
235 }
236 
237 QString PostEntry::plainTextContent() const
238 {
239  return d->wysiwygEditor->editor()->plainTextContent();
240 }
241 
242 void PostEntry::setHtmlContent(const QString& content)
243 {
244  d->wysiwygEditor->editor()->setHtmlContent(content);
245  d->htmlEditor->document()->setText( content );
246 }
247 
248 void PostEntry::slotTitleChanged()
249 {
250  const QString titleText(d->txtTitle->toPlainText());
251  d->mCurrentPost.setTitle(titleText);
252  Q_EMIT postTitleChanged(titleText);
253 }
254 
255 QString PostEntry::postTitle() const
256 {
257  return d->mCurrentPost.title();
258 }
259 
260 void PostEntry::setPostTitle( const QString & title )
261 {
262  d->txtTitle->setPlainText( title );
263  d->mCurrentPost.setTitle( title );
264 }
265 
266 void PostEntry::setPostBody( const QString & content, const QString &additionalContent )
267 {
268  QString body;
269  if (additionalContent.isEmpty()) {
270  body = content;
271  } else {
272  body = content + QLatin1String("<hr/><!--split-->") + additionalContent;
273  d->mCurrentPost.setAdditionalContent(QString());
274  }
275  // if (body.isEmpty()){
276  // body = "<p></p>";//This is because of Bug #387578
277  // }
278  d->mCurrentPost.setContent( body );
279  setHtmlContent( body );
280  d->isPostContentModified = false;
281  connect( this, SIGNAL(textChanged()), this, SLOT(slotPostModified()) );
282  // connect( txtTitle, SIGNAL(textChanged(QString)), this, SLOT(slotPostModified()) );
283 }
284 
285 int PostEntry::currentPostBlogId() const
286 {
287  return d->mCurrentPostBlogId;
288 }
289 
290 void PostEntry::setCurrentPostBlogId( int blog_id )
291 {
292  d->mCurrentPostBlogId = blog_id;
293  if ( blog_id != -1 && DBMan::self()->blogList().contains( blog_id ) ) {
294  setDefaultLayoutDirection( DBMan::self()->blogList().value( blog_id )->direction() );
295  }
296 }
297 
298 void PostEntry::setCurrentPostFromEditor()
299 {
300  if ( d->isPostContentModified ) {
301  kDebug();
302  const QString& str = htmlContent();
303  d->mCurrentPost.setContent( str );
304  d->isPostContentModified = false;
305  connect( this, SIGNAL(textChanged()), this, SLOT(slotPostModified()) );
306  }
307 }
308 
309 BilboPost* PostEntry::currentPost()
310 {
311  setCurrentPostFromEditor();
312  return &d->mCurrentPost;
313 }
314 
315 void PostEntry::setCurrentPost( const BilboPost &post )
316 {
317  d->mCurrentPost = post;
318  kDebug()<<"local_id: "<<d->mCurrentPost.localId();
319  this->setPostBody( d->mCurrentPost.content(), d->mCurrentPost.additionalContent() );
320  this->setPostTitle( d->mCurrentPost.title() );
321 }
322 
323 Qt::LayoutDirection PostEntry::defaultLayoutDirection() const
324 {
325  return d->txtTitle->layoutDirection();
326 }
327 
328 void PostEntry::setDefaultLayoutDirection( Qt::LayoutDirection direction )
329 {
330  kDebug();
331  d->tabWidget->setLayoutDirection( direction );
332  d->txtTitle->setLayoutDirection( direction );
333 }
334 
335 QList< BilboMedia* > PostEntry::localImages() const
336 {
337  return d->wysiwygEditor->editor()->getLocalImages();
338 }
339 
340 void PostEntry::replaceImageSrc(const QString& src, const QString& dest)
341 {
342  d->wysiwygEditor->editor()->replaceImageSrc(src, dest);
343 }
344 
345 bool PostEntry::uploadMediaFiles( Backend *backend )
346 {
347  bool localBackend = false;
348  bool result = true;
349  if ( !backend ) {
350  localBackend = true;
351  backend = new Backend( d->mCurrentPostBlogId, this );
352  }
353  QList<BilboMedia*> lImages = localImages();
354  if ( !lImages.isEmpty() ) {
355  showProgressBar();
356  QList<BilboMedia*>::iterator it = lImages.begin();
357  QList<BilboMedia*>::iterator endIt = lImages.end();
358  for ( ; it != endIt; ++it ) {
359  BilboMedia *media = (*it);
360  SyncUploader *uploader = new SyncUploader(this);
361  if ( uploader->uploadMedia( backend, media ) ){
362  replaceImageSrc( media->localUrl().url(),
363  media->remoteUrl().url());
364  } else {
365  const QString err = i18n( "Uploading the media file %1 failed.\n%2",
366  media->name(), uploader->errorMessage());
367  emit postPublishingDone( true, err );
368  result = false;
369  break;
370  }
371  uploader->deleteLater();
372  }
373  d->mCurrentPost.setContent( htmlContent() );
374  }
375  if (localBackend)
376  backend->deleteLater();
377  return result;
378 }
379 
380 void PostEntry::slotError( const QString & errMsg )
381 {
382  const QString err = i18n( "An error occurred in the last transaction.\n%1", errMsg );
383  emit postPublishingDone( true, err );
384  deleteProgressBar();
385  sender()->deleteLater();
386 }
387 
388 void PostEntry::submitPost( int blogId, const BilboPost &postData )
389 {
390  setCurrentPostFromEditor();
391  if ( d->mCurrentPost.content().isEmpty() || d->mCurrentPost.title().isEmpty() ) {
392  if ( KMessageBox::warningContinueCancel( this,
393  i18n( "Your post title or body is empty.\nAre you sure you want to submit this post?" )
394  ) == KMessageBox::Cancel )
395  return;
396  }
397  bool isNew = false;
398  if (d->mCurrentPost.status() == BilboPost::New)
399  isNew = true;
400  QPointer<SendToBlogDialog> dia = new SendToBlogDialog( isNew, d->mCurrentPost.isPrivate(), this);
401  dia->setAttribute(Qt::WA_DeleteOnClose, false);
402  if ( dia->exec() == KDialog::Accepted ) {
403  this->setCursor( Qt::BusyCursor );
404  d->mCurrentPost.setProperties( postData );
405  d->mCurrentPostBlogId = blogId;
406 
407  QString msgType;
408  if (dia->isPrivate()) {
409  msgType = i18nc("Post status, e.g Draft or Published Post", "draft");
410  d->mCurrentPost.setPrivate(true);
411  } else {
412  msgType = i18nc("Post status, e.g Draft or Published Post", "post");
413  d->mCurrentPost.setPrivate(false);
414  }
415 
416  QString statusMsg;
417  if (dia->isNew()) {
418  statusMsg = i18n("Submitting new %1...", msgType);
419  d->isNewPost = true;
420  } else {
421  statusMsg = i18n("Modifying %1...", msgType);
422  d->isNewPost = false;
423  }
424 
425  emit showStatusMessage(statusMsg, true);
426  Backend *b = new Backend(d->mCurrentPostBlogId, this);
427  connect( b, SIGNAL(sigError(QString)), this, SLOT(slotError(QString)) );
428  if ( uploadMediaFiles(b) ) {
429  kDebug()<<"Uploading";
430  showProgressBar();
431  connect( b, SIGNAL(sigPostPublished(int,BilboPost*)),
432  this, SLOT(slotPostPublished(int,BilboPost*)) );
433  if (d->isNewPost)
434  b->publishPost( &d->mCurrentPost );
435  else
436  b->modifyPost( &d->mCurrentPost );
437  } else {
438  deleteProgressBar();
439  }
440  }
441  delete dia;
442 }
443 
444 void PostEntry::slotPostPublished( int blog_id, BilboPost *post )
445 {
446  kDebug() << "BlogId: " << blog_id << "Post Id on server: " << post->postId();
447  DBMan::self()->removeTempEntry(d->mCurrentPost);
448  QString msg;
449  setCurrentPost(*post);
450  if ( d->mCurrentPost.isPrivate() ) {
451  msg = i18n( "Draft with title \"%1\" saved successfully.", post->title() );
452  } else if (d->mCurrentPost.status() == BilboPost::Modified){
453  msg = i18n( "Post with title \"%1\" modified successfully.", post->title() );
454  } else {
455  msg = i18n( "Post with title \"%1\" published successfully.", post->title() );
456  }
457  // KMessageBox::information( this, msg, "Successful" );
458  deleteProgressBar();
459  this->unsetCursor();
460  emit postPublishingDone( false, msg );
461  sender()->deleteLater(); //FIXME Check if this command needed or NOT -Mehrdad
462 }
463 
464 void PostEntry::showProgressBar()
465 {
466  if ( !d->progress ) {
467  d->progress = new QProgressBar( this );
468  layout()->addWidget( d->progress );
469  d->progress->setRange( 0, 0 );
470  }
471 }
472 
473 void PostEntry::deleteProgressBar()
474 {
475  if (d->progress){
476  this->layout()->removeWidget( d->progress );
477  d->progress->deleteLater();
478  d->progress = 0L;
479  }
480 }
481 
482 void PostEntry::saveLocally()
483 {
484  if ( currentPost()->content().isEmpty() ) {
485  if ( KMessageBox::warningYesNo(this, i18n("The current post content is empty, are you sure you want to save an empty post?")) == KMessageBox::No )
486  return;
487  }
488  const int resId = DBMan::self()->saveLocalEntry( *currentPost(), d->mCurrentPostBlogId );
489  if (resId == -1){
490  KMessageBox::detailedSorry(this, i18n("Saving post locally failed."), DBMan::self()->lastErrorText());
491  return;
492  }
493  d->mCurrentPost.setLocalId( resId );
494  emit postSavedLocally();
495  emit showStatusMessage(i18n( "Post saved locally." ), false);
496  kDebug()<<"Locally saved";
497 }
498 
499 void PostEntry::saveTemporary()
500 {
501  if ( d->isPostContentModified ) {
502  const int res = DBMan::self()->saveTempEntry( *currentPost(), d->mCurrentPostBlogId);
503  if (res != -1) {
504  d->mCurrentPost.setLocalId( res );
505  emit postSavedTemporary();
506  kDebug()<<"Temporary saved";
507  } else {
508  kDebug()<<"Saving temporary failed: "<< DBMan::self()->lastErrorText();
509  }
510  }
511 }
512 
513 void PostEntry::slotPostModified()
514 {
515  kDebug();
516  disconnect( this, SIGNAL(textChanged()), this, SLOT(slotPostModified()) );
517  // disconnect( txtTitle, SIGNAL(textChanged(QString)), this, SLOT(slotPostModified()) );
518  // emit postModified();
519  d->isPostContentModified = true;
520 }
521 
QWidget::layout
QLayout * layout() const
postentry.h
QProgressBar
syncuploader.h
QWidget
PostEntry::saveLocally
void saveLocally()
Definition: postentry.cpp:482
PostEntry::showStatusMessage
void showStatusMessage(const QString &message, bool isPermanent)
To show a message on statusBar.
QWidget::setCursor
void setCursor(const QCursor &)
HtmlEditor::self
static HtmlEditor * self()
Definition: htmleditor.cpp:48
PostEntry::postTitleChanged
void postTitleChanged(const QString &title)
emitted when title of this entry changed.
QGridLayout::addWidget
void addWidget(QWidget *widget, int row, int column, QFlags< Qt::AlignmentFlag > alignment)
PostEntry::slotTitleChanged
void slotTitleChanged()
Definition: postentry.cpp:248
PostEntry::settingsChanged
void settingsChanged()
Definition: postentry.cpp:116
PostEntry::showProgressBar
void showProgressBar()
Definition: postentry.cpp:464
QObject::sender
QObject * sender() const
DBMan::lastErrorText
QString lastErrorText() const
Definition: dbman.cpp:110
PostEntry::postPublishingDone
void postPublishingDone(bool isError, const QString &customMessage)
This signal emitted when a post manipulation job e.g.
PostEntry::replaceImageSrc
void replaceImageSrc(const QString &src, const QString &dest)
Definition: postentry.cpp:340
QMap< QString, BilboMedia * >
PostEntry::slotSyncEditors
void slotSyncEditors(int index)
Definition: postentry.cpp:190
PostEntry::submitPost
void submitPost(int blogId, const BilboPost &postData)
Definition: postentry.cpp:388
Backend::publishPost
void publishPost(BilboPost *post)
Use this to publish a post to server.
Definition: backend.cpp:159
QPointer< QProgressBar >
PostEntry::htmlContent
QString htmlContent() const
Returns the editor current text in html format Synchronizes HtmlEditor and editor tabs...
Definition: postentry.cpp:227
QHBoxLayout
blogilocomposerwidget.h
PostEntry::setHtmlContent
void setHtmlContent(const QString &content)
Sets the given string as the HtmlEditor and VisualEditor content.
Definition: postentry.cpp:242
DBMan::saveTempEntry
int saveTempEntry(const BilboPost &post, int blog_id)
Definition: dbman.cpp:742
QGridLayout
DBMan::self
static DBMan * self()
Retrieve the instance of DataBase Manager.
Definition: dbman.cpp:117
bilbobrowser.h
SyncUploader
Synchronous uploader.
Definition: syncuploader.h:41
PostEntry::defaultLayoutDirection
Qt::LayoutDirection defaultLayoutDirection() const
Definition: postentry.cpp:323
BilboMedia::name
QString name() const
Definition: bilbomedia.cpp:125
BilboPost
Definition of a blog post! it's implemented to decrease dependency to KBlog :)
Definition: bilbopost.h:41
global.h
QObject::disconnect
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
SyncUploader::errorMessage
QString errorMessage() const
Definition: syncuploader.cpp:56
DBMan::saveLocalEntry
int saveLocalEntry(const BilboPost &post, int blog_id)
Definition: dbman.cpp:737
PostEntry::setPostTitle
void setPostTitle(const QString &title)
Definition: postentry.cpp:260
QLayout::removeWidget
void removeWidget(QWidget *widget)
PostEntry::slotSetPostPreview
void slotSetPostPreview()
Definition: postentry.cpp:220
QBoxLayout::addWidget
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
QTimer
PostEntry::plainTextContent
QString plainTextContent() const
Definition: postentry.cpp:237
PostEntry::slotError
void slotError(const QString &errMsg)
Definition: postentry.cpp:380
PostEntry::saveTemporary
void saveTemporary()
Definition: postentry.cpp:499
QList::isEmpty
bool isEmpty() const
blogilocomposereditor.h
QString::isEmpty
bool isEmpty() const
htmleditor.h
MINUTE
#define MINUTE
Definition: postentry.cpp:60
QVBoxLayout
bilbomedia.h
PostEntry::~PostEntry
~PostEntry()
Definition: postentry.cpp:111
PostEntry::setDefaultLayoutDirection
void setDefaultLayoutDirection(Qt::LayoutDirection direction)
Definition: postentry.cpp:328
QObject::deleteLater
void deleteLater()
BlogiloComposerView
Definition: blogilocomposerview.h:28
QString
QList
PostEntry::textChanged
void textChanged()
This signal is emitted when the content of VisualEditor or HtmlEditor changes.
QLayout::addWidget
void addWidget(QWidget *w)
QList::iterator
bilboblog.h
Backend::modifyPost
void modifyPost(BilboPost *post)
Modify an existing post.
Definition: backend.cpp:301
QList::end
iterator end()
HtmlEditor::createView
KTextEditor::View * createView(QWidget *parent)
Definition: htmleditor.cpp:67
BilboMedia::localUrl
KUrl localUrl() const
Definition: bilbomedia.cpp:95
DBMan::removeTempEntry
bool removeTempEntry(const BilboPost &post)
Definition: dbman.cpp:924
QFrame
Backend
Engine of application.
Definition: backend.h:45
sendtoblogdialog.h
BilboMedia
Definition: bilbomedia.h:38
dbman.h
PostEntry::postSavedLocally
void postSavedLocally()
PostEntry::slotPostPublished
void slotPostPublished(int blog_id, BilboPost *post)
Definition: postentry.cpp:444
PostEntry::postSavedTemporary
void postSavedTemporary()
This signal is emitted when the post is saved temporarily!
SyncUploader::uploadMedia
bool uploadMedia(Backend *backend, BilboMedia *media)
Synchronous Media file uploader!
Definition: syncuploader.cpp:61
QLatin1String
QWidget::QWidget
QWidget(QWidget *parent, QFlags< Qt::WindowType > f)
PostEntry::currentPostBlogId
int currentPostBlogId() const
Definition: postentry.cpp:285
PostEntry::uploadMediaFiles
bool uploadMediaFiles(Backend *backend=0)
Will Upload media files not uploaded yet, and return true on success and false on failure...
Definition: postentry.cpp:345
PostEntry::PostEntry
PostEntry(QWidget *parent)
Definition: postentry.cpp:93
PostEntry::setPostBody
void setPostBody(const QString &content, const QString &additionalContent=QString())
Definition: postentry.cpp:266
PostEntry::slotPostModified
void slotPostModified()
Definition: postentry.cpp:513
PostEntry::slotFocusEditor
void slotFocusEditor()
Definition: postentry.cpp:178
SendToBlogDialog
Definition: sendtoblogdialog.h:30
PostEntry::deleteProgressBar
void deleteProgressBar()
Definition: postentry.cpp:473
PostEntry::currentPost
BilboPost * currentPost()
Definition: postentry.cpp:309
blogilocomposerview.h
PostEntry::localImages
QList< BilboMedia * > localImages() const
Definition: postentry.cpp:335
backend.h
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QLabel
BilboMedia::remoteUrl
KUrl remoteUrl() const
Definition: bilbomedia.cpp:105
PostEntry::setCurrentPost
void setCurrentPost(const BilboPost &post)
Definition: postentry.cpp:315
BlogiloComposerWidget
Definition: blogilocomposerwidget.h:28
QList::begin
iterator begin()
BilboBrowser
Implements a simple browser widget for use in blogilo Post Preview.
Definition: bilbobrowser.h:47
PostEntry::postTitle
QString postTitle() const
Definition: postentry.cpp:255
KTabWidget
PostEntry::setCurrentPostBlogId
void setCurrentPostBlogId(int blog_id)
Definition: postentry.cpp:290
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