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

libkdepim

  • sources
  • kde-4.12
  • kdepim
  • libkdepim
  • multiplyingline
multiplyinglineeditor.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 Casey Link <unnamedrambler@gmail.com>
3  Copyright (C) 2009-2010 Klaralvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
4 
5  Refactored from earlier code by:
6  Copyright (c) 2010 Volker Krause <vkrause@kde.org>
7  Copyright (c) 2004 Cornelius Schumacher <schumacher@kde.org>
8 
9  This library is free software; you can redistribute it and/or modify it
10  under the terms of the GNU Library General Public License as published by
11  the Free Software Foundation; either version 2 of the License, or (at your
12  option) any later version.
13 
14  This library is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
17  License for more details.
18 
19  You should have received a copy of the GNU Library General Public License
20  along with this library; see the file COPYING.LIB. If not, write to the
21  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22  02110-1301, USA.
23 */
24 
25 #ifndef MULTIPLYINGLINEEDITOR_H
26 #define MULTIPLYINGLINEEDITOR_H
27 
28 #include "kdepim_export.h"
29 
30 #include "multiplyingline.h"
31 
32 #include <KGlobalSettings>
33 #include <QWidget>
34 #include <QObject>
35 
36 namespace KPIM {
37 
38 class MultiplyingLineView;
39 
45 class KDEPIM_EXPORT MultiplyingLineFactory : public QObject
46 {
47  Q_OBJECT
48  public:
49  explicit MultiplyingLineFactory( QObject* parent ) : QObject( parent ) {}
50  virtual ~MultiplyingLineFactory() {}
51  virtual MultiplyingLine* newLine( QWidget *parent ) = 0;
52  virtual int maximumRecipients() { return -1; }
53 };
54 
73 class KDEPIM_EXPORT MultiplyingLineEditor : public QWidget
74 {
75  Q_OBJECT
76  Q_PROPERTY( bool autoResizeView READ autoResizeView WRITE setAutoResizeView )
77  Q_PROPERTY( bool dynamicSizeHint READ dynamicSizeHint WRITE setDynamicSizeHint )
78 
79  public:
80 
81  // We take ownership of factory
82  explicit MultiplyingLineEditor( MultiplyingLineFactory* factory, QWidget *parent = 0 );
83 
84  virtual ~MultiplyingLineEditor();
85 
88  MultiplyingLineFactory* factory() const;
89 
91  QList<MultiplyingLineData::Ptr> allData() const;
92 
94  MultiplyingLineData::Ptr activeData() const;
95 
98  void clear();
99 
103  bool isModified();
104 
107  void clearModified();
108 
113  void addData( const MultiplyingLineData::Ptr &data = MultiplyingLineData::Ptr() );
114 
118  void removeData( const MultiplyingLineData::Ptr &data );
119 
127  int setFirstColumnWidth( int w );
128 
133  void setCompletionMode( KGlobalSettings::Completion mode );
134 
139  void setFrameStyle( int shape );
140 
145  void setAutoResizeView( bool resize );
146  bool autoResizeView();
147 
152  void setDynamicSizeHint( bool dynamic );
153  bool dynamicSizeHint() const;
154 
155  signals:
156  void focusUp();
157  void focusDown();
158  void completionModeChanged( KGlobalSettings::Completion );
159  void sizeHintChanged();
160  void lineDeleted( int pos );
161  void lineAdded( KPIM::MultiplyingLine * );
162 
163  public slots:
164  void setFocus();
165  void setFocusTop();
166  void setFocusBottom();
167 
168  protected:
169  virtual QList<MultiplyingLine*> lines() const;
170  virtual MultiplyingLine *activeLine() const;
171  bool mModified;
172 
173  private:
174  MultiplyingLineFactory *mMultiplyingLineFactory;
175  MultiplyingLineView *mView;
176 };
177 }
178 #endif // MULTIPLYINGLINEEDITOR_H
kdepim_export.h
KPIM::MultiplyingLineView
Definition: multiplyinglineview_p.h:38
QWidget
QObject
KPIM::MultiplyingLineFactory::~MultiplyingLineFactory
virtual ~MultiplyingLineFactory()
Definition: multiplyinglineeditor.h:50
KPIM::MultiplyingLineData
ABC representing line data.
Definition: multiplyingline.h:41
KPIM::MultiplyingLineFactory::MultiplyingLineFactory
MultiplyingLineFactory(QObject *parent)
Definition: multiplyinglineeditor.h:49
KPIM::MultiplyingLineFactory
An Abstract Base Class used to create MultiplyingLines Subclass this class and MultiplyingLine, then implement newLine() such that it allocates and returns an instance of your MultiplyingLine.
Definition: multiplyinglineeditor.h:45
KPIM::MultiplyingLine
Abstract Base Class representing a line in the Multiplying line widget.
Definition: multiplyingline.h:64
KPIM::MultiplyingLineFactory::maximumRecipients
virtual int maximumRecipients()
Definition: multiplyinglineeditor.h:52
KDEPIM_EXPORT
#define KDEPIM_EXPORT
Definition: kdepim_export.h:35
multiplyingline.h
KPIM::MultiplyingLineEditor
An editor that adds rows (lines) of widgets and deletes them as the user edits.
Definition: multiplyinglineeditor.h:73
QList
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkdepim

Skip menu "libkdepim"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules

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