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

libkdepim

  • KPIM
  • MultiplyingLine
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KPIM::MultiplyingLine Class Referenceabstract

#include <multiplyingline.h>

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

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.

Author
Casey Link

Definition at line 64 of file multiplyingline.h.

Constructor & Destructor Documentation

MultiplyingLine::MultiplyingLine ( QWidget *  parent)
explicit

Definition at line 31 of file multiplyingline.cpp.

virtual KPIM::MultiplyingLine::~MultiplyingLine ( )
inlinevirtual

Definition at line 70 of file multiplyingline.h.

Member Function Documentation

void MultiplyingLine::aboutToBeDeleted ( )
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.

virtual void KPIM::MultiplyingLine::activate ( )
pure virtual

This line is being activated.

Focus should be set on the first or most important widget in the line.

virtual void KPIM::MultiplyingLine::clear ( )
pure virtual

Clear the contents of this line.

Reset to default state

virtual void KPIM::MultiplyingLine::clearModified ( )
pure virtual

Resets the modified flag to false.

void KPIM::MultiplyingLine::completionModeChanged ( KGlobalSettings::Completion  )
signal

Emitted when the completion mode changes.

virtual MultiplyingLineData::Ptr KPIM::MultiplyingLine::data ( ) const
pure virtual

Retrieve the data.

Returns
the data associated with this line.
void KPIM::MultiplyingLine::deleteLine ( KPIM::MultiplyingLine *  )
signal

Should be emitted when the line should be deleted.

void KPIM::MultiplyingLine::downPressed ( KPIM::MultiplyingLine *  )
signal

Emitted when the down key is pressed.

virtual void KPIM::MultiplyingLine::fixTabOrder ( QWidget *  previous)
pure virtual

Used to set setup the correct chain of widgets to focus on when the user presses tab.

Parameters
previousthe 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); }

virtual bool KPIM::MultiplyingLine::isActive ( ) const
pure virtual

Check if whatever receives focus in activate() currently has focus.

Returns
true if this line is active
virtual bool KPIM::MultiplyingLine::isEmpty ( ) const
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.
virtual bool KPIM::MultiplyingLine::isModified ( ) const
pure virtual

Determine if this line was modified.

Returns
true if the user has made any modifications to this MultiplyingLine.
void MultiplyingLine::keyPressEvent ( QKeyEvent *  ev)
protectedvirtual

Handles key press events on this line.

Default behavior handles Up and Down presses.

Definition at line 55 of file multiplyingline.cpp.

virtual void KPIM::MultiplyingLine::moveCompletionPopup ( )
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(); } }

void KPIM::MultiplyingLine::returnPressed ( KPIM::MultiplyingLine *  )
signal

Emitted when the return/enter key is pressed.

void KPIM::MultiplyingLine::rightPressed ( )
signal

Emitted when the right key is pressed.

virtual int KPIM::MultiplyingLine::setColumnWidth ( int  w)
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
wthe width to set the left most column to.
Returns
the width that is actually being used.
virtual void KPIM::MultiplyingLine::setCompletionMode ( KGlobalSettings::Completion  mode)
pure virtual

Sets the type of completion to be used for KLineEdits in this line.

Parameters
modethe completion mode
virtual void KPIM::MultiplyingLine::setData ( const MultiplyingLineData::Ptr &  data)
pure virtual

Set the data of this line.

The containing widgets should be populated accordingly.

Parameters
datathe data to populate this line wit
void MultiplyingLine::slotFocusDown ( )
protectedslot

Definition at line 50 of file multiplyingline.cpp.

void MultiplyingLine::slotFocusUp ( )
protectedslot

Definition at line 45 of file multiplyingline.cpp.

void MultiplyingLine::slotPropagateDeletion ( )
slot

Definition at line 40 of file multiplyingline.cpp.

void MultiplyingLine::slotReturnPressed ( )
protectedslot

Definition at line 35 of file multiplyingline.cpp.

virtual QWidget* KPIM::MultiplyingLine::tabOut ( ) const
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 )
void KPIM::MultiplyingLine::upPressed ( KPIM::MultiplyingLine *  )
signal

Emitted when the up key is pressed.


The documentation for this class was generated from the following files:
  • multiplyingline.h
  • multiplyingline.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