[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/korganizer/views/todoview (silent)
From: Allen Winter <winter () kde ! org>
Date: 2008-04-30 20:28:59
Message-ID: 1209587339.206198.14038.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 802837 by winterz:
minor coding style
SVN_SILENT:
M +13 -11 kcheckcombobox.cpp
M +6 -6 kcheckcombobox.h
M +1 -4 kotododelegates.cpp
--- trunk/KDE/kdepim/korganizer/views/todoview/kcheckcombobox.cpp #802836:802837
@@ -31,7 +31,7 @@
#include <QLineEdit>
#include <QKeyEvent>
-KCheckComboBox::KCheckComboBox( QWidget* parent ) : QComboBox( parent )
+KCheckComboBox::KCheckComboBox( QWidget *parent ) : QComboBox( parent )
{
mSeparator = QLatin1String( "," );
mIgnoreHide = false;
@@ -53,11 +53,14 @@
}
KCheckComboBox::~KCheckComboBox()
-{}
+{
+}
void KCheckComboBox::hidePopup()
{
- if (!mIgnoreHide) QComboBox::hidePopup();
+ if ( !mIgnoreHide ) {
+ QComboBox::hidePopup();
+ }
mIgnoreHide = false;
}
@@ -78,14 +81,14 @@
QModelIndex index = model()->index( 0, modelColumn(), rootModelIndex() );
QModelIndexList indexes = model()->match( index, Qt::CheckStateRole,
Qt::Checked, -1, Qt::MatchExactly );
- foreach ( const QModelIndex& index, indexes ) {
+ foreach ( const QModelIndex &index, indexes ) {
items += index.data().toString();
}
}
return items;
}
-void KCheckComboBox::setCheckedItems( const QStringList& items )
+void KCheckComboBox::setCheckedItems( const QStringList &items )
{
for ( int r = 0; r < model()->rowCount( rootModelIndex() ); ++r ) {
QModelIndex indx = model()->index( r, modelColumn(), rootModelIndex() );
@@ -101,7 +104,7 @@
return mDefaultText;
}
-void KCheckComboBox::setDefaultText( const QString& text )
+void KCheckComboBox::setDefaultText( const QString &text )
{
if ( mDefaultText != text ) {
mDefaultText = text;
@@ -114,7 +117,7 @@
return mSeparator;
}
-void KCheckComboBox::setSeparator( const QString& separator )
+void KCheckComboBox::setSeparator( const QString &separator )
{
if ( mSeparator != separator ) {
mSeparator = separator;
@@ -122,16 +125,15 @@
}
}
-bool KCheckComboBox::eventFilter( QObject* receiver, QEvent* event )
+bool KCheckComboBox::eventFilter( QObject *receiver, QEvent *event )
{
- switch ( event->type() )
- {
+ switch ( event->type() ) {
case QEvent::KeyPress:
case QEvent::KeyRelease:
{
QKeyEvent* keyEvent = static_cast<QKeyEvent*>( event );
if ( receiver == this &&
- (keyEvent->key() == Qt::Key_Up || keyEvent->key() == Qt::Key_Down) ) {
+ ( keyEvent->key() == Qt::Key_Up || keyEvent->key() == Qt::Key_Down ) ) {
showPopup();
return true;
}
--- trunk/KDE/kdepim/korganizer/views/todoview/kcheckcombobox.h #802836:802837
@@ -37,29 +37,29 @@
Q_PROPERTY( QStringList checkedItems READ checkedItems WRITE setCheckedItems )
public:
- explicit KCheckComboBox( QWidget* parent = 0 );
+ explicit KCheckComboBox( QWidget *parent = 0 );
virtual ~KCheckComboBox();
virtual void hidePopup();
QString defaultText() const;
- void setDefaultText( const QString& text );
+ void setDefaultText( const QString &text );
Qt::CheckState itemCheckState( int index ) const;
void setItemCheckState( int index, Qt::CheckState state );
QString separator() const;
- void setSeparator( const QString& separator );
+ void setSeparator( const QString &separator );
QStringList checkedItems() const;
- virtual bool eventFilter( QObject* receiver, QEvent* event );
+ virtual bool eventFilter( QObject *receiver, QEvent *event );
public Q_SLOTS:
- void setCheckedItems( const QStringList& items );
+ void setCheckedItems( const QStringList &items );
Q_SIGNALS:
- void checkedItemsChanged( const QStringList& items );
+ void checkedItemsChanged( const QStringList &items );
private Q_SLOTS:
void updateCheckedItems( const QModelIndex &topLeft = QModelIndex(),
--- trunk/KDE/kdepim/korganizer/views/todoview/kotododelegates.cpp #802836:802837
@@ -84,7 +84,7 @@
// TODO QTreeView does not set State_Editing. Qt task id 205051
// check if a newer version of Qt fixes this
- if ( !(opt.state & QStyle::State_Editing) ) {
+ if ( !( opt.state & QStyle::State_Editing ) ) {
QRect rect = opt.rect;
rect.adjust( 4, 3, -6, -3 );
@@ -235,7 +235,6 @@
editor->setGeometry( option.rect );
}
-
// ---------------- DUE DATE DELEGATE ----------------------------
// ---------------------------------------------------------------
@@ -287,7 +286,6 @@
editor->setGeometry( option.rect );
}
-
// ---------------- CATEGORIES DELEGATE --------------------------
// ---------------------------------------------------------------
@@ -448,5 +446,4 @@
}
}
-
#include "kotododelegates.moc"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic