SampleSelectionWidget::SampleSelectionWidget(QString lab, std::set<int> a, std::set<int> m, QWidget* parent, const char* name) :
    QWidget(parent, name)
{
    activity = a;
    marks = m;
    
    //and some interface elments
    label = new QLineEdit(lab, this, "label");
    QPushButton* dispButton = new QPushButton("set", this, "dispButton");
    connect(dispButton, SIGNAL(clicked()), this, SLOT(setMarks()));

    QPushButton* delButton = new QPushButton("del", this, "delButton");
    connect(delButton, SIGNAL(clicked()), this, SLOT(requestDelete()) );

    QPushButton* saveButton = new QPushButton("save", this, "saveButton");
    connect(saveButton, SIGNAL(clicked()), this, SLOT(requestSave()) );

    // A couple of labels for the size of the set
    QString labstring;
    labstring.setNum(a.size());
    QLabel* set_size = new QLabel(labstring, this);
    labstring.setNum(m.size());
    QLabel* mark_size = new QLabel(labstring, this);

    QHBoxLayout* hbox = new QHBoxLayout(this);
    hbox->addWidget(dispButton);
    hbox->addWidget(label);
    hbox->addWidget(set_size);
    hbox->addSpacing(5);
    hbox->addWidget(mark_size);
    hbox->addWidget(delButton);
    hbox->addWidget(saveButton);
}
Example #2
0
void BrowserButton::properties()
{
    PanelBrowserDialog dlg( topMenu->path(), _icon, this );

    if( dlg.exec() == QDialog::Accepted ){
	_icon = dlg.icon();
	QString path = dlg.path();

	if ( path != topMenu->path() ) {
	    delete topMenu;
	    topMenu = new PanelBrowserMenu( path, this );
	    setPopup( topMenu );
	    setTitle( path );
	}
	setIcon( _icon );
	emit requestSave();
    }
}
Example #3
0
void ServiceButton::slotUpdate()
{
    loadServiceFromId(_id);
    readDesktopFile();
    emit requestSave();
}