Esempio n. 1
0
void Submenu::render() const
{
    Video::instance->setColor(Vector(0.0f, 0.0f, 0.0f, 0.5f));
    Video::instance->renderRoundRect(m_lower, m_upper, static_cast<float>(m_menu->m_font->getHeight()/2));

    for (size_t i = 0; i < m_entries.size(); i++)
    {
        Entry* entry = m_entries[i];

        glPushMatrix();

        if (entry->m_align == Font::Align_Center)
        {
    		glTranslatef(m_centerPos.x, entry->m_lowerLeft.z, m_centerPos.z);
        }
        else
        {
            int w = entry->getMaxLeftWidth();
    		glTranslatef(m_centerPos.x - w, entry->m_lowerLeft.z, m_centerPos.z);
        }

        Video::instance->setColor(White);
        
        /*
        if (m_activeEntry == i)
        {
            Video::instance->setColor(Yellow);              // active entry
        }
        else
        {
         */
            if (entry->isEnabled())
            {
                Video::instance->setColor(White);              // normal entry
            }
            else
            {
                Video::instance->setColor(Grey); // disabled entry
            }
        /*
        }
        */
        entry->m_font->begin2();
        entry->render();
        glPopMatrix();

    }

    if (!m_title.empty())
    {
        // TODO: move somewhere else
        m_menu->m_fontBig->begin();
        glPushMatrix();
        glTranslatef(m_titlePos.x, m_titlePos.y, 0);
        Video::instance->setColor(darker(Pink, 1.5f));
        m_menu->m_fontBig->render(m_title, Font::Align_Center);
        glPopMatrix();
        m_menu->m_fontBig->end();
    }
}
Esempio n. 2
0
//====================
	void bevel(bool sunken, int pos)
	{
		if (--pos < 0) return;
		int w = width, h = height;
		int nx = w - 2*pos - 1;
		int ny = h - 2*pos - 1;
		if (nx <= 0 || ny <= 0) return;

		int f1 = DELTA_BEVEL;
		int f2 = DELTA_BEVELCORNER;

		if (sunken) f1 = -f1, f2 = -f2;
		make_delta_table (f1);

		unsigned char *p;
		int d, e, n;

		p = pixels + (pos + w * pos) * 4;

		d = ny * w * 4;
		e = 4;
		n = nx;
		while (--n)
		{
			p += e;
			darker(p);
			lighter(p+d);
		}
		p += e;
		modify(p,-f2);  // bottom-right corner pixel

		d = nx * 4;
		e = w * 4;
		n = ny;
		while (--n)
		{
			p += e;
			darker(p);
			lighter(p-d);
		}
		p += e;
		modify(p-d, f2); // top-left corner pixel
	}
