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

blogilo

  • sources
  • kde-4.12
  • kdepim
  • blogilo
  • src
  • composer
blogilocomposerwidget.cpp
Go to the documentation of this file.
1 /*
2  Copyright (c) 2013 Montel Laurent <montel@kde.org>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 
19 */
20 
21 #include "blogilocomposerwidget.h"
22 #include "blogilocomposereditor.h"
23 #include "blogilocomposerview.h"
24 #include "pimcommon/translator/translatorwidget.h"
25 
26 #include <QVBoxLayout>
27 
28 BlogiloComposerWidget::BlogiloComposerWidget(BlogiloComposerView *view, QWidget *parent)
29  : QWidget(parent)
30 {
31  QVBoxLayout *lay = new QVBoxLayout;
32  lay->setMargin(0);
33  mEditor = new BlogiloComposerEditor(view, this);
34  connect(view, SIGNAL(activateTranslator()), SLOT(slotActivateTranslator()));
35  lay->addWidget(mEditor);
36  mTranslatorWidget = new PimCommon::TranslatorWidget;
37  lay->addWidget(mTranslatorWidget);
38  setLayout(lay);
39 }
40 
41 BlogiloComposerWidget::~BlogiloComposerWidget()
42 {
43 
44 }
45 
46 BlogiloComposerEditor *BlogiloComposerWidget::editor() const
47 {
48  return mEditor;
49 }
50 
51 void BlogiloComposerWidget::slotActivateTranslator()
52 {
53  const QString text = mEditor->view()->selectedText();
54  mTranslatorWidget->show();
55  if(!text.isEmpty())
56  mTranslatorWidget->setTextToTranslate(text);
57 }
58 
59 #include "blogilocomposerwidget.moc"
BlogiloComposerEditor
Definition: blogilocomposereditor.h:29
QWidget
BlogiloComposerWidget::BlogiloComposerWidget
BlogiloComposerWidget(BlogiloComposerView *view, QWidget *parent=0)
Definition: blogilocomposerwidget.cpp:28
blogilocomposerwidget.h
blogilocomposereditor.h
BlogiloComposerWidget::editor
BlogiloComposerEditor * editor() const
Definition: blogilocomposerwidget.cpp:46
BlogiloComposerView
Definition: blogilocomposerview.h:25
BlogiloComposerWidget::~BlogiloComposerWidget
~BlogiloComposerWidget()
Definition: blogilocomposerwidget.cpp:41
blogilocomposerview.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:44 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

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