Пример #1
0
// --- Construction and Destruction ---------------------------------------- //
/// Creates a new periodic table dialog.
PeriodicTableDialog::PeriodicTableDialog(QWidget *parent)
    : QDialog(parent),
      d(new PeriodicTableDialogPrivate)
{
    d->ui = new Ui::PeriodicTableDialog;
    d->ui->setupUi(this);

    d->closeOnClick = false;

    PeriodicTableWidget *widget = new PeriodicTableWidget(this);
    d->ui->layout->addWidget(widget);

    connect(widget, SIGNAL(elementClicked(chemkit::Element)), SLOT(elementClicked(chemkit::Element)));
}
Пример #2
0
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
void GeometryLayer::geometryClicked(QMouseEvent* event) {

	const Geometry* d = geometryAt(event->pos());

	if ( d )
		emit elementClicked(d->name());
}
Пример #3
0
CrumbleBar::CrumbleBar(QObject *parent) :
    QObject(parent),
    m_isInternalCalled(false),
    m_crumblePath(new Utils::CrumblePath)
{
    connect(m_crumblePath,
            SIGNAL(elementClicked(QVariant)),
            this,
            SLOT(onCrumblePathElementClicked(QVariant)));

    updateVisibility();
}