本文整理汇总了C++中QAccel::connectItem方法的典型用法代码示例。如果您正苦于以下问题:C++ QAccel::connectItem方法的具体用法?C++ QAccel::connectItem怎么用?C++ QAccel::connectItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QAccel
的用法示例。
在下文中一共展示了QAccel::connectItem方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createMenu
void KMix::createMenu()
{
QAccel *qAcc = new QAccel( this );
// Global "Help"-Key
qAcc->connectItem( qAcc->insertItem(Key_F1),this, SLOT(launchHelpCB()));
qAcc->connectItem( qAcc->insertItem(Key_1), this, SLOT(slotReadSet1()));
qAcc->connectItem( qAcc->insertItem(Key_2), this, SLOT(slotReadSet2()));
qAcc->connectItem( qAcc->insertItem(Key_3), this, SLOT(slotReadSet3()));
qAcc->connectItem( qAcc->insertItem(Key_4), this, SLOT(slotReadSet4()));
qAcc->connectItem( qAcc->insertItem(CTRL+Key_1), this, SLOT(slotWriteSet1()));
qAcc->connectItem( qAcc->insertItem(CTRL+Key_2), this, SLOT(slotWriteSet2()));
qAcc->connectItem( qAcc->insertItem(CTRL+Key_3), this, SLOT(slotWriteSet3()));
qAcc->connectItem( qAcc->insertItem(CTRL+Key_4), this, SLOT(slotWriteSet4()));
Mfile = new QPopupMenu;
CHECK_PTR( Mfile );
Mfile->insertItem(i18n("&Hide Menubar") , this, SLOT(hideMenubarCB()) , CTRL+Key_M);
qAcc->connectItem( qAcc->insertItem(CTRL+Key_M),this, SLOT(hideMenubarCB()));
Mfile->insertItem(i18n("&Tickmarks On/Off"), this, SLOT(tickmarksTogCB()), CTRL+Key_T);
qAcc->connectItem( qAcc->insertItem(CTRL+Key_T),this, SLOT(tickmarksTogCB()));
Mfile->insertItem( i18n("&Options...") , this, SLOT(showOptsCB()) );
Mfile->insertSeparator();
Mfile->insertItem( i18n("E&xit") , this, SLOT(quitClickedCB()) , CTRL+Key_Q);
qAcc->connectItem( qAcc->insertItem(CTRL+Key_Q),this, SLOT(quitClickedCB()));
QString msg,head;
msg = "KMix ";
msg += APP_VERSION;
msg += i18n("\n(C) 1997-1998 by Christian Esken ([email protected]).\n\n" \
"Sound mixer panel for the KDE Desktop Environment.\n"\
"This program is in the GPL.\n"\
"SGI Port done by Paul Kendall ([email protected]).\n"\
"*BSD fixes by Sebestyen Zoltan ([email protected])\n"\
"and Lennart Augustsson ([email protected]).\n"\
"ALSA port by Nick Lopez ([email protected]).");
head += APP_VERSION;
Mhelp = globalKapp->getHelpMenu(true,msg);
CHECK_PTR( Mhelp );
mainmenu = new KMenuBar( this, "main menu");
CHECK_PTR( mainmenu );
mainmenu->insertItem( i18n("&File"), Mfile );
mainmenu->insertSeparator();
mainmenu->insertItem( i18n("&Help"), Mhelp );
Mbalancing = new QPopupMenu;
CHECK_PTR( Mbalancing );
Mbalancing->insertItem(i18n("&Left") , this, SLOT(MbalLeftCB()));
Mbalancing->insertItem(i18n("&Center"), this, SLOT(MbalCentCB()));
Mbalancing->insertItem(i18n("&Right") , this, SLOT(MbalRightCB()));
}
示例2: QDialog
symbolDialog::symbolDialog(CharSet charsSet, QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "symbolDialog" );
setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) );
setSizeGripEnabled( FALSE );
GroupBox1 = new QButtonGroup(5, QGroupBox::Horizontal,tr(""), this,"GroupBox1" );
GroupBox1->setFlat ( true );
GroupBox1->setLineWidth ( 0 );
GroupBox1->moveFocus (0);
if (!charsSet)
initMinGreekChars();
else
initMajGreekChars();
QHBoxLayout* hlayout = new QHBoxLayout(this, 0, 0, "hlayout2");
hlayout->addWidget(GroupBox1);
languageChange();
connect (GroupBox1, SIGNAL(clicked(int)), this, SLOT(getChar(int)));
QAccel *accel = new QAccel(this);
accel->connectItem( accel->insertItem( Key_Return ),
this, SLOT(addCurrentChar()) );
}
示例3: QWidget
Window::Window()
: QWidget(0) {
setCaption(i18n("Switcha"));
// Line edit
mLineEdit = new ListViewSearchLine(this);
connect(mLineEdit, SIGNAL(returnPressed()), SLOT(slotReturnPressed()) );
mLineEdit->installEventFilter(this);
// View
mView = new KListView(this);
mView->header()->hide();
mView->addColumn("");
mView->setResizeMode(QListView::LastColumn);
connect(mView, SIGNAL(clicked(QListViewItem*)), SLOT(switchToWindow(QListViewItem*)) );
mLineEdit->setListView(mView);
// Layout
QVBoxLayout* layout = new QVBoxLayout(this);
layout->setMargin(6);
layout->setSpacing(6);
layout->addWidget(mLineEdit);
layout->addWidget(mView);
// Hide with esc
QAccel* accel = new QAccel(this);
accel->connectItem(
accel->insertItem(Key_Escape),
this, SLOT(hide()) );
}
示例4: QDialog
FieldSelect::FieldSelect(Procview *pv, Proc *proc)
: QDialog(0, "select fields"),
nbuttons(proc->cats.size()),
disp_fields(nbuttons),
procview(pv)
{
QVBoxLayout *tl = new QVBoxLayout(this, 10, 10);
updating = FALSE;
setCaption("qps: select fields");
buts = new QCheckBox*[nbuttons];
QGridLayout *l1 = new QGridLayout((nbuttons + 1) / 2, 5, 0);
tl->addLayout(l1, 1);
l1->addColSpacing(2, 15);
int half = (nbuttons + 1) / 2;
for(int i = 0; i < nbuttons; i++) {
QCheckBox *but = new QCheckBox(proc->cats[i]->name, this);
QLabel *desc = new QLabel(proc->cats[i]->help, this);
but->setMinimumSize(but->sizeHint());
desc->setMinimumSize(desc->sizeHint());
if(i < half) {
l1->addWidget(but, i, 0);
l1->addWidget(desc, i, 1);
} else {
l1->addWidget(but, i-half, 3);
l1->addWidget(desc, i-half, 4);
}
buts[i] = but;
connect(but, SIGNAL(toggled(bool)), this, SLOT(field_toggled(bool)));
}
update_boxes();
KButtonBox *bbox = new KButtonBox(this);
bbox->addStretch(1);
QPushButton *closebut = bbox->addButton(i18n("Close"));
closebut->setDefault(TRUE);
closebut->setFocus();
closebut->setFixedSize(closebut->sizeHint());
bbox->layout();
tl->addWidget(bbox);
connect(closebut, SIGNAL(clicked()), SLOT(closed()));
QAccel *acc = new QAccel(this);
acc->connectItem(acc->insertItem(CTRL + Key_W),
this, SLOT(closed()));
tl->freeze();
}
示例5: setCancelButton
void QProgressDialog::setCancelButton( QPushButton *cancelButton )
{
delete d->cancel;
d->cancel = cancelButton;
if (cancelButton) {
if ( cancelButton->parentWidget() == this ) {
cancelButton->hide(); // until we resize
} else {
cancelButton->recreate( this, 0, QPoint(0,0), FALSE );
}
connect( d->cancel, SIGNAL(clicked()), this, SIGNAL(cancelled()) );
QAccel *accel = new QAccel( this );
accel->connectItem( accel->insertItem(Key_Escape),
d->cancel, SIGNAL(clicked()) );
}
resize(sizeHint());
if (cancelButton)
cancelButton->show();
}
示例6: QMenuBar
/**
* Constructor of CommandManager.
*
* @param parent parent widget
*/
CommandManager::CommandManager(QWidget *parent)
: QMenuBar(parent)
{
actionMenu = new QPopupMenuExt(parent);
goMenu = new QPopupMenuExt(parent);
helpMenu = new QPopupMenuExt(parent);
// Listen on menu item selection
connect(actionMenu, SIGNAL(activated(int)), SLOT(commandActivated(int)));
connect(goMenu, SIGNAL(activated(int)), SLOT(commandActivated(int)));
connect(helpMenu, SIGNAL(activated(int)), SLOT(commandActivated(int)));
#ifndef QT_NO_ACCEL
QAccel* focusAccel = new QAccel(this, "focus-change accelerator");
focusAccel->connectItem(focusAccel->insertItem(MOVE_FOCUS, 0),
this, SLOT(moveFocus()));
#endif
}
示例7: KTextBrowser
KNSourceViewWindow::KNSourceViewWindow(const QString &text)
: KTextBrowser(0)
{
setWFlags(WType_TopLevel | WDestructiveClose);
QAccel *accel = new QAccel(this, "browser close-accel");
accel->connectItem(accel->insertItem(Qt::Key_Escape), this , SLOT(close()));
KNConfig::Appearance *app = knGlobals.configManager()->appearance();
setTextFormat(PlainText);
setCaption(kapp->makeStdCaption(i18n("Article Source")));
setPaper(QBrush(app->backgroundColor()));
setFont(app->articleFixedFont());
setColor(app->textColor());
setWordWrap(KTextBrowser::NoWrap);
setText(text);
KNHelper::restoreWindowSize("sourceWindow", this, QSize(500, 300));
show();
}
示例8: setCancelButton
void QProgressDialog::setCancelButton( QPushButton *cancelButton )
{
delete d->cancel;
d->cancel = cancelButton;
if (cancelButton) {
if ( cancelButton->parentWidget() == this ) {
cancelButton->hide(); // until we resize
} else {
cancelButton->reparent( this, 0, QPoint(0,0), FALSE );
}
connect( d->cancel, SIGNAL(clicked()), this, SIGNAL(canceled()) );
#ifndef QT_NO_ACCEL
QAccel *accel = new QAccel( this );
accel->connectItem( accel->insertItem(Key_Escape),
d->cancel, SIGNAL(clicked()) );
#endif
}
int w = QMAX( isVisible() ? width() : 0, sizeHint().width() );
int h = QMAX( isVisible() ? height() : 0, sizeHint().height() );
resize( w, h );
if (cancelButton)
cancelButton->show();
}
示例9: KDialog
PassDlg::PassDlg( QWidget* parent, const char* name, bool modal,
WFlags wflags, const QString& _head,
const QString& _user, const QString& _pass )
: KDialog(parent, name, modal, wflags)
{
QVBoxLayout *layout = new QVBoxLayout( this, marginHint(), spacingHint() );
//
// Bei Bedarf einen kleinen Kommentar als Label einfuegen
// NB20000703: Hmm??? Something about pretty comments? Made the change
// anyway, now the slave decides about the whole string.
QString msg;
if ( !_head.isEmpty() )
{
msg = "<qt><center>" + _head + "</center></qt>";
}
else
{
msg = i18n( "Enter your user name and password." );
}
QLabel *l = new QLabel(msg, this);
layout->addWidget( l );
QGridLayout *grid = new QGridLayout( 3, 5 );
layout->addLayout( grid );
l = new QLabel( i18n( "Username:" ), this );
l->setAlignment( Qt::AlignVCenter | Qt::AlignRight );
grid->addWidget( l, 0, 1 );
m_pUser = new QLineEdit( this );
grid->addWidget( m_pUser, 0, 3 );
#ifndef QT_NO_ACCEL
l->setBuddy( m_pUser );
#endif
l = new QLabel( i18n( "Password:" ), this );
l->setAlignment( Qt::AlignVCenter | Qt::AlignRight );
grid->addWidget( l, 2, 1 );
m_pPass = new QLineEdit( this );
m_pPass->setEchoMode( QLineEdit::Password );
grid->addWidget( m_pPass, 2, 3 );
#ifndef QT_NO_ACCEL
l->setBuddy( m_pPass );
#endif
if ( !_user.isEmpty() )
m_pUser->setText( _user );
if ( !_pass.isEmpty() )
m_pPass->setText( _pass );
layout->addSpacing( spacingHint() );
#ifndef QT_NO_ACCEL
// Connect vom LineEdit herstellen und Accelerator
QAccel *ac = new QAccel(this);
ac->connectItem( ac->insertItem(Key_Escape), this, SLOT(reject()) );
#endif
connect( m_pPass, SIGNAL(returnPressed()), SLOT(accept()) );
// Die Buttons "OK" & "Cancel" erzeugen
QHBoxLayout *bbox = new QHBoxLayout(layout);
bbox->addStretch();
QPushButton *b1 = new QPushButton( i18n( "OK" ), this );
QPushButton *b2 = new QPushButton( i18n( "Cancel" ), this );
bbox->addWidget( b1 );
bbox->addWidget( b2 );
// Buttons mit Funktionaliataet belegen
connect( b1, SIGNAL(clicked()), SLOT(accept()) );
connect( b2, SIGNAL(clicked()), SLOT(reject()) );
// Fenstertitel
#ifndef QT_NO_WIDGET_TOPEXTRA
setCaption( i18n("Authorization Request") );
#endif
// Focus
if ( _user.isEmpty() )
m_pUser->setFocus();
else
m_pPass->setFocus();
layout->addStretch( 10 );
resize( sizeHint() );
}
示例10: init
void Matrix::init(int rows, int cols)
{
formula_str = "";
selectedCol=0;
LeftButton=FALSE;
txt_format = 'f';
num_precision = 6;
x_start = 1.0;
x_end = 10.0;
y_start = 1.0;
y_end = 10.0;
dMatrix = 0;
QDateTime dt = QDateTime::currentDateTime ();
setBirthDate(dt.toString(Qt::LocalDate));
d_table = new QTable (rows, cols, this, "d_table");
d_table->setFocusPolicy(QWidget::StrongFocus);
d_table->setFocus();
d_table->setSelectionMode (QTable::Single);
d_table->setRowMovingEnabled(true);
/*
//!TODO: enable column moving, right now it doesn't work because of the event filter
//installed on hHeader
d_table->setColumnMovingEnabled(true);
connect(hHeader, SIGNAL(indexChange (int, int, int)), this, SLOT(notifyChanges()));
*/
QColor background = QColor(255, 255, 128);
d_table->setPaletteBackgroundColor(background);
d_table->setBackgroundColor(background);
QVBoxLayout* hlayout = new QVBoxLayout(this,0,0);
hlayout->addWidget(d_table);
QHeader* hHeader=(QHeader*)d_table->horizontalHeader();
hHeader->installEventFilter(this);
hHeader->setMouseTracking(TRUE);
QHeader* vHeader=(QHeader*)d_table->verticalHeader();
vHeader->setResizeEnabled (false);
vHeader->installEventFilter(this);
int w, h;
if (cols>3)
w=3*hHeader->sectionSize(0);
else
w=cols*hHeader->sectionSize(0);
if (rows>11)
h=11*vHeader->sectionSize(0);
else
h=(rows+1)*vHeader->sectionSize(0);
setGeometry(50,50,w+55,h);
QAccel *accel = new QAccel(this);
accel->connectItem( accel->insertItem( Key_Tab ),
this, SLOT(moveCurrentCell()));
accel->connectItem( accel->insertItem( CTRL+Key_A ),
this, SLOT(selectAll()));
connect(d_table, SIGNAL(valueChanged(int,int)), this, SLOT(cellEdited(int,int)));
connect(vHeader, SIGNAL(indexChange (int, int, int)), this, SLOT(notifyChanges()));
}
示例11: QWidget
GameBoard::GameBoard( QWidget *parent, const char *name )
: QWidget( parent, name )
{
setMinimumSize( 500, 355 );
quit = new QPushButton( "Quit", this, "quit" );
quit->setFont( QFont( "Times", 18, QFont::Bold ) );
connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) );
angle = new LCDRange( "ANGLE", this, "angle" );
angle->setRange( 5, 70 );
force = new LCDRange( "FORCE", this, "force" );
force->setRange( 10, 50 );
frame = new QFrame( this, "cannonFrame" );
frame->setFrameStyle( QFrame::WinPanel | QFrame::Sunken );
cannonField = new CannonField( this, "cannonField" );
cannonField->setBackgroundColor( QColor( 250, 250, 200) );
connect( angle,SIGNAL(valueChanged(int)), cannonField,SLOT(setAngle(int)));
connect( cannonField,SIGNAL(angleChanged(int)), angle,SLOT(setValue(int)));
connect( force,SIGNAL(valueChanged(int)), cannonField,SLOT(setForce(int)));
connect( cannonField,SIGNAL(forceChanged(int)), force,SLOT(setValue(int)));
connect( cannonField, SIGNAL(hit()),SLOT(hit()) );
connect( cannonField, SIGNAL(missed()),SLOT(missed()) );
angle->setValue( 60 );
force->setValue( 25 );
shoot = new QPushButton( "Shoot", this, "shoot" );
shoot->setFont( QFont( "Times", 18, QFont::Bold ) );
connect( shoot, SIGNAL(clicked()), SLOT(fire()) );
restart = new QPushButton( "New Game", this, "newgame" );
restart->setFont( QFont( "Times", 18, QFont::Bold ) );
connect( restart, SIGNAL(clicked()), SLOT(newGame()) );
hits = new QLCDNumber( 2, this, "hits" );
shotsLeft = new QLCDNumber( 2, this, "shotsleft" );
QLabel *hitsL = new QLabel( "HITS", this, "hitsLabel" );
QLabel *shotsLeftL = new QLabel( "SHOTS LEFT", this, "shotsleftLabel" );
QAccel *accel = new QAccel( this );
accel->connectItem( accel->insertItem( Key_Space), this, SLOT(fire()) );
accel->connectItem( accel->insertItem( Key_Q), qApp, SLOT(quit()) );
quit->setGeometry( 10, 10, 75, 30 );
angle->setGeometry( 10, quit->y() + quit->height() + 10, 75, 130 );
force->setGeometry( 10, angle->y() + angle->height() + 10, 75, 130 );
frame->move( angle->x() + angle->width() + 10, angle->y() );
cannonField->move( frame->x() + 2, frame->y() + 2 );
shoot->setGeometry( 10, 315, 75, 30 );
restart->setGeometry( 380, 10, 110, 30 );
hits->setGeometry( 130, 10, 40, 30 );
hitsL->setGeometry( hits->x() + hits->width() + 5, 10, 60, 30 );
shotsLeft->setGeometry( 240, 10, 40, 30 );
shotsLeftL->setGeometry( shotsLeft->x()+shotsLeft->width()+5, 10, 70, 30 );
newGame();
}
示例12: QDialog
PasswordDialog::PasswordDialog(const char *head, QWidget* parent, const char* name, bool modal, WFlags wflags)
: QDialog(parent, name, modal, wflags)
{
debugT("Here we go!!\n");
_head = head;
// (David) Layout management
QVBoxLayout *vLay = new QVBoxLayout(this, 10 /* border */, 5);
//
// Bei Bedarf einen kleinen Kommentar als Label einfuegen
// English please !!! David.
if (_head)
{
QLabel *l;
l = new QLabel(_head, this);
l->adjustSize();
l->setMinimumSize(l->size());
vLay->addWidget(l);
// l->setGeometry( 10, 10, 200, 20 );
}
// The horizontal layout for label + lineedit
QHBoxLayout *hLay = new QHBoxLayout(5);
vLay->addLayout(hLay);
//
// Die eine oder zwei Zeile(n) mit der Passwortabfrage
//
QLabel *l_password = new QLabel(klocale->translate("Password"), this);
l_password->adjustSize();
l_password->setMinimumSize(l_password->size());
hLay->addWidget(l_password,0);
//l_password->setGeometry( 10, 40, 80, 30 );
_w_password = new QLineEdit( this );
//_w_password->setGeometry( 90, 40, 100, 30 );
_w_password->setEchoMode( QLineEdit::Password );
_w_password->adjustSize();
_w_password->setFixedHeight(_w_password->height());
hLay->addWidget(_w_password,10);
//
// Connect vom LineEdit herstellen und Accelerator
//
QAccel *ac = new QAccel(this);
ac->connectItem( ac->insertItem(Key_Escape), this, SLOT(reject()) );
connect( _w_password, SIGNAL(returnPressed()), SLOT(accept()) );
//
// Eine vertikale Linie erzeugen
//
QFrame *f = new QFrame(this);
f->setLineWidth(1);
f->setMidLineWidth(1);
f->setFrameStyle( QFrame::HLine|QFrame::Raised);
//f->setGeometry( 10, 80, 180, 2 );
f->setMinimumHeight(5);
vLay->addWidget(f,0);
//
// Die Buttons "OK" & "Cancel" erzeugen
//
QHBoxLayout *hBLay = new QHBoxLayout(5);
vLay->addLayout(hBLay);
hBLay->addStretch();
QPushButton *b1, *b2;
b1 = new QPushButton(klocale->translate("OK"), this);
//b1->setGeometry( 10, 90, 80, 30 );
b1->adjustSize();
b1->setFixedSize(b1->size());
hBLay->addWidget(b1);
hBLay->addStretch();
//or hBLay->addSpacing(10);
b2 = new QPushButton(klocale->translate("Cancel"), this);
//b2->setGeometry( 110, 90, 80, 30 );
b2->adjustSize();
b2->setFixedSize(b2->size());
hBLay->addWidget(b2);
hBLay->addStretch();
// Buttons mit Funktionaliataet belegen
connect( b1, SIGNAL(clicked()), SLOT(accept()) );
connect( b2, SIGNAL(clicked()), SLOT(reject()) );
// Fenstertitel
setCaption(klocale->translate("Password"));
// Focus
_w_password->setFocus();
vLay->activate();
setMinimumSize(200, 50);
//.........这里部分代码省略.........
示例13: QLabel
//.........这里部分代码省略.........
{
if ( !name )
setName( "curvesDialog" );
setMinimumSize(QSize(400,200));
setCaption( tr( "QtiPlot - Add/Remove curves" ) );
setFocus();
QHBox *box5 = new QHBox (this, "box5");
box5->setSpacing (5);
box5->setMargin(5);
new QLabel("New curves style", box5, "label0");
boxStyle = new QComboBox (box5, "boxStyle");
boxStyle->insertItem( QPixmap(lPlot_xpm), tr( " Line" ) );
boxStyle->insertItem( QPixmap(pPlot_xpm), tr( " Scatter" ) );
boxStyle->insertItem( QPixmap(lpPlot_xpm), tr( " Line + Symbol" ) );
boxStyle->insertItem( QPixmap(dropLines_xpm), tr( " Vertical drop lines" ) );
boxStyle->insertItem( QPixmap(spline_xpm), tr( " Spline" ) );
boxStyle->insertItem( QPixmap(steps_xpm), tr( " Vertical steps" ) );
boxStyle->insertItem( QPixmap(area_xpm), tr( " Area" ) );
boxStyle->insertItem( QPixmap(vertBars_xpm), tr( " Vertical Bars" ) );
boxStyle->insertItem( QPixmap(hBars_xpm), tr( " Horizontal Bars" ) );
QHBox *box0 = new QHBox (this, "box0");
box0->setSpacing (5);
QVBox *box1=new QVBox (box0, "box1");
box1->setMargin(5);
box1->setSpacing (5);
TextLabel1 = new QLabel(box1, "TextLabel1" );
TextLabel1->setText( tr( "Available data" ) );
available = new QListBox( box1, "available" );
available->setSelectionMode (QListBox::Multi);
QVBox *box2=new QVBox (box0, "box2");
box2->setMargin(5);
box2->setSpacing (5);
btnAdd = new QPushButton(box2, "btnAdd" );
btnAdd->setPixmap( QPixmap(add_xpm) );
btnAdd->setFixedWidth (35);
btnAdd->setFixedHeight (30);
btnRemove = new QPushButton(box2, "btnRemove" );
btnRemove->setPixmap( QPixmap(remove_xpm) );
btnRemove->setFixedWidth (35);
btnRemove->setFixedHeight(30);
QVBox *box3=new QVBox (box0, "box3");
box3->setMargin(5);
box3->setSpacing (5);
TextLabel2 = new QLabel(box3, "TextLabel2" );
TextLabel2->setText( tr( "Graph contents" ) );
contents = new QListBox( box3, "contents" );
contents->setSelectionMode (QListBox::Multi);
QVBox *box4=new QVBox (box0, "box4");
box4->setMargin(5);
box4->setSpacing (5);
btnAssociations = new QPushButton(box4, "btnAssociations" );
btnAssociations->setText( tr( "&Plot Associations..." ) );
btnAssociations->setEnabled(false);
btnEditFunction = new QPushButton(box4, "btnEditFunction" );
btnEditFunction->setText( tr( "&Edit Function..." ) );
btnEditFunction->setEnabled(false);
btnOK = new QPushButton(box4, "btnOK" );
btnOK->setText( tr( "OK" ) );
btnOK->setDefault( TRUE );
btnCancel = new QPushButton(box4, "btnCancel" );
btnCancel->setText( tr( "Close" ) );
QVBoxLayout* layout = new QVBoxLayout(this,5,5, "hlayout3");
layout->addWidget(box5);
layout->addWidget(box0);
connect(btnAssociations, SIGNAL(clicked()),this, SLOT(showPlotAssociations()));
connect(btnEditFunction, SIGNAL(clicked()),this, SLOT(showFunctionDialog()));
connect(btnAdd, SIGNAL(clicked()),this, SLOT(addCurve()));
connect(btnRemove, SIGNAL(clicked()),this, SLOT(removeCurve()));
connect(btnOK, SIGNAL(clicked()),this, SLOT(close()));
connect(btnCancel, SIGNAL(clicked()),this, SLOT(close()));
connect(btnAdd, SIGNAL(clicked()),this, SLOT(enableRemoveBtn()));
connect(btnRemove, SIGNAL(clicked()),this, SLOT(enableRemoveBtn()));
connect(contents, SIGNAL(highlighted (int)), this, SLOT(showCurveBtn(int)));
connect(contents, SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)), this, SLOT(deletePopupMenu(QListBoxItem *, const QPoint &)));
connect(available, SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)), this, SLOT(addPopupMenu(QListBoxItem *, const QPoint &)));
QAccel *accel = new QAccel(this);
accel->connectItem( accel->insertItem( Key_Delete ), this, SLOT(removeCurve()) );
}