Esempio n. 3
0
void EvalHistory::setGame(ChessGame* game)
{
	if (m_game)
		m_game->disconnect(this);
	m_game = game;
	m_plot->clearGraphs();
	if (!game)
	{
		replot(0);
		return;
	}

	connect(m_game, SIGNAL(scoreChanged(int,int)),
		this, SLOT(onScore(int,int)));

	m_plot->addGraph();
	m_plot->addGraph();

	auto cWhite = QColor("#ffce9e");
	auto cBlack = QColor("#d18b47");
	auto pWhite = QPen(cWhite.darker(150));
	pWhite.setWidth(2);
	auto pBlack = QPen(cBlack.darker());
	pBlack.setWidth(2);

	m_plot->graph(0)->setPen(pWhite);
	cWhite.setAlpha(200);
	m_plot->graph(0)->setBrush(QBrush(cWhite));
	m_plot->graph(1)->setPen(pBlack);
	cBlack.setAlpha(128);
	m_plot->graph(1)->setBrush(QBrush(cBlack));

	const auto& scores = game->scores();
	int ply = -1;

	for (auto it = scores.constBegin(); it != scores.constEnd(); ++it)
	{
		ply = it.key();
		addData(ply, it.value());
	}
	replot(ply);
}
Esempio n. 4
0
void ProjucerLookAndFeel::drawMenuBarBackground (Graphics& g, int width, int height,
                                                 bool, MenuBarComponent& menuBar)
{
    const auto colour = menuBar.findColour (backgroundColourId).withAlpha (0.75f);

    Rectangle<int> r (width, height);

    g.setColour (colour.contrasting (0.15f));
    g.fillRect  (r.removeFromTop (1));
    g.fillRect  (r.removeFromBottom (1));

    g.setGradientFill (ColourGradient (colour, 0, 0, colour.darker (0.2f), 0, (float)height, false));
    g.fillRect (r);
}
Esempio n. 5
0
//====================
void bevel(bool sunken, int pos, int exception)
{
    if (--pos < 0) return;
    int w = width, h = height;
    int nx = w - 2*pos - 1;
    int ny = h - 2*pos - 1;
    if (nx <= 0 || ny <= 0) return;

    int f1 = DELTA_BEVEL;
    int f2 = DELTA_BEVELCORNER;

    if (sunken) f1 = -f1, f2 = -f2;
    make_delta_table (f1);

    unsigned char *p; int d, e, n;

    p = pixels + (pos + w * pos) * 4;

    d = ny * w * 4; e = 4; n = nx;
    if (exception == BEVEL_EXCEPT_LEFT) darker(p);
    while (--n) {
        p += e;
        if (exception != BEVEL_EXCEPT_BOTTOM) darker(p);
        if (exception != BEVEL_EXCEPT_TOP)    lighter(p+d);
    }

    p += e;
    if (exception == BEVEL_EXCEPT_BOTTOM)
        darker(p);
    else if (exception == BEVEL_EXCEPT_RIGHT)
        darker(p), lighter(p+d);
    else modify(p,-f2);  // bottom-right corner pixel

    d = nx * 4; e = w * 4; n = ny;
    if (exception == BEVEL_EXCEPT_BOTTOM) lighter(p-d);
    while (--n) {
        p += e;
        if (exception != BEVEL_EXCEPT_RIGHT) darker(p);
        if (exception != BEVEL_EXCEPT_LEFT)  lighter(p-d);
    }

    p += e;
    if (exception == BEVEL_EXCEPT_TOP)
        darker(p), lighter(p-d);
    else if (exception == BEVEL_EXCEPT_LEFT)
        lighter(p-d);
    else
        modify(p-d, f2); // top-left corner pixel
}
Esempio n. 6
0
CGColor CGColor::lighter(float factor)
{
    if ( factor <= 0 )				// invalid lightness factor
        return *this;
    else if ( factor < 100 )			// makes color darker
        return darker( 10000.0/factor );

    float h, s, v;
    getHSV( h, s, v );
    v = (factor*v)/100.0;
    if ( v > 1.0 ) {				// overflow
        s -= v-1.0;				// adjust saturation
        if ( s < 0 )
            s = 0;
        v = 1.0;
    }
    CGColor c;
    c.setFromHSV(h, s, v );
    return c;
}
Esempio n. 7
0
	void Window::drawWindow(Renderer2D &out, IRect rect, FColor color, int outline) {
		FColor lighter(color.rgb() * 1.2f, color.a);
		FColor darker(color.rgb() * 0.8f, color.a);
		int aoutline = fwk::abs(outline);

		if(outline) {
			int2 hsize(rect.width(), aoutline);
			int2 vsize(aoutline, rect.height());

			FColor col1 = outline < 0? darker : lighter;
			out.addFilledRect(IRect(rect.min, rect.min + hsize), col1);
			out.addFilledRect(IRect(rect.min, rect.min + vsize), col1);

			int2 p1(rect.min.x, rect.max.y - aoutline);
			int2 p2(rect.max.x - aoutline, rect.min.y);
			FColor col2 = outline < 0? lighter : darker;
			out.addFilledRect(IRect(p1, p1 + hsize), col2);
			out.addFilledRect(IRect(p2, p2 + vsize), col2);
		}

		int2 off(aoutline, aoutline);
		out.addFilledRect(inset(rect, off, off), color);
	}
