Source Code (Use browser search to find items of interest.)
Class Index
abbrowser'FileAsComboBox (./kdepim/abbrowser/namevaluewidget.h:151)
class FileAsComboBox : public QComboBox
{
Q_OBJECT
public:
FileAsComboBox( QWidget *parent, const char *name, Entity *ce );
virtual void setName ( const char * name );
private:
Entity *ce;
public slots:
virtual void updateContact();
private slots:
void sync();
};
/*
A ContactComboBox object is a non-editable QComboBox like widget. Each
ContactComboBox has a buddy widget, normally a ContactLineEdit associated
with it.
Each item in ContactComboBox object has an Entity key associated
with it. When a new item is selected the buddy widget is renamed to
the value of the key associated with the selected item. This will result
in the buddy widget being associated with the new key.
A quick and dirty derivation. A ContactComboBox object isn't
substitutable for a QComboBox object.
*/
abbrowser'FileAsComboBox::FileAsComboBox() (./kdepim/abbrowser/namevaluewidget.cpp:179)
FileAsComboBox::FileAsComboBox( QWidget * parent,
const char * name,
Entity *ce )
: QComboBox( true, parent, name ), ce( ce )
{
//XXX connect( ce, SIGNAL( changed() ), this, SLOT( sync() ));
}
abbrowser'FileAsComboBox::updateContact() (./kdepim/abbrowser/namevaluewidget.cpp:187)
void FileAsComboBox::updateContact()
{
debug( "FileAsComboBox::focusOutEvent" );
debug( currentText() );
// ce->replace( QString( name()), currentText()); // XXX
}
abbrowser'FileAsComboBox::setName() (./kdepim/abbrowser/namevaluewidget.cpp:194)
void FileAsComboBox::setName( const char *name )
{
setEditText( "" );
QComboBox::setName( name );
sync();
}
abbrowser'FileAsComboBox::sync() (./kdepim/abbrowser/namevaluewidget.cpp:201)
void FileAsComboBox::sync()
{
Field f = ce->field(name());
if (f.isNull())
return;
QString value = f.value();
if ((!value.isEmpty()) && (value != currentText()))
setEditText( value );
}