libkdepim
#include <multiplyingline.h>
Public Slots | |
void | slotPropagateDeletion () |
Signals | |
void | completionModeChanged (KGlobalSettings::Completion) |
void | deleteLine (KPIM::MultiplyingLine *) |
void | downPressed (KPIM::MultiplyingLine *) |
void | returnPressed (KPIM::MultiplyingLine *) |
void | rightPressed () |
void | upPressed (KPIM::MultiplyingLine *) |
Public Member Functions | |
MultiplyingLine (QWidget *parent) | |
virtual | ~MultiplyingLine () |
virtual void | aboutToBeDeleted () |
virtual void | activate ()=0 |
virtual void | clear ()=0 |
virtual void | clearModified ()=0 |
virtual MultiplyingLineData::Ptr | data () const =0 |
virtual void | fixTabOrder (QWidget *previous)=0 |
virtual bool | isActive () const =0 |
virtual bool | isEmpty () const =0 |
virtual bool | isModified () const =0 |
virtual void | moveCompletionPopup ()=0 |
virtual int | setColumnWidth (int w)=0 |
virtual void | setCompletionMode (KGlobalSettings::Completion mode)=0 |
virtual void | setData (const MultiplyingLineData::Ptr &data)=0 |
virtual QWidget * | tabOut () const =0 |
Protected Slots | |
void | slotFocusDown () |
void | slotFocusUp () |
void | slotReturnPressed () |
Protected Member Functions | |
virtual void | keyPressEvent (QKeyEvent *) |
Detailed Description
Abstract Base Class representing a line in the Multiplying line widget.
This class (and its subclasses) represent the lines in the MultiplyingLineEditor. Users of the MultiplyingLineEditor widget should subclass this class, and add their own input widgets as members, then implement the pure virtual methods and connect all the appropriate slots.
Definition at line 64 of file multiplyingline.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 31 of file multiplyingline.cpp.
|
inlinevirtual |
Definition at line 70 of file multiplyingline.h.
Member Function Documentation
|
virtual |
Re implement this method if you need to do something before a line is deleted.
Default implementation does nothing.
Definition at line 64 of file multiplyingline.cpp.
|
pure virtual |
This line is being activated.
Focus should be set on the first or most important widget in the line.
|
pure virtual |
Clear the contents of this line.
Reset to default state
|
pure virtual |
Resets the modified flag to false.
|
signal |
Emitted when the completion mode changes.
|
pure virtual |
Retrieve the data.
- Returns
- the data associated with this line.
|
signal |
Should be emitted when the line should be deleted.
|
signal |
Emitted when the down key is pressed.
|
pure virtual |
Used to set setup the correct chain of widgets to focus on when the user presses tab.
- Parameters
-
previous the previous widget (probably from the preceding line)
Example with a 3 widget line:
void YourLine::fixTabOrder( QWidget *previous ) { setTabOrder( previous, mLeftMost ); setTabOrder( mLeftMost, mMiddle); setTabOrder( mMiddle, mRightMost); }
|
pure virtual |
Check if whatever receives focus in activate() currently has focus.
- Returns
- true if this line is active
|
pure virtual |
Whether this line is empty or not.
Usually there is a primary widget that can be tested (such as a line edit).
- Returns
- true if this line is empty, false otherwise.
|
pure virtual |
Determine if this line was modified.
- Returns
- true if the user has made any modifications to this MultiplyingLine.
|
protectedvirtual |
Handles key press events on this line.
Default behavior handles Up and Down presses.
Definition at line 55 of file multiplyingline.cpp.
|
pure virtual |
If the view is resized while the completion popup is open, things might start to overlap.
This method should hide() then show() the completionBox for any currently visible completion boxes. (somewhat hacky) Example: void YourLine::moveCompletionPopup() { if( mLineEdit->completionBox( false ) ) { // check if box is not null without creating it if( mLineEdit->completionBox()->isVisible() ) { // check if it is currently being shown mLineEdit->completionBox()->hide(); // trigger the moving mLineEdit->completionBox()->show(); } }
|
signal |
Emitted when the return/enter key is pressed.
|
signal |
Emitted when the right key is pressed.
|
pure virtual |
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 the width to set the left most column to.
- Returns
- the width that is actually being used.
|
pure virtual |
Sets the type of completion to be used for KLineEdits in this line.
- Parameters
-
mode the completion mode
|
pure virtual |
Set the data of this line.
The containing widgets should be populated accordingly.
- Parameters
-
data the data to populate this line wit
|
protectedslot |
Definition at line 50 of file multiplyingline.cpp.
|
protectedslot |
Definition at line 45 of file multiplyingline.cpp.
|
slot |
Definition at line 40 of file multiplyingline.cpp.
|
protectedslot |
Definition at line 35 of file multiplyingline.cpp.
|
pure virtual |
- Returns
- The final widget in this line on which if the user presses tab focus should be given to the next line. This will commonly be used as the parameter of fixTabOrder( QWidget *previous ).
- See also
- fixTabOrder( QWidget *previous )
|
signal |
Emitted when the up key is pressed.
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.