Esempio n. 8
0
void ImageNavigator::initializeActions() {
    setAttribute(Qt::WA_DeleteOnClose);
    menu = mainMenuBar->addMenu("Focus Viewer");
    QSignalMapper *signalMap = new QSignalMapper(this);

    QAction *showFullScreenAction = new QAction(tr("Show Full Screen"), this);
    showFullScreenAction->setShortcut(tr("Ctrl+F"));
    showFullScreenAction->setCheckable(true);
    connect(showFullScreenAction, SIGNAL(toggled(bool)), this, SLOT(enableFullScreen(bool)));
    menu->addAction(showFullScreenAction);

    toggleInfoToolAction = new QAction(tr("Display Coordinate Info"), this);
    toggleInfoToolAction->setShortcut(tr("I"));
    toggleInfoToolAction->setCheckable(true);
    addAction(toggleInfoToolAction);
    connect(toggleInfoToolAction, SIGNAL(triggered()), this, SLOT(toggleInfoTool()));
    menu->addAction(toggleInfoToolAction);

    // #ifdef Q_OS_MAC
    QMenu *zoomMenu = new QMenu("Zoom", this);
    menu->addMenu(zoomMenu);
    QAction *zoomInAction = new QAction(tr("Zoom In"), this);
    zoomInAction->setShortcut(tr("."));
    addAction(zoomInAction);
    connect(zoomInAction, SIGNAL(triggered()), this, SLOT(zoomIn()));
    zoomMenu->addAction(zoomInAction);

    QAction *zoomOutAction = new QAction(tr("Zoom Out"), this);
    zoomOutAction->setShortcut(tr(","));
    addAction(zoomOutAction);
    connect(zoomOutAction, SIGNAL(triggered()), this, SLOT(zoomOut()));
    zoomMenu->addAction(zoomOutAction);
    QAction *zoomStandardAction = new QAction(tr("Zoom Standard"), this);
    zoomStandardAction->setShortcut(tr("Space"));
    addAction(zoomStandardAction);
    connect(zoomStandardAction, SIGNAL(triggered()), this, SLOT(zoomStandard()));
    zoomMenu->addAction(zoomStandardAction);
    menu->addMenu(zoomMenu);
    //#endif

    toggleColorToolAction = new QAction(tr("Adjust Contrast/Brightness"), this);
    toggleColorToolAction->setShortcut(tr("O"));
    toggleColorToolAction->setCheckable(true);
    addAction(toggleColorToolAction);
    connect(toggleColorToolAction, SIGNAL(triggered()), this, SLOT(toggleColorTool()));
    menu->addAction(toggleColorToolAction);

    // #ifdef Q_OS_MAC
    // CHEN: 4.1.2015
    // if(imageType =="fft")
    // {
    QMenu *brighterMenu = new QMenu("Quick-Adjust Brightness", this);
    menu->addMenu(brighterMenu);
    QAction *brighterAction = new QAction(tr("Brighter"), this);
    brighterAction->setShortcut(tr("b"));
    addAction(brighterAction);
    connect(brighterAction, SIGNAL(triggered()), this, SLOT(brighter()));
    brighterMenu->addAction(brighterAction);

    QAction *darkerAction = new QAction(tr("Darker"), this);
    darkerAction->setShortcut(tr("n"));
    addAction(darkerAction);
    connect(darkerAction, SIGNAL(triggered()), this, SLOT(darker()));
    brighterMenu->addAction(darkerAction);
    // }
    // #endif

    toggleMouseAssignAction = new QAction(tr("Show Mouse Button Assignment"), this);
    toggleMouseAssignAction->setShortcut(tr("M"));
    toggleMouseAssignAction->setCheckable(true);
    addAction(toggleMouseAssignAction);
    connect(toggleMouseAssignAction, SIGNAL(triggered()), this, SLOT(toggleAssignTool()));
    menu->addAction(toggleMouseAssignAction);

    QAction *screenshot = new QAction(tr("Screen Shot"), this);
    screenshot->setShortcut(tr("G"));
    addAction(screenshot);
    connect(screenshot, SIGNAL(triggered()), image, SLOT(grabScreen()));
    menu->addAction(screenshot);

    int projectMode = projectData.projectMode().toInt();

    if (imageType == "fft") {
        viewDisplayParametersAction = new QAction(tr("Display Parameters"), this);
        viewDisplayParametersAction->setShortcut(tr("D"));
        viewDisplayParametersAction->setCheckable(true);
        addAction(viewDisplayParametersAction);
        connect(viewDisplayParametersAction, SIGNAL(triggered()), this, SLOT(toggleDisplayParameters()));
        menu->addAction(viewDisplayParametersAction);

        toggleCTFViewAction = new QAction(tr("View CTF"), this);
        toggleCTFViewAction->setShortcut(tr("C"));
        // toggleCTFViewAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
        toggleCTFViewAction->setCheckable(true);
        addAction(toggleCTFViewAction);
        connect(toggleCTFViewAction, SIGNAL(triggered()), this, SLOT(toggleCTFView()));
        //connect(toggleCTFViewAction,SIGNAL(triggered()),image,SLOT(toggleCTFView()));
        menu->addAction(toggleCTFViewAction);

        if (projectMode == 1) {
            QAction *displayMillerIndicesAction = new QAction(tr("Show Miller Indices"), this);
            displayMillerIndicesAction->setShortcut(tr("Shift+D"));
            displayMillerIndicesAction->setCheckable(true);
            addAction(displayMillerIndicesAction);
            connect(displayMillerIndicesAction, SIGNAL(triggered()), signalMap, SLOT(map()));
            signalMap->setMapping(displayMillerIndicesAction, "millerindices");
            menu->addAction(displayMillerIndicesAction);


            QAction *viewPSPeaksAction = new QAction(tr("View Peak List"), this);
            viewPSPeaksAction->setShortcut(tr("Shift+P"));
            viewPSPeaksAction->setCheckable(true);
            addAction(viewPSPeaksAction);
            connect(viewPSPeaksAction, SIGNAL(triggered()), signalMap, SLOT(map()));
            signalMap->setMapping(viewPSPeaksAction, "pspeaklist");
            connect(signalMap, SIGNAL(mapped(const QString &)), image, SLOT(toggleVisible(const QString &)));
            menu->addAction(viewPSPeaksAction);

            QAction *loadPSPeaksAction = new QAction(tr("Load Peak List"), this);
            loadPSPeaksAction->setShortcut(tr("Shift+L"));
            addAction(loadPSPeaksAction);
            connect(loadPSPeaksAction, SIGNAL(triggered()), this, SLOT(selectPSList()));
            menu->addAction(loadPSPeaksAction);
        }

        QMenu *spotSelection = new QMenu("Spot Selection");
        if (projectMode == 1) menu->addMenu(spotSelection);

        togglePeakListAction = new QAction(tr("Identify Spots"), spotSelection);
        togglePeakListAction->setShortcut(tr("P"));
        togglePeakListAction->setCheckable(true);

        if (projectMode == 1) {
            addAction(togglePeakListAction);
            connect(togglePeakListAction, SIGNAL(triggered()), image, SLOT(togglePeakList()));
            spotSelection->addAction(togglePeakListAction);
        }

        enterSpotSelectionModeAction = new QAction(tr("Enter Spot Selection Mode"), spotSelection);
        enterSpotSelectionModeAction->setCheckable(true);
        enterSpotSelectionModeAction->setShortcut(tr("Ctrl+P"));

        if (projectMode == 1) {
            addAction(enterSpotSelectionModeAction);
            connect(enterSpotSelectionModeAction, SIGNAL(triggered()), this, SLOT(toggleSpotSelectMode()));
            spotSelection->addAction(enterSpotSelectionModeAction);
        }

        savePeakListAction = new QAction(tr("Save Spot List"), spotSelection);
        savePeakListAction->setShortcut(tr("Ctrl+Shift+S"));

        if (projectMode == 1) {
            addAction(savePeakListAction);
            savePeakListAction->setDisabled(true);
            connect(savePeakListAction, SIGNAL(triggered()), image, SLOT(savePeakList()));
            spotSelection->addAction(savePeakListAction);
        }

        loadPeakListAction = new QAction(tr("Reload Spot List"), spotSelection);
        loadPeakListAction->setShortcut(tr("Ctrl+R"));

        if (projectMode == 1) {
            addAction(loadPeakListAction);
            loadPeakListAction->setDisabled(true);
            connect(loadPeakListAction, SIGNAL(triggered()), image, SLOT(loadPeakList()));
            connect(loadPeakListAction, SIGNAL(triggered()), image, SLOT(update()));
            spotSelection->addAction(loadPeakListAction);
        }

        clearPeakListAction = new QAction(tr("Clear Spot List"), spotSelection);
        clearPeakListAction->setShortcut(tr("Ctrl+Shift+C"));

        if (projectMode == 1) {
            addAction(clearPeakListAction);
            clearPeakListAction->setDisabled(true);
            connect(clearPeakListAction, SIGNAL(triggered()), image, SLOT(clearPeakList()));
            spotSelection->addAction(clearPeakListAction);
        }

        QMenu *latticeRefinement = new QMenu("Lattice Refinement");
        if (projectMode == 1) menu->addMenu(latticeRefinement);

        toggleLatticeViewAction = new QAction(tr("View Lattice"), latticeRefinement);
        toggleLatticeViewAction->setShortcut(tr("L"));
        toggleLatticeViewAction->setCheckable(true);
        if (projectMode == 1) {
            addAction(toggleLatticeViewAction);
            connect(toggleLatticeViewAction, SIGNAL(triggered()), image, SLOT(toggleLatticeView()));
            latticeRefinement->addAction(toggleLatticeViewAction);


            QAction *toggleSecondLatticeViewAction = new QAction(tr("View Second Lattice"), latticeRefinement);
            toggleSecondLatticeViewAction->setShortcut(tr("S"));
            toggleSecondLatticeViewAction->setCheckable(true);
            addAction(toggleSecondLatticeViewAction);
            connect(toggleSecondLatticeViewAction, SIGNAL(triggered()), image, SLOT(toggleSecondLatticeView()));
            latticeRefinement->addAction(toggleSecondLatticeViewAction);
        }

        enterLatticeRefinementModeAction = new QAction(tr("Enter Lattice Refinement Mode"), latticeRefinement);
        enterLatticeRefinementModeAction->setShortcut(tr("Shift+R"));
        enterLatticeRefinementModeAction->setCheckable(true);

        if (projectMode == 1) {
            addAction(enterLatticeRefinementModeAction);
            connect(enterLatticeRefinementModeAction, SIGNAL(triggered()), this, SLOT(toggleLatticeRefinementMode()));
            latticeRefinement->addAction(enterLatticeRefinementModeAction);
        }

        addRefinementPointAction = new QAction(tr("Add Refinement Spot"), latticeRefinement);
        addRefinementPointAction->setShortcuts(QList<QKeySequence>() << tr("Enter") << tr("Return"));
        addRefinementPointAction->setEnabled(false);

        if (projectMode == 1) {
            addAction(addRefinementPointAction);
            connect(addRefinementPointAction, SIGNAL(triggered()), latticeTool, SLOT(insertPoint()));
            latticeRefinement->addAction(addRefinementPointAction);
        }

    } else {

        toggleLatticeViewAction = new QAction(tr("View Lattice"), this);
        toggleLatticeViewAction->setShortcut(tr("L"));
        toggleLatticeViewAction->setCheckable(true);

        if (projectMode == 1) {
            addAction(toggleLatticeViewAction);
            menu->addAction(toggleLatticeViewAction);
            connect(toggleLatticeViewAction, SIGNAL(triggered()), signalMap, SLOT(map()));
            signalMap->setMapping(toggleLatticeViewAction, "realLattice");
            connect(signalMap, SIGNAL(mapped(const QString &)), image, SLOT(toggleVisible(const QString &)));
        }

        toggleParticlesViewAction = new QAction(tr("View Particles"), this);
        toggleParticlesViewAction->setShortcut(tr("P"));
        toggleParticlesViewAction->setCheckable(true);

        if (projectMode == 2) {
            addAction(toggleParticlesViewAction);
            menu->addAction(toggleParticlesViewAction);
            connect(toggleParticlesViewAction, SIGNAL(triggered()), image, SLOT(toggleParticleView()));
        }

        QMenu *fftSelectionMenu = new QMenu("Selection based FFT");

        QAction *fftSelectionAction = new QAction(tr("FFT of Selection"), this);
        fftSelectionMenu->addAction(fftSelectionAction);
        fftSelectionAction->setShortcut(tr("Shift+F"));
        fftSelectionAction->setCheckable(true);
        addAction(fftSelectionAction);
        connect(fftSelectionAction, SIGNAL(triggered()), this, SLOT(toggleFFTSelection()));

        if (projectMode == 1) {
            QAction *setReferenceOriginAction = new QAction(tr("Set Reference Origin"), this);
            fftSelectionMenu->addAction(setReferenceOriginAction);
            setReferenceOriginAction->setShortcut(tr("Shift+O"));
            addAction(setReferenceOriginAction);
            connect(setReferenceOriginAction, SIGNAL(triggered()), this, SLOT(setReferenceOrigin()));
            connect(setReferenceOriginAction, SIGNAL(triggered()), spotSelect, SLOT(updateReferenceOrigin()));
        }

        menu->addMenu(fftSelectionMenu);

        selectionMenu = new QMenu("Polygonal Selection");

        if (projectMode == 1) {
            QAction *selectionAreaAction = new QAction(tr("Polygonal Selection Masking"), this);
            selectionMenu->addAction(selectionAreaAction);
            selectionAreaAction->setShortcut(tr("Shift+S"));
            selectionAreaAction->setCheckable(true);
            addAction(selectionAreaAction);
            connect(selectionAreaAction, SIGNAL(triggered()), this, SLOT(toggleCreatePathMode()));


            QAction *saveSelectionArea = new QAction(tr("Save Selection"), this);
            selectionMenu->addAction(saveSelectionArea);
            saveSelectionArea->setShortcut(tr("Ctrl+Shift+S"));
            addAction(saveSelectionArea);
            connect(saveSelectionArea, SIGNAL(triggered()), image, SLOT(saveSelectionList()));

            QAction *clearSelectionArea = new QAction(tr("Clear Selection"), this);
            selectionMenu->addAction(clearSelectionArea);
            clearSelectionArea->setShortcut(tr("Ctrl+Shift+C"));
            addAction(clearSelectionArea);
            connect(clearSelectionArea, SIGNAL(triggered()), image, SLOT(clearSelectionVertices()));

            menu->addMenu(selectionMenu);


            QMenu *referenceMenu = new QMenu("Unbending References", menu);

            QAction *toggleBoxa1Action = new QAction(tr("View Boxa1"), this);
            toggleBoxa1Action->setCheckable(true);
            referenceMenu->addAction(toggleBoxa1Action);
            addAction(toggleBoxa1Action);
            connect(toggleBoxa1Action, SIGNAL(triggered()), this, SLOT(toggleBoxa1()));

            QAction *toggleBoxa2Action = new QAction(tr("View Boxa2"), this);
            toggleBoxa2Action->setCheckable(true);
            referenceMenu->addAction(toggleBoxa2Action);
            addAction(toggleBoxa2Action);
            connect(toggleBoxa2Action, SIGNAL(triggered()), this, SLOT(toggleBoxa2()));

            QAction *toggleBoxb1Action = new QAction(tr("View Boxb1"), this);
            toggleBoxb1Action->setCheckable(true);
            referenceMenu->addAction(toggleBoxb1Action);
            addAction(toggleBoxb1Action);
            connect(toggleBoxb1Action, SIGNAL(triggered()), this, SLOT(toggleBoxb1()));

            QAction *toggleBoxb2Action = new QAction(tr("View Boxb2"), this);
            toggleBoxb2Action->setCheckable(true);
            referenceMenu->addAction(toggleBoxb2Action);
            addAction(toggleBoxb2Action);
            connect(toggleBoxb2Action, SIGNAL(triggered()), this, SLOT(toggleBoxb2()));

            menu->addMenu(referenceMenu);

            QAction *setPhaseOriginAction = new QAction(tr("Set Phase Origin"), this);
            menu->addAction(setPhaseOriginAction);
            setPhaseOriginAction->setShortcut(tr("Shift+P"));
            addAction(setPhaseOriginAction);
            connect(setPhaseOriginAction, SIGNAL(triggered()), this, SLOT(setPhaseOrigin()));
        }

    }

    if (projectMode == 1) {
        QAction *showTiltAxisAction = new QAction(tr("View Tilt Axis in Raw Image (TLTAXIS)"), this);
        menu->addAction(showTiltAxisAction);
        showTiltAxisAction->setCheckable(true);
        showTiltAxisAction->setShortcut(tr("T"));
        addAction(showTiltAxisAction);
        connect(showTiltAxisAction, SIGNAL(triggered()), signalMap, SLOT(map()));
        signalMap->setMapping(showTiltAxisAction, "tiltaxis");
        connect(signalMap, SIGNAL(mapped(const QString &)), image, SLOT(toggleVisible(const QString &)));

        QAction *showTaxisAction = new QAction(tr("View Tilt Axis in Final Map (TAXA)"), this);
        menu->addAction(showTaxisAction);
        showTaxisAction->setCheckable(true);
        showTaxisAction->setShortcut(tr("Shift+T"));
        addAction(showTaxisAction);
        connect(showTaxisAction, SIGNAL(triggered()), signalMap, SLOT(map()));
        signalMap->setMapping(showTaxisAction, "tiltaxa");
        connect(signalMap, SIGNAL(mapped(const QString &)), image, SLOT(toggleVisible(const QString &)));
    }


    QAction *helpAction = new QAction(tr("Help"), this);
    helpAction->setShortcut(tr("H"));
    helpAction->setCheckable(true);
    addAction(helpAction);
    connect(helpAction, SIGNAL(triggered()), this, SLOT(toggleHelp()));
    menu->addAction(helpAction);

    closeAction = new QAction(tr("Close"), this);
    closeAction->setShortcut(tr("Esc"));
    addAction(closeAction);
    connect(closeAction, SIGNAL(triggered()), this, SLOT(closeCurrent()));
    menu->addAction(closeAction);

    //  menuBar->addMenu(menu);
}
//==============================================================================
void MultiChoicePropertyComponent::lookAndFeelChanged()
{
    auto iconColour = findColour (TextEditor::backgroundColourId).contrasting();
    expandButton.setColours (iconColour, iconColour.darker(), iconColour.darker());
}