MessageList::Core::Theme::Column

Search for usage in LXR

MessageList::Core::Theme::Column Class Reference

#include <theme.h>

Classes

class  SharedRuntimeData
 

Public Member Functions

 Column ()
 
 Column (const Column &src)
 
 ~Column ()
 
void addGroupHeaderRow (Row *row)
 
void addMessageRow (Row *row)
 
bool containsTextItems () const
 
bool currentlyVisible () const
 
double currentWidth () const
 
void detach ()
 
const QList< Row * > & groupHeaderRows () const
 
void insertGroupHeaderRow (int idx, Row *row)
 
void insertMessageRow (int idx, Row *row)
 
bool isSenderOrReceiver () const
 
const QStringlabel () const
 
bool load (QDataStream &stream, int themeVersion)
 
const QList< Row * > & messageRows () const
 
SortOrder::MessageSorting messageSorting () const
 
const QStringpixmapName () const
 
void removeAllGroupHeaderRows ()
 
void removeAllMessageRows ()
 
void removeGroupHeaderRow (Row *row)
 
void removeMessageRow (Row *row)
 
void save (QDataStream &stream) const
 
void setCurrentlyVisible (bool currentlyVisible)
 
void setCurrentWidth (double currentWidth)
 
void setIsSenderOrReceiver (bool sor)
 
void setLabel (const QString &label)
 
void setMessageSorting (SortOrder::MessageSorting ms)
 
void setPixmapName (const QString &pixmapName)
 
void setVisibleByDefault (bool vbd)
 
bool visibleByDefault () const
 

Detailed Description

The Column class defines a view column available inside this theme.

Each Column has a list of Row items that define the visible rows.

Definition at line 500 of file theme.h.

Constructor & Destructor Documentation

◆ Column() [1/2]

Theme::Column::Column ( )
explicit

Create an empty column with default settings.

Definition at line 582 of file theme.cpp.

◆ Column() [2/2]

Theme::Column::Column ( const Column & src)
explicit

Create an exact copy of the column src.

The shared runtime data is not copied (only a reference is added). If you need to create an independent clone then please use detach() after the construction.

Definition at line 591 of file theme.cpp.

◆ ~Column()

Theme::Column::~Column ( )

Kill a column object.

Definition at line 610 of file theme.cpp.

Member Function Documentation

◆ addGroupHeaderRow()

void Theme::Column::addGroupHeaderRow ( Theme::Row * row)

Appends a group header row to this theme.

The Theme takes the ownership of the Row pointer.

Definition at line 724 of file theme.cpp.

◆ addMessageRow()

void Theme::Column::addMessageRow ( Theme::Row * row)

Appends a message row to this theme column.

The Theme takes the ownership of the Row pointer.

Definition at line 712 of file theme.cpp.

◆ containsTextItems()

bool Theme::Column::containsTextItems ( ) const
nodiscard

Returns true if this column contains text items.

This is useful if you want to know if the column should just get its minimum allowable space or it should get more.

Definition at line 762 of file theme.cpp.

◆ currentlyVisible()

bool Theme::Column::currentlyVisible ( ) const
nodiscard

Returns the current shared visibility state for this column.

This state is shared between all the instances of this theme.

Definition at line 680 of file theme.cpp.

◆ currentWidth()

double Theme::Column::currentWidth ( ) const
nodiscard

Returns the current shared width setting for this column or -1 if the width is not specified and should be auto-determined.

This state is shared between all the instances of this theme.

Definition at line 690 of file theme.cpp.

◆ detach()

void Theme::Column::detach ( )

Detaches the shared runtime data object and makes this object totally independent.

The shared runtime data is initialized to default values.

Definition at line 659 of file theme.cpp.

◆ groupHeaderRows()

const QList< Theme::Row * > & Theme::Column::groupHeaderRows ( ) const
nodiscard

Returns the list of rows visible in this column for a GroupHeaderItem.

Definition at line 743 of file theme.cpp.

◆ insertGroupHeaderRow()

void Theme::Column::insertGroupHeaderRow ( int idx,
Row * row )

Inserts a group header row to this theme column in the specified position.

The Theme takes the ownership of the Row pointer.

