• 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
multiplyinglineview_p.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_P_H
26 #define MULTIPLYINGLINEEDITOR_P_H
27 
28 #include "multiplyingline.h"
29 #include "multiplyinglineeditor.h"
30 
31 #include <KGlobalSettings>
32 
33 #include <QPointer>
34 #include <QScrollArea>
35 
36 namespace KPIM {
37 
38 class MultiplyingLineView : public QScrollArea
39 {
40  Q_OBJECT
41  public:
42  MultiplyingLineView( MultiplyingLineFactory* factory, MultiplyingLineEditor *parent );
43  ~MultiplyingLineView(){}
44 
45  QSize minimumSizeHint() const;
46  QSize sizeHint() const;
47 
48  MultiplyingLine *activeLine() const;
49 
50  MultiplyingLine *emptyLine() const;
51 
52  QList<MultiplyingLineData::Ptr> allData() const;
53 
57  void removeData( const MultiplyingLineData::Ptr &data );
58 
63  bool isModified() const;
64 
67  void clearModified();
68 
70  void activateLine( MultiplyingLine *line );
71 
78  int setFirstColumnWidth( int );
79 
84  void setAutoResize( bool resize );
85  bool autoResize();
86 
91  void setDynamicSizeHint( bool dynamic );
92  bool dynamicSizeHint() const;
93 
94  QList<MultiplyingLine*> lines() const;
95 
96  public slots:
97  void setCompletionMode( KGlobalSettings::Completion mode );
98  MultiplyingLine *addLine();
99 
100  void setFocus();
101  void setFocusTop();
102  void setFocusBottom();
103 
104  signals:
105  void focusUp();
106  void focusDown();
107  void focusRight();
108  void completionModeChanged( KGlobalSettings::Completion );
109  void sizeHintChanged();
110  void lineDeleted( int pos );
111  void lineAdded( KPIM::MultiplyingLine * );
112 
113  protected:
114  void resizeEvent( QResizeEvent * );
115  void resizeView();
116 
117  protected slots:
118  void slotReturnPressed( KPIM::MultiplyingLine * );
119  void slotDownPressed( KPIM::MultiplyingLine * );
120  void slotUpPressed( KPIM::MultiplyingLine * );
121  void slotDecideLineDeletion( KPIM::MultiplyingLine * );
122  void slotDeleteLine();
123  void moveCompletionPopup();
124  void moveScrollBarToEnd();
125 
126  private:
127  QList<MultiplyingLine*> mLines;
128  QPointer<MultiplyingLine> mCurDelLine;
129  int mLineHeight;
130  int mFirstColumnWidth;
131  bool mModified;
132  KGlobalSettings::Completion mCompletionMode;
133  QWidget *mPage;
134  QLayout *mTopLayout;
135  MultiplyingLineFactory *mMultiplyingLineFactory;
136  bool mAutoResize;
137  bool mDynamicSizeHint;
138 };
139 }
140 
141 #endif //MULTIPLYINGLINEEDITOR_P_H
KPIM::MultiplyingLineView::allData
QList< MultiplyingLineData::Ptr > allData() const
KPIM::MultiplyingLineView::slotDeleteLine
void slotDeleteLine()
KPIM::MultiplyingLineView::setFocusBottom
void setFocusBottom()
KPIM::MultiplyingLineView::setAutoResize
void setAutoResize(bool resize)
Make this widget follow it's children's size.
KPIM::MultiplyingLineView::slotUpPressed
void slotUpPressed(KPIM::MultiplyingLine *)
KPIM::MultiplyingLineView::activateLine
void activateLine(MultiplyingLine *line)
Activates the line.
KPIM::MultiplyingLineView::lineAdded
void lineAdded(KPIM::MultiplyingLine *)
KPIM::MultiplyingLineView::completionModeChanged
void completionModeChanged(KGlobalSettings::Completion)
KPIM::MultiplyingLineView
Definition: multiplyinglineview_p.h:38
KPIM::MultiplyingLineView::activeLine
MultiplyingLine * activeLine() const
KPIM::MultiplyingLineView::isModified
bool isModified() const
Returns true if the user has made any modifications to the list of recipients.
KPIM::MultiplyingLineView::lines
QList< MultiplyingLine * > lines() const
QWidget
KPIM::MultiplyingLineView::minimumSizeHint
QSize minimumSizeHint() const
KPIM::MultiplyingLineView::resizeEvent
void resizeEvent(QResizeEvent *)
KPIM::MultiplyingLineView::setFirstColumnWidth
int setFirstColumnWidth(int)
QScrollArea Set the width of the left most column to be the argument width.
KPIM::MultiplyingLineView::removeData
void removeData(const MultiplyingLineData::Ptr &data)
Removes data provided it can be found.
KPIM::MultiplyingLineView::emptyLine
MultiplyingLine * emptyLine() const
QScrollArea
KPIM::MultiplyingLineView::dynamicSizeHint
bool dynamicSizeHint() const
KPIM::MultiplyingLineView::slotDownPressed
void slotDownPressed(KPIM::MultiplyingLine *)
KPIM::MultiplyingLineView::resizeView
void resizeView()
KPIM::MultiplyingLineView::slotDecideLineDeletion
void slotDecideLineDeletion(KPIM::MultiplyingLine *)
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::MultiplyingLineData::Ptr
QSharedPointer< MultiplyingLineData > Ptr
Definition: multiplyingline.h:44
multiplyinglineeditor.h
KPIM::MultiplyingLineView::sizeHintChanged
void sizeHintChanged()
KPIM::MultiplyingLineView::setCompletionMode
void setCompletionMode(KGlobalSettings::Completion mode)
KPIM::MultiplyingLineView::setFocus
void setFocus()
KPIM::MultiplyingLine
Abstract Base Class representing a line in the Multiplying line widget.
Definition: multiplyingline.h:64
KPIM::MultiplyingLineView::~MultiplyingLineView
~MultiplyingLineView()
Definition: multiplyinglineview_p.h:43
KPIM::MultiplyingLineView::lineDeleted
void lineDeleted(int pos)
KPIM::MultiplyingLineView::sizeHint
QSize sizeHint() const
KPIM::MultiplyingLineView::setDynamicSizeHint
void setDynamicSizeHint(bool dynamic)
Sets whether the size hint of the editor shall be calculated dynamically by the number of lines...
KPIM::MultiplyingLineView::moveCompletionPopup
void moveCompletionPopup()
KPIM::MultiplyingLineView::MultiplyingLineView
MultiplyingLineView(MultiplyingLineFactory *factory, MultiplyingLineEditor *parent)
KPIM::MultiplyingLineView::slotReturnPressed
void slotReturnPressed(KPIM::MultiplyingLine *)
KPIM::MultiplyingLineView::focusUp
void focusUp()
KPIM::MultiplyingLineView::moveScrollBarToEnd
void moveScrollBarToEnd()
KPIM::MultiplyingLineView::addLine
MultiplyingLine * addLine()
KPIM::MultiplyingLineView::clearModified
void clearModified()
Resets the modified flag to false.
multiplyingline.h
KPIM::MultiplyingLineEditor
An editor that adds rows (lines) of widgets and deletes them as the user edits.
Definition: multiplyinglineeditor.h:73
KPIM::MultiplyingLineView::setFocusTop
void setFocusTop()
KPIM::MultiplyingLineView::autoResize
bool autoResize()
QList
KPIM::MultiplyingLineView::focusDown
void focusDown()
KPIM::MultiplyingLineView::focusRight
void focusRight()
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