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

messagelist

  • sources
  • kde-4.12
  • kdepim
  • messagelist
  • utils
optionseteditor.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright 2008 Szymon Tomasz Stefanek <pragma@kvirc.net>
4  *
5  * This program is free softhisare; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Softhisare Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Softhisare
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  *******************************************************************************/
20 
21 #include "utils/optionseteditor.h"
22 #include "core/optionset.h"
23 
24 #include <QLabel>
25 #include <QGridLayout>
26 #include <QComboBox>
27 
28 #include <KLineEdit>
29 #include <KLocale>
30 #include <KTextEdit>
31 
32 using namespace MessageList::Utils;
33 using namespace MessageList::Core;
34 
35 OptionSetEditor::OptionSetEditor( QWidget *parent )
36  : KTabWidget( parent )
37 {
38  // General tab
39  QWidget * tab = new QWidget( this );
40  addTab( tab, i18nc( "@title:tab General options of a view mode", "General" ) );
41 
42  QGridLayout * tabg = new QGridLayout( tab );
43 
44  QLabel * l = new QLabel( i18nc( "@label:textbox Name of the option", "Name:" ), tab );
45  tabg->addWidget( l, 0, 0 );
46 
47  mNameEdit = new KLineEdit( tab );
48 
49  tabg->addWidget( mNameEdit, 0, 1 );
50 
51  connect( mNameEdit, SIGNAL(textEdited(QString)),
52  SLOT(slotNameEditTextEdited(QString)) );
53 
54  l = new QLabel( i18nc( "@label:textbox Description of the option", "Description:" ), tab );
55  tabg->addWidget( l, 1, 0 );
56 
57  mDescriptionEdit = new KTextEdit( tab );
58  mDescriptionEdit->setAcceptRichText(false);
59  tabg->addWidget( mDescriptionEdit, 1, 1, 2, 1 );
60 
61  tabg->setColumnStretch( 1, 1 );
62  tabg->setRowStretch( 2, 1 );
63 
64 }
65 
66 OptionSetEditor::~OptionSetEditor()
67 {
68 }
69 
70 void OptionSetEditor::setReadOnly( bool readOnly )
71 {
72  mDescriptionEdit->setReadOnly( readOnly );
73  mNameEdit->setReadOnly( readOnly );
74 }
75 
76 KTextEdit *OptionSetEditor::descriptionEdit() const
77 {
78  return mDescriptionEdit;
79 }
80 
81 KLineEdit * OptionSetEditor::nameEdit() const
82 {
83  return mNameEdit;
84 }
85 
86 
87 #include "optionseteditor.moc"
optionseteditor.h
MessageList::Utils::OptionSetEditor::setReadOnly
void setReadOnly(bool readOnly)
Definition: optionseteditor.cpp:70
MessageList::Utils::OptionSetEditor::OptionSetEditor
OptionSetEditor(QWidget *parent)
Definition: optionseteditor.cpp:35
MessageList::Utils::OptionSetEditor::nameEdit
KLineEdit * nameEdit() const
Returns the editor for the name of the OptionSet.
Definition: optionseteditor.cpp:81
QWidget
MessageList::Utils::OptionSetEditor::slotNameEditTextEdited
virtual void slotNameEditTextEdited(const QString &newName)=0
Handles editing of the name field.
optionset.h
MessageList::Utils::OptionSetEditor::~OptionSetEditor
~OptionSetEditor()
Definition: optionseteditor.cpp:66
MessageList::Utils::OptionSetEditor::descriptionEdit
KTextEdit * descriptionEdit() const
Returns the editor for the description of the OptionSet.
Definition: optionseteditor.cpp:76
QLabel
KTabWidget
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:32 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messagelist

Skip menu "messagelist"
  • Main Page
  • Namespace List
  • Namespace Members
  • 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