Definition at line 748 of file theme.cpp.

◆ insertMessageRow()

void Theme::Column::insertMessageRow ( int idx,
Row * row )

Inserts a message row to this theme column in the specified position.

The Theme takes the ownership of the Row pointer.

Definition at line 729 of file theme.cpp.

◆ isSenderOrReceiver()

bool Theme::Column::isSenderOrReceiver ( ) const
nodiscard

Returns true if this column is marked as "sender/receiver" and we should update its label on-the-fly.

Definition at line 639 of file theme.cpp.

◆ label()

const QString & Theme::Column::label ( ) const
nodiscard

Returns the label set for this column.

Definition at line 619 of file theme.cpp.

◆ load()

bool Theme::Column::load ( QDataStream & stream,
int themeVersion )

Handles column loading (used by Theme::load())

Definition at line 806 of file theme.cpp.

◆ messageRows()

const QList< Theme::Row * > & Theme::Column::messageRows ( ) const
nodiscard

Returns the list of rows visible in this column for a MessageItem.

Definition at line 700 of file theme.cpp.

◆ messageSorting()

SortOrder::MessageSorting Theme::Column::messageSorting ( ) const
nodiscard

Returns the sort order for messages that we should switch to when clicking on this column's header (if visible at all).

Definition at line 670 of file theme.cpp.

◆ pixmapName()

const QString & Theme::Column::pixmapName ( ) const
nodiscard

Returns the icon's name (used in SmallIcon) set for this column.

Definition at line 629 of file theme.cpp.

◆ removeAllGroupHeaderRows()

void Theme::Column::removeAllGroupHeaderRows ( )

Removes all the group header rows from this column.

Definition at line 717 of file theme.cpp.

◆ removeAllMessageRows()

void Theme::Column::removeAllMessageRows ( )

Removes all the message rows from this column.

Definition at line 705 of file theme.cpp.

◆ removeGroupHeaderRow()

void Theme::Column::removeGroupHeaderRow ( Theme::Row * row)

Removes the specified group header row.

The row is NOT deleted.

Definition at line 757 of file theme.cpp.

◆ removeMessageRow()

void Theme::Column::removeMessageRow ( Theme::Row * row)

Removes the specified message row.

The row is NOT deleted.

Definition at line 738 of file theme.cpp.

◆ save()

void Theme::Column::save ( QDataStream & stream) const

Handles column saving (used by Theme::save())

Definition at line 777 of file theme.cpp.

◆ setCurrentlyVisible()

void Theme::Column::setCurrentlyVisible ( bool currentlyVisible)

Sets the current shared visibility state for this column.

This state is shared between all the instances of this theme.

Definition at line 685 of file theme.cpp.

◆ setCurrentWidth()

void Theme::Column::setCurrentWidth ( double currentWidth)

Sets the current shared width setting for this column.

This state is shared between all the instances of this theme.

Definition at line 695 of file theme.cpp.

◆ setIsSenderOrReceiver()

void Theme::Column::setIsSenderOrReceiver ( bool sor)

Marks this column as containing the "sender/receiver" field.

Such columns will have the label automatically updated.

Definition at line 644 of file theme.cpp.

◆ setLabel()

void Theme::Column::setLabel ( const QString & label)

Sets the label for this column.

Definition at line 624 of file theme.cpp.

◆ setMessageSorting()

void Theme::Column::setMessageSorting ( SortOrder::MessageSorting ms)

Sets the sort order for messages that we should switch to when clicking on this column's header (if visible at all).

Definition at line 675 of file theme.cpp.

◆ setPixmapName()

void Theme::Column::setPixmapName ( const QString & pixmapName)

Sets the icon's name (used in SmallIcon) for this column.

Definition at line 634 of file theme.cpp.

◆ setVisibleByDefault()

void Theme::Column::setVisibleByDefault ( bool vbd)

Sets the "visible by default" tag for this column.

Definition at line 654 of file theme.cpp.

◆ visibleByDefault()

bool Theme::Column::visibleByDefault ( ) const
nodiscard

Returns true if this column has to be shown by default.

Definition at line 649 of file theme.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 19 2024 11:56:57 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.