Scribus
Open source desktop publishing at your fingertips
TableSideSelector Class Reference

#include <tablesideselector.h>

Inheritance diagram for TableSideSelector:
Collaboration diagram for TableSideSelector:

Public Types

enum  Side {
  None = 0, Left = 1, Right = 2, Top = 4,
  Bottom = 8, All = Left | Right | Top | Bottom
}
 
enum  Style { CellStyle, TableStyle }
 

Signals

void selectionChanged ()
 Emitted when the selections has changed.
 

Public Member Functions

 TableSideSelector (QWidget *parent)
 Creates a new side selector with all sides selected.
 
Sides selection () const
 Returns the current selection as an ORed combination of enum flags.
 
QList< TableSideSelector::SideselectionList () const
 Returns the current selection as a list of enum values.
 
void setSelection (Sides selection)
 Sets the current selection to selection.
 
void clearSelection ()
 Clears the current selection.
 
Style style () const
 Returns the current style of the selector.
 
void setStyle (Style style)
 Sets the style of the selector to style.
 
QSize sizeHint () const
 Returns the size hint of the table side selector.
 
int heightForWidth (int width) const
 Returns width, as the selector is supposed to be square shaped.
 

Protected Member Functions

void paintEvent (QPaintEvent *event)
 Paints the table side selector.
 
void mousePressEvent (QMouseEvent *event)
 Toggles selection of the edge closest to mouse pointer.
 
void mouseMoveEvent (QMouseEvent *event)
 Highlights the edge closest to mouse pointer.
 
void leaveEvent (QEvent *event)
 Removes any highlighted edge.
 

Properties

Sides selection
 
Style style
 

Detailed Description

Simple square shaped widget for picking different sides of a cell or table.

Used when editing cell and table borders.

Member Enumeration Documentation

This enum describes the sides that can be selected. A selection can be expressed as an ORed combination of Left, Right, Top and Bottom.

Enumerator
None 

None of the sides are selected.

Left 

The left side is selected.

Right 

The right side is selected.

Top 

The top side is selected.

Bottom 

The bottom side is selected.

This enum describes two possible styles for the selector. If the cell style is used, the selector will resemble a cell. In the table style, a table.

Enumerator
CellStyle 

The selector will resemble a cell.

TableStyle 

The selector will resemble table.


The documentation for this class was generated from the following files: