void KFFWin_Flightplan::showFavoriteContextMenu( const QPoint &pos ) { KIconLoader loader; QPixmap pixmap; QIcon icon; QAction* remove; QAction* clear; QAction* edit; QAction* moveup; QAction* movedown; QAction* calc; KMenu menu( this ); pixmap = loader.loadIcon( "edit-delete", KIconLoader::Small ); icon.addPixmap( pixmap ); remove = new QAction( icon, i18n( "&Remove waypoint" ), this ); remove->setStatusTip( i18n( "Remove this waypoint" ) ); connect( remove, SIGNAL( triggered() ), this, SLOT( removeNavaids() ) ); pixmap = loader.loadIcon( "edit-clear-list", KIconLoader::Small ); icon.addPixmap( pixmap ); clear = new QAction( icon, i18n( "&Clear all waypoints" ), this ); clear->setStatusTip( i18n( "Clear waypoint list" ) ); connect( clear, SIGNAL( triggered() ), ui_widget.treewidget_navaids, SLOT( clear() ) ); pixmap = loader.loadIcon( "edit-rename", KIconLoader::Small ); icon.addPixmap( pixmap ); edit = new QAction( icon, i18n( "&Edit waypoint altitude" ), this ); edit->setStatusTip( i18n( "Edit this waypoint" ) ); connect( edit, SIGNAL( triggered() ), this, SLOT( edit() ) ); pixmap = loader.loadIcon( "arrow-up", KIconLoader::Small ); icon.addPixmap( pixmap ); moveup = new QAction( icon, i18n( "&Move waypoint up" ), this ); moveup->setStatusTip( i18n( "Move this waypoint up" ) ); connect( moveup, SIGNAL( triggered() ), this, SLOT( moveItemUp() ) ); pixmap = loader.loadIcon( "arrow-down", KIconLoader::Small ); icon.addPixmap( pixmap ); movedown = new QAction( icon, i18n( "&Move waypoint down" ), this ); movedown->setStatusTip( i18n( "Move this waypoint down" ) ); connect( movedown, SIGNAL( triggered() ), this, SLOT( moveItemDown() ) ); pixmap = loader.loadIcon( "view-refresh", KIconLoader::Small ); icon.addPixmap( pixmap ); calc = new QAction( icon, i18n( "&Recalculate Distance" ), this ); calc->setStatusTip( i18n( "Force recalculate distance between all waypoints" ) ); connect( calc, SIGNAL( triggered() ), this, SLOT( recalculate() ) ); menu.addAction( remove ); menu.addAction( edit ); menu.addSeparator(); menu.addAction( clear ); menu.addSeparator(); menu.addAction( moveup ); menu.addAction( movedown ); menu.addSeparator(); menu.addAction( calc ); menu.exec( mapToGlobal( pos + ui_widget.treewidget_navaids->pos() ) ); }
BasicmLearningEditor::BasicmLearningEditor(TemplateCore *core, QWidget *parent) : TemplateEditor(core, parent), m_ui(new Ui::BasicmLearningEditor) { m_ui->setupUi(this); // Set validators. QRegExpValidator *author_validator = new QRegExpValidator(this); QRegExpValidator *title_validator = new QRegExpValidator(this); author_validator->setRegExp(QRegExp(".{,50}")); title_validator->setRegExp(QRegExp(".{,100}")); m_ui->m_txtAuthor->lineEdit()->setValidator(author_validator); m_ui->m_txtName->lineEdit()->setValidator(title_validator); // Set tab order. QList<QWidget*> tab_order_widgets; tab_order_widgets << m_ui->m_txtTitle->lineEdit() << m_ui->m_txtDescription << m_ui->m_txtAuthor->lineEdit() << m_ui->m_txtName->lineEdit() << m_ui->m_listItems << m_ui->m_btnItemAdd << m_ui->m_btnItemRemove << m_ui->m_btnItemUp << m_ui->m_btnItemDown; for (int i = 1; i < tab_order_widgets.size(); i++) { setTabOrder(tab_order_widgets.at(i - 1), tab_order_widgets.at(i)); } m_ui->m_txtTitle->lineEdit()->setPlaceholderText(tr("Title of the item")); m_ui->m_txtNumberOfItems->lineEdit()->setEnabled(false); m_ui->m_txtAuthor->lineEdit()->setPlaceholderText(tr("Author of this collection")); m_ui->m_txtName->lineEdit()->setPlaceholderText(tr("Name of this collection")); IconFactory *factory = IconFactory::instance(); m_ui->m_btnItemAdd->setIcon(factory->fromTheme("item-add")); m_ui->m_btnItemRemove->setIcon(factory->fromTheme("item-remove")); m_ui->m_btnItemUp->setIcon(factory->fromTheme("move-up")); m_ui->m_btnItemDown->setIcon(factory->fromTheme("move-down")); connect(m_ui->m_txtTitle->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(checkTitle(QString))); connect(m_ui->m_btnItemAdd, SIGNAL(clicked()), this, SLOT(addNewItem())); connect(m_ui->m_btnItemRemove, SIGNAL(clicked()), this, SLOT(removeSelectedItem())); connect(m_ui->m_txtDescription, SIGNAL(textChanged()), this, SLOT(saveItem())); connect(m_ui->m_txtTitle->lineEdit(), SIGNAL(textEdited(QString)), this, SLOT(saveItem())); connect(m_ui->m_listItems, SIGNAL(currentRowChanged(int)), this, SLOT(displayItem(int))); connect(m_ui->m_btnItemUp, SIGNAL(clicked()), this, SLOT(moveItemUp())); connect(m_ui->m_btnItemDown, SIGNAL(clicked()), this, SLOT(moveItemDown())); connect(m_ui->m_txtAuthor->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(onAuthorChanged(QString))); connect(m_ui->m_txtName->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(onNameChanged(QString))); checkTitle(m_ui->m_txtTitle->lineEdit()->text()); checkAuthor(); checkName(); setEditorsEnabled(false); updateItemCount(); }
ParameterProperties::ParameterProperties(QWidget* parent, Qt::WindowFlags fl) : QDialog(parent, fl) { setupUi(this); connect(_listDelete, SIGNAL(clicked()), this, SLOT(deleteItem())); connect(_listDown, SIGNAL(clicked()), this, SLOT(moveItemDown())); connect(_listEdit, SIGNAL(clicked()), this, SLOT(editItem())); connect(_listNew, SIGNAL(clicked()), this, SLOT(newItem())); connect(_listUp, SIGNAL(clicked()), this, SLOT(moveItemUp())); _int->setValidator(new QIntValidator(this)); _double->setValidator(new QDoubleValidator(this)); }
void PlaylistDock::setupActions() { QAction *deleteAllAction = new QAction(this); deleteAllAction->setText(i18n("Clear playlist")); deleteAllAction->setIcon(KIcon("edit-clear-list")); connect(deleteAllAction, SIGNAL(triggered()), this, SLOT(deleteAll())); QAction *addItemAction = new QAction(this); addItemAction->setText(i18n("Add file(s)")); addItemAction->setIcon(KIcon("list-add")); connect(addItemAction, SIGNAL(triggered()), parent, SLOT(addFile())); QAction *deleteItemAction = new QAction(this); deleteItemAction->setText(i18n("Clear selected")); deleteItemAction->setIcon(KIcon("list-remove")); connect(deleteItemAction, SIGNAL(triggered()), this, SLOT(deleteItem())); QAction* moveItemUpAction = new QAction(this); moveItemUpAction->setText(i18n("Move up")); moveItemUpAction->setIcon(KIcon("arrow-up")); connect(moveItemUpAction, SIGNAL(triggered()), this, SLOT(moveItemUp())); QAction* moveItemDownAction = new QAction(this); moveItemDownAction->setText(i18n("Move down")); moveItemDownAction->setIcon(KIcon("arrow-down")); connect(moveItemDownAction, SIGNAL(triggered()), this, SLOT(moveItemDown())); QAction* skipForwardAction = new QAction(this); skipForwardAction->setText(i18n("Playlist Skip Forward")); skipForwardAction->setIcon(KIcon("media-skip-forward")); connect(skipForwardAction, SIGNAL(triggered()), parent, SLOT(skipForward())); QAction* skipBackwardAction = new QAction(this); skipBackwardAction->setText(i18n("Playlist Skip Backward")); skipBackwardAction->setIcon(KIcon("media-skip-backward")); connect(skipBackwardAction, SIGNAL(triggered()), parent, SLOT(skipBackward())); toolbar = new QToolBar(this); toolbar->setToolButtonStyle(Qt::ToolButtonIconOnly); toolbar->setIconSize(QSize(16, 16)); toolbar->setObjectName("playlisttoolbar"); toolbar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); toolbar->addAction(deleteAllAction); toolbar->addAction(addItemAction); toolbar->addAction(deleteItemAction); toolbar->addAction(moveItemUpAction); toolbar->addAction(moveItemDownAction); toolbar->addAction(skipBackwardAction); toolbar->addAction(skipForwardAction); }
/* * Constructs a ListEdit as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * true to construct a modal dialog. */ ListEdit::ListEdit(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : QDialog(parent, name, modal, fl) { setupUi(this); // signals and slots connections connect(_ok, SIGNAL(clicked()), this, SLOT(accept())); connect(_cancel, SIGNAL(clicked()), this, SLOT(reject())); connect(_new, SIGNAL(clicked()), this, SLOT(newItem())); connect(_up, SIGNAL(clicked()), this, SLOT(moveItemUp())); connect(_edit, SIGNAL(clicked()), this, SLOT(editItem())); connect(_down, SIGNAL(clicked()), this, SLOT(moveItemDown())); connect(_delete, SIGNAL(clicked()), this, SLOT(deleteItem())); }
bool ListBoxEditor::qt_invoke( int _id, QUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: insertNewItem(); break; case 1: deleteCurrentItem(); break; case 2: currentItemChanged((QListBoxItem*)static_QUType_ptr.get(_o+1)); break; case 3: currentTextChanged((const QString&)static_QUType_QString.get(_o+1)); break; case 4: okClicked(); break; case 5: cancelClicked(); break; case 6: applyClicked(); break; case 7: choosePixmap(); break; case 8: moveItemUp(); break; case 9: moveItemDown(); break; case 10: deletePixmap(); break; default: return ListBoxEditorBase::qt_invoke( _id, _o ); } return TRUE; }
void Showplan::draw() { QString path = DPSDIR; grpFrame = new QGroupBox( this, "grpShowplan" ); grpFrame->setGeometry( QRect( 0, 0, 470, 670 ) ); QFont grpFrame_font( grpFrame->font() ); grpFrame_font.setFamily( "Sans Serif" ); grpFrame_font.setPointSize( 16 ); grpFrame_font.setBold( TRUE ); grpFrame->setFont( grpFrame_font ); grpFrame->setFrameShadow( QGroupBox::Sunken ); grpFrame->setLineWidth( 1 ); grpFrame->setFlat( FALSE ); grpFrame->setTitle( "Showplan" ); lstShowPlan = new QListView( grpFrame, "lstShowPlan" ); lstShowPlan->addColumn( tr( "Item" ) ); lstShowPlan->header()->setClickEnabled( FALSE, lstShowPlan->header()->count() - 1 ); lstShowPlan->header()->setResizeEnabled( FALSE, lstShowPlan->header()->count() - 1 ); lstShowPlan->setGeometry( QRect( 10, 20, 450, 580 ) ); lstShowPlan->setPaletteBackgroundColor( QColor( 255, 255, 255 ) ); QFont lstShowPlan_font( lstShowPlan->font() ); lstShowPlan_font.setPointSize( 10 ); lstShowPlan_font.setBold( FALSE ); lstShowPlan->setFont( lstShowPlan_font ); lstShowPlan->setFrameShape( QListView::Box ); lstShowPlan->setFrameShadow( QListView::Plain ); lstShowPlan->setVScrollBarMode( QListView::AlwaysOn ); lstShowPlan->setHScrollBarMode( QListView::AlwaysOff ); lstShowPlan->setAllColumnsShowFocus( TRUE ); lstShowPlan->setResizeMode( QListView::NoColumn ); lstShowPlan->setColumnWidth(0,lstShowPlan->width() - 5); lstShowPlan->setSorting(-1); lstShowPlan->header()->hide(); btnMoveTop = new QPushButton( grpFrame, "btnMoveTop" ); btnMoveTop->setAutoDefault( FALSE ); btnMoveTop->setGeometry( QRect( 10, 600, 75, 60 ) ); btnMoveTop->setEnabled( FALSE ); btnMoveTop->setPixmap(QPixmap(path + "/images/movetop32.png")); btnMoveUp = new QPushButton( grpFrame, "btnMoveUp" ); btnMoveUp->setAutoDefault( FALSE ); btnMoveUp->setGeometry( QRect( 85, 600, 75, 60 ) ); btnMoveUp->setEnabled( FALSE ); btnMoveUp->setPixmap(QPixmap(path + "/images/moveup32.png")); btnDelete = new QPushButton( grpFrame, "btnDelete" ); btnDelete->setAutoDefault( FALSE ); btnDelete->setGeometry( QRect( 160, 600, 75, 60 ) ); btnDelete->setEnabled( FALSE ); btnDelete->setPixmap(QPixmap(path + "/images/delete48.png")); btnClear = new QPushButton( grpFrame, "btnClear" ); btnClear->setAutoDefault( FALSE ); btnClear->setGeometry( QRect( 235, 600, 75, 60 ) ); btnClear->setPixmap(QPixmap(path + "/images/clear32.png")); btnMoveBottom = new QPushButton( grpFrame, "btnMoveBottom" ); btnMoveBottom->setAutoDefault( FALSE ); btnMoveBottom->setGeometry( QRect( 385, 600, 75, 60 ) ); btnMoveBottom->setEnabled( FALSE ); btnMoveBottom->setPixmap(QPixmap(path + "/images/movebottom32.png")); btnMoveDown = new QPushButton( grpFrame, "btnMoveDown" ); btnMoveDown->setAutoDefault( FALSE ); btnMoveDown->setGeometry( QRect( 310, 600, 75, 60 ) ); btnMoveDown->setEnabled( FALSE ); btnMoveDown->setPixmap(QPixmap(path + "/images/movedown32.png")); connect( btnDelete, SIGNAL( clicked() ), this, SLOT( removeItem() )); connect( btnMoveBottom, SIGNAL( clicked() ), this, SLOT( moveItemBottom() )); connect( btnMoveDown, SIGNAL( clicked() ), this, SLOT( moveItemDown() )); connect( btnMoveTop, SIGNAL( clicked() ), this, SLOT( moveItemTop() )); connect( btnMoveUp, SIGNAL( clicked() ), this, SLOT( moveItemUp() )); connect( btnClear, SIGNAL( clicked() ), this, SLOT( clearItems() )); connect( lstShowPlan, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( selectionChanged(QListViewItem*) )); connect( lstShowPlan, SIGNAL( clicked(QListViewItem*) ), this, SLOT( clicked(QListViewItem*) )); connect( lstShowPlan, SIGNAL( doubleClicked(QListViewItem*, const QPoint&, int)), this, SLOT( doubleClicked(QListViewItem*, const QPoint&, int))); }
KFFWin_Flightplan::KFFWin_Flightplan( QWidget *parent ) : QWidget( parent ) { KIconLoader loader; QPixmap pixmap; QIcon icon; QRect rect; rect = QApplication::desktop()->screenGeometry(); if ( rect.width() >= 1280 ) { setMinimumWidth( 1280 ); } ui_widget.setupUi( this ); qRegisterMetaType<NavDataList>(); m_editing = false; pixmap = loader.loadIcon( "arrow-left", KIconLoader::Toolbar ); icon.addPixmap( pixmap ); ui_widget.kpushbutton_next->setIcon( icon ); pixmap = loader.loadIcon( "arrow-right", KIconLoader::Toolbar ); icon.addPixmap( pixmap ); ui_widget.kpushbutton_previous->setIcon( icon ); m_progress = 0; m_thread = new NavThread(); ui_widget.kpushbutton_previous->setEnabled( false ); ui_widget.kpushbutton_next->setEnabled( false ); connect( m_thread, SIGNAL( finished( NavDataList ) ), SLOT( loadFinished( NavDataList ) ) ); connect( m_thread, SIGNAL( progress() ), SLOT( incrementProgress() ) ); connect( ui_widget.pushbutton_search, SIGNAL( clicked() ), SLOT( search() ) ); connect( ui_widget.lineEdit_search, SIGNAL( returnPressed() ), SLOT( search() ) ); connect( ui_widget.pushbutton_add, SIGNAL( clicked() ), SLOT( add() ) ); connect( ui_widget.kpushbutton_next, SIGNAL( clicked() ), SLOT( next() ) ); connect( ui_widget.kpushbutton_previous, SIGNAL( clicked() ), SLOT( previous() ) ); connect( ui_widget.pushbutton_open, SIGNAL( clicked() ), SLOT( open() ) ); connect( ui_widget.pushbutton_save, SIGNAL( clicked() ), SLOT( save() ) ); ui_widget.treewidget_navaids->setContextMenuPolicy( Qt::CustomContextMenu ); connect( ui_widget.treewidget_navaids, SIGNAL( customContextMenuRequested( const QPoint & ) ), this, SLOT( showFavoriteContextMenu( const QPoint & ) ) ); connect( ui_widget.treewidget_navaids, SIGNAL( itemActivated( QTreeWidgetItem*, int ) ), this, SLOT( itemActivated( QTreeWidgetItem*, int ) ) ); connect( ui_widget.toolButton_up, SIGNAL( clicked() ), SLOT( moveItemUp() ) ); connect( ui_widget.toolButton_down, SIGNAL( clicked() ), SLOT( moveItemDown() ) ); connect( ui_widget.treewidget_navaids, SIGNAL( currentItemChanged( QTreeWidgetItem *, QTreeWidgetItem * ) ), this, SLOT( saveSettings() ) ); }
/* * Constructs a ListBoxEditorBase as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ ListBoxEditorBase::ListBoxEditorBase( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "ListBoxEditorBase" ); setSizeGripEnabled( TRUE ); ListBoxEditorBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "ListBoxEditorBaseLayout"); Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1"); helpButton = new QPushButton( this, "helpButton" ); helpButton->setAutoDefault( TRUE ); Layout1->addWidget( helpButton ); Horizontal_Spacing2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); Layout1->addItem( Horizontal_Spacing2 ); buttonApply = new QPushButton( this, "buttonApply" ); buttonApply->setAutoDefault( TRUE ); Layout1->addWidget( buttonApply ); buttonOk = new QPushButton( this, "buttonOk" ); buttonOk->setAutoDefault( TRUE ); buttonOk->setDefault( TRUE ); Layout1->addWidget( buttonOk ); buttonCancel = new QPushButton( this, "buttonCancel" ); buttonCancel->setAutoDefault( TRUE ); Layout1->addWidget( buttonCancel ); ListBoxEditorBaseLayout->addMultiCellLayout( Layout1, 5, 5, 0, 2 ); preview = new QListBox( this, "preview" ); ListBoxEditorBaseLayout->addMultiCellWidget( preview, 0, 4, 0, 0 ); GroupBox1 = new QGroupBox( this, "GroupBox1" ); GroupBox1->setColumnLayout(0, Qt::Vertical ); GroupBox1->layout()->setSpacing( 6 ); GroupBox1->layout()->setMargin( 11 ); GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); GroupBox1Layout->setAlignment( Qt::AlignTop ); Label2 = new QLabel( GroupBox1, "Label2" ); GroupBox1Layout->addWidget( Label2, 1, 0 ); itemPixmap = new QLabel( GroupBox1, "itemPixmap" ); GroupBox1Layout->addWidget( itemPixmap, 1, 1 ); itemDeletePixmap = new QPushButton( GroupBox1, "itemDeletePixmap" ); itemDeletePixmap->setMaximumSize( QSize( 30, 22 ) ); itemDeletePixmap->setPixmap( QPixmap::fromMimeSource( "designer_s_editcut.png" ) ); GroupBox1Layout->addWidget( itemDeletePixmap, 1, 2 ); itemChoosePixmap = new QPushButton( GroupBox1, "itemChoosePixmap" ); itemChoosePixmap->setMaximumSize( QSize( 30, 22 ) ); GroupBox1Layout->addWidget( itemChoosePixmap, 1, 3 ); Label1 = new QLabel( GroupBox1, "Label1" ); GroupBox1Layout->addWidget( Label1, 0, 0 ); itemText = new QLineEdit( GroupBox1, "itemText" ); itemText->setMinimumSize( QSize( 0, 0 ) ); GroupBox1Layout->addMultiCellWidget( itemText, 0, 0, 1, 3 ); ListBoxEditorBaseLayout->addMultiCellWidget( GroupBox1, 0, 4, 2, 2 ); itemNew = new QPushButton( this, "itemNew" ); ListBoxEditorBaseLayout->addWidget( itemNew, 0, 1 ); itemDelete = new QPushButton( this, "itemDelete" ); ListBoxEditorBaseLayout->addWidget( itemDelete, 1, 1 ); Vertical_Spacing1 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); ListBoxEditorBaseLayout->addItem( Vertical_Spacing1, 2, 1 ); itemUp = new QPushButton( this, "itemUp" ); itemUp->setPixmap( QPixmap::fromMimeSource( "designer_s_up.png" ) ); ListBoxEditorBaseLayout->addWidget( itemUp, 3, 1 ); itemDown = new QPushButton( this, "itemDown" ); itemDown->setPixmap( QPixmap::fromMimeSource( "designer_s_down.png" ) ); ListBoxEditorBaseLayout->addWidget( itemDown, 4, 1 ); languageChange(); resize( QSize(482, 229).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( itemNew, SIGNAL( clicked() ), this, SLOT( insertNewItem() ) ); connect( itemDelete, SIGNAL( clicked() ), this, SLOT( deleteCurrentItem() ) ); connect( itemText, SIGNAL( textChanged( const QString & ) ), this, SLOT( currentTextChanged(const QString&) ) ); connect( buttonOk, SIGNAL( clicked() ), this, SLOT( okClicked() ) ); connect( buttonApply, SIGNAL( clicked() ), this, SLOT( applyClicked() ) ); connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( cancelClicked() ) ); connect( itemChoosePixmap, SIGNAL( clicked() ), this, SLOT( choosePixmap() ) ); connect( itemDeletePixmap, SIGNAL( clicked() ), this, SLOT( deletePixmap() ) ); connect( itemUp, SIGNAL( clicked() ), this, SLOT( moveItemUp() ) ); connect( itemDown, SIGNAL( clicked() ), this, SLOT( moveItemDown() ) ); connect( preview, SIGNAL( selectionChanged(QListBoxItem*) ), this, SLOT( currentItemChanged(QListBoxItem*) ) ); connect( preview, SIGNAL( currentChanged( QListBoxItem * ) ), this, SLOT( currentItemChanged(QListBoxItem*) ) ); // tab order setTabOrder( buttonOk, buttonCancel ); setTabOrder( buttonCancel, preview ); setTabOrder( preview, itemNew ); setTabOrder( itemNew, itemDelete ); setTabOrder( itemDelete, itemUp ); setTabOrder( itemUp, itemDown ); setTabOrder( itemDown, itemText ); setTabOrder( itemText, itemDeletePixmap ); setTabOrder( itemDeletePixmap, itemChoosePixmap ); setTabOrder( itemChoosePixmap, helpButton ); setTabOrder( helpButton, buttonApply ); // buddies Label2->setBuddy( itemChoosePixmap ); Label1->setBuddy( itemText ); init(); }