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

libkdepim

  • KPIM
  • MultiplyingLineEditor
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
KPIM::MultiplyingLineEditor Class Reference

#include <multiplyinglineeditor.h>

Inheritance diagram for KPIM::MultiplyingLineEditor:
Inheritance graph
[legend]

Public Slots

void setFocus ()
 
void setFocusBottom ()
 
void setFocusTop ()
 

Signals

void completionModeChanged (KGlobalSettings::Completion)
 
void focusDown ()
 
void focusUp ()
 
void lineAdded (KPIM::MultiplyingLine *)
 
void lineDeleted (int pos)
 
void sizeHintChanged ()
 

Public Member Functions

 MultiplyingLineEditor (MultiplyingLineFactory *factory, QWidget *parent=0)
 
virtual ~MultiplyingLineEditor ()
 
MultiplyingLineData::Ptr activeData () const
 
void addData (const MultiplyingLineData::Ptr &data=MultiplyingLineData::Ptr())
 
QList< MultiplyingLineData::Ptr > allData () const
 
bool autoResizeView ()
 
void clear ()
 
void clearModified ()
 
bool dynamicSizeHint () const
 
MultiplyingLineFactory * factory () const
 
bool isModified ()
 
void removeData (const MultiplyingLineData::Ptr &data)
 
void setAutoResizeView (bool resize)
 
void setCompletionMode (KGlobalSettings::Completion mode)
 
void setDynamicSizeHint (bool dynamic)
 
int setFirstColumnWidth (int w)
 
void setFrameStyle (int shape)
 

Protected Member Functions

virtual MultiplyingLine * activeLine () const
 
virtual QList< MultiplyingLine * > lines () const
 

Protected Attributes

bool mModified
 

Properties

bool autoResizeView
 
bool dynamicSizeHint
 

Detailed Description

An editor that adds rows (lines) of widgets and deletes them as the user edits.

Line widgets in the MultiplyingLineEditor are usually composed of multiple basic widgets. An example is below:


| ComboBox| Line edit | Checkbox | <– 1 line

| ComboBox| Line edit | Checkbox | <– another line

Default behavior is one line with default settings, and when the user edits it, another line is automatically added. Lines are added and deleted on demand.

Implement this class and MultiplyingLineData. Then implement MultiplyingLineFactory to return instances of your line.

Definition at line 73 of file multiplyinglineeditor.h.

Constructor & Destructor Documentation

MultiplyingLineEditor::MultiplyingLineEditor ( MultiplyingLineFactory *  factory,
QWidget *  parent = 0 
)
explicit

Definition at line 33 of file multiplyinglineeditor.cpp.

MultiplyingLineEditor::~MultiplyingLineEditor ( )
virtual

Definition at line 53 of file multiplyinglineeditor.cpp.

Member Function Documentation

MultiplyingLineData::Ptr MultiplyingLineEditor::activeData ( ) const

Retrieve the data of the active line.

Definition at line 124 of file multiplyinglineeditor.cpp.

MultiplyingLine * MultiplyingLineEditor::activeLine ( ) const
protectedvirtual

Definition at line 135 of file multiplyinglineeditor.cpp.

void MultiplyingLineEditor::addData ( const MultiplyingLineData::Ptr &  data = MultiplyingLineData::Ptr())

Adds data to one line of the editor.

Parameters
dataThe data you want to add. Can be used to add an empty/default line.

Definition at line 58 of file multiplyinglineeditor.cpp.

QList< MultiplyingLineData::Ptr > MultiplyingLineEditor::allData ( ) const

Retrieve the data from the editor.

Definition at line 119 of file multiplyinglineeditor.cpp.

bool KPIM::MultiplyingLineEditor::autoResizeView ( )
void MultiplyingLineEditor::clear ( )

Clear all lines from the widget.

Definition at line 72 of file multiplyinglineeditor.cpp.

void MultiplyingLineEditor::clearModified ( )

Resets the modified flag to false.

Definition at line 83 of file multiplyinglineeditor.cpp.

void KPIM::MultiplyingLineEditor::completionModeChanged ( KGlobalSettings::Completion  )
signal
bool KPIM::MultiplyingLineEditor::dynamicSizeHint ( ) const
MultiplyingLineFactory * MultiplyingLineEditor::factory ( ) const

Get the current line factory for this instance of the widget.

Definition at line 114 of file multiplyinglineeditor.cpp.

void KPIM::MultiplyingLineEditor::focusDown ( )
signal
void KPIM::MultiplyingLineEditor::focusUp ( )
signal
bool MultiplyingLineEditor::isModified ( )

Returns true if the user has made any modifications to the list of recipients.

Definition at line 78 of file multiplyinglineeditor.cpp.

void KPIM::MultiplyingLineEditor::lineAdded ( KPIM::MultiplyingLine *  )
signal
void KPIM::MultiplyingLineEditor::lineDeleted ( int  pos)
signal
QList< MultiplyingLine * > MultiplyingLineEditor::lines ( ) const
protectedvirtual

Definition at line 130 of file multiplyinglineeditor.cpp.

void MultiplyingLineEditor::removeData ( const MultiplyingLineData::Ptr &  data)

Removes data provided it can be found.

The Data class must support operator==

Parameters
dataThe data you want to add.

Definition at line 67 of file multiplyinglineeditor.cpp.

void MultiplyingLineEditor::setAutoResizeView ( bool  resize)

Make the line view follow it's children's size.

Parameters
resizeturn on or off this behavior of auto resizing

Definition at line 145 of file multiplyinglineeditor.cpp.

void MultiplyingLineEditor::setCompletionMode ( KGlobalSettings::Completion  mode)

Set completion mode for all lines.

Parameters
modethe completion mode

Definition at line 109 of file multiplyinglineeditor.cpp.

void MultiplyingLineEditor::setDynamicSizeHint ( bool  dynamic)

Sets whether the size hint of the editor shall be calculated dynamically by the number of lines.

Default is true.

Definition at line 155 of file multiplyinglineeditor.cpp.

int MultiplyingLineEditor::setFirstColumnWidth ( int  w)

Set the width of the left most column to be the argument width.

This method allows other widgets to align their label/combobox column with ours by communicating how many pixels that first column is for them.

Parameters
wwhat the left most column width should be
Returns
the width that is actually being used.

Definition at line 104 of file multiplyinglineeditor.cpp.

void MultiplyingLineEditor::setFocus ( )
slot

Definition at line 89 of file multiplyinglineeditor.cpp.

void MultiplyingLineEditor::setFocusBottom ( )
slot

Definition at line 99 of file multiplyinglineeditor.cpp.

void MultiplyingLineEditor::setFocusTop ( )
slot

Definition at line 94 of file multiplyinglineeditor.cpp.

void MultiplyingLineEditor::setFrameStyle ( int  shape)

Set the underlying view's frame shape, default is none.

Parameters
shapeof type QFrame::Shape

Definition at line 140 of file multiplyinglineeditor.cpp.

void KPIM::MultiplyingLineEditor::sizeHintChanged ( )
signal

Member Data Documentation

bool KPIM::MultiplyingLineEditor::mModified
protected

Definition at line 171 of file multiplyinglineeditor.h.

Property Documentation

bool MultiplyingLineEditor::autoResizeView
readwrite

Definition at line 76 of file multiplyinglineeditor.h.

bool MultiplyingLineEditor::dynamicSizeHint
readwrite

Definition at line 77 of file multiplyinglineeditor.h.


The documentation for this class was generated from the following files:
  • multiplyinglineeditor.h
  • multiplyinglineeditor.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:04 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