libkdepim
#include <multiplyinglineeditor.h>
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
|
explicit |
Definition at line 33 of file multiplyinglineeditor.cpp.
|
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.
|
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
-
data The 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.
|
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.
|
signal |
|
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.
|
signal |
|
signal |
|
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
-
data The 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
-
resize turn 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
-
mode the 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
-
w what the left most column width should be
- Returns
- the width that is actually being used.
Definition at line 104 of file multiplyinglineeditor.cpp.
|
slot |
Definition at line 89 of file multiplyinglineeditor.cpp.
|
slot |
Definition at line 99 of file multiplyinglineeditor.cpp.
|
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
-
shape of type QFrame::Shape
Definition at line 140 of file multiplyinglineeditor.cpp.
|
signal |
Member Data Documentation
|
protected |
Definition at line 171 of file multiplyinglineeditor.h.
Property Documentation
|
readwrite |
Definition at line 76 of file multiplyinglineeditor.h.
|
readwrite |
Definition at line 77 of file multiplyinglineeditor.h.
The documentation for this class was generated from the following files:
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.