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

KNewStuff

kdxstranslation.cpp

Go to the documentation of this file.
00001 /*
00002     This file is part of KNewStuff2.
00003     Copyright (c) 2006, 2007 Josef Spillner <spillner@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #include "kdxstranslation.h"
00022 
00023 #include <QtGui/QComboBox>
00024 #include <QtGui/QLabel>
00025 #include <QtGui/QLayout>
00026 
00027 #include <klineedit.h>
00028 #include <klocale.h>
00029 #include <ktextedit.h>
00030 #include <kurlrequester.h>
00031 
00032 KDXSTranslation::KDXSTranslation(QWidget *parent)
00033         : KDialog(parent)
00034 {
00035     setCaption(i18n("Translate this entry"));
00036     setButtons(KDialog::Ok | KDialog::Cancel);
00037 
00038     QWidget *root = new QWidget(this);
00039     setMainWidget(root);
00040 
00041     m_name = new KLineEdit(root);
00042     m_description = new KTextEdit(root);
00043     m_payload = new KUrlRequester(root);
00044 
00045     KLineEdit *oname = new KLineEdit(root);
00046     KTextEdit *odescription = new KTextEdit(root);
00047 
00048     QLabel *lname = new QLabel(i18n("Name"), root);
00049     QLabel *ldescription = new QLabel(i18n("Description"), root);
00050     QLabel *lpayload = new QLabel(i18n("Payload"), root);
00051 
00052     QComboBox *languagebox = new QComboBox(root);
00053     languagebox->addItem("English");
00054     languagebox->addItem("German");
00055 
00056     oname->setEnabled(false);
00057     odescription->setEnabled(false);
00058 
00059     QVBoxLayout *vbox = new QVBoxLayout(root);
00060 
00061     QHBoxLayout *hbox = new QHBoxLayout();
00062     hbox->addStretch(1);
00063     hbox->addWidget(languagebox);
00064 
00065     QGridLayout *grid = new QGridLayout();
00066     grid->setSpacing(spacingHint());
00067     grid->addWidget(lname, 0, 0);
00068     grid->addWidget(oname, 0, 1);
00069     grid->addWidget(m_name, 0, 2);
00070     grid->addWidget(ldescription, 1, 0);
00071     grid->addWidget(odescription, 1, 1);
00072     grid->addWidget(m_description, 1, 2);
00073     grid->addWidget(lpayload, 2, 0);
00074     grid->addWidget(m_payload, 2, 2);
00075 
00076     vbox->addLayout(hbox);
00077     vbox->addLayout(grid);
00078 }
00079 
00080 #include "kdxstranslation.moc"

KNewStuff

Skip menu "KNewStuff"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal